parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"Kcd8":[function(require,module,exports) {
var global = arguments[3];
var e=arguments[3];function t(e){r.length||(n(),a=!0),r[r.length]=e}module.exports=t;var n,r=[],a=!1,o=0,u=1024;function l(){for(;o<r.length;){var e=o;if(o+=1,r[e].call(),o>u){for(var t=0,n=r.length-o;t<n;t++)r[t]=r[t+o];r.length-=o,o=0}}r.length=0,o=0,a=!1}var i=void 0!==e?e:self,c=i.MutationObserver||i.WebKitMutationObserver;function f(e){var t=1,n=new c(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function v(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}n="function"==typeof c?f(l):v(l),t.requestFlush=n,t.makeRequestCallFromTimer=v;
},{}],"nXM0":[function(require,module,exports) {
"use strict";var n=require("asap/raw");function t(){}var i=null,r={};function o(n){try{return n.then}catch(t){return i=t,r}}function e(n,t){try{return n(t)}catch(o){return i=o,r}}function u(n,t,o){try{n(t,o)}catch(e){return i=e,r}}function f(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("Promise constructor's argument is not a function");this._h=0,this._i=0,this._j=null,this._k=null,n!==t&&v(n,this)}function c(n,i,r){return new n.constructor(function(o,e){var u=new f(t);u.then(o,e),_(n,new a(i,r,u))})}function _(n,t){for(;3===n._i;)n=n._j;if(f._l&&f._l(n),0===n._i)return 0===n._h?(n._h=1,void(n._k=t)):1===n._h?(n._h=2,void(n._k=[n._k,t])):void n._k.push(t);s(n,t)}function s(t,o){n(function(){var n=1===t._i?o.onFulfilled:o.onRejected;if(null!==n){var u=e(n,t._j);u===r?h(o.promise,i):l(o.promise,u)}else 1===t._i?l(o.promise,t._j):h(o.promise,t._j)})}function l(n,t){if(t===n)return h(n,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var e=o(t);if(e===r)return h(n,i);if(e===n.then&&t instanceof f)return n._i=3,n._j=t,void p(n);if("function"==typeof e)return void v(e.bind(t),n)}n._i=1,n._j=t,p(n)}function h(n,t){n._i=2,n._j=t,f._m&&f._m(n,t),p(n)}function p(n){if(1===n._h&&(_(n,n._k),n._k=null),2===n._h){for(var t=0;t<n._k.length;t++)_(n,n._k[t]);n._k=null}}function a(n,t,i){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=i}function v(n,t){var o=!1,e=u(n,function(n){o||(o=!0,l(t,n))},function(n){o||(o=!0,h(t,n))});o||e!==r||(o=!0,h(t,i))}module.exports=f,f._l=null,f._m=null,f._n=t,f.prototype.then=function(n,i){if(this.constructor!==f)return c(this,n,i);var r=new f(t);return _(this,new a(n,i,r)),r};
},{"asap/raw":"Kcd8"}],"fG7b":[function(require,module,exports) {
"use strict";var e=require("./core"),o=[ReferenceError,TypeError,RangeError],n=!1;function r(){n=!1,e._l=null,e._m=null}function i(i){i=i||{},n&&r(),n=!0;var s=0,a=0,t={};function c(e){(i.allRejections||d(t[e].error,i.whitelist||o))&&(t[e].displayId=a++,i.onUnhandled?(t[e].logged=!0,i.onUnhandled(t[e].displayId,t[e].error)):(t[e].logged=!0,l(t[e].displayId,t[e].error)))}e._l=function(e){var o;2===e._i&&t[e._o]&&(t[e._o].logged?(o=e._o,t[o].logged&&(i.onHandled?i.onHandled(t[o].displayId,t[o].error):t[o].onUnhandled||(console.warn("Promise Rejection Handled (id: "+t[o].displayId+"):"),console.warn('  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+t[o].displayId+".")))):clearTimeout(t[e._o].timeout),delete t[e._o])},e._m=function(e,n){0===e._h&&(e._o=s++,t[e._o]={displayId:null,error:n,timeout:setTimeout(c.bind(null,e._o),d(n,o)?100:2e3),logged:!1})}}function l(e,o){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((o&&(o.stack||o))+"").split("\n").forEach(function(e){console.warn("  "+e)})}function d(e,o){return o.some(function(o){return e instanceof o})}exports.disable=r,exports.enable=i;
},{"./core":"nXM0"}],"d99q":[function(require,module,exports) {
"use strict";var n=require("./core.js");module.exports=n;var t=u(!0),e=u(!1),r=u(null),i=u(void 0),o=u(0),f=u("");function u(t){var e=new n(n._n);return e._i=1,e._j=t,e}n.resolve=function(c){if(c instanceof n)return c;if(null===c)return r;if(void 0===c)return i;if(!0===c)return t;if(!1===c)return e;if(0===c)return o;if(""===c)return f;if("object"==typeof c||"function"==typeof c)try{var a=c.then;if("function"==typeof a)return new n(a.bind(c))}catch(l){return new n(function(n,t){t(l)})}return u(c)},n.all=function(t){var e=Array.prototype.slice.call(t);return new n(function(t,r){if(0===e.length)return t([]);var i=e.length;function o(f,u){if(u&&("object"==typeof u||"function"==typeof u)){if(u instanceof n&&u.then===n.prototype.then){for(;3===u._i;)u=u._j;return 1===u._i?o(f,u._j):(2===u._i&&r(u._j),void u.then(function(n){o(f,n)},r))}var c=u.then;if("function"==typeof c)return void new n(c.bind(u)).then(function(n){o(f,n)},r)}e[f]=u,0==--i&&t(e)}for(var f=0;f<e.length;f++)o(f,e[f])})},n.reject=function(t){return new n(function(n,e){e(t)})},n.race=function(t){return new n(function(e,r){t.forEach(function(t){n.resolve(t).then(e,r)})})},n.prototype.catch=function(n){return this.then(null,n)};
},{"./core.js":"nXM0"}],"MScu":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Headers=a,exports.Request=m,exports.Response=A,exports.fetch=x,exports.DOMException=void 0;var t={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};function e(t){return t&&DataView.prototype.isPrototypeOf(t)}if(t.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function i(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function a(t){this.map={},t instanceof a?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function h(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function u(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function f(t){var e=new FileReader,r=u(e);return e.readAsArrayBuffer(t),r}function d(t){var e=new FileReader,r=u(e);return e.readAsText(t),r}function l(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(r){this._bodyInit=r,r?"string"==typeof r?this._bodyText=r:t.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:t.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():t.arrayBuffer&&t.blob&&e(r)?(this._bodyArrayBuffer=c(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||o(r))?this._bodyArrayBuffer=c(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||("string"==typeof r?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(l(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}a.prototype.append=function(t,e){t=n(t),e=s(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},a.prototype.delete=function(t){delete this.map[n(t)]},a.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},a.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},a.prototype.set=function(t,e){this.map[n(t)]=s(e)},a.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},a.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),i(t)},a.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),i(t)},a.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),i(t)},t.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t){var e=t.toUpperCase();return p.indexOf(e)>-1?e:t}function m(t,e){var r=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new a(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new a(e.headers)),this.method=b(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function w(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}}),e}function v(t){var e=new a;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}}),e}function A(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new a(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},A.error=function(){var t=new A(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];A.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new A(null,{status:e,headers:{location:t}})};var E=self.DOMException;exports.DOMException=E;try{new E}catch(g){exports.DOMException=E=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},E.prototype=Object.create(Error.prototype),E.prototype.constructor=E}function x(e,r){return new Promise(function(o,n){var s=new m(e,r);if(s.signal&&s.signal.aborted)return n(new E("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:v(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL");var e="response"in i?i.response:i.responseText;o(new A(e,t))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.onabort=function(){n(new E("Aborted","AbortError"))},i.open(s.method,s.url,!0),"include"===s.credentials?i.withCredentials=!0:"omit"===s.credentials&&(i.withCredentials=!1),"responseType"in i&&t.blob&&(i.responseType="blob"),s.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&s.signal.removeEventListener("abort",a)}),i.send(void 0===s._bodyInit?null:s._bodyInit)})}x.polyfill=!0,self.fetch||(self.fetch=x,self.Headers=a,self.Request=m,self.Response=A);
},{}],"YOwE":[function(require,module,exports) {
"use strict";var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function n(r){if(null==r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function o(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var t={},e=0;e<10;e++)t["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(r){return t[r]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}module.exports=o()?Object.assign:function(o,c){for(var a,i,s=n(o),f=1;f<arguments.length;f++){for(var u in a=Object(arguments[f]))t.call(a,u)&&(s[u]=a[u]);if(r){i=r(a);for(var b=0;b<i.length;b++)e.call(a,i[b])&&(s[i[b]]=a[i[b]])}}return s};
},{}],"fsMb":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],o=function(t){return t&&t.Math==Math&&t};module.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||Function("return this")();
},{}],"jLIo":[function(require,module,exports) {
module.exports=function(r){try{return!!r()}catch(t){return!0}};
},{}],"Iq5p":[function(require,module,exports) {
var e=require("../internals/fails");module.exports=!e(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]});
},{"../internals/fails":"jLIo"}],"qWEy":[function(require,module,exports) {
"use strict";var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);exports.f=t?function(r){var t=e(this,r);return!!t&&t.enumerable}:r;
},{}],"b0z3":[function(require,module,exports) {
module.exports=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}};
},{}],"o91R":[function(require,module,exports) {
var r={}.toString;module.exports=function(t){return r.call(t).slice(8,-1)};
},{}],"iKnn":[function(require,module,exports) {
var r=require("../internals/fails"),e=require("../internals/classof-raw"),t="".split;module.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(r){return"String"==e(r)?t.call(r,""):Object(r)}:Object;
},{"../internals/fails":"jLIo","../internals/classof-raw":"o91R"}],"MUzE":[function(require,module,exports) {
module.exports=function(o){if(null==o)throw TypeError("Can't call method on "+o);return o};
},{}],"XW1B":[function(require,module,exports) {
var e=require("../internals/indexed-object"),r=require("../internals/require-object-coercible");module.exports=function(i){return e(r(i))};
},{"../internals/indexed-object":"iKnn","../internals/require-object-coercible":"MUzE"}],"JoHA":[function(require,module,exports) {
module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof o};
},{}],"O68n":[function(require,module,exports) {
var t=require("../internals/is-object");module.exports=function(r,e){if(!t(r))return r;var n,o;if(e&&"function"==typeof(n=r.toString)&&!t(o=n.call(r)))return o;if("function"==typeof(n=r.valueOf)&&!t(o=n.call(r)))return o;if(!e&&"function"==typeof(n=r.toString)&&!t(o=n.call(r)))return o;throw TypeError("Can't convert object to primitive value")};
},{"../internals/is-object":"JoHA"}],"L6HH":[function(require,module,exports) {
var r={}.hasOwnProperty;module.exports=function(e,n){return r.call(e,n)};
},{}],"yoWO":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/is-object"),t=e.document,n=r(t)&&r(t.createElement);module.exports=function(e){return n?t.createElement(e):{}};
},{"../internals/global":"fsMb","../internals/is-object":"JoHA"}],"qjXq":[function(require,module,exports) {
var e=require("../internals/descriptors"),r=require("../internals/fails"),n=require("../internals/document-create-element");module.exports=!e&&!r(function(){return 7!=Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a});
},{"../internals/descriptors":"Iq5p","../internals/fails":"jLIo","../internals/document-create-element":"yoWO"}],"TsTB":[function(require,module,exports) {
var e=require("../internals/descriptors"),r=require("../internals/object-property-is-enumerable"),i=require("../internals/create-property-descriptor"),t=require("../internals/to-indexed-object"),n=require("../internals/to-primitive"),s=require("../internals/has"),a=require("../internals/ie8-dom-define"),o=Object.getOwnPropertyDescriptor;exports.f=e?o:function(e,c){if(e=t(e),c=n(c,!0),a)try{return o(e,c)}catch(u){}if(s(e,c))return i(!r.f.call(e,c),e[c])};
},{"../internals/descriptors":"Iq5p","../internals/object-property-is-enumerable":"qWEy","../internals/create-property-descriptor":"b0z3","../internals/to-indexed-object":"XW1B","../internals/to-primitive":"O68n","../internals/has":"L6HH","../internals/ie8-dom-define":"qjXq"}],"kWtR":[function(require,module,exports) {
var r=require("../internals/is-object");module.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e};
},{"../internals/is-object":"JoHA"}],"MUUr":[function(require,module,exports) {
var e=require("../internals/descriptors"),r=require("../internals/ie8-dom-define"),i=require("../internals/an-object"),t=require("../internals/to-primitive"),n=Object.defineProperty;exports.f=e?n:function(e,o,s){if(i(e),o=t(o,!0),i(s),r)try{return n(e,o,s)}catch(u){}if("get"in s||"set"in s)throw TypeError("Accessors not supported");return"value"in s&&(e[o]=s.value),e};
},{"../internals/descriptors":"Iq5p","../internals/ie8-dom-define":"qjXq","../internals/an-object":"kWtR","../internals/to-primitive":"O68n"}],"P1LK":[function(require,module,exports) {
var r=require("../internals/descriptors"),e=require("../internals/object-define-property"),t=require("../internals/create-property-descriptor");module.exports=r?function(r,n,i){return e.f(r,n,t(1,i))}:function(r,e,t){return r[e]=t,r};
},{"../internals/descriptors":"Iq5p","../internals/object-define-property":"MUUr","../internals/create-property-descriptor":"b0z3"}],"Kd1A":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/create-non-enumerable-property");module.exports=function(n,t){try{r(e,n,t)}catch(a){e[n]=t}return t};
},{"../internals/global":"fsMb","../internals/create-non-enumerable-property":"P1LK"}],"EoKg":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/set-global"),l="__core-js_shared__",a=e[l]||r(l,{});module.exports=a;
},{"../internals/global":"fsMb","../internals/set-global":"Kd1A"}],"gSgh":[function(require,module,exports) {
var e=require("../internals/shared-store"),n=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(e){return n.call(e)}),module.exports=e.inspectSource;
},{"../internals/shared-store":"EoKg"}],"ApkQ":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/inspect-source"),t=e.WeakMap;module.exports="function"==typeof t&&/native code/.test(r(t));
},{"../internals/global":"fsMb","../internals/inspect-source":"gSgh"}],"Q1vr":[function(require,module,exports) {
module.exports=!1;
},{}],"jkiL":[function(require,module,exports) {
var r=require("../internals/is-pure"),e=require("../internals/shared-store");(module.exports=function(r,i){return e[r]||(e[r]=void 0!==i?i:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});
},{"../internals/is-pure":"Q1vr","../internals/shared-store":"EoKg"}],"wzAi":[function(require,module,exports) {
var o=0,r=Math.random();module.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++o+r).toString(36)};
},{}],"vThu":[function(require,module,exports) {
var e=require("../internals/shared"),r=require("../internals/uid"),n=e("keys");module.exports=function(e){return n[e]||(n[e]=r(e))};
},{"../internals/shared":"jkiL","../internals/uid":"wzAi"}],"fiqV":[function(require,module,exports) {
module.exports={};
},{}],"bmsu":[function(require,module,exports) {

var e,r,n,t=require("../internals/native-weak-map"),i=require("../internals/global"),a=require("../internals/is-object"),u=require("../internals/create-non-enumerable-property"),o=require("../internals/has"),l=require("../internals/shared-key"),s=require("../internals/hidden-keys"),c=i.WeakMap,f=function(t){return n(t)?r(t):e(t,{})},p=function(e){return function(n){var t;if(!a(n)||(t=r(n)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(t){var q=new c,h=q.get,v=q.has,d=q.set;e=function(e,r){return d.call(q,e,r),r},r=function(e){return h.call(q,e)||{}},n=function(e){return v.call(q,e)}}else{var y=l("state");s[y]=!0,e=function(e,r){return u(e,y,r),r},r=function(e){return o(e,y)?e[y]:{}},n=function(e){return o(e,y)}}module.exports={set:e,get:r,has:n,enforce:f,getterFor:p};
},{"../internals/native-weak-map":"ApkQ","../internals/global":"fsMb","../internals/is-object":"JoHA","../internals/create-non-enumerable-property":"P1LK","../internals/has":"L6HH","../internals/shared-key":"vThu","../internals/hidden-keys":"fiqV"}],"nJPD":[function(require,module,exports) {

var e=require("../internals/global"),n=require("../internals/create-non-enumerable-property"),r=require("../internals/has"),t=require("../internals/set-global"),i=require("../internals/inspect-source"),o=require("../internals/internal-state"),s=o.get,a=o.enforce,u=String(String).split("String");(module.exports=function(i,o,s,l){var c=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet;"function"==typeof s&&("string"!=typeof o||r(s,"name")||n(s,"name",o),a(s).source=u.join("string"==typeof o?o:"")),i!==e?(c?!f&&i[o]&&(p=!0):delete i[o],p?i[o]=s:n(i,o,s)):p?i[o]=s:t(o,s)})(Function.prototype,"toString",function(){return"function"==typeof this&&s(this).source||i(this)});
},{"../internals/global":"fsMb","../internals/create-non-enumerable-property":"P1LK","../internals/has":"L6HH","../internals/set-global":"Kd1A","../internals/inspect-source":"gSgh","../internals/internal-state":"bmsu"}],"maCI":[function(require,module,exports) {

var e=require("../internals/global");module.exports=e;
},{"../internals/global":"fsMb"}],"I2Ph":[function(require,module,exports) {

var n=require("../internals/path"),e=require("../internals/global"),r=function(n){return"function"==typeof n?n:void 0};module.exports=function(t,i){return arguments.length<2?r(n[t])||r(e[t]):n[t]&&n[t][i]||e[t]&&e[t][i]};
},{"../internals/path":"maCI","../internals/global":"fsMb"}],"BS4O":[function(require,module,exports) {
var o=Math.ceil,r=Math.floor;module.exports=function(t){return isNaN(t=+t)?0:(t>0?r:o)(t)};
},{}],"u9JK":[function(require,module,exports) {
var e=require("../internals/to-integer"),r=Math.min;module.exports=function(n){return n>0?r(e(n),9007199254740991):0};
},{"../internals/to-integer":"BS4O"}],"lsD6":[function(require,module,exports) {
var r=require("../internals/to-integer"),e=Math.max,t=Math.min;module.exports=function(n,a){var i=r(n);return i<0?e(i+a,0):t(i,a)};
},{"../internals/to-integer":"BS4O"}],"sjwg":[function(require,module,exports) {
var e=require("../internals/to-indexed-object"),r=require("../internals/to-length"),n=require("../internals/to-absolute-index"),t=function(t){return function(i,u,o){var l,f=e(i),s=r(f.length),a=n(o,s);if(t&&u!=u){for(;s>a;)if((l=f[a++])!=l)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===u)return t||a||0;return!t&&-1}};module.exports={includes:t(!0),indexOf:t(!1)};
},{"../internals/to-indexed-object":"XW1B","../internals/to-length":"u9JK","../internals/to-absolute-index":"lsD6"}],"OLeg":[function(require,module,exports) {
var e=require("../internals/has"),r=require("../internals/to-indexed-object"),n=require("../internals/array-includes").indexOf,i=require("../internals/hidden-keys");module.exports=function(s,t){var u,a=r(s),d=0,l=[];for(u in a)!e(i,u)&&e(a,u)&&l.push(u);for(;t.length>d;)e(a,u=t[d++])&&(~n(l,u)||l.push(u));return l};
},{"../internals/has":"L6HH","../internals/to-indexed-object":"XW1B","../internals/array-includes":"sjwg","../internals/hidden-keys":"fiqV"}],"JDNh":[function(require,module,exports) {
module.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];
},{}],"Jc35":[function(require,module,exports) {
var e=require("../internals/object-keys-internal"),r=require("../internals/enum-bug-keys"),t=r.concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(r){return e(r,t)};
},{"../internals/object-keys-internal":"OLeg","../internals/enum-bug-keys":"JDNh"}],"tbJs":[function(require,module,exports) {
exports.f=Object.getOwnPropertySymbols;
},{}],"flmj":[function(require,module,exports) {
var e=require("../internals/get-built-in"),r=require("../internals/object-get-own-property-names"),n=require("../internals/object-get-own-property-symbols"),t=require("../internals/an-object");module.exports=e("Reflect","ownKeys")||function(e){var o=r.f(t(e)),i=n.f;return i?o.concat(i(e)):o};
},{"../internals/get-built-in":"I2Ph","../internals/object-get-own-property-names":"Jc35","../internals/object-get-own-property-symbols":"tbJs","../internals/an-object":"kWtR"}],"xz4I":[function(require,module,exports) {
var e=require("../internals/has"),r=require("../internals/own-keys"),n=require("../internals/object-get-own-property-descriptor"),t=require("../internals/object-define-property");module.exports=function(i,o){for(var a=r(o),s=t.f,l=n.f,p=0;p<a.length;p++){var u=a[p];e(i,u)||s(i,u,l(o,u))}};
},{"../internals/has":"L6HH","../internals/own-keys":"flmj","../internals/object-get-own-property-descriptor":"TsTB","../internals/object-define-property":"MUUr"}],"bdJd":[function(require,module,exports) {
var r=require("../internals/fails"),e=/#|\.prototype\./,t=function(e,t){var u=o[n(e)];return u==i||u!=a&&("function"==typeof t?r(t):!!t)},n=t.normalize=function(r){return String(r).replace(e,".").toLowerCase()},o=t.data={},a=t.NATIVE="N",i=t.POLYFILL="P";module.exports=t;
},{"../internals/fails":"jLIo"}],"nsh9":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/object-get-own-property-descriptor").f,t=require("../internals/create-non-enumerable-property"),n=require("../internals/redefine"),o=require("../internals/set-global"),i=require("../internals/copy-constructor-properties"),a=require("../internals/is-forced");module.exports=function(s,l){var p,u,f,c,q,d=s.target,g=s.global,y=s.stat;if(p=g?e:y?e[d]||o(d,{}):(e[d]||{}).prototype)for(u in l){if(c=l[u],f=s.noTargetGet?(q=r(p,u))&&q.value:p[u],!a(g?u:d+(y?".":"#")+u,s.forced)&&void 0!==f){if(typeof c==typeof f)continue;i(c,f)}(s.sham||f&&f.sham)&&t(c,"sham",!0),n(p,u,c,s)}};
},{"../internals/global":"fsMb","../internals/object-get-own-property-descriptor":"TsTB","../internals/create-non-enumerable-property":"P1LK","../internals/redefine":"nJPD","../internals/set-global":"Kd1A","../internals/copy-constructor-properties":"xz4I","../internals/is-forced":"bdJd"}],"Zxsl":[function(require,module,exports) {
var r=require("../internals/classof-raw");module.exports=Array.isArray||function(a){return"Array"==r(a)};
},{"../internals/classof-raw":"o91R"}],"iu5e":[function(require,module,exports) {
var e=require("../internals/require-object-coercible");module.exports=function(r){return Object(e(r))};
},{"../internals/require-object-coercible":"MUzE"}],"TLmu":[function(require,module,exports) {
"use strict";var e=require("../internals/to-primitive"),r=require("../internals/object-define-property"),i=require("../internals/create-property-descriptor");module.exports=function(t,n,o){var p=e(n);p in t?r.f(t,p,i(0,o)):t[p]=o};
},{"../internals/to-primitive":"O68n","../internals/object-define-property":"MUUr","../internals/create-property-descriptor":"b0z3"}],"Beuo":[function(require,module,exports) {
var r=require("../internals/fails");module.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())});
},{"../internals/fails":"jLIo"}],"JXG9":[function(require,module,exports) {
var e=require("../internals/native-symbol");module.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator;
},{"../internals/native-symbol":"Beuo"}],"d21O":[function(require,module,exports) {

var e=require("../internals/global"),r=require("../internals/shared"),i=require("../internals/has"),n=require("../internals/uid"),s=require("../internals/native-symbol"),t=require("../internals/use-symbol-as-uid"),l=r("wks"),u=e.Symbol,a=t?u:u&&u.withoutSetter||n;module.exports=function(e){return i(l,e)||(s&&i(u,e)?l[e]=u[e]:l[e]=a("Symbol."+e)),l[e]};
},{"../internals/global":"fsMb","../internals/shared":"jkiL","../internals/has":"L6HH","../internals/uid":"wzAi","../internals/native-symbol":"Beuo","../internals/use-symbol-as-uid":"JXG9"}],"h3Ck":[function(require,module,exports) {
var r=require("../internals/is-object"),e=require("../internals/is-array"),n=require("../internals/well-known-symbol"),o=n("species");module.exports=function(n,i){var t;return e(n)&&("function"!=typeof(t=n.constructor)||t!==Array&&!e(t.prototype)?r(t)&&null===(t=t[o])&&(t=void 0):t=void 0),new(void 0===t?Array:t)(0===i?0:i)};
},{"../internals/is-object":"JoHA","../internals/is-array":"Zxsl","../internals/well-known-symbol":"d21O"}],"IfsF":[function(require,module,exports) {
var e=require("../internals/get-built-in");module.exports=e("navigator","userAgent")||"";
},{"../internals/get-built-in":"I2Ph"}],"sITd":[function(require,module,exports) {


var e,r,s=require("../internals/global"),n=require("../internals/engine-user-agent"),a=s.process,i=a&&a.versions,t=i&&i.v8;t?r=(e=t.split("."))[0]+e[1]:n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(r=e[1]),module.exports=r&&+r;
},{"../internals/global":"fsMb","../internals/engine-user-agent":"IfsF"}],"JR9v":[function(require,module,exports) {
var n=require("../internals/fails"),e=require("../internals/well-known-symbol"),r=require("../internals/engine-v8-version"),o=e("species");module.exports=function(e){return r>=51||!n(function(){var n=[];return(n.constructor={})[o]=function(){return{foo:1}},1!==n[e](Boolean).foo})};
},{"../internals/fails":"jLIo","../internals/well-known-symbol":"d21O","../internals/engine-v8-version":"sITd"}],"jKIw":[function(require,module,exports) {
"use strict";var r=require("../internals/export"),e=require("../internals/fails"),n=require("../internals/is-array"),t=require("../internals/is-object"),i=require("../internals/to-object"),a=require("../internals/to-length"),o=require("../internals/create-property"),s=require("../internals/array-species-create"),l=require("../internals/array-method-has-species-support"),u=require("../internals/well-known-symbol"),c=require("../internals/engine-v8-version"),f=u("isConcatSpreadable"),p=9007199254740991,q="Maximum allowed index exceeded",h=c>=51||!e(function(){var r=[];return r[f]=!1,r.concat()[0]!==r}),d=l("concat"),y=function(r){if(!t(r))return!1;var e=r[f];return void 0!==e?!!e:n(r)},v=!h||!d;r({target:"Array",proto:!0,forced:v},{concat:function(r){var e,n,t,l,u,c=i(this),f=s(c,0),h=0;for(e=-1,t=arguments.length;e<t;e++)if(u=-1===e?c:arguments[e],y(u)){if(h+(l=a(u.length))>p)throw TypeError(q);for(n=0;n<l;n++,h++)n in u&&o(f,h,u[n])}else{if(h>=p)throw TypeError(q);o(f,h++,u)}return f.length=h,f}});
},{"../internals/export":"nsh9","../internals/fails":"jLIo","../internals/is-array":"Zxsl","../internals/is-object":"JoHA","../internals/to-object":"iu5e","../internals/to-length":"u9JK","../internals/create-property":"TLmu","../internals/array-species-create":"h3Ck","../internals/array-method-has-species-support":"JR9v","../internals/well-known-symbol":"d21O","../internals/engine-v8-version":"sITd"}],"h6PB":[function(require,module,exports) {
var e=require("../internals/well-known-symbol"),r=e("toStringTag"),n={};n[r]="z",module.exports="[object z]"===String(n);
},{"../internals/well-known-symbol":"d21O"}],"jHyJ":[function(require,module,exports) {
var n=require("../internals/to-string-tag-support"),r=require("../internals/classof-raw"),t=require("../internals/well-known-symbol"),e=t("toStringTag"),u="Arguments"==r(function(){return arguments}()),i=function(n,r){try{return n[r]}catch(t){}};module.exports=n?r:function(n){var t,o,l;return void 0===n?"Undefined":null===n?"Null":"string"==typeof(o=i(t=Object(n),e))?o:u?r(t):"Object"==(l=r(t))&&"function"==typeof t.callee?"Arguments":l};
},{"../internals/to-string-tag-support":"h6PB","../internals/classof-raw":"o91R","../internals/well-known-symbol":"d21O"}],"POts":[function(require,module,exports) {
"use strict";var t=require("../internals/to-string-tag-support"),r=require("../internals/classof");module.exports=t?{}.toString:function(){return"[object "+r(this)+"]"};
},{"../internals/to-string-tag-support":"h6PB","../internals/classof":"jHyJ"}],"Fe9H":[function(require,module,exports) {
var e=require("../internals/to-string-tag-support"),r=require("../internals/redefine"),t=require("../internals/object-to-string");e||r(Object.prototype,"toString",t,{unsafe:!0});
},{"../internals/to-string-tag-support":"h6PB","../internals/redefine":"nJPD","../internals/object-to-string":"POts"}],"LTZw":[function(require,module,exports) {
var e=require("../internals/object-keys-internal"),r=require("../internals/enum-bug-keys");module.exports=Object.keys||function(n){return e(n,r)};
},{"../internals/object-keys-internal":"OLeg","../internals/enum-bug-keys":"JDNh"}],"GBv3":[function(require,module,exports) {
var e=require("../internals/descriptors"),r=require("../internals/object-define-property"),n=require("../internals/an-object"),t=require("../internals/object-keys");module.exports=e?Object.defineProperties:function(e,i){n(e);for(var o,s=t(i),a=s.length,u=0;a>u;)r.f(e,o=s[u++],i[o]);return e};
},{"../internals/descriptors":"Iq5p","../internals/object-define-property":"MUUr","../internals/an-object":"kWtR","../internals/object-keys":"LTZw"}],"jjlw":[function(require,module,exports) {
var e=require("../internals/get-built-in");module.exports=e("document","documentElement");
},{"../internals/get-built-in":"I2Ph"}],"InPK":[function(require,module,exports) {
var e,n=require("../internals/an-object"),r=require("../internals/object-define-properties"),t=require("../internals/enum-bug-keys"),i=require("../internals/hidden-keys"),u=require("../internals/html"),o=require("../internals/document-create-element"),c=require("../internals/shared-key"),l=">",a="<",s="prototype",d="script",m=c("IE_PROTO"),p=function(){},f=function(e){return a+d+l+e+a+"/"+d+l},v=function(e){e.write(f("")),e.close();var n=e.parentWindow.Object;return e=null,n},b=function(){var e,n=o("iframe"),r="java"+d+":";return n.style.display="none",u.appendChild(n),n.src=String(r),(e=n.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F},h=function(){try{e=document.domain&&new ActiveXObject("htmlfile")}catch(r){}h=e?v(e):b();for(var n=t.length;n--;)delete h[s][t[n]];return h()};i[m]=!0,module.exports=Object.create||function(e,t){var i;return null!==e?(p[s]=n(e),i=new p,p[s]=null,i[m]=e):i=h(),void 0===t?i:r(i,t)};
},{"../internals/an-object":"kWtR","../internals/object-define-properties":"GBv3","../internals/enum-bug-keys":"JDNh","../internals/hidden-keys":"fiqV","../internals/html":"jjlw","../internals/document-create-element":"yoWO","../internals/shared-key":"vThu"}],"BAzj":[function(require,module,exports) {
var e=require("../internals/to-indexed-object"),t=require("../internals/object-get-own-property-names").f,r={}.toString,n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return t(e)}catch(r){return n.slice()}};module.exports.f=function(i){return n&&"[object Window]"==r.call(i)?o(i):t(e(i))};
},{"../internals/to-indexed-object":"XW1B","../internals/object-get-own-property-names":"Jc35"}],"fuvq":[function(require,module,exports) {
var e=require("../internals/well-known-symbol");exports.f=e;
},{"../internals/well-known-symbol":"d21O"}],"w9K6":[function(require,module,exports) {
var e=require("../internals/path"),r=require("../internals/has"),n=require("../internals/well-known-symbol-wrapped"),l=require("../internals/object-define-property").f;module.exports=function(a){var i=e.Symbol||(e.Symbol={});r(i,a)||l(i,a,{value:n.f(a)})};
},{"../internals/path":"maCI","../internals/has":"L6HH","../internals/well-known-symbol-wrapped":"fuvq","../internals/object-define-property":"MUUr"}],"jLM3":[function(require,module,exports) {
var e=require("../internals/object-define-property").f,r=require("../internals/has"),n=require("../internals/well-known-symbol"),o=n("toStringTag");module.exports=function(n,t,i){n&&!r(n=i?n:n.prototype,o)&&e(n,o,{configurable:!0,value:t})};
},{"../internals/object-define-property":"MUUr","../internals/has":"L6HH","../internals/well-known-symbol":"d21O"}],"cu3N":[function(require,module,exports) {
module.exports=function(n){if("function"!=typeof n)throw TypeError(String(n)+" is not a function");return n};
},{}],"UP5A":[function(require,module,exports) {
var n=require("../internals/a-function");module.exports=function(r,t,e){if(n(r),void 0===t)return r;switch(e){case 0:return function(){return r.call(t)};case 1:return function(n){return r.call(t,n)};case 2:return function(n,e){return r.call(t,n,e)};case 3:return function(n,e,u){return r.call(t,n,e,u)}}return function(){return r.apply(t,arguments)}};
},{"../internals/a-function":"cu3N"}],"d6Fg":[function(require,module,exports) {
var e=require("../internals/function-bind-context"),r=require("../internals/indexed-object"),n=require("../internals/to-object"),i=require("../internals/to-length"),t=require("../internals/array-species-create"),a=[].push,s=function(s){var u=1==s,c=2==s,o=3==s,l=4==s,f=6==s,d=5==s||f;return function(h,q,v,p){for(var x,b,m=n(h),g=r(m),j=e(q,v,3),y=i(g.length),w=0,E=p||t,I=u?E(h,y):c?E(h,0):void 0;y>w;w++)if((d||w in g)&&(b=j(x=g[w],w,m),s))if(u)I[w]=b;else if(b)switch(s){case 3:return!0;case 5:return x;case 6:return w;case 2:a.call(I,x)}else if(l)return!1;return f?-1:o||l?l:I}};module.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)};
},{"../internals/function-bind-context":"UP5A","../internals/indexed-object":"iKnn","../internals/to-object":"iu5e","../internals/to-length":"u9JK","../internals/array-species-create":"h3Ck"}],"lwCF":[function(require,module,exports) {

"use strict";var e=require("../internals/export"),r=require("../internals/global"),t=require("../internals/get-built-in"),n=require("../internals/is-pure"),i=require("../internals/descriptors"),o=require("../internals/native-symbol"),s=require("../internals/use-symbol-as-uid"),a=require("../internals/fails"),u=require("../internals/has"),l=require("../internals/is-array"),c=require("../internals/is-object"),f=require("../internals/an-object"),p=require("../internals/to-object"),y=require("../internals/to-indexed-object"),b=require("../internals/to-primitive"),d=require("../internals/create-property-descriptor"),g=require("../internals/object-create"),q=require("../internals/object-keys"),h=require("../internals/object-get-own-property-names"),m=require("../internals/object-get-own-property-names-external"),v=require("../internals/object-get-own-property-symbols"),w=require("../internals/object-get-own-property-descriptor"),j=require("../internals/object-define-property"),O=require("../internals/object-property-is-enumerable"),S=require("../internals/create-non-enumerable-property"),k=require("../internals/redefine"),P=require("../internals/shared"),E=require("../internals/shared-key"),x=require("../internals/hidden-keys"),N=require("../internals/uid"),F=require("../internals/well-known-symbol"),J=require("../internals/well-known-symbol-wrapped"),T=require("../internals/define-well-known-symbol"),C=require("../internals/set-to-string-tag"),D=require("../internals/internal-state"),I=require("../internals/array-iteration").forEach,Q=E("hidden"),z="Symbol",A="prototype",B=F("toPrimitive"),G=D.set,H=D.getterFor(z),K=Object[A],L=r.Symbol,M=t("JSON","stringify"),R=w.f,U=j.f,V=m.f,W=O.f,X=P("symbols"),Y=P("op-symbols"),Z=P("string-to-symbol-registry"),$=P("symbol-to-string-registry"),_=P("wks"),ee=r.QObject,re=!ee||!ee[A]||!ee[A].findChild,te=i&&a(function(){return 7!=g(U({},"a",{get:function(){return U(this,"a",{value:7}).a}})).a})?function(e,r,t){var n=R(K,r);n&&delete K[r],U(e,r,t),n&&e!==K&&U(K,r,n)}:U,ne=function(e,r){var t=X[e]=g(L[A]);return G(t,{type:z,tag:e,description:r}),i||(t.description=r),t},ie=s?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof L},oe=function(e,r,t){e===K&&oe(Y,r,t),f(e);var n=b(r,!0);return f(t),u(X,n)?(t.enumerable?(u(e,Q)&&e[Q][n]&&(e[Q][n]=!1),t=g(t,{enumerable:d(0,!1)})):(u(e,Q)||U(e,Q,d(1,{})),e[Q][n]=!0),te(e,n,t)):U(e,n,t)},se=function(e,r){f(e);var t=y(r),n=q(t).concat(fe(t));return I(n,function(r){i&&!ue.call(t,r)||oe(e,r,t[r])}),e},ae=function(e,r){return void 0===r?g(e):se(g(e),r)},ue=function(e){var r=b(e,!0),t=W.call(this,r);return!(this===K&&u(X,r)&&!u(Y,r))&&(!(t||!u(this,r)||!u(X,r)||u(this,Q)&&this[Q][r])||t)},le=function(e,r){var t=y(e),n=b(r,!0);if(t!==K||!u(X,n)||u(Y,n)){var i=R(t,n);return!i||!u(X,n)||u(t,Q)&&t[Q][n]||(i.enumerable=!0),i}},ce=function(e){var r=V(y(e)),t=[];return I(r,function(e){u(X,e)||u(x,e)||t.push(e)}),t},fe=function(e){var r=e===K,t=V(r?Y:y(e)),n=[];return I(t,function(e){!u(X,e)||r&&!u(K,e)||n.push(X[e])}),n};if(o||(k((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=N(e),t=function(e){this===K&&t.call(Y,e),u(this,Q)&&u(this[Q],r)&&(this[Q][r]=!1),te(this,r,d(1,e))};return i&&re&&te(K,r,{configurable:!0,set:t}),ne(r,e)})[A],"toString",function(){return H(this).tag}),k(L,"withoutSetter",function(e){return ne(N(e),e)}),O.f=ue,j.f=oe,w.f=le,h.f=m.f=ce,v.f=fe,J.f=function(e){return ne(F(e),e)},i&&(U(L[A],"description",{configurable:!0,get:function(){return H(this).description}}),n||k(K,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,wrap:!0,forced:!o,sham:!o},{Symbol:L}),I(q(_),function(e){T(e)}),e({target:z,stat:!0,forced:!o},{for:function(e){var r=String(e);if(u(Z,r))return Z[r];var t=L(r);return Z[r]=t,$[t]=r,t},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(u($,e))return $[e]},useSetter:function(){re=!0},useSimple:function(){re=!1}}),e({target:"Object",stat:!0,forced:!o,sham:!i},{create:ae,defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:ce,getOwnPropertySymbols:fe}),e({target:"Object",stat:!0,forced:a(function(){v.f(1)})},{getOwnPropertySymbols:function(e){return v.f(p(e))}}),M){var pe=!o||a(function(){var e=L();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))});e({target:"JSON",stat:!0,forced:pe},{stringify:function(e,r,t){for(var n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=r,(c(r)||void 0!==e)&&!ie(e))return l(r)||(r=function(e,r){if("function"==typeof n&&(r=n.call(this,e,r)),!ie(r))return r}),i[1]=r,M.apply(null,i)}})}L[A][B]||S(L[A],B,L[A].valueOf),C(L,z),x[Q]=!0;
},{"../internals/export":"nsh9","../internals/global":"fsMb","../internals/get-built-in":"I2Ph","../internals/is-pure":"Q1vr","../internals/descriptors":"Iq5p","../internals/native-symbol":"Beuo","../internals/use-symbol-as-uid":"JXG9","../internals/fails":"jLIo","../internals/has":"L6HH","../internals/is-array":"Zxsl","../internals/is-object":"JoHA","../internals/an-object":"kWtR","../internals/to-object":"iu5e","../internals/to-indexed-object":"XW1B","../internals/to-primitive":"O68n","../internals/create-property-descriptor":"b0z3","../internals/object-create":"InPK","../internals/object-keys":"LTZw","../internals/object-get-own-property-names":"Jc35","../internals/object-get-own-property-names-external":"BAzj","../internals/object-get-own-property-symbols":"tbJs","../internals/object-get-own-property-descriptor":"TsTB","../internals/object-define-property":"MUUr","../internals/object-property-is-enumerable":"qWEy","../internals/create-non-enumerable-property":"P1LK","../internals/redefine":"nJPD","../internals/shared":"jkiL","../internals/shared-key":"vThu","../internals/hidden-keys":"fiqV","../internals/uid":"wzAi","../internals/well-known-symbol":"d21O","../internals/well-known-symbol-wrapped":"fuvq","../internals/define-well-known-symbol":"w9K6","../internals/set-to-string-tag":"jLM3","../internals/internal-state":"bmsu","../internals/array-iteration":"d6Fg"}],"uOq6":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("asyncIterator");
},{"../internals/define-well-known-symbol":"w9K6"}],"N1rm":[function(require,module,exports) {

"use strict";var r=require("../internals/export"),e=require("../internals/descriptors"),t=require("../internals/global"),i=require("../internals/has"),o=require("../internals/is-object"),n=require("../internals/object-define-property").f,s=require("../internals/copy-constructor-properties"),a=t.Symbol;if(e&&"function"==typeof a&&(!("description"in a.prototype)||void 0!==a().description)){var l={},c=function(){var r=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof c?new a(r):void 0===r?a():a(r);return""===r&&(l[e]=!0),e};s(c,a);var p=c.prototype=a.prototype;p.constructor=c;var u=p.toString,v="Symbol(test)"==String(a("test")),f=/^Symbol\((.*)\)[^)]+$/;n(p,"description",{configurable:!0,get:function(){var r=o(this)?this.valueOf():this,e=u.call(r);if(i(l,r))return"";var t=v?e.slice(7,-1):e.replace(f,"$1");return""===t?void 0:t}}),r({global:!0,forced:!0},{Symbol:c})}
},{"../internals/export":"nsh9","../internals/descriptors":"Iq5p","../internals/global":"fsMb","../internals/has":"L6HH","../internals/is-object":"JoHA","../internals/object-define-property":"MUUr","../internals/copy-constructor-properties":"xz4I"}],"Vpnf":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("hasInstance");
},{"../internals/define-well-known-symbol":"w9K6"}],"UzhC":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("isConcatSpreadable");
},{"../internals/define-well-known-symbol":"w9K6"}],"jgWr":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("iterator");
},{"../internals/define-well-known-symbol":"w9K6"}],"x7Iv":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("match");
},{"../internals/define-well-known-symbol":"w9K6"}],"dD1p":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("matchAll");
},{"../internals/define-well-known-symbol":"w9K6"}],"Aq4B":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("replace");
},{"../internals/define-well-known-symbol":"w9K6"}],"cnZ0":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("search");
},{"../internals/define-well-known-symbol":"w9K6"}],"GEFR":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("species");
},{"../internals/define-well-known-symbol":"w9K6"}],"f1wk":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("split");
},{"../internals/define-well-known-symbol":"w9K6"}],"urw5":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("toPrimitive");
},{"../internals/define-well-known-symbol":"w9K6"}],"oSbR":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("toStringTag");
},{"../internals/define-well-known-symbol":"w9K6"}],"b2Lu":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("unscopables");
},{"../internals/define-well-known-symbol":"w9K6"}],"mBdf":[function(require,module,exports) {
var t=require("../internals/set-to-string-tag");t(Math,"Math",!0);
},{"../internals/set-to-string-tag":"jLM3"}],"we9u":[function(require,module,exports) {

var r=require("../internals/global"),e=require("../internals/set-to-string-tag");e(r.JSON,"JSON",!0);
},{"../internals/global":"fsMb","../internals/set-to-string-tag":"jLM3"}],"NDR0":[function(require,module,exports) {
require("../../modules/es.array.concat"),require("../../modules/es.object.to-string"),require("../../modules/es.symbol"),require("../../modules/es.symbol.async-iterator"),require("../../modules/es.symbol.description"),require("../../modules/es.symbol.has-instance"),require("../../modules/es.symbol.is-concat-spreadable"),require("../../modules/es.symbol.iterator"),require("../../modules/es.symbol.match"),require("../../modules/es.symbol.match-all"),require("../../modules/es.symbol.replace"),require("../../modules/es.symbol.search"),require("../../modules/es.symbol.species"),require("../../modules/es.symbol.split"),require("../../modules/es.symbol.to-primitive"),require("../../modules/es.symbol.to-string-tag"),require("../../modules/es.symbol.unscopables"),require("../../modules/es.math.to-string-tag"),require("../../modules/es.json.to-string-tag");var e=require("../../internals/path");module.exports=e.Symbol;
},{"../../modules/es.array.concat":"jKIw","../../modules/es.object.to-string":"Fe9H","../../modules/es.symbol":"lwCF","../../modules/es.symbol.async-iterator":"uOq6","../../modules/es.symbol.description":"N1rm","../../modules/es.symbol.has-instance":"Vpnf","../../modules/es.symbol.is-concat-spreadable":"UzhC","../../modules/es.symbol.iterator":"jgWr","../../modules/es.symbol.match":"x7Iv","../../modules/es.symbol.match-all":"dD1p","../../modules/es.symbol.replace":"Aq4B","../../modules/es.symbol.search":"cnZ0","../../modules/es.symbol.species":"GEFR","../../modules/es.symbol.split":"f1wk","../../modules/es.symbol.to-primitive":"urw5","../../modules/es.symbol.to-string-tag":"oSbR","../../modules/es.symbol.unscopables":"b2Lu","../../modules/es.math.to-string-tag":"mBdf","../../modules/es.json.to-string-tag":"we9u","../../internals/path":"maCI"}],"GGsx":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("asyncDispose");
},{"../internals/define-well-known-symbol":"w9K6"}],"HTSP":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("dispose");
},{"../internals/define-well-known-symbol":"w9K6"}],"vsuE":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("observable");
},{"../internals/define-well-known-symbol":"w9K6"}],"pFjN":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("patternMatch");
},{"../internals/define-well-known-symbol":"w9K6"}],"B4Ol":[function(require,module,exports) {
var e=require("../internals/define-well-known-symbol");e("replaceAll");
},{"../internals/define-well-known-symbol":"w9K6"}],"xqlI":[function(require,module,exports) {
var e=require("../../es/symbol");require("../../modules/esnext.symbol.async-dispose"),require("../../modules/esnext.symbol.dispose"),require("../../modules/esnext.symbol.observable"),require("../../modules/esnext.symbol.pattern-match"),require("../../modules/esnext.symbol.replace-all"),module.exports=e;
},{"../../es/symbol":"NDR0","../../modules/esnext.symbol.async-dispose":"GGsx","../../modules/esnext.symbol.dispose":"HTSP","../../modules/esnext.symbol.observable":"vsuE","../../modules/esnext.symbol.pattern-match":"pFjN","../../modules/esnext.symbol.replace-all":"B4Ol"}],"XIKV":[function(require,module,exports) {
var e=require("../internals/to-integer"),r=require("../internals/require-object-coercible"),t=function(t){return function(n,i){var c,o,a=String(r(n)),u=e(i),l=a.length;return u<0||u>=l?t?"":void 0:(c=a.charCodeAt(u))<55296||c>56319||u+1===l||(o=a.charCodeAt(u+1))<56320||o>57343?t?a.charAt(u):c:t?a.slice(u,u+2):o-56320+(c-55296<<10)+65536}};module.exports={codeAt:t(!1),charAt:t(!0)};
},{"../internals/to-integer":"BS4O","../internals/require-object-coercible":"MUzE"}],"LD7h":[function(require,module,exports) {
var t=require("../internals/fails");module.exports=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype});
},{"../internals/fails":"jLIo"}],"INmX":[function(require,module,exports) {
var t=require("../internals/has"),e=require("../internals/to-object"),r=require("../internals/shared-key"),o=require("../internals/correct-prototype-getter"),n=r("IE_PROTO"),c=Object.prototype;module.exports=o?Object.getPrototypeOf:function(r){return r=e(r),t(r,n)?r[n]:"function"==typeof r.constructor&&r instanceof r.constructor?r.constructor.prototype:r instanceof Object?c:null};
},{"../internals/has":"L6HH","../internals/to-object":"iu5e","../internals/shared-key":"vThu","../internals/correct-prototype-getter":"LD7h"}],"FeNA":[function(require,module,exports) {
"use strict";var e,r,t,n=require("../internals/object-get-prototype-of"),o=require("../internals/create-non-enumerable-property"),i=require("../internals/has"),s=require("../internals/well-known-symbol"),l=require("../internals/is-pure"),u=s("iterator"),a=!1,p=function(){return this};[].keys&&("next"in(t=[].keys())?(r=n(n(t)))!==Object.prototype&&(e=r):a=!0),null==e&&(e={}),l||i(e,u)||o(e,u,p),module.exports={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:a};
},{"../internals/object-get-prototype-of":"INmX","../internals/create-non-enumerable-property":"P1LK","../internals/has":"L6HH","../internals/well-known-symbol":"d21O","../internals/is-pure":"Q1vr"}],"hQot":[function(require,module,exports) {
"use strict";var r=require("../internals/iterators-core").IteratorPrototype,e=require("../internals/object-create"),t=require("../internals/create-property-descriptor"),i=require("../internals/set-to-string-tag"),n=require("../internals/iterators"),o=function(){return this};module.exports=function(a,s,u){var c=s+" Iterator";return a.prototype=e(r,{next:t(1,u)}),i(a,c,!1,!0),n[c]=o,a};
},{"../internals/iterators-core":"FeNA","../internals/object-create":"InPK","../internals/create-property-descriptor":"b0z3","../internals/set-to-string-tag":"jLM3","../internals/iterators":"fiqV"}],"G1jx":[function(require,module,exports) {
var r=require("../internals/is-object");module.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t};
},{"../internals/is-object":"JoHA"}],"vE9e":[function(require,module,exports) {
var t=require("../internals/an-object"),r=require("../internals/a-possible-prototype");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,o=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),o=n instanceof Array}catch(c){}return function(n,c){return t(n),r(c),o?e.call(n,c):n.__proto__=c,n}}():void 0);
},{"../internals/an-object":"kWtR","../internals/a-possible-prototype":"G1jx"}],"Vb0T":[function(require,module,exports) {
"use strict";var e=require("../internals/export"),r=require("../internals/create-iterator-constructor"),t=require("../internals/object-get-prototype-of"),n=require("../internals/object-set-prototype-of"),i=require("../internals/set-to-string-tag"),o=require("../internals/create-non-enumerable-property"),s=require("../internals/redefine"),a=require("../internals/well-known-symbol"),u=require("../internals/is-pure"),c=require("../internals/iterators"),l=require("../internals/iterators-core"),f=l.IteratorPrototype,p=l.BUGGY_SAFARI_ITERATORS,q=a("iterator"),y="keys",w="values",b="entries",h=function(){return this};module.exports=function(a,l,g,m,v,A,I){r(g,l,m);var d,j,k,x=function(e){if(e===v&&T)return T;if(!p&&e in O)return O[e];switch(e){case y:case w:case b:return function(){return new g(this,e)}}return function(){return new g(this)}},R=l+" Iterator",G=!1,O=a.prototype,S=O[q]||O["@@iterator"]||v&&O[v],T=!p&&S||x(v),_="Array"==l&&O.entries||S;if(_&&(d=t(_.call(new a)),f!==Object.prototype&&d.next&&(u||t(d)===f||(n?n(d,f):"function"!=typeof d[q]&&o(d,q,h)),i(d,R,!0,!0),u&&(c[R]=h))),v==w&&S&&S.name!==w&&(G=!0,T=function(){return S.call(this)}),u&&!I||O[q]===T||o(O,q,T),c[l]=T,v)if(j={values:x(w),keys:A?T:x(y),entries:x(b)},I)for(k in j)!p&&!G&&k in O||s(O,k,j[k]);else e({target:l,proto:!0,forced:p||G},j);return j};
},{"../internals/export":"nsh9","../internals/create-iterator-constructor":"hQot","../internals/object-get-prototype-of":"INmX","../internals/object-set-prototype-of":"vE9e","../internals/set-to-string-tag":"jLM3","../internals/create-non-enumerable-property":"P1LK","../internals/redefine":"nJPD","../internals/well-known-symbol":"d21O","../internals/is-pure":"Q1vr","../internals/iterators":"fiqV","../internals/iterators-core":"FeNA"}],"a7SK":[function(require,module,exports) {
"use strict";var t=require("../internals/string-multibyte").charAt,e=require("../internals/internal-state"),r=require("../internals/define-iterator"),n="String Iterator",i=e.set,a=e.getterFor(n);r(String,"String",function(t){i(this,{type:n,string:String(t),index:0})},function(){var e,r=a(this),n=r.string,i=r.index;return i>=n.length?{value:void 0,done:!0}:(e=t(n,i),r.index+=e.length,{value:e,done:!1})});
},{"../internals/string-multibyte":"XIKV","../internals/internal-state":"bmsu","../internals/define-iterator":"Vb0T"}],"xZTu":[function(require,module,exports) {
var r=require("../internals/an-object");module.exports=function(t,e,n,a){try{return a?e(r(n)[0],n[1]):e(n)}catch(c){var o=t.return;throw void 0!==o&&r(o.call(t)),c}};
},{"../internals/an-object":"kWtR"}],"G7YD":[function(require,module,exports) {
var r=require("../internals/well-known-symbol"),e=require("../internals/iterators"),t=r("iterator"),o=Array.prototype;module.exports=function(r){return void 0!==r&&(e.Array===r||o[t]===r)};
},{"../internals/well-known-symbol":"d21O","../internals/iterators":"fiqV"}],"vfP8":[function(require,module,exports) {
var r=require("../internals/classof"),e=require("../internals/iterators"),n=require("../internals/well-known-symbol"),t=n("iterator");module.exports=function(n){if(null!=n)return n[t]||n["@@iterator"]||e[r(n)]};
},{"../internals/classof":"jHyJ","../internals/iterators":"fiqV","../internals/well-known-symbol":"d21O"}],"ciEW":[function(require,module,exports) {
"use strict";var e=require("../internals/function-bind-context"),r=require("../internals/to-object"),t=require("../internals/call-with-safe-iteration-closing"),n=require("../internals/is-array-iterator-method"),i=require("../internals/to-length"),l=require("../internals/create-property"),a=require("../internals/get-iterator-method");module.exports=function(o){var s,u,c,h,d,f,q=r(o),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,p=void 0!==y,m=a(q),w=0;if(p&&(y=e(y,g>2?arguments[2]:void 0,2)),null==m||v==Array&&n(m))for(u=new v(s=i(q.length));s>w;w++)f=p?y(q[w],w):q[w],l(u,w,f);else for(d=(h=m.call(q)).next,u=new v;!(c=d.call(h)).done;w++)f=p?t(h,y,[c.value,w],!0):c.value,l(u,w,f);return u.length=w,u};
},{"../internals/function-bind-context":"UP5A","../internals/to-object":"iu5e","../internals/call-with-safe-iteration-closing":"xZTu","../internals/is-array-iterator-method":"G7YD","../internals/to-length":"u9JK","../internals/create-property":"TLmu","../internals/get-iterator-method":"vfP8"}],"tTzo":[function(require,module,exports) {
var r=require("../internals/well-known-symbol"),n=r("iterator"),t=!1;try{var e=0,o={next:function(){return{done:!!e++}},return:function(){t=!0}};o[n]=function(){return this},Array.from(o,function(){throw 2})}catch(u){}module.exports=function(r,e){if(!e&&!t)return!1;var o=!1;try{var i={};i[n]=function(){return{next:function(){return{done:o=!0}}}},r(i)}catch(u){}return o};
},{"../internals/well-known-symbol":"d21O"}],"d5uY":[function(require,module,exports) {
var r=require("../internals/export"),e=require("../internals/array-from"),t=require("../internals/check-correctness-of-iteration"),a=!t(function(r){Array.from(r)});r({target:"Array",stat:!0,forced:a},{from:e});
},{"../internals/export":"nsh9","../internals/array-from":"ciEW","../internals/check-correctness-of-iteration":"tTzo"}],"Tytg":[function(require,module,exports) {
require("../../modules/es.string.iterator"),require("../../modules/es.array.from");var r=require("../../internals/path");module.exports=r.Array.from;
},{"../../modules/es.string.iterator":"a7SK","../../modules/es.array.from":"d5uY","../../internals/path":"maCI"}],"BKZn":[function(require,module,exports) {
var r=require("../../es/array/from");module.exports=r;
},{"../../es/array/from":"Tytg"}],"lczo":[function(require,module,exports) {
"use strict";"undefined"==typeof Promise&&(require("promise/lib/rejection-tracking").enable(),self.Promise=require("promise/lib/es6-extensions.js")),"undefined"!=typeof window&&require("whatwg-fetch"),Object.assign=require("object-assign"),require("core-js/features/symbol"),require("core-js/features/array/from");
},{"promise/lib/rejection-tracking":"fG7b","promise/lib/es6-extensions.js":"d99q","whatwg-fetch":"MScu","object-assign":"YOwE","core-js/features/symbol":"xqlI","core-js/features/array/from":"BKZn"}],"awqi":[function(require,module,exports) {
"use strict";var e=require("object-assign"),r="function"==typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,f=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,i=r?Symbol.for("react.forward_ref"):60112,a=r?Symbol.for("react.suspense"):60113;r&&Symbol.for("react.suspense_list");var s=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116;r&&Symbol.for("react.fundamental"),r&&Symbol.for("react.responder"),r&&Symbol.for("react.scope");var y="function"==typeof Symbol&&Symbol.iterator;function d(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function h(e,r,t){this.props=e,this.context=r,this.refs=v,this.updater=t||m}function b(){}function S(e,r,t){this.props=e,this.context=r,this.refs=v,this.updater=t||m}h.prototype.isReactComponent={},h.prototype.setState=function(e,r){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,r,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=h.prototype;var _=S.prototype=new b;_.constructor=S,e(_,h.prototype),_.isPureReactComponent=!0;var k={current:null},$={current:null},g=Object.prototype.hasOwnProperty,w={key:!0,ref:!0,__self:!0,__source:!0};function C(e,r,n){var o,u={},f=null,l=null;if(null!=r)for(o in void 0!==r.ref&&(l=r.ref),void 0!==r.key&&(f=""+r.key),r)g.call(r,o)&&!w.hasOwnProperty(o)&&(u[o]=r[o]);var c=arguments.length-2;if(1===c)u.children=n;else if(1<c){for(var i=Array(c),a=0;a<c;a++)i[a]=arguments[a+2];u.children=i}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===u[o]&&(u[o]=c[o]);return{$$typeof:t,type:e,key:f,ref:l,props:u,_owner:$.current}}function E(e,r){return{$$typeof:t,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function x(e){var r={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})}var P=/\/+/g,j=[];function O(e,r,t,n){if(j.length){var o=j.pop();return o.result=e,o.keyPrefix=r,o.func=t,o.context=n,o.count=0,o}return{result:e,keyPrefix:r,func:t,context:n,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function I(e,r,o,u){var f=typeof e;"undefined"!==f&&"boolean"!==f||(e=null);var l=!1;if(null===e)l=!0;else switch(f){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case t:case n:l=!0}}if(l)return o(u,e,""===r?"."+q(e,0):r),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var i=r+q(f=e[c],c);l+=I(f,i,o,u)}else if(null===e||"object"!=typeof e?i=null:i="function"==typeof(i=y&&e[y]||e["@@iterator"])?i:null,"function"==typeof i)for(e=i.call(e),c=0;!(f=e.next()).done;)l+=I(f=f.value,i=r+q(f,c++),o,u);else if("object"===f)throw o=""+e,Error(d(31,"[object Object]"===o?"object with keys {"+Object.keys(e).join(", ")+"}":o,""));return l}function U(e,r,t){return null==e?0:I(e,"",r,t)}function q(e,r){return"object"==typeof e&&null!==e&&null!=e.key?x(e.key):r.toString(36)}function F(e,r){e.func.call(e.context,r,e.count++)}function L(e,r,t){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,r,e.count++),Array.isArray(e)?M(e,n,t,function(e){return e}):null!=e&&(R(e)&&(e=E(e,o+(!e.key||r&&r.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+t)),n.push(e))}function M(e,r,t,n,o){var u="";null!=t&&(u=(""+t).replace(P,"$&/")+"/"),U(e,L,r=O(r,u,n,o)),A(r)}function D(){var e=k.current;if(null===e)throw Error(d(321));return e}var V={Children:{map:function(e,r,t){if(null==e)return e;var n=[];return M(e,n,null,r,t),n},forEach:function(e,r,t){if(null==e)return e;U(e,F,r=O(null,null,r,t)),A(r)},count:function(e){return U(e,function(){return null},null)},toArray:function(e){var r=[];return M(e,r,null,function(e){return e}),r},only:function(e){if(!R(e))throw Error(d(143));return e}},createRef:function(){return{current:null}},Component:h,PureComponent:S,createContext:function(e,r){return void 0===r&&(r=null),(e={$$typeof:c,_calculateChangedBits:r,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:i,render:e}},lazy:function(e){return{$$typeof:p,_ctor:e,_status:-1,_result:null}},memo:function(e,r){return{$$typeof:s,type:e,compare:void 0===r?null:r}},useCallback:function(e,r){return D().useCallback(e,r)},useContext:function(e,r){return D().useContext(e,r)},useEffect:function(e,r){return D().useEffect(e,r)},useImperativeHandle:function(e,r,t){return D().useImperativeHandle(e,r,t)},useDebugValue:function(){},useLayoutEffect:function(e,r){return D().useLayoutEffect(e,r)},useMemo:function(e,r){return D().useMemo(e,r)},useReducer:function(e,r,t){return D().useReducer(e,r,t)},useRef:function(e){return D().useRef(e)},useState:function(e){return D().useState(e)},Fragment:o,Profiler:f,StrictMode:u,Suspense:a,createElement:C,cloneElement:function(r,n,o){if(null==r)throw Error(d(267,r));var u=e({},r.props),f=r.key,l=r.ref,c=r._owner;if(null!=n){if(void 0!==n.ref&&(l=n.ref,c=$.current),void 0!==n.key&&(f=""+n.key),r.type&&r.type.defaultProps)var i=r.type.defaultProps;for(a in n)g.call(n,a)&&!w.hasOwnProperty(a)&&(u[a]=void 0===n[a]&&void 0!==i?i[a]:n[a])}var a=arguments.length-2;if(1===a)u.children=o;else if(1<a){i=Array(a);for(var s=0;s<a;s++)i[s]=arguments[s+2];u.children=i}return{$$typeof:t,type:r.type,key:f,ref:l,props:u,_owner:c}},createFactory:function(e){var r=C.bind(null,e);return r.type=e,r},isValidElement:R,version:"16.12.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:k,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:$,IsSomeRendererActing:{current:!1},assign:e}},B={default:V},N=B&&V||B;module.exports=N.default||N;
},{"object-assign":"YOwE"}],"n8MK":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/react.production.min.js");
},{"./cjs/react.production.min.js":"awqi"}],"IvPb":[function(require,module,exports) {
"use strict";var e,t,n,r,o;if(Object.defineProperty(exports,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,i=function(){if(null!==a)try{var e=exports.unstable_now();a(!0,e),a=null}catch(t){throw setTimeout(i,0),t}},u=Date.now();exports.unstable_now=function(){return Date.now()-u},e=function(t){null!==a?setTimeout(e,0,t):(a=t,setTimeout(i,0))},t=function(e,t){l=setTimeout(e,t)},n=function(){clearTimeout(l)},r=function(){return!1},o=exports.unstable_forceFrameRate=function(){}}else{var s=window.performance,c=window.Date,f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var b=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof s&&"function"==typeof s.now)exports.unstable_now=function(){return s.now()};else{var d=c.now();exports.unstable_now=function(){return c.now()-d}}var v=!1,x=null,w=-1,m=5,y=0;r=function(){return exports.unstable_now()>=y},o=function(){},exports.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):m=0<e?Math.floor(1e3/e):5};var _=new MessageChannel,h=_.port2;_.port1.onmessage=function(){if(null!==x){var e=exports.unstable_now();y=e+m;try{x(!0,e)?h.postMessage(null):(v=!1,x=null)}catch(t){throw h.postMessage(null),t}}else v=!1},e=function(e){x=e,v||(v=!0,h.postMessage(null))},t=function(e,t){w=f(function(){e(exports.unstable_now())},t)},n=function(){p(w),w=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),o=e[r];if(!(void 0!==o&&0<M(o,t)))break e;e[r]=t,e[n]=o,n=r}}function T(e){return void 0===(e=e[0])?null:e}function g(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var a=2*(r+1)-1,l=e[a],i=a+1,u=e[i];if(void 0!==l&&0>M(l,n))void 0!==u&&0>M(u,l)?(e[r]=u,e[i]=n,r=i):(e[r]=l,e[a]=n,r=a);else{if(!(void 0!==u&&0>M(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],F=[],I=1,C=null,A=3,L=!1,j=!1,q=!1;function D(e){for(var t=T(F);null!==t;){if(null===t.callback)g(F);else{if(!(t.startTime<=e))break;g(F),t.sortIndex=t.expirationTime,k(P,t)}t=T(F)}}function R(n){if(q=!1,D(n),!j)if(null!==T(P))j=!0,e(E);else{var r=T(F);null!==r&&t(R,r.startTime-n)}}function E(e,o){j=!1,q&&(q=!1,n()),L=!0;var a=A;try{for(D(o),C=T(P);null!==C&&(!(C.expirationTime>o)||e&&!r());){var l=C.callback;if(null!==l){C.callback=null,A=C.priorityLevel;var i=l(C.expirationTime<=o);o=exports.unstable_now(),"function"==typeof i?C.callback=i:C===T(P)&&g(P),D(o)}else g(P);C=T(P)}if(null!==C)var u=!0;else{var s=T(F);null!==s&&t(R,s.startTime-o),u=!1}return u}finally{C=null,A=a,L=!1}}function N(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=o;exports.unstable_ImmediatePriority=1,exports.unstable_UserBlockingPriority=2,exports.unstable_NormalPriority=3,exports.unstable_IdlePriority=5,exports.unstable_LowPriority=4,exports.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},exports.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},exports.unstable_scheduleCallback=function(r,o,a){var l=exports.unstable_now();if("object"==typeof a&&null!==a){var i=a.delay;i="number"==typeof i&&0<i?l+i:l,a="number"==typeof a.timeout?a.timeout:N(r)}else a=N(r),i=l;return r={id:I++,callback:o,priorityLevel:r,startTime:i,expirationTime:a=i+a,sortIndex:-1},i>l?(r.sortIndex=i,k(F,r),null===T(P)&&r===T(F)&&(q?n():q=!0,t(R,i-l))):(r.sortIndex=a,k(P,r),j||L||(j=!0,e(E))),r},exports.unstable_cancelCallback=function(e){e.callback=null},exports.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}},exports.unstable_getCurrentPriorityLevel=function(){return A},exports.unstable_shouldYield=function(){var e=exports.unstable_now();D(e);var t=T(P);return t!==C&&null!==C&&null!==t&&null!==t.callback&&t.startTime<=e&&t.expirationTime<C.expirationTime||r()},exports.unstable_requestPaint=B,exports.unstable_continueExecution=function(){j||L||(j=!0,e(E))},exports.unstable_pauseExecution=function(){},exports.unstable_getFirstCallbackNode=function(){return T(P)},exports.unstable_Profiling=null;
},{}],"MDSO":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/scheduler.production.min.js");
},{"./cjs/scheduler.production.min.js":"IvPb"}],"XYwD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=0,t=0;exports.__interactionsRef=null,exports.__subscriberRef=null,exports.__interactionsRef={current:new Set},exports.__subscriberRef={current:null};var n=null;function e(r){var t=!1,e=null;if(n.forEach(function(n){try{n.onInteractionTraced(r)}catch(o){t||(t=!0,e=o)}}),t)throw e}function o(r){var t=!1,e=null;if(n.forEach(function(n){try{n.onInteractionScheduledWorkCompleted(r)}catch(o){t||(t=!0,e=o)}}),t)throw e}function c(r,t){var e=!1,o=null;if(n.forEach(function(n){try{n.onWorkScheduled(r,t)}catch(c){e||(e=!0,o=c)}}),e)throw o}function u(r,t){var e=!1,o=null;if(n.forEach(function(n){try{n.onWorkStarted(r,t)}catch(c){e||(e=!0,o=c)}}),e)throw o}function i(r,t){var e=!1,o=null;if(n.forEach(function(n){try{n.onWorkStopped(r,t)}catch(c){e||(e=!0,o=c)}}),e)throw o}function a(r,t){var e=!1,o=null;if(n.forEach(function(n){try{n.onWorkCanceled(r,t)}catch(c){e||(e=!0,o=c)}}),e)throw o}n=new Set,exports.unstable_clear=function(r){var t=exports.__interactionsRef.current;exports.__interactionsRef.current=new Set;try{return r()}finally{exports.__interactionsRef.current=t}},exports.unstable_getCurrent=function(){return exports.__interactionsRef.current},exports.unstable_getThreadID=function(){return++t},exports.unstable_trace=function(t,n,e){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,c={__count:1,id:r++,name:t,timestamp:n},u=exports.__interactionsRef.current,i=new Set(u);i.add(c),exports.__interactionsRef.current=i;var a=exports.__subscriberRef.current;try{null!==a&&a.onInteractionTraced(c)}finally{try{null!==a&&a.onWorkStarted(i,o)}finally{try{var l=e()}finally{exports.__interactionsRef.current=u;try{null!==a&&a.onWorkStopped(i,o)}finally{c.__count--,null!==a&&0===c.__count&&a.onInteractionScheduledWorkCompleted(c)}}}}return l},exports.unstable_wrap=function(r){function t(){var t=exports.__interactionsRef.current;exports.__interactionsRef.current=e,o=exports.__subscriberRef.current;try{try{null!==o&&o.onWorkStarted(e,n)}finally{try{var u=r.apply(void 0,arguments)}finally{exports.__interactionsRef.current=t,null!==o&&o.onWorkStopped(e,n)}}return u}finally{c||(c=!0,e.forEach(function(r){r.__count--,null!==o&&0===r.__count&&o.onInteractionScheduledWorkCompleted(r)}))}}var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=exports.__interactionsRef.current,o=exports.__subscriberRef.current;null!==o&&o.onWorkScheduled(e,n),e.forEach(function(r){r.__count++});var c=!1;return t.cancel=function(){o=exports.__subscriberRef.current;try{null!==o&&o.onWorkCanceled(e,n)}finally{e.forEach(function(r){r.__count--,o&&0===r.__count&&o.onInteractionScheduledWorkCompleted(r)})}},t},exports.unstable_subscribe=function(r){n.add(r),1===n.size&&(exports.__subscriberRef.current={onInteractionScheduledWorkCompleted:o,onInteractionTraced:e,onWorkCanceled:a,onWorkScheduled:c,onWorkStarted:u,onWorkStopped:i})},exports.unstable_unsubscribe=function(r){n.delete(r),0===n.size&&(exports.__subscriberRef.current=null)};
},{}],"Ks3F":[function(require,module,exports) {
"use strict";module.exports=require("./cjs/scheduler-tracing.profiling.min.js");
},{"./cjs/scheduler-tracing.profiling.min.js":"XYwD"}],"NgRO":[function(require,module,exports) {
"use strict";var e=require("react"),t=require("object-assign"),n=require("scheduler"),r=require("scheduler/tracing");function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!e)throw Error(l(227));var a=null,i={};function o(){if(a)for(var e in i){var t=i[e],n=a.indexOf(e);if(!(-1<n))throw Error(l(96,e));if(!c[n]){if(!t.extractEvents)throw Error(l(97,e));for(var r in c[n]=t,n=t.eventTypes){var o=void 0,f=n[r],d=t,p=r;if(s.hasOwnProperty(p))throw Error(l(99,p));s[p]=f;var m=f.phasedRegistrationNames;if(m){for(o in m)m.hasOwnProperty(o)&&u(m[o],d,p);o=!0}else f.registrationName?(u(f.registrationName,d,p),o=!0):o=!1;if(!o)throw Error(l(98,r,e))}}}}function u(e,t,n){if(f[e])throw Error(l(100,e));f[e]=t,d[e]=t.eventTypes[n].dependencies}var c=[],s={},f={},d={};function p(e,t,n,r,l,a,i,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(s){this.onError(s)}}var m=!1,h=null,g=!1,v=null,y={onError:function(e){m=!0,h=e}};function b(e,t,n,r,l,a,i,o,u){m=!1,h=null,p.apply(y,arguments)}function k(e,t,n,r,a,i,o,u,c){if(b.apply(this,arguments),m){if(!m)throw Error(l(198));var s=h;m=!1,h=null,g||(g=!0,v=s)}}var w=null,E=null,T=null;function x(e,t,n){var r=e.type||"unknown-event";e.currentTarget=T(n),k(r,t,void 0,e),e.currentTarget=null}function S(e,t){if(null==t)throw Error(l(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function C(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var P=null;function _(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)x(e,t[r],n[r]);else t&&x(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function N(e){if(null!==e&&(P=S(P,e)),e=P,P=null,e){if(C(e,_),P)throw Error(l(95));if(g)throw e=v,g=!1,v=null,e}}var z={injectEventPluginOrder:function(e){if(a)throw Error(l(101));a=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!i.hasOwnProperty(t)||i[t]!==r){if(i[t])throw Error(l(102,t));i[t]=r,n=!0}}n&&o()}};function D(e,t){var n=e.stateNode;if(!n)return null;var r=w(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(l(231,t,typeof n));return n}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;I.hasOwnProperty("ReactCurrentDispatcher")||(I.ReactCurrentDispatcher={current:null}),I.hasOwnProperty("ReactCurrentBatchConfig")||(I.ReactCurrentBatchConfig={suspense:null});var M=/^(.*)[\\\/]/,O="function"==typeof Symbol&&Symbol.for,R=O?Symbol.for("react.element"):60103,U=O?Symbol.for("react.portal"):60106,F=O?Symbol.for("react.fragment"):60107,L=O?Symbol.for("react.strict_mode"):60108,A=O?Symbol.for("react.profiler"):60114,B=O?Symbol.for("react.provider"):60109,W=O?Symbol.for("react.context"):60110,V=O?Symbol.for("react.concurrent_mode"):60111,j=O?Symbol.for("react.forward_ref"):60112,H=O?Symbol.for("react.suspense"):60113,Q=O?Symbol.for("react.suspense_list"):60120,K=O?Symbol.for("react.memo"):60115,$=O?Symbol.for("react.lazy"):60116;O&&Symbol.for("react.fundamental"),O&&Symbol.for("react.responder"),O&&Symbol.for("react.scope");var q="function"==typeof Symbol&&Symbol.iterator;function Y(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=q&&e[q]||e["@@iterator"])?e:null}function X(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then(function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)},function(t){0===e._status&&(e._status=2,e._result=t)})}}function G(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case F:return"Fragment";case U:return"Portal";case A:return"Profiler";case L:return"StrictMode";case H:return"Suspense";case Q:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case W:return"Context.Consumer";case B:return"Context.Provider";case j:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case K:return G(e.type);case $:if(e=1===e._status?e._result:null)return G(e)}return null}function Z(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,l=e._debugSource,a=G(e.type);n=null,r&&(n=G(r.type)),r=a,a="",l?a=" (at "+l.fileName.replace(M,"")+":"+l.lineNumber+")":n&&(a=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+a}t+=n,e=e.return}while(e);return t}var J=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),ee=null,te=null,ne=null;function re(e){if(e=E(e)){if("function"!=typeof ee)throw Error(l(280));var t=w(e.stateNode);ee(e.stateNode,e.type,t)}}function le(e){te?ne?ne.push(e):ne=[e]:te=e}function ae(){if(te){var e=te,t=ne;if(ne=te=null,re(e),t)for(e=0;e<t.length;e++)re(t[e])}}function ie(e,t){return e(t)}function oe(e,t,n,r){return e(t,n,r)}function ue(){}var ce=ie,se=!1,fe=!1;function de(){null===te&&null===ne||(ue(),ae())}new Map;var pe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,me=Object.prototype.hasOwnProperty,he={},ge={};function ve(e){return!!me.call(ge,e)||!me.call(he,e)&&(pe.test(e)?ge[e]=!0:(he[e]=!0,!1))}function ye(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}function be(e,t,n,r){if(null==t||ye(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ke(e,t,n,r,l,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){we[e]=new ke(e,0,!1,e,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];we[t]=new ke(t,1,!1,e[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){we[e]=new ke(e,2,!1,e.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){we[e]=new ke(e,2,!1,e,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){we[e]=new ke(e,3,!1,e.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(e){we[e]=new ke(e,3,!0,e,null,!1)}),["capture","download"].forEach(function(e){we[e]=new ke(e,4,!1,e,null,!1)}),["cols","rows","size","span"].forEach(function(e){we[e]=new ke(e,6,!1,e,null,!1)}),["rowSpan","start"].forEach(function(e){we[e]=new ke(e,5,!1,e.toLowerCase(),null,!1)});var Ee=/[\-:]([a-z])/g;function Te(e){return e[1].toUpperCase()}function xe(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Se(e,t,n,r){var l=we.hasOwnProperty(t)?we[t]:null;(null!==l?0===l.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(be(t,n,l,r)&&(n=null),r||null===l?ve(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Ce(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Pe(e){var t=Ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _e(e){e._valueTracker||(e._valueTracker=Pe(e))}function Ne(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ce(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ze(e,n){var r=n.checked;return t({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function De(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=xe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ie(e,t){null!=(t=t.checked)&&Se(e,"checked",t,!1)}function Me(e,t){Ie(e,t);var n=xe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Re(e,t.type,n):t.hasOwnProperty("defaultValue")&&Re(e,t.type,xe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Oe(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Re(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ue(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}function Fe(e,n){return e=t({children:void 0},n),(n=Ue(n.children))&&(e.children=n),e}function Le(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xe(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function Ae(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(l(91));return t({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Be(e,t){var n=t.value;if(null==n){if(n=t.defaultValue,null!=(t=t.children)){if(null!=n)throw Error(l(92));if(Array.isArray(t)){if(!(1>=t.length))throw Error(l(93));t=t[0]}n=t}null==n&&(n="")}e._wrapperState={initialValue:xe(n)}}function We(e,t){var n=xe(t.value),r=xe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ve(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ee,Te);we[t]=new ke(t,1,!1,e,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ee,Te);we[t]=new ke(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ee,Te);we[t]=new ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(e){we[e]=new ke(e,1,!1,e.toLowerCase(),null,!1)}),we.xlinkHref=new ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(e){we[e]=new ke(e,1,!1,e.toLowerCase(),null,!0)});var je={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function He(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?He(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ke,$e=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==je.svg||"innerHTML"in e)e.innerHTML=t;else{for((Ke=Ke||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ke.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ye(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xe={animationend:Ye("Animation","AnimationEnd"),animationiteration:Ye("Animation","AnimationIteration"),animationstart:Ye("Animation","AnimationStart"),transitionend:Ye("Transition","TransitionEnd")},Ge={},Ze={};function Je(e){if(Ge[e])return Ge[e];if(!Xe[e])return e;var t,n=Xe[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ze)return Ge[e]=n[t];return e}J&&(Ze=document.createElement("div").style,"AnimationEvent"in window||(delete Xe.animationend.animation,delete Xe.animationiteration.animation,delete Xe.animationstart.animation),"TransitionEvent"in window||delete Xe.transitionend.transition);var et=Je("animationend"),tt=Je("animationiteration"),nt=Je("animationstart"),rt=Je("transitionend"),lt="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");function at(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function it(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ot(e){if(at(e)!==e)throw Error(l(188))}function ut(e){var t=e.alternate;if(!t){if(null===(t=at(e)))throw Error(l(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(r=a.return)){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return ot(a),e;if(i===r)return ot(a),t;i=i.sibling}throw Error(l(188))}if(n.return!==r.return)n=a,r=i;else{for(var o=!1,u=a.child;u;){if(u===n){o=!0,n=a,r=i;break}if(u===r){o=!0,r=a,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=a;break}if(u===r){o=!0,r=i,n=a;break}u=u.sibling}if(!o)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(3!==n.tag)throw Error(l(188));return n.stateNode.current===n?e:t}function ct(e){if(!(e=ut(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var st,ft,dt,pt=!1,mt=[],ht=null,gt=null,vt=null,yt=new Map,bt=new Map,kt=[],wt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Et="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e){var t=Vn(e);wt.forEach(function(n){jn(n,e,t)}),Et.forEach(function(n){jn(n,e,t)})}function xt(e,t,n,r){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:r}}function St(e,t){switch(e){case"focus":case"blur":ht=null;break;case"dragenter":case"dragleave":gt=null;break;case"mouseover":case"mouseout":vt=null;break;case"pointerover":case"pointerout":yt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bt.delete(t.pointerId)}}function Ct(e,t,n,r,l){return null===e||e.nativeEvent!==l?(e=xt(t,n,r,l),null!==t&&(null!==(t=Er(t))&&ft(t)),e):(e.eventSystemFlags|=r,e)}function Pt(e,t,n,r){switch(t){case"focus":return ht=Ct(ht,e,t,n,r),!0;case"dragenter":return gt=Ct(gt,e,t,n,r),!0;case"mouseover":return vt=Ct(vt,e,t,n,r),!0;case"pointerover":var l=r.pointerId;return yt.set(l,Ct(yt.get(l)||null,e,t,n,r)),!0;case"gotpointercapture":return l=r.pointerId,bt.set(l,Ct(bt.get(l)||null,e,t,n,r)),!0}return!1}function _t(e){var t=wr(e.target);if(null!==t){var r=at(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=it(r)))return e.blockedOn=t,void n.unstable_runWithPriority(e.priority,function(){dt(r)})}else if(3===t&&r.stateNode.hydrate)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=An(e.topLevelType,e.eventSystemFlags,e.nativeEvent);if(null!==t){var n=Er(t);return null!==n&&ft(n),e.blockedOn=t,!1}return!0}function zt(e,t,n){Nt(e)&&n.delete(t)}function Dt(){for(pt=!1;0<mt.length;){var e=mt[0];if(null!==e.blockedOn){null!==(e=Er(e.blockedOn))&&st(e);break}var t=An(e.topLevelType,e.eventSystemFlags,e.nativeEvent);null!==t?e.blockedOn=t:mt.shift()}null!==ht&&Nt(ht)&&(ht=null),null!==gt&&Nt(gt)&&(gt=null),null!==vt&&Nt(vt)&&(vt=null),yt.forEach(zt),bt.forEach(zt)}function It(e,t){e.blockedOn===t&&(e.blockedOn=null,pt||(pt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Dt)))}function Mt(e){function t(t){return It(t,e)}if(0<mt.length){It(mt[0],e);for(var n=1;n<mt.length;n++){var r=mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ht&&It(ht,e),null!==gt&&It(gt,e),null!==vt&&It(vt,e),yt.forEach(t),bt.forEach(t),n=0;n<kt.length;n++)(r=kt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<kt.length&&null===(n=kt[0]).blockedOn;)_t(n),null===n.blockedOn&&kt.shift()}function Ot(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Rt(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Ut(e,t,n){(t=D(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=S(n._dispatchListeners,t),n._dispatchInstances=S(n._dispatchInstances,e))}function Ft(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Rt(t);for(t=n.length;0<t--;)Ut(n[t],"captured",e);for(t=0;t<n.length;t++)Ut(n[t],"bubbled",e)}}function Lt(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=D(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=S(n._dispatchListeners,t),n._dispatchInstances=S(n._dispatchInstances,e))}function At(e){e&&e.dispatchConfig.registrationName&&Lt(e._targetInst,null,e)}function Bt(e){C(e,Ft)}function Wt(){return!0}function Vt(){return!1}function jt(e,t,n,r){for(var l in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(l)&&((t=e[l])?this[l]=t(n):"target"===l?this.target=r:this[l]=n[l]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wt:Vt,this.isPropagationStopped=Vt,this}function Ht(e,t,n,r){if(this.eventPool.length){var l=this.eventPool.pop();return this.call(l,e,t,n,r),l}return new this(e,t,n,r)}function Qt(e){if(!(e instanceof this))throw Error(l(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Kt(e){e.eventPool=[],e.getPooled=Ht,e.release=Qt}t(jt.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wt)},persist:function(){this.isPersistent=Wt},isPersistent:Vt,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Vt,this._dispatchInstances=this._dispatchListeners=null}}),jt.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},jt.extend=function(e){function n(){}function r(){return l.apply(this,arguments)}var l=this;n.prototype=l.prototype;var a=new n;return t(a,r.prototype),r.prototype=a,r.prototype.constructor=r,r.Interface=t({},l.Interface,e),r.extend=l.extend,Kt(r),r},Kt(jt);var $t=jt.extend({animationName:null,elapsedTime:null,pseudoElement:null}),qt=jt.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yt=jt.extend({view:null,detail:null}),Xt=Yt.extend({relatedTarget:null});function Gt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Zt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jt={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},en={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=en[e])&&!!t[e]}function nn(){return tn}for(var rn=Yt.extend({key:function(e){if(e.key){var t=Zt[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Gt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Jt[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:nn,charCode:function(e){return"keypress"===e.type?Gt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Gt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ln=0,an=0,on=!1,un=!1,cn=Yt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:nn,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=ln;return ln=e.screenX,on?"mousemove"===e.type?e.screenX-t:0:(on=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=an;return an=e.screenY,un?"mousemove"===e.type?e.screenY-t:0:(un=!0,0)}}),sn=cn.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),fn=cn.extend({dataTransfer:null}),dn=Yt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:nn}),pn=jt.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),mn=cn.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),hn=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",2],[et,"animationEnd",2],[tt,"animationIteration",2],[nt,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress","progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[rt,"transitionEnd",2],["waiting","waiting",2]],gn={},vn={},yn=0;yn<hn.length;yn++){var bn=hn[yn],kn=bn[0],wn=bn[1],En=bn[2],Tn="on"+(wn[0].toUpperCase()+wn.slice(1)),xn={phasedRegistrationNames:{bubbled:Tn,captured:Tn+"Capture"},dependencies:[kn],eventPriority:En};gn[wn]=xn,vn[kn]=xn}var Sn={eventTypes:gn,getEventPriority:function(e){return void 0!==(e=vn[e])?e.eventPriority:2},extractEvents:function(e,t,n,r){var l=vn[e];if(!l)return null;switch(e){case"keypress":if(0===Gt(n))return null;case"keydown":case"keyup":e=rn;break;case"blur":case"focus":e=Xt;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=dn;break;case et:case tt:case nt:e=$t;break;case rt:e=pn;break;case"scroll":e=Yt;break;case"wheel":e=mn;break;case"copy":case"cut":case"paste":e=qt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=sn;break;default:e=jt}return Bt(t=e.getPooled(l,t,n,r)),t}},Cn=n.unstable_UserBlockingPriority,Pn=n.unstable_runWithPriority,_n=Sn.getEventPriority,Nn=10,zn=[];function Dn(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=wr(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var l=Ot(e.nativeEvent);r=e.topLevelType;for(var a=e.nativeEvent,i=e.eventSystemFlags,o=null,u=0;u<c.length;u++){var s=c[u];s&&(s=s.extractEvents(r,t,a,l,i))&&(o=S(o,s))}N(o)}}var In=!0;function Mn(e,t){On(t,e,!1)}function On(e,t,n){switch(_n(t)){case 0:var r=Rn.bind(null,t,1);break;case 1:r=Un.bind(null,t,1);break;default:r=Ln.bind(null,t,1)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Rn(e,t,n){se||ue();var r=Ln,l=se;se=!0;try{oe(r,e,t,n)}finally{(se=l)||de()}}function Un(e,t,n){Pn(Cn,Ln.bind(null,e,t,n))}function Fn(e,t,n,r){if(zn.length){var l=zn.pop();l.topLevelType=e,l.eventSystemFlags=t,l.nativeEvent=n,l.targetInst=r,e=l}else e={topLevelType:e,eventSystemFlags:t,nativeEvent:n,targetInst:r,ancestors:[]};try{if(t=Dn,n=e,fe)t(n,void 0);else{fe=!0;try{ce(t,n,void 0)}finally{fe=!1,de()}}}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,zn.length<Nn&&zn.push(e)}}function Ln(e,t,n){if(In)if(0<mt.length&&-1<wt.indexOf(e))e=xt(null,e,t,n),mt.push(e);else{var r=An(e,t,n);null===r?St(e,n):-1<wt.indexOf(e)?(e=xt(r,e,t,n),mt.push(e)):Pt(r,e,t,n)||(St(e,n),Fn(e,t,n,null))}}function An(e,t,n){var r=Ot(n);if(null!==(r=wr(r))){var l=at(r);if(null===l)r=null;else{var a=l.tag;if(13===a){if(null!==(r=it(l)))return r;r=null}else if(3===a){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;r=null}else l!==r&&(r=null)}}return Fn(e,t,n,r),null}function Bn(e){if(!J)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var Wn=new("function"==typeof WeakMap?WeakMap:Map);function Vn(e){var t=Wn.get(e);return void 0===t&&(t=new Set,Wn.set(e,t)),t}function jn(e,t,n){if(!n.has(e)){switch(e){case"scroll":On(t,"scroll",!0);break;case"focus":case"blur":On(t,"focus",!0),On(t,"blur",!0),n.add("blur"),n.add("focus");break;case"cancel":case"close":Bn(e)&&On(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===lt.indexOf(e)&&Mn(e,t)}n.add(e)}}var Hn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qn=["Webkit","ms","Moz","O"];function Kn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Hn.hasOwnProperty(e)&&Hn[e]?(""+t).trim():t+"px"}function $n(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=Kn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(Hn).forEach(function(e){Qn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hn[t]=Hn[e]})});var qn=t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yn(e,t){if(t){if(qn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(l(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(l(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(l(62,""))}}function Xn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Gn(e,t){var n=Vn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=d[t];for(var r=0;r<t.length;r++)jn(t[r],e,n)}function Zn(){}function Jn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(){for(var e=window,t=Jn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Jn((e=t.contentWindow).document)}return t}function lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ar="$",ir="/$",or="$?",ur="$!",cr=null,sr=null;function fr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function dr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var pr="function"==typeof setTimeout?setTimeout:void 0,mr="function"==typeof clearTimeout?clearTimeout:void 0;function hr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function gr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if(n===ar||n===ur||n===or){if(0===t)return e;t--}else n===ir&&t++}e=e.previousSibling}return null}var vr=Math.random().toString(36).slice(2),yr="__reactInternalInstance$"+vr,br="__reactEventHandlers$"+vr,kr="__reactContainere$"+vr;function wr(e){var t=e[yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[kr]||n[yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=gr(e);null!==e;){if(n=e[yr])return n;e=gr(e)}return t}n=(e=n).parentNode}return null}function Er(e){return!(e=e[yr]||e[kr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Tr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(l(33))}function xr(e){return e[br]||null}var Sr=null,Cr=null,Pr=null;function _r(){if(Pr)return Pr;var e,t,n=Cr,r=n.length,l="value"in Sr?Sr.value:Sr.textContent,a=l.length;for(e=0;e<r&&n[e]===l[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===l[a-t];t++);return Pr=l.slice(e,1<t?1-t:void 0)}var Nr=jt.extend({data:null}),zr=jt.extend({data:null}),Dr=[9,13,27,32],Ir=J&&"CompositionEvent"in window,Mr=null;J&&"documentMode"in document&&(Mr=document.documentMode);var Or=J&&"TextEvent"in window&&!Mr,Rr=J&&(!Ir||Mr&&8<Mr&&11>=Mr),Ur=String.fromCharCode(32),Fr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Lr=!1;function Ar(e,t){switch(e){case"keyup":return-1!==Dr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Br(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Wr=!1;function Vr(e,t){switch(e){case"compositionend":return Br(t);case"keypress":return 32!==t.which?null:(Lr=!0,Ur);case"textInput":return(e=t.data)===Ur&&Lr?null:e;default:return null}}function jr(e,t){if(Wr)return"compositionend"===e||!Ir&&Ar(e,t)?(e=_r(),Pr=Cr=Sr=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rr&&"ko"!==t.locale?null:t.data;default:return null}}var Hr={eventTypes:Fr,extractEvents:function(e,t,n,r){var l;if(Ir)e:{switch(e){case"compositionstart":var a=Fr.compositionStart;break e;case"compositionend":a=Fr.compositionEnd;break e;case"compositionupdate":a=Fr.compositionUpdate;break e}a=void 0}else Wr?Ar(e,n)&&(a=Fr.compositionEnd):"keydown"===e&&229===n.keyCode&&(a=Fr.compositionStart);return a?(Rr&&"ko"!==n.locale&&(Wr||a!==Fr.compositionStart?a===Fr.compositionEnd&&Wr&&(l=_r()):(Cr="value"in(Sr=r)?Sr.value:Sr.textContent,Wr=!0)),a=Nr.getPooled(a,t,n,r),l?a.data=l:null!==(l=Br(n))&&(a.data=l),Bt(a),l=a):l=null,(e=Or?Vr(e,n):jr(e,n))?((t=zr.getPooled(Fr.beforeInput,t,n,r)).data=e,Bt(t)):t=null,null===l?t:null===t?l:[l,t]}},Qr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Qr[e.type]:"textarea"===t}var $r={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function qr(e,t,n){return(e=jt.getPooled($r.change,e,t,n)).type="change",le(n),Bt(e),e}var Yr=null,Xr=null;function Gr(e){N(e)}function Zr(e){if(Ne(Tr(e)))return e}function Jr(e,t){if("change"===e)return t}var el=!1;function tl(){Yr&&(Yr.detachEvent("onpropertychange",nl),Xr=Yr=null)}function nl(e){if("value"===e.propertyName&&Zr(Xr))if(e=qr(Xr,e,Ot(e)),se)N(e);else{se=!0;try{ie(Gr,e)}finally{se=!1,de()}}}function rl(e,t,n){"focus"===e?(tl(),Xr=n,(Yr=t).attachEvent("onpropertychange",nl)):"blur"===e&&tl()}function ll(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zr(Xr)}function al(e,t){if("click"===e)return Zr(t)}function il(e,t){if("input"===e||"change"===e)return Zr(t)}J&&(el=Bn("input")&&(!document.documentMode||9<document.documentMode));var ol,ul={eventTypes:$r,_isInputEventSupported:el,extractEvents:function(e,t,n,r){var l=t?Tr(t):window,a=l.nodeName&&l.nodeName.toLowerCase();if("select"===a||"input"===a&&"file"===l.type)var i=Jr;else if(Kr(l))if(el)i=il;else{i=ll;var o=rl}else(a=l.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(i=al);if(i&&(i=i(e,t)))return qr(i,n,r);o&&o(e,l,t),"blur"===e&&(e=l._wrapperState)&&e.controlled&&"number"===l.type&&Re(l,"number",l.value)}},cl={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},sl={eventTypes:cl,extractEvents:function(e,t,n,r,l){var a="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(a&&0==(32&l)&&(n.relatedTarget||n.fromElement)||!i&&!a)return null;if(l=r.window===r?r:(l=r.ownerDocument)?l.defaultView||l.parentWindow:window,i?(i=t,null!==(t=(t=n.relatedTarget||n.toElement)?wr(t):null)&&(t!==(a=at(t))||5!==t.tag&&6!==t.tag)&&(t=null)):i=null,i===t)return null;if("mouseout"===e||"mouseover"===e)var o=cn,u=cl.mouseLeave,c=cl.mouseEnter,s="mouse";else"pointerout"!==e&&"pointerover"!==e||(o=sn,u=cl.pointerLeave,c=cl.pointerEnter,s="pointer");if(e=null==i?l:Tr(i),l=null==t?l:Tr(t),(u=o.getPooled(u,i,n,r)).type=s+"leave",u.target=e,u.relatedTarget=l,(r=o.getPooled(c,t,n,r)).type=s+"enter",r.target=l,r.relatedTarget=e,s=t,(o=i)&&s)e:{for(e=s,i=0,t=c=o;t;t=Rt(t))i++;for(t=0,l=e;l;l=Rt(l))t++;for(;0<i-t;)c=Rt(c),i--;for(;0<t-i;)e=Rt(e),t--;for(;i--;){if(c===e||c===e.alternate)break e;c=Rt(c),e=Rt(e)}c=null}else c=null;for(e=c,c=[];o&&o!==e&&(null===(i=o.alternate)||i!==e);)c.push(o),o=Rt(o);for(o=[];s&&s!==e&&(null===(i=s.alternate)||i!==e);)o.push(s),s=Rt(s);for(s=0;s<c.length;s++)Lt(c[s],"bubbled",u);for(s=o.length;0<s--;)Lt(o[s],"captured",r);return n===ol?(ol=null,[u]):(ol=n,[u,r])}};function fl(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var dl="function"==typeof Object.is?Object.is:fl,pl=Object.prototype.hasOwnProperty;function ml(e,t){if(dl(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!pl.call(t,n[r])||!dl(e[n[r]],t[n[r]]))return!1;return!0}var hl=J&&"documentMode"in document&&11>=document.documentMode,gl={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},vl=null,yl=null,bl=null,kl=!1;function wl(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return kl||null==vl||vl!==Jn(n)?null:("selectionStart"in(n=vl)&&lr(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},bl&&ml(bl,n)?null:(bl=n,(e=jt.getPooled(gl.select,yl,e,t)).type="select",e.target=vl,Bt(e),e))}var El={eventTypes:gl,extractEvents:function(e,t,n,r){var l,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(l=!a)){e:{a=Vn(a),l=d.onSelect;for(var i=0;i<l.length;i++)if(!a.has(l[i])){a=!1;break e}a=!0}l=!a}if(l)return null;switch(a=t?Tr(t):window,e){case"focus":(Kr(a)||"true"===a.contentEditable)&&(vl=a,yl=t,bl=null);break;case"blur":bl=yl=vl=null;break;case"mousedown":kl=!0;break;case"contextmenu":case"mouseup":case"dragend":return kl=!1,wl(n,r);case"selectionchange":if(hl)break;case"keydown":case"keyup":return wl(n,r)}return null}};z.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));var Tl=Er;w=xr,E=Tl,T=Tr,z.injectEventPluginsByName({SimpleEventPlugin:Sn,EnterLeaveEventPlugin:sl,ChangeEventPlugin:ul,SelectEventPlugin:El,BeforeInputEventPlugin:Hr}),new Set;var xl=[],Sl=-1;function Cl(e){0>Sl||(e.current=xl[Sl],xl[Sl]=null,Sl--)}function Pl(e,t){xl[++Sl]=e.current,e.current=t}var _l={},Nl={current:_l},zl={current:!1},Dl=_l;function Il(e,t){var n=e.type.contextTypes;if(!n)return _l;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in n)a[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ml(e){return null!=(e=e.childContextTypes)}function Ol(e){Cl(zl,e),Cl(Nl,e)}function Rl(e){Cl(zl,e),Cl(Nl,e)}function Ul(e,t,n){if(Nl.current!==_l)throw Error(l(168));Pl(Nl,t,e),Pl(zl,n,e)}function Fl(e,n,r){var a=e.stateNode;if(e=n.childContextTypes,"function"!=typeof a.getChildContext)return r;for(var i in a=a.getChildContext())if(!(i in e))throw Error(l(108,G(n)||"Unknown",i));return t({},r,{},a)}function Ll(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||_l,Dl=Nl.current,Pl(Nl,t,e),Pl(zl,zl.current,e),!0}function Al(e,t,n){var r=e.stateNode;if(!r)throw Error(l(169));n?(t=Fl(e,t,Dl),r.__reactInternalMemoizedMergedChildContext=t,Cl(zl,e),Cl(Nl,e),Pl(Nl,t,e)):Cl(zl,e),Pl(zl,n,e)}var Bl=n.unstable_runWithPriority,Wl=n.unstable_scheduleCallback,Vl=n.unstable_cancelCallback,jl=n.unstable_shouldYield,Hl=n.unstable_requestPaint,Ql=n.unstable_now,Kl=n.unstable_getCurrentPriorityLevel,$l=n.unstable_ImmediatePriority,ql=n.unstable_UserBlockingPriority,Yl=n.unstable_NormalPriority,Xl=n.unstable_LowPriority,Gl=n.unstable_IdlePriority;if(null==r.__interactionsRef||null==r.__interactionsRef.current)throw Error(l(302));var Zl={},Jl=void 0!==Hl?Hl:function(){},ea=null,ta=null,na=!1,ra=Ql(),la=1e4>ra?Ql:function(){return Ql()-ra};function aa(){switch(Kl()){case $l:return 99;case ql:return 98;case Yl:return 97;case Xl:return 96;case Gl:return 95;default:throw Error(l(332))}}function ia(e){switch(e){case 99:return $l;case 98:return ql;case 97:return Yl;case 96:return Xl;case 95:return Gl;default:throw Error(l(332))}}function oa(e,t){return e=ia(e),Bl(e,t)}function ua(e,t,n){return e=ia(e),Wl(e,t,n)}function ca(e){return null===ea?(ea=[e],ta=Wl($l,fa)):ea.push(e),Zl}function sa(){if(null!==ta){var e=ta;ta=null,Vl(e)}fa()}function fa(){if(!na&&null!==ea){na=!0;var e=0;try{var t=ea;oa(99,function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}}),ea=null}catch(n){throw null!==ea&&(ea=ea.slice(e+1)),Wl($l,sa),n}finally{na=!1}}}var da=3;function pa(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function ma(e,t){return 1073741823===t?99:1===t||2===t?95:0>=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function ha(e,n){if(e&&e.defaultProps)for(var r in n=t({},n),e=e.defaultProps)void 0===n[r]&&(n[r]=e[r]);return n}var ga={current:null},va=null,ya=null,ba=null;function ka(){ba=ya=va=null}function wa(e,t){var n=e.type._context;Pl(ga,n._currentValue,e),n._currentValue=t}function Ea(e){var t=ga.current;Cl(ga,e),e.type._context._currentValue=t}function Ta(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function xa(e,t){va=e,ba=ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(uo=!0),e.firstContext=null)}function Sa(e,t){if(ba!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ba=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ya){if(null===va)throw Error(l(308));ya=t,va.dependencies={expirationTime:0,firstContext:t,responders:null}}else ya=ya.next=t;return e._currentValue}var Ca=!1;function Pa(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function _a(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Na(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function za(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Da(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,l=null;null===r&&(r=e.updateQueue=Pa(e.memoizedState))}else r=e.updateQueue,l=n.updateQueue,null===r?null===l?(r=e.updateQueue=Pa(e.memoizedState),l=n.updateQueue=Pa(n.memoizedState)):r=e.updateQueue=_a(l):null===l&&(l=n.updateQueue=_a(r));null===l||r===l?za(r,t):null===r.lastUpdate||null===l.lastUpdate?(za(r,t),za(l,t)):(za(r,t),l.lastUpdate=t)}function Ia(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Pa(e.memoizedState):Ma(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Ma(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=_a(t)),t}function Oa(e,n,r,l,a,i){switch(r.tag){case 1:return"function"==typeof(e=r.payload)?e.call(i,l,a):e;case 3:e.effectTag=-4097&e.effectTag|64;case 0:if(null==(a="function"==typeof(e=r.payload)?e.call(i,l,a):e))break;return t({},l,a);case 2:Ca=!0}return l}function Ra(e,t,n,r,l){Ca=!1;for(var a=(t=Ma(e,t)).baseState,i=null,o=0,u=t.firstUpdate,c=a;null!==u;){var s=u.expirationTime;s<l?(null===i&&(i=u,a=c),o<s&&(o=s)):(Gu(s,u.suspenseConfig),c=Oa(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f<l?(null===s&&(s=u,null===i&&(a=c)),o<f&&(o=f)):(c=Oa(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===i&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===s&&(a=c),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=s,Zu(o),e.expirationTime=o,e.memoizedState=c}function Ua(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),Fa(t.firstEffect,n),t.firstEffect=t.lastEffect=null,Fa(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function Fa(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;if("function"!=typeof n)throw Error(l(191,n));n.call(r)}e=e.nextEffect}}var La=I.ReactCurrentBatchConfig,Aa=(new e.Component).refs;function Ba(e,n,r,l){r=null==(r=r(l,n=e.memoizedState))?n:t({},n,r),e.memoizedState=r,null!==(l=e.updateQueue)&&0===e.expirationTime&&(l.baseState=r)}var Wa={isMounted:function(e){return!!(e=e._reactInternalFiber)&&at(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Uu(),l=La.suspense;(l=Na(r=Fu(r,e,l),l)).payload=t,null!=n&&(l.callback=n),Da(e,l),Lu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Uu(),l=La.suspense;(l=Na(r=Fu(r,e,l),l)).tag=1,l.payload=t,null!=n&&(l.callback=n),Da(e,l),Lu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Uu(),r=La.suspense;(r=Na(n=Fu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),Da(e,r),Lu(e,n)}};function Va(e,t,n,r,l,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!ml(n,r)||!ml(l,a))}function ja(e,t,n){var r=!1,l=_l,a=t.contextType;return"object"==typeof a&&null!==a?a=Sa(a):(l=Ml(t)?Dl:Nl.current,a=(r=null!=(r=t.contextTypes))?Il(e,l):_l),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Wa,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wa.enqueueReplaceState(t,t.state,null)}function Qa(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs=Aa;var a=t.contextType;"object"==typeof a&&null!==a?l.context=Sa(a):(a=Ml(t)?Dl:Nl.current,l.context=Il(e,a)),null!==(a=e.updateQueue)&&(Ra(e,a,n,l,r),l.state=e.memoizedState),"function"==typeof(a=t.getDerivedStateFromProps)&&(Ba(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&Wa.enqueueReplaceState(l,l.state,null),null!==(a=e.updateQueue)&&(Ra(e,a,n,l,r),l.state=e.memoizedState)),"function"==typeof l.componentDidMount&&(e.effectTag|=4)}var Ka=Array.isArray;function $a(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(l(309));var r=n.stateNode}if(!r)throw Error(l(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===Aa&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(l(284));if(!n._owner)throw Error(l(290,e))}return e}function qa(e,t){if("textarea"!==e.type)throw Error(l(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Ya(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,n){return(e=Cc(e,t,n)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Nc(n,e.mode,r)).return=e,t):((t=a(t,n,r)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props,r)).ref=$a(e,t,n),r.return=e,r):((r=Pc(n.type,n.key,n.props,null,e.mode,r)).ref=$a(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=a(t,n.children||[],r)).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=_c(n,e.mode,r,l)).return=e,t):((t=a(t,n,r)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Nc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case R:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=$a(e,null,t),n.return=e,n;case U:return(t=zc(t,e.mode,n)).return=e,t}if(Ka(t)||Y(t))return(t=_c(t,e.mode,n,null)).return=e,t;qa(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case R:return n.key===l?n.type===F?f(e,t,n.props.children,r,l):c(e,t,n,r):null;case U:return n.key===l?s(e,t,n,r):null}if(Ka(n)||Y(n))return null!==l?null:f(e,t,n,r,null);qa(e,n)}return null}function m(e,t,n,r,l){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case R:return e=e.get(null===r.key?n:r.key)||null,r.type===F?f(t,e,r.props.children,l,r.key):c(t,e,r,l);case U:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l)}if(Ka(r)||Y(r))return f(t,e=e.get(n)||null,r,l,null);qa(t,r)}return null}function h(l,a,o,u){for(var c=null,s=null,f=a,h=a=0,g=null;null!==f&&h<o.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var v=p(l,f,o[h],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(l,f),a=i(v,a,h),null===s?c=v:s.sibling=v,s=v,f=g}if(h===o.length)return n(l,f),c;if(null===f){for(;h<o.length;h++)null!==(f=d(l,o[h],u))&&(a=i(f,a,h),null===s?c=f:s.sibling=f,s=f);return c}for(f=r(l,f);h<o.length;h++)null!==(g=m(f,l,h,o[h],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),a=i(g,a,h),null===s?c=g:s.sibling=g,s=g);return e&&f.forEach(function(e){return t(l,e)}),c}function g(a,o,u,c){var s=Y(u);if("function"!=typeof s)throw Error(l(150));if(null==(u=s.call(u)))throw Error(l(151));for(var f=s=null,h=o,g=o=0,v=null,y=u.next();null!==h&&!y.done;g++,y=u.next()){h.index>g?(v=h,h=null):v=h.sibling;var b=p(a,h,y.value,c);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&t(a,h),o=i(b,o,g),null===f?s=b:f.sibling=b,f=b,h=v}if(y.done)return n(a,h),s;if(null===h){for(;!y.done;g++,y=u.next())null!==(y=d(a,y.value,c))&&(o=i(y,o,g),null===f?s=y:f.sibling=y,f=y);return s}for(h=r(a,h);!y.done;g++,y=u.next())null!==(y=m(h,a,g,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?g:y.key),o=i(y,o,g),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach(function(e){return t(a,e)}),s}return function(e,r,i,u){var c="object"==typeof i&&null!==i&&i.type===F&&null===i.key;c&&(i=i.props.children);var s="object"==typeof i&&null!==i;if(s)switch(i.$$typeof){case R:e:{for(s=i.key,c=r;null!==c;){if(c.key===s){if(7===c.tag?i.type===F:c.elementType===i.type){n(e,c.sibling),(r=a(c,i.type===F?i.props.children:i.props,u)).ref=$a(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===F?((r=_c(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Pc(i.type,i.key,i.props,null,e.mode,u)).ref=$a(e,r,i),u.return=e,e=u)}return o(e);case U:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=a(r,i.children||[],u)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=zc(i,e.mode,u)).return=e,e=r}return o(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,i,u)).return=e,e=r):(n(e,r),(r=Nc(i,e.mode,u)).return=e,e=r),o(e);if(Ka(i))return h(e,r,i,u);if(Y(i))return g(e,r,i,u);if(s&&qa(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(l(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Xa=Ya(!0),Ga=Ya(!1),Za={},Ja={current:Za},ei={current:Za},ti={current:Za};function ni(e){if(e===Za)throw Error(l(174));return e}function ri(e,t){Pl(ti,t,e),Pl(ei,e,e),Pl(Ja,Za,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qe(null,"");break;default:t=Qe(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}Cl(Ja,e),Pl(Ja,t,e)}function li(e){Cl(Ja,e),Cl(ei,e),Cl(ti,e)}function ai(e){ni(ti.current);var t=ni(Ja.current),n=Qe(t,e.type);t!==n&&(Pl(ei,e,e),Pl(Ja,n,e))}function ii(e){ei.current===e&&(Cl(Ja,e),Cl(ei,e))}var oi={current:0};function ui(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===or||n.data===ur))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ci(e,t){return{responder:e,props:t}}var si=I.ReactCurrentDispatcher,fi=I.ReactCurrentBatchConfig,di=0,pi=null,mi=null,hi=null,gi=null,vi=null,yi=null,bi=0,ki=null,wi=0,Ei=!1,Ti=null,xi=0;function Si(){throw Error(l(321))}function Ci(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dl(e[n],t[n]))return!1;return!0}function Pi(e,t,n,r,a,i){if(di=i,pi=t,hi=null!==e?e.memoizedState:null,si.current=null===hi?Ki:$i,t=n(r,a),Ei){do{Ei=!1,xi+=1,hi=null!==e?e.memoizedState:null,yi=gi,ki=vi=mi=null,si.current=$i,t=n(r,a)}while(Ei);Ti=null,xi=0}if(si.current=Qi,(e=pi).memoizedState=gi,e.expirationTime=bi,e.updateQueue=ki,e.effectTag|=wi,e=null!==mi&&null!==mi.next,di=0,yi=vi=gi=hi=mi=pi=null,bi=0,ki=null,wi=0,e)throw Error(l(300));return t}function _i(){si.current=Qi,di=0,yi=vi=gi=hi=mi=pi=null,bi=0,ki=null,wi=0,Ei=!1,Ti=null,xi=0}function Ni(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===vi?gi=vi=e:vi=vi.next=e,vi}function zi(){if(null!==yi)yi=(vi=yi).next,hi=null!==(mi=hi)?mi.next:null;else{if(null===hi)throw Error(l(310));var e={memoizedState:(mi=hi).memoizedState,baseState:mi.baseState,queue:mi.queue,baseUpdate:mi.baseUpdate,next:null};vi=null===vi?gi=e:vi.next=e,hi=mi.next}return vi}function Di(e,t){return"function"==typeof t?t(e):t}function Ii(e){var t=zi(),n=t.queue;if(null===n)throw Error(l(311));if(n.lastRenderedReducer=e,0<xi){var r=n.dispatch;if(null!==Ti){var a=Ti.get(n);if(void 0!==a){Ti.delete(n);var i=t.memoizedState;do{i=e(i,a.action),a=a.next}while(null!==a);return dl(i,t.memoizedState)||(uo=!0),t.memoizedState=i,t.baseUpdate===n.last&&(t.baseState=i),n.lastRenderedState=i,[i,r]}}return[t.memoizedState,r]}r=n.last;var o=t.baseUpdate;if(i=t.baseState,null!==o?(null!==r&&(r.next=null),r=o.next):r=null!==r?r.next:null,null!==r){var u=a=null,c=r,s=!1;do{var f=c.expirationTime;f<di?(s||(s=!0,u=o,a=i),f>bi&&Zu(bi=f)):(Gu(f,c.suspenseConfig),i=c.eagerReducer===e?c.eagerState:e(i,c.action)),o=c,c=c.next}while(null!==c&&c!==r);s||(u=o,a=i),dl(i,t.memoizedState)||(uo=!0),t.memoizedState=i,t.baseUpdate=u,t.baseState=a,n.lastRenderedState=i}return[t.memoizedState,n.dispatch]}function Mi(e){var t=Ni();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Di,lastRenderedState:e}).dispatch=Hi.bind(null,pi,e),[t.memoizedState,e]}function Oi(e){return Ii(Di,e)}function Ri(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===ki?(ki={lastEffect:null}).lastEffect=e.next=e:null===(t=ki.lastEffect)?ki.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,ki.lastEffect=e),e}function Ui(e,t,n,r){var l=Ni();wi|=e,l.memoizedState=Ri(t,n,void 0,void 0===r?null:r)}function Fi(e,t,n,r){var l=zi();r=void 0===r?null:r;var a=void 0;if(null!==mi){var i=mi.memoizedState;if(a=i.destroy,null!==r&&Ci(r,i.deps))return void Ri(0,n,a,r)}wi|=e,l.memoizedState=Ri(t,n,a,r)}function Li(e,t){return Ui(516,192,e,t)}function Ai(e,t){return Fi(516,192,e,t)}function Bi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Wi(){}function Vi(e,t){return Ni().memoizedState=[e,void 0===t?null:t],e}function ji(e,t){var n=zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ci(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hi(e,t,n){if(!(25>xi))throw Error(l(301));var r=e.alternate;if(e===pi||null!==r&&r===pi)if(Ei=!0,e={expirationTime:di,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Ti&&(Ti=new Map),void 0===(n=Ti.get(t)))Ti.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var a=Uu(),i=La.suspense;i={expirationTime:a=Fu(a,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.last;if(null===o)i.next=i;else{var u=o.next;null!==u&&(i.next=u),o.next=i}if(t.last=i,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var c=t.lastRenderedState,s=r(c,n);if(i.eagerReducer=r,i.eagerState=s,dl(s,c))return}catch(f){}Lu(e,a)}}var Qi={readContext:Sa,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useResponder:Si,useDeferredValue:Si,useTransition:Si},Ki={readContext:Sa,useCallback:Vi,useContext:Sa,useEffect:Li,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ui(4,36,Bi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4,36,e,t)},useMemo:function(e,t){var n=Ni();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ni();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Hi.bind(null,pi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ni().memoizedState=e},useState:Mi,useDebugValue:Wi,useResponder:ci,useDeferredValue:function(e,t){var r=Mi(e),l=r[0],a=r[1];return Li(function(){n.unstable_next(function(){var n=fi.suspense;fi.suspense=void 0===t?null:t;try{a(e)}finally{fi.suspense=n}})},[e,t]),l},useTransition:function(e){var t=Mi(!1),r=t[0],l=t[1];return[Vi(function(t){l(!0),n.unstable_next(function(){var n=fi.suspense;fi.suspense=void 0===e?null:e;try{l(!1),t()}finally{fi.suspense=n}})},[e,r]),r]}},$i={readContext:Sa,useCallback:ji,useContext:Sa,useEffect:Ai,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fi(4,36,Bi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4,36,e,t)},useMemo:function(e,t){var n=zi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ci(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:Ii,useRef:function(){return zi().memoizedState},useState:Oi,useDebugValue:Wi,useResponder:ci,useDeferredValue:function(e,t){var r=Oi(e),l=r[0],a=r[1];return Ai(function(){n.unstable_next(function(){var n=fi.suspense;fi.suspense=void 0===t?null:t;try{a(e)}finally{fi.suspense=n}})},[e,t]),l},useTransition:function(e){var t=Oi(!1),r=t[0],l=t[1];return[ji(function(t){l(!0),n.unstable_next(function(){var n=fi.suspense;fi.suspense=void 0===e?null:e;try{l(!1),t()}finally{fi.suspense=n}})},[e,r]),r]}},qi=n.unstable_now,Yi=0,Xi=-1;function Gi(e,t){if(0<=Xi){var n=qi()-Xi;e.actualDuration+=n,t&&(e.selfBaseDuration=n),Xi=-1}}var Zi=null,Ji=null,eo=!1;function to(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function no(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function ro(e){if(eo){var t=Ji;if(t){var n=t;if(!no(e,t)){if(!(t=hr(n.nextSibling))||!no(e,t))return e.effectTag=-1025&e.effectTag|2,eo=!1,void(Zi=e);to(Zi,n)}Zi=e,Ji=hr(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,eo=!1,Zi=e}}function lo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Zi=e}function ao(e){if(e!==Zi)return!1;if(!eo)return lo(e),eo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!dr(t,e.memoizedProps))for(t=Ji;t;)to(e,t),t=hr(t.nextSibling);if(lo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if(n===ir){if(0===t){Ji=hr(e.nextSibling);break e}t--}else n!==ar&&n!==ur&&n!==or||t++}e=e.nextSibling}Ji=null}}else Ji=Zi?hr(e.stateNode.nextSibling):null;return!0}function io(){Ji=Zi=null,eo=!1}var oo=I.ReactCurrentOwner,uo=!1;function co(e,t,n,r){t.child=null===e?Ga(t,null,n,r):Xa(t,e.child,n,r)}function so(e,t,n,r,l){n=n.render;var a=t.ref;return xa(t,l),r=Pi(e,t,n,r,a,l),null===e||uo?(t.effectTag|=1,co(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),_o(e,t,l))}function fo(e,t,n,r,l,a){if(null===e){var i=n.type;return"function"!=typeof i||xc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,null,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,po(e,t,i,r,l,a))}return i=e.child,l<a&&(l=i.memoizedProps,(n=null!==(n=n.compare)?n:ml)(l,r)&&e.ref===t.ref)?_o(e,t,a):(t.effectTag|=1,(e=Cc(i,r,a)).ref=t.ref,e.return=t,t.child=e)}function po(e,t,n,r,l,a){return null!==e&&ml(e.memoizedProps,r)&&e.ref===t.ref&&(uo=!1,l<a)?_o(e,t,a):ho(e,t,n,r,a)}function mo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function ho(e,t,n,r,l){var a=Ml(n)?Dl:Nl.current;return a=Il(t,a),xa(t,l),n=Pi(e,t,n,r,a,l),null===e||uo?(t.effectTag|=1,co(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),_o(e,t,l))}function go(e,t,n,r,l){if(Ml(n)){var a=!0;Ll(t)}else a=!1;if(xa(t,l),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),ja(t,n,r,l),Qa(t,n,r,l),r=!0;else if(null===e){var i=t.stateNode,o=t.memoizedProps;i.props=o;var u=i.context,c=n.contextType;"object"==typeof c&&null!==c?c=Sa(c):c=Il(t,c=Ml(n)?Dl:Nl.current);var s=n.getDerivedStateFromProps,f="function"==typeof s||"function"==typeof i.getSnapshotBeforeUpdate;f||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==r||u!==c)&&Ha(t,i,r,c),Ca=!1;var d=t.memoizedState;u=i.state=d;var p=t.updateQueue;null!==p&&(Ra(t,p,r,i,l),u=t.memoizedState),o!==r||d!==u||zl.current||Ca?("function"==typeof s&&(Ba(t,n,s,r),u=t.memoizedState),(o=Ca||Va(t,n,o,r,d,u,c))?(f||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.effectTag|=4)):("function"==typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=o):("function"==typeof i.componentDidMount&&(t.effectTag|=4),r=!1)}else i=t.stateNode,o=t.memoizedProps,i.props=t.type===t.elementType?o:ha(t.type,o),u=i.context,"object"==typeof(c=n.contextType)&&null!==c?c=Sa(c):c=Il(t,c=Ml(n)?Dl:Nl.current),(f="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(o!==r||u!==c)&&Ha(t,i,r,c),Ca=!1,u=t.memoizedState,d=i.state=u,null!==(p=t.updateQueue)&&(Ra(t,p,r,i,l),d=t.memoizedState),o!==r||u!==d||zl.current||Ca?("function"==typeof s&&(Ba(t,n,s,r),d=t.memoizedState),(s=Ca||Va(t,n,o,r,u,d,c))?(f||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,d,c),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,d,c)),"function"==typeof i.componentDidUpdate&&(t.effectTag|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),i.props=r,i.state=d,i.context=c,r=s):("function"!=typeof i.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return vo(e,t,n,r,a,l)}function vo(e,t,n,r,l,a){mo(e,t);var i=0!=(64&t.effectTag);if(!r&&!i)return l&&Al(t,n,!1),_o(e,t,a);if(r=t.stateNode,oo.current=t,i&&"function"!=typeof n.getDerivedStateFromError){var o=null;Xi=-1}else o=r.render();return t.effectTag|=1,null!==e&&i?(i=o,t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,i,a)):co(e,t,o,a),t.memoizedState=r.state,l&&Al(t,n,!0),t.child}function yo(e){var t=e.stateNode;t.pendingContext?Ul(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ul(e,t.context,!1),ri(e,t.containerInfo)}var bo,ko,wo,Eo,To={dehydrated:null,retryTime:0};function xo(e,t,n){var r,l=t.mode,a=t.pendingProps,i=oi.current,o=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&i)&&(null===e||null!==e.memoizedState)),r?(o=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(i|=1),Pl(oi,1&i,t),null===e){if(void 0!==a.fallback&&ro(t),o){if(o=a.fallback,(a=_c(null,l,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=_c(o,l,n,null)).return=t,a.sibling=n,t.memoizedState=To,t.child=a,n}return l=a.children,t.memoizedState=null,t.child=Ga(t,null,l,n)}if(null!==e.memoizedState){if(l=(e=e.child).sibling,o){if(a=a.fallback,(n=Cc(e,e.pendingProps,0)).return=t,0==(2&t.mode)&&(o=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=o;null!==o;)o.return=n,o=o.sibling;if(8&t.mode){for(o=0,e=n.child;null!==e;)o+=e.treeBaseDuration,e=e.sibling;n.treeBaseDuration=o}return(l=Cc(l,a,l.expirationTime)).return=t,n.sibling=l,n.childExpirationTime=0,t.memoizedState=To,t.child=n,l}return n=Xa(t,e.child,a.children,n),t.memoizedState=null,t.child=n}if(e=e.child,o){if(o=a.fallback,(a=_c(null,l,0,null)).return=t,a.child=e,null!==e&&(e.return=a),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;if(8&t.mode){for(e=0,i=a.child;null!==i;)e+=i.treeBaseDuration,i=i.sibling;a.treeBaseDuration=e}return(n=_c(o,l,n,null)).return=t,a.sibling=n,n.effectTag|=2,a.childExpirationTime=0,t.memoizedState=To,t.child=a,n}return t.memoizedState=null,t.child=Xa(t,e,a.children,n)}function So(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),Ta(e.return,t)}function Co(e,t,n,r,l,a){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,last:r,tail:n,tailExpiration:0,tailMode:l,lastEffect:a}:(i.isBackwards=t,i.rendering=null,i.last=r,i.tail=n,i.tailExpiration=0,i.tailMode=l,i.lastEffect=a)}function Po(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(co(e,t,r.children,n),0!=(2&(r=oi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&So(e,n);else if(19===e.tag)So(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Pl(oi,r,t),0==(2&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&null===ui(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Co(t,!1,l,n,a,t.lastEffect);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===ui(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Co(t,!0,n,null,a,t.lastEffect);break;case"together":Co(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function _o(e,t,n){null!==e&&(t.dependencies=e.dependencies),Xi=-1;var r=t.expirationTime;if(0!==r&&Zu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(l(153));if(null!==t.child){for(n=Cc(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cc(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function No(e){e.effectTag|=4}function zo(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Do(e,n,r){var a=n.pendingProps;switch(n.tag){case 2:case 16:break;case 15:case 0:break;case 1:Ml(n.type)&&Ol(n);break;case 3:li(n),Rl(n),(r=n.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===e||null===e.child)&&ao(n)&&No(n),ko(n);break;case 5:ii(n),r=ni(ti.current);var i=n.type;if(null!==e&&null!=n.stateNode)wo(e,n,i,a,r),e.ref!==n.ref&&(n.effectTag|=128);else if(a){if(e=ni(Ja.current),ao(n)){a=n.stateNode,i=n.type;var o=n.memoizedProps;switch(a[yr]=n,a[br]=o,i){case"iframe":case"object":case"embed":Mn("load",a);break;case"video":case"audio":for(e=0;e<lt.length;e++)Mn(lt[e],a);break;case"source":Mn("error",a);break;case"img":case"image":case"link":Mn("error",a),Mn("load",a);break;case"form":Mn("reset",a),Mn("submit",a);break;case"details":Mn("toggle",a);break;case"input":De(a,o),Mn("invalid",a),Gn(r,"onChange");break;case"select":a._wrapperState={wasMultiple:!!o.multiple},Mn("invalid",a),Gn(r,"onChange");break;case"textarea":Be(a,o),Mn("invalid",a),Gn(r,"onChange")}for(var u in Yn(i,o),e=null,o)if(o.hasOwnProperty(u)){var c=o[u];"children"===u?"string"==typeof c?a.textContent!==c&&(e=["children",c]):"number"==typeof c&&a.textContent!==""+c&&(e=["children",""+c]):f.hasOwnProperty(u)&&null!=c&&Gn(r,u)}switch(i){case"input":_e(a),Oe(a,o,!0);break;case"textarea":_e(a),Ve(a,o);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(a.onclick=Zn)}r=e,n.updateQueue=r,null!==r&&No(n)}else{switch(u=9===r.nodeType?r:r.ownerDocument,e===je.html&&(e=He(i)),e===je.html?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof a.is?e=u.createElement(i,{is:a.is}):(e=u.createElement(i),"select"===i&&(u=e,a.multiple?u.multiple=!0:a.size&&(u.size=a.size))):e=u.createElementNS(e,i),e[yr]=n,e[br]=a,bo(e,n,!1,!1),n.stateNode=e,u=Xn(i,a),i){case"iframe":case"object":case"embed":Mn("load",e),c=a;break;case"video":case"audio":for(c=0;c<lt.length;c++)Mn(lt[c],e);c=a;break;case"source":Mn("error",e),c=a;break;case"img":case"image":case"link":Mn("error",e),Mn("load",e),c=a;break;case"form":Mn("reset",e),Mn("submit",e),c=a;break;case"details":Mn("toggle",e),c=a;break;case"input":De(e,a),c=ze(e,a),Mn("invalid",e),Gn(r,"onChange");break;case"option":c=Fe(e,a);break;case"select":e._wrapperState={wasMultiple:!!a.multiple},c=t({},a,{value:void 0}),Mn("invalid",e),Gn(r,"onChange");break;case"textarea":Be(e,a),c=Ae(e,a),Mn("invalid",e),Gn(r,"onChange");break;default:c=a}Yn(i,c);var s=c;for(o in s)if(s.hasOwnProperty(o)){var d=s[o];"style"===o?$n(e,d):"dangerouslySetInnerHTML"===o?null!=(d=d?d.__html:void 0)&&$e(e,d):"children"===o?"string"==typeof d?("textarea"!==i||""!==d)&&qe(e,d):"number"==typeof d&&qe(e,""+d):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(f.hasOwnProperty(o)?null!=d&&Gn(r,o):null!=d&&Se(e,o,d,u))}switch(i){case"input":_e(e),Oe(e,a,!1);break;case"textarea":_e(e),Ve(e,a);break;case"option":null!=a.value&&e.setAttribute("value",""+xe(a.value));break;case"select":e.multiple=!!a.multiple,null!=(r=a.value)?Le(e,!!a.multiple,r,!1):null!=a.defaultValue&&Le(e,!!a.multiple,a.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=Zn)}fr(i,a)&&No(n)}null!==n.ref&&(n.effectTag|=128)}else if(null===n.stateNode)throw Error(l(166));break;case 6:if(e&&null!=n.stateNode)Eo(e,n,e.memoizedProps,a);else{if("string"!=typeof a&&null===n.stateNode)throw Error(l(166));r=ni(ti.current),ni(Ja.current),ao(n)?(r=n.stateNode,a=n.memoizedProps,r[yr]=n,r.nodeValue!==a&&No(n)):((r=(9===r.nodeType?r:r.ownerDocument).createTextNode(a))[yr]=n,n.stateNode=r)}break;case 11:break;case 13:if(Cl(oi,n),a=n.memoizedState,0!=(64&n.effectTag))return n.expirationTime=r,n;r=null!==a,a=!1,null===e?void 0!==n.memoizedProps.fallback&&ao(n):(a=null!==(i=e.memoizedState),r||null===i||null!==(i=e.child.sibling)&&(null!==(o=n.firstEffect)?(n.firstEffect=i,i.nextEffect=o):(n.firstEffect=n.lastEffect=i,i.nextEffect=null),i.effectTag=8)),r&&!a&&0!=(2&n.mode)&&(null===e&&!0!==n.memoizedProps.unstable_avoidThisFallback||0!=(1&oi.current)?mu===lu&&(mu=ou):(mu!==lu&&mu!==ou||(mu=uu),0!==bu&&null!==fu&&(Mc(fu,pu),Oc(fu,bu)))),(r||a)&&(n.effectTag|=4);break;case 7:case 8:case 12:break;case 4:li(n),ko(n);break;case 10:Ea(n);break;case 9:case 14:break;case 17:Ml(n.type)&&Ol(n);break;case 19:if(Cl(oi,n),null===(a=n.memoizedState))break;if(i=0!=(64&n.effectTag),null===(o=a.rendering)){if(i)zo(a,!1);else if(mu!==lu||null!==e&&0!=(64&e.effectTag))for(o=n.child;null!==o;){if(null!==(e=ui(o))){for(n.effectTag|=64,zo(a,!1),null!==(i=e.updateQueue)&&(n.updateQueue=i,n.effectTag|=4),null===a.lastEffect&&(n.firstEffect=null),n.lastEffect=a.lastEffect,a=n.child;null!==a;)e=r,(i=a).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childExpirationTime=0,i.expirationTime=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.selfBaseDuration=0,i.treeBaseDuration=0):(i.childExpirationTime=o.childExpirationTime,i.expirationTime=o.expirationTime,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,e=o.dependencies,i.dependencies=null===e?null:{expirationTime:e.expirationTime,firstContext:e.firstContext,responders:e.responders},i.selfBaseDuration=o.selfBaseDuration,i.treeBaseDuration=o.treeBaseDuration),a=a.sibling;return Pl(oi,1&oi.current|2,n),n.child}o=o.sibling}}else{if(!i)if(null!==(e=ui(o))){if(n.effectTag|=64,i=!0,null!==(r=e.updateQueue)&&(n.updateQueue=r,n.effectTag|=4),zo(a,!0),null===a.tail&&"hidden"===a.tailMode&&!o.alternate){null!==(n=n.lastEffect=a.lastEffect)&&(n.nextEffect=null);break}}else la()>a.tailExpiration&&1<r&&(n.effectTag|=64,i=!0,zo(a,!1),--r,n.expirationTime=n.childExpirationTime=r,pc(r));a.isBackwards?(o.sibling=n.child,n.child=o):(null!==(r=a.last)?r.sibling=o:n.child=o,a.last=o)}if(null!==a.tail)return 0===a.tailExpiration&&(a.tailExpiration=la()+500),r=a.tail,a.rendering=r,a.tail=r.sibling,a.lastEffect=n.lastEffect,r.sibling=null,a=oi.current,Pl(oi,i?1&a|2:1&a,n),r;break;case 20:case 21:break;default:throw Error(l(156,n.tag))}return null}function Io(e){switch(e.tag){case 1:Ml(e.type)&&Ol(e);var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(li(e),Rl(e),0!=(64&(t=e.effectTag)))throw Error(l(285));return e.effectTag=-4097&t|64,e;case 5:return ii(e),null;case 13:return Cl(oi,e),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return Cl(oi,e),null;case 4:return li(e),null;case 10:return Ea(e),null;default:return null}}function Mo(e,t){return{value:e,source:t,stack:Z(t)}}bo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ko=function(){},wo=function(e,n,r,l,a){var i=e.memoizedProps;if(i!==l){var o,u,c=n.stateNode;switch(ni(Ja.current),e=null,r){case"input":i=ze(c,i),l=ze(c,l),e=[];break;case"option":i=Fe(c,i),l=Fe(c,l),e=[];break;case"select":i=t({},i,{value:void 0}),l=t({},l,{value:void 0}),e=[];break;case"textarea":i=Ae(c,i),l=Ae(c,l),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof l.onClick&&(c.onclick=Zn)}for(o in Yn(r,l),r=null,i)if(!l.hasOwnProperty(o)&&i.hasOwnProperty(o)&&null!=i[o])if("style"===o)for(u in c=i[o])c.hasOwnProperty(u)&&(r||(r={}),r[u]="");else"dangerouslySetInnerHTML"!==o&&"children"!==o&&"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(f.hasOwnProperty(o)?e||(e=[]):(e=e||[]).push(o,null));for(o in l){var s=l[o];if(c=null!=i?i[o]:void 0,l.hasOwnProperty(o)&&s!==c&&(null!=s||null!=c))if("style"===o)if(c){for(u in c)!c.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(r||(r={}),r[u]="");for(u in s)s.hasOwnProperty(u)&&c[u]!==s[u]&&(r||(r={}),r[u]=s[u])}else r||(e||(e=[]),e.push(o,r)),r=s;else"dangerouslySetInnerHTML"===o?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(o,""+s)):"children"===o?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(o,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&(f.hasOwnProperty(o)?(null!=s&&Gn(a,o),e||c===s||(e=[])):(e=e||[]).push(o,s))}r&&(e=e||[]).push("style",r),a=e,(n.updateQueue=a)&&No(n)}},Eo=function(e,t,n,r){n!==r&&No(t)};var Oo="function"==typeof WeakSet?WeakSet:Set;function Ro(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=Z(n)),null!==n&&G(n.type),t=t.value,null!==e&&1===e.tag&&G(e.type);try{console.error(t)}catch(l){setTimeout(function(){throw l})}}function Uo(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){sc(e,n)}}function Fo(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){sc(e,n)}else t.current=null}function Lo(e,t){switch(t.tag){case 0:case 11:case 15:Ao(2,0,t);break;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:ha(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}function Ao(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var l=r.destroy;r.destroy=void 0,void 0!==l&&l()}0!=(r.tag&t)&&(l=r.create,r.destroy=l()),r=r.next}while(r!==n)}}function Bo(e,t,n){switch("function"==typeof bc&&bc(t),t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;oa(97<n?97:n,function(){var e=r;do{var n=e.destroy;if(void 0!==n){var l=t;try{n()}catch(a){sc(l,a)}}e=e.next}while(e!==r)})}break;case 1:Fo(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&Uo(t,n);break;case 5:Fo(t);break;case 4:Ho(e,t,n)}}function Wo(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,null!==t&&Wo(t)}function Vo(e){return 5===e.tag||3===e.tag||4===e.tag}function jo(e){e:{for(var t=e.return;null!==t;){if(Vo(t)){var n=t;break e}t=t.return}throw Error(l(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(l(161))}16&n.effectTag&&(qe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Vo(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var a=e;;){var i=5===a.tag||6===a.tag;if(i){var o=i?a.stateNode:a.stateNode.instance;if(n)if(r){var u=o;o=n,8===(i=t).nodeType?i.parentNode.insertBefore(u,o):i.insertBefore(u,o)}else t.insertBefore(o,n);else r?(8===(u=t).nodeType?(i=u.parentNode).insertBefore(o,u):(i=u).appendChild(o),null!=(u=u._reactRootContainer)||null!==i.onclick||(i.onclick=Zn)):t.appendChild(o)}else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function Ho(e,t,n){for(var r,a,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(l(160));switch(r=o.stateNode,o.tag){case 5:a=!1;break e;case 3:case 4:r=r.containerInfo,a=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,s=n,f=c;;)if(Bo(u,f,s),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}a?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,a=!0,i.child.return=i,i=i.child;continue}}else if(Bo(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Qo(e,t){switch(t.tag){case 0:case 11:case 14:case 15:Ao(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,a=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[br]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Ie(n,r),Xn(e,a),t=Xn(e,r),a=0;a<i.length;a+=2){var o=i[a],u=i[a+1];"style"===o?$n(n,u):"dangerouslySetInnerHTML"===o?$e(n,u):"children"===o?qe(n,u):Se(n,o,u,t)}switch(e){case"input":Me(n,r);break;case"textarea":We(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Le(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Le(n,!!r.multiple,r.defaultValue,!0):Le(n,!!r.multiple,r.multiple?[]:"",!1))}}}break;case 6:if(null===t.stateNode)throw Error(l(162));t.stateNode.nodeValue=t.memoizedProps;break;case 3:(t=t.stateNode).hydrate&&(t.hydrate=!1,Mt(t.containerInfo));break;case 12:break;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,wu=la()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,a=null!=(a=e.memoizedProps.style)&&a.hasOwnProperty("display")?a.display:null,i.style.display=Kn("display",a));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}Ko(t);break;case 19:Ko(t);break;case 17:case 20:case 21:break;default:throw Error(l(163))}}function Ko(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Oo),t.forEach(function(t){var l=dc.bind(null,e,t);n.has(t)||(!0!==t.__reactDoNotTraceInteractions&&(l=r.unstable_wrap(l)),n.add(t),t.then(l,l))})}}var $o="function"==typeof WeakMap?WeakMap:Map;function qo(e,t,n){(n=Na(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xu||(xu=!0,Su=r),Ro(e,t)},n}function Yo(e,t,n){(n=Na(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return Ro(e,t),r(l)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Cu?Cu=new Set([this]):Cu.add(this),Ro(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Xo,Go=Math.ceil,Zo=I.ReactCurrentDispatcher,Jo=I.ReactCurrentOwner,eu=0,tu=8,nu=16,ru=32,lu=0,au=1,iu=2,ou=3,uu=4,cu=5,su=eu,fu=null,du=null,pu=0,mu=lu,hu=null,gu=1073741823,vu=1073741823,yu=null,bu=0,ku=!1,wu=0,Eu=500,Tu=null,xu=!1,Su=null,Cu=null,Pu=!1,_u=null,Nu=90,zu=0,Du=null,Iu=0,Mu=null,Ou=null,Ru=0;function Uu(){return(su&(nu|ru))!==eu?1073741821-(la()/10|0):0!==Ru?Ru:Ru=1073741821-(la()/10|0)}function Fu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=aa();if(0==(4&t))return 99===r?1073741823:1073741822;if((su&nu)!==eu)return pu;if(null!==n)e=pa(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=pa(e,150,100);break;case 97:case 96:e=pa(e,5e3,250);break;case 95:e=2;break;default:throw Error(l(326))}return null!==fu&&e===pu&&--e,e}function Lu(e,t){if(50<Iu)throw Iu=0,Mu=null,Error(l(185));if(null!==(e=Au(e,t))){var n=aa();1073741823===t?(su&tu)!==eu&&(su&(nu|ru))===eu?(hc(e,t),ju(e)):(Wu(e),hc(e,t),su===eu&&sa()):(Wu(e),hc(e,t)),(4&su)===eu||98!==n&&99!==n||(null===Du?Du=new Map([[e,t]]):(void 0===(n=Du.get(e))||n>t)&&Du.set(e,t))}}function Au(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,l=null;if(null===r&&3===e.tag)l=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){l=r.stateNode;break}r=r.return}return null!==l&&(fu===l&&(Zu(t),mu===uu&&Mc(l,pu)),Oc(l,t)),l}function Bu(e){var t=e.lastExpiredTime;return 0!==t?t:Ic(e,t=e.firstPendingTime)?(t=e.lastPingedTime)>(e=e.nextKnownPendingLevel)?t:e:t}function Wu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=ca(ju.bind(null,e));else{var t=Bu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Uu();if(r=ma(r,t),null!==n){var l=e.callbackPriority;if(e.callbackExpirationTime===t&&l>=r)return;n!==Zl&&Vl(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?ca(ju.bind(null,e)):ua(r,Vu.bind(null,e),{timeout:10*(1073741821-t)-la()}),e.callbackNode=t}}}function Vu(e,t){if(Ru=0,t)return Rc(e,t=Uu()),Wu(e),null;var n=Bu(e);if(0!==n){if(t=e.callbackNode,(su&(nu|ru))!==eu)throw Error(l(327));if(oc(),e===fu&&n===pu||($u(e,n),gc(e,n)),null!==du){var a=su;su|=nu;for(var i=Yu(e),o=Xu(e);;)try{ec();break}catch(c){qu(e,c)}if(ka(),su=a,Zo.current=i,r.__interactionsRef.current=o,mu===au)throw t=hu,$u(e,n),Mc(e,n),Wu(e),t;if(null===du)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,a=mu,fu=null,a){case lu:case au:throw Error(l(345));case iu:Rc(e,2<n?2:n);break;case ou:if(Mc(e,n),n===(a=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=rc(i)),1073741823===gu&&10<(i=wu+Eu-la())){if(ku&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,$u(e,n);break}if(0!==(o=Bu(e))&&o!==n)break;if(0!==a&&a!==n){e.lastPingedTime=a;break}e.timeoutHandle=pr(lc.bind(null,e),i);break}lc(e);break;case uu:if(Mc(e,n),n===(a=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=rc(i)),ku&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,$u(e,n);break}if(0!==(i=Bu(e))&&i!==n)break;if(0!==a&&a!==n){e.lastPingedTime=a;break}if(1073741823!==vu?a=10*(1073741821-vu)-la():1073741823===gu?a=0:(a=10*(1073741821-gu)-5e3,0>(a=(i=la())-a)&&(a=0),(n=10*(1073741821-n)-i)<(a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Go(a/1960))-a)&&(a=n)),10<a){e.timeoutHandle=pr(lc.bind(null,e),a);break}lc(e);break;case cu:if(1073741823!==gu&&null!==yu){o=gu;var u=yu;if(0>=(a=0|u.busyMinDurationMs)?a=0:(i=0|u.busyDelayMs,a=(o=la()-(10*(1073741821-o)-(0|u.timeoutMs||5e3)))<=i?0:i+a-o),10<a){Mc(e,n),e.timeoutHandle=pr(lc.bind(null,e),a);break}}lc(e);break;default:throw Error(l(329))}if(Wu(e),e.callbackNode===t)return Vu.bind(null,e)}}return null}function ju(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,e.finishedExpirationTime===t)lc(e);else{if((su&(nu|ru))!==eu)throw Error(l(327));if(oc(),e===fu&&t===pu||($u(e,t),gc(e,t)),null!==du){var n=su;su|=nu;for(var a=Yu(e),i=Xu(e);;)try{Ju();break}catch(o){qu(e,o)}if(ka(),su=n,Zo.current=a,r.__interactionsRef.current=i,mu===au)throw n=hu,$u(e,t),Mc(e,t),Wu(e),n;if(null!==du)throw Error(l(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,fu=null,lc(e),Wu(e)}}return null}function Hu(){if(null!==Du){var e=Du;Du=null,e.forEach(function(e,t){Rc(t,e),Wu(t)}),sa()}}function Qu(e,t){var n=su;su|=1;try{return e(t)}finally{(su=n)===eu&&sa()}}function Ku(e,t){var n=su;su&=-2,su|=tu;try{return e(t)}finally{(su=n)===eu&&sa()}}function $u(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,mr(n)),null!==du)for(n=du.return;null!==n;){var r=n;switch(r.tag){case 1:var l=r.type.childContextTypes;null!=l&&Ol(r);break;case 3:li(r),Rl(r);break;case 5:ii(r);break;case 4:li(r);break;case 13:case 19:Cl(oi,r);break;case 10:Ea(r)}n=n.return}fu=e,du=Cc(e.current,null,t),pu=t,mu=lu,hu=null,vu=gu=1073741823,yu=null,bu=0,ku=!1,Ou=null}function qu(e,t){for(;;){try{if(ka(),_i(),null===du||null===du.return)return mu=au,hu=t,null;8&du.mode&&Gi(du,!0);e:{var n=e,r=du.return,l=du,a=t;if(t=pu,l.effectTag|=2048,l.firstEffect=l.lastEffect=null,null!==a&&"object"==typeof a&&"function"==typeof a.then){var i=a,o=0!=(1&oi.current),u=r;do{var c;if(c=13===u.tag){var s=u.memoizedState;if(null!==s)c=null!==s.dehydrated;else{var f=u.memoizedProps;c=void 0!==f.fallback&&(!0!==f.unstable_avoidThisFallback||!o)}}if(c){var d=u.updateQueue;if(null===d){var p=new Set;p.add(i),u.updateQueue=p}else d.add(i);if(0==(2&u.mode)){if(u.effectTag|=64,l.effectTag&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var m=Na(1073741823,null);m.tag=2,Da(l,m)}l.expirationTime=1073741823;break e}a=void 0,l=t;var h=n.pingCache;if(null===h?(h=n.pingCache=new $o,a=new Set,h.set(i,a)):void 0===(a=h.get(i))&&(a=new Set,h.set(i,a)),!a.has(l)){a.add(l);var g=fc.bind(null,n,i,l);i.then(g,g)}u.effectTag|=4096,u.expirationTime=t;break e}u=u.return}while(null!==u);a=Error((G(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Z(l))}mu!==cu&&(mu=iu),a=Mo(a,l),u=r;do{switch(u.tag){case 3:i=a,u.effectTag|=4096,u.expirationTime=t,Ia(u,qo(u,i,t));break e;case 1:i=a;var v=u.type,y=u.stateNode;if(0==(64&u.effectTag)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Cu||!Cu.has(y)))){u.effectTag|=4096,u.expirationTime=t,Ia(u,Yo(u,i,t));break e}}u=u.return}while(null!==u)}du=nc(du)}catch(b){t=b;continue}break}}function Yu(){var e=Zo.current;return Zo.current=Qi,null===e?Qi:e}function Xu(e){var t=r.__interactionsRef.current;return r.__interactionsRef.current=e.memoizedInteractions,t}function Gu(e,t){e<gu&&2<e&&(gu=e),null!==t&&e<vu&&2<e&&(vu=e,yu=t)}function Zu(e){e>bu&&(bu=e)}function Ju(){for(;null!==du;)du=tc(du)}function ec(){for(;null!==du&&!jl();)du=tc(du)}function tc(e){var t=e.alternate;return 0!=(8&e.mode)?(Xi=qi(),0>e.actualStartTime&&(e.actualStartTime=qi()),t=Xo(t,e,pu),Gi(e,!0)):t=Xo(t,e,pu),e.memoizedProps=e.pendingProps,null===t&&(t=nc(e)),Jo.current=null,t}function nc(e){du=e;do{var t=du.alternate;if(e=du.return,0==(2048&du.effectTag)){if(0==(8&du.mode))t=Do(t,du,pu);else{var n=du;Xi=qi(),0>n.actualStartTime&&(n.actualStartTime=qi()),t=Do(t,du,pu),Gi(du,!1)}if(n=du,1===pu||1!==n.childExpirationTime){var r=0;if(0!=(8&n.mode)){for(var l=n.actualDuration,a=n.selfBaseDuration,i=null===n.alternate||n.child!==n.alternate.child,o=n.child;null!==o;){var u=o.expirationTime,c=o.childExpirationTime;u>r&&(r=u),c>r&&(r=c),i&&(l+=o.actualDuration),a+=o.treeBaseDuration,o=o.sibling}n.actualDuration=l,n.treeBaseDuration=a}else for(l=n.child;null!==l;)(a=l.expirationTime)>r&&(r=a),(i=l.childExpirationTime)>r&&(r=i),l=l.sibling;n.childExpirationTime=r}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=du.firstEffect),null!==du.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=du.firstEffect),e.lastEffect=du.lastEffect),1<du.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=du:e.firstEffect=du,e.lastEffect=du))}else{if(t=Io(du,pu),0!=(8&du.mode)){for(Gi(du,!1),n=du.actualDuration,r=du.child;null!==r;)n+=r.actualDuration,r=r.sibling;du.actualDuration=n}if(null!==t)return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=du.sibling))return t;du=e}while(null!==du);return mu===lu&&(mu=cu),null}function rc(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function lc(e){var t=aa();return oa(99,ac.bind(null,e,t)),null}function ac(e,t){do{oc()}while(null!==_u);if((su&(nu|ru))!==eu)throw Error(l(327));var n=e.finishedWork,a=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(l(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=rc(n);if(e.firstPendingTime=i,a<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:a<=e.firstSuspendedTime&&(e.firstSuspendedTime=a-1),a<=e.lastPingedTime&&(e.lastPingedTime=0),a<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===fu&&(du=fu=null,pu=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=su;su|=ru;var u=Xu(e);Jo.current=null,cr=In;var c=rr();if(lr(c)){if("selectionStart"in c)var s={start:c.selectionStart,end:c.selectionEnd};else e:{var f=(s=(s=c.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(f&&0!==f.rangeCount){s=f.anchorNode;var d=f.anchorOffset,p=f.focusNode;f=f.focusOffset;try{s.nodeType,p.nodeType}catch(L){s=null;break e}var m=0,h=-1,g=-1,v=0,y=0,b=c,k=null;t:for(;;){for(var w;b!==s||0!==d&&3!==b.nodeType||(h=m+d),b!==p||0!==f&&3!==b.nodeType||(g=m+f),3===b.nodeType&&(m+=b.nodeValue.length),null!==(w=b.firstChild);)k=b,b=w;for(;;){if(b===c)break t;if(k===s&&++v===d&&(h=m),k===p&&++y===f&&(g=m),null!==(w=b.nextSibling))break;k=(b=k).parentNode}b=w}s=-1===h||-1===g?null:{start:h,end:g}}else s=null}s=s||{start:0,end:0}}else s=null;sr={focusedElem:c,selectionRange:s},In=!1,Tu=i;do{try{ic()}catch(L){if(null===Tu)throw Error(l(330));sc(Tu,L),Tu=Tu.nextEffect}}while(null!==Tu);Yi=qi(),Tu=i;do{try{for(c=e,s=t;null!==Tu;){var E=Tu.effectTag;if(16&E&&qe(Tu.stateNode,""),128&E){var T=Tu.alternate;if(null!==T){var x=T.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&E){case 2:jo(Tu),Tu.effectTag&=-3;break;case 6:jo(Tu),Tu.effectTag&=-3,Qo(Tu.alternate,Tu);break;case 1024:Tu.effectTag&=-1025;break;case 1028:Tu.effectTag&=-1025,Qo(Tu.alternate,Tu);break;case 4:Qo(Tu.alternate,Tu);break;case 8:Ho(c,d=Tu,s),Wo(d)}Tu=Tu.nextEffect}}catch(L){if(null===Tu)throw Error(l(330));sc(Tu,L),Tu=Tu.nextEffect}}while(null!==Tu);if(x=sr,T=rr(),E=x.focusedElem,s=x.selectionRange,T!==E&&E&&E.ownerDocument&&nr(E.ownerDocument.documentElement,E)){null!==s&&lr(E)&&(T=s.start,void 0===(x=s.end)&&(x=T),"selectionStart"in E?(E.selectionStart=T,E.selectionEnd=Math.min(x,E.value.length)):(x=(T=E.ownerDocument||document)&&T.defaultView||window).getSelection&&(x=x.getSelection(),d=E.textContent.length,c=Math.min(s.start,d),s=void 0===s.end?c:Math.min(s.end,d),!x.extend&&c>s&&(d=s,s=c,c=d),d=tr(E,c),p=tr(E,s),d&&p&&(1!==x.rangeCount||x.anchorNode!==d.node||x.anchorOffset!==d.offset||x.focusNode!==p.node||x.focusOffset!==p.offset)&&((T=T.createRange()).setStart(d.node,d.offset),x.removeAllRanges(),c>s?(x.addRange(T),x.extend(p.node,p.offset)):(T.setEnd(p.node,p.offset),x.addRange(T))))),T=[];for(x=E;x=x.parentNode;)1===x.nodeType&&T.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof E.focus&&E.focus(),E=0;E<T.length;E++)(x=T[E]).element.scrollLeft=x.left,x.element.scrollTop=x.top}sr=null,In=!!cr,cr=null,e.current=n,Tu=i;do{try{for(E=e,T=a;null!==Tu;){var S=Tu.effectTag;if(36&S){s=E;var C=Tu.alternate;switch(c=T,(x=Tu).tag){case 0:case 11:case 15:Ao(16,32,x);break;case 1:var P=x.stateNode;if(4&x.effectTag)if(null===C)P.componentDidMount();else{var _=x.elementType===x.type?C.memoizedProps:ha(x.type,C.memoizedProps);P.componentDidUpdate(_,C.memoizedState,P.__reactInternalSnapshotBeforeUpdate)}var N=x.updateQueue;null!==N&&Ua(x,N,P,c);break;case 3:var z=x.updateQueue;if(null!==z){if(s=null,null!==x.child)switch(x.child.tag){case 5:s=x.child.stateNode;break;case 1:s=x.child.stateNode}Ua(x,z,s,c)}break;case 5:var D=x.stateNode;null===C&&4&x.effectTag&&fr(x.type,x.memoizedProps)&&D.focus();break;case 6:case 4:break;case 12:var I=x.memoizedProps.onRender;"function"==typeof I&&I(x.memoizedProps.id,null===C?"mount":"update",x.actualDuration,x.treeBaseDuration,x.actualStartTime,Yi,s.memoizedInteractions);break;case 13:if(null===x.memoizedState){var M=x.alternate;if(null!==M){var O=M.memoizedState;if(null!==O){var R=O.dehydrated;null!==R&&Mt(R)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(l(163))}}if(128&S){x=void 0;var U=Tu.ref;if(null!==U){var F=Tu.stateNode;switch(Tu.tag){case 5:x=F;break;default:x=F}"function"==typeof U?U(x):U.current=x}}Tu=Tu.nextEffect}}catch(L){if(null===Tu)throw Error(l(330));sc(Tu,L),Tu=Tu.nextEffect}}while(null!==Tu);Tu=null,Jl(),r.__interactionsRef.current=u,su=o}else e.current=n,Yi=qi();if(S=Pu)Pu=!1,_u=e,zu=a,Nu=t;else for(Tu=i;null!==Tu;)t=Tu.nextEffect,Tu.nextEffect=null,Tu=t;if(0!==(t=e.firstPendingTime)){if(null!==Ou)for(i=Ou,Ou=null,C=0;C<i.length;C++)mc(e,i[C],e.memoizedInteractions);hc(e,t)}else Cu=null;if(S||vc(e,a),1073741823===t?e===Mu?Iu++:(Iu=0,Mu=e):Iu=0,"function"==typeof yc&&yc(n.stateNode,a),Wu(e),xu)throw xu=!1,e=Su,Su=null,e;return(su&tu)!==eu?null:(sa(),null)}function ic(){for(;null!==Tu;){var e=Tu.effectTag;0!=(256&e)&&Lo(Tu.alternate,Tu),0==(512&e)||Pu||(Pu=!0,ua(97,function(){return oc(),null})),Tu=Tu.nextEffect}}function oc(){if(90!==Nu){var e=97<Nu?97:Nu;return Nu=90,oa(e,uc)}}function uc(){if(null===_u)return!1;var e=_u,t=zu;if(_u=null,zu=0,(su&(nu|ru))!==eu)throw Error(l(331));var n=su;su|=ru;for(var a=Xu(e),i=e.current.firstEffect;null!==i;){try{var o=i;if(0!=(512&o.effectTag))switch(o.tag){case 0:case 11:case 15:Ao(128,0,o),Ao(0,64,o)}}catch(u){if(null===i)throw Error(l(330));sc(i,u)}o=i.nextEffect,i.nextEffect=null,i=o}return r.__interactionsRef.current=a,vc(e,t),su=n,sa(),!0}function cc(e,t,n){Da(e,t=qo(e,t=Mo(n,t),1073741823)),null!==(e=Au(e,1073741823))&&(Wu(e),hc(e,1073741823))}function sc(e,t){if(3===e.tag)cc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){cc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Cu||!Cu.has(r))){Da(n,e=Yo(n,e=Mo(t,e),1073741823)),null!==(n=Au(n,1073741823))&&(Wu(n),hc(n,1073741823));break}}n=n.return}}function fc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),fu===e&&pu===n?mu===uu||mu===ou&&1073741823===gu&&la()-wu<Eu?$u(e,pu):ku=!0:Ic(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,e.finishedExpirationTime===n&&(e.finishedExpirationTime=0,e.finishedWork=null),Wu(e),hc(e,n)))}function dc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Fu(t=Uu(),e,null)),null!==(e=Au(e,t))&&(Wu(e),hc(e,t))}function pc(e){null===Ou?Ou=[e]:Ou.push(e)}function mc(e,t,n){if(0<n.size){var l=e.pendingInteractionMap,a=l.get(t);null!=a?n.forEach(function(e){a.has(e)||e.__count++,a.add(e)}):(l.set(t,new Set(n)),n.forEach(function(e){e.__count++})),null!==(l=r.__subscriberRef.current)&&l.onWorkScheduled(n,1e3*t+e.interactionThreadID)}}function hc(e,t){mc(e,t,r.__interactionsRef.current)}function gc(e,t){var n=new Set;if(e.pendingInteractionMap.forEach(function(e,r){r>=t&&e.forEach(function(e){return n.add(e)})}),e.memoizedInteractions=n,0<n.size){var l=r.__subscriberRef.current;if(null!==l){e=1e3*t+e.interactionThreadID;try{l.onWorkStarted(n,e)}catch(a){ua(99,function(){throw a})}}}}function vc(e,t){var n=e.firstPendingTime;try{var l=r.__subscriberRef.current;null!==l&&0<e.memoizedInteractions.size&&l.onWorkStopped(e.memoizedInteractions,1e3*t+e.interactionThreadID)}catch(i){ua(99,function(){throw i})}finally{var a=e.pendingInteractionMap;a.forEach(function(e,t){t>n&&(a.delete(t),e.forEach(function(e){if(e.__count--,null!==l&&0===e.__count)try{l.onInteractionScheduledWorkCompleted(e)}catch(t){ua(99,function(){throw t})}}))})}}Xo=function(e,t,n){var r=t.expirationTime;if(null!==e){var a=t.pendingProps;if(e.memoizedProps!==a||zl.current)uo=!0;else{if(r<n){switch(uo=!1,t.tag){case 3:yo(t),io();break;case 5:if(ai(t),4&t.mode&&1!==n&&a.hidden)return pc(1),t.expirationTime=t.childExpirationTime=1,null;break;case 1:Ml(t.type)&&Ll(t);break;case 4:ri(t,t.stateNode.containerInfo);break;case 10:wa(t,t.memoizedProps.value);break;case 12:t.childExpirationTime>=n&&(t.effectTag|=4);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?xo(e,t,n):(Pl(oi,1&oi.current,t),null!==(t=_o(e,t,n))?t.sibling:null);Pl(oi,1&oi.current,t);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Po(e,t,n);t.effectTag|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null),Pl(oi,oi.current,t),!r)return null}return _o(e,t,n)}uo=!1}}else uo=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,a=Il(t,Nl.current),xa(t,n),a=Pi(null,t,r,e,a,n),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,_i(),Ml(r)){var i=!0;Ll(t)}else i=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null;var o=r.getDerivedStateFromProps;"function"==typeof o&&Ba(t,r,o,e),a.updater=Wa,t.stateNode=a,a._reactInternalFiber=t,Qa(t,r,e,n),t=vo(null,t,r,!0,i,n)}else t.tag=0,co(null,t,a,n),t=t.child;return t;case 16:if(a=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,X(a),1!==a._status)throw a._result;switch(a=a._result,t.type=a,i=t.tag=Sc(a),e=ha(a,e),i){case 0:t=ho(null,t,a,e,n);break;case 1:t=go(null,t,a,e,n);break;case 11:t=so(null,t,a,e,n);break;case 14:t=fo(null,t,a,ha(a.type,e),r,n);break;default:throw Error(l(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,ho(e,t,r,a=t.elementType===r?a:ha(r,a),n);case 1:return r=t.type,a=t.pendingProps,go(e,t,r,a=t.elementType===r?a:ha(r,a),n);case 3:if(yo(t),null===(r=t.updateQueue))throw Error(l(282));if(a=null!==(a=t.memoizedState)?a.element:null,Ra(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===a)io(),t=_o(e,t,n);else{if((a=t.stateNode.hydrate)&&(Ji=hr(t.stateNode.containerInfo.firstChild),Zi=t,a=eo=!0),a)for(n=Ga(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else co(e,t,r,n),io();t=t.child}return t;case 5:return ai(t),null===e&&ro(t),r=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,o=a.children,dr(r,a)?o=null:null!==i&&dr(r,i)&&(t.effectTag|=16),mo(e,t),4&t.mode&&1!==n&&a.hidden?(pc(1),t.expirationTime=t.childExpirationTime=1,t=null):(co(e,t,o,n),t=t.child),t;case 6:return null===e&&ro(t),null;case 13:return xo(e,t,n);case 4:return ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xa(t,null,r,n):co(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,so(e,t,r,a=t.elementType===r?a:ha(r,a),n);case 7:return co(e,t,t.pendingProps,n),t.child;case 8:return co(e,t,t.pendingProps.children,n),t.child;case 12:return t.effectTag|=4,co(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,wa(t,i=a.value),null!==o){var u=o.value;if(0===(i=dl(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(o.children===a.children&&!zl.current){t=_o(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){o=u.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!=(s.observedBits&i)){1===u.tag&&((s=Na(n,null)).tag=2,Da(u,s)),u.expirationTime<n&&(u.expirationTime=n),null!==(s=u.alternate)&&s.expirationTime<n&&(s.expirationTime=n),Ta(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}s=s.next}}else o=10===u.tag&&u.type===t.type?null:u.child;if(null!==o)o.return=u;else for(o=u;null!==o;){if(o===t){o=null;break}if(null!==(u=o.sibling)){u.return=o.return,o=u;break}o=o.return}u=o}}co(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(i=t.pendingProps).children,xa(t,n),r=r(a=Sa(a,i.unstable_observedBits)),t.effectTag|=1,co(e,t,r,n),t.child;case 14:return i=ha(a=t.type,t.pendingProps),fo(e,t,a,i=ha(a.type,i),r,n);case 15:return po(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ha(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,Ml(r)?(e=!0,Ll(t)):e=!1,xa(t,n),ja(t,r,a,n),Qa(t,r,a,n),vo(null,t,r,!0,e,n);case 19:return Po(e,t,n)}throw Error(l(156,t.tag))};var yc=null,bc=null,kc="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;function wc(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);yc=function(e,r){try{var l=64==(64&e.current.effectTag),a=ma(1073741821-(la()/10|0),r);t.onCommitFiberRoot(n,e,a,l)}catch(i){}},bc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}return!0}function Ec(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null,this.treeBaseDuration=this.selfBaseDuration=this.actualStartTime=this.actualDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.treeBaseDuration=this.selfBaseDuration=0}function Tc(e,t,n,r){return new Ec(e,t,n,r)}function xc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Sc(e){if("function"==typeof e)return xc(e)?1:0;if(null!=e){if((e=e.$$typeof)===j)return 11;if(e===K)return 14}return 2}function Cc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null,n.actualDuration=0,n.actualStartTime=-1),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n}function Pc(e,t,n,r,a,i){var o=2;if(r=e,"function"==typeof e)xc(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case F:return _c(n.children,a,i,t);case V:o=8,a|=7;break;case L:o=8,a|=1;break;case A:return(e=Tc(12,n,t,8|a)).elementType=A,e.type=A,e.expirationTime=i,e;case H:return(e=Tc(13,n,t,a)).type=H,e.elementType=H,e.expirationTime=i,e;case Q:return(e=Tc(19,n,t,a)).elementType=Q,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case B:o=10;break e;case W:o=9;break e;case j:o=11;break e;case K:o=14;break e;case $:o=16,r=null;break e}throw Error(l(130,null==e?e:typeof e,""))}return(t=Tc(o,n,t,a)).elementType=e,t.type=r,t.expirationTime=i,t}function _c(e,t,n,r){return(e=Tc(7,e,r,t)).expirationTime=n,e}function Nc(e,t,n){return(e=Tc(6,e,null,t)).expirationTime=n,e}function zc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dc(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0,this.interactionThreadID=r.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map}function Ic(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Mc(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Oc(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Rc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Uc(e,t,n,r){var a=t.current,i=Uu(),o=La.suspense;i=Fu(i,a,o);e:if(n){t:{if(at(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(l(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(Ml(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(l(171))}if(1===n.tag){var c=n.type;if(Ml(c)){n=Fl(n,c,u);break e}}n=u}else n=_l;return null===t.context?t.context=n:t.pendingContext=n,(t=Na(i,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),Da(a,t),Lu(a,i),i}function Fc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Lc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Ac(e,t){Lc(e,t),(e=e.alternate)&&Lc(e,t)}function Bc(e,t,n){var r=new Dc(e,t,n=null!=n&&!0===n.hydrate),l=2===t?7:1===t?3:0;kc&&(l|=8),l=Tc(3,null,null,l),r.current=l,l.stateNode=r,e[kr]=r.current,n&&0!==t&&Tt(9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Wc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Vc(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Bc(e,0,t?{hydrate:!0}:void 0)}function jc(e,t,n,r,l){var a=n._reactRootContainer;if(a){var i=a._internalRoot;if("function"==typeof l){var o=l;l=function(){var e=Fc(i);o.call(e)}}Uc(t,i,e,l)}else{if(a=n._reactRootContainer=Vc(n,r),i=a._internalRoot,"function"==typeof l){var u=l;l=function(){var e=Fc(i);u.call(e)}}Ku(function(){Uc(t,i,e,l)})}return Fc(i)}function Hc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:U,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Qc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wc(t))throw Error(l(200));return Hc(e,t,null,n)}Bc.prototype.render=function(e,t){Uc(e,this._internalRoot,null,void 0===t?null:t)},Bc.prototype.unmount=function(e){var t=this._internalRoot,n=void 0===e?null:e,r=t.containerInfo;Uc(null,t,null,function(){r[kr]=null,null!==n&&n()})},st=function(e){if(13===e.tag){var t=pa(Uu(),150,100);Lu(e,t),Ac(e,t)}},ft=function(e){if(13===e.tag){Uu();var t=da++;Lu(e,t),Ac(e,t)}},dt=function(e){if(13===e.tag){var t=Uu();Lu(e,t=Fu(t,e,null)),Ac(e,t)}},ee=function(e,t,n){switch(t){case"input":if(Me(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=xr(r);if(!a)throw Error(l(90));Ne(r),Me(r,a)}}}break;case"textarea":We(e,n);break;case"select":null!=(t=n.value)&&Le(e,!!n.multiple,t,!1)}},ie=Qu,oe=function(e,t,n,r){var l=su;su|=4;try{return oa(98,e.bind(null,t,n,r))}finally{(su=l)===eu&&sa()}},ue=function(){(su&(1|nu|ru))===eu&&(Hu(),oc())},ce=function(e,t){var n=su;su|=2;try{return e(t)}finally{(su=n)===eu&&sa()}};var Kc={createPortal:Qc,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(l(188));throw Error(l(268,Object.keys(e)))}return e=null===(e=ct(t))?null:e.stateNode},hydrate:function(e,t,n){if(!Wc(t))throw Error(l(200));return jc(null,e,t,!0,n)},render:function(e,t,n){if(!Wc(t))throw Error(l(200));return jc(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){if(!Wc(n))throw Error(l(200));if(null==e||void 0===e._reactInternalFiber)throw Error(l(38));return jc(e,t,n,!1,r)},unmountComponentAtNode:function(e){if(!Wc(e))throw Error(l(40));return!!e._reactRootContainer&&(Ku(function(){jc(null,null,e,!1,function(){e._reactRootContainer=null,e[kr]=null})}),!0)},unstable_createPortal:function(){return Qc.apply(void 0,arguments)},unstable_batchedUpdates:Qu,flushSync:function(e,t){if((su&(nu|ru))!==eu)throw Error(l(187));var n=su;su|=1;try{return oa(99,e.bind(null,t))}finally{su=n,sa()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[Er,Tr,xr,z.injectEventPluginsByName,s,Bt,function(e){C(e,At)},le,ae,Ln,N,oc,{current:!1}]}};!function(e){var n=e.findFiberByHostInstance;wc(t({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ct(e))?null:e.stateNode},findFiberByHostInstance:function(e){return n?n(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:wr,bundleType:0,version:"16.12.0",rendererPackageName:"react-dom"});var $c={default:Kc},qc=$c&&Kc||$c;module.exports=qc.default||qc;
},{"react":"n8MK","object-assign":"YOwE","scheduler":"MDSO","scheduler/tracing":"Ks3F"}],"wLSN":[function(require,module,exports) {
"use strict";function _(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(O){console.error(O)}}}_(),module.exports=require("./cjs/react-dom.profiling.min.js");
},{"./cjs/react-dom.profiling.min.js":"NgRO"}],"dKqR":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AmbientLight=jd,exports.AmbientLightProbe=mf,exports.AnimationClip=kp,exports.AnimationLoader=Kp,exports.AnimationMixer=Xf,exports.AnimationObjectGroup=Wf,exports.ArcCurve=od,exports.ArrayCamera=Xl,exports.ArrowHelper=Fm,exports.Audio=Tf,exports.AudioAnalyser=Pf,exports.AudioListener=Sf,exports.AudioLoader=uf,exports.AxesHelper=Bm,exports.AxisHelper=qv,exports.BinaryTextureLoader=Qv,exports.Bone=Th,exports.BooleanKeyframeTrack=Fp,exports.BoundingBoxHelper=Xv,exports.Box2=rm,exports.Box3=_n,exports.Box3Helper=Pm,exports.BoxHelper=Cm,exports.BufferAttribute=oi,exports.BufferGeometry=Ti,exports.BufferGeometryLoader=Jd,exports.Camera=aa,exports.CameraHelper=Am,exports.CanvasRenderer=eg,exports.CanvasTexture=Qh,exports.CatmullRomCurve3=pd,exports.CircleBufferGeometry=gp,exports.CircleGeometry=vp,exports.Clock=xf,exports.ClosedSplineCurve3=kv,exports.Color=Qn,exports.ColorKeyframeTrack=Bp,exports.CompressedTexture=Jh,exports.CompressedTextureLoader=$p,exports.ConeBufferGeometry=mp,exports.ConeGeometry=fp,exports.CubeCamera=la,exports.CubeTexture=$s,exports.CubeTextureLoader=rd,exports.CubicBezierCurve=Md,exports.CubicBezierCurve3=Sd,exports.CubicInterpolant=Op,exports.Curve=id,exports.CurvePath=Pd,exports.CylinderBufferGeometry=dp,exports.CylinderGeometry=pp,exports.Cylindrical=em,exports.DataTexture=ua,exports.DataTexture2DArray=ec,exports.DataTexture3D=tc,exports.DataTextureLoader=ed,exports.DepthTexture=Kh,exports.DirectionalLight=kd,exports.DirectionalLightHelper=Sm,exports.DirectionalLightShadow=Vd,exports.DiscreteInterpolant=Ip,exports.DodecahedronBufferGeometry=uu,exports.DodecahedronGeometry=hu,exports.DynamicBufferAttribute=Dv,exports.EdgesGeometry=up,exports.EdgesHelper=Yv,exports.EllipseCurve=ad,exports.Euler=jr,exports.EventDispatcher=gr,exports.ExtrudeBufferGeometry=Qu,exports.ExtrudeGeometry=Ju,exports.Face3=ti,exports.Face4=_v,exports.FileLoader=Qp,exports.Float32Attribute=Hv,exports.Float32BufferAttribute=fi,exports.Float64Attribute=Vv,exports.Float64BufferAttribute=mi,exports.Fog=Kl,exports.FogExp2=Ql,exports.Font=of,exports.FontLoader=lf,exports.Frustum=fa,exports.Geometry=Ji,exports.GridHelper=xm,exports.Group=Yl,exports.HemisphereLight=Nd,exports.HemisphereLightHelper=ym,exports.HemisphereLightProbe=ff,exports.IcosahedronBufferGeometry=lu,exports.IcosahedronGeometry=cu,exports.ImageBitmapLoader=nf,exports.ImageLoader=td,exports.ImmediateRenderObject=om,exports.InstancedBufferAttribute=Zd,exports.InstancedBufferGeometry=Yd,exports.InstancedInterleavedBuffer=Zf,exports.InstancedMesh=Ch,exports.Int16Attribute=Bv,exports.Int16BufferAttribute=hi,exports.Int32Attribute=Uv,exports.Int32BufferAttribute=pi,exports.Int8Attribute=Iv,exports.Int8BufferAttribute=si,exports.InterleavedBuffer=$l,exports.InterleavedBufferAttribute=rh,exports.Interpolant=Pp,exports.JSONLoader=tg,exports.KeyframeTrack=Np,exports.LOD=bh,exports.LatheBufferGeometry=sp,exports.LatheGeometry=op,exports.Layers=Wr,exports.LensFlare=ng,exports.Light=Id,exports.LightProbe=df,exports.LightShadow=Fd,exports.Line=Bh,exports.Line3=am,exports.LineBasicMaterial=Ph,exports.LineCurve=Td,exports.LineCurve3=Ed,exports.LineDashedMaterial=Lp,exports.LineLoop=Hh,exports.LineSegments=Gh,exports.LinearInterpolant=Dp,exports.Loader=Zp,exports.LoadingManager=Xp,exports.Material=ni,exports.MaterialLoader=qd,exports.Matrix3=Mr,exports.Matrix4=Hr,exports.Mesh=ki,exports.MeshBasicMaterial=ii,exports.MeshDepthMaterial=Bl,exports.MeshDistanceMaterial=zl,exports.MeshFaceMaterial=Sv,exports.MeshLambertMaterial=Ep,exports.MeshMatcapMaterial=Ap,exports.MeshNormalMaterial=Tp,exports.MeshPhongMaterial=Mp,exports.MeshPhysicalMaterial=wp,exports.MeshStandardMaterial=_p,exports.MeshToonMaterial=Sp,exports.MultiMaterial=Tv,exports.NumberKeyframeTrack=zp,exports.Object3D=on,exports.ObjectLoader=Kd,exports.OctahedronBufferGeometry=su,exports.OctahedronGeometry=ou,exports.OrthographicCamera=Hd,exports.PMREMGenerator=iv,exports.ParametricBufferGeometry=tu,exports.ParametricGeometry=eu,exports.Particle=Av,exports.ParticleBasicMaterial=Cv,exports.ParticleSystem=Lv,exports.ParticleSystemMaterial=Pv,exports.Path=Od,exports.PerspectiveCamera=oa,exports.Plane=Fn,exports.PlaneBufferGeometry=xa,exports.PlaneGeometry=ya,exports.PlaneHelper=Om,exports.PointCloud=Ev,exports.PointCloudMaterial=Rv,exports.PointLight=Gd,exports.PointLightHelper=fm,exports.Points=Xh,exports.PointsMaterial=Vh,exports.PolarGridHelper=bm,exports.PolyhedronBufferGeometry=nu,exports.PolyhedronGeometry=ru,exports.PositionalAudio=Cf,exports.PropertyBinding=jf,exports.PropertyMixer=Of,exports.QuadraticBezierCurve=Ad,exports.QuadraticBezierCurve3=Ld,exports.Quaternion=Cr,exports.QuaternionKeyframeTrack=Gp,exports.QuaternionLinearInterpolant=Up,exports.RawShaderMaterial=bp,exports.Ray=On,exports.Raycaster=Jf,exports.RectAreaLight=Wd,exports.RingBufferGeometry=ap,exports.RingGeometry=ip,exports.Scene=sn,exports.ShaderMaterial=ia,exports.ShadowMaterial=xp,exports.Shape=Dd,exports.ShapeBufferGeometry=lp,exports.ShapeGeometry=cp,exports.ShapePath=af,exports.Skeleton=Sh,exports.SkeletonHelper=dm,exports.SkinnedMesh=_h,exports.Sphere=Sn,exports.SphereBufferGeometry=np,exports.SphereGeometry=rp,exports.Spherical=$f,exports.SphericalHarmonics3=pf,exports.Spline=Wv,exports.SplineCurve=Rd,exports.SplineCurve3=jv,exports.SpotLight=zd,exports.SpotLightHelper=cm,exports.SpotLightShadow=Bd,exports.Sprite=vh,exports.SpriteMaterial=nh,exports.StereoCamera=yf,exports.StringKeyframeTrack=Hp,exports.TetrahedronBufferGeometry=au,exports.TetrahedronGeometry=iu,exports.TextBufferGeometry=tp,exports.TextGeometry=ep,exports.Texture=Er,exports.TextureLoader=nd,exports.TorusBufferGeometry=gu,exports.TorusGeometry=vu,exports.TorusKnotBufferGeometry=mu,exports.TorusKnotGeometry=fu,exports.Triangle=Xn,exports.TubeBufferGeometry=du,exports.TubeGeometry=pu,exports.Uint16Attribute=zv,exports.Uint16BufferAttribute=ui,exports.Uint32Attribute=Gv,exports.Uint32BufferAttribute=di,exports.Uint8Attribute=Nv,exports.Uint8BufferAttribute=ci,exports.Uint8ClampedAttribute=Fv,exports.Uint8ClampedBufferAttribute=li,exports.Uniform=Yf,exports.Vector2=wr,exports.Vector3=Dr,exports.Vector4=Ar,exports.VectorKeyframeTrack=Vp,exports.Vertex=Ov,exports.VideoTexture=Zh,exports.WebGLCubeRenderTarget=ha,exports.WebGLMultisampleRenderTarget=Rr,exports.WebGLRenderTarget=Lr,exports.WebGLRenderTargetCube=Kv,exports.WebGLRenderer=Jl,exports.WebGLUtils=jl,exports.WireframeGeometry=$h,exports.WireframeHelper=Zv,exports.XHRLoader=Jv,exports.NeverDepth=exports.NearestMipmapNearestFilter=exports.NearestMipmapLinearFilter=exports.NearestMipMapNearestFilter=exports.NearestMipMapLinearFilter=exports.NearestFilter=exports.MultiplyOperation=exports.MultiplyBlending=exports.MixOperation=exports.MirroredRepeatWrapping=exports.MinEquation=exports.MaxEquation=exports.MathUtils=exports.Math=exports.MOUSE=exports.LuminanceFormat=exports.LuminanceAlphaFormat=exports.LoopRepeat=exports.LoopPingPong=exports.LoopOnce=exports.LogLuvEncoding=exports.LoaderUtils=exports.LinearToneMapping=exports.LinearMipmapNearestFilter=exports.LinearMipmapLinearFilter=exports.LinearMipMapNearestFilter=exports.LinearMipMapLinearFilter=exports.LinearFilter=exports.LinearEncoding=exports.LineStrip=exports.LinePieces=exports.LessStencilFunc=exports.LessEqualStencilFunc=exports.LessEqualDepth=exports.LessDepth=exports.KeepStencilOp=exports.InvertStencilOp=exports.InterpolateSmooth=exports.InterpolateLinear=exports.InterpolateDiscrete=exports.IntType=exports.IncrementWrapStencilOp=exports.IncrementStencilOp=exports.ImageUtils=exports.HalfFloatType=exports.GreaterStencilFunc=exports.GreaterEqualStencilFunc=exports.GreaterEqualDepth=exports.GreaterDepth=exports.GeometryUtils=exports.GammaEncoding=exports.FrontSide=exports.FrontFaceDirectionCW=exports.FrontFaceDirectionCCW=exports.FloatType=exports.FlatShading=exports.FaceColors=exports.EquirectangularRefractionMapping=exports.EquirectangularReflectionMapping=exports.EqualStencilFunc=exports.EqualDepth=exports.DynamicReadUsage=exports.DynamicDrawUsage=exports.DynamicCopyUsage=exports.DstColorFactor=exports.DstAlphaFactor=exports.DoubleSide=exports.DepthStencilFormat=exports.DepthFormat=exports.DefaultLoadingManager=exports.DecrementWrapStencilOp=exports.DecrementStencilOp=exports.CustomBlending=exports.CullFaceNone=exports.CullFaceFrontBack=exports.CullFaceFront=exports.CullFaceBack=exports.CubeUVRefractionMapping=exports.CubeUVReflectionMapping=exports.CubeRefractionMapping=exports.CubeReflectionMapping=exports.ClampToEdgeWrapping=exports.CineonToneMapping=exports.Cache=exports.ByteType=exports.CubeGeometry=exports.BoxGeometry=exports.BoxBufferGeometry=exports.BasicShadowMap=exports.BasicDepthPacking=exports.BackSide=exports.AudioContext=exports.AnimationUtils=exports.AlwaysStencilFunc=exports.AlwaysDepth=exports.AlphaFormat=exports.AdditiveBlending=exports.AddOperation=exports.AddEquation=exports.ACESFilmicToneMapping=void 0,exports.sRGBEncoding=exports.ZeroStencilOp=exports.ZeroSlopeEnding=exports.ZeroFactor=exports.ZeroCurvatureEnding=exports.WrapAroundEnding=exports.VertexColors=exports.VSMShadowMap=exports.UnsignedShortType=exports.UnsignedShort565Type=exports.UnsignedShort5551Type=exports.UnsignedShort4444Type=exports.UnsignedIntType=exports.UnsignedInt248Type=exports.UnsignedByteType=exports.UniformsUtils=exports.UniformsLib=exports.Uncharted2ToneMapping=exports.UVMapping=exports.TrianglesDrawMode=exports.TriangleStripDrawMode=exports.TriangleFanDrawMode=exports.TangentSpaceNormalMap=exports.TOUCH=exports.SubtractiveBlending=exports.SubtractEquation=exports.StreamReadUsage=exports.StreamDrawUsage=exports.StreamCopyUsage=exports.StaticReadUsage=exports.StaticDrawUsage=exports.StaticCopyUsage=exports.SrcColorFactor=exports.SrcAlphaSaturateFactor=exports.SrcAlphaFactor=exports.SphericalReflectionMapping=exports.SmoothShading=exports.ShortType=exports.ShapeUtils=exports.ShaderLib=exports.ShaderChunk=exports.SceneUtils=exports.ReverseSubtractEquation=exports.ReplaceStencilOp=exports.RepeatWrapping=exports.ReinhardToneMapping=exports.RedIntegerFormat=exports.RedFormat=exports.RGIntegerFormat=exports.RGFormat=exports.RGB_S3TC_DXT1_Format=exports.RGB_PVRTC_4BPPV1_Format=exports.RGB_PVRTC_2BPPV1_Format=exports.RGB_ETC1_Format=exports.RGBM7Encoding=exports.RGBM16Encoding=exports.RGBIntegerFormat=exports.RGBFormat=exports.RGBEFormat=exports.RGBEEncoding=exports.RGBDEncoding=exports.RGBA_S3TC_DXT5_Format=exports.RGBA_S3TC_DXT3_Format=exports.RGBA_S3TC_DXT1_Format=exports.RGBA_PVRTC_4BPPV1_Format=exports.RGBA_PVRTC_2BPPV1_Format=exports.RGBA_ASTC_8x8_Format=exports.RGBA_ASTC_8x6_Format=exports.RGBA_ASTC_8x5_Format=exports.RGBA_ASTC_6x6_Format=exports.RGBA_ASTC_6x5_Format=exports.RGBA_ASTC_5x5_Format=exports.RGBA_ASTC_5x4_Format=exports.RGBA_ASTC_4x4_Format=exports.RGBA_ASTC_12x12_Format=exports.RGBA_ASTC_12x10_Format=exports.RGBA_ASTC_10x8_Format=exports.RGBA_ASTC_10x6_Format=exports.RGBA_ASTC_10x5_Format=exports.RGBA_ASTC_10x10_Format=exports.RGBAIntegerFormat=exports.RGBAFormat=exports.RGBADepthPacking=exports.REVISION=exports.PCFSoftShadowMap=exports.PCFShadowMap=exports.OneMinusSrcColorFactor=exports.OneMinusSrcAlphaFactor=exports.OneMinusDstColorFactor=exports.OneMinusDstAlphaFactor=exports.OneFactor=exports.ObjectSpaceNormalMap=exports.NotEqualStencilFunc=exports.NotEqualDepth=exports.NormalBlending=exports.NoToneMapping=exports.NoColors=exports.NoBlending=exports.NeverStencilFunc=void 0,void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t});var e="113";exports.REVISION=e;var t={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};exports.MOUSE=t;var r={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};exports.TOUCH=r;var n=0;exports.CullFaceNone=n;var i=1;exports.CullFaceBack=i;var a=2;exports.CullFaceFront=a;var o=3;exports.CullFaceFrontBack=o;var s=0;exports.FrontFaceDirectionCW=s;var c=1;exports.FrontFaceDirectionCCW=c;var l=0;exports.BasicShadowMap=l;var h=1;exports.PCFShadowMap=h;var u=2;exports.PCFSoftShadowMap=u;var p=3;exports.VSMShadowMap=p;var d=0;exports.FrontSide=d;var f=1;exports.BackSide=f;var m=2;exports.DoubleSide=m;var v=1;exports.FlatShading=v;var g=2;exports.SmoothShading=g;var y=0;exports.NoColors=y;var x=1;exports.FaceColors=x;var b=2;exports.VertexColors=b;var _=0;exports.NoBlending=_;var w=1;exports.NormalBlending=w;var M=2;exports.AdditiveBlending=M;var S=3;exports.SubtractiveBlending=S;var T=4;exports.MultiplyBlending=T;var E=5;exports.CustomBlending=E;var A=100;exports.AddEquation=A;var L=101;exports.SubtractEquation=L;var R=102;exports.ReverseSubtractEquation=R;var C=103;exports.MinEquation=C;var P=104;exports.MaxEquation=P;var O=200;exports.ZeroFactor=O;var D=201;exports.OneFactor=D;var I=202;exports.SrcColorFactor=I;var N=203;exports.OneMinusSrcColorFactor=N;var F=204;exports.SrcAlphaFactor=F;var B=205;exports.OneMinusSrcAlphaFactor=B;var z=206;exports.DstAlphaFactor=z;var U=207;exports.OneMinusDstAlphaFactor=U;var G=208;exports.DstColorFactor=G;var H=209;exports.OneMinusDstColorFactor=H;var V=210;exports.SrcAlphaSaturateFactor=V;var k=0;exports.NeverDepth=k;var j=1;exports.AlwaysDepth=j;var W=2;exports.LessDepth=W;var q=3;exports.LessEqualDepth=q;var X=4;exports.EqualDepth=X;var Y=5;exports.GreaterEqualDepth=Y;var Z=6;exports.GreaterDepth=Z;var J=7;exports.NotEqualDepth=J;var Q=0;exports.MultiplyOperation=Q;var K=1;exports.MixOperation=K;var $=2;exports.AddOperation=$;var ee=0;exports.NoToneMapping=ee;var te=1;exports.LinearToneMapping=te;var re=2;exports.ReinhardToneMapping=re;var ne=3;exports.Uncharted2ToneMapping=ne;var ie=4;exports.CineonToneMapping=ie;var ae=5;exports.ACESFilmicToneMapping=ae;var oe=300;exports.UVMapping=oe;var se=301;exports.CubeReflectionMapping=se;var ce=302;exports.CubeRefractionMapping=ce;var le=303;exports.EquirectangularReflectionMapping=le;var he=304;exports.EquirectangularRefractionMapping=he;var ue=305;exports.SphericalReflectionMapping=ue;var pe=306;exports.CubeUVReflectionMapping=pe;var de=307;exports.CubeUVRefractionMapping=de;var fe=1e3;exports.RepeatWrapping=fe;var me=1001;exports.ClampToEdgeWrapping=me;var ve=1002;exports.MirroredRepeatWrapping=ve;var ge=1003;exports.NearestFilter=ge;var ye=1004;exports.NearestMipmapNearestFilter=ye;var xe=1004;exports.NearestMipMapNearestFilter=xe;var be=1005;exports.NearestMipmapLinearFilter=be;var _e=1005;exports.NearestMipMapLinearFilter=_e;var we=1006;exports.LinearFilter=we;var Me=1007;exports.LinearMipmapNearestFilter=Me;var Se=1007;exports.LinearMipMapNearestFilter=Se;var Te=1008;exports.LinearMipmapLinearFilter=Te;var Ee=1008;exports.LinearMipMapLinearFilter=Ee;var Ae=1009;exports.UnsignedByteType=Ae;var Le=1010;exports.ByteType=Le;var Re=1011;exports.ShortType=Re;var Ce=1012;exports.UnsignedShortType=Ce;var Pe=1013;exports.IntType=Pe;var Oe=1014;exports.UnsignedIntType=Oe;var De=1015;exports.FloatType=De;var Ie=1016;exports.HalfFloatType=Ie;var Ne=1017;exports.UnsignedShort4444Type=Ne;var Fe=1018;exports.UnsignedShort5551Type=Fe;var Be=1019;exports.UnsignedShort565Type=Be;var ze=1020;exports.UnsignedInt248Type=ze;var Ue=1021;exports.AlphaFormat=Ue;var Ge=1022;exports.RGBFormat=Ge;var He=1023;exports.RGBAFormat=He;var Ve=1024;exports.LuminanceFormat=Ve;var ke=1025;exports.LuminanceAlphaFormat=ke;var je=He;exports.RGBEFormat=je;var We=1026;exports.DepthFormat=We;var qe=1027;exports.DepthStencilFormat=qe;var Xe=1028;exports.RedFormat=Xe;var Ye=1029;exports.RedIntegerFormat=Ye;var Ze=1030;exports.RGFormat=Ze;var Je=1031;exports.RGIntegerFormat=Je;var Qe=1032;exports.RGBIntegerFormat=Qe;var Ke=1033;exports.RGBAIntegerFormat=Ke;var $e=33776;exports.RGB_S3TC_DXT1_Format=$e;var et=33777;exports.RGBA_S3TC_DXT1_Format=et;var tt=33778;exports.RGBA_S3TC_DXT3_Format=tt;var rt=33779;exports.RGBA_S3TC_DXT5_Format=rt;var nt=35840;exports.RGB_PVRTC_4BPPV1_Format=nt;var it=35841;exports.RGB_PVRTC_2BPPV1_Format=it;var at=35842;exports.RGBA_PVRTC_4BPPV1_Format=at;var ot=35843;exports.RGBA_PVRTC_2BPPV1_Format=ot;var st=36196;exports.RGB_ETC1_Format=st;var ct=37808;exports.RGBA_ASTC_4x4_Format=ct;var lt=37809;exports.RGBA_ASTC_5x4_Format=lt;var ht=37810;exports.RGBA_ASTC_5x5_Format=ht;var ut=37811;exports.RGBA_ASTC_6x5_Format=ut;var pt=37812;exports.RGBA_ASTC_6x6_Format=pt;var dt=37813;exports.RGBA_ASTC_8x5_Format=dt;var ft=37814;exports.RGBA_ASTC_8x6_Format=ft;var mt=37815;exports.RGBA_ASTC_8x8_Format=mt;var vt=37816;exports.RGBA_ASTC_10x5_Format=vt;var gt=37817;exports.RGBA_ASTC_10x6_Format=gt;var yt=37818;exports.RGBA_ASTC_10x8_Format=yt;var xt=37819;exports.RGBA_ASTC_10x10_Format=xt;var bt=37820;exports.RGBA_ASTC_12x10_Format=bt;var _t=37821;exports.RGBA_ASTC_12x12_Format=_t;var wt=2200;exports.LoopOnce=wt;var Mt=2201;exports.LoopRepeat=Mt;var St=2202;exports.LoopPingPong=St;var Tt=2300;exports.InterpolateDiscrete=Tt;var Et=2301;exports.InterpolateLinear=Et;var At=2302;exports.InterpolateSmooth=At;var Lt=2400;exports.ZeroCurvatureEnding=Lt;var Rt=2401;exports.ZeroSlopeEnding=Rt;var Ct=2402;exports.WrapAroundEnding=Ct;var Pt=0;exports.TrianglesDrawMode=Pt;var Ot=1;exports.TriangleStripDrawMode=Ot;var Dt=2;exports.TriangleFanDrawMode=Dt;var It=3e3;exports.LinearEncoding=It;var Nt=3001;exports.sRGBEncoding=Nt;var Ft=3007;exports.GammaEncoding=Ft;var Bt=3002;exports.RGBEEncoding=Bt;var zt=3003;exports.LogLuvEncoding=zt;var Ut=3004;exports.RGBM7Encoding=Ut;var Gt=3005;exports.RGBM16Encoding=Gt;var Ht=3006;exports.RGBDEncoding=Ht;var Vt=3200;exports.BasicDepthPacking=Vt;var kt=3201;exports.RGBADepthPacking=kt;var jt=0;exports.TangentSpaceNormalMap=jt;var Wt=1;exports.ObjectSpaceNormalMap=Wt;var qt=0;exports.ZeroStencilOp=qt;var Xt=7680;exports.KeepStencilOp=Xt;var Yt=7681;exports.ReplaceStencilOp=Yt;var Zt=7682;exports.IncrementStencilOp=Zt;var Jt=7683;exports.DecrementStencilOp=Jt;var Qt=34055;exports.IncrementWrapStencilOp=Qt;var Kt=34056;exports.DecrementWrapStencilOp=Kt;var $t=5386;exports.InvertStencilOp=$t;var er=512;exports.NeverStencilFunc=er;var tr=513;exports.LessStencilFunc=tr;var rr=514;exports.EqualStencilFunc=rr;var nr=515;exports.LessEqualStencilFunc=nr;var ir=516;exports.GreaterStencilFunc=ir;var ar=517;exports.NotEqualStencilFunc=ar;var or=518;exports.GreaterEqualStencilFunc=or;var sr=519;exports.AlwaysStencilFunc=sr;var cr=35044;exports.StaticDrawUsage=cr;var lr=35048;exports.DynamicDrawUsage=lr;var hr=35040;exports.StreamDrawUsage=hr;var ur=35045;exports.StaticReadUsage=ur;var pr=35049;exports.DynamicReadUsage=pr;var dr=35041;exports.StreamReadUsage=dr;var fr=35046;exports.StaticCopyUsage=fr;var mr=35050;exports.DynamicCopyUsage=mr;var vr=35042;function gr(){}exports.StreamCopyUsage=vr,Object.assign(gr.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var r=this._listeners[e];if(void 0!==r){var n=r.indexOf(t);-1!==n&&r.splice(n,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var r=t.slice(0),n=0,i=r.length;n<i;n++)r[n].call(this,e)}}}});for(var yr=[],xr=0;xr<256;xr++)yr[xr]=(xr<16?"0":"")+xr.toString(16);var br,_r={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,r=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(yr[255&e]+yr[e>>8&255]+yr[e>>16&255]+yr[e>>24&255]+"-"+yr[255&t]+yr[t>>8&255]+"-"+yr[t>>16&15|64]+yr[t>>24&255]+"-"+yr[63&r|128]+yr[r>>8&255]+"-"+yr[r>>16&255]+yr[r>>24&255]+yr[255&n]+yr[n>>8&255]+yr[n>>16&255]+yr[n>>24&255]).toUpperCase()},clamp:function(e,t,r){return Math.max(t,Math.min(r,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)},lerp:function(e,t,r){return(1-r)*e+r*t},smoothstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t))*e*(3-2*e)},smootherstep:function(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-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())},degToRad:function(e){return e*_r.DEG2RAD},radToDeg:function(e){return e*_r.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,r,n,i){var a=Math.cos,o=Math.sin,s=a(r/2),c=o(r/2),l=a((t+n)/2),h=o((t+n)/2),u=a((t-n)/2),p=o((t-n)/2),d=a((n-t)/2),f=o((n-t)/2);"XYX"===i?e.set(s*h,c*u,c*p,s*l):"YZY"===i?e.set(c*p,s*h,c*u,s*l):"ZXZ"===i?e.set(c*u,c*p,s*h,s*l):"XZX"===i?e.set(s*h,c*f,c*d,s*l):"YXY"===i?e.set(c*d,s*h,c*f,s*l):"ZYZ"===i?e.set(c*f,c*d,s*h,s*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}};function wr(e,t){this.x=e||0,this.y=t||0}function Mr(){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.")}exports.MathUtils=exports.Math=_r,Object.defineProperties(wr.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(wr.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,r=this.y,n=e.elements;return this.x=n[0]*t+n[3]*r+n[6],this.y=n[1]*t+n[4]*r+n[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},clampLength:function(e,t){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,r=this.y-e.y;return t*t+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,r){return this.subVectors(t,e).multiplyScalar(r).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,r){return void 0!==r&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var r=Math.cos(t),n=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*r-a*n+e.x,this.y=i*n+a*r+e.y,this}}),Object.assign(Mr.prototype,{isMatrix3:!0,set:function(e,t,r,n,i,a,o,s,c){var l=this.elements;return l[0]=e,l[1]=n,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=r,l[7]=a,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var r=e.elements,n=t.elements,i=this.elements,a=r[0],o=r[3],s=r[6],c=r[1],l=r[4],h=r[7],u=r[2],p=r[5],d=r[8],f=n[0],m=n[3],v=n[6],g=n[1],y=n[4],x=n[7],b=n[2],_=n[5],w=n[8];return i[0]=a*f+o*g+s*b,i[3]=a*m+o*y+s*_,i[6]=a*v+o*x+s*w,i[1]=c*f+l*g+h*b,i[4]=c*m+l*y+h*_,i[7]=c*v+l*x+h*w,i[2]=u*f+p*g+d*b,i[5]=u*m+p*y+d*_,i[8]=u*v+p*x+d*w,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-r*i*l+r*o*s+n*i*c-n*a*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var r=e.elements,n=this.elements,i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],h=r[6],u=r[7],p=r[8],d=p*c-l*u,f=l*h-p*s,m=u*s-c*h,v=i*d+a*f+o*m;if(0===v){var g="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return n[0]=d*y,n[1]=(o*u-p*a)*y,n[2]=(l*a-o*c)*y,n[3]=f*y,n[4]=(p*i-o*h)*y,n[5]=(o*s-l*i)*y,n[6]=m*y,n[7]=(a*h-u*i)*y,n[8]=(c*i-a*s)*y,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,r,n,i,a,o){var s=Math.cos(i),c=Math.sin(i);this.set(r*s,r*c,-r*(s*a+c*o)+a+e,-n*c,n*s,-n*(-c*a+s*o)+o+t,0,0,1)},scale:function(e,t){var r=this.elements;return r[0]*=e,r[3]*=e,r[6]*=e,r[1]*=t,r[4]*=t,r[7]*=t,this},rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=this.elements,i=n[0],a=n[3],o=n[6],s=n[1],c=n[4],l=n[7];return n[0]=t*i+r*s,n[3]=t*a+r*c,n[6]=t*o+r*l,n[1]=-r*i+t*s,n[4]=-r*a+t*c,n[7]=-r*o+t*l,this},translate:function(e,t){var r=this.elements;return r[0]+=e*r[2],r[3]+=e*r[5],r[6]+=e*r[8],r[1]+=t*r[2],r[4]+=t*r[5],r[7]+=t*r[8],this},equals:function(e){for(var t=this.elements,r=e.elements,n=0;n<9;n++)if(t[n]!==r[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var r=0;r<9;r++)this.elements[r]=e[r+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e}});var Sr={getDataURL:function(e){var t;if("undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)t=e;else{void 0===br&&(br=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),br.width=e.width,br.height=e.height;var r=br.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),t=br}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}};exports.ImageUtils=Sr;var Tr=0;function Er(e,t,r,n,i,a,o,s,c,l){Object.defineProperty(this,"id",{value:Tr++}),this.uuid=_r.generateUUID(),this.name="",this.image=void 0!==e?e:Er.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Er.DEFAULT_MAPPING,this.wrapS=void 0!==r?r:me,this.wrapT=void 0!==n?n:me,this.magFilter=void 0!==i?i:we,this.minFilter=void 0!==a?a:Te,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:He,this.internalFormat=null,this.type=void 0!==s?s:Ae,this.offset=new wr(0,0),this.repeat=new wr(1,1),this.center=new wr(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Mr,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:It,this.version=0,this.onUpdate=null}function Ar(e,t,r,n){this.x=e||0,this.y=t||0,this.z=r||0,this.w=void 0!==n?n:1}function Lr(e,t,r){this.width=e,this.height=t,this.scissor=new Ar(0,0,e,t),this.scissorTest=!1,this.viewport=new Ar(0,0,e,t),r=r||{},this.texture=new Er(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,this.texture.minFilter=void 0!==r.minFilter?r.minFilter:we,this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0===r.stencilBuffer||r.stencilBuffer,this.depthTexture=void 0!==r.depthTexture?r.depthTexture:null}function Rr(e,t,r){Lr.call(this,e,t,r),this.samples=4}function Cr(e,t,r,n){this._x=e||0,this._y=t||0,this._z=r||0,this._w=void 0!==n?n:1}Er.DEFAULT_IMAGE=void 0,Er.DEFAULT_MAPPING=oe,Er.prototype=Object.assign(Object.create(gr.prototype),{constructor:Er,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var r={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var n=this.image;if(void 0===n.uuid&&(n.uuid=_r.generateUUID()),!t&&void 0===e.images[n.uuid]){var i;if(Array.isArray(n)){i=[];for(var a=0,o=n.length;a<o;a++)i.push(Sr.getDataURL(n[a]))}else i=Sr.getDataURL(n);e.images[n.uuid]={uuid:n.uuid,url:i}}r.image=n.uuid}return t||(e.textures[this.uuid]=r),r},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(this.mapping!==oe)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case fe:e.x=e.x-Math.floor(e.x);break;case me:e.x=e.x<0?0:1;break;case ve: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 fe:e.y=e.y-Math.floor(e.y);break;case me:e.y=e.y<0?0:1;break;case ve:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(Er.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.defineProperties(Ar.prototype,{width:{get:function(){return this.z},set:function(e){this.z=e}},height:{get:function(){return this.w},set:function(e){this.w=e}}}),Object.assign(Ar.prototype,{isVector4:!0,set:function(e,t,r,n){return this.x=e,this.y=t,this.z=r,this.w=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,r=this.y,n=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*r+a[8]*n+a[12]*i,this.y=a[1]*t+a[5]*r+a[9]*n+a[13]*i,this.z=a[2]*t+a[6]*r+a[10]*n+a[14]*i,this.w=a[3]*t+a[7]*r+a[11]*n+a[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,r,n,i,a=e.elements,o=a[0],s=a[4],c=a[8],l=a[1],h=a[5],u=a[9],p=a[2],d=a[6],f=a[10];if(Math.abs(s-l)<.01&&Math.abs(c-p)<.01&&Math.abs(u-d)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+p)<.1&&Math.abs(u+d)<.1&&Math.abs(o+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(o+1)/2,v=(h+1)/2,g=(f+1)/2,y=(s+l)/4,x=(c+p)/4,b=(u+d)/4;return m>v&&m>g?m<.01?(r=0,n=.707106781,i=.707106781):(n=y/(r=Math.sqrt(m)),i=x/r):v>g?v<.01?(r=.707106781,n=0,i=.707106781):(r=y/(n=Math.sqrt(v)),i=b/n):g<.01?(r=.707106781,n=.707106781,i=0):(r=x/(i=Math.sqrt(g)),n=b/i),this.set(r,n,i,t),this}var _=Math.sqrt((d-u)*(d-u)+(c-p)*(c-p)+(l-s)*(l-s));return Math.abs(_)<.001&&(_=1),this.x=(d-u)/_,this.y=(c-p)/_,this.z=(l-s)/_,this.w=Math.acos((o+h+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},clampLength:function(e,t){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,r){return this.subVectors(t,e).multiplyScalar(r).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,r){return void 0!==r&&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}}),Lr.prototype=Object.assign(Object.create(gr.prototype),{constructor:Lr,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Rr.prototype=Object.assign(Object.create(Lr.prototype),{constructor:Rr,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Lr.prototype.copy.call(this,e),this.samples=e.samples,this}}),Object.assign(Cr,{slerp:function(e,t,r,n){return r.copy(e).slerp(t,n)},slerpFlat:function(e,t,r,n,i,a,o){var s=r[n+0],c=r[n+1],l=r[n+2],h=r[n+3],u=i[a+0],p=i[a+1],d=i[a+2],f=i[a+3];if(h!==f||s!==u||c!==p||l!==d){var m=1-o,v=s*u+c*p+l*d+h*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),b=Math.atan2(x,v*g);m=Math.sin(m*b)/x,o=Math.sin(o*b)/x}var _=o*g;if(s=s*m+u*_,c=c*m+p*_,l=l*m+d*_,h=h*m+f*_,m===1-o){var w=1/Math.sqrt(s*s+c*c+l*l+h*h);s*=w,c*=w,l*=w,h*=w}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=h}}),Object.defineProperties(Cr.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),Object.assign(Cr.prototype,{isQuaternion:!0,set:function(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._w=n,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var r=e._x,n=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,c=o(r/2),l=o(n/2),h=o(i/2),u=s(r/2),p=s(n/2),d=s(i/2);return"XYZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"YXZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"ZXY"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"ZYX"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"YZX"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h-u*p*d):"XZY"===a&&(this._x=u*l*h-c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h+u*p*d),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var r=t/2,n=Math.sin(r);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(r),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,r=e.elements,n=r[0],i=r[4],a=r[8],o=r[1],s=r[5],c=r[9],l=r[2],h=r[6],u=r[10],p=n+s+u;return p>0?(t=.5/Math.sqrt(p+1),this._w=.25/t,this._x=(h-c)*t,this._y=(a-l)*t,this._z=(o-i)*t):n>s&&n>u?(t=2*Math.sqrt(1+n-s-u),this._w=(h-c)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(a+l)/t):s>u?(t=2*Math.sqrt(1+s-n-u),this._w=(a-l)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(c+h)/t):(t=2*Math.sqrt(1+u-n-s),this._w=(o-i)/t,this._x=(a+l)/t,this._y=(c+h)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var r=e.dot(t)+1;return r<1e-6?(r=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(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=r),this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(_r.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var r=this.angleTo(e);if(0===r)return this;var n=Math.min(1,t/r);return this.slerp(e,n),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var r=e._x,n=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=r*l+a*o+n*c-i*s,this._y=n*l+a*s+i*o-r*c,this._z=i*l+a*c+r*s-n*o,this._w=a*l-r*o-n*s-i*c,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var r=this._x,n=this._y,i=this._z,a=this._w,o=a*e._w+r*e._x+n*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=r,this._y=n,this._z=i,this;var s=1-o*o;if(s<=Number.EPSILON){var c=1-t;return this._w=c*a+t*this._w,this._x=c*r+t*this._x,this._y=c*n+t*this._y,this._z=c*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var l=Math.sqrt(s),h=Math.atan2(l,o),u=Math.sin((1-t)*h)/l,p=Math.sin(t*h)/l;return this._w=a*u+this._w*p,this._x=r*u+this._x*p,this._y=n*u+this._y*p,this._z=i*u+this._z*p,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var Pr=new Dr,Or=new Cr;function Dr(e,t,r){this.x=e||0,this.y=t||0,this.z=r||0}Object.assign(Dr.prototype,{isVector3:!0,set:function(e,t,r){return this.x=e,this.y=t,this.z=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Or.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Or.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[3]*r+i[6]*n,this.y=i[1]*t+i[4]*r+i[7]*n,this.z=i[2]*t+i[5]*r+i[8]*n,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,r=this.y,n=this.z,i=e.elements,a=1/(i[3]*t+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*t+i[4]*r+i[8]*n+i[12])*a,this.y=(i[1]*t+i[5]*r+i[9]*n+i[13])*a,this.z=(i[2]*t+i[6]*r+i[10]*n+i[14])*a,this},applyQuaternion:function(e){var t=this.x,r=this.y,n=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=s*t+a*n-o*r,l=s*r+o*t-i*n,h=s*n+i*r-a*t,u=-i*t-a*r-o*n;return this.x=c*s+u*-i+l*-o-h*-a,this.y=l*s+u*-a+h*-i-c*-o,this.z=h*s+u*-o+c*-a-l*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,r=this.y,n=this.z,i=e.elements;return this.x=i[0]*t+i[4]*r+i[8]*n,this.y=i[1]*t+i[5]*r+i[9]*n,this.z=i[2]*t+i[6]*r+i[10]*n,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(t,r)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,r){return this.subVectors(t,e).multiplyScalar(r).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var r=e.x,n=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=n*s-i*o,this.y=i*a-r*s,this.z=r*o-n*a,this},projectOnVector:function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var r=e.dot(this)/t;return this.copy(e).multiplyScalar(r)},projectOnPlane:function(e){return Pr.copy(this).projectOnVector(e),this.sub(Pr)},reflect:function(e){return this.sub(Pr.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var r=this.dot(e)/t;return Math.acos(_r.clamp(r,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,r=this.y-e.y,n=this.z-e.z;return t*t+r*r+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,r){var n=Math.sin(t)*e;return this.x=n*Math.sin(r),this.y=Math.cos(t)*e,this.z=n*Math.cos(r),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,r){return this.x=e*Math.sin(t),this.y=r,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=r,this.z=n,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},setFromMatrix3Column:function(e,t){return this.fromArray(e.elements,3*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,r){return void 0!==r&&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}});var Ir=new Dr,Nr=new Hr,Fr=new Dr(0,0,0),Br=new Dr(1,1,1),zr=new Dr,Ur=new Dr,Gr=new Dr;function Hr(){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.")}Object.assign(Hr.prototype,{isMatrix4:!0,set:function(e,t,r,n,i,a,o,s,c,l,h,u,p,d,f,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=r,v[12]=n,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=c,v[6]=l,v[10]=h,v[14]=u,v[3]=p,v[7]=d,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new Hr).fromArray(this.elements)},copy:function(e){var t=this.elements,r=e.elements;return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],this},copyPosition:function(e){var t=this.elements,r=e.elements;return t[12]=r[12],t[13]=r[13],t[14]=r[14],this},extractBasis:function(e,t,r){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,r){return this.set(e.x,t.x,r.x,0,e.y,t.y,r.y,0,e.z,t.z,r.z,0,0,0,0,1),this},extractRotation:function(e){var t=this.elements,r=e.elements,n=1/Ir.setFromMatrixColumn(e,0).length(),i=1/Ir.setFromMatrixColumn(e,1).length(),a=1/Ir.setFromMatrixColumn(e,2).length();return t[0]=r[0]*n,t[1]=r[1]*n,t[2]=r[2]*n,t[3]=0,t[4]=r[4]*i,t[5]=r[5]*i,t[6]=r[6]*i,t[7]=0,t[8]=r[8]*a,t[9]=r[9]*a,t[10]=r[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,r=e.x,n=e.y,i=e.z,a=Math.cos(r),o=Math.sin(r),s=Math.cos(n),c=Math.sin(n),l=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){var u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=-s*h,t[8]=c,t[1]=p+d*c,t[5]=u-f*c,t[9]=-o*s,t[2]=f-u*c,t[6]=d+p*c,t[10]=a*s}else if("YXZ"===e.order){var m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m+y*o,t[4]=g*o-v,t[8]=a*c,t[1]=a*h,t[5]=a*l,t[9]=-o,t[2]=v*o-g,t[6]=y+m*o,t[10]=a*s}else if("ZXY"===e.order){m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m-y*o,t[4]=-a*h,t[8]=g+v*o,t[1]=v+g*o,t[5]=a*l,t[9]=y-m*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=d*c-p,t[8]=u*c+f,t[1]=s*h,t[5]=f*c+u,t[9]=p*c-d,t[2]=-c,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var x=a*s,b=a*c,_=o*s,w=o*c;t[0]=s*l,t[4]=w-x*h,t[8]=_*h+b,t[1]=h,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=b*h+_,t[10]=x-w*h}else if("XZY"===e.order){x=a*s,b=a*c,_=o*s,w=o*c;t[0]=s*l,t[4]=-h,t[8]=c*l,t[1]=x*h+w,t[5]=a*l,t[9]=b*h-_,t[2]=_*h-b,t[6]=o*l,t[10]=w*h+x}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){return this.compose(Fr,e,Br)},lookAt:function(e,t,r){var n=this.elements;return Gr.subVectors(e,t),0===Gr.lengthSq()&&(Gr.z=1),Gr.normalize(),zr.crossVectors(r,Gr),0===zr.lengthSq()&&(1===Math.abs(r.z)?Gr.x+=1e-4:Gr.z+=1e-4,Gr.normalize(),zr.crossVectors(r,Gr)),zr.normalize(),Ur.crossVectors(Gr,zr),n[0]=zr.x,n[4]=Ur.x,n[8]=Gr.x,n[1]=zr.y,n[5]=Ur.y,n[9]=Gr.y,n[2]=zr.z,n[6]=Ur.z,n[10]=Gr.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var r=e.elements,n=t.elements,i=this.elements,a=r[0],o=r[4],s=r[8],c=r[12],l=r[1],h=r[5],u=r[9],p=r[13],d=r[2],f=r[6],m=r[10],v=r[14],g=r[3],y=r[7],x=r[11],b=r[15],_=n[0],w=n[4],M=n[8],S=n[12],T=n[1],E=n[5],A=n[9],L=n[13],R=n[2],C=n[6],P=n[10],O=n[14],D=n[3],I=n[7],N=n[11],F=n[15];return i[0]=a*_+o*T+s*R+c*D,i[4]=a*w+o*E+s*C+c*I,i[8]=a*M+o*A+s*P+c*N,i[12]=a*S+o*L+s*O+c*F,i[1]=l*_+h*T+u*R+p*D,i[5]=l*w+h*E+u*C+p*I,i[9]=l*M+h*A+u*P+p*N,i[13]=l*S+h*L+u*O+p*F,i[2]=d*_+f*T+m*R+v*D,i[6]=d*w+f*E+m*C+v*I,i[10]=d*M+f*A+m*P+v*N,i[14]=d*S+f*L+m*O+v*F,i[3]=g*_+y*T+x*R+b*D,i[7]=g*w+y*E+x*C+b*I,i[11]=g*M+y*A+x*P+b*N,i[15]=g*S+y*L+x*O+b*F,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},determinant:function(){var e=this.elements,t=e[0],r=e[4],n=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],h=e[6],u=e[10],p=e[14];return e[3]*(+i*s*h-n*c*h-i*o*u+r*c*u+n*o*p-r*s*p)+e[7]*(+t*s*p-t*c*u+i*a*u-n*a*p+n*c*l-i*s*l)+e[11]*(+t*c*h-t*o*p-i*a*h+r*a*p+i*o*l-r*c*l)+e[15]*(-n*o*l-t*s*h+t*o*u+n*a*h-r*a*u+r*s*l)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e,t,r){var n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=r),this},getInverse:function(e,t){var r=this.elements,n=e.elements,i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],l=n[5],h=n[6],u=n[7],p=n[8],d=n[9],f=n[10],m=n[11],v=n[12],g=n[13],y=n[14],x=n[15],b=d*y*u-g*f*u+g*h*m-l*y*m-d*h*x+l*f*x,_=v*f*u-p*y*u-v*h*m+c*y*m+p*h*x-c*f*x,w=p*g*u-v*d*u+v*l*m-c*g*m-p*l*x+c*d*x,M=v*d*h-p*g*h-v*l*f+c*g*f+p*l*y-c*d*y,S=i*b+a*_+o*w+s*M;if(0===S){var T="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(T);return console.warn(T),this.identity()}var E=1/S;return r[0]=b*E,r[1]=(g*f*s-d*y*s-g*o*m+a*y*m+d*o*x-a*f*x)*E,r[2]=(l*y*s-g*h*s+g*o*u-a*y*u-l*o*x+a*h*x)*E,r[3]=(d*h*s-l*f*s-d*o*u+a*f*u+l*o*m-a*h*m)*E,r[4]=_*E,r[5]=(p*y*s-v*f*s+v*o*m-i*y*m-p*o*x+i*f*x)*E,r[6]=(v*h*s-c*y*s-v*o*u+i*y*u+c*o*x-i*h*x)*E,r[7]=(c*f*s-p*h*s+p*o*u-i*f*u-c*o*m+i*h*m)*E,r[8]=w*E,r[9]=(v*d*s-p*g*s-v*a*m+i*g*m+p*a*x-i*d*x)*E,r[10]=(c*g*s-v*l*s+v*a*u-i*g*u-c*a*x+i*l*x)*E,r[11]=(p*l*s-c*d*s-p*a*u+i*d*u+c*a*m-i*l*m)*E,r[12]=M*E,r[13]=(p*g*o-v*d*o+v*a*f-i*g*f-p*a*y+i*d*y)*E,r[14]=(v*l*o-c*g*o-v*a*h+i*g*h+c*a*y-i*l*y)*E,r[15]=(c*d*o-p*l*o+p*a*h-i*d*h-c*a*f+i*l*f)*E,this},scale:function(e){var t=this.elements,r=e.x,n=e.y,i=e.z;return t[0]*=r,t[4]*=n,t[8]*=i,t[1]*=r,t[5]*=n,t[9]*=i,t[2]*=r,t[6]*=n,t[10]*=i,t[3]*=r,t[7]*=n,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,r,n))},makeTranslation:function(e,t,r){return this.set(1,0,0,e,0,1,0,t,0,0,1,r,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,t,-r,0,0,r,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,0,r,0,0,1,0,0,-r,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),r=Math.sin(e);return this.set(t,-r,0,0,r,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var r=Math.cos(t),n=Math.sin(t),i=1-r,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+r,c*o-n*s,c*s+n*o,0,c*o+n*s,l*o+r,l*s-n*a,0,c*s-n*o,l*s+n*a,i*s*s+r,0,0,0,0,1),this},makeScale:function(e,t,r){return this.set(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1),this},makeShear:function(e,t,r){return this.set(1,t,r,0,e,1,r,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,r){var n=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,h=o+o,u=i*c,p=i*l,d=i*h,f=a*l,m=a*h,v=o*h,g=s*c,y=s*l,x=s*h,b=r.x,_=r.y,w=r.z;return n[0]=(1-(f+v))*b,n[1]=(p+x)*b,n[2]=(d-y)*b,n[3]=0,n[4]=(p-x)*_,n[5]=(1-(u+v))*_,n[6]=(m+g)*_,n[7]=0,n[8]=(d+y)*w,n[9]=(m-g)*w,n[10]=(1-(u+f))*w,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},decompose:function(e,t,r){var n=this.elements,i=Ir.set(n[0],n[1],n[2]).length(),a=Ir.set(n[4],n[5],n[6]).length(),o=Ir.set(n[8],n[9],n[10]).length();this.determinant()<0&&(i=-i),e.x=n[12],e.y=n[13],e.z=n[14],Nr.copy(this);var s=1/i,c=1/a,l=1/o;return Nr.elements[0]*=s,Nr.elements[1]*=s,Nr.elements[2]*=s,Nr.elements[4]*=c,Nr.elements[5]*=c,Nr.elements[6]*=c,Nr.elements[8]*=l,Nr.elements[9]*=l,Nr.elements[10]*=l,t.setFromRotationMatrix(Nr),r.x=i,r.y=a,r.z=o,this},makePerspective:function(e,t,r,n,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*i/(t-e),c=2*i/(r-n),l=(t+e)/(t-e),h=(r+n)/(r-n),u=-(a+i)/(a-i),p=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=l,o[12]=0,o[1]=0,o[5]=c,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(e,t,r,n,i,a){var o=this.elements,s=1/(t-e),c=1/(r-n),l=1/(a-i),h=(t+e)*s,u=(r+n)*c,p=(a+i)*l;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*l,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(e){for(var t=this.elements,r=e.elements,n=0;n<16;n++)if(t[n]!==r[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var r=0;r<16;r++)this.elements[r]=e[r+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var r=this.elements;return e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=r[3],e[t+4]=r[4],e[t+5]=r[5],e[t+6]=r[6],e[t+7]=r[7],e[t+8]=r[8],e[t+9]=r[9],e[t+10]=r[10],e[t+11]=r[11],e[t+12]=r[12],e[t+13]=r[13],e[t+14]=r[14],e[t+15]=r[15],e}});var Vr=new Hr,kr=new Cr;function jr(e,t,r,n){this._x=e||0,this._y=t||0,this._z=r||0,this._order=n||jr.DefaultOrder}function Wr(){this.mask=1}jr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],jr.DefaultOrder="XYZ",Object.defineProperties(jr.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}}),Object.assign(jr.prototype,{isEuler:!0,set:function(e,t,r,n){return this._x=e,this._y=t,this._z=r,this._order=n||this._order,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},setFromRotationMatrix:function(e,t,r){var n=_r.clamp,i=e.elements,a=i[0],o=i[4],s=i[8],c=i[1],l=i[5],h=i[9],u=i[2],p=i[6],d=i[10];return"XYZ"===(t=t||this._order)?(this._y=Math.asin(n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===t?(this._x=Math.asin(-n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-u,a),this._z=0)):"ZXY"===t?(this._x=Math.asin(n(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(c,a))):"ZYX"===t?(this._y=Math.asin(-n(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-o,l))):"YZX"===t?(this._z=Math.asin(n(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===t?(this._z=Math.asin(-n(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,l),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-h,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==r&&this._onChangeCallback(),this},setFromQuaternion:function(e,t,r){return Vr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Vr,t,r)},setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(e){return kr.setFromEuler(this),this.setFromQuaternion(kr,e)},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new Dr(this._x,this._y,this._z)},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}}),Object.assign(Wr.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},enableAll:function(){this.mask=-1},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},disableAll:function(){this.mask=0},test:function(e){return 0!=(this.mask&e.mask)}});var qr=0,Xr=new Dr,Yr=new Cr,Zr=new Hr,Jr=new Dr,Qr=new Dr,Kr=new Dr,$r=new Cr,en=new Dr(1,0,0),tn=new Dr(0,1,0),rn=new Dr(0,0,1),nn={type:"added"},an={type:"removed"};function on(){Object.defineProperty(this,"id",{value:qr++}),this.uuid=_r.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=on.DefaultUp.clone();var e=new Dr,t=new jr,r=new Cr,n=new Dr(1,1,1);t._onChange(function(){r.setFromEuler(t,!1)}),r._onChange(function(){t.setFromQuaternion(r,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:r},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new Hr},normalMatrix:{value:new Mr}}),this.matrix=new Hr,this.matrixWorld=new Hr,this.matrixAutoUpdate=on.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Wr,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function sn(){on.call(this),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}))}on.DefaultUp=new Dr(0,1,0),on.DefaultMatrixAutoUpdate=!0,on.prototype=Object.assign(Object.create(gr.prototype),{constructor:on,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(e,t){return Yr.setFromAxisAngle(e,t),this.quaternion.multiply(Yr),this},rotateOnWorldAxis:function(e,t){return Yr.setFromAxisAngle(e,t),this.quaternion.premultiply(Yr),this},rotateX:function(e){return this.rotateOnAxis(en,e)},rotateY:function(e){return this.rotateOnAxis(tn,e)},rotateZ:function(e){return this.rotateOnAxis(rn,e)},translateOnAxis:function(e,t){return Xr.copy(e).applyQuaternion(this.quaternion),this.position.add(Xr.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(en,e)},translateY:function(e){return this.translateOnAxis(tn,e)},translateZ:function(e){return this.translateOnAxis(rn,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(Zr.getInverse(this.matrixWorld))},lookAt:function(e,t,r){e.isVector3?Jr.copy(e):Jr.set(e,t,r);var n=this.parent;this.updateWorldMatrix(!0,!1),Qr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Zr.lookAt(Qr,Jr,this.up):Zr.lookAt(Jr,Qr,this.up),this.quaternion.setFromRotationMatrix(Zr),n&&(Zr.extractRotation(n.matrixWorld),Yr.setFromRotationMatrix(Zr),this.quaternion.premultiply(Yr.inverse()))},add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(nn)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var r=this.children.indexOf(e);return-1!==r&&(e.parent=null,this.children.splice(r,1),e.dispatchEvent(an)),this},attach:function(e){return this.updateWorldMatrix(!0,!1),Zr.getInverse(this.matrixWorld),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Zr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Zr),e.updateWorldMatrix(!1,!1),this.add(e),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var r=0,n=this.children.length;r<n;r++){var i=this.children[r].getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new Dr),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new Cr),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Qr,e,Kr),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new Dr),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Qr,$r,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Dr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,r=0,n=t.length;r<n;r++)t[r].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var r=this.parent;if(!0===e&&null!==r&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var n=this.children,i=0,a=n.length;i<a;i++)n[i].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"==typeof e,r={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var n={};function i(t,r){return void 0===t[r.uuid]&&(t[r.uuid]=r.toJSON(e)),r.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){n.geometry=i(e.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var o=a.shapes;if(Array.isArray(o))for(var s=0,c=o.length;s<c;s++){var l=o[s];i(e.shapes,l)}else i(e.shapes,o)}}if(void 0!==this.material)if(Array.isArray(this.material)){var h=[];for(s=0,c=this.material.length;s<c;s++)h.push(i(e.materials,this.material[s]));n.material=h}else n.material=i(e.materials,this.material);if(this.children.length>0){n.children=[];for(s=0;s<this.children.length;s++)n.children.push(this.children[s].toJSON(e).object)}if(t){var u=m(e.geometries),p=m(e.materials),d=m(e.textures),f=m(e.images);o=m(e.shapes);u.length>0&&(r.geometries=u),p.length>0&&(r.materials=p),d.length>0&&(r.textures=d),f.length>0&&(r.images=f),o.length>0&&(r.shapes=o)}return r.object=n,r;function m(e){var t=[];for(var r in e){var n=e[r];delete n.metadata,t.push(n)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var r=0;r<e.children.length;r++){var n=e.children[r];this.add(n.clone())}return this}}),sn.prototype=Object.assign(Object.create(on.prototype),{constructor:sn,isScene:!0,copy:function(e,t){return on.prototype.copy.call(this,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:function(e){var t=on.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.environment&&(t.object.environment=this.environment.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t},dispose:function(){this.dispatchEvent({type:"dispose"})}});var cn=[new Dr,new Dr,new Dr,new Dr,new Dr,new Dr,new Dr,new Dr],ln=new Dr,hn=new _n,un=new Dr,pn=new Dr,dn=new Dr,fn=new Dr,mn=new Dr,vn=new Dr,gn=new Dr,yn=new Dr,xn=new Dr,bn=new Dr;function _n(e,t){this.min=void 0!==e?e:new Dr(1/0,1/0,1/0),this.max=void 0!==t?t:new Dr(-1/0,-1/0,-1/0)}function wn(e,t,r,n,i){var a,o;for(a=0,o=e.length-3;a<=o;a+=3){bn.fromArray(e,a);var s=i.x*Math.abs(bn.x)+i.y*Math.abs(bn.y)+i.z*Math.abs(bn.z),c=t.dot(bn),l=r.dot(bn),h=n.dot(bn);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>s)return!1}return!0}Object.assign(_n.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,r=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.length;s<c;s+=3){var l=e[s],h=e[s+1],u=e[s+2];l<t&&(t=l),h<r&&(r=h),u<n&&(n=u),l>i&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,r,n),this.max.set(i,a,o),this},setFromBufferAttribute:function(e){for(var t=1/0,r=1/0,n=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.count;s<c;s++){var l=e.getX(s),h=e.getY(s),u=e.getZ(s);l<t&&(t=l),h<r&&(r=h),u<n&&(n=u),l>i&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,r,n),this.max.set(i,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){var r=ln.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this},setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new Dr),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new Dr),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),hn.copy(t.boundingBox),hn.applyMatrix4(e.matrixWorld),this.expandByPoint(hn.min),this.expandByPoint(hn.max));for(var r=e.children,n=0,i=r.length;n<i;n++)this.expandByObject(r[n]);return this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new Dr),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:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:function(e){return this.clampPoint(e.center,ln),ln.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,r;return e.normal.x>0?(t=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),t<=-e.constant&&r>=-e.constant},intersectsTriangle:function(e){if(this.isEmpty())return!1;this.getCenter(gn),yn.subVectors(this.max,gn),un.subVectors(e.a,gn),pn.subVectors(e.b,gn),dn.subVectors(e.c,gn),fn.subVectors(pn,un),mn.subVectors(dn,pn),vn.subVectors(un,dn);var t=[0,-fn.z,fn.y,0,-mn.z,mn.y,0,-vn.z,vn.y,fn.z,0,-fn.x,mn.z,0,-mn.x,vn.z,0,-vn.x,-fn.y,fn.x,0,-mn.y,mn.x,0,-vn.y,vn.x,0];return!!wn(t,un,pn,dn,yn)&&(!!wn(t=[1,0,0,0,1,0,0,0,1],un,pn,dn,yn)&&(xn.crossVectors(fn,mn),wn(t=[xn.x,xn.y,xn.z],un,pn,dn,yn)))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Dr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return ln.copy(e).clamp(this.min,this.max).sub(e).length()},getBoundingSphere:function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(ln).length(),e},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){return this.isEmpty()?this:(cn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),cn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),cn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),cn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),cn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),cn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),cn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),cn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(cn),this)},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Mn=new _n;function Sn(e,t){this.center=void 0!==e?e:new Dr,this.radius=void 0!==t?t:0}Object.assign(Sn.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var r=this.center;void 0!==t?r.copy(t):Mn.setFromPoints(e).getCenter(r);for(var n=0,i=0,a=e.length;i<a;i++)n=Math.max(n,r.distanceToSquared(e[i]));return this.radius=Math.sqrt(n),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var r=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new Dr),t.copy(e),r>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new _n),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}});var Tn=new Dr,En=new Dr,An=new Dr,Ln=new Dr,Rn=new Dr,Cn=new Dr,Pn=new Dr;function On(e,t){this.origin=void 0!==e?e:new Dr,this.direction=void 0!==t?t:new Dr(0,0,-1)}Object.assign(On.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new Dr),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(e){return this.origin.copy(this.at(e,Tn)),this},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Dr),t.subVectors(e,this.origin);var r=t.dot(this.direction);return r<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=Tn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Tn.copy(this.direction).multiplyScalar(t).add(this.origin),Tn.distanceToSquared(e))},distanceSqToSegment:function(e,t,r,n){En.copy(e).add(t).multiplyScalar(.5),An.copy(t).sub(e).normalize(),Ln.copy(this.origin).sub(En);var i,a,o,s,c=.5*e.distanceTo(t),l=-this.direction.dot(An),h=Ln.dot(this.direction),u=-Ln.dot(An),p=Ln.lengthSq(),d=Math.abs(1-l*l);if(d>0)if(a=l*h-u,s=c*d,(i=l*u-h)>=0)if(a>=-s)if(a<=s){var f=1/d;o=(i*=f)*(i+l*(a*=f)+2*h)+a*(l*i+a+2*u)+p}else a=c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a=-c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a<=-s?o=-(i=Math.max(0,-(-l*c+h)))*i+(a=i>0?-c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p:a<=s?(i=0,o=(a=Math.min(Math.max(-c,-u),c))*(a+2*u)+p):o=-(i=Math.max(0,-(l*c+h)))*i+(a=i>0?c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p;else a=l>0?-c:c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;return r&&r.copy(this.direction).multiplyScalar(i).add(this.origin),n&&n.copy(An).multiplyScalar(a).add(En),o},intersectSphere:function(e,t){Tn.subVectors(e.center,this.origin);var r=Tn.dot(this.direction),n=Tn.dot(Tn)-r*r,i=e.radius*e.radius;if(n>i)return null;var a=Math.sqrt(i-n),o=r-a,s=r+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,t)},intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var r=-(this.origin.dot(e.normal)+e.constant)/t;return r>=0?r:null},intersectPlane:function(e,t){var r=this.distanceToPlane(e);return null===r?null:this.at(r,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var r,n,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(r=(e.min.x-u.x)*c,n=(e.max.x-u.x)*c):(r=(e.max.x-u.x)*c,n=(e.min.x-u.x)*c),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),r>a||i>n?null:((i>r||r!=r)&&(r=i),(a<n||n!=n)&&(n=a),h>=0?(o=(e.min.z-u.z)*h,s=(e.max.z-u.z)*h):(o=(e.max.z-u.z)*h,s=(e.min.z-u.z)*h),r>s||o>n?null:((o>r||r!=r)&&(r=o),(s<n||n!=n)&&(n=s),n<0?null:this.at(r>=0?r:n,t)))},intersectsBox:function(e){return null!==this.intersectBox(e,Tn)},intersectTriangle:function(e,t,r,n,i){Rn.subVectors(t,e),Cn.subVectors(r,e),Pn.crossVectors(Rn,Cn);var a,o=this.direction.dot(Pn);if(o>0){if(n)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Ln.subVectors(this.origin,e);var s=a*this.direction.dot(Cn.crossVectors(Ln,Cn));if(s<0)return null;var c=a*this.direction.dot(Rn.cross(Ln));if(c<0)return null;if(s+c>o)return null;var l=-a*Ln.dot(Pn);return l<0?null:this.at(l/o,i)},applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}});var Dn=new Dr,In=new Dr,Nn=new Mr;function Fn(e,t){this.normal=void 0!==e?e:new Dr(1,0,0),this.constant=void 0!==t?t:0}Object.assign(Fn.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,r,n){return this.normal.set(e,t,r),this.constant=n,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(e,t,r){var n=Dn.subVectors(r,t).cross(In.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new Dr),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new Dr);var r=e.delta(Dn),n=this.normal.dot(r);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/n;return i<0||i>1?void 0:t.copy(r).multiplyScalar(i).add(e.start)},intersectsLine:function(e){var t=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return t<0&&r>0||r<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new Dr),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(e,t){var r=t||Nn.getNormalMatrix(e),n=this.coplanarPoint(Dn).applyMatrix4(e),i=this.normal.applyMatrix3(r).normalize();return this.constant=-n.dot(i),this},translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}});var Bn=new Dr,zn=new Dr,Un=new Dr,Gn=new Dr,Hn=new Dr,Vn=new Dr,kn=new Dr,jn=new Dr,Wn=new Dr,qn=new Dr;function Xn(e,t,r){this.a=void 0!==e?e:new Dr,this.b=void 0!==t?t:new Dr,this.c=void 0!==r?r:new Dr}Object.assign(Xn,{getNormal:function(e,t,r,n){void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new Dr),n.subVectors(r,t),Bn.subVectors(e,t),n.cross(Bn);var i=n.lengthSq();return i>0?n.multiplyScalar(1/Math.sqrt(i)):n.set(0,0,0)},getBarycoord:function(e,t,r,n,i){Bn.subVectors(n,t),zn.subVectors(r,t),Un.subVectors(e,t);var a=Bn.dot(Bn),o=Bn.dot(zn),s=Bn.dot(Un),c=zn.dot(zn),l=zn.dot(Un),h=a*c-o*o;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new Dr),0===h)return i.set(-2,-1,-1);var u=1/h,p=(c*s-o*l)*u,d=(a*l-o*s)*u;return i.set(1-p-d,d,p)},containsPoint:function(e,t,r,n){return Xn.getBarycoord(e,t,r,n,Gn),Gn.x>=0&&Gn.y>=0&&Gn.x+Gn.y<=1},getUV:function(e,t,r,n,i,a,o,s){return this.getBarycoord(e,t,r,n,Gn),s.set(0,0),s.addScaledVector(i,Gn.x),s.addScaledVector(a,Gn.y),s.addScaledVector(o,Gn.z),s},isFrontFacing:function(e,t,r,n){return Bn.subVectors(r,t),zn.subVectors(e,t),Bn.cross(zn).dot(n)<0}}),Object.assign(Xn.prototype,{set:function(e,t,r){return this.a.copy(e),this.b.copy(t),this.c.copy(r),this},setFromPointsAndIndices:function(e,t,r,n){return this.a.copy(e[t]),this.b.copy(e[r]),this.c.copy(e[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){return Bn.subVectors(this.c,this.b),zn.subVectors(this.a,this.b),.5*Bn.cross(zn).length()},getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new Dr),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return Xn.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Fn),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return Xn.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,r,n,i){return Xn.getUV(e,this.a,this.b,this.c,t,r,n,i)},containsPoint:function(e){return Xn.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return Xn.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new Dr);var r,n,i=this.a,a=this.b,o=this.c;Hn.subVectors(a,i),Vn.subVectors(o,i),jn.subVectors(e,i);var s=Hn.dot(jn),c=Vn.dot(jn);if(s<=0&&c<=0)return t.copy(i);Wn.subVectors(e,a);var l=Hn.dot(Wn),h=Vn.dot(Wn);if(l>=0&&h<=l)return t.copy(a);var u=s*h-l*c;if(u<=0&&s>=0&&l<=0)return r=s/(s-l),t.copy(i).addScaledVector(Hn,r);qn.subVectors(e,o);var p=Hn.dot(qn),d=Vn.dot(qn);if(d>=0&&p<=d)return t.copy(o);var f=p*c-s*d;if(f<=0&&c>=0&&d<=0)return n=c/(c-d),t.copy(i).addScaledVector(Vn,n);var m=l*d-p*h;if(m<=0&&h-l>=0&&p-d>=0)return kn.subVectors(o,a),n=(h-l)/(h-l+(p-d)),t.copy(a).addScaledVector(kn,n);var v=1/(m+f+u);return r=f*v,n=u*v,t.copy(i).addScaledVector(Hn,r).addScaledVector(Vn,n)},equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var Yn={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},Zn={h:0,s:0,l:0},Jn={h:0,s:0,l:0};function Qn(e,t,r){return void 0===t&&void 0===r?this.set(e):this.setRGB(e,t,r)}function Kn(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+6*(t-e)*(2/3-r):e}function $n(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function ei(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function ti(e,t,r,n,i,a){this.a=e,this.b=t,this.c=r,this.normal=n&&n.isVector3?n:new Dr,this.vertexNormals=Array.isArray(n)?n:[],this.color=i&&i.isColor?i:new Qn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==a?a:0}Object.assign(Qn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,r){return this.r=e,this.g=t,this.b=r,this},setHSL:function(e,t,r){if(e=_r.euclideanModulo(e,1),t=_r.clamp(t,0,1),r=_r.clamp(r,0,1),0===t)this.r=this.g=this.b=r;else{var n=r<=.5?r*(1+t):r+t-r*t,i=2*r-n;this.r=Kn(i,n,e+1/3),this.g=Kn(i,n,e),this.b=Kn(i,n,e-1/3)}return this},setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var n,i=r[1],a=r[2];switch(i){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,t(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,t(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,c=parseInt(n[3],10)/100;return t(n[5]),this.setHSL(o,s,c)}}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=r[1],h=l.length;if(3===h)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},setColorName:function(e){var t=Yn[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var r=t>0?1/t:1;return this.r=Math.pow(e.r,r),this.g=Math.pow(e.g,r),this.b=Math.pow(e.b,r),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(e){return this.r=$n(e.r),this.g=$n(e.g),this.b=$n(e.b),this},copyLinearToSRGB:function(e){return this.r=ei(e.r),this.g=ei(e.g),this.b=ei(e.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,r,n=this.r,i=this.g,a=this.b,o=Math.max(n,i,a),s=Math.min(n,i,a),c=(s+o)/2;if(s===o)t=0,r=0;else{var l=o-s;switch(r=c<=.5?l/(o+s):l/(2-o-s),o){case n:t=(i-a)/l+(i<a?6:0);break;case i:t=(a-n)/l+2;break;case a:t=(n-i)/l+4}t/=6}return e.h=t,e.s=r,e.l=c,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(e,t,r){return this.getHSL(Zn),Zn.h+=e,Zn.s+=t,Zn.l+=r,this.setHSL(Zn.h,Zn.s,Zn.l),this},add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},lerpHSL:function(e,t){this.getHSL(Zn),e.getHSL(Jn);var r=_r.lerp(Zn.h,Jn.h,t),n=_r.lerp(Zn.s,Jn.s,t),i=_r.lerp(Zn.l,Jn.l,t);return this.setHSL(r,n,i),this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}}),Qn.NAMES=Yn,Object.assign(ti.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,r=e.vertexNormals.length;t<r;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,r=e.vertexColors.length;t<r;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var ri=0;function ni(){Object.defineProperty(this,"id",{value:ri++}),this.uuid=_r.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=w,this.side=d,this.flatShading=!1,this.vertexTangents=!1,this.vertexColors=y,this.opacity=1,this.transparent=!1,this.blendSrc=F,this.blendDst=B,this.blendEquation=A,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=q,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=sr,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Xt,this.stencilZFail=Xt,this.stencilZPass=Xt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function ii(e){ni.call(this),this.type="MeshBasicMaterial",this.color=new Qn(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=Q,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(e)}ni.prototype=Object.assign(Object.create(gr.prototype),{constructor:ni,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var r=e[t];if(void 0!==r)if("shading"!==t){var n=this[t];void 0!==n?n&&n.isColor?n.set(r):n&&n.isVector3&&r&&r.isVector3?n.copy(r):this[t]=r:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=r===v;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(e){var t=[];for(var r in e){var n=e[r];delete n.metadata,t.push(n)}return t}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(r.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearcoat&&(r.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,r.reflectivity=this.reflectivity,r.refractionRatio=this.refractionRatio,void 0!==this.combine&&(r.combine=this.combine),void 0!==this.envMapIntensity&&(r.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==w&&(r.blending=this.blending),!0===this.flatShading&&(r.flatShading=this.flatShading),this.side!==d&&(r.side=this.side),this.vertexColors!==y&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(r.rotation=this.rotation),!0===this.polygonOffset&&(r.polygonOffset=!0),0!==this.polygonOffsetFactor&&(r.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(r.morphTargets=!0),!0===this.morphNormals&&(r.morphNormals=!0),!0===this.skinning&&(r.skinning=!0),!1===this.visible&&(r.visible=!1),!1===this.toneMapped&&(r.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),t){var i=n(e.textures),a=n(e.images);i.length>0&&(r.textures=i),a.length>0&&(r.images=a)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,r=null;if(null!==t){var n=t.length;r=new Array(n);for(var i=0;i!==n;++i)r[i]=t[i].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(ni.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),ii.prototype=Object.create(ni.prototype),ii.prototype.constructor=ii,ii.prototype.isMeshBasicMaterial=!0,ii.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this};var ai=new Dr;function oi(e,t,r){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===r,this.usage=cr,this.updateRange={offset:0,count:-1},this.version=0}function si(e,t,r){oi.call(this,new Int8Array(e),t,r)}function ci(e,t,r){oi.call(this,new Uint8Array(e),t,r)}function li(e,t,r){oi.call(this,new Uint8ClampedArray(e),t,r)}function hi(e,t,r){oi.call(this,new Int16Array(e),t,r)}function ui(e,t,r){oi.call(this,new Uint16Array(e),t,r)}function pi(e,t,r){oi.call(this,new Int32Array(e),t,r)}function di(e,t,r){oi.call(this,new Uint32Array(e),t,r)}function fi(e,t,r){oi.call(this,new Float32Array(e),t,r)}function mi(e,t,r){oi.call(this,new Float64Array(e),t,r)}function vi(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function gi(e){if(0===e.length)return-1/0;for(var t=e[0],r=1,n=e.length;r<n;++r)e[r]>t&&(t=e[r]);return t}Object.defineProperty(oi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(oi.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,r){e*=this.itemSize,r*=t.itemSize;for(var n=0,i=this.itemSize;n<i;n++)this.array[e+n]=t.array[r+n];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new Qn),t[r++]=a.r,t[r++]=a.g,t[r++]=a.b}return this},copyVector2sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),a=new wr),t[r++]=a.x,t[r++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new Dr),t[r++]=a.x,t[r++]=a.y,t[r++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,r=0,n=0,i=e.length;n<i;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new Ar),t[r++]=a.x,t[r++]=a.y,t[r++]=a.z,t[r++]=a.w}return this},applyMatrix3:function(e){for(var t=0,r=this.count;t<r;t++)ai.x=this.getX(t),ai.y=this.getY(t),ai.z=this.getZ(t),ai.applyMatrix3(e),this.setXYZ(t,ai.x,ai.y,ai.z);return this},applyMatrix4:function(e){for(var t=0,r=this.count;t<r;t++)ai.x=this.getX(t),ai.y=this.getY(t),ai.z=this.getZ(t),ai.applyMatrix4(e),this.setXYZ(t,ai.x,ai.y,ai.z);return this},applyNormalMatrix:function(e){for(var t=0,r=this.count;t<r;t++)ai.x=this.getX(t),ai.y=this.getY(t),ai.z=this.getZ(t),ai.applyNormalMatrix(e),this.setXYZ(t,ai.x,ai.y,ai.z);return this},transformDirection:function(e){for(var t=0,r=this.count;t<r;t++)ai.x=this.getX(t),ai.y=this.getY(t),ai.z=this.getZ(t),ai.transformDirection(e),this.setXYZ(t,ai.x,ai.y,ai.z);return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this},setXYZ:function(e,t,r,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this},setXYZW:function(e,t,r,n,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=r,this.array[e+2]=n,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),si.prototype=Object.create(oi.prototype),si.prototype.constructor=si,ci.prototype=Object.create(oi.prototype),ci.prototype.constructor=ci,li.prototype=Object.create(oi.prototype),li.prototype.constructor=li,hi.prototype=Object.create(oi.prototype),hi.prototype.constructor=hi,ui.prototype=Object.create(oi.prototype),ui.prototype.constructor=ui,pi.prototype=Object.create(oi.prototype),pi.prototype.constructor=pi,di.prototype=Object.create(oi.prototype),di.prototype.constructor=di,fi.prototype=Object.create(oi.prototype),fi.prototype.constructor=fi,mi.prototype=Object.create(oi.prototype),mi.prototype.constructor=mi,Object.assign(vi.prototype,{computeGroups:function(e){for(var t,r=[],n=void 0,i=e.faces,a=0;a<i.length;a++){var o=i[a];o.materialIndex!==n&&(n=o.materialIndex,void 0!==t&&(t.count=3*a-t.start,r.push(t)),t={start:3*a,materialIndex:n})}void 0!==t&&(t.count=3*a-t.start,r.push(t)),this.groups=r},fromGeometry:function(e){var t,r=e.faces,n=e.vertices,i=e.faceVertexUvs,a=i[0]&&i[0].length>0,o=i[1]&&i[1].length>0,s=e.morphTargets,c=s.length;if(c>0){t=[];for(var l=0;l<c;l++)t[l]={name:s[l].name,data:[]};this.morphTargets.position=t}var h,u=e.morphNormals,p=u.length;if(p>0){h=[];for(l=0;l<p;l++)h[l]={name:u[l].name,data:[]};this.morphTargets.normal=h}var d=e.skinIndices,f=e.skinWeights,m=d.length===n.length,v=f.length===n.length;n.length>0&&0===r.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(l=0;l<r.length;l++){var g=r[l];this.vertices.push(n[g.a],n[g.b],n[g.c]);var y=g.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var x=g.normal;this.normals.push(x,x,x)}var b,_=g.vertexColors;if(3===_.length)this.colors.push(_[0],_[1],_[2]);else{var w=g.color;this.colors.push(w,w,w)}if(!0===a)void 0!==(b=i[0][l])?this.uvs.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new wr,new wr,new wr));if(!0===o)void 0!==(b=i[1][l])?this.uvs2.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new wr,new wr,new wr));for(var M=0;M<c;M++){var S=s[M].vertices;t[M].data.push(S[g.a],S[g.b],S[g.c])}for(M=0;M<p;M++){var T=u[M].vertexNormals[l];h[M].data.push(T.a,T.b,T.c)}m&&this.skinIndices.push(d[g.a],d[g.b],d[g.c]),v&&this.skinWeights.push(f[g.a],f[g.b],f[g.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this}});var yi=1,xi=new Hr,bi=new on,_i=new Dr,wi=new _n,Mi=new _n,Si=new Dr;function Ti(){Object.defineProperty(this,"id",{value:yi+=2}),this.uuid=_r.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}Ti.prototype=Object.assign(Object.create(gr.prototype),{constructor:Ti,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(gi(e)>65535?di:ui)(e,1):this.index=e},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,r){this.groups.push({start:e,count:t,materialIndex:void 0!==r?r:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var r=this.attributes.normal;if(void 0!==r){var n=(new Mr).getNormalMatrix(e);r.applyNormalMatrix(n),r.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return xi.makeRotationX(e),this.applyMatrix4(xi),this},rotateY:function(e){return xi.makeRotationY(e),this.applyMatrix4(xi),this},rotateZ:function(e){return xi.makeRotationZ(e),this.applyMatrix4(xi),this},translate:function(e,t,r){return xi.makeTranslation(e,t,r),this.applyMatrix4(xi),this},scale:function(e,t,r){return xi.makeScale(e,t,r),this.applyMatrix4(xi),this},lookAt:function(e){return bi.lookAt(e),bi.updateMatrix(),this.applyMatrix4(bi.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(_i).negate(),this.translate(_i.x,_i.y,_i.z),this},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var r=new fi(3*t.vertices.length,3),n=new fi(3*t.colors.length,3);if(this.setAttribute("position",r.copyVector3sArray(t.vertices)),this.setAttribute("color",n.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new fi(t.lineDistances.length,1);this.setAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new fi(t,3)),this},updateFromObject:function(e){var t,r=e.geometry;if(e.isMesh){var n=r.__directGeometry;if(!0===r.elementsNeedUpdate&&(n=void 0,r.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(r);n.verticesNeedUpdate=r.verticesNeedUpdate,n.normalsNeedUpdate=r.normalsNeedUpdate,n.colorsNeedUpdate=r.colorsNeedUpdate,n.uvsNeedUpdate=r.uvsNeedUpdate,n.groupsNeedUpdate=r.groupsNeedUpdate,r.verticesNeedUpdate=!1,r.normalsNeedUpdate=!1,r.colorsNeedUpdate=!1,r.uvsNeedUpdate=!1,r.groupsNeedUpdate=!1,r=n}return!0===r.verticesNeedUpdate&&(void 0!==(t=this.attributes.position)&&(t.copyVector3sArray(r.vertices),t.needsUpdate=!0),r.verticesNeedUpdate=!1),!0===r.normalsNeedUpdate&&(void 0!==(t=this.attributes.normal)&&(t.copyVector3sArray(r.normals),t.needsUpdate=!0),r.normalsNeedUpdate=!1),!0===r.colorsNeedUpdate&&(void 0!==(t=this.attributes.color)&&(t.copyColorsArray(r.colors),t.needsUpdate=!0),r.colorsNeedUpdate=!1),r.uvsNeedUpdate&&(void 0!==(t=this.attributes.uv)&&(t.copyVector2sArray(r.uvs),t.needsUpdate=!0),r.uvsNeedUpdate=!1),r.lineDistancesNeedUpdate&&(void 0!==(t=this.attributes.lineDistance)&&(t.copyArray(r.lineDistances),t.needsUpdate=!0),r.lineDistancesNeedUpdate=!1),r.groupsNeedUpdate&&(r.computeGroups(e.geometry),this.groups=r.groups,r.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new vi).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.setAttribute("position",new oi(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var r=new Float32Array(3*e.normals.length);this.setAttribute("normal",new oi(r,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var n=new Float32Array(3*e.colors.length);this.setAttribute("color",new oi(n,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.setAttribute("uv",new oi(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.setAttribute("uv2",new oi(a,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var s=[],c=e.morphTargets[o],l=0,h=c.length;l<h;l++){var u=c[l],p=new fi(3*u.data.length,3);p.name=u.name,s.push(p.copyVector3sArray(u.data))}this.morphAttributes[o]=s}if(e.skinIndices.length>0){var d=new fi(4*e.skinIndices.length,4);this.setAttribute("skinIndex",d.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var f=new fi(4*e.skinWeights.length,4);this.setAttribute("skinWeight",f.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new _n);var e=this.attributes.position,t=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var r=0,n=t.length;r<n;r++){var i=t[r];wi.setFromBufferAttribute(i),this.morphTargetsRelative?(Si.addVectors(this.boundingBox.min,wi.min),this.boundingBox.expandByPoint(Si),Si.addVectors(this.boundingBox.max,wi.max),this.boundingBox.expandByPoint(Si)):(this.boundingBox.expandByPoint(wi.min),this.boundingBox.expandByPoint(wi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Sn);var e=this.attributes.position,t=this.morphAttributes.position;if(e){var r=this.boundingSphere.center;if(wi.setFromBufferAttribute(e),t)for(var n=0,i=t.length;n<i;n++){var a=t[n];Mi.setFromBufferAttribute(a),this.morphTargetsRelative?(Si.addVectors(wi.min,Mi.min),wi.expandByPoint(Si),Si.addVectors(wi.max,Mi.max),wi.expandByPoint(Si)):(wi.expandByPoint(Mi.min),wi.expandByPoint(Mi.max))}wi.getCenter(r);var o=0;for(n=0,i=e.count;n<i;n++)Si.fromBufferAttribute(e,n),o=Math.max(o,r.distanceToSquared(Si));if(t)for(n=0,i=t.length;n<i;n++){a=t[n];for(var s=this.morphTargetsRelative,c=0,l=a.count;c<l;c++)Si.fromBufferAttribute(a,c),s&&(_i.fromBufferAttribute(e,c),Si.add(_i)),o=Math.max(o,r.distanceToSquared(Si))}this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes;if(t.position){var r=t.position.array;if(void 0===t.normal)this.setAttribute("normal",new oi(new Float32Array(r.length),3));else for(var n=t.normal.array,i=0,a=n.length;i<a;i++)n[i]=0;var o,s,c,l=t.normal.array,h=new Dr,u=new Dr,p=new Dr,d=new Dr,f=new Dr;if(e){var m=e.array;for(i=0,a=e.count;i<a;i+=3)o=3*m[i+0],s=3*m[i+1],c=3*m[i+2],h.fromArray(r,o),u.fromArray(r,s),p.fromArray(r,c),d.subVectors(p,u),f.subVectors(h,u),d.cross(f),l[o]+=d.x,l[o+1]+=d.y,l[o+2]+=d.z,l[s]+=d.x,l[s+1]+=d.y,l[s+2]+=d.z,l[c]+=d.x,l[c+1]+=d.y,l[c+2]+=d.z}else for(i=0,a=r.length;i<a;i+=9)h.fromArray(r,i),u.fromArray(r,i+3),p.fromArray(r,i+6),d.subVectors(p,u),f.subVectors(h,u),d.cross(f),l[i]=d.x,l[i+1]=d.y,l[i+2]=d.z,l[i+3]=d.x,l[i+4]=d.y,l[i+5]=d.z,l[i+6]=d.x,l[i+7]=d.y,l[i+8]=d.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var r=this.attributes;for(var n in r)if(void 0!==e.attributes[n])for(var i=r[n].array,a=e.attributes[n],o=a.array,s=a.itemSize*t,c=Math.min(o.length,i.length-s),l=0,h=s;l<c;l++,h++)i[h]=o[l];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,r=e.count;t<r;t++)Si.x=e.getX(t),Si.y=e.getY(t),Si.z=e.getZ(t),Si.normalize(),e.setXYZ(t,Si.x,Si.y,Si.z)},toNonIndexed:function(){function e(e,t){for(var r=e.array,n=e.itemSize,i=new r.constructor(t.length*n),a=0,o=0,s=0,c=t.length;s<c;s++){a=t[s]*n;for(var l=0;l<n;l++)i[o++]=r[a++]}return new oi(i,n)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ti,r=this.index.array,n=this.attributes;for(var i in n){var a=e(n[i],r);t.setAttribute(i,a)}var o=this.morphAttributes;for(i in o){for(var s=[],c=o[i],l=0,h=c.length;l<h;l++){a=e(c[l],r);s.push(a)}t.morphAttributes[i]=s}t.morphTargetsRelative=this.morphTargetsRelative;for(var u=this.groups,p=(l=0,u.length);l<p;l++){var d=u[l];t.addGroup(d.start,d.count,d.materialIndex)}return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}e.data={attributes:{}};var n=this.index;null!==n&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});var i=this.attributes;for(var r in i){var a=(p=i[r]).toJSON();""!==p.name&&(a.name=p.name),e.data.attributes[r]=a}var o={},s=!1;for(var r in this.morphAttributes){for(var c=this.morphAttributes[r],l=[],h=0,u=c.length;h<u;h++){var p;a=(p=c[h]).toJSON();""!==p.name&&(a.name=p.name),l.push(a)}l.length>0&&(o[r]=l,s=!0)}s&&(e.data.morphAttributes=o,e.data.morphTargetsRelative=this.morphTargetsRelative);var d=this.groups;d.length>0&&(e.data.groups=JSON.parse(JSON.stringify(d)));var f=this.boundingSphere;return null!==f&&(e.data.boundingSphere={center:f.center.toArray(),radius:f.radius}),e},clone:function(){return(new Ti).copy(this)},copy:function(e){var t,r,n;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var a=e.attributes;for(t in a){var o=a[t];this.setAttribute(t,o.clone())}var s=e.morphAttributes;for(t in s){var c=[],l=s[t];for(r=0,n=l.length;r<n;r++)c.push(l[r].clone());this.morphAttributes[t]=c}this.morphTargetsRelative=e.morphTargetsRelative;var h=e.groups;for(r=0,n=h.length;r<n;r++){var u=h[r];this.addGroup(u.start,u.count,u.materialIndex)}var p=e.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=e.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Ei=new Hr,Ai=new On,Li=new Sn,Ri=new Dr,Ci=new Dr,Pi=new Dr,Oi=new Dr,Di=new Dr,Ii=new Dr,Ni=new Dr,Fi=new Dr,Bi=new Dr,zi=new wr,Ui=new wr,Gi=new wr,Hi=new Dr,Vi=new Dr;function ki(e,t){on.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new Ti,this.material=void 0!==t?t:new ii,this.updateMorphTargets()}function ji(e,t,r,n,i,a,o,s){if(null===(t.side===f?n.intersectTriangle(o,a,i,!0,s):n.intersectTriangle(i,a,o,t.side!==m,s)))return null;Vi.copy(s),Vi.applyMatrix4(e.matrixWorld);var c=r.ray.origin.distanceTo(Vi);return c<r.near||c>r.far?null:{distance:c,point:Vi.clone(),object:e}}function Wi(e,t,r,n,i,a,o,s,c,l,h,u){Ri.fromBufferAttribute(i,l),Ci.fromBufferAttribute(i,h),Pi.fromBufferAttribute(i,u);var p=e.morphTargetInfluences;if(t.morphTargets&&a&&p){Ni.set(0,0,0),Fi.set(0,0,0),Bi.set(0,0,0);for(var d=0,f=a.length;d<f;d++){var m=p[d],v=a[d];0!==m&&(Oi.fromBufferAttribute(v,l),Di.fromBufferAttribute(v,h),Ii.fromBufferAttribute(v,u),o?(Ni.addScaledVector(Oi,m),Fi.addScaledVector(Di,m),Bi.addScaledVector(Ii,m)):(Ni.addScaledVector(Oi.sub(Ri),m),Fi.addScaledVector(Di.sub(Ci),m),Bi.addScaledVector(Ii.sub(Pi),m)))}Ri.add(Ni),Ci.add(Fi),Pi.add(Bi)}var g=ji(e,t,r,n,Ri,Ci,Pi,Hi);if(g){s&&(zi.fromBufferAttribute(s,l),Ui.fromBufferAttribute(s,h),Gi.fromBufferAttribute(s,u),g.uv=Xn.getUV(Hi,Ri,Ci,Pi,zi,Ui,Gi,new wr)),c&&(zi.fromBufferAttribute(c,l),Ui.fromBufferAttribute(c,h),Gi.fromBufferAttribute(c,u),g.uv2=Xn.getUV(Hi,Ri,Ci,Pi,zi,Ui,Gi,new wr));var y=new ti(l,h,u);Xn.getNormal(Ri,Ci,Pi,y.normal),g.face=y}return g}ki.prototype=Object.assign(Object.create(on.prototype),{constructor:ki,isMesh:!0,copy:function(e){return on.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,r,n=this.geometry;if(n.isBufferGeometry){var i=n.morphAttributes,a=Object.keys(i);if(a.length>0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)r=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=e}}else{var s=n.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var r,n=this.geometry,i=this.material,a=this.matrixWorld;if(void 0!==i&&(null===n.boundingSphere&&n.computeBoundingSphere(),Li.copy(n.boundingSphere),Li.applyMatrix4(a),!1!==e.ray.intersectsSphere(Li)&&(Ei.getInverse(a),Ai.copy(e.ray).applyMatrix4(Ei),null===n.boundingBox||!1!==Ai.intersectsBox(n.boundingBox))))if(n.isBufferGeometry){var o,s,c,l,h,u,p,d,f,m=n.index,v=n.attributes.position,g=n.morphAttributes.position,y=n.morphTargetsRelative,x=n.attributes.uv,b=n.attributes.uv2,_=n.groups,w=n.drawRange;if(null!==m)if(Array.isArray(i))for(l=0,u=_.length;l<u;l++)for(f=i[(d=_[l]).materialIndex],h=Math.max(d.start,w.start),p=Math.min(d.start+d.count,w.start+w.count);h<p;h+=3)o=m.getX(h),s=m.getX(h+1),c=m.getX(h+2),(r=Wi(this,f,e,Ai,v,g,y,x,b,o,s,c))&&(r.faceIndex=Math.floor(h/3),r.face.materialIndex=d.materialIndex,t.push(r));else for(l=Math.max(0,w.start),u=Math.min(m.count,w.start+w.count);l<u;l+=3)o=m.getX(l),s=m.getX(l+1),c=m.getX(l+2),(r=Wi(this,i,e,Ai,v,g,y,x,b,o,s,c))&&(r.faceIndex=Math.floor(l/3),t.push(r));else if(void 0!==v)if(Array.isArray(i))for(l=0,u=_.length;l<u;l++)for(f=i[(d=_[l]).materialIndex],h=Math.max(d.start,w.start),p=Math.min(d.start+d.count,w.start+w.count);h<p;h+=3)(r=Wi(this,f,e,Ai,v,g,y,x,b,o=h,s=h+1,c=h+2))&&(r.faceIndex=Math.floor(h/3),r.face.materialIndex=d.materialIndex,t.push(r));else for(l=Math.max(0,w.start),u=Math.min(v.count,w.start+w.count);l<u;l+=3)(r=Wi(this,i,e,Ai,v,g,y,x,b,o=l,s=l+1,c=l+2))&&(r.faceIndex=Math.floor(l/3),t.push(r))}else if(n.isGeometry){var M,S,T,E,A=Array.isArray(i),L=n.vertices,R=n.faces,C=n.faceVertexUvs[0];C.length>0&&(E=C);for(var P=0,O=R.length;P<O;P++){var D=R[P],I=A?i[D.materialIndex]:i;if(void 0!==I&&(M=L[D.a],S=L[D.b],T=L[D.c],r=ji(this,I,e,Ai,M,S,T,Hi))){if(E&&E[P]){var N=E[P];zi.copy(N[0]),Ui.copy(N[1]),Gi.copy(N[2]),r.uv=Xn.getUV(Hi,M,S,T,zi,Ui,Gi,new wr)}r.face=D,r.faceIndex=P,t.push(r)}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var qi=0,Xi=new Hr,Yi=new on,Zi=new Dr;function Ji(){Object.defineProperty(this,"id",{value:qi+=2}),this.uuid=_r.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}Ji.prototype=Object.assign(Object.create(gr.prototype),{constructor:Ji,isGeometry:!0,applyMatrix4:function(e){for(var t=(new Mr).getNormalMatrix(e),r=0,n=this.vertices.length;r<n;r++){this.vertices[r].applyMatrix4(e)}for(r=0,n=this.faces.length;r<n;r++){var i=this.faces[r];i.normal.applyMatrix3(t).normalize();for(var a=0,o=i.vertexNormals.length;a<o;a++)i.vertexNormals[a].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(e){return Xi.makeRotationX(e),this.applyMatrix4(Xi),this},rotateY:function(e){return Xi.makeRotationY(e),this.applyMatrix4(Xi),this},rotateZ:function(e){return Xi.makeRotationZ(e),this.applyMatrix4(Xi),this},translate:function(e,t,r){return Xi.makeTranslation(e,t,r),this.applyMatrix4(Xi),this},scale:function(e,t,r){return Xi.makeScale(e,t,r),this.applyMatrix4(Xi),this},lookAt:function(e){return Yi.lookAt(e),Yi.updateMatrix(),this.applyMatrix4(Yi.matrix),this},fromBufferGeometry:function(e){var t=this,r=null!==e.index?e.index.array:void 0,n=e.attributes;if(void 0===n.position)return console.error("THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion."),this;var i=n.position.array,a=void 0!==n.normal?n.normal.array:void 0,o=void 0!==n.color?n.color.array:void 0,s=void 0!==n.uv?n.uv.array:void 0,c=void 0!==n.uv2?n.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var l=0;l<i.length;l+=3)t.vertices.push((new Dr).fromArray(i,l)),void 0!==o&&t.colors.push((new Qn).fromArray(o,l));function h(e,r,n,i){var l=void 0===o?[]:[t.colors[e].clone(),t.colors[r].clone(),t.colors[n].clone()],h=new ti(e,r,n,void 0===a?[]:[(new Dr).fromArray(a,3*e),(new Dr).fromArray(a,3*r),(new Dr).fromArray(a,3*n)],l,i);t.faces.push(h),void 0!==s&&t.faceVertexUvs[0].push([(new wr).fromArray(s,2*e),(new wr).fromArray(s,2*r),(new wr).fromArray(s,2*n)]),void 0!==c&&t.faceVertexUvs[1].push([(new wr).fromArray(c,2*e),(new wr).fromArray(c,2*r),(new wr).fromArray(c,2*n)])}var u=e.groups;if(u.length>0)for(l=0;l<u.length;l++)for(var p=u[l],d=p.start,f=d,m=d+p.count;f<m;f+=3)void 0!==r?h(r[f],r[f+1],r[f+2],p.materialIndex):h(f,f+1,f+2,p.materialIndex);else if(void 0!==r)for(l=0;l<r.length;l+=3)h(r[l],r[l+1],r[l+2]);else for(l=0;l<i.length/3;l+=3)h(l,l+1,l+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Zi).negate(),this.translate(Zi.x,Zi.y,Zi.z),this},normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,r=0===t?1:1/t,n=new Hr;return n.set(r,0,0,-r*e.x,0,r,0,-r*e.y,0,0,r,-r*e.z,0,0,0,1),this.applyMatrix4(n),this},computeFaceNormals:function(){for(var e=new Dr,t=new Dr,r=0,n=this.faces.length;r<n;r++){var i=this.faces[r],a=this.vertices[i.a],o=this.vertices[i.b],s=this.vertices[i.c];e.subVectors(s,o),t.subVectors(a,o),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){var t,r,n,i,a,o;for(void 0===e&&(e=!0),o=new Array(this.vertices.length),t=0,r=this.vertices.length;t<r;t++)o[t]=new Dr;if(e){var s,c,l,h=new Dr,u=new Dr;for(n=0,i=this.faces.length;n<i;n++)a=this.faces[n],s=this.vertices[a.a],c=this.vertices[a.b],l=this.vertices[a.c],h.subVectors(l,c),u.subVectors(s,c),h.cross(u),o[a.a].add(h),o[a.b].add(h),o[a.c].add(h)}else for(this.computeFaceNormals(),n=0,i=this.faces.length;n<i;n++)o[(a=this.faces[n]).a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(t=0,r=this.vertices.length;t<r;t++)o[t].normalize();for(n=0,i=this.faces.length;n<i;n++){var p=(a=this.faces[n]).vertexNormals;3===p.length?(p[0].copy(o[a.a]),p[1].copy(o[a.b]),p[2].copy(o[a.c])):(p[0]=o[a.a].clone(),p[1]=o[a.b].clone(),p[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,r;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var n=(r=this.faces[e]).vertexNormals;3===n.length?(n[0].copy(r.normal),n[1].copy(r.normal),n[2].copy(r.normal)):(n[0]=r.normal.clone(),n[1]=r.normal.clone(),n[2]=r.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,r,n,i;for(r=0,n=this.faces.length;r<n;r++)for((i=this.faces[r]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),e=0,t=i.vertexNormals.length;e<t;e++)i.__originalVertexNormals[e]?i.__originalVertexNormals[e].copy(i.vertexNormals[e]):i.__originalVertexNormals[e]=i.vertexNormals[e].clone();var a=new Ji;for(a.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var o=this.morphNormals[e].faceNormals,s=this.morphNormals[e].vertexNormals;for(r=0,n=this.faces.length;r<n;r++)c=new Dr,l={a:new Dr,b:new Dr,c:new Dr},o.push(c),s.push(l)}var c,l,h=this.morphNormals[e];for(a.vertices=this.morphTargets[e].vertices,a.computeFaceNormals(),a.computeVertexNormals(),r=0,n=this.faces.length;r<n;r++)i=this.faces[r],c=h.faceNormals[r],l=h.vertexNormals[r],c.copy(i.normal),l.a.copy(i.vertexNormals[0]),l.b.copy(i.vertexNormals[1]),l.c.copy(i.vertexNormals[2])}for(r=0,n=this.faces.length;r<n;r++)(i=this.faces[r]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new _n),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Sn),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,r){if(e&&e.isGeometry){var n,i=this.vertices.length,a=this.vertices,o=e.vertices,s=this.faces,c=e.faces,l=this.colors,h=e.colors;void 0===r&&(r=0),void 0!==t&&(n=(new Mr).getNormalMatrix(t));for(var u=0,p=o.length;u<p;u++){var d=o[u].clone();void 0!==t&&d.applyMatrix4(t),a.push(d)}for(u=0,p=h.length;u<p;u++)l.push(h[u].clone());for(u=0,p=c.length;u<p;u++){var f,m,v,g=c[u],y=g.vertexNormals,x=g.vertexColors;(f=new ti(g.a+i,g.b+i,g.c+i)).normal.copy(g.normal),void 0!==n&&f.normal.applyMatrix3(n).normalize();for(var b=0,_=y.length;b<_;b++)m=y[b].clone(),void 0!==n&&m.applyMatrix3(n).normalize(),f.vertexNormals.push(m);f.color.copy(g.color);for(b=0,_=x.length;b<_;b++)v=x[b],f.vertexColors.push(v.clone());f.materialIndex=g.materialIndex+r,s.push(f)}for(u=0,p=e.faceVertexUvs.length;u<p;u++){var w=e.faceVertexUvs[u];void 0===this.faceVertexUvs[u]&&(this.faceVertexUvs[u]=[]);for(b=0,_=w.length;b<_;b++){for(var M=w[b],S=[],T=0,E=M.length;T<E;T++)S.push(M[T].clone());this.faceVertexUvs[u].push(S)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){var e,t,r,n,i,a,o,s,c={},l=[],h=[],u=Math.pow(10,4);for(r=0,n=this.vertices.length;r<n;r++)e=this.vertices[r],void 0===c[t=Math.round(e.x*u)+"_"+Math.round(e.y*u)+"_"+Math.round(e.z*u)]?(c[t]=r,l.push(this.vertices[r]),h[r]=l.length-1):h[r]=h[c[t]];var p=[];for(r=0,n=this.faces.length;r<n;r++){(i=this.faces[r]).a=h[i.a],i.b=h[i.b],i.c=h[i.c],a=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(a[d]===a[(d+1)%3]){p.push(r);break}}for(r=p.length-1;r>=0;r--){var f=p[r];for(this.faces.splice(f,1),o=0,s=this.faceVertexUvs.length;o<s;o++)this.faceVertexUvs[o].splice(f,1)}var m=this.vertices.length-l.length;return this.vertices=l,m},setFromPoints:function(e){this.vertices=[];for(var t=0,r=e.length;t<r;t++){var n=e[t];this.vertices.push(new Dr(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,r=0;r<t;r++)e[r]._id=r;e.sort(function(e,t){return e.materialIndex-t.materialIndex});var n,i,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];a&&a.length===t&&(n=[]),o&&o.length===t&&(i=[]);for(r=0;r<t;r++){var s=e[r]._id;n&&n.push(a[s]),i&&i.push(o[s])}n&&(this.faceVertexUvs[0]=n),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}for(var n=[],i=0;i<this.vertices.length;i++){var a=this.vertices[i];n.push(a.x,a.y,a.z)}var o=[],s=[],c={},l=[],h={},u=[],p={};for(i=0;i<this.faces.length;i++){var d=this.faces[i],f=void 0!==this.faceVertexUvs[0][i],m=d.normal.length()>0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,x=0;if(x=M(x,0,0),x=M(x,1,!0),x=M(x,2,!1),x=M(x,3,f),x=M(x,4,m),x=M(x,5,v),x=M(x,6,g),x=M(x,7,y),o.push(x),o.push(d.a,d.b,d.c),o.push(d.materialIndex),f){var b=this.faceVertexUvs[0][i];o.push(E(b[0]),E(b[1]),E(b[2]))}if(m&&o.push(S(d.normal)),v){var _=d.vertexNormals;o.push(S(_[0]),S(_[1]),S(_[2]))}if(g&&o.push(T(d.color)),y){var w=d.vertexColors;o.push(T(w[0]),T(w[1]),T(w[2]))}}function M(e,t,r){return r?e|1<<t:e&~(1<<t)}function S(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==c[t]?c[t]:(c[t]=s.length/3,s.push(e.x,e.y,e.z),c[t])}function T(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==h[t]?h[t]:(h[t]=l.length,l.push(e.getHex()),h[t])}function E(e){var t=e.x.toString()+e.y.toString();return void 0!==p[t]?p[t]:(p[t]=u.length/2,u.push(e.x,e.y),p[t])}return e.data={},e.data.vertices=n,e.data.normals=s,l.length>0&&(e.data.colors=l),u.length>0&&(e.data.uvs=[u]),e.data.faces=o,e},clone:function(){return(new Ji).copy(this)},copy:function(e){var t,r,n,i,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,r=s.length;t<r;t++)this.vertices.push(s[t].clone());var c=e.colors;for(t=0,r=c.length;t<r;t++)this.colors.push(c[t].clone());var l=e.faces;for(t=0,r=l.length;t<r;t++)this.faces.push(l[t].clone());for(t=0,r=e.faceVertexUvs.length;t<r;t++){var h=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),n=0,i=h.length;n<i;n++){var u=h[n],p=[];for(a=0,o=u.length;a<o;a++){var d=u[a];p.push(d.clone())}this.faceVertexUvs[t].push(p)}}var f=e.morphTargets;for(t=0,r=f.length;t<r;t++){var m={};if(m.name=f[t].name,void 0!==f[t].vertices)for(m.vertices=[],n=0,i=f[t].vertices.length;n<i;n++)m.vertices.push(f[t].vertices[n].clone());if(void 0!==f[t].normals)for(m.normals=[],n=0,i=f[t].normals.length;n<i;n++)m.normals.push(f[t].normals[n].clone());this.morphTargets.push(m)}var v=e.morphNormals;for(t=0,r=v.length;t<r;t++){var g={};if(void 0!==v[t].vertexNormals)for(g.vertexNormals=[],n=0,i=v[t].vertexNormals.length;n<i;n++){var y=v[t].vertexNormals[n],x={};x.a=y.a.clone(),x.b=y.b.clone(),x.c=y.c.clone(),g.vertexNormals.push(x)}if(void 0!==v[t].faceNormals)for(g.faceNormals=[],n=0,i=v[t].faceNormals.length;n<i;n++)g.faceNormals.push(v[t].faceNormals[n].clone());this.morphNormals.push(g)}var b=e.skinWeights;for(t=0,r=b.length;t<r;t++)this.skinWeights.push(b[t].clone());var _=e.skinIndices;for(t=0,r=_.length;t<r;t++)this.skinIndices.push(_[t].clone());var w=e.lineDistances;for(t=0,r=w.length;t<r;t++)this.lineDistances.push(w[t]);var M=e.boundingBox;null!==M&&(this.boundingBox=M.clone());var S=e.boundingSphere;return null!==S&&(this.boundingSphere=S.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});class Qi extends Ji{constructor(e,t,r,n,i,a){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:n,heightSegments:i,depthSegments:a},this.fromBufferGeometry(new Ki(e,t,r,n,i,a)),this.mergeVertices()}}exports.CubeGeometry=exports.BoxGeometry=Qi;class Ki extends Ti{constructor(e,t,r,n,i,a){super(),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:r,widthSegments:n,heightSegments:i,depthSegments:a};var o=this;e=e||1,t=t||1,r=r||1,n=Math.floor(n)||1,i=Math.floor(i)||1,a=Math.floor(a)||1;var s=[],c=[],l=[],h=[],u=0,p=0;function d(e,t,r,n,i,a,d,f,m,v,g){var y,x,b=a/m,_=d/v,w=a/2,M=d/2,S=f/2,T=m+1,E=v+1,A=0,L=0,R=new Dr;for(x=0;x<E;x++){var C=x*_-M;for(y=0;y<T;y++){var P=y*b-w;R[e]=P*n,R[t]=C*i,R[r]=S,c.push(R.x,R.y,R.z),R[e]=0,R[t]=0,R[r]=f>0?1:-1,l.push(R.x,R.y,R.z),h.push(y/m),h.push(1-x/v),A+=1}}for(x=0;x<v;x++)for(y=0;y<m;y++){var O=u+y+T*x,D=u+y+T*(x+1),I=u+(y+1)+T*(x+1),N=u+(y+1)+T*x;s.push(O,D,N),s.push(D,I,N),L+=6}o.addGroup(p,L,g),p+=L,u+=A}d("z","y","x",-1,-1,r,t,e,a,i,0),d("z","y","x",1,-1,r,t,-e,a,i,1),d("x","z","y",1,1,e,r,t,n,a,2),d("x","z","y",1,-1,e,r,-t,n,a,3),d("x","y","z",1,-1,e,t,r,n,i,4),d("x","y","z",-1,-1,e,t,-r,n,i,5),this.setIndex(s),this.setAttribute("position",new fi(c,3)),this.setAttribute("normal",new fi(l,3)),this.setAttribute("uv",new fi(h,2))}}function $i(e){var t={};for(var r in e)for(var n in t[r]={},e[r]){var i=e[r][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[r][n]=i.clone():Array.isArray(i)?t[r][n]=i.slice():t[r][n]=i}return t}function ea(e){for(var t={},r=0;r<e.length;r++){var n=$i(e[r]);for(var i in n)t[i]=n[i]}return t}exports.BoxBufferGeometry=Ki;var ta={clone:$i,merge:ea};exports.UniformsUtils=ta;var ra="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",na="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";function ia(e){ni.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=ra,this.fragmentShader=na,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function aa(){on.call(this),this.type="Camera",this.matrixWorldInverse=new Hr,this.projectionMatrix=new Hr,this.projectionMatrixInverse=new Hr}function oa(e,t,r,n){aa.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==r?r:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}ia.prototype=Object.create(ni.prototype),ia.prototype.constructor=ia,ia.prototype.isShaderMaterial=!0,ia.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=$i(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},ia.prototype.toJSON=function(e){var t=ni.prototype.toJSON.call(this,e);for(var r in t.uniforms={},this.uniforms){var n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var a in this.extensions)!0===this.extensions[a]&&(i[a]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},aa.prototype=Object.assign(Object.create(on.prototype),{constructor:aa,isCamera:!0,copy:function(e,t){return on.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Dr),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){on.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},updateWorldMatrix:function(e,t){on.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),oa.prototype=Object.assign(Object.create(aa.prototype),{constructor:oa,isPerspectiveCamera:!0,copy:function(e,t){return aa.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*_r.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*_r.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*_r.RAD2DEG*Math.atan(Math.tan(.5*_r.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,r,n,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=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*_r.DEG2RAD*this.fov)/this.zoom,r=2*t,n=this.aspect*r,i=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;i+=a.offsetX*n/o,t-=a.offsetY*r/s,n*=a.width/o,r*=a.height/s}var c=this.filmOffset;0!==c&&(i+=e*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+n,t,t-r,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=on.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}});var sa=90,ca=1;function la(e,t,r,n){on.call(this),this.type="CubeCamera";var i=new oa(sa,ca,e,t);i.up.set(0,-1,0),i.lookAt(new Dr(1,0,0)),this.add(i);var a=new oa(sa,ca,e,t);a.up.set(0,-1,0),a.lookAt(new Dr(-1,0,0)),this.add(a);var o=new oa(sa,ca,e,t);o.up.set(0,0,1),o.lookAt(new Dr(0,1,0)),this.add(o);var s=new oa(sa,ca,e,t);s.up.set(0,0,-1),s.lookAt(new Dr(0,-1,0)),this.add(s);var c=new oa(sa,ca,e,t);c.up.set(0,-1,0),c.lookAt(new Dr(0,0,1)),this.add(c);var l=new oa(sa,ca,e,t);l.up.set(0,-1,0),l.lookAt(new Dr(0,0,-1)),this.add(l),n=n||{format:Ge,magFilter:we,minFilter:we},this.renderTarget=new ha(r,n),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var r=e.getRenderTarget(),n=this.renderTarget,h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,a),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,s),e.setRenderTarget(n,4),e.render(t,c),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(r)},this.clear=function(e,t,r,n){for(var i=e.getRenderTarget(),a=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(a,o),e.clear(t,r,n);e.setRenderTarget(i)}}function ha(e,t,r){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=r),Lr.call(this,e,e,t)}function ua(e,t,r,n,i,a,o,s,c,l,h,u){Er.call(this,null,a,o,s,c,l,n,i,h,u),this.image={data:e||null,width:t||1,height:r||1},this.magFilter=void 0!==c?c:ge,this.minFilter=void 0!==l?l:ge,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}la.prototype=Object.create(on.prototype),la.prototype.constructor=la,ha.prototype=Object.create(Lr.prototype),ha.prototype.constructor=ha,ha.prototype.isWebGLCubeRenderTarget=!0,ha.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var r=new sn,n={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include <begin_vertex>","\t#include <project_vertex>","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},i=new ia({type:"CubemapFromEquirect",uniforms:$i(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:f,blending:_});i.uniforms.tEquirect.value=t;var a=new ki(new Ki(5,5,5),i);r.add(a);var o=new la(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,r),a.geometry.dispose(),a.material.dispose(),this},ua.prototype=Object.create(Er.prototype),ua.prototype.constructor=ua,ua.prototype.isDataTexture=!0;var pa=new Sn,da=new Dr;function fa(e,t,r,n,i,a){this.planes=[void 0!==e?e:new Fn,void 0!==t?t:new Fn,void 0!==r?r:new Fn,void 0!==n?n:new Fn,void 0!==i?i:new Fn,void 0!==a?a:new Fn]}Object.assign(fa.prototype,{set:function(e,t,r,n,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(r),o[3].copy(n),o[4].copy(i),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,r=0;r<6;r++)t[r].copy(e.planes[r]);return this},setFromProjectionMatrix:function(e){var t=this.planes,r=e.elements,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],h=r[7],u=r[8],p=r[9],d=r[10],f=r[11],m=r[12],v=r[13],g=r[14],y=r[15];return t[0].setComponents(o-n,h-s,f-u,y-m).normalize(),t[1].setComponents(o+n,h+s,f+u,y+m).normalize(),t[2].setComponents(o+i,h+c,f+p,y+v).normalize(),t[3].setComponents(o-i,h-c,f-p,y-v).normalize(),t[4].setComponents(o-a,h-l,f-d,y-g).normalize(),t[5].setComponents(o+a,h+l,f+d,y+g).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),pa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(pa)},intersectsSprite:function(e){return pa.center.set(0,0,0),pa.radius=.7071067811865476,pa.applyMatrix4(e.matrixWorld),this.intersectsSphere(pa)},intersectsSphere:function(e){for(var t=this.planes,r=e.center,n=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(r)<n)return!1}return!0},intersectsBox:function(e){for(var t=this.planes,r=0;r<6;r++){var n=t[r];if(da.x=n.normal.x>0?e.max.x:e.min.x,da.y=n.normal.y>0?e.max.y:e.min.y,da.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(da)<0)return!1}return!0},containsPoint:function(e){for(var t=this.planes,r=0;r<6;r++)if(t[r].distanceToPoint(e)<0)return!1;return!0}});var ma={common:{diffuse:{value:new Qn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Mr},uv2Transform:{value:new Mr},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new wr(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 Qn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new Qn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Mr}},sprite:{diffuse:{value:new Qn(15658734)},opacity:{value:1},center:{value:new wr(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Mr}}};function va(){var e=null,t=!1,r=null;function n(i,a){!1!==t&&(r(i,a),e.requestAnimationFrame(n))}return{start:function(){!0!==t&&null!==r&&(e.requestAnimationFrame(n),t=!0)},stop:function(){t=!1},setAnimationLoop:function(e){r=e},setContext:function(t){e=t}}}function ga(e,t){var r=t.isWebGL2,n=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var r=n.get(t);r&&(e.deleteBuffer(r.buffer),n.delete(t))},update:function(t,i){t.isInterleavedBufferAttribute&&(t=t.data);var a=n.get(t);void 0===a?n.set(t,function(t,r){var n=t.array,i=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,n,i),t.onUploadCallback();var o=5126;return n instanceof Float32Array?o=5126:n instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):n instanceof Uint16Array?o=5123:n instanceof Int16Array?o=5122:n instanceof Uint32Array?o=5125:n instanceof Int32Array?o=5124:n instanceof Int8Array?o=5120:n instanceof Uint8Array&&(o=5121),{buffer:a,type:o,bytesPerElement:n.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,n,i){var a=n.array,o=n.updateRange;e.bindBuffer(i,t),-1===o.count?e.bufferSubData(i,0,a):(r?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)}}}function ya(e,t,r,n){Ji.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:n},this.fromBufferGeometry(new xa(e,t,r,n)),this.mergeVertices()}function xa(e,t,r,n){Ti.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:r,heightSegments:n};var i,a,o=(e=e||1)/2,s=(t=t||1)/2,c=Math.floor(r)||1,l=Math.floor(n)||1,h=c+1,u=l+1,p=e/c,d=t/l,f=[],m=[],v=[],g=[];for(a=0;a<u;a++){var y=a*d-s;for(i=0;i<h;i++){var x=i*p-o;m.push(x,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-a/l)}}for(a=0;a<l;a++)for(i=0;i<c;i++){var b=i+h*a,_=i+h*(a+1),w=i+1+h*(a+1),M=i+1+h*a;f.push(b,_,M),f.push(_,w,M)}this.setIndex(f),this.setAttribute("position",new fi(m,3)),this.setAttribute("normal",new fi(v,3)),this.setAttribute("uv",new fi(g,2))}exports.UniformsLib=ma,ya.prototype=Object.create(Ji.prototype),ya.prototype.constructor=ya,xa.prototype=Object.create(Ti.prototype),xa.prototype.constructor=xa;var ba="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",_a="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",wa="#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",Ma="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",Sa="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",Ta="vec3 transformed = vec3( position );",Ea="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",Aa="vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha  = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",La="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",Ra="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",Ca="#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",Pa="#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",Oa="#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif",Da="#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",Ia="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Na="#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",Fa="#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",Ba="#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n  return m[ 2 ][ 3 ] == - 1.0;\n}",za="#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_maxMipLevel 8.0\n#define cubeUV_minMipLevel 4.0\n#define cubeUV_maxTileSize 256.0\n#define cubeUV_minTileSize 16.0\nfloat getFace(vec3 direction) {\n    vec3 absDirection = abs(direction);\n    float face = -1.0;\n    if (absDirection.x > absDirection.z) {\n      if (absDirection.x > absDirection.y)\n        face = direction.x > 0.0 ? 0.0 : 3.0;\n      else\n        face = direction.y > 0.0 ? 1.0 : 4.0;\n    } else {\n      if (absDirection.z > absDirection.y)\n        face = direction.z > 0.0 ? 2.0 : 5.0;\n      else\n        face = direction.y > 0.0 ? 1.0 : 4.0;\n    }\n    return face;\n}\nvec2 getUV(vec3 direction, float face) {\n    vec2 uv;\n    if (face == 0.0) {\n      uv = vec2(-direction.z, direction.y) / abs(direction.x);\n    } else if (face == 1.0) {\n      uv = vec2(direction.x, -direction.z) / abs(direction.y);\n    } else if (face == 2.0) {\n      uv = direction.xy / abs(direction.z);\n    } else if (face == 3.0) {\n      uv = vec2(direction.z, direction.y) / abs(direction.x);\n    } else if (face == 4.0) {\n      uv = direction.xz / abs(direction.y);\n    } else {\n      uv = vec2(-direction.x, direction.y) / abs(direction.z);\n    }\n    return 0.5 * (uv + 1.0);\n}\nvec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) {\n  float face = getFace(direction);\n  float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0);\n  mipInt = max(mipInt, cubeUV_minMipLevel);\n  float faceSize = exp2(mipInt);\n  float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize);\n  vec2 uv = getUV(direction, face) * (faceSize - 1.0);\n  vec2 f = fract(uv);\n  uv += 0.5 - f;\n  if (face > 2.0) {\n    uv.y += faceSize;\n    face -= 3.0;\n  }\n  uv.x += face * faceSize;\n  if(mipInt < cubeUV_maxMipLevel){\n    uv.y += 2.0 * cubeUV_maxTileSize;\n  }\n  uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n  uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize);\n  uv *= texelSize;\n  vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n  uv.x += texelSize;\n  vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n  uv.y += texelSize;\n  vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n  uv.x -= texelSize;\n  vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n  vec3 tm = mix(tl, tr, f.x);\n  vec3 bm = mix(bl, br, f.x);\n  return mix(tm, bm, f.y);\n}\n#define r0 1.0\n#define v0 0.339\n#define m0 -2.0\n#define r1 0.8\n#define v1 0.276\n#define m1 -1.0\n#define r4 0.4\n#define v4 0.046\n#define m4 2.0\n#define r5 0.305\n#define v5 0.016\n#define m5 3.0\n#define r6 0.21\n#define v6 0.0038\n#define m6 4.0\nfloat roughnessToMip(float roughness) {\n  float mip = 0.0;\n  if (roughness >= r1) {\n    mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0;\n  } else if (roughness >= r4) {\n    mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1;\n  } else if (roughness >= r5) {\n    mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4;\n  } else if (roughness >= r6) {\n    mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5;\n  } else {\n    mip = -2.0 * log2(1.16 * roughness);  }\n  return mip;\n}\nvec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) {\n  float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel);\n  float mipF = fract(mip);\n  float mipInt = floor(mip);\n  vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt);\n  if (mipF == 0.0) {\n    return vec4(color0, 1.0);\n  } else {\n    vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0);\n    return vec4(mix(color0, color1, mipF), 1.0);\n  }\n}\n#endif",Ua="vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\ttransformedNormal = mat3( instanceMatrix ) * 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",Ga="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",Ha="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",Va="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",ka="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",ja="gl_FragColor = linearToOutputTexel( gl_FragColor );",Wa="\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}",qa="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}  else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",Xa="#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",Ya="#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",Za="#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",Ja="#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",Qa="#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",Ka="#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",$a="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",eo="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",to="#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}",ro="#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",no="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",io="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;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\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#endif",ao="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",oo="#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t  vec3 reflectVec = reflect( -viewDir, normal );\n\t\t  reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t  vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",so="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",co="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lo="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",ho="varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",uo="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatRoughness = max( clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",po="struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",fo="\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\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#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\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",mo="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",vo="#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",go="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",yo="#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",xo="#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",bo="#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",_o="#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",wo="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",Mo="#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",So="#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",To="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",Eo="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",Ao="#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",Lo="#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",Ro="#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\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",Co="#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",Po="#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",Oo="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",Do="#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",Io="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",No="#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",Fo="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}",Bo="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",zo="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",Uo="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",Go="#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",Ho="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",Vo="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",ko="#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#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#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#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",jo="#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#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#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#endif\n#endif",Wo="#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif",qo="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}",Xo="#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",Yo="#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",Zo="#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",Jo="#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",Qo="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",Ko="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",$o="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",es="#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\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}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",ts="#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",rs="#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",ns="#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",is="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",as="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",os="#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",ss="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",cs="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}",ls="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}",hs="#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}",us="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}",ps="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\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\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}",ds="#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <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}",fs="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",ms="#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}",vs="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",gs="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",ys="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",xs="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",bs="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",_s="#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",ws="uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Ms="#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}",Ss="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",Ts="#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",Es="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <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_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 + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",As="#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Ls="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Rs="#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Cs="#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_normalmap_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 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",Ps="#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",Os="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",Ds="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",Is="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",Ns="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}",Fs="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}",Bs="#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 <shadowmap_vertex>\n\t#include <fog_vertex>\n}",zs="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",Us="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}",Gs={alphamap_fragment:ba,alphamap_pars_fragment:_a,alphatest_fragment:wa,aomap_fragment:Ma,aomap_pars_fragment:Sa,begin_vertex:Ta,beginnormal_vertex:Ea,bsdfs:Aa,bumpmap_pars_fragment:La,clipping_planes_fragment:Ra,clipping_planes_pars_fragment:Ca,clipping_planes_pars_vertex:Pa,clipping_planes_vertex:Oa,color_fragment:Da,color_pars_fragment:Ia,color_pars_vertex:Na,color_vertex:Fa,common:Ba,cube_uv_reflection_fragment:za,defaultnormal_vertex:Ua,displacementmap_pars_vertex:Ga,displacementmap_vertex:Ha,emissivemap_fragment:Va,emissivemap_pars_fragment:ka,encodings_fragment:ja,encodings_pars_fragment:Wa,envmap_fragment:qa,envmap_common_pars_fragment:Xa,envmap_pars_fragment:Ya,envmap_pars_vertex:Za,envmap_physical_pars_fragment:oo,envmap_vertex:Ja,fog_vertex:Qa,fog_pars_vertex:Ka,fog_fragment:$a,fog_pars_fragment:eo,gradientmap_pars_fragment:to,lightmap_fragment:ro,lightmap_pars_fragment:no,lights_lambert_vertex:io,lights_pars_begin:ao,lights_toon_fragment:so,lights_toon_pars_fragment:co,lights_phong_fragment:lo,lights_phong_pars_fragment:ho,lights_physical_fragment:uo,lights_physical_pars_fragment:po,lights_fragment_begin:fo,lights_fragment_maps:mo,lights_fragment_end:vo,logdepthbuf_fragment:go,logdepthbuf_pars_fragment:yo,logdepthbuf_pars_vertex:xo,logdepthbuf_vertex:bo,map_fragment:_o,map_pars_fragment:wo,map_particle_fragment:Mo,map_particle_pars_fragment:So,metalnessmap_fragment:To,metalnessmap_pars_fragment:Eo,morphnormal_vertex:Ao,morphtarget_pars_vertex:Lo,morphtarget_vertex:Ro,normal_fragment_begin:Co,normal_fragment_maps:Po,normalmap_pars_fragment:Oo,clearcoat_normal_fragment_begin:Do,clearcoat_normal_fragment_maps:Io,clearcoat_normalmap_pars_fragment:No,packing:Fo,premultiplied_alpha_fragment:Bo,project_vertex:zo,dithering_fragment:Uo,dithering_pars_fragment:Go,roughnessmap_fragment:Ho,roughnessmap_pars_fragment:Vo,shadowmap_pars_fragment:ko,shadowmap_pars_vertex:jo,shadowmap_vertex:Wo,shadowmask_pars_fragment:qo,skinbase_vertex:Xo,skinning_pars_vertex:Yo,skinning_vertex:Zo,skinnormal_vertex:Jo,specularmap_fragment:Qo,specularmap_pars_fragment:Ko,tonemapping_fragment:$o,tonemapping_pars_fragment:es,uv_pars_fragment:ts,uv_pars_vertex:rs,uv_vertex:ns,uv2_pars_fragment:is,uv2_pars_vertex:as,uv2_vertex:os,worldpos_vertex:ss,background_frag:cs,background_vert:ls,cube_frag:hs,cube_vert:us,depth_frag:ps,depth_vert:ds,distanceRGBA_frag:fs,distanceRGBA_vert:ms,equirect_frag:vs,equirect_vert:gs,linedashed_frag:ys,linedashed_vert:xs,meshbasic_frag:bs,meshbasic_vert:_s,meshlambert_frag:ws,meshlambert_vert:Ms,meshmatcap_frag:Ss,meshmatcap_vert:Ts,meshtoon_frag:Es,meshtoon_vert:As,meshphong_frag:Ls,meshphong_vert:Rs,meshphysical_frag:Cs,meshphysical_vert:Ps,normal_frag:Os,normal_vert:Ds,points_frag:Is,points_vert:Ns,shadow_frag:Fs,shadow_vert:Bs,sprite_frag:zs,sprite_vert:Us};exports.ShaderChunk=Gs;var Hs={basic:{uniforms:ea([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.fog]),vertexShader:Gs.meshbasic_vert,fragmentShader:Gs.meshbasic_frag},lambert:{uniforms:ea([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.fog,ma.lights,{emissive:{value:new Qn(0)}}]),vertexShader:Gs.meshlambert_vert,fragmentShader:Gs.meshlambert_frag},phong:{uniforms:ea([ma.common,ma.specularmap,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.fog,ma.lights,{emissive:{value:new Qn(0)},specular:{value:new Qn(1118481)},shininess:{value:30}}]),vertexShader:Gs.meshphong_vert,fragmentShader:Gs.meshphong_frag},standard:{uniforms:ea([ma.common,ma.envmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.roughnessmap,ma.metalnessmap,ma.fog,ma.lights,{emissive:{value:new Qn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Gs.meshphysical_vert,fragmentShader:Gs.meshphysical_frag},toon:{uniforms:ea([ma.common,ma.specularmap,ma.aomap,ma.lightmap,ma.emissivemap,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.gradientmap,ma.fog,ma.lights,{emissive:{value:new Qn(0)},specular:{value:new Qn(1118481)},shininess:{value:30}}]),vertexShader:Gs.meshtoon_vert,fragmentShader:Gs.meshtoon_frag},matcap:{uniforms:ea([ma.common,ma.bumpmap,ma.normalmap,ma.displacementmap,ma.fog,{matcap:{value:null}}]),vertexShader:Gs.meshmatcap_vert,fragmentShader:Gs.meshmatcap_frag},points:{uniforms:ea([ma.points,ma.fog]),vertexShader:Gs.points_vert,fragmentShader:Gs.points_frag},dashed:{uniforms:ea([ma.common,ma.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Gs.linedashed_vert,fragmentShader:Gs.linedashed_frag},depth:{uniforms:ea([ma.common,ma.displacementmap]),vertexShader:Gs.depth_vert,fragmentShader:Gs.depth_frag},normal:{uniforms:ea([ma.common,ma.bumpmap,ma.normalmap,ma.displacementmap,{opacity:{value:1}}]),vertexShader:Gs.normal_vert,fragmentShader:Gs.normal_frag},sprite:{uniforms:ea([ma.sprite,ma.fog]),vertexShader:Gs.sprite_vert,fragmentShader:Gs.sprite_frag},background:{uniforms:{uvTransform:{value:new Mr},t2D:{value:null}},vertexShader:Gs.background_vert,fragmentShader:Gs.background_frag},cube:{uniforms:ea([ma.envmap,{opacity:{value:1}}]),vertexShader:Gs.cube_vert,fragmentShader:Gs.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Gs.equirect_vert,fragmentShader:Gs.equirect_frag},distanceRGBA:{uniforms:ea([ma.common,ma.displacementmap,{referencePosition:{value:new Dr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Gs.distanceRGBA_vert,fragmentShader:Gs.distanceRGBA_frag},shadow:{uniforms:ea([ma.lights,ma.fog,{color:{value:new Qn(0)},opacity:{value:1}}]),vertexShader:Gs.shadow_vert,fragmentShader:Gs.shadow_frag}};function Vs(e,t,r,n){var i,a,o=new Qn(0),s=0,c=null,l=0,h=null;function u(e,r){t.buffers.color.setClear(e.r,e.g,e.b,r,n)}return{getClearColor:function(){return o},setClearColor:function(e,t){o.set(e),u(o,s=void 0!==t?t:1)},getClearAlpha:function(){return s},setClearAlpha:function(e){u(o,s=e)},render:function(t,n,p,m){var v=n.background,g=e.xr,y=g.getSession&&g.getSession();if(y&&"additive"===y.environmentBlendMode&&(v=null),null===v?u(o,s):v&&v.isColor&&(u(v,1),m=!0),(e.autoClear||m)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.isWebGLCubeRenderTarget||v.mapping===pe)){void 0===a&&((a=new ki(new Ki(1,1,1),new ia({type:"BackgroundCubeMaterial",uniforms:$i(Hs.cube.uniforms),vertexShader:Hs.cube.vertexShader,fragmentShader:Hs.cube.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(e,t,r){this.matrixWorld.copyPosition(r.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(a));var x=v.isWebGLCubeRenderTarget?v.texture:v;a.material.uniforms.envMap.value=x,a.material.uniforms.flipEnvMap.value=x.isCubeTexture?-1:1,c===v&&l===x.version&&h===e.toneMapping||(a.material.needsUpdate=!0,c=v,l=x.version,h=e.toneMapping),t.unshift(a,a.geometry,a.material,0,0,null)}else v&&v.isTexture&&(void 0===i&&((i=new ki(new xa(2,2),new ia({type:"BackgroundMaterial",uniforms:$i(Hs.background.uniforms),vertexShader:Hs.background.vertexShader,fragmentShader:Hs.background.fragmentShader,side:d,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(i.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(i)),i.material.uniforms.t2D.value=v,!0===v.matrixAutoUpdate&&v.updateMatrix(),i.material.uniforms.uvTransform.value.copy(v.matrix),c===v&&l===v.version&&h===e.toneMapping||(i.material.needsUpdate=!0,c=v,l=v.version,h=e.toneMapping),t.unshift(i,i.geometry,i.material,0,0,null))}}}function ks(e,t,r,n){var i,a=n.isWebGL2;this.setMode=function(e){i=e},this.render=function(t,n){e.drawArrays(i,t,n),r.update(n,i)},this.renderInstances=function(n,o,s,c){if(0!==c){var l,h;if(a)l=e,h="drawArraysInstanced";else if(h="drawArraysInstancedANGLE",null===(l=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[h](i,o,s,c),r.update(s,i,c)}}}function js(e,t,r){var n;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,o=void 0!==r.precision?r.precision:"highp",s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var c=!0===r.logarithmicDepthBuffer,l=e.getParameter(34930),h=e.getParameter(35660),u=e.getParameter(3379),p=e.getParameter(34076),d=e.getParameter(34921),f=e.getParameter(36347),m=e.getParameter(36348),v=e.getParameter(36349),g=h>0,y=a||!!t.get("OES_texture_float");return{isWebGL2:a,getMaxAnisotropy:function(){if(void 0!==n)return n;var r=t.get("EXT_texture_filter_anisotropic");return n=null!==r?e.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:c,maxTextures:l,maxVertexTextures:h,maxTextureSize:u,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y,maxSamples:a?e.getParameter(36183):0}}function Ws(){var e=this,t=null,r=0,n=!1,i=!1,a=new Fn,o=new Mr,s={value:null,needsUpdate:!1};function c(){s.value!==t&&(s.value=t,s.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function l(t,r,n,i){var c=null!==t?t.length:0,l=null;if(0!==c){if(l=s.value,!0!==i||null===l){var h=n+4*c,u=r.matrixWorldInverse;o.getNormalMatrix(u),(null===l||l.length<h)&&(l=new Float32Array(h));for(var p=0,d=n;p!==c;++p,d+=4)a.copy(t[p]).applyMatrix4(u,o),a.normal.toArray(l,d),l[d+3]=a.constant}s.value=l,s.needsUpdate=!0}return e.numPlanes=c,l}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(e,i,a){var o=0!==e.length||i||0!==r||n;return n=i,t=l(e,a,0),r=e.length,o},this.beginShadows=function(){i=!0,l(null)},this.endShadows=function(){i=!1,c()},this.setState=function(e,a,o,h,u,p){if(!n||null===e||0===e.length||i&&!o)i?l(null):c();else{var d=i?0:r,f=4*d,m=u.clippingState||null;s.value=m,m=l(e,h,f,p);for(var v=0;v!==f;++v)m[v]=t[v];u.clippingState=m,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=d}}}function qs(e){var t={};return{get:function(r){if(void 0!==t[r])return t[r];var n;switch(r){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=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":n=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":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(r)}return null===n&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),t[r]=n,n}}}function Xs(e,t,r){var n=new WeakMap,i=new WeakMap;function a(e){var o=e.target,s=n.get(o);for(var c in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[c]);o.removeEventListener("dispose",a),n.delete(o);var l=i.get(s);l&&(t.remove(l),i.delete(s)),r.memory.geometries--}function o(e){var r=[],n=e.index,a=e.attributes.position,o=0;if(null!==n){var s=n.array;o=n.version;for(var c=0,l=s.length;c<l;c+=3){var h=s[c+0],u=s[c+1],p=s[c+2];r.push(h,u,u,p,p,h)}}else{s=a.array;o=a.version;for(c=0,l=s.length/3-1;c<l;c+=3){h=c+0,u=c+1,p=c+2;r.push(h,u,u,p,p,h)}}var d=new(gi(r)>65535?di:ui)(r,1);d.version=o,t.update(d,34963);var f=i.get(e);f&&t.remove(f),i.set(e,d)}return{get:function(e,t){var i=n.get(t);return i||(t.addEventListener("dispose",a),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Ti).setFromObject(e)),i=t._bufferGeometry),n.set(t,i),r.memory.geometries++,i)},update:function(e){var r=e.index,n=e.attributes;for(var i in null!==r&&t.update(r,34963),n)t.update(n[i],34962);var a=e.morphAttributes;for(var i in a)for(var o=a[i],s=0,c=o.length;s<c;s++)t.update(o[s],34962)},getWireframeAttribute:function(e){var t=i.get(e);if(t){var r=e.index;null!==r&&t.version<r.version&&o(e)}else o(e);return i.get(e)}}}function Ys(e,t,r,n){var i,a,o,s=n.isWebGL2;this.setMode=function(e){i=e},this.setIndex=function(e){a=e.type,o=e.bytesPerElement},this.render=function(t,n){e.drawElements(i,n,a,t*o),r.update(n,i)},this.renderInstances=function(n,c,l,h){if(0!==h){var u,p;if(s)u=e,p="drawElementsInstanced";else if(p="drawElementsInstancedANGLE",null===(u=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[p](i,l,a,c*o,h),r.update(l,i,h)}}}function Zs(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,r,n){switch(n=n||1,t.calls++,r){case 4:t.triangles+=n*(e/3);break;case 1:t.lines+=n*(e/2);break;case 3:t.lines+=n*(e-1);break;case 2:t.lines+=n*e;break;case 0:t.points+=n*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}function Js(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Qs(e){var t={},r=new Float32Array(8);return{update:function(n,i,a,o){var s=n.morphTargetInfluences,c=void 0===s?0:s.length,l=t[i.id];if(void 0===l){l=[];for(var h=0;h<c;h++)l[h]=[h,0];t[i.id]=l}var u=a.morphTargets&&i.morphAttributes.position,p=a.morphNormals&&i.morphAttributes.normal;for(h=0;h<c;h++)0!==(f=l[h])[1]&&(u&&i.deleteAttribute("morphTarget"+h),p&&i.deleteAttribute("morphNormal"+h));for(h=0;h<c;h++)(f=l[h])[0]=h,f[1]=s[h];l.sort(Js);var d=0;for(h=0;h<8;h++){var f;if(f=l[h]){var m=f[0],v=f[1];if(v){u&&i.setAttribute("morphTarget"+h,u[m]),p&&i.setAttribute("morphNormal"+h,p[m]),r[h]=v,d+=v;continue}}r[h]=0}var g=i.morphTargetsRelative?1:1-d;o.getUniforms().setValue(e,"morphTargetBaseInfluence",g),o.getUniforms().setValue(e,"morphTargetInfluences",r)}}}function Ks(e,t,r,n){var i={};return{update:function(e){var a=n.render.frame,o=e.geometry,s=t.get(e,o);return i[s.id]!==a&&(o.isGeometry&&s.updateFromObject(e),t.update(s),i[s.id]=a),e.isInstancedMesh&&r.update(e.instanceMatrix,34962),s},dispose:function(){i={}}}}function $s(e,t,r,n,i,a,o,s,c,l){e=void 0!==e?e:[],t=void 0!==t?t:se,o=void 0!==o?o:Ge,Er.call(this,e,t,r,n,i,a,o,s,c,l),this.flipY=!1}function ec(e,t,r,n){Er.call(this,null),this.image={data:e||null,width:t||1,height:r||1,depth:n||1},this.magFilter=ge,this.minFilter=ge,this.wrapR=me,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function tc(e,t,r,n){Er.call(this,null),this.image={data:e||null,width:t||1,height:r||1,depth:n||1},this.magFilter=ge,this.minFilter=ge,this.wrapR=me,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}exports.ShaderLib=Hs,Hs.physical={uniforms:ea([Hs.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new Qn(0)},clearcoatNormalScale:{value:new wr(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:Gs.meshphysical_vert,fragmentShader:Gs.meshphysical_frag},$s.prototype=Object.create(Er.prototype),$s.prototype.constructor=$s,$s.prototype.isCubeTexture=!0,Object.defineProperty($s.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}}),ec.prototype=Object.create(Er.prototype),ec.prototype.constructor=ec,ec.prototype.isDataTexture2DArray=!0,tc.prototype=Object.create(Er.prototype),tc.prototype.constructor=tc,tc.prototype.isDataTexture3D=!0;var rc=new Er,nc=new ec,ic=new tc,ac=new $s,oc=[],sc=[],cc=new Float32Array(16),lc=new Float32Array(9),hc=new Float32Array(4);function uc(e,t,r){var n=e[0];if(n<=0||n>0)return e;var i=t*r,a=oc[i];if(void 0===a&&(a=new Float32Array(i),oc[i]=a),0!==t){n.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=r,e[o].toArray(a,s)}return a}function pc(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function dc(e,t){for(var r=0,n=t.length;r<n;r++)e[r]=t[r]}function fc(e,t){var r=sc[t];void 0===r&&(r=new Int32Array(t),sc[t]=r);for(var n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function mc(e,t){var r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function vc(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(pc(r,t))return;e.uniform2fv(this.addr,t),dc(r,t)}}function gc(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y&&r[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(void 0!==t.r)r[0]===t.r&&r[1]===t.g&&r[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(pc(r,t))return;e.uniform3fv(this.addr,t),dc(r,t)}}function yc(e,t){var r=this.cache;if(void 0!==t.x)r[0]===t.x&&r[1]===t.y&&r[2]===t.z&&r[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(pc(r,t))return;e.uniform4fv(this.addr,t),dc(r,t)}}function xc(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(pc(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),dc(r,t)}else{if(pc(r,n))return;hc.set(n),e.uniformMatrix2fv(this.addr,!1,hc),dc(r,n)}}function bc(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(pc(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),dc(r,t)}else{if(pc(r,n))return;lc.set(n),e.uniformMatrix3fv(this.addr,!1,lc),dc(r,n)}}function _c(e,t){var r=this.cache,n=t.elements;if(void 0===n){if(pc(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),dc(r,t)}else{if(pc(r,n))return;cc.set(n),e.uniformMatrix4fv(this.addr,!1,cc),dc(r,n)}}function wc(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTexture2D(t||rc,i)}function Mc(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||nc,i)}function Sc(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||ic,i)}function Tc(e,t,r){var n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTextureCube(t||ac,i)}function Ec(e,t){var r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function Ac(e,t){var r=this.cache;pc(r,t)||(e.uniform2iv(this.addr,t),dc(r,t))}function Lc(e,t){var r=this.cache;pc(r,t)||(e.uniform3iv(this.addr,t),dc(r,t))}function Rc(e,t){var r=this.cache;pc(r,t)||(e.uniform4iv(this.addr,t),dc(r,t))}function Cc(e,t){var r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function Pc(e){switch(e){case 5126:return mc;case 35664:return vc;case 35665:return gc;case 35666:return yc;case 35674:return xc;case 35675:return bc;case 35676:return _c;case 5124:case 35670:return Ec;case 35667:case 35671:return Ac;case 35668:case 35672:return Lc;case 35669:case 35673:return Rc;case 5125:return Cc;case 35678:case 36198:case 36298:case 36306:case 35682:return wc;case 35679:case 36299:case 36307:return Sc;case 35680:case 36300:case 36308:case 36293:return Tc;case 36289:case 36303:case 36311:case 36292:return Mc}}function Oc(e,t){e.uniform1fv(this.addr,t)}function Dc(e,t){e.uniform1iv(this.addr,t)}function Ic(e,t){e.uniform2iv(this.addr,t)}function Nc(e,t){e.uniform3iv(this.addr,t)}function Fc(e,t){e.uniform4iv(this.addr,t)}function Bc(e,t){var r=uc(t,this.size,2);e.uniform2fv(this.addr,r)}function zc(e,t){var r=uc(t,this.size,3);e.uniform3fv(this.addr,r)}function Uc(e,t){var r=uc(t,this.size,4);e.uniform4fv(this.addr,r)}function Gc(e,t){var r=uc(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function Hc(e,t){var r=uc(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function Vc(e,t){var r=uc(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function kc(e,t,r){var n=t.length,i=fc(r,n);e.uniform1iv(this.addr,i);for(var a=0;a!==n;++a)r.safeSetTexture2D(t[a]||rc,i[a])}function jc(e,t,r){var n=t.length,i=fc(r,n);e.uniform1iv(this.addr,i);for(var a=0;a!==n;++a)r.safeSetTextureCube(t[a]||ac,i[a])}function Wc(e){switch(e){case 5126:return Oc;case 35664:return Bc;case 35665:return zc;case 35666:return Uc;case 35674:return Gc;case 35675:return Hc;case 35676:return Vc;case 5124:case 35670:return Dc;case 35667:case 35671:return Ic;case 35668:case 35672:return Nc;case 35669:case 35673:return Fc;case 35678:case 36198:case 36298:case 36306:case 35682:return kc;case 35680:case 36300:case 36308:case 36293:return jc}}function qc(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=Pc(t.type)}function Xc(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=Wc(t.type)}function Yc(e){this.id=e,this.seq=[],this.map={}}Xc.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),dc(t,e)},Yc.prototype.setValue=function(e,t,r){for(var n=this.seq,i=0,a=n.length;i!==a;++i){var o=n[i];o.setValue(e,t[o.id],r)}};var Zc=/([\w\d_]+)(\])?(\[|\.)?/g;function Jc(e,t){e.seq.push(t),e.map[t.id]=t}function Qc(e,t,r){var n=e.name,i=n.length;for(Zc.lastIndex=0;;){var a=Zc.exec(n),o=Zc.lastIndex,s=a[1],c="]"===a[2],l=a[3];if(c&&(s|=0),void 0===l||"["===l&&o+2===i){Jc(r,void 0===l?new qc(s,e,t):new Xc(s,e,t));break}var h=r.map[s];void 0===h&&Jc(r,h=new Yc(s)),r=h}}function Kc(e,t){this.seq=[],this.map={};for(var r=e.getProgramParameter(t,35718),n=0;n<r;++n){var i=e.getActiveUniform(t,n);Qc(i,e.getUniformLocation(t,i.name),this)}}function $c(e,t,r){var n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}Kc.prototype.setValue=function(e,t,r,n){var i=this.map[t];void 0!==i&&i.setValue(e,r,n)},Kc.prototype.setOptional=function(e,t,r){var n=t[r];void 0!==n&&this.setValue(e,r,n)},Kc.upload=function(e,t,r,n){for(var i=0,a=t.length;i!==a;++i){var o=t[i],s=r[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,n)}},Kc.seqWithValue=function(e,t){for(var r=[],n=0,i=e.length;n!==i;++n){var a=e[n];a.id in t&&r.push(a)}return r};var el=0;function tl(e){for(var t=e.split("\n"),r=0;r<t.length;r++)t[r]=r+1+": "+t[r];return t.join("\n")}function rl(e){switch(e){case It:return["Linear","( value )"];case Nt:return["sRGB","( value )"];case Bt:return["RGBE","( value )"];case Ut:return["RGBM","( value, 7.0 )"];case Gt:return["RGBM","( value, 16.0 )"];case Ht:return["RGBD","( value, 256.0 )"];case Ft:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case zt:return["LogLuv","( value )"];default:throw new Error("unsupported encoding: "+e)}}function nl(e,t,r){var n=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return n&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+r+"\n"+i+tl(e.getShaderSource(t))}function il(e,t){var r=rl(t);return"vec4 "+e+"( vec4 value ) { return "+r[0]+"ToLinear"+r[1]+"; }"}function al(e,t){var r=rl(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function ol(e,t){var r;switch(t){case te:r="Linear";break;case re:r="Reinhard";break;case ne:r="Uncharted2";break;case ie:r="OptimizedCineon";break;case ae:r="ACESFilmic";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function sl(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(hl).join("\n")}function cl(e){var t=[];for(var r in e){var n=e[r];!1!==n&&t.push("#define "+r+" "+n)}return t.join("\n")}function ll(e,t){for(var r={},n=e.getProgramParameter(t,35721),i=0;i<n;i++){var a=e.getActiveAttrib(t,i).name;r[a]=e.getAttribLocation(t,a)}return r}function hl(e){return""!==e}function ul(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 pl(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var dl=/^[ \t]*#include +<([\w\d./]+)>/gm;function fl(e){return e.replace(dl,ml)}function ml(e,t){var r=Gs[t];if(void 0===r)throw new Error("Can not resolve #include <"+t+">");return fl(r)}var vl=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function gl(e){return e.replace(vl,yl)}function yl(e,t,r,n){for(var i="",a=parseInt(t);a<parseInt(r);a++)i+=n.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function xl(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function bl(e){var t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===h?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===u?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===p&&(t="SHADOWMAP_TYPE_VSM"),t}function _l(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case se:case ce:t="ENVMAP_TYPE_CUBE";break;case pe:case de:t="ENVMAP_TYPE_CUBE_UV";break;case le:case he:t="ENVMAP_TYPE_EQUIREC";break;case ue:t="ENVMAP_TYPE_SPHERE"}return t}function wl(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ce:case he:t="ENVMAP_MODE_REFRACTION"}return t}function Ml(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case Q:t="ENVMAP_BLENDING_MULTIPLY";break;case K:t="ENVMAP_BLENDING_MIX";break;case $:t="ENVMAP_BLENDING_ADD"}return t}function Sl(e,t,r){var n,i,a=e.getContext(),o=r.defines,s=r.vertexShader,c=r.fragmentShader,l=bl(r),h=_l(r),u=wl(r),p=Ml(r),d=e.gammaFactor>0?e.gammaFactor:1,f=r.isWebGL2?"":sl(r),m=cl(o),v=a.createProgram(),g=r.numMultiviewViews;if(r.isRawShaderMaterial?((n=[m].filter(hl).join("\n")).length>0&&(n+="\n"),(i=[f,m].filter(hl).join("\n")).length>0&&(i+="\n")):(n=[xl(r),"#define SHADER_NAME "+r.shaderName,m,r.instancing?"#define USE_INSTANCING":"",r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.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"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(hl).join("\n"),i=[f,xl(r),"#define SHADER_NAME "+r.shaderName,m,r.alphaTest?"#define ALPHATEST "+r.alphaTest+(r.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+h:"",r.envMap?"#define "+u:"",r.envMap?"#define "+p:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.sheen?"#define USE_SHEEN":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensionShaderTextureLOD||r.envMap)&&r.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==ee?"#define TONE_MAPPING":"",r.toneMapping!==ee?Gs.tonemapping_pars_fragment:"",r.toneMapping!==ee?ol("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.outputEncoding||r.mapEncoding||r.matcapEncoding||r.envMapEncoding||r.emissiveMapEncoding||r.lightMapEncoding?Gs.encodings_pars_fragment:"",r.mapEncoding?il("mapTexelToLinear",r.mapEncoding):"",r.matcapEncoding?il("matcapTexelToLinear",r.matcapEncoding):"",r.envMapEncoding?il("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMapEncoding?il("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.lightMapEncoding?il("lightMapTexelToLinear",r.lightMapEncoding):"",r.outputEncoding?al("linearToOutputTexel",r.outputEncoding):"",r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(hl).join("\n")),s=pl(s=ul(s=fl(s),r),r),c=pl(c=ul(c=fl(c),r),r),s=gl(s),c=gl(c),r.isWebGL2&&!r.isRawShaderMaterial){var y=!1,x=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==s.match(x)&&null!==c.match(x)&&(y=!0,s=s.replace(x,""),c=c.replace(x,"")),n=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+n,i=["#version 300 es\n","#define varying in",y?"":"out highp vec4 pc_fragColor;",y?"":"#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"+i,g>0&&(n=(n=n.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","layout(num_views = "+g+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace(["uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;"].join("\n"),["uniform mat4 modelViewMatrices["+g+"];","uniform mat4 projectionMatrices["+g+"];","uniform mat4 viewMatrices["+g+"];","uniform mat3 normalMatrices["+g+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]","#define projectionMatrix projectionMatrices[VIEW_ID]","#define viewMatrix viewMatrices[VIEW_ID]","#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),i=(i=i.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+g+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n")))}var b,_,w=i+c,M=$c(a,35633,n+s),S=$c(a,35632,w);if(a.attachShader(v,M),a.attachShader(v,S),void 0!==r.index0AttributeName?a.bindAttribLocation(v,0,r.index0AttributeName):!0===r.morphTargets&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),e.debug.checkShaderErrors){var T=a.getProgramInfoLog(v).trim(),E=a.getShaderInfoLog(M).trim(),A=a.getShaderInfoLog(S).trim(),L=!0,R=!0;if(!1===a.getProgramParameter(v,35714)){L=!1;var C=nl(a,M,"vertex"),P=nl(a,S,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(v,35715),"gl.getProgramInfoLog",T,C,P)}else""!==T?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",T):""!==E&&""!==A||(R=!1);R&&(this.diagnostics={runnable:L,programLog:T,vertexShader:{log:E,prefix:n},fragmentShader:{log:A,prefix:i}})}return a.deleteShader(M),a.deleteShader(S),this.getUniforms=function(){return void 0===b&&(b=new Kc(a,v)),b},this.getAttributes=function(){return void 0===_&&(_=ll(a,v)),_},this.destroy=function(){a.deleteProgram(v),this.program=void 0},this.name=r.shaderName,this.id=el++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=M,this.fragmentShader=S,this.numMultiviewViews=g,this}function Tl(e,t,r){var n=[],i=r.isWebGL2,a=r.logarithmicDepthBuffer,o=r.floatVertexTextures,s=r.precision,c=r.maxVertexUniforms,l=r.vertexTextures,h={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"},u=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","numMultiviewViews","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen"];function p(e){var t;return e?e.isTexture?t=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=It,t}this.getParameters=function(n,u,d,v,g,y,x){var b=v.fog,_=n.isMeshStandardMaterial?v.environment:null,w=n.envMap||_,M=h[n.type],S=x.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(o)return 1024;var r=c,n=Math.floor((r-20)/4),i=Math.min(n,t.length);return i<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+i+"."),0):i}(x):0;null!==n.precision&&(s=r.getMaxPrecision(n.precision))!==n.precision&&console.warn("THREE.WebGLProgram.getParameters:",n.precision,"not supported, using",s,"instead.");var T=function(e,t){var r;if(t){var n=Hs[t];r={name:e.type,uniforms:ta.clone(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader}}else r={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};return r}(n,M);n.onBeforeCompile(T,e);var E=e.getRenderTarget(),A=E&&E.isWebGLMultiviewRenderTarget?E.numViews:0;return{isWebGL2:i,shaderID:M,shaderName:T.name,uniforms:T.uniforms,vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,defines:n.defines,isRawShaderMaterial:n.isRawShaderMaterial,isShaderMaterial:n.isShaderMaterial,precision:s,instancing:!0===x.isInstancedMesh,supportsVertexTextures:l,numMultiviewViews:A,outputEncoding:null!==E?p(E.texture):e.outputEncoding,map:!!n.map,mapEncoding:p(n.map),matcap:!!n.matcap,matcapEncoding:p(n.matcap),envMap:!!w,envMapMode:w&&w.mapping,envMapEncoding:p(w),envMapCubeUV:!!w&&(w.mapping===pe||w.mapping===de),lightMap:!!n.lightMap,lightMapEncoding:p(n.lightMap),aoMap:!!n.aoMap,emissiveMap:!!n.emissiveMap,emissiveMapEncoding:p(n.emissiveMap),bumpMap:!!n.bumpMap,normalMap:!!n.normalMap,objectSpaceNormalMap:n.normalMapType===Wt,tangentSpaceNormalMap:n.normalMapType===jt,clearcoatNormalMap:!!n.clearcoatNormalMap,displacementMap:!!n.displacementMap,roughnessMap:!!n.roughnessMap,metalnessMap:!!n.metalnessMap,specularMap:!!n.specularMap,alphaMap:!!n.alphaMap,gradientMap:!!n.gradientMap,sheen:!!n.sheen,combine:n.combine,vertexTangents:n.normalMap&&n.vertexTangents,vertexColors:n.vertexColors,vertexUvs:!!(n.map||n.bumpMap||n.normalMap||n.specularMap||n.alphaMap||n.emissiveMap||n.roughnessMap||n.metalnessMap||n.clearcoatNormalMap||n.displacementMap),uvsVertexOnly:!(n.map||n.bumpMap||n.normalMap||n.specularMap||n.alphaMap||n.emissiveMap||n.roughnessMap||n.metalnessMap||n.clearcoatNormalMap||!n.displacementMap),fog:!!b,useFog:n.fog,fogExp2:b&&b.isFogExp2,flatShading:n.flatShading,sizeAttenuation:n.sizeAttenuation,logarithmicDepthBuffer:a,skinning:n.skinning&&S>0,maxBones:S,useVertexTexture:o,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:u.directional.length,numPointLights:u.point.length,numSpotLights:u.spot.length,numRectAreaLights:u.rectArea.length,numHemiLights:u.hemi.length,numDirLightShadows:u.directionalShadowMap.length,numPointLightShadows:u.pointShadowMap.length,numSpotLightShadows:u.spotShadowMap.length,numClippingPlanes:g,numClipIntersection:y,dithering:n.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.length>0,shadowMapType:e.shadowMap.type,toneMapping:n.toneMapped?e.toneMapping:ee,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===m,flipSided:n.side===f,depthPacking:void 0!==n.depthPacking&&n.depthPacking,index0AttributeName:n.index0AttributeName,extensionDerivatives:n.extensions&&n.extensions.derivatives,extensionFragDepth:n.extensions&&n.extensions.frawbuffers,extensionDrawbuffers:n.extensions&&n.extensions.drawbuffers,extensionShaderTextureLOD:n.extensions&&n.extensions.shaderTextureLOD,rendererExtensionFragDepth:i||null!==t.get("EXT_frag_depth"),rendererExtensionDrawBuffers:i||null!==t.get("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:i||null!==t.get("EXT_shader_texture_lod"),onBeforeCompile:n.onBeforeCompile}},this.getProgramCacheKey=function(t){var r=[];if(t.shaderID?r.push(t.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var n in t.defines)r.push(n),r.push(t.defines[n]);if(void 0===t.isRawShaderMaterial){for(var i=0;i<u.length;i++)r.push(t[u[i]]);r.push(e.outputEncoding),r.push(e.gammaFactor)}return r.push(t.onBeforeCompile.toString()),r.join()},this.acquireProgram=function(t,r){for(var i,a=0,o=n.length;a<o;a++){var s=n[a];if(s.cacheKey===r){++(i=s).usedTimes;break}}return void 0===i&&(i=new Sl(e,r,t),n.push(i)),i},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=n.indexOf(e);n[t]=n[n.length-1],n.pop(),e.destroy()}},this.programs=n}function El(){var e=new WeakMap;return{get:function(t){var r=e.get(t);return void 0===r&&(r={},e.set(t,r)),r},remove:function(t){e.delete(t)},update:function(t,r,n){e.get(t)[r]=n},dispose:function(){e=new WeakMap}}}function Al(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 Ll(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 Rl(){var e=[],t=0,r=[],n=[],i={id:-1};function a(r,n,a,o,s,c){var l=e[t];return void 0===l?(l={id:r.id,object:r,geometry:n,material:a,program:a.program||i,groupOrder:o,renderOrder:r.renderOrder,z:s,group:c},e[t]=l):(l.id=r.id,l.object=r,l.geometry=n,l.material=a,l.program=a.program||i,l.groupOrder=o,l.renderOrder=r.renderOrder,l.z=s,l.group=c),t++,l}return{opaque:r,transparent:n,init:function(){t=0,r.length=0,n.length=0},push:function(e,t,i,o,s,c){var l=a(e,t,i,o,s,c);(!0===i.transparent?n:r).push(l)},unshift:function(e,t,i,o,s,c){var l=a(e,t,i,o,s,c);(!0===i.transparent?n:r).unshift(l)},sort:function(e,t){r.length>1&&r.sort(e||Al),n.length>1&&n.sort(t||Ll)}}}function Cl(){var e=new WeakMap;function t(r){var n=r.target;n.removeEventListener("dispose",t),e.delete(n)}return{get:function(r,n){var i,a=e.get(r);return void 0===a?(i=new Rl,e.set(r,new WeakMap),e.get(r).set(n,i),r.addEventListener("dispose",t)):void 0===(i=a.get(n))&&(i=new Rl,a.set(n,i)),i},dispose:function(){e=new WeakMap}}}function Pl(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var r;switch(t.type){case"DirectionalLight":r={direction:new Dr,color:new Qn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new wr};break;case"SpotLight":r={position:new Dr,direction:new Dr,color:new Qn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new wr};break;case"PointLight":r={position:new Dr,color:new Qn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new wr,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":r={direction:new Dr,skyColor:new Qn,groundColor:new Qn};break;case"RectAreaLight":r={color:new Qn,position:new Dr,halfWidth:new Dr,halfHeight:new Dr}}return e[t.id]=r,r}}}var Ol=0;function Dl(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Il(){for(var e=new Pl,t={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:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},r=0;r<9;r++)t.probe.push(new Dr);var n=new Dr,i=new Hr,a=new Hr;return{setup:function(r,o,s){for(var c=0,l=0,h=0,u=0;u<9;u++)t.probe[u].set(0,0,0);var p=0,d=0,f=0,m=0,v=0,g=0,y=0,x=0,b=s.matrixWorldInverse;r.sort(Dl),u=0;for(var _=r.length;u<_;u++){var w=r[u],M=w.color,S=w.intensity,T=w.distance,E=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)c+=M.r*S,l+=M.g*S,h+=M.b*S;else if(w.isLightProbe)for(var A=0;A<9;A++)t.probe[A].addScaledVector(w.sh.coefficients[A],S);else if(w.isDirectionalLight){if((R=e.get(w)).color.copy(w.color).multiplyScalar(w.intensity),R.direction.setFromMatrixPosition(w.matrixWorld),n.setFromMatrixPosition(w.target.matrixWorld),R.direction.sub(n),R.direction.transformDirection(b),R.shadow=w.castShadow,w.castShadow){var L=w.shadow;R.shadowBias=L.bias,R.shadowRadius=L.radius,R.shadowMapSize=L.mapSize,t.directionalShadowMap[p]=E,t.directionalShadowMatrix[p]=w.shadow.matrix,g++}t.directional[p]=R,p++}else if(w.isSpotLight)(R=e.get(w)).position.setFromMatrixPosition(w.matrixWorld),R.position.applyMatrix4(b),R.color.copy(M).multiplyScalar(S),R.distance=T,R.direction.setFromMatrixPosition(w.matrixWorld),n.setFromMatrixPosition(w.target.matrixWorld),R.direction.sub(n),R.direction.transformDirection(b),R.coneCos=Math.cos(w.angle),R.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),R.decay=w.decay,R.shadow=w.castShadow,w.castShadow&&(L=w.shadow,R.shadowBias=L.bias,R.shadowRadius=L.radius,R.shadowMapSize=L.mapSize,t.spotShadowMap[f]=E,t.spotShadowMatrix[f]=w.shadow.matrix,x++),t.spot[f]=R,f++;else if(w.isRectAreaLight)(R=e.get(w)).color.copy(M).multiplyScalar(S),R.position.setFromMatrixPosition(w.matrixWorld),R.position.applyMatrix4(b),a.identity(),i.copy(w.matrixWorld),i.premultiply(b),a.extractRotation(i),R.halfWidth.set(.5*w.width,0,0),R.halfHeight.set(0,.5*w.height,0),R.halfWidth.applyMatrix4(a),R.halfHeight.applyMatrix4(a),t.rectArea[m]=R,m++;else if(w.isPointLight)(R=e.get(w)).position.setFromMatrixPosition(w.matrixWorld),R.position.applyMatrix4(b),R.color.copy(w.color).multiplyScalar(w.intensity),R.distance=w.distance,R.decay=w.decay,R.shadow=w.castShadow,w.castShadow&&(L=w.shadow,R.shadowBias=L.bias,R.shadowRadius=L.radius,R.shadowMapSize=L.mapSize,R.shadowCameraNear=L.camera.near,R.shadowCameraFar=L.camera.far,t.pointShadowMap[d]=E,t.pointShadowMatrix[d]=w.shadow.matrix,y++),t.point[d]=R,d++;else if(w.isHemisphereLight){var R;(R=e.get(w)).direction.setFromMatrixPosition(w.matrixWorld),R.direction.transformDirection(b),R.direction.normalize(),R.skyColor.copy(w.color).multiplyScalar(S),R.groundColor.copy(w.groundColor).multiplyScalar(S),t.hemi[v]=R,v++}}t.ambient[0]=c,t.ambient[1]=l,t.ambient[2]=h;var C=t.hash;C.directionalLength===p&&C.pointLength===d&&C.spotLength===f&&C.rectAreaLength===m&&C.hemiLength===v&&C.numDirectionalShadows===g&&C.numPointShadows===y&&C.numSpotShadows===x||(t.directional.length=p,t.spot.length=f,t.rectArea.length=m,t.point.length=d,t.hemi.length=v,t.directionalShadowMap.length=g,t.pointShadowMap.length=y,t.spotShadowMap.length=x,t.directionalShadowMatrix.length=g,t.pointShadowMatrix.length=y,t.spotShadowMatrix.length=x,C.directionalLength=p,C.pointLength=d,C.spotLength=f,C.rectAreaLength=m,C.hemiLength=v,C.numDirectionalShadows=g,C.numPointShadows=y,C.numSpotShadows=x,t.version=Ol++)},state:t}}function Nl(){var e=new Il,t=[],r=[];return{init:function(){t.length=0,r.length=0},state:{lightsArray:t,shadowsArray:r,lights:e},setupLights:function(n){e.setup(t,r,n)},pushLight:function(e){t.push(e)},pushShadow:function(e){r.push(e)}}}function Fl(){var e=new WeakMap;function t(r){var n=r.target;n.removeEventListener("dispose",t),e.delete(n)}return{get:function(r,n){var i;return!1===e.has(r)?(i=new Nl,e.set(r,new WeakMap),e.get(r).set(n,i),r.addEventListener("dispose",t)):!1===e.get(r).has(n)?(i=new Nl,e.get(r).set(n,i)):i=e.get(r).get(n),i},dispose:function(){e=new WeakMap}}}function Bl(e){ni.call(this),this.type="MeshDepthMaterial",this.depthPacking=Vt,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}function zl(e){ni.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Dr,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}Bl.prototype=Object.create(ni.prototype),Bl.prototype.constructor=Bl,Bl.prototype.isMeshDepthMaterial=!0,Bl.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},zl.prototype=Object.create(ni.prototype),zl.prototype.constructor=zl,zl.prototype.isMeshDistanceMaterial=!0,zl.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this};var Ul="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n  float mean = 0.0;\n  float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy  ) / resolution ) );\n  for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n    #ifdef HORIZONAL_PASS\n      vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n      mean += distribution.x;\n      squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n    #else\n      float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0,  i )  * radius ) / resolution ) );\n      mean += depth;\n      squared_mean += depth * depth;\n    #endif\n  }\n  mean = mean * HALF_SAMPLE_RATE;\n  squared_mean = squared_mean * HALF_SAMPLE_RATE;\n  float std_dev = sqrt( squared_mean - mean * mean );\n  gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}",Gl="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";function Hl(e,t,r){var n=new fa,i=new wr,a=new wr,o=new Ar,s=[],c=[],l={},u={0:f,1:d,2:m},v=new ia({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new wr},radius:{value:4}},vertexShader:Gl,fragmentShader:Ul}),g=v.clone();g.defines.HORIZONAL_PASS=1;var y=new Ti;y.setAttribute("position",new oi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var x=new ki(y,v),b=this;function w(r,n){var i=t.update(x);v.uniforms.shadow_pass.value=r.map.texture,v.uniforms.resolution.value=r.mapSize,v.uniforms.radius.value=r.radius,e.setRenderTarget(r.mapPass),e.clear(),e.renderBufferDirect(n,null,i,v,x,null),g.uniforms.shadow_pass.value=r.mapPass.texture,g.uniforms.resolution.value=r.mapSize,g.uniforms.radius.value=r.radius,e.setRenderTarget(r.map),e.clear(),e.renderBufferDirect(n,null,i,g,x,null)}function M(e,t,r){var n=e<<0|t<<1|r<<2,i=s[n];return void 0===i&&(i=new Bl({depthPacking:kt,morphTargets:e,skinning:t}),s[n]=i),i}function S(e,t,r){var n=e<<0|t<<1|r<<2,i=c[n];return void 0===i&&(i=new zl({morphTargets:e,skinning:t}),c[n]=i),i}function T(t,r,n,i,a,o){var s=t.geometry,c=null,h=M,d=t.customDepthMaterial;if(!0===n.isPointLight&&(h=S,d=t.customDistanceMaterial),void 0===d){var f=!1;!0===r.morphTargets&&(!0===s.isBufferGeometry?f=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:!0===s.isGeometry&&(f=s.morphTargets&&s.morphTargets.length>0));var m=!1;!0===t.isSkinnedMesh&&(!0===r.skinning?m=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),c=h(f,m,!0===t.isInstancedMesh)}else c=d;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var v=c.uuid,g=r.uuid,y=l[v];void 0===y&&(y={},l[v]=y);var x=y[g];void 0===x&&(x=c.clone(),y[g]=x),c=x}return c.visible=r.visible,c.wireframe=r.wireframe,c.side=o===p?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],c.clipShadows=r.clipShadows,c.clippingPlanes=r.clippingPlanes,c.clipIntersection=r.clipIntersection,c.wireframeLinewidth=r.wireframeLinewidth,c.linewidth=r.linewidth,!0===n.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(n.matrixWorld),c.nearDistance=i,c.farDistance=a),c}function E(r,i,a,o,s){if(!1!==r.visible){if(r.layers.test(i.layers)&&(r.isMesh||r.isLine||r.isPoints)&&(r.castShadow||r.receiveShadow&&s===p)&&(!r.frustumCulled||n.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,r.matrixWorld);var c=t.update(r),l=r.material;if(Array.isArray(l))for(var h=c.groups,u=0,d=h.length;u<d;u++){var f=h[u],m=l[f.materialIndex];if(m&&m.visible){var v=T(r,m,o,a.near,a.far,s);e.renderBufferDirect(a,null,c,v,r,f)}}else if(l.visible){v=T(r,l,o,a.near,a.far,s);e.renderBufferDirect(a,null,c,v,r,null)}}for(var g=r.children,y=0,x=g.length;y<x;y++)E(g[y],i,a,o,s)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=h,this.render=function(t,s,c){if(!1!==b.enabled&&(!1!==b.autoUpdate||!1!==b.needsUpdate)&&0!==t.length){var l=e.getRenderTarget(),h=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),d=e.state;d.setBlending(_),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var f=0,m=t.length;f<m;f++){var v=t[f],g=v.shadow;if(void 0!==g){i.copy(g.mapSize);var y=g.getFrameExtents();if(i.multiply(y),a.copy(g.mapSize),(i.x>r||i.y>r)&&(console.warn("THREE.WebGLShadowMap:",v,"has shadow exceeding max texture size, reducing"),i.x>r&&(a.x=Math.floor(r/y.x),i.x=a.x*y.x,g.mapSize.x=a.x),i.y>r&&(a.y=Math.floor(r/y.y),i.y=a.y*y.y,g.mapSize.y=a.y)),null===g.map&&!g.isPointLightShadow&&this.type===p){var x={minFilter:we,magFilter:we,format:He};g.map=new Lr(i.x,i.y,x),g.map.texture.name=v.name+".shadowMap",g.mapPass=new Lr(i.x,i.y,x),g.camera.updateProjectionMatrix()}if(null===g.map){x={minFilter:ge,magFilter:ge,format:He};g.map=new Lr(i.x,i.y,x),g.map.texture.name=v.name+".shadowMap",g.camera.updateProjectionMatrix()}e.setRenderTarget(g.map),e.clear();for(var M=g.getViewportCount(),S=0;S<M;S++){var T=g.getViewport(S);o.set(a.x*T.x,a.y*T.y,a.x*T.z,a.y*T.w),d.viewport(o),g.updateMatrices(v,S),n=g.getFrustum(),E(s,c,g.camera,v,this.type)}g.isPointLightShadow||this.type!==p||w(g,c)}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}b.needsUpdate=!1,e.setRenderTarget(l,h,u)}}}function Vl(e,t,r){var o=r.isWebGL2;var s=new function(){var t=!1,r=new Ar,n=null,i=new Ar(0,0,0,0);return{setMask:function(r){n===r||t||(e.colorMask(r,r,r,r),n=r)},setLocked:function(e){t=e},setClear:function(t,n,a,o,s){!0===s&&(t*=o,n*=o,a*=o),r.set(t,n,a,o),!1===i.equals(r)&&(e.clearColor(t,n,a,o),i.copy(r))},reset:function(){t=!1,n=null,i.set(-1,0,0,0)}}},c=new function(){var t=!1,r=null,n=null,i=null;return{setTest:function(e){e?xe(2929):be(2929)},setMask:function(n){r===n||t||(e.depthMask(n),r=n)},setFunc:function(t){if(n!==t){if(t)switch(t){case k:e.depthFunc(512);break;case j:e.depthFunc(519);break;case W:e.depthFunc(513);break;case q:e.depthFunc(515);break;case X:e.depthFunc(514);break;case Y:e.depthFunc(518);break;case Z:e.depthFunc(516);break;case J:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);n=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,r=null,n=null,i=null}}},l=new function(){var t=!1,r=null,n=null,i=null,a=null,o=null,s=null,c=null,l=null;return{setTest:function(e){t||(e?xe(2960):be(2960))},setMask:function(n){r===n||t||(e.stencilMask(n),r=n)},setFunc:function(t,r,o){n===t&&i===r&&a===o||(e.stencilFunc(t,r,o),n=t,i=r,a=o)},setOp:function(t,r,n){o===t&&s===r&&c===n||(e.stencilOp(t,r,n),o=t,s=r,c=n)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,r=null,n=null,i=null,a=null,o=null,s=null,c=null,l=null}}},h=e.getParameter(34921),u=new Uint8Array(h),p=new Uint8Array(h),d=new Uint8Array(h),v={},g=null,y=null,x=null,b=null,Q=null,K=null,$=null,ee=null,te=null,re=!1,ne=null,ie=null,ae=null,oe=null,se=null,ce=e.getParameter(35661),le=!1,he=0,ue=e.getParameter(7938);-1!==ue.indexOf("WebGL")?(he=parseFloat(/^WebGL\ ([0-9])/.exec(ue)[1]),le=he>=1):-1!==ue.indexOf("OpenGL ES")&&(he=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(ue)[1]),le=he>=2);var pe=null,de={},fe=new Ar,me=new Ar;function ve(t,r,n){var i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var o=0;o<n;o++)e.texImage2D(r+o,0,6408,1,1,0,6408,5121,i);return a}var ge={};function ye(r,n){(u[r]=1,0===p[r]&&(e.enableVertexAttribArray(r),p[r]=1),d[r]!==n)&&((o?e:t.get("ANGLE_instanced_arrays"))[o?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](r,n),d[r]=n)}function xe(t){!0!==v[t]&&(e.enable(t),v[t]=!0)}function be(t){!1!==v[t]&&(e.disable(t),v[t]=!1)}ge[3553]=ve(3553,3553,1),ge[34067]=ve(34067,34069,6),s.setClear(0,0,0,1),c.setClear(1),l.setClear(0),xe(2929),c.setFunc(q),Te(!1),Ee(i),xe(2884),Se(_);var _e={[A]:32774,[L]:32778,[R]:32779};if(o)_e[C]=32775,_e[P]=32776;else{var we=t.get("EXT_blend_minmax");null!==we&&(_e[C]=we.MIN_EXT,_e[P]=we.MAX_EXT)}var Me={[O]:0,[D]:1,[I]:768,[F]:770,[V]:776,[G]:774,[z]:772,[N]:769,[B]:771,[H]:775,[U]:773};function Se(t,r,n,i,a,o,s,c){if(t!==_){if(y||(xe(3042),y=!0),t===E)a=a||r,o=o||n,s=s||i,r===b&&a===$||(e.blendEquationSeparate(_e[r],_e[a]),b=r,$=a),n===Q&&i===K&&o===ee&&s===te||(e.blendFuncSeparate(Me[n],Me[i],Me[o],Me[s]),Q=n,K=i,ee=o,te=s),x=t,re=null;else if(t!==x||c!==re){if(b===A&&$===A||(e.blendEquation(32774),b=A,$=A),c)switch(t){case w:e.blendFuncSeparate(1,771,1,771);break;case M:e.blendFunc(1,1);break;case S:e.blendFuncSeparate(0,0,769,771);break;case T:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case w:e.blendFuncSeparate(770,771,1,771);break;case M:e.blendFunc(770,1);break;case S:e.blendFunc(0,769);break;case T:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}Q=null,K=null,ee=null,te=null,x=t,re=c}}else y&&(be(3042),y=!1)}function Te(t){ne!==t&&(t?e.frontFace(2304):e.frontFace(2305),ne=t)}function Ee(t){t!==n?(xe(2884),t!==ie&&(t===i?e.cullFace(1029):t===a?e.cullFace(1028):e.cullFace(1032))):be(2884),ie=t}function Ae(t,r,n){t?(xe(32823),oe===r&&se===n||(e.polygonOffset(r,n),oe=r,se=n)):be(32823)}function Le(t){void 0===t&&(t=33984+ce-1),pe!==t&&(e.activeTexture(t),pe=t)}return{buffers:{color:s,depth:c,stencil:l},initAttributes:function(){for(var e=0,t=u.length;e<t;e++)u[e]=0},enableAttribute:function(e){ye(e,0)},enableAttributeAndDivisor:ye,disableUnusedAttributes:function(){for(var t=0,r=p.length;t!==r;++t)p[t]!==u[t]&&(e.disableVertexAttribArray(t),p[t]=0)},enable:xe,disable:be,useProgram:function(t){return g!==t&&(e.useProgram(t),g=t,!0)},setBlending:Se,setMaterial:function(e,t){e.side===m?be(2884):xe(2884);var r=e.side===f;t&&(r=!r),Te(r),e.blending===w&&!1===e.transparent?Se(_):Se(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),c.setFunc(e.depthFunc),c.setTest(e.depthTest),c.setMask(e.depthWrite),s.setMask(e.colorWrite);var n=e.stencilWrite;l.setTest(n),n&&(l.setMask(e.stencilWriteMask),l.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),l.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Ae(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:Te,setCullFace:Ee,setLineWidth:function(t){t!==ae&&(le&&e.lineWidth(t),ae=t)},setPolygonOffset:Ae,setScissorTest:function(e){e?xe(3089):be(3089)},activeTexture:Le,bindTexture:function(t,r){null===pe&&Le();var n=de[pe];void 0===n&&(n={type:void 0,texture:void 0},de[pe]=n),n.type===t&&n.texture===r||(e.bindTexture(t,r||ge[t]),n.type=t,n.texture=r)},unbindTexture:function(){var t=de[pe];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===fe.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),fe.copy(t))},viewport:function(t){!1===me.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),me.copy(t))},reset:function(){for(var t=0;t<p.length;t++)1===p[t]&&(e.disableVertexAttribArray(t),p[t]=0);v={},pe=null,de={},g=null,x=null,ne=null,ie=null,s.reset(),c.reset(),l.reset()}}}function kl(e,t,r,n,i,a,o){var s,c=i.isWebGL2,l=i.maxTextures,h=i.maxCubemapSize,u=i.maxTextureSize,p=i.maxSamples,d=new WeakMap,f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(U){}function m(e,t){return f?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function v(e,t,r,n){var i=1;if((e.width>n||e.height>n)&&(i=n/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?_r.floorPowerOfTwo:Math.floor,o=a(i*e.width),c=a(i*e.height);void 0===s&&(s=m(o,c));var l=r?m(o,c):s;return l.width=o,l.height=c,l.getContext("2d").drawImage(e,0,0,o,c),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+c+")."),l}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 _r.isPowerOfTwo(e.width)&&_r.isPowerOfTwo(e.height)}function y(e,t){return e.generateMipmaps&&t&&e.minFilter!==ge&&e.minFilter!==we}function x(t,r,i,a){e.generateMipmap(t),n.get(r).__maxMipLevel=Math.log(Math.max(i,a))*Math.LOG2E}function b(r,n,i){if(!1===c)return n;if(null!==r){if(void 0!==e[r])return e[r];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+r+"'")}var a=n;return 6403===n&&(5126===i&&(a=33326),5131===i&&(a=33325),5121===i&&(a=33321)),6407===n&&(5126===i&&(a=34837),5131===i&&(a=34843),5121===i&&(a=32849)),6408===n&&(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"):34843!==a&&34837!==a||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),a}function _(e){return e===ge||e===ye||e===be?9728:9729}function w(t){var r=t.target;r.removeEventListener("dispose",w),function(t){var r=n.get(t);if(void 0===r.__webglInit)return;e.deleteTexture(r.__webglTexture),n.remove(t)}(r),r.isVideoTexture&&d.delete(r),o.memory.textures--}function M(t){var r=t.target;r.removeEventListener("dispose",M),function(t){var r=n.get(t),i=n.get(t.texture);if(!t)return;void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(var a=0;a<6;a++)e.deleteFramebuffer(r.__webglFramebuffer[a]),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer[a]);else e.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&e.deleteRenderbuffer(r.__webglDepthbuffer);if(t.isWebGLMultiviewRenderTarget){e.deleteTexture(r.__webglColorTexture),e.deleteTexture(r.__webglDepthStencilTexture),o.memory.textures-=2;for(var a=0,s=r.__webglViewFramebuffers.length;a<s;a++)e.deleteFramebuffer(r.__webglViewFramebuffers[a])}n.remove(t.texture),n.remove(t)}(r),o.memory.textures--}var S=0;function T(e,t){var i=n.get(e);if(e.isVideoTexture&&function(e){var t=o.render.frame;d.get(e)!==t&&(d.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==a.complete)return void O(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}r.activeTexture(33984+t),r.bindTexture(3553,i.__webglTexture)}function E(t,i){if(6===t.image.length){var o=n.get(t);if(t.version>0&&o.__version!==t.version){P(o,t),r.activeTexture(33984+i),r.bindTexture(34067,o.__webglTexture),e.pixelStorei(37440,t.flipY);for(var s=t&&(t.isCompressedTexture||t.image[0].isCompressedTexture),l=t.image[0]&&t.image[0].isDataTexture,u=[],p=0;p<6;p++)u[p]=s||l?l?t.image[p].image:t.image[p]:v(t.image[p],!1,!0,h);var d,f=u[0],m=g(f)||c,_=a.convert(t.format),w=a.convert(t.type),M=b(t.internalFormat,_,w);if(C(34067,t,m),s){for(p=0;p<6;p++){d=u[p].mipmaps;for(var S=0;S<d.length;S++){var T=d[S];t.format!==He&&t.format!==Ge?null!==_?r.compressedTexImage2D(34069+p,S,M,T.width,T.height,0,T.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):r.texImage2D(34069+p,S,M,T.width,T.height,0,_,w,T.data)}}o.__maxMipLevel=d.length-1}else{d=t.mipmaps;for(p=0;p<6;p++)if(l){r.texImage2D(34069+p,0,M,u[p].width,u[p].height,0,_,w,u[p].data);for(S=0;S<d.length;S++){var E=(T=d[S]).image[p].image;r.texImage2D(34069+p,S+1,M,E.width,E.height,0,_,w,E.data)}}else{r.texImage2D(34069+p,0,M,_,w,u[p]);for(S=0;S<d.length;S++){T=d[S];r.texImage2D(34069+p,S+1,M,_,w,T.image[p])}}o.__maxMipLevel=d.length}y(t,m)&&x(34067,t,f.width,f.height),o.__version=t.version,t.onUpdate&&t.onUpdate(t)}else r.activeTexture(33984+i),r.bindTexture(34067,o.__webglTexture)}}function A(e,t){r.activeTexture(33984+t),r.bindTexture(34067,n.get(e).__webglTexture)}var L={[fe]:10497,[me]:33071,[ve]:33648},R={[ge]:9728,[ye]:9984,[be]:9986,[we]:9729,[Me]:9985,[Te]:9987};function C(r,a,o){o?(e.texParameteri(r,10242,L[a.wrapS]),e.texParameteri(r,10243,L[a.wrapT]),32879!==r&&35866!==r||e.texParameteri(r,32882,L[a.wrapR]),e.texParameteri(r,10240,R[a.magFilter]),e.texParameteri(r,10241,R[a.minFilter])):(e.texParameteri(r,10242,33071),e.texParameteri(r,10243,33071),32879!==r&&35866!==r||e.texParameteri(r,32882,33071),a.wrapS===me&&a.wrapT===me||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(r,10240,_(a.magFilter)),e.texParameteri(r,10241,_(a.minFilter)),a.minFilter!==ge&&a.minFilter!==we&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));var s=t.get("EXT_texture_filter_anisotropic");if(s){if(a.type===De&&null===t.get("OES_texture_float_linear"))return;if(a.type===Ie&&null===(c||t.get("OES_texture_half_float_linear")))return;(a.anisotropy>1||n.get(a).__currentAnisotropy)&&(e.texParameterf(r,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy)}}function P(t,r){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",w),t.__webglTexture=e.createTexture(),o.memory.textures++)}function O(t,n,i){var o=3553;n.isDataTexture2DArray&&(o=35866),n.isDataTexture3D&&(o=32879),P(t,n),r.activeTexture(33984+i),r.bindTexture(o,t.__webglTexture),e.pixelStorei(37440,n.flipY),e.pixelStorei(37441,n.premultiplyAlpha),e.pixelStorei(3317,n.unpackAlignment);var s=function(e){return!c&&(e.wrapS!==me||e.wrapT!==me||e.minFilter!==ge&&e.minFilter!==we)}(n)&&!1===g(n.image),l=v(n.image,s,!1,u),h=g(l)||c,p=a.convert(n.format),d=a.convert(n.type),f=b(n.internalFormat,p,d);C(o,n,h);var m,_=n.mipmaps;if(n.isDepthTexture){if(f=6402,n.type===De){if(!1===c)throw new Error("Float Depth Texture only supported in WebGL2.0");f=36012}else c&&(f=33189);n.format===We&&6402===f&&n.type!==Ce&&n.type!==Oe&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=Ce,d=a.convert(n.type)),n.format===qe&&(f=34041,n.type!==ze&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=ze,d=a.convert(n.type))),r.texImage2D(3553,0,f,l.width,l.height,0,p,d,null)}else if(n.isDataTexture)if(_.length>0&&h){for(var w=0,M=_.length;w<M;w++)m=_[w],r.texImage2D(3553,w,f,m.width,m.height,0,p,d,m.data);n.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else r.texImage2D(3553,0,f,l.width,l.height,0,p,d,l.data),t.__maxMipLevel=0;else if(n.isCompressedTexture){for(w=0,M=_.length;w<M;w++)m=_[w],n.format!==He&&n.format!==Ge?null!==p?r.compressedTexImage2D(3553,w,f,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):r.texImage2D(3553,w,f,m.width,m.height,0,p,d,m.data);t.__maxMipLevel=_.length-1}else if(n.isDataTexture2DArray)r.texImage3D(35866,0,f,l.width,l.height,l.depth,0,p,d,l.data),t.__maxMipLevel=0;else if(n.isDataTexture3D)r.texImage3D(32879,0,f,l.width,l.height,l.depth,0,p,d,l.data),t.__maxMipLevel=0;else if(_.length>0&&h){for(w=0,M=_.length;w<M;w++)m=_[w],r.texImage2D(3553,w,f,p,d,m);n.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else r.texImage2D(3553,0,f,p,d,l),t.__maxMipLevel=0;y(n,h)&&x(o,n,l.width,l.height),t.__version=n.version,n.onUpdate&&n.onUpdate(n)}function D(t,i,o,s){var c=a.convert(i.texture.format),l=a.convert(i.texture.type),h=b(i.texture.internalFormat,c,l);r.texImage2D(s,0,h,i.width,i.height,0,c,l,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,o,s,n.get(i.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function I(t,r,n){if(e.bindRenderbuffer(36161,t),r.depthBuffer&&!r.stencilBuffer){if(n){var i=F(r);e.renderbufferStorageMultisample(36161,i,33189,r.width,r.height)}else e.renderbufferStorage(36161,33189,r.width,r.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(r.depthBuffer&&r.stencilBuffer){if(n){i=F(r);e.renderbufferStorageMultisample(36161,i,35056,r.width,r.height)}else e.renderbufferStorage(36161,34041,r.width,r.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var o=a.convert(r.texture.format),s=a.convert(r.texture.type),c=b(r.texture.internalFormat,o,s);if(n){i=F(r);e.renderbufferStorageMultisample(36161,i,c,r.width,r.height)}else e.renderbufferStorage(36161,c,r.width,r.height)}e.bindRenderbuffer(36161,null)}function N(t){var r=n.get(t),i=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,t),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),T(r.depthTexture,0);var i=n.get(r.depthTexture).__webglTexture;if(r.depthTexture.format===We)e.framebufferTexture2D(36160,36096,3553,i,0);else{if(r.depthTexture.format!==qe)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,i,0)}}(r.__webglFramebuffer,t)}else if(i){r.__webglDepthbuffer=[];for(var a=0;a<6;a++)e.bindFramebuffer(36160,r.__webglFramebuffer[a]),r.__webglDepthbuffer[a]=e.createRenderbuffer(),I(r.__webglDepthbuffer[a],t)}else e.bindFramebuffer(36160,r.__webglFramebuffer),r.__webglDepthbuffer=e.createRenderbuffer(),I(r.__webglDepthbuffer,t);e.bindFramebuffer(36160,null)}function F(e){return c&&e.isWebGLMultisampleRenderTarget?Math.min(p,e.samples):0}var B=!1,z=!1;this.allocateTextureUnit=function(){var e=S;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),S+=1,e},this.resetTextureUnits=function(){S=0},this.setTexture2D=T,this.setTexture2DArray=function(e,t){var i=n.get(e);e.version>0&&i.__version!==e.version?O(i,e,t):(r.activeTexture(33984+t),r.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=n.get(e);e.version>0&&i.__version!==e.version?O(i,e,t):(r.activeTexture(33984+t),r.bindTexture(32879,i.__webglTexture))},this.setTextureCube=E,this.setTextureCubeDynamic=A,this.setupRenderTarget=function(i){var s=n.get(i),l=n.get(i.texture);i.addEventListener("dispose",M),l.__webglTexture=e.createTexture(),o.memory.textures++;var h=!0===i.isWebGLCubeRenderTarget,u=!0===i.isWebGLMultisampleRenderTarget,p=!0===i.isWebGLMultiviewRenderTarget,d=g(i)||c;if(h){s.__webglFramebuffer=[];for(var f=0;f<6;f++)s.__webglFramebuffer[f]=e.createFramebuffer()}else if(s.__webglFramebuffer=e.createFramebuffer(),u)if(c){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,s.__webglColorRenderbuffer);var m=a.convert(i.texture.format),v=a.convert(i.texture.type),_=b(i.texture.internalFormat,m,v),w=F(i);e.renderbufferStorageMultisample(36161,w,_,i.width,i.height),e.bindFramebuffer(36160,s.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,s.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),i.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),I(s.__webglDepthRenderbuffer,i,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");else if(p){var S=i.width,T=i.height,E=i.numViews;e.bindFramebuffer(36160,s.__webglFramebuffer);var A=t.get("OVR_multiview2");o.memory.textures+=2;var L=e.createTexture();e.bindTexture(35866,L),e.texParameteri(35866,10240,9728),e.texParameteri(35866,10241,9728),e.texImage3D(35866,0,32856,S,T,E,0,6408,5121,null),A.framebufferTextureMultiviewOVR(36160,36064,L,0,0,E);var R=e.createTexture();e.bindTexture(35866,R),e.texParameteri(35866,10240,9728),e.texParameteri(35866,10241,9728),e.texImage3D(35866,0,35056,S,T,E,0,34041,34042,null),A.framebufferTextureMultiviewOVR(36160,33306,R,0,0,E);var P=new Array(E);for(f=0;f<E;++f)P[f]=e.createFramebuffer(),e.bindFramebuffer(36160,P[f]),e.framebufferTextureLayer(36160,36064,L,0,f);s.__webglColorTexture=L,s.__webglDepthStencilTexture=R,s.__webglViewFramebuffers=P,e.bindFramebuffer(36160,null),e.bindTexture(35866,null)}if(h){for(r.bindTexture(34067,l.__webglTexture),C(34067,i.texture,d),f=0;f<6;f++)D(s.__webglFramebuffer[f],i,36064,34069+f);y(i.texture,d)&&x(34067,i.texture,i.width,i.height),r.bindTexture(34067,null)}else p||(r.bindTexture(3553,l.__webglTexture),C(3553,i.texture,d),D(s.__webglFramebuffer,i,36064,3553),y(i.texture,d)&&x(3553,i.texture,i.width,i.height),r.bindTexture(3553,null));i.depthBuffer&&N(i)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(y(t,g(e)||c)){var i=e.isWebGLCubeRenderTarget?34067:3553,a=n.get(t).__webglTexture;r.bindTexture(i,a),x(i,t,e.width,e.height),r.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(c){var r=n.get(t);e.bindFramebuffer(36008,r.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,r.__webglFramebuffer);var i=t.width,a=t.height,o=16384;t.depthBuffer&&(o|=256),t.stencilBuffer&&(o|=1024),e.blitFramebuffer(0,0,i,a,0,0,i,a,o,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),B=!0),e=e.texture),T(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?E(e,t):A(e,t)}}function jl(e,t,r){var n=r.isWebGL2;return{convert:function(e){var r;if(e===Ae)return 5121;if(e===Ne)return 32819;if(e===Fe)return 32820;if(e===Be)return 33635;if(e===Le)return 5120;if(e===Re)return 5122;if(e===Ce)return 5123;if(e===Pe)return 5124;if(e===Oe)return 5125;if(e===De)return 5126;if(e===Ie)return n?5131:null!==(r=t.get("OES_texture_half_float"))?r.HALF_FLOAT_OES:null;if(e===Ue)return 6406;if(e===Ge)return 6407;if(e===He)return 6408;if(e===Ve)return 6409;if(e===ke)return 6410;if(e===We)return 6402;if(e===qe)return 34041;if(e===Xe)return 6403;if(e===Ye)return 36244;if(e===Ze)return 33319;if(e===Je)return 33320;if(e===Qe)return 36248;if(e===Ke)return 36249;if(e===$e||e===et||e===tt||e===rt){if(null===(r=t.get("WEBGL_compressed_texture_s3tc")))return null;if(e===$e)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===et)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===tt)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===rt)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e===nt||e===it||e===at||e===ot){if(null===(r=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(e===nt)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===it)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===at)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===ot)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}return e===st?null!==(r=t.get("WEBGL_compressed_texture_etc1"))?r.COMPRESSED_RGB_ETC1_WEBGL:null:e===ct||e===lt||e===ht||e===ut||e===pt||e===dt||e===ft||e===mt||e===vt||e===gt||e===yt||e===xt||e===bt||e===_t?null!==(r=t.get("WEBGL_compressed_texture_astc"))?e:null:e===ze?n?34042:null!==(r=t.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function Wl(e,t,r,n){Lr.call(this,e,t,n),this.depthBuffer=!1,this.stencilBuffer=!1,this.numViews=r}function ql(e,t){var r,n,i,a,o,s,c,l=2,h=e.extensions,u=e.properties,p=0;function d(e){return e.isArrayCamera?e.cameras:(o[0]=e,o)}this.isAvailable=function(){if(void 0===c){var e=h.get("OVR_multiview2");if(c=null!==e&&!1===t.getContextAttributes().antialias){p=t.getParameter(e.MAX_VIEWS_OVR),r=new Wl(0,0,l),s=new wr,a=[],i=[],o=[];for(var n=0;n<p;n++)a[n]=new Hr,i[n]=new Mr}}return c},this.attachCamera=function(t){!1!==function(e){if(void 0===e.isArrayCamera)return!0;var t=e.cameras;if(t.length>p)return!1;for(var r=1,n=t.length;r<n;r++)if(t[0].viewport.z!==t[r].viewport.z||t[0].viewport.w!==t[r].viewport.w)return!1;return!0}(t)&&(n=e.getRenderTarget(),function(t){if(n?s.set(n.width,n.height):e.getDrawingBufferSize(s),t.isArrayCamera){var i=t.cameras[0].viewport;r.setSize(i.z,i.w),r.setNumViews(t.cameras.length)}else r.setSize(s.x,s.y),r.setNumViews(l)}(t),e.setRenderTarget(r))},this.detachCamera=function(i){r===e.getRenderTarget()&&(e.setRenderTarget(n),function(e){var n=r,i=n.numViews,a=u.get(n).__webglViewFramebuffers,o=n.width,c=n.height;if(e.isArrayCamera)for(var l=0;l<i;l++){var h=e.cameras[l].viewport,p=h.x,d=h.y,f=p+h.z,m=d+h.w;t.bindFramebuffer(36008,a[l]),t.blitFramebuffer(0,0,o,c,p,d,f,m,16384,9728)}else t.bindFramebuffer(36008,a[0]),t.blitFramebuffer(0,0,o,c,0,0,s.x,s.y,16384,9728)}(i))},this.updateCameraProjectionMatricesUniform=function(e,r){for(var n=d(e),i=0;i<n.length;i++)a[i].copy(n[i].projectionMatrix);r.setValue(t,"projectionMatrices",a)},this.updateCameraViewMatricesUniform=function(e,r){for(var n=d(e),i=0;i<n.length;i++)a[i].copy(n[i].matrixWorldInverse);r.setValue(t,"viewMatrices",a)},this.updateObjectMatricesUniforms=function(e,r,n){for(var o=d(r),s=0;s<o.length;s++)a[s].multiplyMatrices(o[s].matrixWorldInverse,e.matrixWorld),i[s].getNormalMatrix(a[s]);n.setValue(t,"modelViewMatrices",a),n.setValue(t,"normalMatrices",i)}}function Xl(e){oa.call(this),this.cameras=e||[]}function Yl(){on.call(this),this.type="Group"}function Zl(e,t){var r=this,n=null,i=null,a="local-floor",o=null,s=[],c=new Map,l=new oa;l.layers.enable(1),l.viewport=new Ar;var h=new oa;h.layers.enable(2),h.viewport=new Ar;var u=new Xl([l,h]);u.layers.enable(1),u.layers.enable(2);var p=null,d=null;function f(e){var t=c.get(e.inputSource);t&&(t.targetRay&&t.targetRay.dispatchEvent({type:e.type}),t.grip&&t.grip.dispatchEvent({type:e.type}))}function m(){c.forEach(function(e,t){e.targetRay&&(e.targetRay.dispatchEvent({type:"disconnected",data:t}),e.targetRay.visible=!1),e.grip&&(e.grip.dispatchEvent({type:"disconnected",data:t}),e.grip.visible=!1)}),c.clear(),e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),w.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function v(e){i=e,w.setContext(n),w.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"})}function g(e){for(var t=n.inputSources,r=0;r<s.length;r++)c.set(t[r],s[r]);for(r=0;r<e.removed.length;r++){var i=e.removed[r];(a=c.get(i))&&(a.targetRay&&a.targetRay.dispatchEvent({type:"disconnected",data:i}),a.grip&&a.grip.dispatchEvent({type:"disconnected",data:i}),c.delete(i))}for(r=0;r<e.added.length;r++){var a;i=e.added[r];(a=c.get(i))&&(a.targetRay&&a.targetRay.dispatchEvent({type:"connected",data:i}),a.grip&&a.grip.dispatchEvent({type:"connected",data:i}))}}this.enabled=!1,this.isPresenting=!1,this.getController=function(e){var t=s[e];return void 0===t&&(t={},s[e]=t),void 0===t.targetRay&&(t.targetRay=new Yl,t.targetRay.matrixAutoUpdate=!1,t.targetRay.visible=!1),t.targetRay},this.getControllerGrip=function(e){var t=s[e];return void 0===t&&(t={},s[e]=t),void 0===t.grip&&(t.grip=new Yl,t.grip.matrixAutoUpdate=!1,t.grip.visible=!1),t.grip},this.setFramebufferScaleFactor=function(){},this.setReferenceSpaceType=function(e){a=e},this.getReferenceSpace=function(){return i},this.getSession=function(){return n},this.setSession=function(e){if(null!==(n=e)){n.addEventListener("select",f),n.addEventListener("selectstart",f),n.addEventListener("selectend",f),n.addEventListener("squeeze",f),n.addEventListener("squeezestart",f),n.addEventListener("squeezeend",f),n.addEventListener("end",m);var r=t.getContextAttributes(),i={antialias:r.antialias,alpha:r.alpha,depth:r.depth,stencil:r.stencil},o=new XRWebGLLayer(n,t,i);n.updateRenderState({baseLayer:o}),n.requestReferenceSpace(a).then(v),n.addEventListener("inputsourceschange",g)}};var y=new Dr,x=new Dr;function b(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.getInverse(e.matrixWorld)}this.getCamera=function(e){u.near=h.near=l.near=e.near,u.far=h.far=l.far=e.far,p===u.near&&d===u.far||(n.updateRenderState({depthNear:u.near,depthFar:u.far}),p=u.near,d=u.far);var t=e.parent,r=u.cameras;b(u,t);for(var i=0;i<r.length;i++)b(r[i],t);e.matrixWorld.copy(u.matrixWorld);for(var a=e.children,o=(i=0,a.length);i<o;i++)a[i].updateMatrixWorld(!0);return function(e,t,r){y.setFromMatrixPosition(t.matrixWorld),x.setFromMatrixPosition(r.matrixWorld);var n=y.distanceTo(x),i=t.projectionMatrix.elements,a=r.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],h=(i[8]-1)/i[0],u=(a[8]+1)/a[0],p=o*h,d=o*u,f=n/(-h+u),m=f*-h;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var v=o+f,g=s+f,b=p-m,_=d+(n-m),w=c*s/g*v,M=l*s/g*v;e.projectionMatrix.makePerspective(b,_,w,M,v,g)}(u,l,h),u};var _=null;var w=new va;w.setAnimationLoop(function(t,r){if(null!==(o=r.getViewerPose(i))){var a=o.views,c=n.renderState.baseLayer;e.setFramebuffer(c.framebuffer);for(var l=0;l<a.length;l++){var h=a[l],p=c.getViewport(h),d=u.cameras[l];d.matrix.fromArray(h.transform.matrix),d.projectionMatrix.fromArray(h.projectionMatrix),d.viewport.set(p.x,p.y,p.width,p.height),0===l&&u.matrix.copy(d.matrix)}}var f=n.inputSources;for(l=0;l<s.length;l++){var m=s[l],v=f[l],g=null,y=null;v&&(m.targetRay&&null!==(g=r.getPose(v.targetRaySpace,i))&&(m.targetRay.matrix.fromArray(g.transform.matrix),m.targetRay.matrix.decompose(m.targetRay.position,m.targetRay.rotation,m.targetRay.scale)),m.grip&&v.gripSpace&&null!==(y=r.getPose(v.gripSpace,i))&&(m.grip.matrix.fromArray(y.transform.matrix),m.grip.matrix.decompose(m.grip.position,m.grip.rotation,m.grip.scale))),m.targetRay&&(m.targetRay.visible=null!==g),m.grip&&(m.grip.visible=null!==y)}_&&_(t,r)}),this.setAnimationLoop=function(e){_=e},this.dispose=function(){}}function Jl(e){var t=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),r=void 0!==e.context?e.context:null,n=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,c=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",h=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,u=null,p=null;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=It,this.physicallyCorrectLights=!1,this.toneMapping=te,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var d,m,v,g,y,x,b,_,w,M,S,T,E,A,L,R,C,P,O=this,D=!1,I=null,N=0,F=0,B=null,z=null,U=-1,G={geometry:null,program:null,wireframe:!1},H=null,V=null,k=new Ar,j=new Ar,W=null,q=t.width,X=t.height,Y=1,Z=null,J=null,Q=new Ar(0,0,q,X),K=new Ar(0,0,q,X),$=!1,ee=new fa,re=new Ws,ne=!1,ie=!1,ae=new Hr,oe=new Dr;function se(){return null===B?Y:1}try{var ce={alpha:n,depth:i,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:h,xrCompatible:!0};if(t.addEventListener("webglcontextlost",de,!1),t.addEventListener("webglcontextrestored",fe,!1),null===(d=r||t.getContext("webgl",ce)||t.getContext("experimental-webgl",ce)))throw null!==t.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===d.getShaderPrecisionFormat&&(d.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Ee){throw console.error("THREE.WebGLRenderer: "+Ee.message),Ee}function le(){m=new qs(d),!1===(v=new js(d,m,e)).isWebGL2&&(m.get("WEBGL_depth_texture"),m.get("OES_texture_float"),m.get("OES_texture_half_float"),m.get("OES_texture_half_float_linear"),m.get("OES_standard_derivatives"),m.get("OES_element_index_uint"),m.get("ANGLE_instanced_arrays")),m.get("OES_texture_float_linear"),P=new jl(d,m,v),(g=new Vl(d,m,v)).scissor(j.copy(K).multiplyScalar(Y).floor()),g.viewport(k.copy(Q).multiplyScalar(Y).floor()),y=new Zs(d),x=new El,b=new kl(d,m,g,x,v,P,y),_=new ga(d,v),w=new Xs(d,_,y),M=new Ks(d,w,_,y),L=new Qs(d),S=new Tl(O,m,v),T=new Cl,E=new Fl,A=new Vs(O,g,M,s),R=new ks(d,m,y,v),C=new Ys(d,m,y,v),y.programs=S.programs,O.capabilities=v,O.extensions=m,O.properties=x,O.renderLists=T,O.state=g,O.info=y}le();var he=new Zl(O,d);this.xr=he;var ue=new ql(O,d),pe=new Hl(O,M,v.maxTextureSize);function de(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),D=!0}function fe(){console.log("THREE.WebGLRenderer: Context Restored."),D=!1,le()}function me(e){var t=e.target;t.removeEventListener("dispose",me),function(e){ve(e),x.remove(e)}(t)}function ve(e){var t=x.get(e).program;e.program=void 0,void 0!==t&&S.releaseProgram(t)}this.shadowMap=pe,this.getContext=function(){return d},this.getContextAttributes=function(){return d.getContextAttributes()},this.forceContextLoss=function(){var e=m.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=m.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return Y},this.setPixelRatio=function(e){void 0!==e&&(Y=e,this.setSize(q,X,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new wr),e.set(q,X)},this.setSize=function(e,r,n){he.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(q=e,X=r,t.width=Math.floor(e*Y),t.height=Math.floor(r*Y),!1!==n&&(t.style.width=e+"px",t.style.height=r+"px"),this.setViewport(0,0,e,r))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new wr),e.set(q*Y,X*Y).floor()},this.setDrawingBufferSize=function(e,r,n){q=e,X=r,Y=n,t.width=Math.floor(e*n),t.height=Math.floor(r*n),this.setViewport(0,0,e,r)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new Ar),e.copy(k)},this.getViewport=function(e){return e.copy(Q)},this.setViewport=function(e,t,r,n){e.isVector4?Q.set(e.x,e.y,e.z,e.w):Q.set(e,t,r,n),g.viewport(k.copy(Q).multiplyScalar(Y).floor())},this.getScissor=function(e){return e.copy(K)},this.setScissor=function(e,t,r,n){e.isVector4?K.set(e.x,e.y,e.z,e.w):K.set(e,t,r,n),g.scissor(j.copy(K).multiplyScalar(Y).floor())},this.getScissorTest=function(){return $},this.setScissorTest=function(e){g.setScissorTest($=e)},this.setOpaqueSort=function(e){Z=e},this.setTransparentSort=function(e){J=e},this.getClearColor=function(){return A.getClearColor()},this.setClearColor=function(){A.setClearColor.apply(A,arguments)},this.getClearAlpha=function(){return A.getClearAlpha()},this.setClearAlpha=function(){A.setClearAlpha.apply(A,arguments)},this.clear=function(e,t,r){var n=0;(void 0===e||e)&&(n|=16384),(void 0===t||t)&&(n|=256),(void 0===r||r)&&(n|=1024),d.clear(n)},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",de,!1),t.removeEventListener("webglcontextrestored",fe,!1),T.dispose(),E.dispose(),x.dispose(),M.dispose(),he.dispose(),xe.stop()},this.renderBufferImmediate=function(e,t){g.initAttributes();var r=x.get(e);e.hasPositions&&!r.position&&(r.position=d.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=d.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=d.createBuffer()),e.hasColors&&!r.color&&(r.color=d.createBuffer());var n=t.getAttributes();e.hasPositions&&(d.bindBuffer(34962,r.position),d.bufferData(34962,e.positionArray,35048),g.enableAttribute(n.position),d.vertexAttribPointer(n.position,3,5126,!1,0,0)),e.hasNormals&&(d.bindBuffer(34962,r.normal),d.bufferData(34962,e.normalArray,35048),g.enableAttribute(n.normal),d.vertexAttribPointer(n.normal,3,5126,!1,0,0)),e.hasUvs&&(d.bindBuffer(34962,r.uv),d.bufferData(34962,e.uvArray,35048),g.enableAttribute(n.uv),d.vertexAttribPointer(n.uv,2,5126,!1,0,0)),e.hasColors&&(d.bindBuffer(34962,r.color),d.bufferData(34962,e.colorArray,35048),g.enableAttribute(n.color),d.vertexAttribPointer(n.color,3,5126,!1,0,0)),g.disableUnusedAttributes(),d.drawArrays(4,0,e.count),e.count=0};var ge=new sn;this.renderBufferDirect=function(e,t,r,n,i,a){null===t&&(t=ge);var o=i.isMesh&&i.matrixWorld.determinant()<0,s=Me(e,t,n,i);g.setMaterial(n,o);var c=!1;G.geometry===r.id&&G.program===s.id&&G.wireframe===(!0===n.wireframe)||(G.geometry=r.id,G.program=s.id,G.wireframe=!0===n.wireframe,c=!0),(n.morphTargets||n.morphNormals)&&(L.update(i,r,n,s),c=!0);var l=r.index,h=r.attributes.position;if(null===l){if(void 0===h||0===h.count)return}else if(0===l.count)return;var u,p=1;!0===n.wireframe&&(l=w.getWireframeAttribute(r),p=2);var f=R;null!==l&&(u=_.get(l),(f=C).setIndex(u)),c&&(!function(e,t,r,n){if(!1===v.isWebGL2&&(e.isInstancedMesh||t.isInstancedBufferGeometry)&&null===m.get("ANGLE_instanced_arrays"))return;g.initAttributes();var i=t.attributes,a=n.getAttributes(),o=r.defaultAttributeValues;for(var s in a){var c=a[s];if(c>=0){var l=i[s];if(void 0!==l){var h=l.normalized,u=l.itemSize,p=_.get(l);if(void 0===p)continue;var f=p.buffer,y=p.type,x=p.bytesPerElement;if(l.isInterleavedBufferAttribute){var b=l.data,w=b.stride,M=l.offset;b&&b.isInstancedInterleavedBuffer?(g.enableAttributeAndDivisor(c,b.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=b.meshPerAttribute*b.count)):g.enableAttribute(c),d.bindBuffer(34962,f),d.vertexAttribPointer(c,u,y,h,w*x,M*x)}else l.isInstancedBufferAttribute?(g.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=l.meshPerAttribute*l.count)):g.enableAttribute(c),d.bindBuffer(34962,f),d.vertexAttribPointer(c,u,y,h,0,0)}else if("instanceMatrix"===s){var p=_.get(e.instanceMatrix);if(void 0===p)continue;var f=p.buffer,y=p.type;g.enableAttributeAndDivisor(c+0,1),g.enableAttributeAndDivisor(c+1,1),g.enableAttributeAndDivisor(c+2,1),g.enableAttributeAndDivisor(c+3,1),d.bindBuffer(34962,f),d.vertexAttribPointer(c+0,4,y,!1,64,0),d.vertexAttribPointer(c+1,4,y,!1,64,16),d.vertexAttribPointer(c+2,4,y,!1,64,32),d.vertexAttribPointer(c+3,4,y,!1,64,48)}else if(void 0!==o){var S=o[s];if(void 0!==S)switch(S.length){case 2:d.vertexAttrib2fv(c,S);break;case 3:d.vertexAttrib3fv(c,S);break;case 4:d.vertexAttrib4fv(c,S);break;default:d.vertexAttrib1fv(c,S)}}}}g.disableUnusedAttributes()}(i,r,n,s),null!==l&&d.bindBuffer(34963,u.buffer));var y=null!==l?l.count:h.count,x=r.drawRange.start*p,b=r.drawRange.count*p,M=null!==a?a.start*p:0,S=null!==a?a.count*p:1/0,T=Math.max(x,M),E=Math.min(y,x+b,M+S)-1,A=Math.max(0,E-T+1);if(0!==A){if(i.isMesh)!0===n.wireframe?(g.setLineWidth(n.wireframeLinewidth*se()),f.setMode(1)):f.setMode(4);else if(i.isLine){var P=n.linewidth;void 0===P&&(P=1),g.setLineWidth(P*se()),i.isLineSegments?f.setMode(1):i.isLineLoop?f.setMode(2):f.setMode(3)}else i.isPoints?f.setMode(0):i.isSprite&&f.setMode(4);i.isInstancedMesh?f.renderInstances(r,T,A,i.count):r.isInstancedBufferGeometry?f.renderInstances(r,T,A,r.maxInstancedCount):f.render(T,A)}},this.compile=function(e,t){(p=E.get(e,t)).init(),e.traverse(function(e){e.isLight&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))}),p.setupLights(t);var r={};e.traverse(function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n<t.material.length;n++)t.material[n].uuid in r==!1&&(we(t.material[n],e,t),r[t.material[n].uuid]=!0);else t.material.uuid in r==!1&&(we(t.material,e,t),r[t.material.uuid]=!0)})};var ye=null;var xe=new va;function be(e,t,r,n){for(var i=0,a=e.length;i<a;i++){var o=e[i],s=o.object,c=o.geometry,l=void 0===n?o.material:n,h=o.group;if(r.isArrayCamera)if(V=r,he.enabled&&ue.isAvailable())_e(s,t,r,c,l,h);else for(var u=r.cameras,d=0,f=u.length;d<f;d++){var m=u[d];s.layers.test(m.layers)&&(g.viewport(k.copy(m.viewport)),p.setupLights(m),_e(s,t,m,c,l,h))}else V=null,_e(s,t,r,c,l,h)}}function _e(e,t,r,n,i,a){if(e.onBeforeRender(O,t,r,n,i,a),p=E.get(t,V||r),e.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var o=Me(r,t,i,e);g.setMaterial(i),G.geometry=null,G.program=null,G.wireframe=!1,function(e,t){e.render(function(e){O.renderBufferImmediate(e,t)})}(e,o)}else O.renderBufferDirect(r,t,n,i,e,a);e.onAfterRender(O,t,r,n,i,a),p=E.get(t,V||r)}function we(e,t,r){var n=x.get(e),i=p.state.lights,a=p.state.shadowsArray,o=i.state.version,s=S.getParameters(e,i.state,a,t,re.numPlanes,re.numIntersection,r),c=S.getProgramCacheKey(s),l=n.program,h=!0;if(void 0===l)e.addEventListener("dispose",me);else if(l.cacheKey!==c)ve(e);else if(n.lightsStateVersion!==o)n.lightsStateVersion=o,h=!1;else{if(void 0!==s.shaderID)return;h=!1}h&&(l=S.acquireProgram(s,c),n.program=l,n.uniforms=s.uniforms,n.environment=e.isMeshStandardMaterial?t.environment:null,n.outputEncoding=O.outputEncoding,e.program=l);var u=l.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var d=0;d<O.maxMorphTargets;d++)u["morphTarget"+d]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(d=0;d<O.maxMorphNormals;d++)u["morphNormal"+d]>=0&&e.numSupportedMorphNormals++}var f=n.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(n.numClippingPlanes=re.numPlanes,n.numIntersection=re.numIntersection,f.clippingPlanes=re.uniform),n.fog=t.fog,n.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),n.lightsStateVersion=o,n.needsLights&&(f.ambientLightColor.value=i.state.ambient,f.lightProbe.value=i.state.probe,f.directionalLights.value=i.state.directional,f.spotLights.value=i.state.spot,f.rectAreaLights.value=i.state.rectArea,f.pointLights.value=i.state.point,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMap.value=i.state.directionalShadowMap,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotShadowMap.value=i.state.spotShadowMap,f.spotShadowMatrix.value=i.state.spotShadowMatrix,f.pointShadowMap.value=i.state.pointShadowMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix);var m=n.program.getUniforms(),v=Kc.seqWithValue(m.seq,f);n.uniformsList=v}function Me(e,t,r,n){b.resetTextureUnits();var i=t.fog,a=r.isMeshStandardMaterial?t.environment:null,o=x.get(r),s=p.state.lights;if(ne&&(ie||e!==H)){var c=e===H&&r.id===U;re.setState(r.clippingPlanes,r.clipIntersection,r.clipShadows,e,o,c)}r.version===o.__version?void 0===o.program?we(r,t,n):r.fog&&o.fog!==i?we(r,t,n):o.environment!==a?we(r,t,n):o.needsLights&&o.lightsStateVersion!==s.state.version?we(r,t,n):void 0===o.numClippingPlanes||o.numClippingPlanes===re.numPlanes&&o.numIntersection===re.numIntersection?o.outputEncoding!==O.outputEncoding&&we(r,t,n):we(r,t,n):(we(r,t,n),o.__version=r.version);var l,h,u=!1,m=!1,y=!1,_=o.program,w=_.getUniforms(),M=o.uniforms;if(g.useProgram(_.program)&&(u=!0,m=!0,y=!0),r.id!==U&&(U=r.id,m=!0),u||H!==e){if(_.numMultiviewViews>0?ue.updateCameraProjectionMatricesUniform(e,w):w.setValue(d,"projectionMatrix",e.projectionMatrix),v.logarithmicDepthBuffer&&w.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),H!==e&&(H=e,m=!0,y=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){var S=w.map.cameraPosition;void 0!==S&&S.setValue(d,oe.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&w.setValue(d,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.skinning)&&(_.numMultiviewViews>0?ue.updateCameraViewMatricesUniform(e,w):w.setValue(d,"viewMatrix",e.matrixWorldInverse))}if(r.skinning){w.setOptional(d,n,"bindMatrix"),w.setOptional(d,n,"bindMatrixInverse");var T=n.skeleton;if(T){var E=T.bones;if(v.floatVertexTextures){if(void 0===T.boneTexture){var A=Math.sqrt(4*E.length);A=_r.ceilPowerOfTwo(A),A=Math.max(A,4);var L=new Float32Array(A*A*4);L.set(T.boneMatrices);var R=new ua(L,A,A,He,De);T.boneMatrices=L,T.boneTexture=R,T.boneTextureSize=A}w.setValue(d,"boneTexture",T.boneTexture,b),w.setValue(d,"boneTextureSize",T.boneTextureSize)}else w.setOptional(d,T,"boneMatrices")}}return(m||o.receiveShadow!==n.receiveShadow)&&(o.receiveShadow=n.receiveShadow,w.setValue(d,"receiveShadow",n.receiveShadow)),m&&(w.setValue(d,"toneMappingExposure",O.toneMappingExposure),w.setValue(d,"toneMappingWhitePoint",O.toneMappingWhitePoint),o.needsLights&&(h=y,(l=M).ambientLightColor.needsUpdate=h,l.lightProbe.needsUpdate=h,l.directionalLights.needsUpdate=h,l.pointLights.needsUpdate=h,l.spotLights.needsUpdate=h,l.rectAreaLights.needsUpdate=h,l.hemisphereLights.needsUpdate=h),i&&r.fog&&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)}(M,i),r.isMeshBasicMaterial?Se(M,r):r.isMeshLambertMaterial?(Se(M,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(M,r)):r.isMeshToonMaterial?(Se(M,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===f&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===f&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(M,r)):r.isMeshPhongMaterial?(Se(M,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===f&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===f&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(M,r)):r.isMeshStandardMaterial?(Se(M,r,a),r.isMeshPhysicalMaterial?function(e,t,r){Te(e,t,r),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===f&&e.clearcoatNormalScale.value.negate());e.transparency.value=t.transparency}(M,r,a):Te(M,r,a)):r.isMeshMatcapMaterial?(Se(M,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===f&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===f&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(M,r)):r.isMeshDepthMaterial?(Se(M,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(M,r)):r.isMeshDistanceMaterial?(Se(M,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}(M,r)):r.isMeshNormalMaterial?(Se(M,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===f&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===f&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(M,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(M,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(M,r)):r.isPointsMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*Y,e.scale.value=.5*X,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);var r;t.map?r=t.map:t.alphaMap&&(r=t.alphaMap);void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}(M,r):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);var r;t.map?r=t.map:t.alphaMap&&(r=t.alphaMap);void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),e.uvTransform.value.copy(r.matrix))}(M,r):r.isShadowMaterial&&(M.color.value.copy(r.color),M.opacity.value=r.opacity),void 0!==M.ltc_1&&(M.ltc_1.value=ma.LTC_1),void 0!==M.ltc_2&&(M.ltc_2.value=ma.LTC_2),Kc.upload(d,o.uniformsList,M,b),r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(Kc.upload(d,o.uniformsList,M,b),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&w.setValue(d,"center",n.center),_.numMultiviewViews>0?ue.updateObjectMatricesUniforms(n,e,w):(w.setValue(d,"modelViewMatrix",n.modelViewMatrix),w.setValue(d,"normalMatrix",n.normalMatrix)),w.setValue(d,"modelMatrix",n.matrixWorld),_}function Se(e,t,r){e.opacity.value=t.opacity,t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap);var n,i,a=t.envMap||r;a&&(e.envMap.value=a,e.flipEnvMap.value=a.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=x.get(a).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix)),t.aoMap?i=t.aoMap:t.lightMap&&(i=t.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uv2Transform.value.copy(i.matrix))}function Te(e,t,r){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===f&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===f&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),(t.envMap||r)&&(e.envMapIntensity.value=t.envMapIntensity)}xe.setAnimationLoop(function(e){he.isPresenting||ye&&ye(e)}),"undefined"!=typeof window&&xe.setContext(window),this.setAnimationLoop=function(e){ye=e,he.setAnimationLoop(e),xe.start()},this.render=function(e,t){var r,n;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),r=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),n=arguments[3]),t&&t.isCamera){if(!D){G.geometry=null,G.program=null,G.wireframe=!1,U=-1,H=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),he.enabled&&he.isPresenting&&(t=he.getCamera(t)),(p=E.get(e,t)).init(),e.onBeforeRender(O,e,t,r||B),ae.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ee.setFromProjectionMatrix(ae),ie=this.localClippingEnabled,ne=re.init(this.clippingPlanes,ie,t),(u=T.get(e,t)).init(),function e(t,r,n,i){if(!1===t.visible)return;var a=t.layers.test(r.layers);if(a)if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(r);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||ee.intersectsSprite(t)){i&&oe.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ae);var o=M.update(t),s=t.material;s.visible&&u.push(t,o,s,n,oe.z,null)}}else if(t.isImmediateRenderObject)i&&oe.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ae),u.push(t,null,t.material,n,oe.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==y.render.frame&&(t.skeleton.update(),t.skeleton.frame=y.render.frame),!t.frustumCulled||ee.intersectsObject(t))){i&&oe.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ae);var o=M.update(t),s=t.material;if(Array.isArray(s))for(var c=o.groups,l=0,h=c.length;l<h;l++){var d=c[l],f=s[d.materialIndex];f&&f.visible&&u.push(t,o,f,n,oe.z,d)}else s.visible&&u.push(t,o,s,n,oe.z,null)}var m=t.children;for(var l=0,h=m.length;l<h;l++)e(m[l],r,n,i)}(e,t,0,O.sortObjects),!0===O.sortObjects&&u.sort(Z,J),ne&&re.beginShadows();var i=p.state.shadowsArray;pe.render(i,e,t),p.setupLights(t),ne&&re.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==r&&this.setRenderTarget(r),he.enabled&&ue.isAvailable()&&ue.attachCamera(t),A.render(u,e,t,n);var a=u.opaque,o=u.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;a.length&&be(a,e,t,s),o.length&&be(o,e,t,s)}else a.length&&be(a,e,t),o.length&&be(o,e,t);e.onAfterRender(O,e,t),null!==B&&(b.updateRenderTargetMipmap(B),b.updateMultisampleRenderTarget(B)),g.buffers.depth.setTest(!0),g.buffers.depth.setMask(!0),g.buffers.color.setMask(!0),g.setPolygonOffset(!1),he.enabled&&ue.isAvailable()&&ue.detachCamera(t),u=null,p=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){I!==e&&null===B&&d.bindFramebuffer(36160,e),I=e},this.getActiveCubeFace=function(){return N},this.getActiveMipmapLevel=function(){return F},this.getRenderTarget=function(){return B},this.setRenderTarget=function(e,t,r){B=e,N=t,F=r,e&&void 0===x.get(e).__webglFramebuffer&&b.setupRenderTarget(e);var n=I,i=!1;if(e){var a=x.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(n=a[t||0],i=!0):n=e.isWebGLMultisampleRenderTarget?x.get(e).__webglMultisampledFramebuffer:a,k.copy(e.viewport),j.copy(e.scissor),W=e.scissorTest}else k.copy(Q).multiplyScalar(Y).floor(),j.copy(K).multiplyScalar(Y).floor(),W=$;if(z!==n&&(d.bindFramebuffer(36160,n),z=n),g.viewport(k),g.scissor(j),g.setScissorTest(W),i){var o=x.get(e.texture);d.framebufferTexture2D(36160,36064,34069+(t||0),o.__webglTexture,r||0)}},this.readRenderTargetPixels=function(e,t,r,n,i,a,o){if(e&&e.isWebGLRenderTarget){var s=x.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){var c=!1;s!==z&&(d.bindFramebuffer(36160,s),c=!0);try{var l=e.texture,h=l.format,u=l.type;if(h!==He&&P.convert(h)!==d.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(u===Ae||P.convert(u)===d.getParameter(35738)||u===De&&(v.isWebGL2||m.get("OES_texture_float")||m.get("WEBGL_color_buffer_float"))||u===Ie&&(v.isWebGL2?m.get("EXT_color_buffer_float"):m.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===d.checkFramebufferStatus(36160)?t>=0&&t<=e.width-n&&r>=0&&r<=e.height-i&&d.readPixels(t,r,n,i,P.convert(h),P.convert(u),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{c&&d.bindFramebuffer(36160,z)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,r){void 0===r&&(r=0);var n=Math.pow(2,-r),i=Math.floor(t.image.width*n),a=Math.floor(t.image.height*n),o=P.convert(t.format);b.setTexture2D(t,0),d.copyTexImage2D(3553,r,o,e.x,e.y,i,a,0),g.unbindTexture()},this.copyTextureToTexture=function(e,t,r,n){var i=t.image.width,a=t.image.height,o=P.convert(r.format),s=P.convert(r.type);b.setTexture2D(r,0),t.isDataTexture?d.texSubImage2D(3553,n||0,e.x,e.y,i,a,o,s,t.image.data):d.texSubImage2D(3553,n||0,e.x,e.y,o,s,t.image),g.unbindTexture()},this.initTexture=function(e){b.setTexture2D(e,0),g.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Ql(e,t){this.name="",this.color=new Qn(e),this.density=void 0!==t?t:25e-5}function Kl(e,t,r){this.name="",this.color=new Qn(e),this.near=void 0!==t?t:1,this.far=void 0!==r?r:1e3}function $l(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=cr,this.updateRange={offset:0,count:-1},this.version=0}Wl.prototype=Object.assign(Object.create(Lr.prototype),{constructor:Wl,isWebGLMultiviewRenderTarget:!0,copy:function(e){return Lr.prototype.copy.call(this,e),this.numViews=e.numViews,this},setNumViews:function(e){return this.numViews!==e&&(this.numViews=e,this.dispose()),this}}),Xl.prototype=Object.assign(Object.create(oa.prototype),{constructor:Xl,isArrayCamera:!0}),Yl.prototype=Object.assign(Object.create(on.prototype),{constructor:Yl,isGroup:!0}),Object.assign(Zl.prototype,gr.prototype),Object.assign(Ql.prototype,{isFogExp2:!0,clone:function(){return new Ql(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(Kl.prototype,{isFog:!0,clone:function(){return new Kl(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty($l.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign($l.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,r){e*=this.stride,r*=t.stride;for(var n=0,i=this.stride;n<i;n++)this.array[e+n]=t.array[r+n];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}});var eh,th=new Dr;function rh(e,t,r,n){this.data=e,this.itemSize=t,this.offset=r,this.normalized=!0===n}function nh(e){ni.call(this),this.type="SpriteMaterial",this.color=new Qn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.defineProperties(rh.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(rh.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,r=this.data.count;t<r;t++)th.x=this.getX(t),th.y=this.getY(t),th.z=this.getZ(t),th.applyMatrix4(e),this.setXYZ(t,th.x,th.y,th.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this},setXYZ:function(e,t,r,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this},setXYZW:function(e,t,r,n,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=r,this.data.array[e+2]=n,this.data.array[e+3]=i,this}}),nh.prototype=Object.create(ni.prototype),nh.prototype.constructor=nh,nh.prototype.isSpriteMaterial=!0,nh.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var ih=new Dr,ah=new Dr,oh=new Dr,sh=new wr,ch=new wr,lh=new Hr,hh=new Dr,uh=new Dr,ph=new Dr,dh=new wr,fh=new wr,mh=new wr;function vh(e){if(on.call(this),this.type="Sprite",void 0===eh){eh=new Ti;var t=new $l(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);eh.setIndex([0,1,2,0,2,3]),eh.setAttribute("position",new rh(t,3,0,!1)),eh.setAttribute("uv",new rh(t,2,3,!1))}this.geometry=eh,this.material=void 0!==e?e:new nh,this.center=new wr(.5,.5)}function gh(e,t,r,n,i,a){sh.subVectors(e,r).addScalar(.5).multiply(n),void 0!==i?(ch.x=a*sh.x-i*sh.y,ch.y=i*sh.x+a*sh.y):ch.copy(sh),e.copy(t),e.x+=ch.x,e.y+=ch.y,e.applyMatrix4(lh)}vh.prototype=Object.assign(Object.create(on.prototype),{constructor:vh,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),ah.setFromMatrixScale(this.matrixWorld),lh.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),oh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&ah.multiplyScalar(-oh.z);var r,n,i=this.material.rotation;0!==i&&(n=Math.cos(i),r=Math.sin(i));var a=this.center;gh(hh.set(-.5,-.5,0),oh,a,ah,r,n),gh(uh.set(.5,-.5,0),oh,a,ah,r,n),gh(ph.set(.5,.5,0),oh,a,ah,r,n),dh.set(0,0),fh.set(1,0),mh.set(1,1);var o=e.ray.intersectTriangle(hh,uh,ph,!1,ih);if(null!==o||(gh(uh.set(-.5,.5,0),oh,a,ah,r,n),fh.set(0,1),null!==(o=e.ray.intersectTriangle(hh,ph,uh,!1,ih)))){var s=e.ray.origin.distanceTo(ih);s<e.near||s>e.far||t.push({distance:s,point:ih.clone(),uv:Xn.getUV(ih,hh,uh,ph,dh,fh,mh,new wr),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return on.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var yh=new Dr,xh=new Dr;function bh(){on.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function _h(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),ki.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Hr,this.bindMatrixInverse=new Hr}bh.prototype=Object.assign(Object.create(on.prototype),{constructor:bh,isLOD:!0,copy:function(e){on.prototype.copy.call(this,e,!1);for(var t=e.levels,r=0,n=t.length;r<n;r++){var i=t[r];this.addLevel(i.object.clone(),i.distance)}return this.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var r=this.levels,n=0;n<r.length&&!(t<r[n].distance);n++);return r.splice(n,0,{distance:t,object:e}),this.add(e),this},getObjectForDistance:function(e){var t=this.levels;if(t.length>0){for(var r=1,n=t.length;r<n&&!(e<t[r].distance);r++);return t[r-1].object}return null},raycast:function(e,t){if(this.levels.length>0){yh.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(yh);this.getObjectForDistance(r).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){yh.setFromMatrixPosition(e.matrixWorld),xh.setFromMatrixPosition(this.matrixWorld);var r=yh.distanceTo(xh);t[0].object.visible=!0;for(var n=1,i=t.length;n<i&&r>=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(;n<i;n++)t[n].object.visible=!1}},toJSON:function(e){var t=on.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];for(var r=this.levels,n=0,i=r.length;n<i;n++){var a=r[n];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t}}),_h.prototype=Object.assign(Object.create(ki.prototype),{constructor:_h,isSkinnedMesh:!0,bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new Ar,t=this.geometry.attributes.skinWeight,r=0,n=t.count;r<n;r++){e.x=t.getX(r),e.y=t.getY(r),e.z=t.getZ(r),e.w=t.getW(r);var i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(r,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){ki.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var wh=new Hr,Mh=new Hr;function Sh(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),this.frame=-1,void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var r=0,n=this.bones.length;r<n;r++)this.boneInverses.push(new Hr)}}function Th(){on.call(this),this.type="Bone"}Object.assign(Sh.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var r=new Hr;this.bones[e]&&r.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(r)}},pose:function(){var e,t,r;for(t=0,r=this.bones.length;t<r;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,r=this.bones.length;t<r;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:function(){for(var e=this.bones,t=this.boneInverses,r=this.boneMatrices,n=this.boneTexture,i=0,a=e.length;i<a;i++){var o=e[i]?e[i].matrixWorld:Mh;wh.multiplyMatrices(o,t[i]),wh.toArray(r,16*i)}void 0!==n&&(n.needsUpdate=!0)},clone:function(){return new Sh(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,r=this.bones.length;t<r;t++){var n=this.bones[t];if(n.name===e)return n}}}),Th.prototype=Object.assign(Object.create(on.prototype),{constructor:Th,isBone:!0});var Eh=new Hr,Ah=new Hr,Lh=[],Rh=new ki;function Ch(e,t,r){ki.call(this,e,t),this.instanceMatrix=new oi(new Float32Array(16*r),16),this.count=r,this.frustumCulled=!1}function Ph(e){ni.call(this),this.type="LineBasicMaterial",this.color=new Qn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(e)}Ch.prototype=Object.assign(Object.create(ki.prototype),{constructor:Ch,isInstancedMesh:!0,getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var r=this.matrixWorld,n=this.count;if(Rh.geometry=this.geometry,Rh.material=this.material,void 0!==Rh.material)for(var i=0;i<n;i++)this.getMatrixAt(i,Eh),Ah.multiplyMatrices(r,Eh),Rh.matrixWorld=Ah,Rh.raycast(e,Lh),Lh.length>0&&(Lh[0].instanceId=i,Lh[0].object=this,t.push(Lh[0]),Lh.length=0)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){}}),Ph.prototype=Object.create(ni.prototype),Ph.prototype.constructor=Ph,Ph.prototype.isLineBasicMaterial=!0,Ph.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this};var Oh=new Dr,Dh=new Dr,Ih=new Hr,Nh=new On,Fh=new Sn;function Bh(e,t,r){1===r&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),on.call(this),this.type="Line",this.geometry=void 0!==e?e:new Ti,this.material=void 0!==t?t:new Ph}Bh.prototype=Object.assign(Object.create(on.prototype),{constructor:Bh,isLine:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,r=[0],n=1,i=t.count;n<i;n++)Oh.fromBufferAttribute(t,n-1),Dh.fromBufferAttribute(t,n),r[n]=r[n-1],r[n]+=Oh.distanceTo(Dh);e.setAttribute("lineDistance",new fi(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices;(r=e.lineDistances)[0]=0;for(n=1,i=a.length;n<i;n++)r[n]=r[n-1],r[n]+=a[n-1].distanceTo(a[n])}return this},raycast:function(e,t){var r=e.linePrecision,n=this.geometry,i=this.matrixWorld;if(null===n.boundingSphere&&n.computeBoundingSphere(),Fh.copy(n.boundingSphere),Fh.applyMatrix4(i),Fh.radius+=r,!1!==e.ray.intersectsSphere(Fh)){Ih.getInverse(i),Nh.copy(e.ray).applyMatrix4(Ih);var a=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a,s=new Dr,c=new Dr,l=new Dr,h=new Dr,u=this&&this.isLineSegments?2:1;if(n.isBufferGeometry){var p=n.index,d=n.attributes.position.array;if(null!==p)for(var f=p.array,m=0,v=f.length-1;m<v;m+=u){var g=f[m],y=f[m+1];if(s.fromArray(d,3*g),c.fromArray(d,3*y),!(Nh.distanceSqToSegment(s,c,h,l)>o))h.applyMatrix4(this.matrixWorld),(_=e.ray.origin.distanceTo(h))<e.near||_>e.far||t.push({distance:_,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}else for(m=0,v=d.length/3-1;m<v;m+=u){if(s.fromArray(d,3*m),c.fromArray(d,3*m+3),!(Nh.distanceSqToSegment(s,c,h,l)>o))h.applyMatrix4(this.matrixWorld),(_=e.ray.origin.distanceTo(h))<e.near||_>e.far||t.push({distance:_,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else if(n.isGeometry){var x=n.vertices,b=x.length;for(m=0;m<b-1;m+=u){var _;if(!(Nh.distanceSqToSegment(x[m],x[m+1],h,l)>o))h.applyMatrix4(this.matrixWorld),(_=e.ray.origin.distanceTo(h))<e.near||_>e.far||t.push({distance:_,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var zh=new Dr,Uh=new Dr;function Gh(e,t){Bh.call(this,e,t),this.type="LineSegments"}function Hh(e,t){Bh.call(this,e,t),this.type="LineLoop"}function Vh(e){ni.call(this),this.type="PointsMaterial",this.color=new Qn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}Gh.prototype=Object.assign(Object.create(Bh.prototype),{constructor:Gh,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,r=[],n=0,i=t.count;n<i;n+=2)zh.fromBufferAttribute(t,n),Uh.fromBufferAttribute(t,n+1),r[n]=0===n?0:r[n-1],r[n+1]=r[n]+zh.distanceTo(Uh);e.setAttribute("lineDistance",new fi(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices;for(r=e.lineDistances,n=0,i=a.length;n<i;n+=2)zh.copy(a[n]),Uh.copy(a[n+1]),r[n]=0===n?0:r[n-1],r[n+1]=r[n]+zh.distanceTo(Uh)}return this}}),Hh.prototype=Object.assign(Object.create(Bh.prototype),{constructor:Hh,isLineLoop:!0}),Vh.prototype=Object.create(ni.prototype),Vh.prototype.constructor=Vh,Vh.prototype.isPointsMaterial=!0,Vh.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var kh=new Hr,jh=new On,Wh=new Sn,qh=new Dr;function Xh(e,t){on.call(this),this.type="Points",this.geometry=void 0!==e?e:new Ti,this.material=void 0!==t?t:new Vh,this.updateMorphTargets()}function Yh(e,t,r,n,i,a,o){var s=jh.distanceSqToPoint(e);if(s<r){var c=new Dr;jh.closestPointToPoint(e,c),c.applyMatrix4(n);var l=i.ray.origin.distanceTo(c);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(s),point:c,index:t,face:null,object:o})}}function Zh(e,t,r,n,i,a,o,s,c){Er.call(this,e,t,r,n,i,a,o,s,c),this.format=void 0!==o?o:Ge,this.minFilter=void 0!==a?a:we,this.magFilter=void 0!==i?i:we,this.generateMipmaps=!1}function Jh(e,t,r,n,i,a,o,s,c,l,h,u){Er.call(this,null,a,o,s,c,l,n,i,h,u),this.image={width:t,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Qh(e,t,r,n,i,a,o,s,c){Er.call(this,e,t,r,n,i,a,o,s,c),this.needsUpdate=!0}function Kh(e,t,r,n,i,a,o,s,c,l){if((l=void 0!==l?l:We)!==We&&l!==qe)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===r&&l===We&&(r=Ce),void 0===r&&l===qe&&(r=ze),Er.call(this,null,n,i,a,o,s,l,r,c),this.image={width:e,height:t},this.magFilter=void 0!==o?o:ge,this.minFilter=void 0!==s?s:ge,this.flipY=!1,this.generateMipmaps=!1}function $h(e){Ti.call(this),this.type="WireframeGeometry";var t,r,n,i,a,o,s,c,l,h,u=[],p=[0,0],d={},f=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,n=m.length;t<n;t++){var v=m[t];for(r=0;r<3;r++)s=v[f[r]],c=v[f[(r+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[l=p[0]+","+p[1]]&&(d[l]={index1:p[0],index2:p[1]})}for(l in d)o=d[l],h=e.vertices[o.index1],u.push(h.x,h.y,h.z),h=e.vertices[o.index2],u.push(h.x,h.y,h.z)}else if(e&&e.isBufferGeometry){var g,y,x,b,_,w,M;if(h=new Dr,null!==e.index){for(g=e.attributes.position,y=e.index,0===(x=e.groups).length&&(x=[{start:0,count:y.count,materialIndex:0}]),i=0,a=x.length;i<a;++i)for(t=_=(b=x[i]).start,n=_+b.count;t<n;t+=3)for(r=0;r<3;r++)s=y.getX(t+r),c=y.getX(t+(r+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[l=p[0]+","+p[1]]&&(d[l]={index1:p[0],index2:p[1]});for(l in d)o=d[l],h.fromBufferAttribute(g,o.index1),u.push(h.x,h.y,h.z),h.fromBufferAttribute(g,o.index2),u.push(h.x,h.y,h.z)}else for(t=0,n=(g=e.attributes.position).count/3;t<n;t++)for(r=0;r<3;r++)w=3*t+r,h.fromBufferAttribute(g,w),u.push(h.x,h.y,h.z),M=3*t+(r+1)%3,h.fromBufferAttribute(g,M),u.push(h.x,h.y,h.z)}this.setAttribute("position",new fi(u,3))}function eu(e,t,r){Ji.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:r},this.fromBufferGeometry(new tu(e,t,r)),this.mergeVertices()}function tu(e,t,r){Ti.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:r};var n,i,a=[],o=[],s=[],c=[],l=new Dr,h=new Dr,u=new Dr,p=new Dr,d=new Dr;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var f=t+1;for(n=0;n<=r;n++){var m=n/r;for(i=0;i<=t;i++){var v=i/t;e(v,m,h),o.push(h.x,h.y,h.z),v-1e-5>=0?(e(v-1e-5,m,u),p.subVectors(h,u)):(e(v+1e-5,m,u),p.subVectors(u,h)),m-1e-5>=0?(e(v,m-1e-5,u),d.subVectors(h,u)):(e(v,m+1e-5,u),d.subVectors(u,h)),l.crossVectors(p,d).normalize(),s.push(l.x,l.y,l.z),c.push(v,m)}}for(n=0;n<r;n++)for(i=0;i<t;i++){var g=n*f+i,y=n*f+i+1,x=(n+1)*f+i+1,b=(n+1)*f+i;a.push(g,y,b),a.push(y,x,b)}this.setIndex(a),this.setAttribute("position",new fi(o,3)),this.setAttribute("normal",new fi(s,3)),this.setAttribute("uv",new fi(c,2))}function ru(e,t,r,n){Ji.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n},this.fromBufferGeometry(new nu(e,t,r,n)),this.mergeVertices()}function nu(e,t,r,n){Ti.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:r,detail:n},r=r||1;var i=[],a=[];function o(e,t,r,n){var i,a,o=Math.pow(2,n),c=[];for(i=0;i<=o;i++){c[i]=[];var l=e.clone().lerp(r,i/o),h=t.clone().lerp(r,i/o),u=o-i;for(a=0;a<=u;a++)c[i][a]=0===a&&i===o?l:l.clone().lerp(h,a/u)}for(i=0;i<o;i++)for(a=0;a<2*(o-i)-1;a++){var p=Math.floor(a/2);a%2==0?(s(c[i][p+1]),s(c[i+1][p]),s(c[i][p])):(s(c[i][p+1]),s(c[i+1][p+1]),s(c[i+1][p]))}}function s(e){i.push(e.x,e.y,e.z)}function c(t,r){var n=3*t;r.x=e[n+0],r.y=e[n+1],r.z=e[n+2]}function l(e,t,r,n){n<0&&1===e.x&&(a[t]=e.x-1),0===r.x&&0===r.z&&(a[t]=n/2/Math.PI+.5)}function h(e){return Math.atan2(e.z,-e.x)}!function(e){for(var r=new Dr,n=new Dr,i=new Dr,a=0;a<t.length;a+=3)c(t[a+0],r),c(t[a+1],n),c(t[a+2],i),o(r,n,i,e)}(n=n||0),function(e){for(var t=new Dr,r=0;r<i.length;r+=3)t.x=i[r+0],t.y=i[r+1],t.z=i[r+2],t.normalize().multiplyScalar(e),i[r+0]=t.x,i[r+1]=t.y,i[r+2]=t.z}(r),function(){for(var e=new Dr,t=0;t<i.length;t+=3){e.x=i[t+0],e.y=i[t+1],e.z=i[t+2];var r=h(e)/2/Math.PI+.5,n=(o=e,Math.atan2(-o.y,Math.sqrt(o.x*o.x+o.z*o.z))/Math.PI+.5);a.push(r,1-n)}var o;(function(){for(var e=new Dr,t=new Dr,r=new Dr,n=new Dr,o=new wr,s=new wr,c=new wr,u=0,p=0;u<i.length;u+=9,p+=6){e.set(i[u+0],i[u+1],i[u+2]),t.set(i[u+3],i[u+4],i[u+5]),r.set(i[u+6],i[u+7],i[u+8]),o.set(a[p+0],a[p+1]),s.set(a[p+2],a[p+3]),c.set(a[p+4],a[p+5]),n.copy(e).add(t).add(r).divideScalar(3);var d=h(n);l(o,p+0,e,d),l(s,p+2,t,d),l(c,p+4,r,d)}})(),function(){for(var e=0;e<a.length;e+=6){var t=a[e+0],r=a[e+2],n=a[e+4],i=Math.max(t,r,n),o=Math.min(t,r,n);i>.9&&o<.1&&(t<.2&&(a[e+0]+=1),r<.2&&(a[e+2]+=1),n<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new fi(i,3)),this.setAttribute("normal",new fi(i.slice(),3)),this.setAttribute("uv",new fi(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}function iu(e,t){Ji.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new au(e,t)),this.mergeVertices()}function au(e,t){nu.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function ou(e,t){Ji.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new su(e,t)),this.mergeVertices()}function su(e,t){nu.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function cu(e,t){Ji.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new lu(e,t)),this.mergeVertices()}function lu(e,t){var r=(1+Math.sqrt(5))/2,n=[-1,r,0,1,r,0,-1,-r,0,1,-r,0,0,-1,r,0,1,r,0,-1,-r,0,1,-r,r,0,-1,r,0,1,-r,0,-1,-r,0,1];nu.call(this,n,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function hu(e,t){Ji.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new uu(e,t)),this.mergeVertices()}function uu(e,t){var r=(1+Math.sqrt(5))/2,n=1/r,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-r,0,-n,r,0,n,-r,0,n,r,-n,-r,0,-n,r,0,n,-r,0,n,r,0,-r,0,-n,r,0,-n,-r,0,n,r,0,n];nu.call(this,i,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function pu(e,t,r,n,i,a){Ji.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:n,closed:i},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new du(e,t,r,n,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function du(e,t,r,n,i){Ti.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:r,radialSegments:n,closed:i},t=t||64,r=r||1,n=n||8,i=i||!1;var a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,c=new Dr,l=new Dr,h=new wr,u=new Dr,p=[],d=[],f=[],m=[];function v(i){u=e.getPointAt(i/t,u);var o=a.normals[i],h=a.binormals[i];for(s=0;s<=n;s++){var f=s/n*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);l.x=v*o.x+m*h.x,l.y=v*o.y+m*h.y,l.z=v*o.z+m*h.z,l.normalize(),d.push(l.x,l.y,l.z),c.x=u.x+r*l.x,c.y=u.y+r*l.y,c.z=u.z+r*l.z,p.push(c.x,c.y,c.z)}}!function(){for(o=0;o<t;o++)v(o);v(!1===i?t:0),function(){for(o=0;o<=t;o++)for(s=0;s<=n;s++)h.x=o/t,h.y=s/n,f.push(h.x,h.y)}(),function(){for(s=1;s<=t;s++)for(o=1;o<=n;o++){var e=(n+1)*(s-1)+(o-1),r=(n+1)*s+(o-1),i=(n+1)*s+o,a=(n+1)*(s-1)+o;m.push(e,r,a),m.push(r,i,a)}}()}(),this.setIndex(m),this.setAttribute("position",new fi(p,3)),this.setAttribute("normal",new fi(d,3)),this.setAttribute("uv",new fi(f,2))}function fu(e,t,r,n,i,a,o){Ji.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:n,p:i,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new mu(e,t,r,n,i,a)),this.mergeVertices()}function mu(e,t,r,n,i,a){Ti.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:r,radialSegments:n,p:i,q:a},e=e||1,t=t||.4,r=Math.floor(r)||64,n=Math.floor(n)||8,i=i||2,a=a||3;var o,s,c=[],l=[],h=[],u=[],p=new Dr,d=new Dr,f=new Dr,m=new Dr,v=new Dr,g=new Dr,y=new Dr;for(o=0;o<=r;++o){var x=o/r*i*Math.PI*2;for(A(x,i,a,e,f),A(x+.01,i,a,e,m),g.subVectors(m,f),y.addVectors(m,f),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=n;++s){var b=s/n*Math.PI*2,_=-t*Math.cos(b),w=t*Math.sin(b);p.x=f.x+(_*y.x+w*v.x),p.y=f.y+(_*y.y+w*v.y),p.z=f.z+(_*y.z+w*v.z),l.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),h.push(d.x,d.y,d.z),u.push(o/r),u.push(s/n)}}for(s=1;s<=r;s++)for(o=1;o<=n;o++){var M=(n+1)*(s-1)+(o-1),S=(n+1)*s+(o-1),T=(n+1)*s+o,E=(n+1)*(s-1)+o;c.push(M,S,E),c.push(S,T,E)}function A(e,t,r,n,i){var a=Math.cos(e),o=Math.sin(e),s=r/t*e,c=Math.cos(s);i.x=n*(2+c)*.5*a,i.y=n*(2+c)*o*.5,i.z=n*Math.sin(s)*.5}this.setIndex(c),this.setAttribute("position",new fi(l,3)),this.setAttribute("normal",new fi(h,3)),this.setAttribute("uv",new fi(u,2))}function vu(e,t,r,n,i){Ji.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:n,arc:i},this.fromBufferGeometry(new gu(e,t,r,n,i)),this.mergeVertices()}function gu(e,t,r,n,i){Ti.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:r,tubularSegments:n,arc:i},e=e||1,t=t||.4,r=Math.floor(r)||8,n=Math.floor(n)||6,i=i||2*Math.PI;var a,o,s=[],c=[],l=[],h=[],u=new Dr,p=new Dr,d=new Dr;for(a=0;a<=r;a++)for(o=0;o<=n;o++){var f=o/n*i,m=a/r*Math.PI*2;p.x=(e+t*Math.cos(m))*Math.cos(f),p.y=(e+t*Math.cos(m))*Math.sin(f),p.z=t*Math.sin(m),c.push(p.x,p.y,p.z),u.x=e*Math.cos(f),u.y=e*Math.sin(f),d.subVectors(p,u).normalize(),l.push(d.x,d.y,d.z),h.push(o/n),h.push(a/r)}for(a=1;a<=r;a++)for(o=1;o<=n;o++){var v=(n+1)*a+o-1,g=(n+1)*(a-1)+o-1,y=(n+1)*(a-1)+o,x=(n+1)*a+o;s.push(v,g,x),s.push(g,y,x)}this.setIndex(s),this.setAttribute("position",new fi(c,3)),this.setAttribute("normal",new fi(l,3)),this.setAttribute("uv",new fi(h,2))}Xh.prototype=Object.assign(Object.create(on.prototype),{constructor:Xh,isPoints:!0,raycast:function(e,t){var r=this.geometry,n=this.matrixWorld,i=e.params.Points.threshold;if(null===r.boundingSphere&&r.computeBoundingSphere(),Wh.copy(r.boundingSphere),Wh.applyMatrix4(n),Wh.radius+=i,!1!==e.ray.intersectsSphere(Wh)){kh.getInverse(n),jh.copy(e.ray).applyMatrix4(kh);var a=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a;if(r.isBufferGeometry){var s=r.index,c=r.attributes.position.array;if(null!==s)for(var l=s.array,h=0,u=l.length;h<u;h++){var p=l[h];qh.fromArray(c,3*p),Yh(qh,p,o,n,e,t,this)}else{h=0;for(var d=c.length/3;h<d;h++)qh.fromArray(c,3*h),Yh(qh,h,o,n,e,t,this)}}else{var f=r.vertices;for(h=0,d=f.length;h<d;h++)Yh(f[h],h,o,n,e,t,this)}}},updateMorphTargets:function(){var e,t,r,n=this.geometry;if(n.isBufferGeometry){var i=n.morphAttributes,a=Object.keys(i);if(a.length>0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)r=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=e}}else{var s=n.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Zh.prototype=Object.assign(Object.create(Er.prototype),{constructor:Zh,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Jh.prototype=Object.create(Er.prototype),Jh.prototype.constructor=Jh,Jh.prototype.isCompressedTexture=!0,Qh.prototype=Object.create(Er.prototype),Qh.prototype.constructor=Qh,Qh.prototype.isCanvasTexture=!0,Kh.prototype=Object.create(Er.prototype),Kh.prototype.constructor=Kh,Kh.prototype.isDepthTexture=!0,$h.prototype=Object.create(Ti.prototype),$h.prototype.constructor=$h,eu.prototype=Object.create(Ji.prototype),eu.prototype.constructor=eu,tu.prototype=Object.create(Ti.prototype),tu.prototype.constructor=tu,ru.prototype=Object.create(Ji.prototype),ru.prototype.constructor=ru,nu.prototype=Object.create(Ti.prototype),nu.prototype.constructor=nu,iu.prototype=Object.create(Ji.prototype),iu.prototype.constructor=iu,au.prototype=Object.create(nu.prototype),au.prototype.constructor=au,ou.prototype=Object.create(Ji.prototype),ou.prototype.constructor=ou,su.prototype=Object.create(nu.prototype),su.prototype.constructor=su,cu.prototype=Object.create(Ji.prototype),cu.prototype.constructor=cu,lu.prototype=Object.create(nu.prototype),lu.prototype.constructor=lu,hu.prototype=Object.create(Ji.prototype),hu.prototype.constructor=hu,uu.prototype=Object.create(nu.prototype),uu.prototype.constructor=uu,pu.prototype=Object.create(Ji.prototype),pu.prototype.constructor=pu,du.prototype=Object.create(Ti.prototype),du.prototype.constructor=du,du.prototype.toJSON=function(){var e=Ti.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},fu.prototype=Object.create(Ji.prototype),fu.prototype.constructor=fu,mu.prototype=Object.create(Ti.prototype),mu.prototype.constructor=mu,vu.prototype=Object.create(Ji.prototype),vu.prototype.constructor=vu,gu.prototype=Object.create(Ti.prototype),gu.prototype.constructor=gu;var yu={triangulate:function(e,t,r){r=r||2;var n,i,a,o,s,c,l,h=t&&t.length,u=h?t[0]*r:e.length,p=xu(e,0,u,r,!0),d=[];if(!p||p.next===p.prev)return d;if(h&&(p=Eu(e,t,p,r)),e.length>80*r){n=a=e[0],i=o=e[1];for(var f=r;f<u;f+=r)(s=e[f])<n&&(n=s),(c=e[f+1])<i&&(i=c),s>a&&(a=s),c>o&&(o=c);l=0!==(l=Math.max(a-n,o-i))?1/l:0}return _u(p,d,r,n,i,l),d}};function xu(e,t,r,n,i){var a,o;if(i===qu(e,t,r,n)>0)for(a=t;a<r;a+=n)o=ku(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=ku(a,e[a],e[a+1],o);return o&&Bu(o,o.next)&&(ju(o),o=o.next),o}function bu(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!Bu(n,n.next)&&0!==Fu(n.prev,n,n.next))n=n.next;else{if(ju(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function _u(e,t,r,n,i,a,o){if(e){!o&&a&&Cu(e,n,i,a);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,a?Mu(e,n,i,a):wu(e))t.push(s.i/r),t.push(e.i/r),t.push(c.i/r),ju(e),e=c.next,l=c.next;else if((e=c)===l){o?1===o?_u(e=Su(e,t,r),t,r,n,i,a,2):2===o&&Tu(e,t,r,n,i,a):_u(bu(e),t,r,n,i,a,1);break}}}function wu(e){var t=e.prev,r=e,n=e.next;if(Fu(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Iu(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Fu(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Mu(e,t,r,n){var i=e.prev,a=e,o=e.next;if(Fu(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,c=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,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=Ou(s,c,t,r,n),p=Ou(l,h,t,r,n),d=e.prevZ,f=e.nextZ;d&&d.z>=u&&f&&f.z<=p;){if(d!==e.prev&&d!==e.next&&Iu(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Fu(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&Iu(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Fu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&Iu(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Fu(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=p;){if(f!==e.prev&&f!==e.next&&Iu(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Fu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Su(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!Bu(i,a)&&zu(i,n,n.next,a)&&Gu(i,a)&&Gu(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),ju(n),ju(n.next),n=e=a),n=n.next}while(n!==e);return n}function Tu(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Nu(o,s)){var c=Vu(o,s);return o=bu(o,o.next),c=bu(c,c.next),_u(o,t,r,n,i,a),void _u(c,t,r,n,i,a)}s=s.next}o=o.next}while(o!==e)}function Eu(e,t,r,n){var i,a,o,s=[];for(i=0,a=t.length;i<a;i++)(o=xu(e,t[i]*n,i<a-1?t[i+1]*n:e.length,n,!1))===o.next&&(o.steiner=!0),s.push(Du(o));for(s.sort(Au),i=0;i<s.length;i++)Lu(s[i],r),r=bu(r,r.next);return r}function Au(e,t){return e.x-t.x}function Lu(e,t){if(t=Ru(e,t)){var r=Vu(t,e);bu(r,r.next)}}function Ru(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(i===o)return r.prev;var c,l=r,h=r.x,u=r.y,p=1/0;for(n=r.next;n!==l;)i>=n.x&&n.x>=h&&i!==n.x&&Iu(a<u?i:o,a,h,u,a<u?o:i,a,n.x,n.y)&&((c=Math.abs(a-n.y)/(i-n.x))<p||c===p&&n.x>r.x)&&Gu(n,e)&&(r=n,p=c),n=n.next;return r}function Cu(e,t,r,n){var i=e;do{null===i.z&&(i.z=Ou(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,Pu(i)}function Pu(e){var t,r,n,i,a,o,s,c,l=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<l&&(s++,n=n.nextZ);t++);for(c=l;s>0||c>0&&n;)0!==s&&(0===c||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1);return e}function Ou(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Du(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function Iu(e,t,r,n,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Nu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Uu(e,t)&&Gu(e,t)&&Gu(t,e)&&Hu(e,t)}function Fu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Bu(e,t){return e.x===t.x&&e.y===t.y}function zu(e,t,r,n){return!!(Bu(e,r)&&Bu(t,n)||Bu(e,n)&&Bu(r,t))||Fu(e,t,r)>0!=Fu(e,t,n)>0&&Fu(r,n,e)>0!=Fu(r,n,t)>0}function Uu(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&zu(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Gu(e,t){return Fu(e.prev,e,e.next)<0?Fu(e,t,e.next)>=0&&Fu(e,e.prev,t)>=0:Fu(e,t,e.prev)<0||Fu(e,e.next,t)<0}function Hu(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function Vu(e,t){var r=new Wu(e.i,e.x,e.y),n=new Wu(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function ku(e,t,r,n){var i=new Wu(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function ju(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 Wu(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function qu(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}var Xu={area:function(e){for(var t=e.length,r=0,n=t-1,i=0;i<t;n=i++)r+=e[n].x*e[i].y-e[i].x*e[n].y;return.5*r},isClockWise:function(e){return Xu.area(e)<0},triangulateShape:function(e,t){var r=[],n=[],i=[];Yu(e),Zu(r,e);var a=e.length;t.forEach(Yu);for(var o=0;o<t.length;o++)n.push(a),a+=t[o].length,Zu(r,t[o]);var s=yu.triangulate(r,n);for(o=0;o<s.length;o+=3)i.push(s.slice(o,o+3));return i}};function Yu(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Zu(e,t){for(var r=0;r<t.length;r++)e.push(t[r].x),e.push(t[r].y)}function Ju(e,t){Ji.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Qu(e,t)),this.mergeVertices()}function Qu(e,t){Ti.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];for(var r=this,n=[],i=[],a=0,o=e.length;a<o;a++){s(e[a])}function s(e){var a=[],o=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1,c=void 0!==t.depth?t.depth:100,l=void 0===t.bevelEnabled||t.bevelEnabled,h=void 0!==t.bevelThickness?t.bevelThickness:6,u=void 0!==t.bevelSize?t.bevelSize:h-2,p=void 0!==t.bevelOffset?t.bevelOffset:0,d=void 0!==t.bevelSegments?t.bevelSegments:3,f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Ku;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=t.amount);var v,g,y,x,b,_,w,M,S=!1;f&&(v=f.getSpacedPoints(s),S=!0,l=!1,g=f.computeFrenetFrames(s,!1),y=new Dr,x=new Dr,b=new Dr),l||(d=0,h=0,u=0,p=0);var T=e.extractPoints(o),E=T.shape,A=T.holes;if(!Xu.isClockWise(E))for(E=E.reverse(),w=0,M=A.length;w<M;w++)_=A[w],Xu.isClockWise(_)&&(A[w]=_.reverse());var L=Xu.triangulateShape(E,A),R=E;for(w=0,M=A.length;w<M;w++)_=A[w],E=E.concat(_);function C(e,t,r){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(r).add(e)}var P,O,D,I,N,F,B=E.length,z=L.length;function U(e,t,r){var n,i,a,o=e.x-t.x,s=e.y-t.y,c=r.x-e.x,l=r.y-e.y,h=o*o+s*s,u=o*l-s*c;if(Math.abs(u)>Number.EPSILON){var p=Math.sqrt(h),d=Math.sqrt(c*c+l*l),f=t.x-s/p,m=t.y+o/p,v=((r.x-l/d-f)*l-(r.y+c/d-m)*c)/(o*l-s*c),g=(n=f+o*v-e.x)*n+(i=m+s*v-e.y)*i;if(g<=2)return new wr(n,i);a=Math.sqrt(g/2)}else{var y=!1;o>Number.EPSILON?c>Number.EPSILON&&(y=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(l)&&(y=!0),y?(n=-s,i=o,a=Math.sqrt(h)):(n=o,i=s,a=Math.sqrt(h/2))}return new wr(n/a,i/a)}for(var G=[],H=0,V=R.length,k=V-1,j=H+1;H<V;H++,k++,j++)k===V&&(k=0),j===V&&(j=0),G[H]=U(R[H],R[k],R[j]);var W,q,X=[],Y=G.concat();for(w=0,M=A.length;w<M;w++){for(_=A[w],W=[],H=0,k=(V=_.length)-1,j=H+1;H<V;H++,k++,j++)k===V&&(k=0),j===V&&(j=0),W[H]=U(_[H],_[k],_[j]);X.push(W),Y=Y.concat(W)}for(P=0;P<d;P++){for(D=P/d,I=h*Math.cos(D*Math.PI/2),O=u*Math.sin(D*Math.PI/2)+p,H=0,V=R.length;H<V;H++)J((N=C(R[H],G[H],O)).x,N.y,-I);for(w=0,M=A.length;w<M;w++)for(_=A[w],W=X[w],H=0,V=_.length;H<V;H++)J((N=C(_[H],W[H],O)).x,N.y,-I)}for(O=u+p,H=0;H<B;H++)N=l?C(E[H],Y[H],O):E[H],S?(x.copy(g.normals[0]).multiplyScalar(N.x),y.copy(g.binormals[0]).multiplyScalar(N.y),b.copy(v[0]).add(x).add(y),J(b.x,b.y,b.z)):J(N.x,N.y,0);for(q=1;q<=s;q++)for(H=0;H<B;H++)N=l?C(E[H],Y[H],O):E[H],S?(x.copy(g.normals[q]).multiplyScalar(N.x),y.copy(g.binormals[q]).multiplyScalar(N.y),b.copy(v[q]).add(x).add(y),J(b.x,b.y,b.z)):J(N.x,N.y,c/s*q);for(P=d-1;P>=0;P--){for(D=P/d,I=h*Math.cos(D*Math.PI/2),O=u*Math.sin(D*Math.PI/2)+p,H=0,V=R.length;H<V;H++)J((N=C(R[H],G[H],O)).x,N.y,c+I);for(w=0,M=A.length;w<M;w++)for(_=A[w],W=X[w],H=0,V=_.length;H<V;H++)N=C(_[H],W[H],O),S?J(N.x,N.y+v[s-1].y,v[s-1].x+I):J(N.x,N.y,c+I)}function Z(e,t){var r,n;for(H=e.length;--H>=0;){r=H,(n=H-1)<0&&(n=e.length-1);var i=0,a=s+2*d;for(i=0;i<a;i++){var o=B*i,c=B*(i+1);K(t+r+o,t+n+o,t+n+c,t+r+c)}}}function J(e,t,r){a.push(e),a.push(t),a.push(r)}function Q(e,t,i){$(e),$(t),$(i);var a=n.length/3,o=m.generateTopUV(r,n,a-3,a-2,a-1);ee(o[0]),ee(o[1]),ee(o[2])}function K(e,t,i,a){$(e),$(t),$(a),$(t),$(i),$(a);var o=n.length/3,s=m.generateSideWallUV(r,n,o-6,o-3,o-2,o-1);ee(s[0]),ee(s[1]),ee(s[3]),ee(s[1]),ee(s[2]),ee(s[3])}function $(e){n.push(a[3*e+0]),n.push(a[3*e+1]),n.push(a[3*e+2])}function ee(e){i.push(e.x),i.push(e.y)}!function(){var e=n.length/3;if(l){var t=0,i=B*t;for(H=0;H<z;H++)Q((F=L[H])[2]+i,F[1]+i,F[0]+i);for(i=B*(t=s+2*d),H=0;H<z;H++)Q((F=L[H])[0]+i,F[1]+i,F[2]+i)}else{for(H=0;H<z;H++)Q((F=L[H])[2],F[1],F[0]);for(H=0;H<z;H++)Q((F=L[H])[0]+B*s,F[1]+B*s,F[2]+B*s)}r.addGroup(e,n.length/3-e,0)}(),function(){var e=n.length/3,t=0;for(Z(R,t),t+=R.length,w=0,M=A.length;w<M;w++)Z(_=A[w],t),t+=_.length;r.addGroup(e,n.length/3-e,1)}()}this.setAttribute("position",new fi(n,3)),this.setAttribute("uv",new fi(i,2)),this.computeVertexNormals()}exports.ShapeUtils=Xu,Ju.prototype=Object.create(Ji.prototype),Ju.prototype.constructor=Ju,Ju.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return $u(this.parameters.shapes,this.parameters.options,e)},Qu.prototype=Object.create(Ti.prototype),Qu.prototype.constructor=Qu,Qu.prototype.toJSON=function(){var e=Ti.prototype.toJSON.call(this);return $u(this.parameters.shapes,this.parameters.options,e)};var Ku={generateTopUV:function(e,t,r,n,i){var a=t[3*r],o=t[3*r+1],s=t[3*n],c=t[3*n+1],l=t[3*i],h=t[3*i+1];return[new wr(a,o),new wr(s,c),new wr(l,h)]},generateSideWallUV:function(e,t,r,n,i,a){var o=t[3*r],s=t[3*r+1],c=t[3*r+2],l=t[3*n],h=t[3*n+1],u=t[3*n+2],p=t[3*i],d=t[3*i+1],f=t[3*i+2],m=t[3*a],v=t[3*a+1],g=t[3*a+2];return Math.abs(s-h)<.01?[new wr(o,1-c),new wr(l,1-u),new wr(p,1-f),new wr(m,1-g)]:[new wr(s,1-c),new wr(h,1-u),new wr(d,1-f),new wr(v,1-g)]}};function $u(e,t,r){if(r.shapes=[],Array.isArray(e))for(var n=0,i=e.length;n<i;n++){var a=e[n];r.shapes.push(a.uuid)}else r.shapes.push(e.uuid);return void 0!==t.extrudePath&&(r.options.extrudePath=t.extrudePath.toJSON()),r}function ep(e,t){Ji.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new tp(e,t)),this.mergeVertices()}function tp(e,t){var r=(t=t||{}).font;if(!r||!r.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Ji;var n=r.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),Qu.call(this,n,t),this.type="TextBufferGeometry"}function rp(e,t,r,n,i,a,o){Ji.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:n,phiLength:i,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new np(e,t,r,n,i,a,o)),this.mergeVertices()}function np(e,t,r,n,i,a,o){Ti.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:r,phiStart:n,phiLength:i,thetaStart:a,thetaLength:o},e=e||1,t=Math.max(3,Math.floor(t)||8),r=Math.max(2,Math.floor(r)||6),n=void 0!==n?n:0,i=void 0!==i?i:2*Math.PI,a=void 0!==a?a:0,o=void 0!==o?o:Math.PI;var s,c,l=Math.min(a+o,Math.PI),h=0,u=[],p=new Dr,d=new Dr,f=[],m=[],v=[],g=[];for(c=0;c<=r;c++){var y=[],x=c/r,b=0;for(0==c&&0==a?b=.5/t:c==r&&l==Math.PI&&(b=-.5/t),s=0;s<=t;s++){var _=s/t;p.x=-e*Math.cos(n+_*i)*Math.sin(a+x*o),p.y=e*Math.cos(a+x*o),p.z=e*Math.sin(n+_*i)*Math.sin(a+x*o),m.push(p.x,p.y,p.z),d.copy(p).normalize(),v.push(d.x,d.y,d.z),g.push(_+b,1-x),y.push(h++)}u.push(y)}for(c=0;c<r;c++)for(s=0;s<t;s++){var w=u[c][s+1],M=u[c][s],S=u[c+1][s],T=u[c+1][s+1];(0!==c||a>0)&&f.push(w,M,T),(c!==r-1||l<Math.PI)&&f.push(M,S,T)}this.setIndex(f),this.setAttribute("position",new fi(m,3)),this.setAttribute("normal",new fi(v,3)),this.setAttribute("uv",new fi(g,2))}function ip(e,t,r,n,i,a){Ji.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:n,thetaStart:i,thetaLength:a},this.fromBufferGeometry(new ap(e,t,r,n,i,a)),this.mergeVertices()}function ap(e,t,r,n,i,a){Ti.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:r,phiSegments:n,thetaStart:i,thetaLength:a},e=e||.5,t=t||1,i=void 0!==i?i:0,a=void 0!==a?a:2*Math.PI,r=void 0!==r?Math.max(3,r):8;var o,s,c,l=[],h=[],u=[],p=[],d=e,f=(t-e)/(n=void 0!==n?Math.max(1,n):1),m=new Dr,v=new wr;for(s=0;s<=n;s++){for(c=0;c<=r;c++)o=i+c/r*a,m.x=d*Math.cos(o),m.y=d*Math.sin(o),h.push(m.x,m.y,m.z),u.push(0,0,1),v.x=(m.x/t+1)/2,v.y=(m.y/t+1)/2,p.push(v.x,v.y);d+=f}for(s=0;s<n;s++){var g=s*(r+1);for(c=0;c<r;c++){var y=o=c+g,x=o+r+1,b=o+r+2,_=o+1;l.push(y,x,_),l.push(x,b,_)}}this.setIndex(l),this.setAttribute("position",new fi(h,3)),this.setAttribute("normal",new fi(u,3)),this.setAttribute("uv",new fi(p,2))}function op(e,t,r,n){Ji.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:n},this.fromBufferGeometry(new sp(e,t,r,n)),this.mergeVertices()}function sp(e,t,r,n){Ti.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:r,phiLength:n},t=Math.floor(t)||12,r=r||0,n=n||2*Math.PI,n=_r.clamp(n,0,2*Math.PI);var i,a,o,s=[],c=[],l=[],h=1/t,u=new Dr,p=new wr;for(a=0;a<=t;a++){var d=r+a*h*n,f=Math.sin(d),m=Math.cos(d);for(o=0;o<=e.length-1;o++)u.x=e[o].x*f,u.y=e[o].y,u.z=e[o].x*m,c.push(u.x,u.y,u.z),p.x=a/t,p.y=o/(e.length-1),l.push(p.x,p.y)}for(a=0;a<t;a++)for(o=0;o<e.length-1;o++){var v=i=o+a*e.length,g=i+e.length,y=i+e.length+1,x=i+1;s.push(v,g,x),s.push(g,y,x)}if(this.setIndex(s),this.setAttribute("position",new fi(c,3)),this.setAttribute("uv",new fi(l,2)),this.computeVertexNormals(),n===2*Math.PI){var b=this.attributes.normal.array,_=new Dr,w=new Dr,M=new Dr;for(i=t*e.length*3,a=0,o=0;a<e.length;a++,o+=3)_.x=b[o+0],_.y=b[o+1],_.z=b[o+2],w.x=b[i+o+0],w.y=b[i+o+1],w.z=b[i+o+2],M.addVectors(_,w).normalize(),b[o+0]=b[i+o+0]=M.x,b[o+1]=b[i+o+1]=M.y,b[o+2]=b[i+o+2]=M.z}}function cp(e,t){Ji.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new lp(e,t)),this.mergeVertices()}function lp(e,t){Ti.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var r=[],n=[],i=[],a=[],o=0,s=0;if(!1===Array.isArray(e))l(e);else for(var c=0;c<e.length;c++)l(e[c]),this.addGroup(o,s,c),o+=s,s=0;function l(e){var o,c,l,h=n.length/3,u=e.extractPoints(t),p=u.shape,d=u.holes;for(!1===Xu.isClockWise(p)&&(p=p.reverse()),o=0,c=d.length;o<c;o++)l=d[o],!0===Xu.isClockWise(l)&&(d[o]=l.reverse());var f=Xu.triangulateShape(p,d);for(o=0,c=d.length;o<c;o++)l=d[o],p=p.concat(l);for(o=0,c=p.length;o<c;o++){var m=p[o];n.push(m.x,m.y,0),i.push(0,0,1),a.push(m.x,m.y)}for(o=0,c=f.length;o<c;o++){var v=f[o],g=v[0]+h,y=v[1]+h,x=v[2]+h;r.push(g,y,x),s+=3}}this.setIndex(r),this.setAttribute("position",new fi(n,3)),this.setAttribute("normal",new fi(i,3)),this.setAttribute("uv",new fi(a,2))}function hp(e,t){if(t.shapes=[],Array.isArray(e))for(var r=0,n=e.length;r<n;r++){var i=e[r];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function up(e,t){Ti.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var r,n,i,a,o=[],s=Math.cos(_r.DEG2RAD*t),c=[0,0],l={},h=["a","b","c"];e.isBufferGeometry?(a=new Ji).fromBufferGeometry(e):a=e.clone(),a.mergeVertices(),a.computeFaceNormals();for(var u=a.vertices,p=a.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)r=m[h[v]],n=m[h[(v+1)%3]],c[0]=Math.min(r,n),c[1]=Math.max(r,n),void 0===l[i=c[0]+","+c[1]]?l[i]={index1:c[0],index2:c[1],face1:d,face2:void 0}:l[i].face2=d;for(i in l){var g=l[i];if(void 0===g.face2||p[g.face1].normal.dot(p[g.face2].normal)<=s){var y=u[g.index1];o.push(y.x,y.y,y.z),y=u[g.index2],o.push(y.x,y.y,y.z)}}this.setAttribute("position",new fi(o,3))}function pp(e,t,r,n,i,a,o,s){Ji.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new dp(e,t,r,n,i,a,o,s)),this.mergeVertices()}function dp(e,t,r,n,i,a,o,s){Ti.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:r,radialSegments:n,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s};var c=this;e=void 0!==e?e:1,t=void 0!==t?t:1,r=r||1,n=Math.floor(n)||8,i=Math.floor(i)||1,a=void 0!==a&&a,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI;var l=[],h=[],u=[],p=[],d=0,f=[],m=r/2,v=0;function g(r){var i,a,f,g=new wr,y=new Dr,x=0,b=!0===r?e:t,_=!0===r?1:-1;for(a=d,i=1;i<=n;i++)h.push(0,m*_,0),u.push(0,_,0),p.push(.5,.5),d++;for(f=d,i=0;i<=n;i++){var w=i/n*s+o,M=Math.cos(w),S=Math.sin(w);y.x=b*S,y.y=m*_,y.z=b*M,h.push(y.x,y.y,y.z),u.push(0,_,0),g.x=.5*M+.5,g.y=.5*S*_+.5,p.push(g.x,g.y),d++}for(i=0;i<n;i++){var T=a+i,E=f+i;!0===r?l.push(E,E+1,T):l.push(E+1,E,T),x+=3}c.addGroup(v,x,!0===r?1:2),v+=x}!function(){var a,g,y=new Dr,x=new Dr,b=0,_=(t-e)/r;for(g=0;g<=i;g++){var w=[],M=g/i,S=M*(t-e)+e;for(a=0;a<=n;a++){var T=a/n,E=T*s+o,A=Math.sin(E),L=Math.cos(E);x.x=S*A,x.y=-M*r+m,x.z=S*L,h.push(x.x,x.y,x.z),y.set(A,_,L).normalize(),u.push(y.x,y.y,y.z),p.push(T,1-M),w.push(d++)}f.push(w)}for(a=0;a<n;a++)for(g=0;g<i;g++){var R=f[g][a],C=f[g+1][a],P=f[g+1][a+1],O=f[g][a+1];l.push(R,C,O),l.push(C,P,O),b+=6}c.addGroup(v,b,0),v+=b}(),!1===a&&(e>0&&g(!0),t>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new fi(h,3)),this.setAttribute("normal",new fi(u,3)),this.setAttribute("uv",new fi(p,2))}function fp(e,t,r,n,i,a,o){pp.call(this,0,e,t,r,n,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}function mp(e,t,r,n,i,a,o){dp.call(this,0,e,t,r,n,i,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:r,heightSegments:n,openEnded:i,thetaStart:a,thetaLength:o}}function vp(e,t,r,n){Ji.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:n},this.fromBufferGeometry(new gp(e,t,r,n)),this.mergeVertices()}function gp(e,t,r,n){Ti.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:r,thetaLength:n},e=e||1,t=void 0!==t?Math.max(3,t):8,r=void 0!==r?r:0,n=void 0!==n?n:2*Math.PI;var i,a,o=[],s=[],c=[],l=[],h=new Dr,u=new wr;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),a=0,i=3;a<=t;a++,i+=3){var p=r+a/t*n;h.x=e*Math.cos(p),h.y=e*Math.sin(p),s.push(h.x,h.y,h.z),c.push(0,0,1),u.x=(s[i]/e+1)/2,u.y=(s[i+1]/e+1)/2,l.push(u.x,u.y)}for(i=1;i<=t;i++)o.push(i,i+1,0);this.setIndex(o),this.setAttribute("position",new fi(s,3)),this.setAttribute("normal",new fi(c,3)),this.setAttribute("uv",new fi(l,2))}ep.prototype=Object.create(Ji.prototype),ep.prototype.constructor=ep,tp.prototype=Object.create(Qu.prototype),tp.prototype.constructor=tp,rp.prototype=Object.create(Ji.prototype),rp.prototype.constructor=rp,np.prototype=Object.create(Ti.prototype),np.prototype.constructor=np,ip.prototype=Object.create(Ji.prototype),ip.prototype.constructor=ip,ap.prototype=Object.create(Ti.prototype),ap.prototype.constructor=ap,op.prototype=Object.create(Ji.prototype),op.prototype.constructor=op,sp.prototype=Object.create(Ti.prototype),sp.prototype.constructor=sp,cp.prototype=Object.create(Ji.prototype),cp.prototype.constructor=cp,cp.prototype.toJSON=function(){var e=Ji.prototype.toJSON.call(this);return hp(this.parameters.shapes,e)},lp.prototype=Object.create(Ti.prototype),lp.prototype.constructor=lp,lp.prototype.toJSON=function(){var e=Ti.prototype.toJSON.call(this);return hp(this.parameters.shapes,e)},up.prototype=Object.create(Ti.prototype),up.prototype.constructor=up,pp.prototype=Object.create(Ji.prototype),pp.prototype.constructor=pp,dp.prototype=Object.create(Ti.prototype),dp.prototype.constructor=dp,fp.prototype=Object.create(pp.prototype),fp.prototype.constructor=fp,mp.prototype=Object.create(dp.prototype),mp.prototype.constructor=mp,vp.prototype=Object.create(Ji.prototype),vp.prototype.constructor=vp,gp.prototype=Object.create(Ti.prototype),gp.prototype.constructor=gp;var yp=Object.freeze({__proto__:null,WireframeGeometry:$h,ParametricGeometry:eu,ParametricBufferGeometry:tu,TetrahedronGeometry:iu,TetrahedronBufferGeometry:au,OctahedronGeometry:ou,OctahedronBufferGeometry:su,IcosahedronGeometry:cu,IcosahedronBufferGeometry:lu,DodecahedronGeometry:hu,DodecahedronBufferGeometry:uu,PolyhedronGeometry:ru,PolyhedronBufferGeometry:nu,TubeGeometry:pu,TubeBufferGeometry:du,TorusKnotGeometry:fu,TorusKnotBufferGeometry:mu,TorusGeometry:vu,TorusBufferGeometry:gu,TextGeometry:ep,TextBufferGeometry:tp,SphereGeometry:rp,SphereBufferGeometry:np,RingGeometry:ip,RingBufferGeometry:ap,PlaneGeometry:ya,PlaneBufferGeometry:xa,LatheGeometry:op,LatheBufferGeometry:sp,ShapeGeometry:cp,ShapeBufferGeometry:lp,ExtrudeGeometry:Ju,ExtrudeBufferGeometry:Qu,EdgesGeometry:up,ConeGeometry:fp,ConeBufferGeometry:mp,CylinderGeometry:pp,CylinderBufferGeometry:dp,CircleGeometry:vp,CircleBufferGeometry:gp,BoxGeometry:Qi,BoxBufferGeometry:Ki});function xp(e){ni.call(this),this.type="ShadowMaterial",this.color=new Qn(0),this.transparent=!0,this.setValues(e)}function bp(e){ia.call(this,e),this.type="RawShaderMaterial"}function _p(e){ni.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Qn(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 Qn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jt,this.normalScale=new wr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function wp(e){_p.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearcoat=0,this.clearcoatRoughness=0,this.sheen=null,this.clearcoatNormalScale=new wr(1,1),this.clearcoatNormalMap=null,this.transparency=0,this.setValues(e)}function Mp(e){ni.call(this),this.type="MeshPhongMaterial",this.color=new Qn(16777215),this.specular=new Qn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Qn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jt,this.normalScale=new wr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Q,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Sp(e){ni.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Qn(16777215),this.specular=new Qn(1118481),this.shininess=30,this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Qn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jt,this.normalScale=new wr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Tp(e){ni.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jt,this.normalScale=new wr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ep(e){ni.call(this),this.type="MeshLambertMaterial",this.color=new Qn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Qn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Q,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ap(e){ni.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Qn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=jt,this.normalScale=new wr(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Lp(e){Ph.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}xp.prototype=Object.create(ni.prototype),xp.prototype.constructor=xp,xp.prototype.isShadowMaterial=!0,xp.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this},bp.prototype=Object.create(ia.prototype),bp.prototype.constructor=bp,bp.prototype.isRawShaderMaterial=!0,_p.prototype=Object.create(ni.prototype),_p.prototype.constructor=_p,_p.prototype.isMeshStandardMaterial=!0,_p.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},wp.prototype=Object.create(_p.prototype),wp.prototype.constructor=wp,wp.prototype.isMeshPhysicalMaterial=!0,wp.prototype.copy=function(e){return _p.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearcoat=e.clearcoat,this.clearcoatRoughness=e.clearcoatRoughness,e.sheen?this.sheen=(this.sheen||new Qn).copy(e.sheen):this.sheen=null,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.transparency=e.transparency,this},Mp.prototype=Object.create(ni.prototype),Mp.prototype.constructor=Mp,Mp.prototype.isMeshPhongMaterial=!0,Mp.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Sp.prototype=Object.create(ni.prototype),Sp.prototype.constructor=Sp,Sp.prototype.isMeshToonMaterial=!0,Sp.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,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.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Tp.prototype=Object.create(ni.prototype),Tp.prototype.constructor=Tp,Tp.prototype.isMeshNormalMaterial=!0,Tp.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ep.prototype=Object.create(ni.prototype),Ep.prototype.constructor=Ep,Ep.prototype.isMeshLambertMaterial=!0,Ep.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ap.prototype=Object.create(ni.prototype),Ap.prototype.constructor=Ap,Ap.prototype.isMeshMatcapMaterial=!0,Ap.prototype.copy=function(e){return ni.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Lp.prototype=Object.create(Ph.prototype),Lp.prototype.constructor=Lp,Lp.prototype.isLineDashedMaterial=!0,Lp.prototype.copy=function(e){return Ph.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var Rp=Object.freeze({__proto__:null,ShadowMaterial:xp,SpriteMaterial:nh,RawShaderMaterial:bp,ShaderMaterial:ia,PointsMaterial:Vh,MeshPhysicalMaterial:wp,MeshStandardMaterial:_p,MeshPhongMaterial:Mp,MeshToonMaterial:Sp,MeshNormalMaterial:Tp,MeshLambertMaterial:Ep,MeshDepthMaterial:Bl,MeshDistanceMaterial:zl,MeshBasicMaterial:ii,MeshMatcapMaterial:Ap,LineDashedMaterial:Lp,LineBasicMaterial:Ph,Material:ni}),Cp={arraySlice:function(e,t,r){return Cp.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==r?r:e.length)):e.slice(t,r)},convertArray:function(e,t,r){return!e||!r&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,r=new Array(t),n=0;n!==t;++n)r[n]=n;return r.sort(function(t,r){return e[t]-e[r]}),r},sortedArray:function(e,t,r){for(var n=e.length,i=new e.constructor(n),a=0,o=0;o!==n;++a)for(var s=r[a]*t,c=0;c!==t;++c)i[o++]=e[s+c];return i},flattenJSON:function(e,t,r,n){for(var i=1,a=e[0];void 0!==a&&void 0===a[n];)a=e[i++];if(void 0!==a){var o=a[n];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[n])&&(t.push(a.time),r.push.apply(r,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[n])&&(t.push(a.time),o.toArray(r,r.length)),a=e[i++]}while(void 0!==a);else do{void 0!==(o=a[n])&&(t.push(a.time),r.push(o)),a=e[i++]}while(void 0!==a)}},subclip:function(e,t,r,n,i){i=i||30;var a=e.clone();a.name=t;for(var o=[],s=0;s<a.tracks.length;++s){for(var c=a.tracks[s],l=c.getValueSize(),h=[],u=[],p=0;p<c.times.length;++p){var d=c.times[p]*i;if(!(d<r||d>=n)){h.push(c.times[p]);for(var f=0;f<l;++f)u.push(c.values[p*l+f])}}0!==h.length&&(c.times=Cp.convertArray(h,c.times.constructor),c.values=Cp.convertArray(u,c.values.constructor),o.push(c))}a.tracks=o;var m=1/0;for(s=0;s<a.tracks.length;++s)m>a.tracks[s].times[0]&&(m=a.tracks[s].times[0]);for(s=0;s<a.tracks.length;++s)a.tracks[s].shift(-1*m);return a.resetDuration(),a}};function Pp(e,t,r,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(r),this.sampleValues=t,this.valueSize=r}function Op(e,t,r,n){Pp.call(this,e,t,r,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Dp(e,t,r,n){Pp.call(this,e,t,r,n)}function Ip(e,t,r,n){Pp.call(this,e,t,r,n)}function Np(e,t,r,n){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=Cp.convertArray(t,this.TimeBufferType),this.values=Cp.convertArray(r,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Fp(e,t,r){Np.call(this,e,t,r)}function Bp(e,t,r,n){Np.call(this,e,t,r,n)}function zp(e,t,r,n){Np.call(this,e,t,r,n)}function Up(e,t,r,n){Pp.call(this,e,t,r,n)}function Gp(e,t,r,n){Np.call(this,e,t,r,n)}function Hp(e,t,r,n){Np.call(this,e,t,r,n)}function Vp(e,t,r,n){Np.call(this,e,t,r,n)}function kp(e,t,r){this.name=e,this.tracks=r,this.duration=void 0!==t?t:-1,this.uuid=_r.generateUUID(),this.duration<0&&this.resetDuration()}function jp(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return zp;case"vector":case"vector2":case"vector3":case"vector4":return Vp;case"color":return Bp;case"quaternion":return Gp;case"bool":case"boolean":return Fp;case"string":return Hp}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function Wp(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=jp(e.type);if(void 0===e.times){var r=[],n=[];Cp.flattenJSON(e.keys,r,n,"value"),e.times=r,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}exports.AnimationUtils=Cp,Object.assign(Pp.prototype,{evaluate:function(e){var t=this.parameterPositions,r=this._cachedIndex,n=t[r],i=t[r-1];e:{t:{var a;r:{n:if(!(e<n)){for(var o=r+2;;){if(void 0===n){if(e<i)break n;return r=t.length,this._cachedIndex=r,this.afterEnd_(r-1,e,i)}if(r===o)break;if(i=n,e<(n=t[++r]))break t}a=t.length;break r}if(e>=i)break e;var s=t[1];e<s&&(r=2,i=s);for(o=r-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,n);if(r===o)break;if(n=i,e>=(i=t[--r-1]))break t}a=r,r=0}for(;r<a;){var c=r+a>>>1;e<t[c]?a=c:r=c+1}if(n=t[r],void 0===(i=t[r-1]))return this._cachedIndex=0,this.beforeStart_(0,e,n);if(void 0===n)return r=t.length,this._cachedIndex=r,this.afterEnd_(r-1,i,e)}this._cachedIndex=r,this.intervalChanged_(r,i,n)}return this.interpolate_(r,i,e,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,r=this.sampleValues,n=this.valueSize,i=e*n,a=0;a!==n;++a)t[a]=r[i+a];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Pp.prototype,{beforeStart_:Pp.prototype.copySampleValue_,afterEnd_:Pp.prototype.copySampleValue_}),Op.prototype=Object.assign(Object.create(Pp.prototype),{constructor:Op,DefaultSettings_:{endingStart:Lt,endingEnd:Lt},intervalChanged_:function(e,t,r){var n=this.parameterPositions,i=e-2,a=e+1,o=n[i],s=n[a];if(void 0===o)switch(this.getSettings_().endingStart){case Rt:i=e,o=2*t-r;break;case Ct:o=t+n[i=n.length-2]-n[i+1];break;default:i=e,o=r}if(void 0===s)switch(this.getSettings_().endingEnd){case Rt:a=e,s=2*r-t;break;case Ct:a=1,s=r+n[1]-n[0];break;default:a=e-1,s=t}var c=.5*(r-t),l=this.valueSize;this._weightPrev=c/(t-o),this._weightNext=c/(s-r),this._offsetPrev=i*l,this._offsetNext=a*l},interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,p=this._weightNext,d=(r-t)/(n-t),f=d*d,m=f*d,v=-u*m+2*u*f-u*d,g=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,x=p*m-p*f,b=0;b!==o;++b)i[b]=v*a[l+b]+g*a[c+b]+y*a[s+b]+x*a[h+b];return i}}),Dp.prototype=Object.assign(Object.create(Pp.prototype),{constructor:Dp,interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=(r-t)/(n-t),h=1-l,u=0;u!==o;++u)i[u]=a[c+u]*h+a[s+u]*l;return i}}),Ip.prototype=Object.assign(Object.create(Pp.prototype),{constructor:Ip,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(Np,{toJSON:function(e){var t,r=e.constructor;if(void 0!==r.toJSON)t=r.toJSON(e);else{t={name:e.name,times:Cp.convertArray(e.times,Array),values:Cp.convertArray(e.values,Array)};var n=e.getInterpolation();n!==e.DefaultInterpolation&&(t.interpolation=n)}return t.type=e.ValueTypeName,t}}),Object.assign(Np.prototype,{constructor:Np,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:Et,InterpolantFactoryMethodDiscrete:function(e){return new Ip(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new Dp(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Op(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case Tt:t=this.InterpolantFactoryMethodDiscrete;break;case Et:t=this.InterpolantFactoryMethodLinear;break;case At:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var r="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(r);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",r),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Tt;case this.InterpolantFactoryMethodLinear:return Et;case this.InterpolantFactoryMethodSmooth:return At}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,r=0,n=t.length;r!==n;++r)t[r]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,r=0,n=t.length;r!==n;++r)t[r]*=e;return this},trim:function(e,t){for(var r=this.times,n=r.length,i=0,a=n-1;i!==n&&r[i]<e;)++i;for(;-1!==a&&r[a]>t;)--a;if(++a,0!==i||a!==n){i>=a&&(i=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=Cp.arraySlice(r,i,a),this.values=Cp.arraySlice(this.values,i*o,a*o)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var r=this.times,n=this.values,i=r.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=r[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==n&&Cp.isTypedArray(n)){o=0;for(var c=n.length;o!==c;++o){var l=n[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}}return e},optimize:function(){for(var e=Cp.arraySlice(this.times),t=Cp.arraySlice(this.values),r=this.getValueSize(),n=this.getInterpolation()===At,i=1,a=e.length-1,o=1;o<a;++o){var s=!1,c=e[o];if(c!==e[o+1]&&(1!==o||c!==c[0]))if(n)s=!0;else for(var l=o*r,h=l-r,u=l+r,p=0;p!==r;++p){var d=t[l+p];if(d!==t[h+p]||d!==t[u+p]){s=!0;break}}if(s){if(o!==i){e[i]=e[o];var f=o*r,m=i*r;for(p=0;p!==r;++p)t[m+p]=t[f+p]}++i}}if(a>0){e[i]=e[a];for(f=a*r,m=i*r,p=0;p!==r;++p)t[m+p]=t[f+p];++i}return i!==e.length?(this.times=Cp.arraySlice(e,0,i),this.values=Cp.arraySlice(t,0,i*r)):(this.times=e,this.values=t),this},clone:function(){var e=Cp.arraySlice(this.times,0),t=Cp.arraySlice(this.values,0),r=new(0,this.constructor)(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}),Fp.prototype=Object.assign(Object.create(Np.prototype),{constructor:Fp,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:Tt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Bp.prototype=Object.assign(Object.create(Np.prototype),{constructor:Bp,ValueTypeName:"color"}),zp.prototype=Object.assign(Object.create(Np.prototype),{constructor:zp,ValueTypeName:"number"}),Up.prototype=Object.assign(Object.create(Pp.prototype),{constructor:Up,interpolate_:function(e,t,r,n){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=(r-t)/(n-t),l=s+o;s!==l;s+=4)Cr.slerpFlat(i,0,a,s-o,a,s,c);return i}}),Gp.prototype=Object.assign(Object.create(Np.prototype),{constructor:Gp,ValueTypeName:"quaternion",DefaultInterpolation:Et,InterpolantFactoryMethodLinear:function(e){return new Up(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Hp.prototype=Object.assign(Object.create(Np.prototype),{constructor:Hp,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:Tt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Vp.prototype=Object.assign(Object.create(Np.prototype),{constructor:Vp,ValueTypeName:"vector"}),Object.assign(kp,{parse:function(e){for(var t=[],r=e.tracks,n=1/(e.fps||1),i=0,a=r.length;i!==a;++i)t.push(Wp(r[i]).scale(n));return new kp(e.name,e.duration,t)},toJSON:function(e){for(var t=[],r=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},i=0,a=r.length;i!==a;++i)t.push(Np.toJSON(r[i]));return n},CreateFromMorphTargetSequence:function(e,t,r,n){for(var i=t.length,a=[],o=0;o<i;o++){var s=[],c=[];s.push((o+i-1)%i,o,(o+1)%i),c.push(0,1,0);var l=Cp.getKeyframeOrder(s);s=Cp.sortedArray(s,1,l),c=Cp.sortedArray(c,1,l),n||0!==s[0]||(s.push(i),c.push(c[0])),a.push(new zp(".morphTargetInfluences["+t[o].name+"]",s,c).scale(1/r))}return new kp(e,-1,a)},findByName:function(e,t){var r=e;if(!Array.isArray(e)){var n=e;r=n.geometry&&n.geometry.animations||n.animations}for(var i=0;i<r.length;i++)if(r[i].name===t)return r[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,r){for(var n={},i=/^([\w-]*?)([\d]+)$/,a=0,o=e.length;a<o;a++){var s=e[a],c=s.name.match(i);if(c&&c.length>1){var l=n[u=c[1]];l||(n[u]=l=[]),l.push(s)}}var h=[];for(var u in n)h.push(kp.CreateFromMorphTargetSequence(u,n[u],t,r));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var r=function(e,t,r,n,i){if(0!==r.length){var a=[],o=[];Cp.flattenJSON(r,a,o,n),0!==a.length&&i.push(new e(t,a,o))}},n=[],i=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],c=0;c<s.length;c++){var l=s[c].keys;if(l&&0!==l.length)if(l[0].morphTargets){for(var h={},u=0;u<l.length;u++)if(l[u].morphTargets)for(var p=0;p<l[u].morphTargets.length;p++)h[l[u].morphTargets[p]]=-1;for(var d in h){var f=[],m=[];for(p=0;p!==l[u].morphTargets.length;++p){var v=l[u];f.push(v.time),m.push(v.morphTarget===d?1:0)}n.push(new zp(".morphTargetInfluence["+d+"]",f,m))}a=h.length*(o||1)}else{var g=".bones["+t[c].name+"]";r(Vp,g+".position",l,"pos",n),r(Gp,g+".quaternion",l,"rot",n),r(Vp,g+".scale",l,"scl",n)}}return 0===n.length?null:new kp(i,a,n)}}),Object.assign(kp.prototype,{resetDuration:function(){for(var e=0,t=0,r=this.tracks.length;t!==r;++t){var n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new kp(this.name,this.duration,e)}});var qp={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Xp(e,t,r){var n=this,i=!1,a=0,o=0,s=void 0,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=r,this.itemStart=function(e){o++,!1===i&&void 0!==n.onStart&&n.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,void 0!==n.onProgress&&n.onProgress(e,a,o),a===o&&(i=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(e){void 0!==n.onError&&n.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){var t=c.indexOf(e);return-1!==t&&c.splice(t,2),this},this.getHandler=function(e){for(var t=0,r=c.length;t<r;t+=2){var n=c[t],i=c[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null}}exports.Cache=qp;var Yp=new Xp;function Zp(e){this.manager=void 0!==e?e:Yp,this.crossOrigin="anonymous",this.path="",this.resourcePath=""}exports.DefaultLoadingManager=Yp,Object.assign(Zp.prototype,{load:function(){},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this}});var Jp={};function Qp(e){Zp.call(this,e)}function Kp(e){Zp.call(this,e)}function $p(e){Zp.call(this,e)}function ed(e){Zp.call(this,e)}function td(e){Zp.call(this,e)}function rd(e){Zp.call(this,e)}function nd(e){Zp.call(this,e)}function id(){this.type="Curve",this.arcLengthDivisions=200}function ad(e,t,r,n,i,a,o,s){id.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=r||1,this.yRadius=n||1,this.aStartAngle=i||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function od(e,t,r,n,i,a){ad.call(this,e,t,r,r,n,i,a),this.type="ArcCurve"}function sd(){var e=0,t=0,r=0,n=0;function i(i,a,o,s){e=i,t=o,r=-3*i+3*a-2*o-s,n=2*i-2*a+o+s}return{initCatmullRom:function(e,t,r,n,a){i(t,r,a*(r-e),a*(n-t))},initNonuniformCatmullRom:function(e,t,r,n,a,o,s){var c=(t-e)/a-(r-e)/(a+o)+(r-t)/o,l=(r-t)/o-(n-t)/(o+s)+(n-r)/s;i(t,r,c*=o,l*=o)},calc:function(i){var a=i*i;return e+t*i+r*a+n*(a*i)}}}Qp.prototype=Object.assign(Object.create(Zp.prototype),{constructor:Qp,load:function(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=qp.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===Jp[e]){var o=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var s=o[1],c=!!o[2],l=o[3];l=decodeURIComponent(l),c&&(l=atob(l));try{var h,u=(this.responseType||"").toLowerCase();switch(u){case"arraybuffer":case"blob":for(var p=new Uint8Array(l.length),d=0;d<l.length;d++)p[d]=l.charCodeAt(d);h="blob"===u?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;h=f.parseFromString(l,s);break;case"json":h=JSON.parse(l);break;default:h=l}setTimeout(function(){t&&t(h),i.manager.itemEnd(e)},0)}catch(g){setTimeout(function(){n&&n(g),i.manager.itemError(e),i.manager.itemEnd(e)},0)}}else{Jp[e]=[],Jp[e].push({onLoad:t,onProgress:r,onError:n});var m=new XMLHttpRequest;for(var v in m.open("GET",e,!0),m.addEventListener("load",function(t){var r=this.response,n=Jp[e];if(delete Jp[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),qp.add(e,r);for(var a=0,o=n.length;a<o;a++){(s=n[a]).onLoad&&s.onLoad(r)}i.manager.itemEnd(e)}else{for(a=0,o=n.length;a<o;a++){var s;(s=n[a]).onError&&s.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}},!1),m.addEventListener("progress",function(t){for(var r=Jp[e],n=0,i=r.length;n<i;n++){var a=r[n];a.onProgress&&a.onProgress(t)}},!1),m.addEventListener("error",function(t){var r=Jp[e];delete Jp[e];for(var n=0,a=r.length;n<a;n++){var o=r[n];o.onError&&o.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)},!1),m.addEventListener("abort",function(t){var r=Jp[e];delete Jp[e];for(var n=0,a=r.length;n<a;n++){var o=r[n];o.onError&&o.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)},!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(v,this.requestHeader[v]);m.send(null)}return i.manager.itemStart(e),m}Jp[e].push({onLoad:t,onProgress:r,onError:n})},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Kp.prototype=Object.assign(Object.create(Zp.prototype),{constructor:Kp,load:function(e,t,r,n){var i=this,a=new Qp(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},r,n)},parse:function(e){for(var t=[],r=0;r<e.length;r++){var n=kp.parse(e[r]);t.push(n)}return t}}),$p.prototype=Object.assign(Object.create(Zp.prototype),{constructor:$p,load:function(e,t,r,n){var i=this,a=[],o=new Jh;o.image=a;var s=new Qp(this.manager);function c(c){s.load(e[c],function(e){var r=i.parse(e,!0);a[c]={width:r.width,height:r.height,format:r.format,mipmaps:r.mipmaps},6===(l+=1)&&(1===r.mipmapCount&&(o.minFilter=we),o.format=r.format,o.needsUpdate=!0,t&&t(o))},r,n)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var l=0,h=0,u=e.length;h<u;++h)c(h);else s.load(e,function(e){var r=i.parse(e,!0);if(r.isCubemap)for(var n=r.mipmaps.length/r.mipmapCount,s=0;s<n;s++){a[s]={mipmaps:[]};for(var c=0;c<r.mipmapCount;c++)a[s].mipmaps.push(r.mipmaps[s*r.mipmapCount+c]),a[s].format=r.format,a[s].width=r.width,a[s].height=r.height}else o.image.width=r.width,o.image.height=r.height,o.mipmaps=r.mipmaps;1===r.mipmapCount&&(o.minFilter=we),o.format=r.format,o.needsUpdate=!0,t&&t(o)},r,n);return o}}),ed.prototype=Object.assign(Object.create(Zp.prototype),{constructor:ed,load:function(e,t,r,n){var i=this,a=new ua,o=new Qp(this.manager);return o.setResponseType("arraybuffer"),o.setPath(this.path),o.load(e,function(e){var r=i.parse(e);r&&(void 0!==r.image?a.image=r.image:void 0!==r.data&&(a.image.width=r.width,a.image.height=r.height,a.image.data=r.data),a.wrapS=void 0!==r.wrapS?r.wrapS:me,a.wrapT=void 0!==r.wrapT?r.wrapT:me,a.magFilter=void 0!==r.magFilter?r.magFilter:we,a.minFilter=void 0!==r.minFilter?r.minFilter:we,a.anisotropy=void 0!==r.anisotropy?r.anisotropy:1,void 0!==r.format&&(a.format=r.format),void 0!==r.type&&(a.type=r.type),void 0!==r.mipmaps&&(a.mipmaps=r.mipmaps,a.minFilter=Te),1===r.mipmapCount&&(a.minFilter=we),a.needsUpdate=!0,t&&t(a,r))},r,n),a}}),td.prototype=Object.assign(Object.create(Zp.prototype),{constructor:td,load:function(e,t,r,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=qp.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),qp.add(e,this),t&&t(this),i.manager.itemEnd(e)}function c(t){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),n&&n(t),i.manager.itemError(e),i.manager.itemEnd(e)}return o.addEventListener("load",s,!1),o.addEventListener("error",c,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(e),o.src=e,o}}),rd.prototype=Object.assign(Object.create(Zp.prototype),{constructor:rd,load:function(e,t,r,n){var i=new $s,a=new td(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(r){a.load(e[r],function(e){i.images[r]=e,6===++o&&(i.needsUpdate=!0,t&&t(i))},void 0,n)}for(var c=0;c<e.length;++c)s(c);return i}}),nd.prototype=Object.assign(Object.create(Zp.prototype),{constructor:nd,load:function(e,t,r,n){var i=new Er,a=new td(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(r){i.image=r;var n=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=n?Ge:He,i.needsUpdate=!0,void 0!==t&&t(i)},r,n),i}}),Object.assign(id.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var r=this.getUtoTmapping(e);return this.getPoint(r,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],r=0;r<=e;r++)t.push(this.getPoint(r/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],r=0;r<=e;r++)t.push(this.getPointAt(r/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,r,n=[],i=this.getPoint(0),a=0;for(n.push(0),r=1;r<=e;r++)a+=(t=this.getPoint(r/e)).distanceTo(i),n.push(a),i=t;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var r,n=this.getLengths(),i=0,a=n.length;r=t||e*n[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=n[i=Math.floor(s+(c-s)/2)]-r)<0)s=i+1;else{if(!(o>0)){c=i;break}c=i-1}if(n[i=c]===r)return i/(a-1);var l=n[i];return(i+(r-l)/(n[i+1]-l))/(a-1)},getTangent:function(e){var t=e-1e-4,r=e+1e-4;t<0&&(t=0),r>1&&(r=1);var n=this.getPoint(t);return this.getPoint(r).clone().sub(n).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var r,n,i,a=new Dr,o=[],s=[],c=[],l=new Dr,h=new Hr;for(r=0;r<=e;r++)n=r/e,o[r]=this.getTangentAt(n),o[r].normalize();s[0]=new Dr,c[0]=new Dr;var u=Number.MAX_VALUE,p=Math.abs(o[0].x),d=Math.abs(o[0].y),f=Math.abs(o[0].z);for(p<=u&&(u=p,a.set(1,0,0)),d<=u&&(u=d,a.set(0,1,0)),f<=u&&a.set(0,0,1),l.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],l),c[0].crossVectors(o[0],s[0]),r=1;r<=e;r++)s[r]=s[r-1].clone(),c[r]=c[r-1].clone(),l.crossVectors(o[r-1],o[r]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(_r.clamp(o[r-1].dot(o[r]),-1,1)),s[r].applyMatrix4(h.makeRotationAxis(l,i))),c[r].crossVectors(o[r],s[r]);if(!0===t)for(i=Math.acos(_r.clamp(s[0].dot(s[e]),-1,1)),i/=e,o[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),r=1;r<=e;r++)s[r].applyMatrix4(h.makeRotationAxis(o[r],i*r)),c[r].crossVectors(o[r],s[r]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),ad.prototype=Object.create(id.prototype),ad.prototype.constructor=ad,ad.prototype.isEllipseCurve=!0,ad.prototype.getPoint=function(e,t){for(var r=t||new wr,n=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)<Number.EPSILON;i<0;)i+=n;for(;i>n;)i-=n;i<Number.EPSILON&&(i=a?0:n),!0!==this.aClockwise||a||(i===n?i=-n:i-=n);var o=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var l=Math.cos(this.aRotation),h=Math.sin(this.aRotation),u=s-this.aX,p=c-this.aY;s=u*l-p*h+this.aX,c=u*h+p*l+this.aY}return r.set(s,c)},ad.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},ad.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},ad.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},od.prototype=Object.create(ad.prototype),od.prototype.constructor=od,od.prototype.isArcCurve=!0;var cd=new Dr,ld=new sd,hd=new sd,ud=new sd;function pd(e,t,r,n){id.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=r||"centripetal",this.tension=n||.5}function dd(e,t,r,n,i){var a=.5*(n-t),o=.5*(i-r),s=e*e;return(2*r-2*n+a+o)*(e*s)+(-3*r+3*n-2*a-o)*s+a*e+r}function fd(e,t){var r=1-e;return r*r*t}function md(e,t){return 2*(1-e)*e*t}function vd(e,t){return e*e*t}function gd(e,t,r,n){return fd(e,t)+md(e,r)+vd(e,n)}function yd(e,t){var r=1-e;return r*r*r*t}function xd(e,t){var r=1-e;return 3*r*r*e*t}function bd(e,t){return 3*(1-e)*e*e*t}function _d(e,t){return e*e*e*t}function wd(e,t,r,n,i){return yd(e,t)+xd(e,r)+bd(e,n)+_d(e,i)}function Md(e,t,r,n){id.call(this),this.type="CubicBezierCurve",this.v0=e||new wr,this.v1=t||new wr,this.v2=r||new wr,this.v3=n||new wr}function Sd(e,t,r,n){id.call(this),this.type="CubicBezierCurve3",this.v0=e||new Dr,this.v1=t||new Dr,this.v2=r||new Dr,this.v3=n||new Dr}function Td(e,t){id.call(this),this.type="LineCurve",this.v1=e||new wr,this.v2=t||new wr}function Ed(e,t){id.call(this),this.type="LineCurve3",this.v1=e||new Dr,this.v2=t||new Dr}function Ad(e,t,r){id.call(this),this.type="QuadraticBezierCurve",this.v0=e||new wr,this.v1=t||new wr,this.v2=r||new wr}function Ld(e,t,r){id.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new Dr,this.v1=t||new Dr,this.v2=r||new Dr}function Rd(e){id.call(this),this.type="SplineCurve",this.points=e||[]}pd.prototype=Object.create(id.prototype),pd.prototype.constructor=pd,pd.prototype.isCatmullRomCurve3=!0,pd.prototype.getPoint=function(e,t){var r,n,i,a,o=t||new Dr,s=this.points,c=s.length,l=(c-(this.closed?0:1))*e,h=Math.floor(l),u=l-h;if(this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/c)+1)*c:0===u&&h===c-1&&(h=c-2,u=1),this.closed||h>0?r=s[(h-1)%c]:(cd.subVectors(s[0],s[1]).add(s[0]),r=cd),n=s[h%c],i=s[(h+1)%c],this.closed||h+2<c?a=s[(h+2)%c]:(cd.subVectors(s[c-1],s[c-2]).add(s[c-1]),a=cd),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(r.distanceToSquared(n),p),f=Math.pow(n.distanceToSquared(i),p),m=Math.pow(i.distanceToSquared(a),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),ld.initNonuniformCatmullRom(r.x,n.x,i.x,a.x,d,f,m),hd.initNonuniformCatmullRom(r.y,n.y,i.y,a.y,d,f,m),ud.initNonuniformCatmullRom(r.z,n.z,i.z,a.z,d,f,m)}else"catmullrom"===this.curveType&&(ld.initCatmullRom(r.x,n.x,i.x,a.x,this.tension),hd.initCatmullRom(r.y,n.y,i.y,a.y,this.tension),ud.initCatmullRom(r.z,n.z,i.z,a.z,this.tension));return o.set(ld.calc(u),hd.calc(u),ud.calc(u)),o},pd.prototype.copy=function(e){id.prototype.copy.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},pd.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);e.points=[];for(var t=0,r=this.points.length;t<r;t++){var n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},pd.prototype.fromJSON=function(e){id.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push((new Dr).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Md.prototype=Object.create(id.prototype),Md.prototype.constructor=Md,Md.prototype.isCubicBezierCurve=!0,Md.prototype.getPoint=function(e,t){var r=t||new wr,n=this.v0,i=this.v1,a=this.v2,o=this.v3;return r.set(wd(e,n.x,i.x,a.x,o.x),wd(e,n.y,i.y,a.y,o.y)),r},Md.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Md.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Md.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Sd.prototype=Object.create(id.prototype),Sd.prototype.constructor=Sd,Sd.prototype.isCubicBezierCurve3=!0,Sd.prototype.getPoint=function(e,t){var r=t||new Dr,n=this.v0,i=this.v1,a=this.v2,o=this.v3;return r.set(wd(e,n.x,i.x,a.x,o.x),wd(e,n.y,i.y,a.y,o.y),wd(e,n.z,i.z,a.z,o.z)),r},Sd.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Sd.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Sd.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Td.prototype=Object.create(id.prototype),Td.prototype.constructor=Td,Td.prototype.isLineCurve=!0,Td.prototype.getPoint=function(e,t){var r=t||new wr;return 1===e?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r},Td.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Td.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Td.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Td.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Td.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ed.prototype=Object.create(id.prototype),Ed.prototype.constructor=Ed,Ed.prototype.isLineCurve3=!0,Ed.prototype.getPoint=function(e,t){var r=t||new Dr;return 1===e?r.copy(this.v2):(r.copy(this.v2).sub(this.v1),r.multiplyScalar(e).add(this.v1)),r},Ed.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Ed.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ed.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ed.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ad.prototype=Object.create(id.prototype),Ad.prototype.constructor=Ad,Ad.prototype.isQuadraticBezierCurve=!0,Ad.prototype.getPoint=function(e,t){var r=t||new wr,n=this.v0,i=this.v1,a=this.v2;return r.set(gd(e,n.x,i.x,a.x),gd(e,n.y,i.y,a.y)),r},Ad.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ad.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ad.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ld.prototype=Object.create(id.prototype),Ld.prototype.constructor=Ld,Ld.prototype.isQuadraticBezierCurve3=!0,Ld.prototype.getPoint=function(e,t){var r=t||new Dr,n=this.v0,i=this.v1,a=this.v2;return r.set(gd(e,n.x,i.x,a.x),gd(e,n.y,i.y,a.y),gd(e,n.z,i.z,a.z)),r},Ld.prototype.copy=function(e){return id.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Ld.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Ld.prototype.fromJSON=function(e){return id.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Rd.prototype=Object.create(id.prototype),Rd.prototype.constructor=Rd,Rd.prototype.isSplineCurve=!0,Rd.prototype.getPoint=function(e,t){var r=t||new wr,n=this.points,i=(n.length-1)*e,a=Math.floor(i),o=i-a,s=n[0===a?a:a-1],c=n[a],l=n[a>n.length-2?n.length-1:a+1],h=n[a>n.length-3?n.length-1:a+2];return r.set(dd(o,s.x,c.x,l.x,h.x),dd(o,s.y,c.y,l.y,h.y)),r},Rd.prototype.copy=function(e){id.prototype.copy.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push(n.clone())}return this},Rd.prototype.toJSON=function(){var e=id.prototype.toJSON.call(this);e.points=[];for(var t=0,r=this.points.length;t<r;t++){var n=this.points[t];e.points.push(n.toArray())}return e},Rd.prototype.fromJSON=function(e){id.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,r=e.points.length;t<r;t++){var n=e.points[t];this.points.push((new wr).fromArray(n))}return this};var Cd=Object.freeze({__proto__:null,ArcCurve:od,CatmullRomCurve3:pd,CubicBezierCurve:Md,CubicBezierCurve3:Sd,EllipseCurve:ad,LineCurve:Td,LineCurve3:Ed,QuadraticBezierCurve:Ad,QuadraticBezierCurve3:Ld,SplineCurve:Rd});function Pd(){id.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Od(e){Pd.call(this),this.type="Path",this.currentPoint=new wr,e&&this.setFromPoints(e)}function Dd(e){Od.call(this,e),this.uuid=_r.generateUUID(),this.type="Shape",this.holes=[]}function Id(e,t){on.call(this),this.type="Light",this.color=new Qn(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function Nd(e,t,r){Id.call(this,e,r),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(on.DefaultUp),this.updateMatrix(),this.groundColor=new Qn(t)}function Fd(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new wr(512,512),this.map=null,this.mapPass=null,this.matrix=new Hr,this._frustum=new fa,this._frameExtents=new wr(1,1),this._viewportCount=1,this._viewports=[new Ar(0,0,1,1)]}function Bd(){Fd.call(this,new oa(50,1,.5,500))}function zd(e,t,r,n,i,a){Id.call(this,e,t),this.type="SpotLight",this.position.copy(on.DefaultUp),this.updateMatrix(),this.target=new on,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==r?r:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==a?a:1,this.shadow=new Bd}function Ud(){Fd.call(this,new oa(90,1,.5,500)),this._frameExtents=new wr(4,2),this._viewportCount=6,this._viewports=[new Ar(2,1,1,1),new Ar(0,1,1,1),new Ar(3,1,1,1),new Ar(1,1,1,1),new Ar(3,0,1,1),new Ar(1,0,1,1)],this._cubeDirections=[new Dr(1,0,0),new Dr(-1,0,0),new Dr(0,0,1),new Dr(0,0,-1),new Dr(0,1,0),new Dr(0,-1,0)],this._cubeUps=[new Dr(0,1,0),new Dr(0,1,0),new Dr(0,1,0),new Dr(0,1,0),new Dr(0,0,1),new Dr(0,0,-1)]}function Gd(e,t,r,n){Id.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==r?r:0,this.decay=void 0!==n?n:1,this.shadow=new Ud}function Hd(e,t,r,n,i,a){aa.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=void 0!==e?e:-1,this.right=void 0!==t?t:1,this.top=void 0!==r?r:1,this.bottom=void 0!==n?n:-1,this.near=void 0!==i?i:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function Vd(){Fd.call(this,new Hd(-5,5,5,-5,.5,500))}function kd(e,t){Id.call(this,e,t),this.type="DirectionalLight",this.position.copy(on.DefaultUp),this.updateMatrix(),this.target=new on,this.shadow=new Vd}function jd(e,t){Id.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function Wd(e,t,r,n){Id.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==r?r:10,this.height=void 0!==n?n:10}function qd(e){Zp.call(this,e),this.textures={}}Pd.prototype=Object.assign(Object.create(id.prototype),{constructor:Pd,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Td(t,e))},getPoint:function(e){for(var t=e*this.getLength(),r=this.getCurveLengths(),n=0;n<r.length;){if(r[n]>=t){var i=r[n]-t,a=this.curves[n],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}n++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,r=0,n=this.curves.length;r<n;r++)t+=this.curves[r].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],r=0;r<=e;r++)t.push(this.getPoint(r/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,r=[],n=0,i=this.curves;n<i.length;n++)for(var a=i[n],o=a&&a.isEllipseCurve?2*e:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o),c=0;c<s.length;c++){var l=s[c];t&&t.equals(l)||(r.push(l),t=l)}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r},copy:function(e){id.prototype.copy.call(this,e),this.curves=[];for(var t=0,r=e.curves.length;t<r;t++){var n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=id.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,r=this.curves.length;t<r;t++){var n=this.curves[t];e.curves.push(n.toJSON())}return e},fromJSON:function(e){id.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,r=e.curves.length;t<r;t++){var n=e.curves[t];this.curves.push((new Cd[n.type]).fromJSON(n))}return this}}),Od.prototype=Object.assign(Object.create(Pd.prototype),{constructor:Od,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,r=e.length;t<r;t++)this.lineTo(e[t].x,e[t].y);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var r=new Td(this.currentPoint.clone(),new wr(e,t));return this.curves.push(r),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,r,n){var i=new Ad(this.currentPoint.clone(),new wr(e,t),new wr(r,n));return this.curves.push(i),this.currentPoint.set(r,n),this},bezierCurveTo:function(e,t,r,n,i,a){var o=new Md(this.currentPoint.clone(),new wr(e,t),new wr(r,n),new wr(i,a));return this.curves.push(o),this.currentPoint.set(i,a),this},splineThru:function(e){var t=new Rd([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,r,n,i,a){var o=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+o,t+s,r,n,i,a),this},absarc:function(e,t,r,n,i,a){return this.absellipse(e,t,r,r,n,i,a),this},ellipse:function(e,t,r,n,i,a,o,s){var c=this.currentPoint.x,l=this.currentPoint.y;return this.absellipse(e+c,t+l,r,n,i,a,o,s),this},absellipse:function(e,t,r,n,i,a,o,s){var c=new ad(e,t,r,n,i,a,o,s);if(this.curves.length>0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var h=c.getPoint(1);return this.currentPoint.copy(h),this},copy:function(e){return Pd.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Pd.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Pd.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Dd.prototype=Object.assign(Object.create(Od.prototype),{constructor:Dd,getPointsHoles:function(e){for(var t=[],r=0,n=this.holes.length;r<n;r++)t[r]=this.holes[r].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){Od.prototype.copy.call(this,e),this.holes=[];for(var t=0,r=e.holes.length;t<r;t++){var n=e.holes[t];this.holes.push(n.clone())}return this},toJSON:function(){var e=Od.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,r=this.holes.length;t<r;t++){var n=this.holes[t];e.holes.push(n.toJSON())}return e},fromJSON:function(e){Od.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,r=e.holes.length;t<r;t++){var n=e.holes[t];this.holes.push((new Od).fromJSON(n))}return this}}),Id.prototype=Object.assign(Object.create(on.prototype),{constructor:Id,isLight:!0,copy:function(e){return on.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=on.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),Nd.prototype=Object.assign(Object.create(Id.prototype),{constructor:Nd,isHemisphereLight:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(Fd.prototype,{_projScreenMatrix:new Hr,_lightPositionWorld:new Dr,_lookTarget:new Dr,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,r=this.matrix,n=this._projScreenMatrix,i=this._lookTarget,a=this._lightPositionWorld;a.setFromMatrixPosition(e.matrixWorld),t.position.copy(a),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),n.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(n),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(t.projectionMatrix),r.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),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}}),Bd.prototype=Object.assign(Object.create(Fd.prototype),{constructor:Bd,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,r=2*_r.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;r===t.fov&&n===t.aspect&&i===t.far||(t.fov=r,t.aspect=n,t.far=i,t.updateProjectionMatrix()),Fd.prototype.updateMatrices.call(this,e)}}),zd.prototype=Object.assign(Object.create(Id.prototype),{constructor:zd,isSpotLight:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Ud.prototype=Object.assign(Object.create(Fd.prototype),{constructor:Ud,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var r=this.camera,n=this.matrix,i=this._lightPositionWorld,a=this._lookTarget,o=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),r.position.copy(i),a.copy(r.position),a.add(this._cubeDirections[t]),r.up.copy(this._cubeUps[t]),r.lookAt(a),r.updateMatrixWorld(),n.makeTranslation(-i.x,-i.y,-i.z),o.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(o)}}),Gd.prototype=Object.assign(Object.create(Id.prototype),{constructor:Gd,isPointLight:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),Hd.prototype=Object.assign(Object.create(aa.prototype),{constructor:Hd,isOrthographicCamera:!0,copy:function(e,t){return aa.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,r,n,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=r,this.view.offsetY=n,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,n=(this.top+this.bottom)/2,i=r-e,a=r+e,o=n+t,s=n-t;if(null!==this.view&&this.view.enabled){var c=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a=(i+=c*this.view.offsetX)+c*this.view.width,s=(o-=l*this.view.offsetY)-l*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=on.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Vd.prototype=Object.assign(Object.create(Fd.prototype),{constructor:Vd,isDirectionalLightShadow:!0,updateMatrices:function(e){Fd.prototype.updateMatrices.call(this,e)}}),kd.prototype=Object.assign(Object.create(Id.prototype),{constructor:kd,isDirectionalLight:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),jd.prototype=Object.assign(Object.create(Id.prototype),{constructor:jd,isAmbientLight:!0}),Wd.prototype=Object.assign(Object.create(Id.prototype),{constructor:Wd,isRectAreaLight:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Id.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),qd.prototype=Object.assign(Object.create(Zp.prototype),{constructor:qd,load:function(e,t,r,n){var i=this,a=new Qp(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},r,n)},parse:function(e){var t=this.textures;function r(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var n=new Rp[e.type];if(void 0!==e.uuid&&(n.uuid=e.uuid),void 0!==e.name&&(n.name=e.name),void 0!==e.color&&n.color.setHex(e.color),void 0!==e.roughness&&(n.roughness=e.roughness),void 0!==e.metalness&&(n.metalness=e.metalness),void 0!==e.sheen&&(n.sheen=(new Qn).setHex(e.sheen)),void 0!==e.emissive&&n.emissive.setHex(e.emissive),void 0!==e.specular&&n.specular.setHex(e.specular),void 0!==e.shininess&&(n.shininess=e.shininess),void 0!==e.clearcoat&&(n.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(n.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.vertexColors&&(n.vertexColors=e.vertexColors),void 0!==e.fog&&(n.fog=e.fog),void 0!==e.flatShading&&(n.flatShading=e.flatShading),void 0!==e.blending&&(n.blending=e.blending),void 0!==e.combine&&(n.combine=e.combine),void 0!==e.side&&(n.side=e.side),void 0!==e.opacity&&(n.opacity=e.opacity),void 0!==e.transparent&&(n.transparent=e.transparent),void 0!==e.alphaTest&&(n.alphaTest=e.alphaTest),void 0!==e.depthTest&&(n.depthTest=e.depthTest),void 0!==e.depthWrite&&(n.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(n.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(n.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(n.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(n.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(n.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(n.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(n.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(n.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(n.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(n.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(n.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(n.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(n.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(n.rotation=e.rotation),1!==e.linewidth&&(n.linewidth=e.linewidth),void 0!==e.dashSize&&(n.dashSize=e.dashSize),void 0!==e.gapSize&&(n.gapSize=e.gapSize),void 0!==e.scale&&(n.scale=e.scale),void 0!==e.polygonOffset&&(n.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(n.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(n.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(n.skinning=e.skinning),void 0!==e.morphTargets&&(n.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(n.morphNormals=e.morphNormals),void 0!==e.dithering&&(n.dithering=e.dithering),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.toneMapped&&(n.toneMapped=e.toneMapped),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.uniforms)for(var i in e.uniforms){var a=e.uniforms[i];switch(n.uniforms[i]={},a.type){case"t":n.uniforms[i].value=r(a.value);break;case"c":n.uniforms[i].value=(new Qn).setHex(a.value);break;case"v2":n.uniforms[i].value=(new wr).fromArray(a.value);break;case"v3":n.uniforms[i].value=(new Dr).fromArray(a.value);break;case"v4":n.uniforms[i].value=(new Ar).fromArray(a.value);break;case"m3":n.uniforms[i].value=(new Mr).fromArray(a.value);case"m4":n.uniforms[i].value=(new Hr).fromArray(a.value);break;default:n.uniforms[i].value=a.value}}if(void 0!==e.defines&&(n.defines=e.defines),void 0!==e.vertexShader&&(n.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(n.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var o in e.extensions)n.extensions[o]=e.extensions[o];if(void 0!==e.shading&&(n.flatShading=1===e.shading),void 0!==e.size&&(n.size=e.size),void 0!==e.sizeAttenuation&&(n.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(n.map=r(e.map)),void 0!==e.matcap&&(n.matcap=r(e.matcap)),void 0!==e.alphaMap&&(n.alphaMap=r(e.alphaMap),n.transparent=!0),void 0!==e.bumpMap&&(n.bumpMap=r(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=r(e.normalMap)),void 0!==e.normalMapType&&(n.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),n.normalScale=(new wr).fromArray(s)}return void 0!==e.displacementMap&&(n.displacementMap=r(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=r(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=r(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=r(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=r(e.specularMap)),void 0!==e.envMap&&(n.envMap=r(e.envMap)),void 0!==e.envMapIntensity&&(n.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(n.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(n.lightMap=r(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=r(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=r(e.gradientMap)),void 0!==e.clearcoatNormalMap&&(n.clearcoatNormalMap=r(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(n.clearcoatNormalScale=(new wr).fromArray(e.clearcoatNormalScale)),n},setTextures:function(e){return this.textures=e,this}});var Xd={decodeText:function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r<n;r++)t+=String.fromCharCode(e[r]);try{return decodeURIComponent(escape(t))}catch(i){return t}},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};function Yd(){Ti.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Zd(e,t,r,n){"number"==typeof r&&(n=r,r=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),oi.call(this,e,t,r),this.meshPerAttribute=n||1}function Jd(e){Zp.call(this,e)}exports.LoaderUtils=Xd,Yd.prototype=Object.assign(Object.create(Ti.prototype),{constructor:Yd,isInstancedBufferGeometry:!0,copy:function(e){return Ti.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=Ti.prototype.toJSON.call(this);return e.maxInstancedCount=this.maxInstancedCount,e.isInstancedBufferGeometry=!0,e}}),Zd.prototype=Object.assign(Object.create(oi.prototype),{constructor:Zd,isInstancedBufferAttribute:!0,copy:function(e){return oi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=oi.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Jd.prototype=Object.assign(Object.create(Zp.prototype),{constructor:Jd,load:function(e,t,r,n){var i=this,a=new Qp(i.manager);a.setPath(i.path),a.load(e,function(e){t(i.parse(JSON.parse(e)))},r,n)},parse:function(e){var t=e.isInstancedBufferGeometry?new Yd:new Ti,r=e.data.index;if(void 0!==r){var n=new Qd[r.type](r.array);t.setIndex(new oi(n,1))}var i=e.data.attributes;for(var a in i){var o=i[a],s=(n=new Qd[o.type](o.array),new(o.isInstancedBufferAttribute?Zd:oi)(n,o.itemSize,o.normalized));void 0!==o.name&&(s.name=o.name),t.setAttribute(a,s)}var c=e.data.morphAttributes;if(c)for(var a in c){for(var l=c[a],h=[],u=0,p=l.length;u<p;u++){o=l[u],s=new oi(n=new Qd[o.type](o.array),o.itemSize,o.normalized);void 0!==o.name&&(s.name=o.name),h.push(s)}t.morphAttributes[a]=h}e.data.morphTargetsRelative&&(t.morphTargetsRelative=!0);var d=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==d){u=0;for(var f=d.length;u!==f;++u){var m=d[u];t.addGroup(m.start,m.count,m.materialIndex)}}var v=e.data.boundingSphere;if(void 0!==v){var g=new Dr;void 0!==v.center&&g.fromArray(v.center),t.boundingSphere=new Sn(g,v.radius)}return e.name&&(t.name=e.name),e.userData&&(t.userData=e.userData),t}});var Qd={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Kd(e){Zp.call(this,e)}Kd.prototype=Object.assign(Object.create(Zp.prototype),{constructor:Kd,load:function(e,t,r,n){var i=this,a=""===this.path?Xd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;var o=new Qp(i.manager);o.setPath(this.path),o.load(e,function(r){var a=null;try{a=JSON.parse(r)}catch(s){return void 0!==n&&n(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.message)}var o=a.metadata;void 0!==o&&void 0!==o.type&&"geometry"!==o.type.toLowerCase()?i.parse(a,t):console.error("THREE.ObjectLoader: Can't load "+e)},r,n)},parse:function(e,t){var r=this.parseShape(e.shapes),n=this.parseGeometries(e.geometries,r),i=this.parseImages(e.images,function(){void 0!==t&&t(s)}),a=this.parseTextures(e.textures,i),o=this.parseMaterials(e.materials,a),s=this.parseObject(e.object,n,o);return e.animations&&(s.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(s),s},parseShape:function(e){var t={};if(void 0!==e)for(var r=0,n=e.length;r<n;r++){var i=(new Dd).fromJSON(e[r]);t[i.uuid]=i}return t},parseGeometries:function(e,t){var r={};if(void 0!==e)for(var n=new Jd,i=0,a=e.length;i<a;i++){var o,s=e[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":o=new yp[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":o=new yp[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":o=new yp[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":o=new yp[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":o=new yp[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":o=new yp[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":o=new yp[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":o=new yp[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":o=new yp[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":o=new yp[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"TubeGeometry":case"TubeBufferGeometry":o=new yp[s.type]((new Cd[s.path.type]).fromJSON(s.path),s.tubularSegments,s.radius,s.radialSegments,s.closed);break;case"LatheGeometry":case"LatheBufferGeometry":o=new yp[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":o=new yp[s.type](s.vertices,s.indices,s.radius,s.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var c=[],l=0,h=s.shapes.length;l<h;l++){var u=t[s.shapes[l]];c.push(u)}o=new yp[s.type](c,s.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(c=[],l=0,h=s.shapes.length;l<h;l++){u=t[s.shapes[l]];c.push(u)}var p=s.options.extrudePath;void 0!==p&&(s.options.extrudePath=(new Cd[p.type]).fromJSON(p)),o=new yp[s.type](c,s.options);break;case"BufferGeometry":case"InstancedBufferGeometry":o=n.parse(s);break;case"Geometry":if("THREE"in window&&"LegacyJSONLoader"in THREE)o=(new THREE.LegacyJSONLoader).parse(s,this.resourcePath).geometry;else console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),!0===o.isBufferGeometry&&void 0!==s.userData&&(o.userData=s.userData),r[s.uuid]=o}return r},parseMaterials:function(e,t){var r={},n={};if(void 0!==e){var i=new qd;i.setTextures(t);for(var a=0,o=e.length;a<o;a++){var s=e[a];if("MultiMaterial"===s.type){for(var c=[],l=0;l<s.materials.length;l++){var h=s.materials[l];void 0===r[h.uuid]&&(r[h.uuid]=i.parse(h)),c.push(r[h.uuid])}n[s.uuid]=c}else void 0===r[s.uuid]&&(r[s.uuid]=i.parse(s)),n[s.uuid]=r[s.uuid]}}return n},parseAnimations:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],i=kp.parse(n);void 0!==n.uuid&&(i.uuid=n.uuid),t.push(i)}return t},parseImages:function(e,t){var r=this,n={};function i(e){return r.manager.itemStart(e),a.load(e,function(){r.manager.itemEnd(e)},void 0,function(){r.manager.itemError(e),r.manager.itemEnd(e)})}if(void 0!==e&&e.length>0){var a=new td(new Xp(t));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o<s;o++){var c=e[o],l=c.url;if(Array.isArray(l)){n[c.uuid]=[];for(var h=0,u=l.length;h<u;h++){var p=l[h],d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p)?p:r.resourcePath+p;n[c.uuid].push(i(d))}}else{d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:r.resourcePath+c.url;n[c.uuid]=i(d)}}}return n},parseTextures:function(e,t){function r(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var n={};if(void 0!==e)for(var i=0,a=e.length;i<a;i++){var o,s=e[i];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image),(o=Array.isArray(t[s.image])?new $s(t[s.image]):new Er(t[s.image])).needsUpdate=!0,o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),void 0!==s.mapping&&(o.mapping=r(s.mapping,ef)),void 0!==s.offset&&o.offset.fromArray(s.offset),void 0!==s.repeat&&o.repeat.fromArray(s.repeat),void 0!==s.center&&o.center.fromArray(s.center),void 0!==s.rotation&&(o.rotation=s.rotation),void 0!==s.wrap&&(o.wrapS=r(s.wrap[0],tf),o.wrapT=r(s.wrap[1],tf)),void 0!==s.format&&(o.format=s.format),void 0!==s.type&&(o.type=s.type),void 0!==s.encoding&&(o.encoding=s.encoding),void 0!==s.minFilter&&(o.minFilter=r(s.minFilter,rf)),void 0!==s.magFilter&&(o.magFilter=r(s.magFilter,rf)),void 0!==s.anisotropy&&(o.anisotropy=s.anisotropy),void 0!==s.flipY&&(o.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(o.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(o.unpackAlignment=s.unpackAlignment),n[s.uuid]=o}return n},parseObject:function(e,t,r){var n;function i(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function a(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],n=0,i=e.length;n<i;n++){var a=e[n];void 0===r[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),t.push(r[a])}return t}return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),r[e]}}switch(e.type){case"Scene":n=new sn,void 0!==e.background&&Number.isInteger(e.background)&&(n.background=new Qn(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?n.fog=new Kl(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(n.fog=new Ql(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":n=new oa(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(n.focus=e.focus),void 0!==e.zoom&&(n.zoom=e.zoom),void 0!==e.filmGauge&&(n.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(n.filmOffset=e.filmOffset),void 0!==e.view&&(n.view=Object.assign({},e.view));break;case"OrthographicCamera":n=new Hd(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(n.zoom=e.zoom),void 0!==e.view&&(n.view=Object.assign({},e.view));break;case"AmbientLight":n=new jd(e.color,e.intensity);break;case"DirectionalLight":n=new kd(e.color,e.intensity);break;case"PointLight":n=new Gd(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":n=new Wd(e.color,e.intensity,e.width,e.height);break;case"SpotLight":n=new zd(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":n=new Nd(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var o=i(e.geometry),s=a(e.material);n=o.bones&&o.bones.length>0?new _h(o,s):new ki(o,s);break;case"InstancedMesh":o=i(e.geometry),s=a(e.material);var c=e.count,l=e.instanceMatrix;(n=new Ch(o,s,c)).instanceMatrix=new oi(new Float32Array(l.array),16);break;case"LOD":n=new bh;break;case"Line":n=new Bh(i(e.geometry),a(e.material),e.mode);break;case"LineLoop":n=new Hh(i(e.geometry),a(e.material));break;case"LineSegments":n=new Gh(i(e.geometry),a(e.material));break;case"PointCloud":case"Points":n=new Xh(i(e.geometry),a(e.material));break;case"Sprite":n=new vh(a(e.material));break;case"Group":n=new Yl;break;default:n=new on}if(n.uuid=e.uuid,void 0!==e.name&&(n.name=e.name),void 0!==e.matrix?(n.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(n.matrixAutoUpdate=e.matrixAutoUpdate),n.matrixAutoUpdate&&n.matrix.decompose(n.position,n.quaternion,n.scale)):(void 0!==e.position&&n.position.fromArray(e.position),void 0!==e.rotation&&n.rotation.fromArray(e.rotation),void 0!==e.quaternion&&n.quaternion.fromArray(e.quaternion),void 0!==e.scale&&n.scale.fromArray(e.scale)),void 0!==e.castShadow&&(n.castShadow=e.castShadow),void 0!==e.receiveShadow&&(n.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(n.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(n.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&n.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(n.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.frustumCulled&&(n.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(n.renderOrder=e.renderOrder),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.layers&&(n.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,u=0;u<h.length;u++)n.add(this.parseObject(h[u],t,r));if("LOD"===e.type){void 0!==e.autoUpdate&&(n.autoUpdate=e.autoUpdate);for(var p=e.levels,d=0;d<p.length;d++){var f=p[d],m=n.getObjectByProperty("uuid",f.object);void 0!==m&&n.addLevel(m,f.distance)}}return n}});var $d,ef={UVMapping:oe,CubeReflectionMapping:se,CubeRefractionMapping:ce,EquirectangularReflectionMapping:le,EquirectangularRefractionMapping:he,SphericalReflectionMapping:ue,CubeUVReflectionMapping:pe,CubeUVRefractionMapping:de},tf={RepeatWrapping:fe,ClampToEdgeWrapping:me,MirroredRepeatWrapping:ve},rf={NearestFilter:ge,NearestMipmapNearestFilter:ye,NearestMipmapLinearFilter:be,LinearFilter:we,LinearMipmapNearestFilter:Me,LinearMipmapLinearFilter:Te};function nf(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),Zp.call(this,e),this.options=void 0}function af(){this.type="ShapePath",this.color=new Qn,this.subPaths=[],this.currentPath=null}function of(e){this.type="Font",this.data=e}function sf(e,t,r){for(var n=Array.from?Array.from(e):String(e).split(""),i=t/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*i,o=[],s=0,c=0,l=0;l<n.length;l++){var h=n[l];if("\n"===h)s=0,c-=a;else{var u=cf(h,i,s,c,r);s+=u.offsetX,o.push(u.path)}}return o}function cf(e,t,r,n,i){var a=i.glyphs[e]||i.glyphs["?"];if(a){var o,s,c,l,h,u,p,d,f=new af;if(a.o)for(var m=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),v=0,g=m.length;v<g;){switch(m[v++]){case"m":o=m[v++]*t+r,s=m[v++]*t+n,f.moveTo(o,s);break;case"l":o=m[v++]*t+r,s=m[v++]*t+n,f.lineTo(o,s);break;case"q":c=m[v++]*t+r,l=m[v++]*t+n,h=m[v++]*t+r,u=m[v++]*t+n,f.quadraticCurveTo(h,u,c,l);break;case"b":c=m[v++]*t+r,l=m[v++]*t+n,h=m[v++]*t+r,u=m[v++]*t+n,p=m[v++]*t+r,d=m[v++]*t+n,f.bezierCurveTo(h,u,p,d,c,l)}}return{offsetX:a.ha*t,path:f}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function lf(e){Zp.call(this,e)}nf.prototype=Object.assign(Object.create(Zp.prototype),{constructor:nf,setOptions:function(e){return this.options=e,this},load:function(e,t,r,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,a=qp.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout(function(){t&&t(a),i.manager.itemEnd(e)},0),a;fetch(e).then(function(e){return e.blob()}).then(function(e){return void 0===i.options?createImageBitmap(e):createImageBitmap(e,i.options)}).then(function(r){qp.add(e,r),t&&t(r),i.manager.itemEnd(e)}).catch(function(t){n&&n(t),i.manager.itemError(e),i.manager.itemEnd(e)}),i.manager.itemStart(e)}}),Object.assign(af.prototype,{moveTo:function(e,t){return this.currentPath=new Od,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,r,n){return this.currentPath.quadraticCurveTo(e,t,r,n),this},bezierCurveTo:function(e,t,r,n,i,a){return this.currentPath.bezierCurveTo(e,t,r,n,i,a),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function r(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r],a=new Dd;a.curves=i.curves,t.push(a)}return t}function n(e,t){for(var r=t.length,n=!1,i=r-1,a=0;a<r;i=a++){var o=t[i],s=t[a],c=s.x-o.x,l=s.y-o.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(o=t[a],c=-c,s=t[i],l=-l),e.y<o.y||e.y>s.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=l*(e.x-o.x)-c*(e.y-o.y);if(0===h)return!0;if(h<0)continue;n=!n}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return n}var i=Xu.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return r(a);var o,s,c,l=[];if(1===a.length)return s=a[0],(c=new Dd).curves=s.curves,l.push(c),l;var h=!i(a[0].getPoints());h=e?!h:h;var u,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=a.length;g<y;g++)o=i(u=(s=a[g]).getPoints()),(o=e?!o:o)?(!h&&f[v]&&v++,f[v]={s:new Dd,p:u},f[v].s.curves=s.curves,h&&v++,m[v]=[]):m[v].push({h:s,p:u[0]});if(!f[0])return r(a);if(f.length>1){for(var x=!1,b=[],_=0,w=f.length;_<w;_++)d[_]=[];for(_=0,w=f.length;_<w;_++)for(var M=m[_],S=0;S<M.length;S++){for(var T=M[S],E=!0,A=0;A<f.length;A++)n(T.p,f[A].p)&&(_!==A&&b.push({froms:_,tos:A,hole:S}),E?(E=!1,d[A].push(T)):x=!0);E&&d[_].push(T)}b.length>0&&(x||(m=d))}g=0;for(var L=f.length;g<L;g++){c=f[g].s,l.push(c);for(var R=0,C=(p=m[g]).length;R<C;R++)c.holes.push(p[R].h)}return l}}),Object.assign(of.prototype,{isFont:!0,generateShapes:function(e,t){void 0===t&&(t=100);for(var r=[],n=sf(e,t,this.data),i=0,a=n.length;i<a;i++)Array.prototype.push.apply(r,n[i].toShapes());return r}}),lf.prototype=Object.assign(Object.create(Zp.prototype),{constructor:lf,load:function(e,t,r,n){var i=this,a=new Qp(this.manager);a.setPath(this.path),a.load(e,function(e){var r;try{r=JSON.parse(e)}catch(a){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),r=JSON.parse(e.substring(65,e.length-2))}var n=i.parse(r);t&&t(n)},r,n)},parse:function(e){return new of(e)}});var hf={getContext:function(){return void 0===$d&&($d=new(window.AudioContext||window.webkitAudioContext)),$d},setContext:function(e){$d=e}};function uf(e){Zp.call(this,e)}function pf(){this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new Dr)}function df(e,t){Id.call(this,void 0,t),this.sh=void 0!==e?e:new pf}function ff(e,t,r){df.call(this,void 0,r);var n=(new Qn).set(e),i=(new Qn).set(t),a=new Dr(n.r,n.g,n.b),o=new Dr(i.r,i.g,i.b),s=Math.sqrt(Math.PI),c=s*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s),this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(c)}function mf(e,t){df.call(this,void 0,t);var r=(new Qn).set(e);this.sh.coefficients[0].set(r.r,r.g,r.b).multiplyScalar(2*Math.sqrt(Math.PI))}exports.AudioContext=hf,uf.prototype=Object.assign(Object.create(Zp.prototype),{constructor:uf,load:function(e,t,r,n){var i=new Qp(this.manager);i.setResponseType("arraybuffer"),i.setPath(this.path),i.load(e,function(e){var r=e.slice(0);hf.getContext().decodeAudioData(r,function(e){t(e)})},r,n)}}),Object.assign(pf.prototype,{isSphericalHarmonics3:!0,set:function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},zero:function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},getAt:function(e,t){var r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScale(a[1],.488603*n),t.addScale(a[2],.488603*i),t.addScale(a[3],.488603*r),t.addScale(a[4],r*n*1.092548),t.addScale(a[5],n*i*1.092548),t.addScale(a[6],.315392*(3*i*i-1)),t.addScale(a[7],r*i*1.092548),t.addScale(a[8],.546274*(r*r-n*n)),t},getIrradianceAt:function(e,t){var r=e.x,n=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScale(a[1],1.023328*n),t.addScale(a[2],1.023328*i),t.addScale(a[3],1.023328*r),t.addScale(a[4],.858086*r*n),t.addScale(a[5],.858086*n*i),t.addScale(a[6],.743125*i*i-.247708),t.addScale(a[7],.858086*r*i),t.addScale(a[8],.429043*(r*r-n*n)),t},add:function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},scale:function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},lerp:function(e,t){for(var r=0;r<9;r++)this.coefficients[r].lerp(e.coefficients[r],t);return this},equals:function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},copy:function(e){return this.set(e.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(e,t){void 0===t&&(t=0);for(var r=this.coefficients,n=0;n<9;n++)r[n].fromArray(e,t+3*n);return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var r=this.coefficients,n=0;n<9;n++)r[n].toArray(e,t+3*n);return e}}),Object.assign(pf,{getBasisAt:function(e,t){var r=e.x,n=e.y,i=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*i,t[3]=.488603*r,t[4]=1.092548*r*n,t[5]=1.092548*n*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*r*i,t[8]=.546274*(r*r-n*n)}}),df.prototype=Object.assign(Object.create(Id.prototype),{constructor:df,isLightProbe:!0,copy:function(e){return Id.prototype.copy.call(this,e),this.sh.copy(e.sh),this.intensity=e.intensity,this},toJSON:function(e){return Id.prototype.toJSON.call(this,e)}}),ff.prototype=Object.assign(Object.create(df.prototype),{constructor:ff,isHemisphereLightProbe:!0,copy:function(e){return df.prototype.copy.call(this,e),this},toJSON:function(e){return df.prototype.toJSON.call(this,e)}}),mf.prototype=Object.assign(Object.create(df.prototype),{constructor:mf,isAmbientLightProbe:!0,copy:function(e){return df.prototype.copy.call(this,e),this},toJSON:function(e){return df.prototype.toJSON.call(this,e)}});var vf=new Hr,gf=new Hr;function yf(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new oa,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new oa,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function xf(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}Object.assign(yf.prototype,{update:function(e){var t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;var r,n,i=e.projectionMatrix.clone(),a=t.eyeSep/2,o=a*t.near/t.focus,s=t.near*Math.tan(_r.DEG2RAD*t.fov*.5)/t.zoom;gf.elements[12]=-a,vf.elements[12]=a,r=-s*t.aspect+o,n=s*t.aspect+o,i.elements[0]=2*t.near/(n-r),i.elements[8]=(n+r)/(n-r),this.cameraL.projectionMatrix.copy(i),r=-s*t.aspect-o,n=s*t.aspect-o,i.elements[0]=2*t.near/(n-r),i.elements[8]=(n+r)/(n-r),this.cameraR.projectionMatrix.copy(i)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(gf),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(vf)}}),Object.assign(xf.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}});var bf=new Dr,_f=new Cr,wf=new Dr,Mf=new Dr;function Sf(){on.call(this),this.type="AudioListener",this.context=hf.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new xf}function Tf(e){on.call(this),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.sourceType="empty",this._startedAt=0,this._pausedAt=0,this.filters=[]}Sf.prototype=Object.assign(Object.create(on.prototype),{constructor:Sf,getInput:function(){return this.gain},removeFilter:function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},updateMatrixWorld:function(e){on.prototype.updateMatrixWorld.call(this,e);var t=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(bf,_f,wf),Mf.set(0,0,-1).applyQuaternion(_f),t.positionX){var n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(bf.x,n),t.positionY.linearRampToValueAtTime(bf.y,n),t.positionZ.linearRampToValueAtTime(bf.z,n),t.forwardX.linearRampToValueAtTime(Mf.x,n),t.forwardY.linearRampToValueAtTime(Mf.y,n),t.forwardZ.linearRampToValueAtTime(Mf.z,n),t.upX.linearRampToValueAtTime(r.x,n),t.upY.linearRampToValueAtTime(r.y,n),t.upZ.linearRampToValueAtTime(r.z,n)}else t.setPosition(bf.x,bf.y,bf.z),t.setOrientation(Mf.x,Mf.y,Mf.z,r.x,r.y,r.z)}}),Tf.prototype=Object.assign(Object.create(on.prototype),{constructor:Tf,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setMediaElementSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},setMediaStreamSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._pausedAt=(this.context.currentTime-this._startedAt)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},setDetune:function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},getDetune:function(){return this.detune},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},setLoopStart:function(e){return this.loopStart=e,this},setLoopEnd:function(e){return this.loopEnd=e,this},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}});var Ef=new Dr,Af=new Cr,Lf=new Dr,Rf=new Dr;function Cf(e){Tf.call(this,e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}function Pf(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function Of(e,t,r){this.binding=e,this.valueSize=r;var n,i=Float64Array;switch(t){case"quaternion":n=this._slerp;break;case"string":case"bool":i=Array,n=this._select;break;default:n=this._lerp}this.buffer=new i(4*r),this._mixBufferRegion=n,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Cf.prototype=Object.assign(Object.create(Tf.prototype),{constructor:Cf,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){return this.panner.refDistance=e,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){return this.panner.rolloffFactor=e,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){return this.panner.distanceModel=e,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){return this.panner.maxDistance=e,this},setDirectionalCone:function(e,t,r){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=r,this},updateMatrixWorld:function(e){if(on.prototype.updateMatrixWorld.call(this,e),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(Ef,Af,Lf),Rf.set(0,0,1).applyQuaternion(Af);var t=this.panner;if(t.positionX){var r=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Ef.x,r),t.positionY.linearRampToValueAtTime(Ef.y,r),t.positionZ.linearRampToValueAtTime(Ef.z,r),t.orientationX.linearRampToValueAtTime(Rf.x,r),t.orientationY.linearRampToValueAtTime(Rf.y,r),t.orientationZ.linearRampToValueAtTime(Rf.z,r)}else t.setPosition(Ef.x,Ef.y,Ef.z),t.setOrientation(Rf.x,Rf.y,Rf.z)}}}),Object.assign(Pf.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),r=0;r<t.length;r++)e+=t[r];return e/t.length}}),Object.assign(Of.prototype,{accumulate:function(e,t){var r=this.buffer,n=this.valueSize,i=e*n+n,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==n;++o)r[i+o]=r[o];a=t}else{var s=t/(a+=t);this._mixBufferRegion(r,i,0,s,n)}this.cumulativeWeight=a},apply:function(e){var t=this.valueSize,r=this.buffer,n=e*t+t,i=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,i<1){var o=3*t;this._mixBufferRegion(r,n,o,1-i,t)}for(var s=t,c=t+t;s!==c;++s)if(r[s]!==r[s+t]){a.setValue(r,n);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,r=this.valueSize,n=3*r;e.getValue(t,n);for(var i=r,a=n;i!==a;++i)t[i]=t[n+i%r];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,r,n,i){if(n>=.5)for(var a=0;a!==i;++a)e[t+a]=e[r+a]},_slerp:function(e,t,r,n){Cr.slerpFlat(e,t,e,t,e,r,n)},_lerp:function(e,t,r,n,i){for(var a=1-n,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[r+o]*n}}});var Df="\\[\\]\\.:\\/",If=new RegExp("["+Df+"]","g"),Nf="[^"+Df+"]",Ff="[^"+Df.replace("\\.","")+"]",Bf=/((?:WC+[\/:])*)/.source.replace("WC",Nf),zf=/(WCOD+)?/.source.replace("WCOD",Ff),Uf=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Nf),Gf=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Nf),Hf=new RegExp("^"+Bf+zf+Uf+Gf+"$"),Vf=["material","materials","bones"];function kf(e,t,r){var n=r||jf.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}function jf(e,t,r){this.path=t,this.parsedPath=r||jf.parseTrackName(t),this.node=jf.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function Wf(){this.uuid=_r.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,r=arguments.length;t!==r;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function qf(e,t,r){this._mixer=e,this._clip=t,this._localRoot=r||null;for(var n=t.tracks,i=n.length,a=new Array(i),o={endingStart:Lt,endingEnd:Lt},s=0;s!==i;++s){var c=n[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Mt,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}function Xf(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Yf(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function Zf(e,t,r){$l.call(this,e,t),this.meshPerAttribute=r||1}function Jf(e,t,r,n){this.ray=new On(e,t),this.near=r||0,this.far=n||1/0,this.camera=null,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Qf(e,t){return e.distance-t.distance}function Kf(e,t,r,n){if(!1!==e.visible&&(e.raycast(t,r),!0===n))for(var i=e.children,a=0,o=i.length;a<o;a++)Kf(i[a],t,r,!0)}function $f(e,t,r){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==r?r:0,this}function em(e,t,r){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==r?r:0,this}Object.assign(kf.prototype,{getValue:function(e,t){this.bind();var r=this._targetGroup.nCachedObjects_,n=this._bindings[r];void 0!==n&&n.getValue(e,t)},setValue:function(e,t){for(var r=this._bindings,n=this._targetGroup.nCachedObjects_,i=r.length;n!==i;++n)r[n].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,r=e.length;t!==r;++t)e[t].unbind()}}),Object.assign(jf,{Composite:kf,create:function(e,t,r){return e&&e.isAnimationObjectGroup?new jf.Composite(e,t,r):new jf(e,t,r)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(If,"")},parseTrackName:function(e){var t=Hf.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var r={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var i=r.nodeName.substring(n+1);-1!==Vf.indexOf(i)&&(r.nodeName=r.nodeName.substring(0,n),r.objectName=i)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r},findNode:function(e,t){if(!t||""===t||"root"===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var r=e.skeleton.getBoneByName(t);if(void 0!==r)return r}if(e.children){var n=function(e){for(var r=0;r<e.length;r++){var i=e[r];if(i.name===t||i.uuid===t)return i;var a=n(i.children);if(a)return a}return null},i=n(e.children);if(i)return i}return null}}),Object.assign(jf.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)e[t++]=r[n]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++]},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var r=this.resolvedProperty,n=0,i=r.length;n!==i;++n)r[n]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,r=t.objectName,n=t.propertyName,i=t.propertyIndex;if(e||(e=jf.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(r){var a=t.objectIndex;switch(r){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var o=0;o<e.length;o++)if(e[o].name===a){a=o;break}break;default:if(void 0===e[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[r]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var s=e[n];if(void 0!==s){var c=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?c=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate);var l=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===n){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){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(o=0;o<this.node.geometry.morphAttributes.position.length;o++)if(e.geometry.morphAttributes.position[o].name===i){i=o;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(o=0;o<this.node.geometry.morphTargets.length;o++)if(e.geometry.morphTargets[o].name===i){i=o;break}}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][c]}else{var h=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+h+"."+n+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(jf.prototype,{_getValue_unbound:jf.prototype.getValue,_setValue_unbound:jf.prototype.setValue}),Object.assign(Wf.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,r=this.nCachedObjects_,n=this._indicesByUUID,i=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,c=void 0,l=0,h=arguments.length;l!==h;++l){var u=arguments[l],p=u.uuid,d=n[p];if(void 0===d){d=t++,n[p]=d,e.push(u);for(var f=0,m=s;f!==m;++f)o[f].push(new jf(u,i[f],a[f]))}else if(d<r){c=e[d];var v=--r,g=e[v];n[g.uuid]=d,e[d]=g,n[p]=v,e[v]=u;for(f=0,m=s;f!==m;++f){var y=o[f],x=y[v],b=y[d];y[d]=x,void 0===b&&(b=new jf(u,i[f],a[f])),y[v]=b}}else e[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=r},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,r=this._indicesByUUID,n=this._bindings,i=n.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],c=s.uuid,l=r[c];if(void 0!==l&&l>=t){var h=t++,u=e[h];r[u.uuid]=l,e[l]=u,r[c]=h,e[h]=s;for(var p=0,d=i;p!==d;++p){var f=n[p],m=f[h],v=f[l];f[l]=m,f[h]=v}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,r=this.nCachedObjects_,n=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o].uuid,l=n[c];if(void 0!==l)if(delete n[c],l<r){var h=--r,u=e[h],p=e[g=--t];n[u.uuid]=l,e[l]=u,n[p.uuid]=h,e[h]=p,e.pop();for(var d=0,f=a;d!==f;++d){var m=(y=i[d])[h],v=y[g];y[l]=m,y[h]=v,y.pop()}}else{var g;n[(p=e[g=--t]).uuid]=l,e[l]=p,e.pop();for(d=0,f=a;d!==f;++d){var y;(y=i[d])[l]=y[g],y.pop()}}}this.nCachedObjects_=r},subscribe_:function(e,t){var r=this._bindingsIndicesByPath,n=r[e],i=this._bindings;if(void 0!==n)return i[n];var a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,l=this.nCachedObjects_,h=new Array(c);n=i.length,r[e]=n,a.push(e),o.push(t),i.push(h);for(var u=l,p=s.length;u!==p;++u){var d=s[u];h[u]=new jf(d,e,t)}return h},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,r=t[e];if(void 0!==r){var n=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];t[e[o]]=r,a[r]=s,a.pop(),i[r]=i[o],i.pop(),n[r]=n[o],n.pop()}}}),Object.assign(qf.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,r){if(e.fadeOut(t),this.fadeIn(t),r){var n=this._clip.duration,i=e._clip.duration,a=i/n,o=n/i;e.warp(1,a,t),this.warp(o,1,t)}return this},crossFadeTo:function(e,t,r){return e.crossFadeFrom(this,t,r)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,r){var n=this._mixer,i=n.time,a=this._timeScaleInterpolant,o=this.timeScale;null===a&&(a=n._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,c=a.sampleValues;return s[0]=i,s[1]=i+r,c[0]=e/o,c[1]=t/o,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,r,n){if(this.enabled){var i=this._startTime;if(null!==i){var a=(e-i)*r;if(a<0||0===r)return;this._startTime=null,t=r*a}t*=this._updateTimeScale(e);var o=this._updateTime(t),s=this._updateWeight(e);if(s>0)for(var c=this._interpolants,l=this._propertyBindings,h=0,u=c.length;h!==u;++h)c[h].evaluate(o),l[h].accumulate(n,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var r=this._weightInterpolant;if(null!==r){var n=r.evaluate(e)[0];t*=n,e>r.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var r=this._timeScaleInterpolant;if(null!==r)t*=r.evaluate(e)[0],e>r.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,r=this._clip.duration,n=this.loop,i=this._loopCount,a=n===St;if(0===e)return-1===i?t:a&&1==(1&i)?r-t:t;if(n===wt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=r)t=r;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,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)),t>=r||t<0){var o=Math.floor(t/r);t-=r*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?r:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&1==(1&i))return r-t}return t},_setEndings:function(e,t,r){var n=this._interpolantSettings;r?(n.endingStart=Rt,n.endingEnd=Rt):(n.endingStart=e?this.zeroSlopeAtStart?Rt:Lt:Ct,n.endingEnd=t?this.zeroSlopeAtEnd?Rt:Lt:Ct)},_scheduleFading:function(e,t,r){var n=this._mixer,i=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=r,this}}),Xf.prototype=Object.assign(Object.create(gr.prototype),{constructor:Xf,_bindAction:function(e,t){var r=e._localRoot||this._root,n=e._clip.tracks,i=n.length,a=e._propertyBindings,o=e._interpolants,s=r.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var h=0;h!==i;++h){var u=n[h],p=u.name,d=l[p];if(void 0!==d)a[h]=d;else{if(void 0!==(d=a[h])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=t&&t._propertyBindings[h].binding.parsedPath;++(d=new Of(jf.create(r,p,f),u.ValueTypeName,u.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),a[h]=d}o[h].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,r=e._clip.uuid,n=this._actionsByClip[r];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,r,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,r=0,n=t.length;r!==n;++r){var i=t[r];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,r){var n=this._actions,i=this._actionsByClip,a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{var o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=n.length,n.push(e),a.actionByRoot[r]=e},_removeInactiveAction:function(e){var t=this._actions,r=t[t.length-1],n=e._cacheIndex;r._cacheIndex=n,t[n]=r,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,a=this._actionsByClip,o=a[i],s=o.knownActions,c=s[s.length-1],l=e._byClipCacheIndex;c._byClipCacheIndex=l,s[l]=c,s.pop(),e._byClipCacheIndex=null,delete o.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete a[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,r=0,n=t.length;r!==n;++r){var i=t[r];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,r=e._cacheIndex,n=this._nActiveActions++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_takeBackAction:function(e){var t=this._actions,r=e._cacheIndex,n=--this._nActiveActions,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_addInactiveBinding:function(e,t,r){var n=this._bindingsByRootAndName,i=n[t],a=this._bindings;void 0===i&&(i={},n[t]=i),i[r]=e,e._cacheIndex=a.length,a.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,r=e.binding,n=r.rootNode.uuid,i=r.path,a=this._bindingsByRootAndName,o=a[n],s=t[t.length-1],c=e._cacheIndex;s._cacheIndex=c,t[c]=s,t.pop(),delete o[i],0===Object.keys(o).length&&delete a[n]},_lendBinding:function(e){var t=this._bindings,r=e._cacheIndex,n=this._nActiveBindings++,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_takeBackBinding:function(e){var t=this._bindings,r=e._cacheIndex,n=--this._nActiveBindings,i=t[n];e._cacheIndex=n,t[n]=e,i._cacheIndex=r,t[r]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,r=e[t];return void 0===r&&((r=new Dp(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t,e[t]=r),r},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,r=e.__cacheIndex,n=--this._nActiveControlInterpolants,i=t[n];e.__cacheIndex=n,t[n]=e,i.__cacheIndex=r,t[r]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var r=t||this._root,n=r.uuid,i="string"==typeof e?kp.findByName(r,e):e,a=null!==i?i.uuid:e,o=this._actionsByClip[a],s=null;if(void 0!==o){var c=o.actionByRoot[n];if(void 0!==c)return c;s=o.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var l=new qf(this,i,t);return this._bindAction(l,s),this._addInactiveAction(l,a,n),l},existingAction:function(e,t){var r=t||this._root,n=r.uuid,i="string"==typeof e?kp.findByName(r,e):e,a=i?i.uuid:e,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[n]||null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,r=this._bindings,n=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==t;++i)e[i].reset();for(i=0;i!==n;++i)r[i].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,r=this._nActiveActions,n=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1,o=0;o!==r;++o){t[o]._update(n,e,i,a)}var s=this._bindings,c=this._nActiveBindings;for(o=0;o!==c;++o)s[o].apply(a);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,r=e.uuid,n=this._actionsByClip,i=n[r];if(void 0!==i){for(var a=i.knownActions,o=0,s=a.length;o!==s;++o){var c=a[o];this._deactivateAction(c);var l=c._cacheIndex,h=t[t.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,h._cacheIndex=l,t[l]=h,t.pop(),this._removeInactiveBindingsForAction(c)}delete n[r]}},uncacheRoot:function(e){var t=e.uuid,r=this._actionsByClip;for(var n in r){var i=r[n].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var a=this._bindingsByRootAndName[t];if(void 0!==a)for(var o in a){var s=a[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(e,t){var r=this.existingAction(e,t);null!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}}),Yf.prototype.clone=function(){return new Yf(void 0===this.value.clone?this.value:this.value.clone())},Zf.prototype=Object.assign(Object.create($l.prototype),{constructor:Zf,isInstancedInterleavedBuffer:!0,copy:function(e){return $l.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Object.assign(Jf.prototype,{linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,t,r){var n=r||[];return Kf(e,this,n,t),n.sort(Qf),n},intersectObjects:function(e,t,r){var n=r||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var i=0,a=e.length;i<a;i++)Kf(e[i],this,n,t);return n.sort(Qf),n}}),Object.assign($f.prototype,{set:function(e,t,r){return this.radius=e,this.phi=t,this.theta=r,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,r){return this.radius=Math.sqrt(e*e+t*t+r*r),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,r),this.phi=Math.acos(_r.clamp(t/this.radius,-1,1))),this}}),Object.assign(em.prototype,{set:function(e,t,r){return this.radius=e,this.theta=t,this.y=r,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},setFromCartesianCoords:function(e,t,r){return this.radius=Math.sqrt(e*e+r*r),this.theta=Math.atan2(e,r),this.y=t,this}});var tm=new wr;function rm(e,t){this.min=void 0!==e?e:new wr(1/0,1/0),this.max=void 0!==t?t:new wr(-1/0,-1/0)}Object.assign(rm.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,r=e.length;t<r;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(e,t){var r=tm.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new wr),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new wr),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new wr),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new wr),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return tm.copy(e).clamp(this.min,this.max).sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var nm=new Dr,im=new Dr;function am(e,t){this.start=void 0!==e?e:new Dr,this.end=void 0!==t?t:new Dr}function om(e){on.call(this),this.material=e,this.render=function(){}}Object.assign(am.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Dr),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Dr),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Dr),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){nm.subVectors(e,this.start),im.subVectors(this.end,this.start);var r=im.dot(im),n=im.dot(nm)/r;return t&&(n=_r.clamp(n,0,1)),n},closestPointToPoint:function(e,t,r){var n=this.closestPointToPointParameter(e,t);return void 0===r&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),r=new Dr),this.delta(r).multiplyScalar(n).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),om.prototype=Object.create(on.prototype),om.prototype.constructor=om,om.prototype.isImmediateRenderObject=!0;var sm=new Dr;function cm(e,t){on.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var r=new Ti,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],i=0,a=1;i<32;i++,a++){var o=i/32*Math.PI*2,s=a/32*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}r.setAttribute("position",new fi(n,3));var c=new Ph({fog:!1});this.cone=new Gh(r,c),this.add(this.cone),this.update()}cm.prototype=Object.create(on.prototype),cm.prototype.constructor=cm,cm.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},cm.prototype.update=function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),sm.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(sm),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var lm=new Dr,hm=new Hr,um=new Hr;function pm(e){var t=[];e&&e.isBone&&t.push(e);for(var r=0;r<e.children.length;r++)t.push.apply(t,pm(e.children[r]));return t}function dm(e){for(var t=pm(e),r=new Ti,n=[],i=[],a=new Qn(0,0,1),o=new Qn(0,1,0),s=0;s<t.length;s++){var c=t[s];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),i.push(a.r,a.g,a.b),i.push(o.r,o.g,o.b))}r.setAttribute("position",new fi(n,3)),r.setAttribute("color",new fi(i,3));var l=new Ph({vertexColors:b,depthTest:!1,depthWrite:!1,transparent:!0});Gh.call(this,r,l),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function fm(e,t,r){this.light=e,this.light.updateMatrixWorld(),this.color=r;var n=new np(t,4,2),i=new ii({wireframe:!0,fog:!1});ki.call(this,n,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dm.prototype=Object.create(Gh.prototype),dm.prototype.constructor=dm,dm.prototype.updateMatrixWorld=function(e){var t=this.bones,r=this.geometry,n=r.getAttribute("position");um.getInverse(this.root.matrixWorld);for(var i=0,a=0;i<t.length;i++){var o=t[i];o.parent&&o.parent.isBone&&(hm.multiplyMatrices(um,o.matrixWorld),lm.setFromMatrixPosition(hm),n.setXYZ(a,lm.x,lm.y,lm.z),hm.multiplyMatrices(um,o.parent.matrixWorld),lm.setFromMatrixPosition(hm),n.setXYZ(a+1,lm.x,lm.y,lm.z),a+=2)}r.getAttribute("position").needsUpdate=!0,on.prototype.updateMatrixWorld.call(this,e)},fm.prototype=Object.create(ki.prototype),fm.prototype.constructor=fm,fm.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},fm.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)};var mm=new Dr,vm=new Qn,gm=new Qn;function ym(e,t,r){on.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r;var n=new su(t);n.rotateY(.5*Math.PI),this.material=new ii({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=b);var i=n.getAttribute("position"),a=new Float32Array(3*i.count);n.setAttribute("color",new oi(a,3)),this.add(new ki(n,this.material)),this.update()}function xm(e,t,r,n){e=e||10,t=t||10,r=new Qn(void 0!==r?r:4473924),n=new Qn(void 0!==n?n:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],c=[],l=0,h=0,u=-o;l<=t;l++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var p=l===i?r:n;p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3}var d=new Ti;d.setAttribute("position",new fi(s,3)),d.setAttribute("color",new fi(c,3));var f=new Ph({vertexColors:b});Gh.call(this,d,f)}function bm(e,t,r,n,i,a){e=e||10,t=t||16,r=r||8,n=n||64,i=new Qn(void 0!==i?i:4473924),a=new Qn(void 0!==a?a:8947848);var o,s,c,l,h,u,p,d=[],f=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),o=Math.sin(c)*e,s=Math.cos(c)*e,d.push(0,0,0),d.push(o,0,s),p=1&l?i:a,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(l=0;l<=r;l++)for(p=1&l?i:a,u=e-e/r*l,h=0;h<n;h++)c=h/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b),c=(h+1)/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b);var m=new Ti;m.setAttribute("position",new fi(d,3)),m.setAttribute("color",new fi(f,3));var v=new Ph({vertexColors:b});Gh.call(this,m,v)}ym.prototype=Object.create(on.prototype),ym.prototype.constructor=ym,ym.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},ym.prototype.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");vm.copy(this.light.color),gm.copy(this.light.groundColor);for(var r=0,n=t.count;r<n;r++){var i=r<n/2?vm:gm;t.setXYZ(r,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(mm.setFromMatrixPosition(this.light.matrixWorld).negate())},xm.prototype=Object.assign(Object.create(Gh.prototype),{constructor:xm,copy:function(e){return Gh.prototype.copy.call(this,e),this.geometry.copy(e.geometry),this.material.copy(e.material),this},clone:function(){return(new this.constructor).copy(this)}}),bm.prototype=Object.create(Gh.prototype),bm.prototype.constructor=bm;var _m=new Dr,wm=new Dr,Mm=new Dr;function Sm(e,t,r){on.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=r,void 0===t&&(t=1);var n=new Ti;n.setAttribute("position",new fi([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var i=new Ph({fog:!1});this.lightPlane=new Bh(n,i),this.add(this.lightPlane),(n=new Ti).setAttribute("position",new fi([0,0,0,0,0,1],3)),this.targetLine=new Bh(n,i),this.add(this.targetLine),this.update()}Sm.prototype=Object.create(on.prototype),Sm.prototype.constructor=Sm,Sm.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Sm.prototype.update=function(){_m.setFromMatrixPosition(this.light.matrixWorld),wm.setFromMatrixPosition(this.light.target.matrixWorld),Mm.subVectors(wm,_m),this.lightPlane.lookAt(wm),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(wm),this.targetLine.scale.z=Mm.length()};var Tm=new Dr,Em=new aa;function Am(e){var t=new Ti,r=new Ph({color:16777215,vertexColors:x}),n=[],i=[],a={},o=new Qn(16755200),s=new Qn(16711680),c=new Qn(43775),l=new Qn(16777215),h=new Qn(3355443);function u(e,t,r){p(e,r),p(t,r)}function p(e,t){n.push(0,0,0),i.push(t.r,t.g,t.b),void 0===a[e]&&(a[e]=[]),a[e].push(n.length/3-1)}u("n1","n2",o),u("n2","n4",o),u("n4","n3",o),u("n3","n1",o),u("f1","f2",o),u("f2","f4",o),u("f4","f3",o),u("f3","f1",o),u("n1","f1",o),u("n2","f2",o),u("n3","f3",o),u("n4","f4",o),u("p","n1",s),u("p","n2",s),u("p","n3",s),u("p","n4",s),u("u1","u2",c),u("u2","u3",c),u("u3","u1",c),u("c","t",l),u("p","c",h),u("cn1","cn2",h),u("cn3","cn4",h),u("cf1","cf2",h),u("cf3","cf4",h),t.setAttribute("position",new fi(n,3)),t.setAttribute("color",new fi(i,3)),Gh.call(this,t,r),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function Lm(e,t,r,n,i,a,o){Tm.set(i,a,o).unproject(n);var s=t[e];if(void 0!==s)for(var c=r.getAttribute("position"),l=0,h=s.length;l<h;l++)c.setXYZ(s[l],Tm.x,Tm.y,Tm.z)}Am.prototype=Object.create(Gh.prototype),Am.prototype.constructor=Am,Am.prototype.update=function(){var e=this.geometry,t=this.pointMap;Em.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Lm("c",t,e,Em,0,0,-1),Lm("t",t,e,Em,0,0,1),Lm("n1",t,e,Em,-1,-1,-1),Lm("n2",t,e,Em,1,-1,-1),Lm("n3",t,e,Em,-1,1,-1),Lm("n4",t,e,Em,1,1,-1),Lm("f1",t,e,Em,-1,-1,1),Lm("f2",t,e,Em,1,-1,1),Lm("f3",t,e,Em,-1,1,1),Lm("f4",t,e,Em,1,1,1),Lm("u1",t,e,Em,.7,1.1,-1),Lm("u2",t,e,Em,-.7,1.1,-1),Lm("u3",t,e,Em,0,2,-1),Lm("cf1",t,e,Em,-1,0,1),Lm("cf2",t,e,Em,1,0,1),Lm("cf3",t,e,Em,0,-1,1),Lm("cf4",t,e,Em,0,1,1),Lm("cn1",t,e,Em,-1,0,-1),Lm("cn2",t,e,Em,1,0,-1),Lm("cn3",t,e,Em,0,-1,-1),Lm("cn4",t,e,Em,0,1,-1),e.getAttribute("position").needsUpdate=!0};var Rm=new _n;function Cm(e,t){this.object=e,void 0===t&&(t=16776960);var r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),i=new Ti;i.setIndex(new oi(r,1)),i.setAttribute("position",new oi(n,3)),Gh.call(this,i,new Ph({color:t})),this.matrixAutoUpdate=!1,this.update()}function Pm(e,t){this.type="Box3Helper",this.box=e,t=t||16776960;var r=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Ti;n.setIndex(new oi(r,1)),n.setAttribute("position",new fi([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Gh.call(this,n,new Ph({color:t})),this.geometry.computeBoundingSphere()}function Om(e,t,r){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t;var n=void 0!==r?r:16776960,i=new Ti;i.setAttribute("position",new fi([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),Bh.call(this,i,new Ph({color:n}));var a=new Ti;a.setAttribute("position",new fi([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),a.computeBoundingSphere(),this.add(new ki(a,new ii({color:n,opacity:.2,transparent:!0,depthWrite:!1})))}Cm.prototype=Object.create(Gh.prototype),Cm.prototype.constructor=Cm,Cm.prototype.update=function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Rm.setFromObject(this.object),!Rm.isEmpty()){var t=Rm.min,r=Rm.max,n=this.geometry.attributes.position,i=n.array;i[0]=r.x,i[1]=r.y,i[2]=r.z,i[3]=t.x,i[4]=r.y,i[5]=r.z,i[6]=t.x,i[7]=t.y,i[8]=r.z,i[9]=r.x,i[10]=t.y,i[11]=r.z,i[12]=r.x,i[13]=r.y,i[14]=t.z,i[15]=t.x,i[16]=r.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=r.x,i[22]=t.y,i[23]=t.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}},Cm.prototype.setFromObject=function(e){return this.object=e,this.update(),this},Cm.prototype.copy=function(e){return Gh.prototype.copy.call(this,e),this.object=e.object,this},Cm.prototype.clone=function(){return(new this.constructor).copy(this)},Pm.prototype=Object.create(Gh.prototype),Pm.prototype.constructor=Pm,Pm.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),on.prototype.updateMatrixWorld.call(this,e))},Om.prototype=Object.create(Bh.prototype),Om.prototype.constructor=Om,Om.prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?f:d,this.lookAt(this.plane.normal),on.prototype.updateMatrixWorld.call(this,e)};var Dm,Im,Nm=new Dr;function Fm(e,t,r,n,i,a){on.call(this),void 0===e&&(e=new Dr(0,0,1)),void 0===t&&(t=new Dr(0,0,0)),void 0===r&&(r=1),void 0===n&&(n=16776960),void 0===i&&(i=.2*r),void 0===a&&(a=.2*i),void 0===Dm&&((Dm=new Ti).setAttribute("position",new fi([0,0,0,0,1,0],3)),(Im=new dp(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new Bh(Dm,new Ph({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ki(Im,new ii({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(r,i,a)}function Bm(e){var t=[0,0,0,e=e||1,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=new Ti;r.setAttribute("position",new fi(t,3)),r.setAttribute("color",new fi([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var n=new Ph({vertexColors:b});Gh.call(this,r,n)}Fm.prototype=Object.create(on.prototype),Fm.prototype.constructor=Fm,Fm.prototype.setDirection=function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Nm.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Nm,t)}},Fm.prototype.setLength=function(e,t,r){void 0===t&&(t=.2*e),void 0===r&&(r=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(r,t,r),this.cone.position.y=e,this.cone.updateMatrix()},Fm.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},Fm.prototype.copy=function(e){return on.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},Fm.prototype.clone=function(){return(new this.constructor).copy(this)},Bm.prototype=Object.create(Gh.prototype),Bm.prototype.constructor=Bm;var zm=4,Um=8,Gm=Math.pow(2,Um),Hm=[.125,.215,.35,.446,.526,.582],Vm=Um-zm+1+Hm.length,km=20,jm={[It]:0,[Nt]:1,[Bt]:2,[Ut]:3,[Gt]:4,[Ht]:5,[Ft]:6},Wm=new Hd,qm=vv(km),Xm=null,Ym=null,{_lodPlanes:Zm,_sizeLods:Jm,_sigmas:Qm}=av(),Km=null,$m=null,ev=null,tv=(1+Math.sqrt(5))/2,rv=1/tv,nv=[new Dr(1,1,1),new Dr(-1,1,1),new Dr(1,1,-1),new Dr(-1,1,-1),new Dr(0,tv,rv),new Dr(0,tv,-rv),new Dr(rv,0,tv),new Dr(-rv,0,tv),new Dr(tv,rv,0),new Dr(-tv,rv,0)];function iv(e){$m=e,hv(qm)}function av(){for(var e=[],t=[],r=[],n=Um,i=0;i<Vm;i++){var a=Math.pow(2,n);t.push(a);var o=1/a;i>Um-zm?o=Hm[i-Um+zm-1]:0==i&&(o=0),r.push(o);for(var s=1/(a-1),c=-s/2,l=1+s/2,h=[c,c,l,c,l,l,c,c,l,l,c,l],u=new Float32Array(108),p=new Float32Array(72),d=new Float32Array(36),f=0;f<6;f++){var m=f%3*2/3-1,v=f>2?0:-1,g=[m,v,0,m+2/3,v,0,m+2/3,v+1,0,m,v,0,m+2/3,v+1,0,m,v+1,0];u.set(g,18*f),p.set(h,12*f);var y=[f,f,f,f,f,f];d.set(y,6*f)}var x=new Ti;x.setAttribute("position",new oi(u,3)),x.setAttribute("uv",new oi(p,2)),x.setAttribute("faceIndex",new oi(d,1)),e.push(x),n>zm&&n--}return{_lodPlanes:e,_sizeLods:t,_sigmas:r}}function ov(e){var t={magFilter:ge,minFilter:ge,generateMipmaps:!1,type:e?e.type:Ae,format:e?e.format:je,encoding:e?e.encoding:Bt,depthBuffer:!1,stencilBuffer:!1},r=uv(t);return r.depthBuffer=!e,Km=uv(t),r}function sv(e){Km.dispose(),$m.setRenderTarget(ev),e.scissorTest=!1,e.setSize(e.width,e.height)}function cv(e,t,r,n){var i=new oa(90,1,t,r),a=[1,1,1,1,-1,1],o=[1,1,-1,-1,-1,1],s=$m.outputEncoding,c=$m.toneMapping,l=$m.toneMappingExposure,h=$m.getClearColor(),u=$m.getClearAlpha();$m.toneMapping=te,$m.toneMappingExposure=1,$m.outputEncoding=It,e.scale.z*=-1;var p=e.background;if(p&&p.isColor){p.convertSRGBToLinear();var d=Math.max(p.r,p.g,p.b),f=Math.min(Math.max(Math.ceil(Math.log2(d)),-128),127);p=p.multiplyScalar(Math.pow(2,-f));var m=(f+128)/255;$m.setClearColor(p,m),e.background=null}for(var v=0;v<6;v++){var g=v%3;0==g?(i.up.set(0,a[v],0),i.lookAt(o[v],0,0)):1==g?(i.up.set(0,0,a[v]),i.lookAt(0,o[v],0)):(i.up.set(0,a[v],0),i.lookAt(0,0,o[v])),pv(n,g*Gm,v>2?Gm:0,Gm,Gm),$m.setRenderTarget(n),$m.render(e,i)}$m.toneMapping=c,$m.toneMappingExposure=l,$m.outputEncoding=s,$m.setClearColor(h,u),e.scale.z*=-1}function lv(e,t){var r=new sn;e.isCubeTexture?null==Ym&&(Ym=yv()):null==Xm&&(Xm=gv());var n=e.isCubeTexture?Ym:Xm;r.add(new ki(Zm[0],n));var i=n.uniforms;i.envMap.value=e,e.isCubeTexture||i.texelSize.value.set(1/e.image.width,1/e.image.height),i.inputEncoding.value=jm[e.encoding],i.outputEncoding.value=jm[e.encoding],pv(t,0,0,3*Gm,2*Gm),$m.setRenderTarget(t),$m.render(r,Wm)}function hv(e){var t=new sn;t.add(new ki(Zm[0],e)),$m.compile(t,Wm)}function uv(e){var t=new Lr(3*Gm,3*Gm,e);return t.texture.mapping=pe,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function pv(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function dv(e){var t=$m.autoClear;$m.autoClear=!1;for(var r=1;r<Vm;r++){fv(e,r-1,r,Math.sqrt(Qm[r]*Qm[r]-Qm[r-1]*Qm[r-1]),nv[(r-1)%nv.length])}$m.autoClear=t}function fv(e,t,r,n,i){mv(e,Km,t,r,n,"latitudinal",i),mv(Km,e,r,r,n,"longitudinal",i)}function mv(e,t,r,n,i,a,o){"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");var s=new sn;s.add(new ki(Zm[n],qm));var c=qm.uniforms,l=Jm[r]-1,h=isFinite(i)?Math.PI/(2*l):2*Math.PI/(2*km-1),u=i/h,p=isFinite(i)?1+Math.floor(3*u):km;p>km&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${km}`);for(var d=[],f=0,m=0;m<km;++m){var v=m/u,g=Math.exp(-v*v/2);d.push(g),0==m?f+=g:m<p&&(f+=2*g)}for(m=0;m<d.length;m++)d[m]=d[m]/f;c.envMap.value=e.texture,c.samples.value=p,c.weights.value=d,c.latitudinal.value="latitudinal"===a,o&&(c.poleAxis.value=o),c.dTheta.value=h,c.mipInt.value=Um-r,c.inputEncoding.value=jm[e.texture.encoding],c.outputEncoding.value=jm[e.texture.encoding];var y=Jm[n];pv(t,v=3*Math.max(0,Gm-2*y),(0===n?0:2*Gm)+2*y*(n>Um-zm?n-Um+zm:0),3*y,2*y),$m.setRenderTarget(t),$m.render(s,Wm)}function vv(e){var t=new bp({defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:new Float32Array(e)},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:new Dr(0,1,0)},inputEncoding:{value:jm[It]},outputEncoding:{value:jm[It]}},vertexShader:xv(),fragmentShader:`\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n${bv()}\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\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\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t`,blending:_,depthTest:!1,depthWrite:!1});return t.type="SphericalGaussianBlur",t}function gv(){var e=new bp({uniforms:{envMap:{value:null},texelSize:{value:new wr(1,1)},inputEncoding:{value:jm[It]},outputEncoding:{value:jm[It]}},vertexShader:xv(),fragmentShader:`\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n${bv()}\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t`,blending:_,depthTest:!1,depthWrite:!1});return e.type="EquirectangularToCubeUV",e}function yv(){var e=new bp({uniforms:{envMap:{value:null},inputEncoding:{value:jm[It]},outputEncoding:{value:jm[It]}},vertexShader:xv(),fragmentShader:`\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n${bv()}\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t`,blending:_,depthTest:!1,depthWrite:!1});return e.type="CubemapToCubeUV",e}function xv(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}function bv(){return"\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include <encodings_pars_fragment>\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"}function _v(e,t,r,n,i,a,o){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new ti(e,t,r,i,a,o)}iv.prototype={constructor:iv,fromScene:function(e,t=0,r=.1,n=100){ev=$m.getRenderTarget();var i=ov();return cv(e,r,n,i),t>0&&fv(i,0,0,t),dv(i),sv(i),i},fromEquirectangular:function(e){return e.magFilter=ge,e.minFilter=ge,e.generateMipmaps=!1,this.fromCubemap(e)},fromCubemap:function(e){ev=$m.getRenderTarget();var t=ov(e);return lv(e,t),dv(t),sv(t),t},compileCubemapShader:function(){null==Ym&&hv(Ym=yv())},compileEquirectangularShader:function(){null==Xm&&hv(Xm=gv())},dispose:function(){qm.dispose(),null!=Ym&&Ym.dispose(),null!=Xm&&Xm.dispose();for(var e=0;e<Zm.length;e++)Zm[e].dispose()}};var wv=0;exports.LineStrip=wv;var Mv=1;function Sv(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function Tv(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function Ev(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Xh(e,t)}function Av(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new vh(e)}function Lv(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Xh(e,t)}function Rv(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Vh(e)}function Cv(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Vh(e)}function Pv(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Vh(e)}function Ov(e,t,r){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Dr(e,t,r)}function Dv(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new oi(e,t).setUsage(lr)}function Iv(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new si(e,t)}function Nv(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ci(e,t)}function Fv(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new li(e,t)}function Bv(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new hi(e,t)}function zv(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new ui(e,t)}function Uv(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new pi(e,t)}function Gv(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new di(e,t)}function Hv(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new fi(e,t)}function Vv(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new mi(e,t)}function kv(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),pd.call(this,e),this.type="catmullrom",this.closed=!0}function jv(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),pd.call(this,e),this.type="catmullrom"}function Wv(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),pd.call(this,e),this.type="catmullrom"}function qv(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Bm(e)}function Xv(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Cm(e,t)}function Yv(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Gh(new up(e.geometry),new Ph({color:void 0!==t?t:16777215}))}function Zv(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Gh(new $h(e.geometry),new Ph({color:void 0!==t?t:16777215}))}function Jv(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Qp(e)}function Qv(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ed(e)}function Kv(e,t,r){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new ha(e,r)}exports.LinePieces=Mv,id.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(id.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Pd.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new Ji,r=0,n=e.length;r<n;r++){var i=e[r];t.vertices.push(new Dr(i.x,i.y,i.z||0))}return t}}),Object.assign(Od.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),kv.prototype=Object.create(pd.prototype),jv.prototype=Object.create(pd.prototype),Wv.prototype=Object.create(pd.prototype),Object.assign(Wv.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),xm.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},dm.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Zp.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Xd.extractUrlBase(e)}}),Zp.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(Kd.prototype,{setTexturePath:function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}),Object.assign(rm.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(_n.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),fa.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},am.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(_r,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),_r.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),_r.ceilPowerOfTwo(e)}}),Object.assign(Mr.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Hr.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Dr).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,r,n,i,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,n,r,i,a)}}),Fn.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Cr.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(On.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(Xn.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(Xn,{barycoordFromPoint:function(e,t,r,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Xn.getBarycoord(e,t,r,n,i)},normal:function(e,t,r,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Xn.getNormal(e,t,r,n)}}),Object.assign(Dd.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Ju(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new cp(this,e)}}),Object.assign(wr.prototype,{fromAttribute:function(e,t,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Dr.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ar.prototype,{fromAttribute:function(e,t,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ji.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")},applyMatrix:function(e){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.assign(on.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(on.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(ki.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(ki.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Pt},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(bh.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Sh.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),_h.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(id.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),oa.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(Id.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(oi.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===lr},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(lr)}}}),Object.assign(oi.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?lr:cr),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(Ti.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new oi(arguments[1],arguments[2])))},addDrawCall:function(e,t,r){void 0!==r&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(Ti.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties($l.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.usage===lr},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),Object.assign($l.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?lr:cr),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(Qu.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(Yf.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(ni.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 Qn}},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=e===v}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Mp.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(ia.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(Jl.prototype,{clearTarget:function(e,t,r,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,r,n)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(Jl.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?Nt:It}}}),Object.defineProperties(Hl.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(Lr.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(Tf.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new uf).load(e,function(e){t.setBuffer(e)}),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),Pf.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},la.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)};var $v={merge:function(e,t,r){var n;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),n=t.matrix,t=t.geometry),e.merge(t,n,r)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}};function eg(){console.error("THREE.CanvasRenderer has been removed")}function tg(){console.error("THREE.JSONLoader has been removed.")}exports.GeometryUtils=$v,Sr.crossOrigin=void 0,Sr.loadTexture=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new nd;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,r,void 0,n);return t&&(a.mapping=t),a},Sr.loadTextureCube=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new rd;i.setCrossOrigin(this.crossOrigin);var a=i.load(e,r,void 0,n);return t&&(a.mapping=t),a},Sr.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Sr.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var rg={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};function ng(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}exports.SceneUtils=rg,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:e}}));
},{}],"FbUc":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=n(require("react")),t=require("three");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function n(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=i?Object.getOwnPropertyDescriptor(e,r):null;s&&(s.get||s.set)?Object.defineProperty(n,r,s):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=function(o){function n(){var n;return(n=o.apply(this,arguments)||this).containerRef=(0,e.createRef)(),n.scatteringLevel=400,n.devicePosition=new t.Vector2,n.deviceRotation=new t.Vector2,n.gyroscopeFirstPosition=null,n.state={gyroscopeGranted:!1},n}i(n,o);var r=n.prototype;return r._hexStrToNum=function(e){return parseInt(e.substr(1),16)},r._loadFont=function(e){return new Promise(function(o){(new t.FontLoader).load(e,function(e){return o(e)})})},r._generateTextMesh=function(e,o,n){var i=new t.TextGeometry(e,{font:o,size:70,height:10,curveSegments:100,bevelEnabled:!1}),r=new t.MeshPhongMaterial({color:n,emissive:n,emissiveIntensity:.8}),s=new t.Mesh(i,r);return s.geometry.center(),s},r._generateCubeMesh=function(e){var o=new t.BoxBufferGeometry(20,20,20),n=new t.MeshLambertMaterial({color:e,emissive:e,emissiveIntensity:.2});return new t.Mesh(o,n)},r._randomPositionMesh=function(e,t,o){return e.position.x=Math.random()*o*t-o*t/2,e.position.y=Math.random()*o*t-o*t/2,e.position.z=Math.random()*o*t-o*t/2,e.rotation.x=1*Math.random()*Math.PI,e.rotation.y=1*Math.random()*Math.PI,e.rotation.z=1*Math.random()*Math.PI,e},r._handleMouseMove=function(e){if(this.containerRef.current){var t=this.containerRef.current,o=t.clientWidth/2,n=t.clientHeight/2,i=e.clientX-o,r=e.clientY-n;this.devicePosition.x=1-.2*i,this.devicePosition.y=1-.2*r,this.deviceRotation.x=.001*r,this.deviceRotation.y=.001*-i}},r._handleDeviceMove=function(e){var o=((e.alpha||0)+150)%360,n=((e.beta||0)+150)%360;null===this.gyroscopeFirstPosition&&(this.gyroscopeFirstPosition=new t.Vector2(o,n));var i=-(o-this.gyroscopeFirstPosition.x),r=-(n-this.gyroscopeFirstPosition.y);this.devicePosition.x=.5*i,this.devicePosition.y=.5*r,this.deviceRotation.x=.05*-r,this.deviceRotation.y=.05*-i},r._setGyroscopeEvent=function(){var e=this,t=window.DeviceOrientationEvent.requestPermission;"function"==typeof t&&t().then(function(t){return"granted"!==t?Promise.reject("DeviceOrientationEvent not granted"):(window.addEventListener("deviceorientation",e._handleDeviceMove.bind(e)),e.setState({gyroscopeGranted:!0}),Promise.resolve())}).catch(console.warn)},r._setEvents=function(e){this.props.useGyroscope&&window.DeviceOrientationEvent?this._setGyroscopeEvent():e.addEventListener("mousemove",this._handleMouseMove.bind(this))},r.componentDidMount=function(){try{var e=this,o=e.props;if(!e.containerRef.current)return Promise.resolve();var n=e.containerRef.current,i=new t.Scene,r=e._hexStrToNum(o.backgroundColor);i.fog=new t.FogExp2(r,.0025);var s=new t.PerspectiveCamera(75,n.clientWidth/n.clientHeight,.1,1e3),a=new t.WebGLRenderer({antialias:!0});return a.setClearColor(0),a.setSize(n.clientWidth,n.clientHeight),a.setSize(n.clientWidth,n.clientHeight),n.appendChild(a.domElement),Promise.resolve(e._loadFont(o.textFontUrl)).then(function(r){var c=e._hexStrToNum(o.textColor),u=e._generateTextMesh(o.text,r,c);i.add(u),s.position.x=u.position.x,s.position.y=u.position.y-200,s.position.z=o.cameraDistance;for(var d=e._hexStrToNum(o.cubesColor),p=0;p<o.particlesNumber;p++){var h=e._generateCubeMesh(d),v=e._randomPositionMesh(h,o.scattering,e.scatteringLevel);i.add(v)}var l=new t.PointLight(16777215,2);l.position.set(s.position.x,s.position.y,s.position.z).normalize(),i.add(l);!function t(){requestAnimationFrame(t),s.position.x=e.devicePosition.x,s.position.y=e.devicePosition.y,s.rotation.x=e.deviceRotation.x,s.rotation.y=e.deviceRotation.y,a.render(i,s)}(),e._setEvents(n)})}catch(c){return Promise.reject(c)}},r.render=function(){var t=this.props,o=this.state;return e.default.createElement("div",{ref:this.containerRef,className:"wrapper",style:{position:"relative",width:"100%",height:"100%"}},t.useGyroscope&&!o.gyroscopeGranted&&t.GyroscopeRequestComponent&&t.GyroscopeRequestComponent(this._setGyroscopeEvent.bind(this)))},n}(e.default.Component);r.defaultProps={textColor:"#dddddd",cameraDistance:400,cubesColor:"#dddddd",particlesNumber:50,scattering:1.5,backgroundColor:"#000000",useGyroscope:!1};var s=r;exports.default=s;
},{"react":"n8MK","three":"dKqR"}],"zo2T":[function(require,module,exports) {
"use strict";var e=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),require("react-app-polyfill/ie11");var i=e(require("react")),o=e(require("react-dom")),a=t(require("../."));function r(){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))}var n=function(e){return i.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)",padding:"20px",background:"white",borderRadius:"4px"}},i.createElement("a",{onClick:e,style:{color:"#0074d9"}},"Request permission"))},s=function(){return i.createElement(a.default,{text:"HELLO WORLD",textFontUrl:"/kubefont/font.json",useGyroscope:r(),GyroscopeRequestComponent:n})};o.render(i.createElement(s,null),document.getElementById("root"));
},{"react-app-polyfill/ie11":"lczo","react":"n8MK","react-dom":"wLSN","../.":"FbUc"}]},{},["zo2T"], null)
//# sourceMappingURL=example.8f2055a5.js.map