123456789101112 |
- !function(t){var e=this.webpackHotUpdate;this.webpackHotUpdate=function(t,n){!function(t,e){if(!_[t]||!x[t])return;for(var n in x[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(d[n]=e[n]);0==--v&&0===g&&E()}(t,n),e&&e(t,n)};var n,r=!0,i="056a09d0cd09012b888c",o=1e4,a={},s=[],c=[];function u(t){var e=T[t];if(!e)return A;var r=function(r){return e.hot.active?(T[r]?-1===T[r].parents.indexOf(t)&&T[r].parents.push(t):(s=[t],n=r),-1===e.children.indexOf(r)&&e.children.push(r)):(console.warn("[HMR] unexpected require("+r+") from disposed module "+t),s=[]),A(r)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return A[t]},set:function(e){A[t]=e}}};for(var o in A)Object.prototype.hasOwnProperty.call(A,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(r,o,i(o));return r.e=function(t){return"ready"===l&&f("prepare"),g++,A.e(t).then(e,function(t){throw e(),t});function e(){g--,"prepare"===l&&(y[t]||M(t),0===g&&0===v&&E())}},r.t=function(t,e){return 1&e&&(t=r(t)),A.t(t,-2&e)},r}var h=[],l="idle";function f(t){l=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,d,m,v=0,g=0,y={},x={},_={};function w(t){return+t+""===t?+t:t}function b(t){if("idle"!==l)throw new Error("check() is only allowed in idle status");return r=t,f("check"),function(t){return t=t||1e4,new Promise(function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,o=A.p+""+i+".hot-update.json";r.open("GET",o,!0),r.timeout=t,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+o+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(t){return void n(t)}e(t)}}})}(o).then(function(t){if(!t)return f("idle"),null;x={},y={},_=t.c,m=t.h,f("prepare");var e=new Promise(function(t,e){p={resolve:t,reject:e}});d={};return M(0),"prepare"===l&&0===g&&0===v&&E(),e})}function M(t){_[t]?(x[t]=!0,v++,function(t){importScripts(A.p+""+t+"."+i+".hot-update.js")}(t)):y[t]=!0}function E(){f("ready");var t=p;if(p=null,t)if(r)Promise.resolve().then(function(){return S(r)}).then(function(e){t.resolve(e)},function(e){t.reject(e)});else{var e=[];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&e.push(w(n));t.resolve(e)}}function S(e){if("ready"!==l)throw new Error("apply() is only allowed in ready status");var n,r,o,c,u;function h(t){for(var e=[t],n={},r=e.slice().map(function(t){return{chain:[t],id:t}});r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((c=T[o])&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(c.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<c.parents.length;s++){var u=c.parents[s],h=T[u];if(h){if(h.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([u]),moduleId:o,parentId:u};-1===e.indexOf(u)&&(h.hot._acceptedDependencies[o]?(n[u]||(n[u]=[]),p(n[u],[o])):(delete n[u],e.push(u),r.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}e=e||{};var v={},g=[],y={},x=function(){console.warn("[HMR] unexpected require("+M.moduleId+") to disposed module")};for(var b in d)if(Object.prototype.hasOwnProperty.call(d,b)){var M;u=w(b);var E=!1,S=!1,P=!1,L="";switch((M=d[b]?h(u):{type:"disposed",moduleId:b}).chain&&(L="\nUpdate propagation: "+M.chain.join(" -> ")),M.type){case"self-declined":e.onDeclined&&e.onDeclined(M),e.ignoreDeclined||(E=new Error("Aborted because of self decline: "+M.moduleId+L));break;case"declined":e.onDeclined&&e.onDeclined(M),e.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+M.moduleId+" in "+M.parentId+L));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(M),e.ignoreUnaccepted||(E=new Error("Aborted because "+u+" is not accepted"+L));break;case"accepted":e.onAccepted&&e.onAccepted(M),S=!0;break;case"disposed":e.onDisposed&&e.onDisposed(M),P=!0;break;default:throw new Error("Unexception type "+M.type)}if(E)return f("abort"),Promise.reject(E);if(S)for(u in y[u]=d[u],p(g,M.outdatedModules),M.outdatedDependencies)Object.prototype.hasOwnProperty.call(M.outdatedDependencies,u)&&(v[u]||(v[u]=[]),p(v[u],M.outdatedDependencies[u]));P&&(p(g,[M.moduleId]),y[u]=x)}var C,R=[];for(r=0;r<g.length;r++)u=g[r],T[u]&&T[u].hot._selfAccepted&&R.push({module:u,errorHandler:T[u].hot._selfAccepted});f("dispose"),Object.keys(_).forEach(function(t){!1===_[t]&&function(t){delete installedChunks[t]}(t)});for(var O,I,N=g.slice();N.length>0;)if(u=N.pop(),c=T[u]){var D={},F=c.hot._disposeHandlers;for(o=0;o<F.length;o++)(n=F[o])(D);for(a[u]=D,c.hot.active=!1,delete T[u],delete v[u],o=0;o<c.children.length;o++){var U=T[c.children[o]];U&&((C=U.parents.indexOf(u))>=0&&U.parents.splice(C,1))}}for(u in v)if(Object.prototype.hasOwnProperty.call(v,u)&&(c=T[u]))for(I=v[u],o=0;o<I.length;o++)O=I[o],(C=c.children.indexOf(O))>=0&&c.children.splice(C,1);for(u in f("apply"),i=m,y)Object.prototype.hasOwnProperty.call(y,u)&&(t[u]=y[u]);var B=null;for(u in v)if(Object.prototype.hasOwnProperty.call(v,u)&&(c=T[u])){I=v[u];var j=[];for(r=0;r<I.length;r++)if(O=I[r],n=c.hot._acceptedDependencies[O]){if(-1!==j.indexOf(n))continue;j.push(n)}for(r=0;r<j.length;r++){n=j[r];try{n(I)}catch(t){e.onErrored&&e.onErrored({type:"accept-errored",moduleId:u,dependencyId:I[r],error:t}),e.ignoreErrored||B||(B=t)}}}for(r=0;r<R.length;r++){var z=R[r];u=z.module,s=[u];try{A(u)}catch(t){if("function"==typeof z.errorHandler)try{z.errorHandler(t)}catch(n){e.onErrored&&e.onErrored({type:"self-accept-error-handler-errored",moduleId:u,error:n,originalError:t}),e.ignoreErrored||B||(B=n),B||(B=t)}else e.onErrored&&e.onErrored({type:"self-accept-errored",moduleId:u,error:t}),e.ignoreErrored||B||(B=t)}}return B?(f("fail"),Promise.reject(B)):(f("idle"),new Promise(function(t){t(g)}))}var T={};function A(e){if(T[e])return T[e].exports;var r=T[e]={i:e,l:!1,exports:{},hot:function(t){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(t,n){if(void 0===t)e._selfAccepted=!0;else if("function"==typeof t)e._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)e._acceptedDependencies[t[r]]=n||function(){};else e._acceptedDependencies[t]=n||function(){}},decline:function(t){if(void 0===t)e._selfDeclined=!0;else if("object"==typeof t)for(var n=0;n<t.length;n++)e._declinedDependencies[t[n]]=!0;else e._declinedDependencies[t]=!0},dispose:function(t){e._disposeHandlers.push(t)},addDisposeHandler:function(t){e._disposeHandlers.push(t)},removeDisposeHandler:function(t){var n=e._disposeHandlers.indexOf(t);n>=0&&e._disposeHandlers.splice(n,1)},check:b,apply:S,status:function(t){if(!t)return l;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[t]};return n=void 0,e}(e),parents:(c=s,s=[],c),children:[]};return t[e].call(r.exports,r,r.exports,u(e)),r.l=!0,r.exports}A.m=t,A.c=T,A.d=function(t,e,n){A.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},A.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},A.t=function(t,e){if(1&e&&(t=A(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(A.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)A.d(n,r,function(e){return t[e]}.bind(null,r));return n},A.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return A.d(e,"a",e),e},A.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},A.p="",A.h=function(){return i},u(134)(A.s=134)}([function(t,e,n){var r=n(2),i=n(19),o=n(11),a=n(12),s=n(20),c=function(t,e,n){var u,h,l,f,p=t&c.F,d=t&c.G,m=t&c.S,v=t&c.P,g=t&c.B,y=d?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,x=d?i:i[e]||(i[e]={}),_=x.prototype||(x.prototype={});for(u in d&&(n=e),n)l=((h=!p&&y&&void 0!==y[u])?y:n)[u],f=g&&h?s(l,r):v&&"function"==typeof l?s(Function.call,l):l,y&&a(y,u,l,t&c.U),x[u]!=l&&o(x,u,f),v&&_[u]!=l&&(_[u]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(50)("wks"),i=n(34),o=n(2).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){t.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(1),i=n(93),o=n(23),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(25),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(24);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7),i=n(33);t.exports=n(6)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(2),i=n(11),o=n(14),a=n(34)("src"),s=Function.toString,c=(""+s).split("toString");n(19).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var r=n(0),i=n(3),o=n(24),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(47),i=n(24);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(48),i=n(33),o=n(15),a=n(23),s=n(14),c=n(93),u=Object.getOwnPropertyDescriptor;e.f=n(6)?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(14),i=n(9),o=n(67)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(129),i=n(346),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:a,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(10);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(0),i=n(19),o=n(3);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(20),i=n(47),o=n(9),a=n(8),s=n(84);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,h=4==t,l=6==t,f=5==t||l,p=e||s;return function(e,s,d){for(var m,v,g=o(e),y=i(g),x=r(s,d,3),_=a(y.length),w=0,b=n?p(e,_):c?p(e,0):void 0;_>w;w++)if((f||w in y)&&(v=x(m=y[w],w,g),t))if(n)b[w]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:b.push(m)}else if(h)return!1;return l?-1:u||h?h:b}}},function(t,e,n){"use strict";if(n(6)){var r=n(31),i=n(2),o=n(3),a=n(0),s=n(61),c=n(90),u=n(20),h=n(40),l=n(33),f=n(11),p=n(42),d=n(25),m=n(8),v=n(119),g=n(36),y=n(23),x=n(14),_=n(49),w=n(4),b=n(9),M=n(81),E=n(37),S=n(17),T=n(38).f,A=n(83),P=n(34),L=n(5),C=n(27),R=n(51),O=n(58),I=n(86),N=n(45),D=n(55),F=n(39),U=n(85),B=n(109),j=n(7),z=n(16),G=j.f,H=z.f,k=i.RangeError,V=i.TypeError,W=i.Uint8Array,X=Array.prototype,q=c.ArrayBuffer,Z=c.DataView,Y=C(0),J=C(2),K=C(3),Q=C(4),$=C(5),tt=C(6),et=R(!0),nt=R(!1),rt=I.values,it=I.keys,ot=I.entries,at=X.lastIndexOf,st=X.reduce,ct=X.reduceRight,ut=X.join,ht=X.sort,lt=X.slice,ft=X.toString,pt=X.toLocaleString,dt=L("iterator"),mt=L("toStringTag"),vt=P("typed_constructor"),gt=P("def_constructor"),yt=s.CONSTR,xt=s.TYPED,_t=s.VIEW,wt=C(1,function(t,e){return Tt(O(t,t[gt]),e)}),bt=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Mt=!!W&&!!W.prototype.set&&o(function(){new W(1).set({})}),Et=function(t,e){var n=d(t);if(n<0||n%e)throw k("Wrong offset!");return n},St=function(t){if(w(t)&&xt in t)return t;throw V(t+" is not a typed array!")},Tt=function(t,e){if(!(w(t)&&vt in t))throw V("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Pt(O(t,t[gt]),e)},Pt=function(t,e){for(var n=0,r=e.length,i=Tt(t,r);r>n;)i[n]=e[n++];return i},Lt=function(t,e,n){G(t,e,{get:function(){return this._d[n]}})},Ct=function(t){var e,n,r,i,o,a,s=b(t),c=arguments.length,h=c>1?arguments[1]:void 0,l=void 0!==h,f=A(s);if(void 0!=f&&!M(f)){for(a=f.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(l&&c>2&&(h=u(h,arguments[2],2)),e=0,n=m(s.length),i=Tt(this,n);n>e;e++)i[e]=l?h(s[e],e):s[e];return i},Rt=function(){for(var t=0,e=arguments.length,n=Tt(this,e);e>t;)n[t]=arguments[t++];return n},Ot=!!W&&o(function(){pt.call(new W(1))}),It=function(){return pt.apply(Ot?lt.call(St(this)):St(this),arguments)},Nt={copyWithin:function(t,e){return B.call(St(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(St(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return U.apply(St(this),arguments)},filter:function(t){return At(this,J(St(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(St(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(St(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(St(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(St(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(St(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(St(this),arguments)},lastIndexOf:function(t){return at.apply(St(this),arguments)},map:function(t){return wt(St(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(St(this),arguments)},reduceRight:function(t){return ct.apply(St(this),arguments)},reverse:function(){for(var t,e=St(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this},some:function(t){return K(St(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ht.call(St(this),t)},subarray:function(t,e){var n=St(this),r=n.length,i=g(t,r);return new(O(n,n[gt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:g(e,r))-i))}},Dt=function(t,e){return At(this,lt.call(St(this),t,e))},Ft=function(t){St(this);var e=Et(arguments[1],1),n=this.length,r=b(t),i=m(r.length),o=0;if(i+e>n)throw k("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Ut={entries:function(){return ot.call(St(this))},keys:function(){return it.call(St(this))},values:function(){return rt.call(St(this))}},Bt=function(t,e){return w(t)&&t[xt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},jt=function(t,e){return Bt(t,e=y(e,!0))?l(2,t[e]):H(t,e)},zt=function(t,e,n){return!(Bt(t,e=y(e,!0))&&w(n)&&x(n,"value"))||x(n,"get")||x(n,"set")||n.configurable||x(n,"writable")&&!n.writable||x(n,"enumerable")&&!n.enumerable?G(t,e,n):(t[e]=n.value,t)};yt||(z.f=jt,j.f=zt),a(a.S+a.F*!yt,"Object",{getOwnPropertyDescriptor:jt,defineProperty:zt}),o(function(){ft.call({})})&&(ft=pt=function(){return ut.call(this)});var Gt=p({},Nt);p(Gt,Ut),f(Gt,dt,Ut.values),p(Gt,{slice:Dt,set:Ft,constructor:function(){},toString:ft,toLocaleString:It}),Lt(Gt,"buffer","b"),Lt(Gt,"byteOffset","o"),Lt(Gt,"byteLength","l"),Lt(Gt,"length","e"),G(Gt,mt,{get:function(){return this[xt]}}),t.exports=function(t,e,n,c){var u=t+((c=!!c)?"Clamped":"")+"Array",l="get"+t,p="set"+t,d=i[u],g=d||{},y=d&&S(d),x=!d||!s.ABV,b={},M=d&&d.prototype,A=function(t,n){G(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[l](n*e+r.o,bt)}(this,n)},set:function(t){return function(t,n,r){var i=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*e+i.o,r,bt)}(this,n,t)},enumerable:!0})};x?(d=n(function(t,n,r,i){h(t,d,u,"_d");var o,a,s,c,l=0,p=0;if(w(n)){if(!(n instanceof q||"ArrayBuffer"==(c=_(n))||"SharedArrayBuffer"==c))return xt in n?Pt(d,n):Ct.call(d,n);o=n,p=Et(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw k("Wrong length!");if((a=g-p)<0)throw k("Wrong length!")}else if((a=m(i)*e)+p>g)throw k("Wrong length!");s=a/e}else s=v(n),o=new q(a=s*e);for(f(t,"_d",{b:o,o:p,l:a,e:s,v:new Z(o)});l<s;)A(t,l++)}),M=d.prototype=E(Gt),f(M,"constructor",d)):o(function(){d(1)})&&o(function(){new d(-1)})&&D(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=n(function(t,n,r,i){var o;return h(t,d,u),w(n)?n instanceof q||"ArrayBuffer"==(o=_(n))||"SharedArrayBuffer"==o?void 0!==i?new g(n,Et(r,e),i):void 0!==r?new g(n,Et(r,e)):new g(n):xt in n?Pt(d,n):Ct.call(d,n):new g(v(n))}),Y(y!==Function.prototype?T(g).concat(T(y)):T(g),function(t){t in d||f(d,t,g[t])}),d.prototype=M,r||(M.constructor=d));var P=M[dt],L=!!P&&("values"==P.name||void 0==P.name),C=Ut.values;f(d,vt,!0),f(M,xt,u),f(M,_t,!0),f(M,gt,d),(c?new d(1)[mt]==u:mt in M)||G(M,mt,{get:function(){return u}}),b[u]=d,a(a.G+a.W+a.F*(d!=g),b),a(a.S,u,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*o(function(){g.of.call(d,1)}),u,{from:Ct,of:Rt}),"BYTES_PER_ELEMENT"in M||f(M,"BYTES_PER_ELEMENT",e),a(a.P,u,Nt),F(u),a(a.P+a.F*Mt,u,{set:Ft}),a(a.P+a.F*!L,u,Ut),r||M.toString==ft||(M.toString=ft),a(a.P+a.F*o(function(){new d(1).slice()}),u,{slice:Dt}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!o(function(){M.toLocaleString.call([1,2])})),u,{toLocaleString:It}),N[u]=L?P:C,r||L||f(M,dt,C)}}else t.exports=function(){}},function(t,e,n){var r=n(114),i=n(0),o=n(50)("metadata"),a=o.store||(o.store=new(n(117))),s=function(t,e,n){var i=a.get(t);if(!i){if(!n)return;a.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o};t.exports={store:a,map:s,has:function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){s(n,r,!0).set(t,e)},keys:function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,e,n){var r=n(34)("meta"),i=n(4),o=n(14),a=n(7).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(3)(function(){return c(Object.preventExtensions({}))}),h=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";h(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;h(t)}return t[r].w},onFreeze:function(t){return u&&l.NEED&&c(t)&&!o(t,r)&&h(t),t}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(5)("unscopables"),i=Array.prototype;void 0==i[r]&&n(11)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(95),i=n(68);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(25),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(1),i=n(96),o=n(68),a=n(67)("IE_PROTO"),s=function(){},c=function(){var t,e=n(65)("iframe"),r=o.length;for(e.style.display="none",n(69).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(95),i=n(68).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(2),i=n(7),o=n(6),a=n(5)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(20),i=n(107),o=n(81),a=n(1),s=n(8),c=n(83),u={},h={};(e=t.exports=function(t,e,n,l,f){var p,d,m,v,g=f?function(){return t}:c(t),y=r(n,l,e?2:1),x=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=s(t.length);p>x;x++)if((v=e?y(a(d=t[x])[0],d[1]):y(t[x]))===u||v===h)return v}else for(m=g.call(t);!(d=m.next()).done;)if((v=i(m,y,d.value,e))===u||v===h)return v}).BREAK=u,e.RETURN=h},function(t,e,n){var r=n(12);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(7).f,i=n(14),o=n(5)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(0),i=n(24),o=n(3),a=n(71),s="["+a+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),h=function(t,e,n){var i={},s=o(function(){return!!a[t]()||"
"!="
"[t]()}),c=i[t]=s?e(l):a[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},l=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=h},function(t,e){t.exports={}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){var r=n(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(21),i=n(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(19),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(31)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(15),i=n(8),o=n(36);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),h=o(a,u);if(t&&n!=n){for(;u>h;)if((s=c[h++])!=s)return!0}else for(;u>h;h++)if((t||h in c)&&c[h]===n)return t||h||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(21);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(4),i=n(21),o=n(5)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(1);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(11),i=n(12),o=n(3),a=n(24),s=n(5);t.exports=function(t,e,n){var c=s(t),u=n(a,c,""[t]),h=u[0],l=u[1];o(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,h),r(RegExp.prototype,c,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},function(t,e,n){var r=n(1),i=n(10),o=n(5)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(2).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(12),a=n(42),s=n(30),c=n(41),u=n(40),h=n(4),l=n(3),f=n(55),p=n(43),d=n(72);t.exports=function(t,e,n,m,v,g){var y=r[t],x=y,_=v?"set":"add",w=x&&x.prototype,b={},M=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!h(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!h(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!h(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof x&&(g||w.forEach&&!l(function(){(new x).entries().next()}))){var E=new x,S=E[_](g?{}:-0,1)!=E,T=l(function(){E.has(1)}),A=f(function(t){new x(t)}),P=!g&&l(function(){for(var t=new x,e=5;e--;)t[_](e,e);return!t.has(-0)});A||((x=e(function(e,n){u(e,x,t);var r=d(new y,e,x);return void 0!=n&&c(n,v,r[_],r),r})).prototype=w,w.constructor=x),(T||P)&&(M("delete"),M("has"),v&&M("get")),(P||S)&&M(_),g&&w.clear&&delete w.clear}else x=m.getConstructor(e,t,v,_),a(x.prototype,n),s.NEED=!0;return p(x,t),b[t]=x,i(i.G+i.W+i.F*(x!=y),b),g||m.setStrong(x,t,v),x}},function(t,e,n){for(var r,i=n(2),o=n(11),a=n(34),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),h=u,l=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[f[l++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):h=!1;t.exports={ABV:u,CONSTR:h,TYPED:s,VIEW:c}},function(t,e,n){"use strict";t.exports=n(31)||!n(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(2)[t]})},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(0),i=n(10),o=n(20),a=n(41);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,c=arguments[1];return i(this),(e=void 0!==c)&&i(c),void 0==t?new this:(n=[],e?(r=0,s=o(c,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){var r=n(4),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(2),i=n(19),o=n(31),a=n(94),s=n(7).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(50)("keys"),i=n(34);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(4),i=n(1),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(20)(Function.call,n(16).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(4),i=n(70).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(25),i=n(24);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(25),i=n(24);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(31),i=n(0),o=n(12),a=n(11),s=n(45),c=n(78),u=n(43),h=n(17),l=n(5)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,m,v,g){c(n,e,d);var y,x,_,w=function(t){if(!f&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},b=e+" Iterator",M="values"==m,E=!1,S=t.prototype,T=S[l]||S["@@iterator"]||m&&S[m],A=T||w(m),P=m?M?w("entries"):A:void 0,L="Array"==e&&S.entries||T;if(L&&(_=h(L.call(new t)))!==Object.prototype&&_.next&&(u(_,b,!0),r||"function"==typeof _[l]||a(_,l,p)),M&&T&&"values"!==T.name&&(E=!0,A=function(){return T.call(this)}),r&&!g||!f&&!E&&S[l]||a(S,l,A),s[e]=A,s[b]=p,m)if(y={values:M?A:w("values"),keys:v?A:w("keys"),entries:P},g)for(x in y)x in S||o(S,x,y[x]);else i(i.P+i.F*(f||E),e,y);return y}},function(t,e,n){"use strict";var r=n(37),i=n(33),o=n(43),a={};n(11)(a,n(5)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(54),i=n(24);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(5)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(45),i=n(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(7),i=n(33);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(49),i=n(5)("iterator"),o=n(45);t.exports=n(19).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(229);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(9),i=n(36),o=n(8);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(32),i=n(110),o=n(45),a=n(15);t.exports=n(77)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r,i,o,a=n(20),s=n(100),c=n(69),u=n(65),h=n(2),l=h.process,f=h.setImmediate,p=h.clearImmediate,d=h.MessageChannel,m=h.Dispatch,v=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},x=function(t){y.call(t.data)};f&&p||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},p=function(t){delete g[t]},"process"==n(21)(l)?r=function(t){l.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=x,r=a(o.postMessage,o,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(r=function(t){h.postMessage(t+"","*")},h.addEventListener("message",x,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,n){var r=n(2),i=n(87).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(21)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var h=s.resolve(void 0);n=function(){h.then(u)}}else n=function(){i.call(r,u)};else{var l=!0,f=document.createTextNode("");new o(u).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(10);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){"use strict";var r=n(2),i=n(6),o=n(31),a=n(61),s=n(11),c=n(42),u=n(3),h=n(40),l=n(25),f=n(8),p=n(119),d=n(38).f,m=n(7).f,v=n(85),g=n(43),y="prototype",x="Wrong index!",_=r.ArrayBuffer,w=r.DataView,b=r.Math,M=r.RangeError,E=r.Infinity,S=_,T=b.abs,A=b.pow,P=b.floor,L=b.log,C=b.LN2,R=i?"_b":"buffer",O=i?"_l":"byteLength",I=i?"_o":"byteOffset";function N(t,e,n){var r,i,o,a=new Array(n),s=8*n-e-1,c=(1<<s)-1,u=c>>1,h=23===e?A(2,-24)-A(2,-77):0,l=0,f=t<0||0===t&&1/t<0?1:0;for((t=T(t))!=t||t===E?(i=t!=t?1:0,r=c):(r=P(L(t)/C),t*(o=A(2,-r))<1&&(r--,o*=2),(t+=r+u>=1?h/o:h*A(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(t*o-1)*A(2,e),r+=u):(i=t*A(2,u-1)*A(2,e),r=0));e>=8;a[l++]=255&i,i/=256,e-=8);for(r=r<<e|i,s+=e;s>0;a[l++]=255&r,r/=256,s-=8);return a[--l]|=128*f,a}function D(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,a=o>>1,s=i-7,c=n-1,u=t[c--],h=127&u;for(u>>=7;s>0;h=256*h+t[c],c--,s-=8);for(r=h&(1<<-s)-1,h>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===h)h=1-a;else{if(h===o)return r?NaN:u?-E:E;r+=A(2,e),h-=a}return(u?-1:1)*r*A(2,h-e)}function F(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function U(t){return[255&t]}function B(t){return[255&t,t>>8&255]}function j(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function z(t){return N(t,52,8)}function G(t){return N(t,23,4)}function H(t,e,n){m(t[y],e,{get:function(){return this[n]}})}function k(t,e,n,r){var i=p(+n);if(i+e>t[O])throw M(x);var o=t[R]._b,a=i+t[I],s=o.slice(a,a+e);return r?s:s.reverse()}function V(t,e,n,r,i,o){var a=p(+n);if(a+e>t[O])throw M(x);for(var s=t[R]._b,c=a+t[I],u=r(+i),h=0;h<e;h++)s[c+h]=u[o?h:e-h-1]}if(a.ABV){if(!u(function(){_(1)})||!u(function(){new _(-1)})||u(function(){return new _,new _(1.5),new _(NaN),"ArrayBuffer"!=_.name})){for(var W,X=(_=function(t){return h(this,_),new S(p(t))})[y]=S[y],q=d(S),Z=0;q.length>Z;)(W=q[Z++])in _||s(_,W,S[W]);o||(X.constructor=_)}var Y=new w(new _(2)),J=w[y].setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||c(w[y],{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else _=function(t){h(this,_,"ArrayBuffer");var e=p(t);this._b=v.call(new Array(e),0),this[O]=e},w=function(t,e,n){h(this,w,"DataView"),h(t,_,"DataView");var r=t[O],i=l(e);if(i<0||i>r)throw M("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw M("Wrong length!");this[R]=t,this[I]=i,this[O]=n},i&&(H(_,"byteLength","_l"),H(w,"buffer","_b"),H(w,"byteLength","_l"),H(w,"byteOffset","_o")),c(w[y],{getInt8:function(t){return k(this,1,t)[0]<<24>>24},getUint8:function(t){return k(this,1,t)[0]},getInt16:function(t){var e=k(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=k(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return F(k(this,4,t,arguments[1]))},getUint32:function(t){return F(k(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return D(k(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return D(k(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){V(this,1,t,U,e)},setUint8:function(t,e){V(this,1,t,U,e)},setInt16:function(t,e){V(this,2,t,B,e,arguments[2])},setUint16:function(t,e){V(this,2,t,B,e,arguments[2])},setInt32:function(t,e){V(this,4,t,j,e,arguments[2])},setUint32:function(t,e){V(this,4,t,j,e,arguments[2])},setFloat32:function(t,e){V(this,4,t,G,e,arguments[2])},setFloat64:function(t,e){V(this,8,t,z,e,arguments[2])}});g(_,"ArrayBuffer"),g(w,"DataView"),s(w[y],a.VIEW,!0),e.ArrayBuffer=_,e.DataView=w},function(t,e,n){"use strict";(function(e){var r=n(18),i=n(348),o={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(130):void 0!==e&&(t=n(130)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){s.headers[t]={}}),r.forEach(["post","put","patch"],function(t){s.headers[t]=r.merge(o)}),t.exports=s}).call(this,n(128))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){t.exports=!n(6)&&!n(3)(function(){return 7!=Object.defineProperty(n(65)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){e.f=n(5)},function(t,e,n){var r=n(14),i=n(15),o=n(51)(!1),a=n(67)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(7),i=n(1),o=n(35);t.exports=n(6)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(15),i=n(38).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(35),i=n(52),o=n(48),a=n(9),s=n(47),c=Object.assign;t.exports=!c||n(3)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,h=i.f,l=o.f;c>u;)for(var f,p=s(arguments[u++]),d=h?r(p).concat(h(p)):r(p),m=d.length,v=0;m>v;)l.call(p,f=d[v++])&&(n[f]=p[f]);return n}:c},function(t,e,n){"use strict";var r=n(10),i=n(4),o=n(100),a=[].slice,s={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),c=function(){var r=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in s)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)}(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(c.prototype=e.prototype),c}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(2).parseInt,i=n(44).trim,o=n(71),a=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(2).parseFloat,i=n(44).trim;t.exports=1/r(n(71)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(21);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(74),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),c=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),u=r(t);return i<c?u*function(t){return t+1/o-1/o}(i/c/a)*c*a:(n=(e=(1+a/o)*i)-(e-i))>s||n!=n?u*(1/0):u*n}},function(t,e,n){var r=n(1);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(10),i=n(9),o=n(47),a=n(8);t.exports=function(t,e,n,s,c){r(e);var u=i(t),h=o(u),l=a(u.length),f=c?l-1:0,p=c?-1:1;if(n<2)for(;;){if(f in h){s=h[f],f+=p;break}if(f+=p,c?f<0:l<=f)throw TypeError("Reduce of empty array with no initial value")}for(;c?f>=0:l>f;f+=p)f in h&&(s=e(s,h[f],f,u));return s}},function(t,e,n){"use strict";var r=n(9),i=n(36),o=n(8);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),c=i(e,a),u=arguments.length>2?arguments[2]:void 0,h=Math.min((void 0===u?a:i(u,a))-c,a-s),l=1;for(c<s&&s<c+h&&(l=-1,c+=h-1,s+=h-1);h-- >0;)c in n?n[s]=n[c]:delete n[s],s+=l,c+=l;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(6)&&"g"!=/./g.flags&&n(7).f(RegExp.prototype,"flags",{configurable:!0,get:n(56)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(1),i=n(4),o=n(89);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(115),i=n(46);t.exports=n(60)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(7).f,i=n(37),o=n(42),a=n(20),s=n(40),c=n(41),u=n(77),h=n(110),l=n(39),f=n(6),p=n(30).fastKey,d=n(46),m=f?"_s":"size",v=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var h=t(function(t,r){s(t,h,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&c(r,n,t[u],t)});return o(h.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=d(this,e),r=v(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(d(this,e),t)}}),f&&r(h.prototype,"size",{get:function(){return d(this,e)[m]}}),h},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?h(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,h(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(115),i=n(46);t.exports=n(60)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(27)(0),o=n(12),a=n(30),s=n(98),c=n(118),u=n(4),h=n(3),l=n(46),f=a.getWeak,p=Object.isExtensible,d=c.ufstore,m={},v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(u(t)){var e=f(t);return!0===e?d(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},y=t.exports=n(60)("WeakMap",v,g,c,!0,!0);h(function(){return 7!=(new y).set((Object.freeze||Object)(m),7).get(m)})&&(s((r=c.getConstructor(v,"WeakMap")).prototype,g),a.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];o(e,t,function(e,i){if(u(e)&&!p(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(42),i=n(30).getWeak,o=n(1),a=n(4),s=n(40),c=n(41),u=n(27),h=n(14),l=n(46),f=u(5),p=u(6),d=0,m=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return f(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t(function(t,r){s(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=r&&c(r,n,t[o],t)});return r(u.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(l(this,e)).delete(t):n&&h(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(l(this,e)).has(t):n&&h(n,this._i)}}),u},def:function(t,e,n){var r=i(o(e),!0);return!0===r?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},function(t,e,n){var r=n(25),i=n(8);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(38),i=n(52),o=n(1),a=n(2).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";var r=n(53),i=n(4),o=n(8),a=n(20),s=n(5)("isConcatSpreadable");t.exports=function t(e,n,c,u,h,l,f,p){for(var d,m,v=h,g=0,y=!!f&&a(f,p,3);g<u;){if(g in c){if(d=y?y(c[g],g,n):c[g],m=!1,i(d)&&(m=void 0!==(m=d[s])?!!m:r(d)),m&&l>0)v=t(e,n,d,o(d.length),v,l-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=d}v++}g++}return v}},function(t,e,n){var r=n(8),i=n(73),o=n(24);t.exports=function(t,e,n,a){var s=String(o(t)),c=s.length,u=void 0===n?" ":String(n),h=r(e);if(h<=c||""==u)return s;var l=h-c,f=i.call(u,Math.ceil(l/u.length));return f.length>l&&(f=f.slice(0,l)),a?f+s:s+f}},function(t,e,n){var r=n(35),i=n(15),o=n(48).f;t.exports=function(t){return function(e){for(var n,a=i(e),s=r(a),c=s.length,u=0,h=[];c>u;)o.call(a,n=s[u++])&&h.push(t?[n,a[n]]:a[n]);return h}}},function(t,e,n){var r=n(49),i=n(125);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(41);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=Math.PI/180;function i(t){return t*r}function o(t,e,n){if(t===n||t===e)return t;var r=n-e;return((t-e)%r+r)%r+e}function a(t){return!l(t)&&("string"==typeof t||null!==t.constructor&&t.constructor===String)}var s=Object.prototype.hasOwnProperty;function c(t,e){return s.call(t,e)}function u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function h(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var r=0,i=n.length;r<i;r++)t.push(n[r])}return t.length}function l(t){return null==t}function f(t){return Array.isArray(t)&&t.length>0}function p(t,e){t.prototype=e?Object.create(e.prototype):{},t.prototype.constructor=t,t.__proto__=e}function d(t){return"number"==typeof t&&!isNaN(t)}function m(t){return"object"===(void 0===t?"undefined":n(t))&&!!t}function v(t){return!l(t)&&("function"==typeof t||null!==t.constructor&&t.constructor===Function)}var g={project:function(){},unproject:function(){},projectCoords:function(t){var e=this;if(!t)return[];if(!Array.isArray(t))return this.project(t);if(0===t.length)return[];if(!this.isSphere())return forEachCoord(t,this.project,this);if(Array.isArray(t[0]))return t.map(function(t){return e.projectCoords(t)});for(var n,r,i,o,a,s,c=this.getCircum(),u=this.getSphereExtent(),h=u.sx,l=u.sy,f=t[0],p=[this.project(f)],d=1,m=t.length;d<m;d++)o=(i=t[d]).x-f.x,a=i.y-f.y,s=this.project(i),Math.abs(o)>180&&(void 0===n&&(n=i.x<f.x),n&&(s._add(-c.x*sign(o)*h,0),i._add(-360*sign(o),0))),Math.abs(a)>90&&(void 0===r&&(r=i.y<f.y),r&&(s._add(0,-c.y*sign(a)*l),i._add(0,-180*sign(a)))),f=i,p.push(s);return p},unprojectCoords:function(t){return t?Array.isArray(t)?forEachCoord(t,this.unproject,this):this.unproject(t):[]},isSphere:function(){return!!this.sphere},isOutSphere:function(t){return!!this.isSphere()&&!this.getSphereExtent().contains(t)},wrapCoord:function(t){if(!this.isSphere())return t;var e=this.getSphereExtent(),n=new q(t);return e.contains(n)||(n.x=o(t.x,e.xmin,e.xmax),n.y=o(t.y,e.ymin,e.ymax)),n},getCircum:function(){if(!this.circum&&this.isSphere()){var t=this.getSphereExtent();this.circum={x:t.getWidth(),y:t.getHeight()}}return this.circum},getSphereExtent:function(){if(!this.extent&&this.isSphere()){var t=this.project(new q(180,90)),e=this.project(new q(-180,-90));this.extent=new at(e,t,this),this.extent.sx=t.x>e.x?1:-1,this.extent.sy=t.y>e.y?1:-1}return this.extent}},y={measureLength:function(t,e){if(!Array.isArray(t))return this.measureLenBetween(t,e);for(var n=0,r=0,i=t.length;r<i-1;r++)n+=this.measureLenBetween(t[r],t[r+1]);return n}},x=["Unknown","Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"];function _(t){return new Function("f","var p = (f && f.properties || {}); return "+function(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?w(t[1],t[2],"===",!1):"!="===e?w(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?w(t[1],t[2],e,!0):"any"===e?compileLogicalOp(t.slice(1),"||"):"all"===e?compileLogicalOp(t.slice(1),"&&"):"none"===e?compileNegation(compileLogicalOp(t.slice(1),"||")):"in"===e?compileInOp(t[1],t.slice(2)):"!in"===e?compileNegation(compileInOp(t[1],t.slice(2))):"has"===e?compileHasOp(t[1]):"!has"===e?compileNegation(compileHasOp(t[1])):"true")+")"}(t))}function w(t,e,n,r){var i=function(t){return"$"===t[0]?"f."+t.substring(1):"p["+JSON.stringify(t)+"]"}(t),o="$type"===t?x.indexOf(e):JSON.stringify(e);return(r?"typeof "+i+"=== typeof "+o+"&&":"")+i+n+o}var b=function(){function t(t){this.radius=t}var e=t.prototype;return e.measureLenBetween=function(t,e){if(!t||!e)return 0;var n=i(t.y),r=i(e.y),o=n-r,a=i(t.x)-i(e.x);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(a/2),2))),n*=this.radius,Math.round(1e5*n)/1e5},e.measureArea=function(t){var e,n=i(this.radius),r=0,o=t,a=o.length;if(a<3)return 0;for(e=0;e<a-1;e++){var s=o[e],c=o[e+1];r+=s.x*n*Math.cos(i(s.y))*c.y*n-c.x*n*Math.cos(i(c.y))*s.y*n}return a=o[e],o=o[0],r+=a.x*n*Math.cos(i(a.y))*o.y*n-o.x*n*Math.cos(i(o.y))*a.y*n,.5*Math.abs(r)},e.locate=function(t,e,n){return t=new q(t.x,t.y),this._locate(t,e,n)},e._locate=function(t,e,n){if(!t)return null;if(e||(e=0),n||(n=0),!e&&!n)return t;var r,a,s=i(t.y);if(0!==n){var c=Math.abs(n);a=o(180*(s+=2*Math.sin(c/(2*this.radius))*(n>0?1:-1))/Math.PI,-90,90)}else a=t.y;if(0!==e){var u=Math.abs(e),h=i(t.x);r=o(180*(h+=2*Math.sqrt(Math.pow(Math.sin(u/(2*this.radius)),2)/Math.pow(Math.cos(s),2))*(e>0?1:-1))/Math.PI,-180,180)}else r=t.x;return t.x=r,t.y=a,t},e.rotate=function(t,e,n){return t=new q(t),this._rotate(t,e,n)},e._rotate=function(t,e,n){var r=rhumbBearing(e,t)-n,i=this.measureLenBetween(e,t);return t.x=e.x,t.y=e.y,calculateRhumbDestination(t,i,r,this.radius)},t}(),M=u({measure:"EPSG:4326",sphere:new b(6378137),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},y),E=u({measure:"BAIDU",sphere:new b(6370996.81),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},y),S=u({},g,{code:"EPSG:3857",rad:Math.PI/180,metersPerDegree:6378137*Math.PI/180,maxLatitude:85.0511287798,project:function(t){var e,n=this.rad,r=this.metersPerDegree,i=this.maxLatitude,o=t.x,a=Math.max(Math.min(i,t.y),-i);return e=0===a?0:Math.log(Math.tan((90+a)*n/2))/n,new q(o*r,e*r)},unproject:function(t){var e,n=t.x,r=t.y,i=this.rad,a=this.metersPerDegree;return 0===r?e=0:(e=r/a,e=(2*Math.atan(Math.exp(e*i))-Math.PI/2)/i),new q(o(n/a,-180,180),o(e,-this.maxLatitude,this.maxLatitude))}},M),T=u({},g,{code:"EPSG:4326",project:function(t){return new q(t)},unproject:function(t){return new q(t)}},M),A=S,P=u({},T,{code:"EPSG:4490"}),L=u({},g,{code:"BAIDU",project:function(t){return this.convertLL2MC(t)},unproject:function(t){return this.convertMC2LL(t)}},E,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[75,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],LL2MC:[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],convertMC2LL:function(t){Math.abs(t.x);for(var e,n=Math.abs(t.y),r=0,i=this.MCBAND.length;r<i;r++)if(n>=this.MCBAND[r]){e=this.MC2LL[r];break}var o=this.convertor(t,e);return new q(o.x,o.y)},convertLL2MC:function(t){var e,n,r;t.x=this.getLoop(t.x,-180,180),t.y=this.getRange(t.y,-74,74);var i=new q(t.x,t.y);for(n=0,r=this.LLBAND.length;n<r;n++)if(i.y>=this.LLBAND[n]){e=this.LL2MC[n];break}if(!e)for(n=this.LLBAND.length-1;n>=0;n--)if(i.y<=-this.LLBAND[n]){e=this.LL2MC[n];break}var o=this.convertor(t,e);return new q(o.x,o.y)},convertor:function(t,e){if(!t||!e)return null;var n=e[0]+e[1]*Math.abs(t.x),r=Math.abs(t.y)/e[9],i=e[2]+e[3]*r+e[4]*r*r+e[5]*r*r*r+e[6]*r*r*r*r+e[7]*r*r*r*r*r+e[8]*r*r*r*r*r*r;return n*=t.x<0?-1:1,i*=t.y<0?-1:1,new q(n,i)},toRadians:function(t){return Math.PI*t/180},toDegrees:function(t){return 180*t/Math.PI},getRange:function(t,e,n){return null!=e&&(t=Math.max(t,e)),null!=n&&(t=Math.min(t,n)),t},getLoop:function(t,e,n){for(;t>n;)t-=n-e;for(;t<e;)t+=n-e;return t}}),C=u({},g,{code:"IDENTITY",project:function(t){return t.copy()},unproject:function(t){return t.copy()}},k),R=Object.freeze({EPSG3857:S,DEFAULT:A,EPSG4326:T,EPSG4490:P,BAIDU:L,IDENTITY:C,Common:g}),O=function(){function t(t){void 0===t&&(t={}),this.options=t,this._initSpatialRef()}t.getProjectionInstance=function(t){if(!t)return null;if(m(t))return t;for(var e in t=(t+"").toLowerCase(),R)if(c(R,e)){var n=R[e].code;if(n&&n.toLowerCase()===t)return R[e]}return null},t.equals=function(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.projection!==e.projection)return!1;var n=t.fullExtent,r=e.fullExtent;if(n&&r&&(n.top!==r.top||n.bottom!==r.bottom||n.left!==r.left||n.right!==r.right))return!1;var i=t.resolutions,o=e.resolutions;if(i&&o){if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(i[a]!==o[a])return!1}return!0};var e=t.prototype;return e._initSpatialRef=function(){var e=this.options.projection;if(!(e=e?t.getProjectionInstance(e):A))throw new Error("must provide a valid projection in map's spatial reference.");(e=u({},g,e)).measureLength||u(e,Measurer.DEFAULT),this._projection=e;var n,r=this.options.resolutions;if(!r&&(e.code&&(n=X[e.code])&&(r=n.resolutions),!r))throw new Error("must provide valid resolutions in map's spatial reference.");this._resolutions=r;var i=this.options.fullExtent;if(!i&&(e.code&&(n=X[e.code])&&(i=n.fullExtent),!i))throw new Error("must provide a valid fullExtent in map's spatial reference.");if(l(i.left)?(this._fullExtent=new at(i),i.left=i.xmin,i.right=i.xmax,i.top=i.ymax,i.bottom=i.ymin):this._fullExtent=new at(new q(i.left,i.top),new q(i.right,i.bottom)),l(i.top)||l(i.bottom)||l(i.left)||l(i.right))throw new Error("must provide valid top/bottom/left/right in fullExtent.");u(this._fullExtent,i),this._projection.fullExtent=i;var o=i.right>=i.left?1:-1,a=i.top>=i.bottom?-1:1;this._transformation=new st([o,a,0,0])},e.getResolutions=function(){return this._resolutions||[]},e.getResolution=function(t){var e=0|t;e<0?e=0:e>this._resolutions.length-1&&(e=this._resolutions.length-1);var n=this._resolutions[e];return function(t){return(0|t)===t}(t)||e===this._resolutions.length-1?n:n+(this._resolutions[e+1]-n)*(t-e)},e.getProjection=function(){return this._projection},e.getFullExtent=function(){return this._fullExtent},e.getTransformation=function(){return this._transformation},e.getMinZoom=function(){for(var t=0;t<this._resolutions.length;t++)if(!l(this._resolutions[t]))return t;return 0},e.getMaxZoom=function(){for(var t=this._resolutions.length-1;t>=0;t--)if(!l(this._resolutions[t]))return t;return this._resolutions.length-1},e.getZoomDirection=function(){return sign(this._resolutions[this.getMinZoom()]-this._resolutions[this.getMaxZoom()])},e.toJSON=function(){return this.json||(this.json={resolutions:this._resolutions,fullExtent:{top:this._fullExtent.top,left:this._fullExtent.left,bottom:this._fullExtent.bottom,right:this._fullExtent.right},projection:this._projection.code}),this.json},t}(),I=function(t){return function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.on=function(t,e,n){if(!t)return this;if(!a(t))return this._switch("on",t,e);if(!e)return this;this._eventMap||(this._eventMap={});var r,i,o=t.toLowerCase().split(" ");n||(n=this);for(var s=0,c=o.length;s<c;s++){r=o[s],(i=this._eventMap[r])||(i=[],this._eventMap[r]=i);var u=i.length;if(u>0)for(var h=0;h<u;h++)if(e===i[h].handler&&i[h].context===n)return this;i.push({handler:e,context:n})}return this},n.addEventListener=function(){return this.on.apply(this,arguments)},n.once=function(t,e,n){if(!a(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=this._wrapOnceHandler(i,t[i],n));return this._switch("on",r)}for(var o=t.split(" "),s=0,c=o.length;s<c;s++)this.on(o[s],this._wrapOnceHandler(o[s],e,n));return this},n.off=function(t,e,n){if(!this._eventMap||!t)return this;if(!a(t))return this._switch("off",t,e);if(!e)return this;var r,i,o,s=t.split(" ");n||(n=this);for(var c=0,u=s.length;c<u;c++){if(o="Z__"+(r=s[c].toLowerCase()),!(i=this._eventMap[r]))return this;for(var h=i.length-1;h>=0;h--){var l=i[h];e!==l.handler&&e!==l.handler[o]||l.context!==n||(delete l.handler[o],i.splice(h,1))}}return this},n.removeEventListener=function(){return this.off.apply(this,arguments)},n.listens=function(t,e,n){if(!this._eventMap||!a(t))return 0;var r=this._eventMap[t.toLowerCase()];if(!r||!r.length)return 0;for(var i=0,o=0,s=r.length;o<s;o++)if(e){if(e===r[o].handler&&(l(n)||r[o].context===n))return 1}else i++;return i},n.copyEventListeners=function(t){var e,n=t._eventMap;if(!n)return this;for(var r in n)for(var i=0,o=(e=n[r]).length;i<o;i++)this.on(r,e[i].handler,e[i].context);return this},n.fire=function(){return this._eventParent?this._eventParent.fire.apply(this._eventParent,arguments):this._fire.apply(this,arguments)},n._wrapOnceHandler=function(t,e,n){var r=this,i="Z__"+t,o=!1,a=function s(){o||(delete a[i],o=!0,n?e.apply(n,arguments):e.apply(this,arguments),r.off(t,s,this))};return a[i]=e,a},n._switch=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&this[t](r,e[r],n);return this},n._clearListeners=function(t){this._eventMap&&a(t)&&(this._eventMap[t.toLowerCase()]&&(this._eventMap[t]=null))},n._clearAllListeners=function(){this._eventMap=null},n._setEventParent=function(t){return this._eventParent=t,this},n._fire=function(t,e){if(!this._eventMap)return this;var n=this._eventMap[t.toLowerCase()];if(!n)return this;e||(e={}),e.type=t,e.target=this;for(var r,i,o=n.slice(0),a=0,s=o.length;a<s;a++)o[a]&&(r=o[a].context,!0,i=u({},e),!1===(r?o[a].handler.call(r,i):o[a].handler(i))&&e.domEvent&&stopPropagation(e.domEvent));return this},e}(t)},N=I(function(){function t(t){this.target=t}var e=t.prototype;return e.enable=function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},e.disable=function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},e.enabled=function(){return!!this._enabled},e.remove=function(){this.disable(),delete this.target,delete this.dom},t}());function D(t){return function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.addHandler=function(t,e){if(!e)return this;if(this._handlers||(this._handlers=[]),this[t])return this[t].enable(),this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},n.removeHandler=function(t){if(!t)return this;var e=this[t];if(e){var n=this._handlers.indexOf(e);n>=0&&this._handlers.splice(n,1),this[t].remove(),delete this[t]}return this},n._clearHandlers=function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].remove();this._handlers=[]},e}(t)}var F={},U=function(){function t(t){if(!this||!this.setOptions)throw new Error('Class instance is being created without "new" operator.');this.setOptions(t),this.callInitHooks()}var e=t.prototype;return e.callInitHooks=function(){var t=Object.getPrototypeOf(this);return this._visitInitHooks(t),this},e.setOptions=function(t){if(this.hasOwnProperty("options")||(this.options=this.options?Object.create(this.options):{}),!t)return this;for(var e in t)this.options[e]=t[e];return this},e.config=function(t){if(!t){var e={};for(var n in this.options)this.options.hasOwnProperty(n)&&(e[n]=this.options[n]);return e}if(2===arguments.length){var r={};r[t]=arguments[1],t=r}for(var i in t)this.options[i]=t[i],this[i]&&this[i]instanceof N&&(t[i]?this[i].enable():this[i].disable());return this.onConfig(t),this},e.onConfig=function(){},e._visitInitHooks=function(t){if(!this._initHooksCalled){var e=Object.getPrototypeOf(t);e._visitInitHooks&&e._visitInitHooks.call(this,e),this._initHooksCalled=!0;var n=t._initHooks;if(n&&n!==e._initHooks)for(var r=0;r<n.length;r++)n[r].call(this)}},t.addInitHook=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="function"==typeof t?t:function(){this[t].apply(this,n)},o=this.prototype,a=Object.getPrototypeOf(o);return o._initHooks&&o._initHooks!==a._initHooks||(o._initHooks=[]),o._initHooks.push(i),this},t.include=function(){for(var t=0;t<arguments.length;t++)u(this.prototype,t<0||arguments.length<=t?void 0:arguments[t]);return this},t.mergeOptions=function(t){var e=this.prototype,n=Object.getPrototypeOf(e);return e.options&&e.options!==n.options||(e.options=e.options?Object.create(e.options):{}),u(e.options,t),this},t}(),B=function(t){function e(e){var n,r=u({},e),i=r.symbol,o=r.properties,a=r.id;return delete r.symbol,delete r.id,delete r.properties,n=t.call(this,r)||this,i&&n.setSymbol(i),o&&n.setProperties(o),l(a)||n.setId(a),n}p(e,t);var n=e.prototype;return n.getFirstCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[0].getFirstCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[0]}while(Array.isArray(e)&&e.length>0);return e},n.getLastCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[t.length-1].getLastCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[e.length-1]}while(Array.isArray(e)&&e.length>0);return e},n.addTo=function(t,e){return t.addGeometry(this,e),this},n.getLayer=function(){return this._layer?this._layer:null},n.getMap=function(){return this._layer?this._layer.getMap():null},n.getId=function(){return this._id},n.setId=function(t){var e=this.getId();return this._id=t,this._fireEvent("idchange",{old:e,new:t}),this},n.getProperties=function(){return this.properties?this.properties:this._getParent()?this._getParent().getProperties():null},n.setProperties=function(t){var e=this.properties;return this.properties=m(t)?u({},t):t,this._repaint(),this._fireEvent("propertieschange",{old:e,new:t}),this},n.getType=function(){return this.type},n.getSymbol=function(){var t=this._symbol;return t?Array.isArray(t)?extendSymbol(t):u({},t):null},n.setSymbol=function(t){return this._symbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n.updateSymbol=function(t){if(!t)return this;var e=this._getSymbol();return e=e?extendSymbol(e,t):extendSymbol(this._getInternalSymbol(),t),this.setSymbol(e)},n.getCenter=function(){return this._computeCenter(this._getMeasurer())},n.getExtent=function(){var t=this._getPrjExtent();if(t){var e=this._getProjection(),n=e.unproject(new q(t.xmin,t.ymin)),r=e.unproject(new q(t.xmax,t.ymax));return new at(n,r,this._getProjection())}return this._computeExtent(this._getMeasurer())},n.getContainerExtent=function(){var t=this._getPainter();return t?t.getContainerExtent():null},n.getSize=function(){var t=this.getContainerExtent();return t?t.getSize():null},n.containsPoint=function(t,e){if(!this.getMap())throw new Error('The geometry is required to be added on a map to perform "containsPoint".');return t instanceof q&&(t=this.getMap().coordToContainerPoint(t)),this._containsPoint(t,e)},n._containsPoint=function(t,e){var n=this._getPainter();return!!n&&(l(e)&&this._hitTestTolerance&&(e=this._hitTestTolerance()),n.hitTest(t,e))},n.show=function(){if(this.options.visible=!0,this.getMap()){var t=this._getPainter();t&&t.show(),this._fireEvent("show")}return this},n.hide=function(){if(this.options.visible=!1,this.getMap()){this.onHide();var t=this._getPainter();t&&t.hide(),this._fireEvent("hide")}return this},n.isVisible=function(){if(!this.options.visible)return!1;var t=this._getInternalSymbol();if(!t)return!0;if(Array.isArray(t)){if(!t.length)return!0;for(var e=0,n=t.length;e<n;e++)if(l(t[e].opacity)||t[e].opacity>0)return!0;return!1}return l(t.opacity)||d(t.opacity)&&t.opacity>0},n.getZIndex=function(){return this.options.zIndex||0},n.setZIndex=function(t){var e=this.options.zIndex;return this.options.zIndex=t,this._fireEvent("zindexchange",{old:e,new:t}),this},n.setZIndexSilently=function(t){return this.options.zIndex=t,this},n.bringToFront=function(){var t=this.getLayer();if(!t||!t.getGeoMaxZIndex)return this;var e=t.getGeoMaxZIndex();return this.setZIndex(e+1),this},n.bringToBack=function(){var t=this.getLayer();if(!t||!t.getGeoMinZIndex)return this;var e=t.getGeoMinZIndex();return this.setZIndex(e-1),this},n.translate=function(t,e){if(l(t))return this;var n=new q(t,e);if(0===n.x&&0===n.y)return this;var r=this.getCoordinates();if(r)if(Array.isArray(r)){var i=forEachCoord(r,function(t){return t.add(n)});this.setCoordinates(i)}else this.setCoordinates(r.add(n));return this},n.flash=function(t,e,n,r){return flash.call(this,t,e,n,r)},n.copy=function(){var t=this.toJSON(),n=e.fromJSON(t);return n.options.visible=!0,n},n.remove=function(){return this.getLayer()?(this._fireEvent("removestart"),this._unbind(),this._fireEvent("removeend"),this._fireEvent("remove"),this):this},n.toGeoJSONGeometry=function(){return this._exportGeoJSONGeometry()},n.toGeoJSON=function(t){t||(t={});var e={type:"Feature",geometry:null};if(l(t.geometry)||t.geometry){var n=this._exportGeoJSONGeometry();e.geometry=n}var r,i=this.getId();return l(i)||(e.id=i),(l(t.properties)||t.properties)&&(r=this._exportProperties()),e.properties=r,e},n.toJSON=function(t){t||(t={});var e=this._toJSON(t);return u(e,this._exportGraphicOptions(t)),e},n.getLength=function(){return this._computeGeodesicLength(this._getMeasurer())},n.getArea=function(){return this._computeGeodesicArea(this._getMeasurer())},n.rotate=function(t,e){if("GeometryCollection"===this.type)return this.getGeometries().forEach(function(n){return n.rotate(t,e)}),this;e=e?new q(e):this.getCenter();var n=this._getMeasurer(),r=this.getCoordinates();if(!Array.isArray(r)){if(e.x!==r.x||e.y!==r.y){var i=n._rotate(r,e,t);this.setCoordinates(i)}return this}return forEachCoord(r,function(r){return n._rotate(r,e,t)}),this.setCoordinates(r),this},n._getConnectPoints=function(){return[this.getCenter()]},n._initOptions=function(t){var e=u({},t),n=e.symbol,r=e.properties,i=e.id;delete e.symbol,delete e.id,delete e.properties,this.setOptions(e),n&&this.setSymbol(n),r&&this.setProperties(r),l(i)||this.setId(i)},n._bindLayer=function(t){if(this.getLayer())throw new Error("Geometry cannot be added to two or more layers at the same time.");this._layer=t,this._clearCache(),this._clearProjection()},n._prepareSymbol=function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(convertResourceUrl(this._checkAndCopySymbol(t[n])));return e}return t?(t=this._checkAndCopySymbol(t),convertResourceUrl(t)):null},n._checkAndCopySymbol=function(t){var e={};for(var n in t)NUMERICAL_PROPERTIES[n]&&a(t[n])?e[n]=+t[n]:e[n]=t[n];return e},n._getSymbol=function(){return this._symbol},n._setExternSymbol=function(t){return this._externSymbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n._getInternalSymbol=function(){return this._symbol?this._symbol:this._externSymbol?this._externSymbol:this.options.symbol?this.options.symbol:null},n._getPrjExtent=function(){var t=this._getProjection();return this._verifyProjection(),!this._extent&&t&&(this._extent=this._computePrjExtent(t)),this._extent},n._unbind=function(){var t=this.getLayer();t&&(this._animPlayer&&this._animPlayer.finish(),this._clearHandlers(),this._unbindMenu(),this._unbindInfoWindow(),this.isEditing()&&this.endEdit(),this._removePainter(),this.onRemove&&this.onRemove(),t.onRemoveGeometry&&t.onRemoveGeometry(this),delete this._layer,delete this._internalId,delete this._extent)},n._getInternalId=function(){return this._internalId},n._setInternalId=function(t){this._internalId=t},n._getMeasurer=function(){return this._getProjection()?this._getProjection():O.getProjectionInstance(this.options.defaultProjection)},n._getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n._verifyProjection=function(){var t=this._getProjection();!this._projCode||t&&this._projCode===t.code||this._clearProjection(),this._projCode=t?t.code:null},n._getExternalResources=function(){var t=this._getInternalSymbol();return getExternalResources(t)},n._getPainter=function(){return!this._painter&&this.getMap()&&(-1!==GEOMETRY_COLLECTION_TYPES.indexOf(this.type)?this._painter=new CollectionPainter(this):this._painter=new Painter(this)),this._painter},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter},n._paint=function(t){this._painter&&this._painter.paint(t)},n._clearCache=function(){delete this._extent},n._clearProjection=function(){delete this._extent},n._repaint=function(){this._painter&&this._painter.repaint()},n.onHide=function(){this.closeMenu(),this.closeInfoWindow()},n.onShapeChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("shapechange")},n.onPositionChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("positionchange")},n.onSymbolChanged=function(){this._painter&&this._painter.refreshSymbol(),this._fireEvent("symbolchange")},n.onConfig=function(t){var e;t.properties&&(e=t.properties,delete t.properties);var n=!1;for(var r in t)if(t.hasOwnProperty(r)){var i=r.slice(0,5);if("arrow"===i||"smoot"===i){n=!0;break}}e?(this.setProperties(e),this._repaint()):n&&this._repaint()},n._setParent=function(t){t&&(this._parent=t)},n._getParent=function(){return this._parent},n._fireEvent=function(t,e){this.getLayer()&&this.getLayer()._onGeometryEvent&&(e||(e={}),e.type=t,e.target=this,this.getLayer()._onGeometryEvent(e)),this.fire(t,e)},n._toJSON=function(t){return{feature:this.toGeoJSON(t)}},n._exportGraphicOptions=function(t){var e={};return(l(t.options)||t.options)&&(e.options=this.config()),(l(t.symbol)||t.symbol)&&(e.symbol=this.getSymbol()),(l(t.infoWindow)||t.infoWindow)&&this._infoWinOptions&&(e.infoWindow=this._infoWinOptions),e},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=q.toNumberArrays(t);return{type:this.getType(),coordinates:e}},n._exportProperties=function(){var t=null,e=this.getProperties();return l(e)||(t=m(e)?u({},e):e),t},e}(function(t){return function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.registerJSONType=function(t){return t?(F[t]=this,this):this},e.getJSONClass=function(t){return t?F[t]:null},e.prototype.getJSONType=function(){if(void 0===this._jsonType){var t=Object.getPrototypeOf(this).constructor;for(var e in F)if(F[e]===t){this._jsonType=e;break}}if(!this._jsonType)throw new Error("Found an unregistered geometry class!");return this._jsonType},e}(t)}(I(D(U))));B.mergeOptions({id:null,visible:!0,editable:!0,cursor:null,defaultProjection:"EPSG:4326"});var j=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Point",e&&r.setCoordinates(e),r}p(e,t);var n=e.prototype;return n.getOutline=function(){var t=this._getPainter();if(!t)return null;var n=this.getCoordinates(),r=t.getContainerExtent(),i=this.getMap().coordToContainerPoint(n);return new e(n,{symbol:{markerType:"square",markerWidth:r.getWidth(),markerHeight:r.getHeight(),markerLineWidth:1,markerLineColor:"6b707b",markerFill:"rgba(0, 0, 0, 0)",markerDx:r.xmin-(i.x-r.getWidth()/2),markerDy:r.ymin-(i.y-r.getHeight()/2)}})},n._isVectorMarker=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&VectorMarkerSymbolizer.test(t)},n._canEdit=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&(VectorMarkerSymbolizer.test(t)||VectorPathMarkerSymbolizer.test(t)||ImageMarkerSymbolizer.test(t))},n._containsPoint=function(e,n){var r=this.getContainerExtent();return n&&(r=r.expand(n)),!!r.contains(e)&&(!this.options.hitTestForEvent||t.prototype._containsPoint.call(this,e,n))},n._computeExtent=function(){return computeExtent.call(this,"getCenter")},n._computePrjExtent=function(){return computeExtent.call(this,"_getPrjCoordinates")},n._computeGeodesicLength=function(){return 0},n._computeGeodesicArea=function(){return 0},n._getSprite=function(t,e){return this._getPainter()?this._getPainter().getSprite(t,e):new Painter(this).getSprite(t,e)},e}(function(t){return function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){var e=t instanceof q?t:new q(t);if(e.equals(this._coordinates))return this;if(this._coordinates=e,!this.getMap())return this.onPositionChanged(),this;var n=this._getProjection();return this._setPrjCoordinates(n.project(this._coordinates)),this},n._getCenter2DPoint=function(t){var e=this.getMap();if(!e)return null;var n=l(t)?e.getZoom():e.getGLZoom(),r=this._getPrjCoordinates();return r?e._prjToPoint(r,n):null},n._getPrjCoordinates=function(){var t=this._getProjection();return t?(this._verifyProjection(),this._pcenter||this._coordinates&&(this._pcenter=t.project(this._coordinates)),this._pcenter):null},n._setPrjCoordinates=function(t){this._pcenter=t,this.onPositionChanged()},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pcenter&&t&&(this._coordinates=t.unproject(this._pcenter))},n._clearProjection=function(){this._pcenter=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(){return this._coordinates?this._coordinates.copy():null},e}(t)}(B)),z=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.getOutline=function(){var t=this._getPainter();if(!t)return null;var e=this.getMap(),n=t.getContainerExtent().convertTo(function(t){return e.containerPointToCoord(t)});return new Z(n.toArray(),{symbol:{lineWidth:1,lineColor:"6b707b"}})},n.animateShow=function(t,e){var n=this;void 0===t&&(t={}),this._showPlayer&&this._showPlayer.finish(),v(t)&&(e=t={});var r=this.getCoordinates();if(0===r.length)return this;this._animIdx=0,this._animLenSoFar=0,this.show();var i=!!this.getShell?this.getShell().concat(this.getShell()[0]):this.getCoordinates(),o=this._getProjection();this._aniShowCenter=o.unproject(this._getPrjExtent().getCenter());var a=t.duration||1e3,s=this.getLength(),c=t.easing||"out";this.setCoordinates([]);var u=this._showPlayer=Animation.animate({t:a},{duration:a,easing:c},function(t){if(n.getMap()){var o=n._drawAnimShowFrame(t.styles.t,a,s,i);"finished"===t.state.playState&&(delete n._showPlayer,delete n._aniShowCenter,delete n._animIdx,delete n._animLenSoFar,delete n._animTailRatio,n.setCoordinates(r)),e&&e(t,o)}else if("finished"!==u.playState&&(u.finish(),e)){var c=n.getCoordinates();e(t,c[c.length-1])}});return u.play(),u},n._drawAnimShowFrame=function(t,e,n,r){if(0===t)return r[0];var i,o,a=this.getMap(),s=t/e*n,c=0;for(i=this._animIdx,o=r.length;i<o-1&&(c=a.computeLength(r[i],r[i+1]),!(this._animLenSoFar+c>s));i++)this._animLenSoFar+=c;if(this._animIdx=i,this._animIdx>=o-1)return this.setCoordinates(r),r[r.length-1];var u=this._animIdx,h=r[u],l=r[u+1],f=(s-this._animLenSoFar)/c;this._animTailRatio=f;var p=h.x+(l.x-h.x)*f,d=h.y+(l.y-h.y)*f,m=new q(p,d),v=!!this.getShell;if(!v&&this.options.smoothness>0){var g=r.slice(0,this._animIdx+3);this.setCoordinates(g)}else{var y=r.slice(0,this._animIdx+1);y.push(m),v?this.setCoordinates([this._aniShowCenter].concat(y)):this.setCoordinates(y)}return m},n._getCenterInExtent=function(t,e,n){var r=this.getExtent();if(!t.intersects(r))return null;var i=n(e,t);if(0===i.length)return null;var o=0,a=0,s=0;i.forEach(function(t){Array.isArray(t)?t.forEach(function(t){t.point&&(t=t.point),o+=t.x,a+=t.y,s++}):(t.point&&(t=t.point),o+=t.x,a+=t.y,s++)});var c=new q(o,a)._multi(1/s);return c.count=s,c},n._getPath2DPoints=function(t,e,n){if(!f(t))return[];var r=this.getMap(),i=!e&&this._shouldSimplify(),o=this.options.simplifyTolerance*r._getResolution(),a=Array.isArray(t[0]);if(delete this._simplified,i&&!a){var s=t.length;t=simplify(t,o,!1),this._simplified=t.length<s}return l(n)&&(n=r.getZoom()),forEachCoord(t,function(t){return r._prjToPoint(t,n)})},n._shouldSimplify=function(){var t=this.getLayer(),e=this.getProperties(),n=e&&t.options.enableAltitude&&!l(e[t.options.altitudeProperty]);return t&&t.options.enableSimplify&&!n&&this.options.enableSimplify&&!this._showPlayer},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._getPrjCoordinates=function(){return this._getProjection()?(this._verifyProjection(),this._prjCoords||(this._prjCoords=this._projectCoords(this._coordinates)),this._prjCoords):null},n._updateCache=function(){this._clearCache(),this._getProjection()&&this._prjCoords&&(this._coordinates=this._unprojectCoords(this._getPrjCoordinates()))},n._clearProjection=function(){this._prjCoords=null,t.prototype._clearProjection.call(this)},n._projectCoords=function(t){var e=this._getProjection();return e?e.projectCoords(t):[]},n._unprojectCoords=function(t){var e=this._getProjection();return e?e.unprojectCoords(t):[]},n._computeCenter=function(){var t=this._coordinates;if(!f(t))return null;for(var e=0,n=0,r=0,i=t.length,o=0;o<i;o++)t[o]&&d(t[o].x)&&d(t[o].y)&&(e+=t[o].x,n+=t[o].y,r++);return new q(e/r,n/r)},n._computeExtent=function(){var t=this._coordinates;if(!f(t))return null;var e=[t];return this.hasHoles&&this.hasHoles()&&e.push.apply(e,this.getHoles()),this._coords2Extent(e,this._getProjection())},n._computePrjExtent=function(){var t=[this._getPrjCoordinates()];return this.hasHoles&&this.hasHoles()&&t.push.apply(t,this._getPrjHoles()),this._coords2Extent(t)},n._get2DLength=function(){for(var t=this._getPath2DPoints(this._getPrjCoordinates(),!0),e=0,n=1,r=t.length;n<r;n++)e+=t[n].distanceTo(t[n-1]);return e},n._hitTestTolerance=function(){var t,e=this._getInternalSymbol();if(Array.isArray(e)){t=0;for(var n=0;n<e.length;n++)d(e[n].lineWidth)&&e[n].lineWidth>t&&(t=e[n].lineWidth)}else t=e.lineWidth;return d(t)?t/2:1.5},n._coords2Extent=function(t,e){for(var n=new at(e),r=0,i=t.length;r<i;r++)for(var o=0,a=t[r].length;o<a;o++)n._combine(t[r][o]);return n},e}(B);z.mergeOptions({smoothness:0,enableClip:!0,enableSimplify:!0,simplifyTolerance:2,symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:1,opacity:1}});var G=function(){function t(t,e){if(l(t)||l(e)?l(t.x)||l(t.y)?Array.isArray(t)&&(this.x=+t[0],this.y=+t[1]):(this.x=+t.x,this.y=+t.y):(this.x=+t,this.y=+e),this._isNaN())throw new Error("Position is NaN")}var e=t.prototype;return e.abs=function(){return new this.constructor(Math.abs(this.x),Math.abs(this.y))},e._abs=function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this},e._round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},e.round=function(){return new this.constructor(Math.round(this.x),Math.round(this.y))},e._ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},e.ceil=function(){return new this.constructor(Math.ceil(this.x),Math.ceil(this.y))},e._floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},e.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y))},e.copy=function(){return new this.constructor(this.x,this.y)},e._add=function(t,e){return l(t.x)?l(t[0])?(this.x+=t,this.y+=e):(this.x+=t[0],this.y+=t[1]):(this.x+=t.x,this.y+=t.y),this},e.add=function(t,e){var n,r;return l(t.x)?l(t[0])?(n=this.x+t,r=this.y+e):(n=this.x+t[0],r=this.y+t[1]):(n=this.x+t.x,r=this.y+t.y),new this.constructor(n,r)},e._sub=function(t,e){return l(t.x)?l(t[0])?(this.x-=t,this.y-=e):(this.x-=t[0],this.y-=t[1]):(this.x-=t.x,this.y-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(t,e){var n,r;return l(t.x)?l(t[0])?(n=this.x-t,r=this.y-e):(n=this.x-t[0],r=this.y-t[1]):(n=this.x-t.x,r=this.y-t.y),new this.constructor(n,r)},e.substract=function(){return this.sub.apply(this,arguments)},e.multi=function(t){return new this.constructor(this.x*t,this.y*t)},e._multi=function(t){return this.x*=t,this.y*=t,this},e.div=function(t){return this.multi(1/t)},e._div=function(t){return this._multi(1/t)},e.equals=function(t){return t instanceof this.constructor&&(this.x===t.x&&this.y===t.y)},e._isNaN=function(){return isNaN(this.x)||isNaN(this.y)},e.isZero=function(){return 0===this.x&&0===this.y},e.toArray=function(){return[this.x,this.y]},e.toFixed=function(t){return new this.constructor(this.x.toFixed(t),this.y.toFixed(t))},e.toJSON=function(){return{x:this.x,y:this.y}},t}(),H=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.closeTo=function(t,e){return e||(e=0),this.x>=t.x-e&&this.x<=t.x+e&&this.y>=t.y-e&&this.y<=t.y+e},n.distanceTo=function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},n.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.unit=function(){return this.copy()._unit()},n._unit=function(){return this._div(this.mag()),this},n.perp=function(){return this.copy()._perp()},n._perp=function(){var t=this.y;return this.y=this.x,this.x=-t,this},n.angleWith=function(t){return this.angleWithSep(t.x,t.y)},n.angleWithSep=function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},n._rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},n.rotate=function(t){return this.copy()._rotate(t)},e}(G),k=u({measure:"IDENTITY",measureLenBetween:function(t,e){if(!t||!e)return 0;try{return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}catch(t){return 0}},measureArea:function(t){if(!Array.isArray(t))return 0;for(var e=0,n=0,r=t.length;n<r;n++){var i=t[n],o=null;o=n===r-1?t[0]:t[n+1],e+=i.x*o.y-i.y*o.x}return Math.abs(e/2)},locate:function(t,e,n){return t=new q(t.x,t.y),this._locate(t,e,n)},_locate:function(t,e,n){return t?(e||(e=0),n||(n=0),e||n?(t.x=t.x+e,t.y=t.y+n,t):t):null},rotate:function(t,e,n){return t=new q(t.x,t.y),this._rotate(t,e,n)},_rotate:function(){var t=new H(0,0);return function(e,n,r){return t.x=e.x-n.x,t.y=e.y-n.y,t._rotate(r*Math.PI/180),e.x=n.x+t.x,e.y=n.y+t.y,e}}()},y);function V(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var W=0;var X={"EPSG:3857":{resolutions:function(){for(var t=[],e=12756274*Math.PI,n=0;n<21;n++)t[n]=e/(256*Math.pow(2,n));return t}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}},"EPSG:4326":{fullExtent:{top:90,left:-180,bottom:-90,right:180},resolutions:function(){for(var t=[],e=0;e<20;e++)t[e]=180/(128*Math.pow(2,e));return t}()},BAIDU:{resolutions:function(){for(var t=Math.pow(2,18),e=[],n=0;n<20;n++)e[n]=t,t*=.5;return e[0]=null,e[1]=null,e[2]=null,e}(),fullExtent:{top:33554432,left:-33554432,bottom:-33554432,right:33554432}},IDENTITY:{resolutions:function(){for(var t=Math.pow(2,8),e=[],n=0;n<18;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:2e5,left:-2e5,bottom:-2e5,right:2e5}}};X["EPSG:4490"]=X["EPSG:4326"];var q=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.toNumberArrays=function(t){return Array.isArray(t)?forEachCoord(t,function(t){return[t.x,t.y]}):[t.x,t.y]},e.toCoordinates=function(t){if(d(t[0])&&d(t[1]))return new e(t);for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];Array.isArray(o)?d(o[0])?n.push(new e(o)):n.push(e.toCoordinates(o)):n.push(new e(o))}return n},e}(G),Z=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Polygon",e&&r.setCoordinates(e),r}p(e,t);var n=e.prototype;return n.setCoordinates=function(t){if(!t)return this._coordinates=null,this._holes=null,this._projectRings(),this;var e=q.toCoordinates(t),n=e.length;if(Array.isArray(e[0])){if(this._coordinates=this._trimRing(e[0]),n>1){for(var r=[],i=1;i<n;i++)e[i]&&r.push(this._trimRing(e[i]));this._holes=r}}else this._coordinates=this._trimRing(e);return this._projectRings(),this},n.getCoordinates=function(){if(!this._coordinates)return[];for(var t=this.getHoles(),e=[this._copyAndCloseRing(this._coordinates)],n=0,r=t.length;n<r;n++)e.push(this._copyAndCloseRing(t[n]));return e},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getShell(),clipPolygon)},n.getShell=function(){return this._coordinates||[]},n.getHoles=function(){return this._holes||[]},n.hasHoles=function(){return this.getHoles().length>0},n._projectRings=function(){this.getMap()?(this._prjCoords=this._projectCoords(this._coordinates),this._prjHoles=this._projectCoords(this._holes),this.onShapeChanged()):this.onShapeChanged()},n._cleanRing=function(t){for(var e=t.length-1;e>=0;e--)t[e]||t.splice(e,1)},n._checkRing=function(t){if(this._cleanRing(t),!t||!f(t))return!1;var e=t[t.length-1],n=!0;return t[0].x===e.x&&t[0].y===e.y||(n=!1),n},n._trimRing=function(t){var e=this._checkRing(t);return f(t)&&e&&t.splice(t.length-1,1),t},n._copyAndCloseRing=function(t){t=t.slice(0);var e=this._checkRing(t);return f(t)&&!e?(t.push(t[0].copy()),t):t},n._getPrjShell=function(){return"Polygon"===this.getJSONType()?this._getPrjCoordinates():this._getProjection()?(this._verifyProjection(),this._prjShell||(this._prjShell=this._projectCoords(this.getShell())),this._prjShell):null},n._getPrjHoles=function(){return this._getProjection()?(this._verifyProjection(),this._prjHoles||(this._prjHoles=this._projectCoords(this.getHoles())),this._prjHoles):null},n._computeGeodesicLength=function(t){var e=this.getCoordinates();if(!f(e))return 0;for(var n=0,r=0,i=e.length;r<i;r++)n+=t.measureLength(e[r]);return n},n._computeGeodesicArea=function(t){var e=this.getCoordinates();if(!f(e))return 0;for(var n=t.measureArea(e[0]),r=1,i=e.length;r<i;r++)n-=t.measureArea(e[r]);return n},n._updateCache=function(){t.prototype._updateCache.call(this),this._prjHoles&&(this._holes=this._unprojectCoords(this._getPrjHoles()))},n._clearCache=function(){return delete this._prjShell,t.prototype._clearCache.call(this)},n._clearProjection=function(){this._prjHoles&&(this._prjHoles=null),this._prjShell&&(this._prjShell=null),t.prototype._clearProjection.call(this)},e}(z);Z.registerJSONType("Polygon");var Y=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="LineString",e&&r.setCoordinates(e),r}p(e,t);var n=e.prototype;return n.setCoordinates=function(t){return t?(this._coordinates=q.toCoordinates(t),this.getMap()?this._setPrjCoordinates(this._projectCoords(this._coordinates)):this.onShapeChanged(),this):(this._coordinates=null,this._setPrjCoordinates(null),this)},n.getCoordinates=function(){return this._coordinates||[]},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getCoordinates(),clipLine)},n._computeGeodesicLength=function(t){return t.measureLength(this.getCoordinates())},n._computeGeodesicArea=function(){return 0},e}(z);Y.mergeOptions({arrowStyle:null,arrowPlacement:"vertex-last"}),Y.registerJSONType("LineString");var J=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="GeometryCollection",r.setGeometries(e),r}p(e,t);var n=e.prototype;return n.setGeometries=function(t){for(var e=this._checkGeometries(t||[]),n=this._getSymbol(),r=this.config(),i=e.length-1;i>=0;i--)e[i]._initOptions(r),e[i]._setParent(this),e[i]._setEventParent(this),n&&e[i].setSymbol(n);return this._geometries=e,this.getLayer()&&(this._bindGeometriesToLayer(),this.onShapeChanged()),this},n.getGeometries=function(){return this._geometries||[]},n.forEach=function(t,e){for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r]&&(e?t.call(e,n[r],r):t(n[r],r));return this},n.filter=function(t,n){if(!t)return new e;var r=[],i=v(t),o=i?t:_(t);return this.forEach(function(t){var e=i?t:function(t){var e=t._toJSON(),n=e.feature;return n.type=x.indexOf(n.geometry.type),n.subType=e.subType,n}(t);(n?o.call(n,e):o(e))&&r.push(t)},this),new e(r)},n.translate=function(t){if(!t)return this;if(this.isEmpty())return this;var e=arguments;return this.forEach(function(t){t&&t.translate&&t.translate.apply(t,e)}),this},n.isEmpty=function(){return!f(this.getGeometries())},n.remove=function(){return this.forEach(function(t){t._unbind()}),B.prototype.remove.apply(this,arguments)},n.show=function(){return this.options.visible=!0,this.forEach(function(t){t.show()}),this},n.hide=function(){return this.options.visible=!1,this.forEach(function(t){t.hide()}),this},n.onConfig=function(t){this.forEach(function(e){e.config(t)})},n.getSymbol=function(){var e=t.prototype.getSymbol.call(this);if(!e){var n=[],r=!1;this.forEach(function(t){t.getSymbol()&&!r&&(r=!0),n.push(t.getSymbol())}),r&&(e={children:n})}return e},n.setSymbol=function(t){if(t&&t.children)this._symbol=null,this.forEach(function(e,n){e.setSymbol(t.children[n])});else{var e=this._prepareSymbol(t);this._symbol=e,this.forEach(function(t){t.setSymbol(e)})}return this.onSymbolChanged(),this},n._setExternSymbol=function(t){return t=this._prepareSymbol(t),this._externSymbol=t,this.forEach(function(e){e._setExternSymbol(t)}),this.onSymbolChanged(),this},n._bindLayer=function(){t.prototype._bindLayer.apply(this,arguments),this._bindGeometriesToLayer()},n._bindGeometriesToLayer=function(){var t=this.getLayer();this.forEach(function(e){e._bindLayer(t)})},n._checkGeometries=function(t){if(t&&!Array.isArray(t)){if(t instanceof B)return[t];throw new Error("The geometry added to collection is invalid.")}for(var e=0,n=t.length;e<n;e++)if(!this._checkGeo(t[e]))throw new Error("The geometry added to collection is invalid. Index: "+e);return t},n._checkGeo=function(t){return t instanceof B},n._updateCache=function(){this._clearCache(),this.isEmpty()||this.forEach(function(t){t&&t._updateCache&&t._updateCache()})},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter,this.forEach(function(t){t._removePainter()})},n._computeCenter=function(t){if(!t||this.isEmpty())return null;for(var e=0,n=0,r=0,i=this.getGeometries(),o=0,a=i.length;o<a;o++)if(i[o]){var s=i[o]._computeCenter(t);s&&(e+=s.x,n+=s.y,r++)}return 0===r?null:new q(e/r,n/r)},n._containsPoint=function(t,e){if(this.isEmpty())return!1;for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)if(n[r]._containsPoint(t,e))return!0;return!1},n._computeExtent=function(t){return computeExtent$1.call(this,t,"_computeExtent")},n._computePrjExtent=function(t){return computeExtent$1.call(this,t,"_computePrjExtent")},n._computeGeodesicLength=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicLength(t));return n},n._computeGeodesicArea=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicArea(t));return n},n._exportGeoJSONGeometry=function(){var t=[];if(!this.isEmpty())for(var e=this.getGeometries(),n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]._exportGeoJSONGeometry());return{type:"GeometryCollection",geometries:t}},n._clearProjection=function(){if(!this.isEmpty())for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e]&&t[e]._clearProjection()},n._getConnectPoints=function(){var t=this.getExtent();return[new q(t.xmin,t.ymax),new q(t.xmax,t.ymin),new q(t.xmin,t.ymin),new q(t.xmax,t.ymax)]},n._getExternalResources=function(){if(this.isEmpty())return[];for(var t,e,n,r=this.getGeometries(),i=[],o={},a=0,s=r.length;a<s;a++)if(r[a]){t=r[a]._getInternalSymbol();for(var c=0,u=(e=getExternalResources(t)).length;c<u;c++)o[n=e[c].join()]||(i.push(e[c]),o[n]=1)}return i},n.startEdit=function(t){var e=this;if(this.isEmpty())return this;t||(t={}),t.symbol&&(this._originalSymbol=this.getSymbol(),this.setSymbol(t.symbol)),this._draggbleBeforeEdit=this.options.draggable,this.config("draggable",!1);for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r].startEdit(t);return this._editing=!0,this.hide(),setTimeout(function(){e.fire("editstart")},1),this},n.endEdit=function(){if(this.isEmpty())return this;for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e].endEdit();return this._originalSymbol&&(this.setSymbol(this._originalSymbol),delete this._originalSymbol),this._editing=!1,this.show(),this.config("draggable",this._draggbleBeforeEdit),this.fire("editend"),this},n.isEditing=function(){return!!this._editing},e}(B);function K(t){if(a(t)&&(t=function(t){return t&&a(t)?JSON.parse(t):t}(t)),Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var i=it(t[n]);Array.isArray(i)?h(e,i):e.push(i)}return e}return GeoJSON._convert(t)}J.registerJSONType("GeometryCollection");var Q=function(t){function e(e,n,r,i){var o;return(o=t.call(this,null,i)||this).GeometryType=e,o.type=n,o._initData(r),o}p(e,t);var n=e.prototype;return n.getCoordinates=function(){for(var t=[],e=this.getGeometries(),n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.getShell&&"Polygon"!==i.getJSONType()?[i.getShell()]:i.getCoordinates())}return t},n.setCoordinates=function(t){for(var e=[],n=0,r=(t=t||[]).length;n<r;n++){var i=new this.GeometryType(t[n],this.config());e.push(i)}return this.setGeometries(e),this},n._initData=function(t){(t=t||[]).length&&(t[0]instanceof this.GeometryType?this.setGeometries(t):this.setCoordinates(t))},n._checkGeo=function(t){return t instanceof this.GeometryType},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=q.toNumberArrays(t);return{type:this.getType(),coordinates:e}},e}(J),$=function(t){function e(e,n){return t.call(this,j,"MultiPoint",e,n)||this}return p(e,t),e.prototype.findClosest=function(t){if(!t)return null;var e=null,n=1/0;return this.getCoordinates().forEach(function(r){var i=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}(r,t);i<n&&(e=r,n=i)}),e},e}(Q);$.registerJSONType("MultiPoint");var tt=function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.prototype.getCenterInExtent=function(t){var e=0,n=0,r=0;return this.getGeometries().forEach(function(i){var o=i.getCenterInExtent(t);o&&(e+=o.x*o.count,n+=o.y*o.count,r+=o.count)}),0===r?null:new q(e,n)._multi(1/r)},e}(Q),et=function(t){function e(e,n){return t.call(this,Y,"MultiLineString",e,n)||this}return p(e,t),e}(tt);et.registerJSONType("MultiLineString");var nt=function(t){function e(e,n){return t.call(this,Z,"MultiPolygon",e,n)||this}return p(e,t),e}(tt);nt.registerJSONType("MultiPolygon");var rt={Marker:j,LineString:Y,Polygon:Z,MultiPoint:$,MultiLineString:et,MultiPolygon:nt};function it(t){if(!t||l(t.type))return null;var e=t.type;if("Feature"===e){var n=it(t.geometry);return n?(n.setId(t.id),n.setProperties(t.properties),n):null}if("FeatureCollection"===e){var r=t.features;return r?K(r):null}if(["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].indexOf(e)>=0)return new rt["Point"===e?"Marker":e](t.coordinates);if("GeometryCollection"===e){var i=t.geometries;if(!f(i))return new J;for(var o=[],a=i.length,s=0;s<a;s++)o.push(it(i[s]));return new J(o)}return null}var ot="[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&!t.versions.electron&&!t.versions.nw&&!t.versions["node-webkit"],at=function(){function t(t,e,n,r){this._clazz=q;var i=arguments.length,o=i>0?arguments[i-1]:null;o&&o.unproject&&(this.projection=arguments[i-1]),this._dirty=!0,this._initialize(t,e,n,r)}var e=t.prototype;return e._initialize=function(t,e,n,r){if(this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,!l(t)){var i=this.projection;d(t)&&d(e)&&d(n)&&d(r)?i?(this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r):(this.xmin=Math.min(t,n),this.ymin=Math.min(e,r),this.xmax=Math.max(t,n),this.ymax=Math.max(e,r)):Array.isArray(t)?i?(this.xmin=t[0],this.ymin=t[1],this.xmax=t[2],this.ymax=t[3]):(this.xmin=Math.min(t[0],t[2]),this.ymin=Math.min(t[1],t[3]),this.xmax=Math.max(t[0],t[2]),this.ymax=Math.max(t[1],t[3])):d(t.x)&&d(e.x)&&d(t.y)&&d(e.y)?i?(this.xmin=t.x,this.ymin=t.y,this.xmax=e.x,this.ymax=e.y):(t.x>e.x?(this.xmin=e.x,this.xmax=t.x):(this.xmin=t.x,this.xmax=e.x),t.y>e.y?(this.ymin=e.y,this.ymax=t.y):(this.ymin=t.y,this.ymax=e.y)):d(t.xmin)&&d(t.xmax)&&d(t.ymin)&&d(t.ymax)&&(this.xmin=t.xmin,this.ymin=t.ymin,this.xmax=t.xmax,this.ymax=t.ymax)}},e._add=function(t){return this._dirty=!0,l(t.x)?l(t.xmin)?l(t[0])||(this.xmin+=t[0],this.ymin+=t[1],this.xmax+=t[0],this.ymax+=t[1]):(this.xmin+=t.xmin,this.ymin+=t.ymin,this.xmax+=t.xmax,this.ymax+=t.ymax):(this.xmin+=t.x,this.ymin+=t.y,this.xmax+=t.x,this.ymax+=t.y),this},e.add=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._add.apply(t,arguments)},e._sub=function(t){return this._dirty=!0,l(t.x)?l(t.xmin)?l(t[0])||(this.xmin-=t[0],this.ymin-=t[1],this.xmax-=t[0],this.ymax-=t[1]):(this.xmin-=t.xmin,this.ymin-=t.ymin,this.xmax-=t.xmax,this.ymax-=t.ymax):(this.xmin-=t.x,this.ymin-=t.y,this.xmax-=t.x,this.ymax-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._sub.apply(t,arguments)},e.substract=function(){return this.sub.apply(this,arguments)},e.round=function(){return new this.constructor(Math.round(this.xmin),Math.round(this.ymin),Math.round(this.xmax),Math.round(this.ymax),this.projection)},e._round=function(){return this._dirty=!0,this.xmin=Math.round(this.xmin),this.ymin=Math.round(this.ymin),this.xmax=Math.round(this.xmax),this.ymax=Math.round(this.ymax),this},e.getMin=function(){return new this._clazz(this.xmin,this.ymin)},e.getMax=function(){return new this._clazz(this.xmax,this.ymax)},e.getCenter=function(){return new this._clazz((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)},e.isValid=function(){return d(this.xmin)&&d(this.ymin)&&d(this.xmax)&&d(this.ymax)},e.equals=function(t){return this.xmin===t.xmin&&this.xmax===t.xmax&&this.ymin===t.ymin&&this.ymax===t.ymax},e.intersects=function(t){this._project(this),this._project(t);var e=Math.max(this.pxmin,t.pxmin),n=Math.max(this.pymin,t.pymin),r=Math.min(this.pxmax,t.pxmax),i=Math.min(this.pymax,t.pymax),o=!(e>r||n>i);return o},e.within=function(t){return this._project(this),this._project(t),this.pxmin>=t.pxmin&&this.pxmax<=t.pxmax&&this.pymin>=t.pymin&&this.pymax<=t.pymax},e.contains=function(t){if(!t)return!1;this._project(this);var e=this.projection;return Array.isArray(t)&&(t=new this._clazz(t)),e&&(t=e.project(t)),t.x>=this.pxmin&&t.x<=this.pxmax&&t.y>=this.pymin&&t.y<=this.pymax},e.getWidth=function(){return Math.abs(this.xmax-this.xmin)},e.getHeight=function(){return Math.abs(this.ymax-this.ymin)},e.getSize=function(){return new pt(this.getWidth(),this.getHeight())},e.__combine=function(t){t instanceof this.constructor||(t=new this.constructor(t,t)),this._project(t),this._project(this);var e=this.pxmin;d(e)?d(t.pxmin)&&e>t.pxmin&&(e=t.pxmin):e=t.pxmin;var n=this.pxmax;d(n)?d(t.pxmax)&&n<t.pxmax&&(n=t.pxmax):n=t.pxmax;var r=this.pymin;d(r)?d(t.pymin)&&r>t.pymin&&(r=t.pymin):r=t.pymin;var i=this.pymax;d(i)?d(t.pymax)&&i<t.pymax&&(i=t.pymax):i=t.pymax;var o=this.projection;if(o){var a=o.unproject(new this._clazz(e,r)),s=o.unproject(new this._clazz(n,i));e=a.x,r=a.y,n=s.x,i=s.y}return[e,r,n,i]},e._combine=function(t){if(!t)return this;var e=this.__combine(t);return this.xmin=e[0],this.ymin=e[1],this.xmax=e[2],this.ymax=e[3],this._dirty=!0,this},e.combine=function(t){if(!t)return this;var e=this.__combine(t);return new this.constructor(e[0],e[1],e[2],e[3],this.projection)},e.intersection=function(t){if(!this.intersects(t))return null;var e=new this._clazz(Math.max(this.pxmin,t.pxmin),Math.max(this.pymin,t.pymin)),n=new this._clazz(Math.min(this.pxmax,t.pxmax),Math.min(this.pymax,t.pymax)),r=this.projection;return r&&(e=r.unproject(e),n=r.unproject(n)),new this.constructor(e,n,r)},e.expand=function(t){var e,n;return d(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),new this.constructor(this.xmin-e,this.ymin-n,this.xmax+e,this.ymax+n,this.projection)},e._expand=function(t){var e,n;return d(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),this.xmin-=e,this.ymin-=n,this.xmax+=e,this.ymax+=n,this._dirty=!0,this},e.toJSON=function(){return{xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax}},e.toArray=function(){var t=this.xmin,e=this.ymin,n=this.xmax,r=this.ymax;return[new this._clazz([t,r]),new this._clazz([n,r]),new this._clazz([n,e]),new this._clazz([t,e]),new this._clazz([t,r])]},e.toString=function(){return this.xmin+","+this.ymin+","+this.xmax+","+this.ymax},e.copy=function(){return new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection)},e.convertTo=function(t){if(!this.isValid())return null;var e=new this.constructor,n=new this._clazz(this.xmin,this.ymax);return e._combine(t(n)),n.x=this.xmax,e._combine(t(n)),n.y=this.ymin,e._combine(t(n)),n.x=this.xmin,e._combine(t(n)),e},e._project=function(t){if(t&&t.isValid()){var e=this.projection;if(e){if(t._dirty){var n=[t.getMin(),t.getMax()],r=(n=e.projectCoords(n))[0],i=n[1];t.pxmin=Math.min(r.x,i.x),t.pymin=Math.min(r.y,i.y),t.pxmax=Math.max(r.x,i.x),t.pymax=Math.max(r.y,i.y)}delete t._dirty}else t.pxmin=t.xmin,t.pxmax=t.xmax,t.pymin=t.ymin,t.pymax=t.ymax}},t}(),st=function(){function t(t){this.matrix=t}var e=t.prototype;return e.transform=function(t,e){return new H(this.matrix[0]*(t.x-this.matrix[2])/e,this.matrix[1]*(t.y-this.matrix[3])/e)},e.untransform=function(t,e){return new q(t.x*e/this.matrix[0]+this.matrix[2],t.y*e/this.matrix[1]+this.matrix[3])},t}(),ct={},ut={maxVisualPitch:60,maxPitch:80,centerCross:!1,zoomInCenter:!1,zoomAnimation:!ot,zoomAnimationDuration:330,panAnimation:!ot,panAnimationDuration:600,zoomable:!0,enableInfoWindow:!0,hitDetect:!1,hitDetectLimit:5,fpsOnInteracting:25,layerCanvasLimitOnInteracting:-1,maxZoom:null,minZoom:null,maxExtent:null,checkSize:!0,renderer:"canvas"},ht=function(t){function e(e,n){var r;if(!n)throw new Error("Invalid options when creating map.");if(!n.center)throw new Error("Invalid center when creating map.");var i=u({},n),o=i.zoom;delete i.zoom;var a=new q(i.center);delete i.center;i.baseLayer;delete i.baseLayer;i.layers;return delete i.layers,r=t.call(this,i)||this,Object.defineProperty(V(V(r)),"id",{value:W++,writable:!1}),r._loaded=!1,r._panels={},r._baseLayer=null,r._layers=[],r._zoomLevel=o,r._center=a,r.setSpatialReference(i.spatialReference||i.view),r._mapViewPoint=new H(0,0),r}p(e,t),e.addOnLoadHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._onLoadHooks=this.prototype._onLoadHooks||[],this.prototype._onLoadHooks.push(n),this};var n=e.prototype;return n.isLoaded=function(){return!!this._loaded},n.getContainer=function(){return this._containerDOM},n.getSpatialReference=function(){return this._spatialReference},n.setSpatialReference=function(t){var e=this.options.spatialReference;if(this._loaded&&O.equals(e,t))return this;if(t=u({},t),this._center=this.getCenter(),this.options.spatialReference=t,this._spatialReference=new O(t),this.options.spatialReference&&v(this.options.spatialReference.projection)){var n=this._spatialReference.getProjection();this.options.spatialReference.projection=n.code}return this._resetMapStatus(),this._fireEvent("spatialreferencechange",{old:e,new:u({},this.options.spatialReference)}),this},n.onConfig=function(t){var e=t.spatialReference||t.view;return l(e)||this.setSpatialReference(e),this},n.getProjection=function(){return this._spatialReference?this._spatialReference.getProjection():null},n.getFullExtent=function(){return this._spatialReference?this._spatialReference.getFullExtent():null},n.setCursor=function(t){return delete this._cursor,this._trySetCursor(t),this._cursor=t,this},n.resetCursor=function(){return this.setCursor(null)},n.getCenter=function(){return this._loaded&&this._prjCenter?this.getProjection().unproject(this._prjCenter):this._center},n.setCenter=function(t){if(!t)return this;if(t=new q(t),!this._verifyExtent(t))return this;if(!this._loaded)return this._center=t,this;this.onMoveStart();var e=this.getProjection().project(t);return this._setPrjCenter(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this},n.getSize=function(){return l(this.width)||l(this.height)?this._getContainerDomSize():new pt(this.width,this.height)},n.getContainerExtent=function(){var t=this.height,e=this.getPitch(),n=this.options.maxVisualPitch;return n&&e>n&&(t=this._getVisualHeight(n)),new PointExtent(0,this.height-t,this.width,this.height)},n._getVisualHeight=function(t){var e=this.getPitch(),n=this.height/2*Math.tan(t*Math.PI/180);return this.height/2+n*Math.tan((90-e)*Math.PI/180)},n.getExtent=function(){return this._pointToExtent(this._get2DExtent())},n.getProjExtent=function(){var t=this._get2DExtent();return new at(this._pointToPrj(t.getMin()),this._pointToPrj(t.getMax()))},n.getPrjExtent=function(){return this.getProjExtent()},n.getMaxExtent=function(){return this.options.maxExtent?new at(this.options.maxExtent,this.getProjection()):null},n.setMaxExtent=function(t){if(t){var e=new at(t,this.getProjection());this.options.maxExtent=e;var n=this.getCenter();this._verifyExtent(n)||this.panTo(e.getCenter())}else delete this.options.maxExtent;return this},n.getZoom=function(){return this._zoomLevel},n.getZoomForScale=function(t,e,n){var r=this.getZoom();if(l(e)&&(e=r),1===t&&e===r)return r;var i=this._getResolution(e)/t,o=this.getZoomFromRes(i);if(n)return o;return this.getSpatialReference().getZoomDirection()<0?Math.ceil(o-1e-6):Math.floor(o+1e-6)},n.getZoomFromRes=function(t){var e=this._getResolutions(),n=this._getResolution(this.getMinZoom()),r=this._getResolution(this.getMaxZoom());if(n<=r){if(t<=n)return this.getMinZoom();if(t>=r)return this.getMaxZoom()}else{if(t>=n)return this.getMinZoom();if(t<=r)return this.getMaxZoom()}for(var i=e.length,o=0;o<i-1;o++)if(e[o]){var a=e[o+1]-e[o],s=t-e[o];if(sign(a)===sign(s)&&Math.abs(a)>=Math.abs(s))return o+s/a}return i-1},n.setZoom=function(t,e){return void 0===e&&(e={animation:!0}),isNaN(t)||l(t)?this:(this._loaded&&this.options.zoomAnimation&&e.animation?this._zoomAnimation(t):this._zoom(t),this)},n.getMaxZoom=function(){return l(this.options.maxZoom)?this.getMaxNativeZoom():this.options.maxZoom},n.setMaxZoom=function(t){var e=this.getMaxNativeZoom();return t>e&&(t=e),null!==t&&t<this._zoomLevel&&this.setZoom(t),this.options.maxZoom=t,this},n.getMinZoom=function(){return l(this.options.minZoom)?this._spatialReference.getMinZoom():this.options.minZoom},n.setMinZoom=function(t){if(null!==t){var e=this._spatialReference.getMinZoom();t<e&&(t=e),t>this._zoomLevel&&this.setZoom(t)}return this.options.minZoom=t,this},n.getMaxNativeZoom=function(){var t=this.getSpatialReference();return t?t.getMaxZoom():null},n.getGLZoom=function(){return this.getMaxNativeZoom()/2},n.getGLScale=function(t){return l(t)&&(t=this.getZoom()),this.getScale(t)/this.getScale(this.getGLZoom())},n.zoomIn=function(){return this.setZoom(this.getZoom()+1)},n.zoomOut=function(){return this.setZoom(this.getZoom()-1)},n.isZooming=function(){return!!this._zooming},n.isInteracting=function(){return this.isZooming()||this.isMoving()||this.isRotating()},n.setCenterAndZoom=function(t,e){return l(e)||this._zoomLevel===e?this.setCenter(t):(this.setCenter(t),this.setZoom(e,{animation:!1})),this},n.getFitZoom=function(t){var e=this;if(!(t&&t instanceof at))return this._zoomLevel;if(t.xmin===t.xmax&&t.ymin===t.ymax)return this.getMaxZoom();var n=this.getSize(),r=t.convertTo(function(t){return e.coordToContainerPoint(t)}),i=r.getWidth(),o=r.getHeight(),a=n.width/i,s=n.height/o,c=this.getSpatialReference().getZoomDirection()<0?Math.max(a,s):Math.min(a,s);return this.getZoomForScale(c)},n.getView=function(){return{center:this.getCenter().toArray(),zoom:this.getZoom(),pitch:this.getPitch(),bearing:this.getBearing()}},n.setView=function(t){return t?(t.center&&this.setCenter(t.center),t.zoom&&this.setZoom(t.zoom,{animation:!1}),t.pitch&&this.setPitch(t.pitch),t.bearing&&this.setBearing(t.bearing),this):this},n.getResolution=function(t){return this._getResolution(t)},n.getScale=function(t){var e=l(t)?this.getZoom():t,n=this._getResolution(this.getMaxNativeZoom());return this._getResolution(e)/n},n.fitExtent=function(t,e,n,r){if(void 0===n&&(n={}),!t)return this;t=new at(t,this.getProjection());var i=this.getFitZoom(t)+(e||0),o=t.getCenter();return void 0===n.animation||n.animation?this.animateTo({center:o,zoom:i},{duration:n.duration||this.options.zoomAnimationDuration,easing:n.easing||"out"},r):this.setCenterAndZoom(o,i)},n.getBaseLayer=function(){return this._baseLayer},n.setBaseLayer=function(t){var e=!1;if(this._baseLayer&&(e=!0,this._fireEvent("baselayerchangestart"),this._baseLayer.remove()),!t)return delete this._baseLayer,this._fireEvent("baselayerchangeend"),this._fireEvent("setbaselayer"),this;return this._baseLayer=t,t._bindMap(this,-1),this._baseLayer.on("layerload",function(){this._fireEvent("baselayerload"),e&&(e=!1,this._fireEvent("baselayerchangeend"))},this),this._loaded&&this._baseLayer.load(),this._fireEvent("setbaselayer"),this},n.removeBaseLayer=function(){return this._baseLayer&&(this._baseLayer.remove(),delete this._baseLayer,this._fireEvent("baselayerremove")),this},n.getLayers=function(t){return this._getLayers(function(e){return!(e===this._baseLayer||e.getId().indexOf(INTERNAL_LAYER_PREFIX)>=0)&&(!t||t(e))})},n.getLayer=function(t){if(!t)return null;var e=this._layerCache?this._layerCache[t]:null;if(e)return e;var n=this.getBaseLayer();return n&&n.getId()===t?n:null},n.addLayer=function(t){if(!t)return this;if(!Array.isArray(t))return t=Array.prototype.slice.call(arguments,0),this.addLayer(t);this._layerCache||(this._layerCache={});for(var e=this._layers,n=0,r=t.length;n<r;n++){var i=t[n],o=i.getId();if(l(o))throw new Error("Invalid id for the layer: "+o);if(i.getMap()!==this){if(this._layerCache[o])throw new Error("Duplicate layer id in the map: "+o);this._layerCache[o]=i,i._bindMap(this),e.push(i),this._loaded&&i.load()}}return this._sortLayersByZIndex(),this._fireEvent("addlayer",{layers:t}),this},n.removeLayer=function(t){if(!t)return this;if(!Array.isArray(t))return this.removeLayer([t]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(i instanceof Layer||(i=this.getLayer(i)),i){var o=i.getMap();if(o&&o===this){e.push(i),this._removeLayer(i,this._layers),this._loaded&&i._doRemove();var a=i.getId();this._layerCache&&delete this._layerCache[a]}}}return e.length>0&&this.once("frameend",function(){e.forEach(function(t){t.fire("remove")})}),this._fireEvent("removelayer",{layers:t}),this},n.sortLayers=function(t){if(!t||!Array.isArray(t))return this;for(var e=[],n=Number.MAX_VALUE,r=0,i=t.length;r<i;r++){var o=t[r];if(a(t[r])&&(o=this.getLayer(o)),!(o instanceof Layer&&o.getMap()&&o.getMap()===this))throw new Error("It must be a layer added to this map to order.");o.getZIndex()<n&&(n=o.getZIndex()),e.push(o)}for(var s=0,c=e.length;s<c;s++)e[s].setZIndex(n+s);return this},n.toDataURL=function(t){t||(t={});var e=t.mimeType;e||(e="image/png");var n=t.save,r=this._getRenderer();if(r&&r.toDataURL){var i=t.fileName;i||(i="export");var o=r.toDataURL(e);if(n&&o){var a;if("undefined"!=typeof Blob&&"undefined"!=typeof atob){var s=b64toBlob(o.replace(/^data:image\/(png|jpeg|jpg);base64,/,""),e);a=URL.createObjectURL(s)}else a=o;var c=document.createElement("a");c.download=i,c.href=a,document.body.appendChild(c),c.click(),document.body.removeChild(c)}return o}return null},n.coordinateToPoint=function(t,e){var n=this.getProjection().project(t);return this._prjToPoint(n,e)},n.coordToPoint=function(t,e){return this.coordinateToPoint(t,e)},n.pointToCoordinate=function(t,e){var n=this._pointToPrj(t,e);return this.getProjection().unproject(n)},n.pointToCoord=function(t,e){return this.pointToCoordinate(t,e)},n.coordinateToViewPoint=function(t){return this._prjToViewPoint(this.getProjection().project(t))},n.coordToViewPoint=function(t){return this.coordinateToViewPoint(t)},n.viewPointToCoordinate=function(t){return this.getProjection().unproject(this._viewPointToPrj(t))},n.viewPointToCoord=function(t){return this.viewPointToCoordinate(t)},n.coordinateToContainerPoint=function(t,e){var n=this.getProjection().project(t);return this._prjToContainerPoint(n,e)},n.coordToContainerPoint=function(t,e){return this.coordinateToContainerPoint(t,e)},n.containerPointToCoordinate=function(t){var e=this._containerPointToPrj(t);return this.getProjection().unproject(e)},n.containerPointToCoord=function(t){return this.containerPointToCoordinate(t)},n.containerPointToViewPoint=function(t){return t.sub(this.getViewPoint())},n.viewPointToContainerPoint=function(t){return t.add(this.getViewPoint())},n.containerToExtent=function(t){var e=new PointExtent(this._containerPointToPoint(t.getMin()),this._containerPointToPoint(t.getMax()));return this._pointToExtent(e)},n.checkSize=function(){var t=now()-this._initTime<1500&&0===this.width||0===this.height,e=this._getContainerDomSize(),n=this.height,r=this.width;if(e.width===r&&e.height===n)return this;var i=this.getCenter();this._updateMapSize(e);var o=new H((r-e.width)/2,(n-e.height)/2);this._offsetCenterByPixel(o),this._mapViewCoord=this._getPrjCenter();var a=0===e.width||0===e.height||0===r||0===n;return(t||a)&&(this._noEvent=!0,this.setCenter(i),delete this._noEvent),this._fireEvent("resize"),this},n.distanceToPixel=function(t,e,n){var r=this.getProjection();if(!r)return null;var i=this.getScale()/this.getScale(n),o=this.getCenter(),a=r.locate(o,t,e),s=this.coordToContainerPoint(o),c=this.coordToContainerPoint(a);return c._sub(s)._multi(i)._abs(),new pt(c.x,c.y)},n.distanceToPoint=function(t,e,n){var r=this.getProjection();if(!r)return null;var i=this.getCenter(),o=r.locate(i,t,e),a=this.coordToPoint(i,n),s=this.coordToPoint(o,n);return s._sub(a)._abs(),s},n.pixelToDistance=function(t,e){var n=this.getProjection();if(!n)return null;var r=this.getFullExtent(),i=r.top>r.bottom?-1:1,o=new H(this.width/2+t,this.height/2+i*e),a=this.containerPointToCoord(o);return n.measureLength(this.getCenter(),a)},n.pointToDistance=function(t,e,n){var r=this.getProjection();if(!r)return null;var i=this._prjToPoint(this._getPrjCenter(),n);i._add(t,e);var o=this.pointToCoord(i,n);return r.measureLength(this.getCenter(),o)},n.locate=function(t,e,n){return this.getProjection()._locate(new q(t),e,n)},n.locateByPoint=function(t,e,n){var r=this.coordToContainerPoint(t);return this.containerPointToCoord(r._add(e,n))},n.getMainPanel=function(){return this._getRenderer().getMainPanel()},n.getPanels=function(){return this._panels},n.remove=function(){if(this.isRemoved())return this;this._fireEvent("removestart"),this._removeDomEvents(),this._clearHandlers(),this.removeBaseLayer();for(var t=this.getLayers(),e=0;e<t.length;e++)t[e].remove();return this._getRenderer()&&this._getRenderer().remove(),this._containerDOM.innerHTML&&(this._containerDOM.innerHTML=""),delete this._panels,delete this._containerDOM,delete this.renderer,this._fireEvent("removeend"),this._clearAllListeners(),this},n.isRemoved=function(){return!this._containerDOM},n.isMoving=function(){return!!this._moving},n.onMoveStart=function(t){this._originCenter=this.getCenter(),this._moving=!0,this._trySetCursor("move"),this._fireEvent("movestart",this._parseEvent(t?t.domEvent:null,"movestart"))},n.onMoving=function(t){this._fireEvent("moving",this._parseEvent(t?t.domEvent:null,"moving"))},n.onMoveEnd=function(t){if(this._moving=!1,this._trySetCursor("default"),this._fireEvent("moveend",t&&t.domEvent?this._parseEvent(t.domEvent,"moveend"):t),!this._verifyExtent(this.getCenter())){var e=this._originCenter;this._verifyExtent(e)||(e=this.getMaxExtent().getCenter()),this.panTo(e)}},n.onDragRotateStart=function(t){this._dragRotating=!0,this._fireEvent("dragrotatestart",this._parseEvent(t?t.domEvent:null,"dragrotatestart"))},n.onDragRotating=function(t){this._fireEvent("dragrotating",this._parseEvent(t?t.domEvent:null,"dragrotating"))},n.onDragRotateEnd=function(t){this._dragRotating=!1,this._fireEvent("dragrotateend",this._parseEvent(t?t.domEvent:null,"dragrotateend"))},n.isDragRotating=function(){return!!this._dragRotating},n.getRenderer=function(){return this._getRenderer()},n._initContainer=function(t){if(a(t)){if(this._containerDOM=document.getElementById(t),!this._containerDOM)throw new Error("Invalid container when creating map: '"+t+"'")}else this._containerDOM=t,ot&&(this.CanvasClass=this._containerDOM.constructor);if(this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&"maptalks-wrapper"===this._containerDOM.childNodes[0].className)throw new Error("Container is already loaded with another map instance, use map.remove() to clear it.")},n._trySetCursor=function(t){return this._cursor||this._priorityCursor||(t||(t="default"),this._setCursorToPanel(t)),this},n._setPriorityCursor=function(t){if(t)this._priorityCursor=t,this._setCursorToPanel(t);else{var e=!1;this._priorityCursor&&(e=!0),delete this._priorityCursor,e&&this.setCursor(this._cursor)}return this},n._setCursorToPanel=function(t){var e=this.getMainPanel();e&&e.style&&e.style.cursor!==t&&(e.style.cursor=t)},n._get2DExtent=function(t){var e=this;return this.getContainerExtent().convertTo(function(n){return e._containerPointToPoint(n,t)})},n._pointToExtent=function(t){var e=t.getMin(),n=t.getMax(),r=this.getFullExtent(),i=!r||r.left<=r.right?[e.x,n.x]:[n.x,e.x],o=i[0],a=i[1],s=!r||r.top>r.bottom?[n.y,e.y]:[e.y,n.y],c=s[1],u=new q(o,s[0]),h=new q(a,c);return new at(this.pointToCoord(u),this.pointToCoord(h),this.getProjection())},n._removeLayer=function(t,e){if(t&&e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},n._sortLayersByZIndex=function(){if(this._layers){for(var t=0,e=this._layers.length;t<e;t++)this._layers[t]._order=t;this._layers.sort(function(t,e){var n=t.getZIndex()-e.getZIndex();return 0===n?t._order-e._order:n})}},n._fireEvent=function(t,e){this._noEvent||(this.fire("_"+t,e),this.fire(t,e))},n._Load=function(){this._resetMapStatus(),this.options.pitch&&(this.setPitch(this.options.pitch),delete this.options.pitch),this.options.bearing&&(this.setBearing(this.options.bearing),delete this.options.bearing),this._loadAllLayers(),this._getRenderer().onLoad(),this._loaded=!0,this._callOnLoadHooks(),this._initTime=now()},n._initRenderer=function(){var t=this.options.renderer,n=e.getRendererClass(t);this._renderer=new n(this),this._renderer.load()},n._getRenderer=function(){return this._renderer},n._loadAllLayers=function(){this._baseLayer&&this._baseLayer.load(),this._eachLayer(function(t){t&&t.load()},this.getLayers())},n._getLayers=function(t){for(var e=this._baseLayer?[this._baseLayer].concat(this._layers):this._layers,n=[],r=0;r<e.length;r++)t&&!t.call(this,e[r])||n.push(e[r]);return n},n._eachLayer=function(t){if(!(arguments.length<2)){var e=Array.prototype.slice.call(arguments,1);e&&!Array.isArray(e)&&(e=[e]);for(var n=[],r=0,i=e.length;r<i;r++)n=n.concat(e[r]);for(var o=0,a=n.length;o<a;o++)t.call(t,n[o])}},n._onLayerEvent=function(t){t&&"idchange"===t.type&&(delete this._layerCache[t.old],this._layerCache[t.new]=t.target)},n._resetMapStatus=function(){var t=this.getMaxZoom(),e=this.getMinZoom(),n=this._spatialReference.getMaxZoom(),r=this._spatialReference.getMinZoom();(l(t)||-1===t||t>n)&&this.setMaxZoom(n),(l(e)||-1===e||e<r)&&this.setMinZoom(r),(t=this.getMaxZoom())<(e=this.getMinZoom())&&this.setMaxZoom(e),(l(this._zoomLevel)||this._zoomLevel>t)&&(this._zoomLevel=t),this._zoomLevel<e&&(this._zoomLevel=e),delete this._prjCenter;var i=this.getProjection();this._prjCenter=i.project(this._center)},n._getContainerDomSize=function(){if(!this._containerDOM)return null;var t,e,n=this._containerDOM;if(l(n.width)||l(n.height)){if(l(n.clientWidth)||l(n.clientHeight))throw new Error("can not get size of container");t=parseInt(n.clientWidth,0),e=parseInt(n.clientHeight,0)}else t=n.width,e=n.height,ct.retina&&n.layer&&(t/=2,e/=2);return new pt(t,e)},n._updateMapSize=function(t){return this.width=t.width,this.height=t.height,this._getRenderer().updateMapSize(t),this._calcMatrices(),this},n._getPrjCenter=function(){return this._prjCenter},n._setPrjCenter=function(t){this._prjCenter=t,this.isInteracting()&&!this.isMoving()&&(this._mapViewCoord=t),this._calcMatrices()},n._setPrjCoordAtContainerPoint=function(t,e){if(e.x===this.width/2&&e.y===this.height/2)return this;var n=this._containerPointToPoint(e)._sub(this._prjToPoint(this._getPrjCenter())),r=this._pointToPrj(this._prjToPoint(t).sub(n));return this._setPrjCenter(r),this},n._verifyExtent=function(t){if(!t)return!1;var e=this.getMaxExtent();return!e||e.contains(t)},n._offsetCenterByPixel=function(t){var e=new H(this.width/2-t.x,this.height/2-t.y),n=this._containerPointToPrj(e);return this._setPrjCenter(n),n},n.offsetPlatform=function(t){return t?(this._getRenderer().offsetPlatform(t),this._mapViewCoord=this._getPrjCenter(),this._mapViewPoint=this._mapViewPoint.add(t),this):this._mapViewPoint},n.getViewPoint=function(){var t=this._getViewPointFrameOffset(),e=this.offsetPlatform();return t&&(e=e.add(t)),e},n._getViewPointFrameOffset=function(){if(this.isZooming())return null;var t=this._getPrjCenter();return this._mapViewCoord&&!this._mapViewCoord.equals(t)?this._prjToContainerPoint(this._mapViewCoord).sub(this._prjToContainerPoint(t)):null},n._resetMapViewPoint=function(){this._mapViewPoint=new H(0,0),this._mapViewCoord=this._getPrjCenter()},n._getResolution=function(t){return l(t)&&(t=this.getZoom()),this._spatialReference.getResolution(t)},n._getResolutions=function(){return this._spatialReference.getResolutions()},n._prjToPoint=function(t,e){return e=l(e)?this.getZoom():e,this._spatialReference.getTransformation().transform(t,this._getResolution(e))},n._pointToPrj=function(t,e){return e=l(e)?this.getZoom():e,this._spatialReference.getTransformation().untransform(t,this._getResolution(e))},n._pointToPoint=function(t,e){return l(e)?t.copy():t.multi(this._getResolution(e)/this._getResolution())},n._pointToPointAtZoom=function(t,e){return l(e)?t.copy():t.multi(this._getResolution()/this._getResolution(e))},n._containerPointToPrj=function(t){return this._pointToPrj(this._containerPointToPoint(t))},n._viewPointToPrj=function(t){return this._containerPointToPrj(this.viewPointToContainerPoint(t))},n._prjToContainerPoint=function(t,e){return this._pointToContainerPoint(this._prjToPoint(t,e),e)},n._prjToViewPoint=function(t){var e=this._prjToContainerPoint(t);return this._containerPointToViewPoint(e)},n._containerPointToViewPoint=function(t){return t?t._sub(this.getViewPoint()):null},n._viewPointToPoint=function(t,e){return this._containerPointToPoint(this.viewPointToContainerPoint(t),e)},n._pointToViewPoint=function(t,e){return this._prjToViewPoint(this._pointToPrj(t,e))},n._callOnLoadHooks=function(){var t=e.prototype;if(t._onLoadHooks)for(var n=0,r=t._onLoadHooks.length;n<r;n++)t._onLoadHooks[n].call(this)},e}(D(I(function(t){return function(t){function e(){return t.apply(this,arguments)||this}return p(e,t),e.registerRenderer=function(t,e){var n=this.prototype,r=Object.getPrototypeOf(n);return n._rendererClasses&&n._rendererClasses!==r._rendererClasses||(n._rendererClasses=n._rendererClasses?Object.create(n._rendererClasses):{}),n._rendererClasses[t.toLowerCase()]=e,this},e.getRendererClass=function(t){var e=this.prototype;return e._rendererClasses?e._rendererClasses[t.toLowerCase()]:null},e}(t)}(U))));ht.mergeOptions(ut);var lt=Math.PI/180;function ft(){return function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(new Array(16))}ht.include({getFov:function(){return this._fov||(this._fov=.6435011087932844),this._fov/lt},setFov:function(t){if(this.isZooming())return this;if(t=Math.max(.01,Math.min(60,t)),this._fov===t)return this;var e=this.getFov();return this._fov=t*lt,this._calcMatrices(),this._renderLayers(),this._fireEvent("fovchange",{from:e,to:this.getFov()}),this},getBearing:function(){return this._angle?-this._angle/lt:0},setBearing:function(t){if(ct.ie9)throw new Error("map can't rotate in IE9.");var e=-o(t,-180,180)*lt;if(this._angle===e)return this;var n=this.getBearing();return this._fireEvent("rotatestart",{from:n,to:e}),this._angle=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("rotate",{from:n,to:e}),this._fireEvent("rotateend",{from:n,to:e}),this},getPitch:function(){return this._pitch?this._pitch/Math.PI*180:0},setPitch:function(t){if(ct.ie9)throw new Error("map can't tilt in IE9.");var e=function(t,e,n){return Math.min(n,Math.max(e,t))}(t,0,this.options.maxPitch)*lt;if(this._pitch===e)return this;var n=this.getPitch();return this._fireEvent("pitchstart",{from:n,to:e}),this._pitch=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("pitch",{from:n,to:e}),this._fireEvent("pitchend",{from:n,to:e}),this},isTransforming:function(){return!(!this._pitch&&!this._angle)},getFrustumAltitude:function(){var t=90-this.getPitch(),e=this.getFov()/2,n=this.cameraPosition?this.cameraPosition[2]:0;if(e<=t)return n;e=Math.PI*e/180;var r=new H(this.cameraPosition).distanceTo(new H(this.cameraLookAt)),i=n*Math.tan(2*e);return n+Math.tan(e)*(r+i)},_pointToContainerPoint:function(){var t=[0,0,0];return function(e,n,r){if(void 0===r&&(r=0),e=this._pointToPoint(e,n),this.isTransforming()||r){r*=this.getResolution(n)/this.getResolution();var i=this._glScale;dt(t,e.x*i,e.y*i,r*i);var o=this._projIfBehindCamera(t,this.cameraPosition,this.cameraForward);bt(o,o,this.projViewMatrix);var a=this.width/2,s=this.height/2;return o[0]=o[0]*a+a,o[1]=-o[1]*s+s,new H(o[0],o[1])}var c=this._prjToPoint(this._getPrjCenter());return e._sub(c)._add(this.width/2,this.height/2)}}(),_projIfBehindCamera:function(){var t=new Array(3),e=new Array(3),n=new Array(3);return function(r,i,o){mt(t,r,i);var a=dot(o,t);return a<=0&&(scale$1(e,o,1.01*a),add(r,i,mt(n,t,e))),r}}(),_containerPointToPoint:function(){var t=[0,0,0],e=[0,0,0,1],n=[0,0,0,1];return function(r,i){if(this.isTransforming()){var o=this.width/2||1,a=this.height/2||1;dt(t,(r.x-o)/o,(a-r.y)/a,0),dt(e,t[0],t[1],0),dt(n,t[0],t[1],1),e[3]=n[3]=1,bt(e,e,this.projViewMatrixInverse),bt(n,n,this.projViewMatrixInverse);var s=e[0],c=n[0],u=e[1],h=n[1],l=e[2],f=n[2],p=l===f?0:(0-l)/(f-l),d=new H(Mt(s,c,p),Mt(u,h,p))._multi(1/this._glScale);return void 0===i||this.getZoom()===i?d:this._pointToPointAtZoom(d,i)}var m=this._prjToPoint(this._getPrjCenter(),i),v=void 0!==i?this._getResolution()/this._getResolution(i):1,g=v*(r.x-this.width/2),y=v*(r.y-this.height/2);return m._add(g,y)}}(),_calcMatrices:function(){var t=ct.ie9?null:ft(),e=ct.ie9?null:ft();return function(){if(!ct.ie9){var n=this.getSize(),r=n.width||1,i=n.height||1;this._glScale=this.getGLScale();var o=this.getFov()*Math.PI/180,a=this.getScale(this.getMinZoom())/this.getScale(this.getMaxNativeZoom())*i/2/this._getFovRatio()*1.4,s=this.projMatrix||ft();!function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0}(s,o,r/i,.1,a),this.projMatrix=s;var c=this._getCameraWorldMatrix();this.viewMatrix=_t(t,c),this.projViewMatrix=wt(this.projViewMatrix||ft(),s,this.viewMatrix),this.projViewMatrixInverse=wt(this.projViewMatrixInverse||ft(),c,_t(e,s)),this.domCssMatrix=this._calcDomMatrix()}}}(),_calcDomMatrix:function(){var t=ct.ie9?null:ft(),e=[1,-1,1],n=[0,0,0];return function(){var r=.5/Math.tan(this._fov/2)*this.height;xt(t,this.projMatrix,e),function(t,e,n){var r,i,o,a,s,c,u,h,l,f,p,d,m=n[0],v=n[1],g=n[2];e===t?(t[12]=e[0]*m+e[4]*v+e[8]*g+e[12],t[13]=e[1]*m+e[5]*v+e[9]*g+e[13],t[14]=e[2]*m+e[6]*v+e[10]*g+e[14],t[15]=e[3]*m+e[7]*v+e[11]*g+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=d,t[12]=r*m+s*v+l*g+e[12],t[13]=i*m+c*v+f*g+e[13],t[14]=o*m+u*v+p*g+e[14],t[15]=a*m+h*v+d*g+e[15])}(t,t,dt(n,0,0,-r)),this._pitch&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],h=e[9],l=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);t[4]=o*i+u*r,t[5]=a*i+h*r,t[6]=s*i+l*r,t[7]=c*i+f*r,t[8]=u*i-o*r,t[9]=h*i-a*r,t[10]=l*i-s*r,t[11]=f*i-c*r}(t,t,this._pitch),this._angle&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],u=e[4],h=e[5],l=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);t[0]=o*i+u*r,t[1]=a*i+h*r,t[2]=s*i+l*r,t[3]=c*i+f*r,t[4]=u*i-o*r,t[5]=h*i-a*r,t[6]=l*i-s*r,t[7]=f*i-c*r}(t,t,this._angle);var i=ft();return xt(i,i,dt(n,this.width/2,-this.height/2,1)),wt(this.domCssMatrix||ft(),i,t)}}(),_getCameraWorldMatrix:function(){var t={},e=[1,-1,1];return function(){var n=this.getGLZoom(),r=this.getSize(),i=this.getGLScale(),o=this._prjToPoint(this._prjCenter,n);this.cameraLookAt=dt(this.cameraLookAt||[0,0,0],o.x,o.y,0);var a=this.getPitch()*lt,s=-this.getBearing()*lt,c=this._getFovRatio(),u=i*(r.height||1)/2/c,h=u*Math.cos(a),l=Math.sin(a)*u,f=o.x+l*Math.sin(s),p=o.y+l*Math.cos(s);this.cameraPosition=dt(this.cameraPosition||[0,0,0],f,p,h);var d=l||1,m=this.cameraUp=dt(this.cameraUp||[0,0,0],Math.sin(s)*d,Math.cos(s)*d,0),v=this.cameraWorldMatrix=this.cameraWorldMatrix||ft();!function(t,e,n,r){var i=[0,0,0],o=[0,0,0],a=[0,0,0];mt(a,e,n),0===vt(a)&&(a[2]=1);gt(a,a),yt(i,r,a),0===vt(a)&&(1===Math.abs(r[2])?a[0]+=1e-4:a[2]+=1e-4,gt(a,a),yt(i,r,a));gt(i,i),yt(o,a,i),t[0]=i[0],t[4]=o[0],t[8]=a[0],t[1]=i[1],t[5]=o[1],t[9]=a[1],t[2]=i[2],t[6]=o[2],t[10]=a[2]}(v,this.cameraPosition,this.cameraLookAt,m);var g=this.cameraForward||[0,0,0];return mt(g,this.cameraLookAt,this.cameraPosition),this.cameraForward=gt(g,g),function(t,e){var n,r=e[0],i=e[4],o=e[8],a=e[1],s=e[5],c=e[9],u=e[2],h=e[6],l=e[10],f=r+s+l;f>0?(n=.5/Math.sqrt(f+1),t.w=.25/n,t.x=(h-c)*n,t.y=(o-u)*n,t.z=(a-i)*n):r>s&&r>l?(n=2*Math.sqrt(1+r-s-l),t.w=(h-c)/n,t.x=.25*n,t.y=(i+a)/n,t.z=(o+u)/n):s>l?(n=2*Math.sqrt(1+s-r-l),t.w=(o-u)/n,t.x=(i+a)/n,t.y=.25*n,t.z=(c+h)/n):(n=2*Math.sqrt(1+l-r-s),t.w=(a-i)/n,t.x=(o+u)/n,t.y=(c+h)/n,t.z=.25*n)}(t,v),function(t,e){var n=t,r=e.x,i=e.y,o=e.z,a=e.w,s=r+r,c=i+i,u=o+o,h=r*s,l=r*c,f=r*u,p=i*c,d=i*u,m=o*u,v=a*s,g=a*c,y=a*u;n[0]=1-(p+m),n[4]=l-y,n[8]=f+g,n[1]=l+y,n[5]=1-(h+m),n[9]=d-v,n[2]=f-g,n[6]=d+v,n[10]=1-(h+p),n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1}(v,t),function(t,e){var n=t;n[12]=e[0],n[13]=e[1],n[14]=e[2]}(v,this.cameraPosition),xt(v,v,e),v}}(),_getFovRatio:function(){var t=this.getFov();return Math.tan(t/2*lt)},_renderLayers:function(){this.isInteracting()||this._getLayers().forEach(function(t){if(t){var e=t._getRenderer();e&&e.setToRedraw&&e.setToRedraw()}})}}),ht.include({_zoom:function(t,e){this.options.zoomable&&!this.isZooming()&&(e=this._checkZoomOrigin(e),t=this._checkZoom(t),this.onZoomStart(t,e),this._frameZoom=this.getZoom(),this.onZoomEnd(t,e))},_zoomAnimation:function(t,e,n){this.options.zoomable&&!this.isZooming()&&(t=this._checkZoom(t),this.getZoom()!==t&&(e=this._checkZoomOrigin(e),this._startZoomAnim(t,e,n)))},_checkZoomOrigin:function(t){return t&&!this.options.zoomInCenter||(t=new H(this.width/2,this.height/2)),t},_startZoomAnim:function(t,e,n){l(n)&&(n=1);var r=this._getResolution(this._startZoomVal)/this._getResolution(t),i=this.options.zoomAnimationDuration*Math.abs(r-n)/Math.abs(r-1);this._frameZoom=this._startZoomVal,this.animateTo({zoom:t,around:e},{continueOnViewChanged:!0,duration:i})},onZoomStart:function(t,e){this.options.zoomable&&!this.isZooming()&&(this._zooming=!0,this._startZoomVal=this.getZoom(),this._startZoomCoord=this._containerPointToPrj(e),this._fireEvent("zoomstart",{from:this._startZoomVal,to:t}))},onZooming:function(t,e,n){if(this.options.zoomable&&this._frameZoom!==t){l(n)&&(n=1),this._zoomTo(t,e);var r=this.getResolution(t),i=this.getResolution(this._startZoomVal)/r/n,o=this._prjToContainerPoint(this._startZoomCoord,this._startZoomVal),a=this.getViewPoint();if(!this.isRotating()&&!o.equals(e)&&1!==i){var s=this.getPitch(),c=o._sub(e)._multi(1/(1-i));s&&(c.y/=Math.cos(s*Math.PI/180)),e=e.add(c)}var u={view:[i,0,0,i,(e.x-a.x)*(1-i),(e.y-a.y)*(1-i)]};ct.retina&&(e=e.multi(2)),u.container=[i,0,0,i,e.x*(1-i),e.y*(1-i)],this._fireEvent("zooming",{from:this._startZoomVal,to:t,origin:e,matrix:u}),this._frameZoom=t}},onZoomEnd:function(t,e){if(this.options.zoomable){var n=this._startZoomVal;this._zoomTo(t,e),this._zooming=!1,this._fireEvent("zoomend",{from:n,to:t}),this._verifyExtent(this.getCenter())||this.panTo(this.getMaxExtent().getCenter())}},_zoomTo:function(t,e){this._zoomLevel=t,this._calcMatrices(),e&&this._setPrjCoordAtContainerPoint(this._startZoomCoord,e)},_checkZoom:function(t){var e=this.getMaxZoom(),n=this.getMinZoom();return t<n&&(t=n),t>e&&(t=e),t}});var pt=function(){function t(t,e){d(t)&&d(e)?(this.width=t,this.height=e):d(t.width)?(this.width=t.width,this.height=t.height):Array.isArray(t)&&(this.width=t[0],this.height=t[1])}var e=t.prototype;return e.copy=function(){return new t(this.width,this.height)},e.add=function(e,n){var r,i;return e instanceof t?(r=this.width+e.width,i=this.height+e.height):(r=this.width+e,i=this.height+n),new t(r,i)},e.equals=function(t){return this.width===t.width&&this.height===t.height},e.multi=function(e){return new t(this.width*e,this.height*e)},e._multi=function(t){return this.width*=t,this.height*=t,this},e._round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},e.toPoint=function(){return new H(this.width,this.height)},e.toArray=function(){return[this.width,this.height]},e.toJSON=function(){return{width:this.width,height:this.height}},t}();function dt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function mt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function vt(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function gt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function yt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}function xt(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _t(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],h=e[8],l=e[9],f=e[10],p=e[11],d=e[12],m=e[13],v=e[14],g=e[15],y=n*s-r*a,x=n*c-i*a,_=n*u-o*a,w=r*c-i*s,b=r*u-o*s,M=i*u-o*c,E=h*m-l*d,S=h*v-f*d,T=h*g-p*d,A=l*v-f*m,P=l*g-p*m,L=f*g-p*v,C=y*L-x*P+_*A+w*T-b*S+M*E;return C?(C=1/C,t[0]=(s*L-c*P+u*A)*C,t[1]=(i*P-r*L-o*A)*C,t[2]=(m*M-v*b+g*w)*C,t[3]=(f*b-l*M-p*w)*C,t[4]=(c*T-a*L-u*S)*C,t[5]=(n*L-i*T+o*S)*C,t[6]=(v*_-d*M-g*x)*C,t[7]=(h*M-f*_+p*x)*C,t[8]=(a*P-s*T+u*E)*C,t[9]=(r*T-n*P-o*E)*C,t[10]=(d*b-m*_+g*y)*C,t[11]=(l*_-h*b-p*y)*C,t[12]=(s*S-a*A-c*E)*C,t[13]=(n*A-r*S+i*E)*C,t[14]=(m*x-d*w-v*y)*C,t[15]=(h*w-l*x+f*y)*C,t):null}function wt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],d=e[11],m=e[12],v=e[13],g=e[14],y=e[15],x=n[0],_=n[1],w=n[2],b=n[3];return t[0]=x*r+_*s+w*l+b*m,t[1]=x*i+_*c+w*f+b*v,t[2]=x*o+_*u+w*p+b*g,t[3]=x*a+_*h+w*d+b*y,x=n[4],_=n[5],w=n[6],b=n[7],t[4]=x*r+_*s+w*l+b*m,t[5]=x*i+_*c+w*f+b*v,t[6]=x*o+_*u+w*p+b*g,t[7]=x*a+_*h+w*d+b*y,x=n[8],_=n[9],w=n[10],b=n[11],t[8]=x*r+_*s+w*l+b*m,t[9]=x*i+_*c+w*f+b*v,t[10]=x*o+_*u+w*p+b*g,t[11]=x*a+_*h+w*d+b*y,x=n[12],_=n[13],w=n[14],b=n[15],t[12]=x*r+_*s+w*l+b*m,t[13]=x*i+_*c+w*f+b*v,t[14]=x*o+_*u+w*p+b*g,t[15]=x*a+_*h+w*d+b*y,t}function bt(t,e,n){var r=e[0],i=e[1],o=e[2],a=1/(n[3]*r+n[7]*i+n[11]*o+n[15]);return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])*a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])*a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])*a,t}function Mt(t,e,n){return t*(1-n)+e*n}ht.include({animateTo:function(t,e,n){var r=this;void 0===e&&(e={}),this._stopAnim(this._animPlayer),v(e)&&(n=e,e={});var i=this.getProjection(),o=this.getView(),a={},s=!0;for(var u in t)if(c(t,u)&&!l(o[u]))if(s=!1,"center"===u){var h=new q(o[u]).toFixed(7),f=new q(t[u]).toFixed(7);h.equals(f)||(a.center=[h,f])}else o[u]!==t[u]&&"around"!==u&&(a[u]=[o[u],t[u]]);if(s)return null;var p=t.around||new H(this.width/2,this.height/2),d=this.getView(),m=this._getRenderer(),g=this._animPlayer=Animation.animate(a,{easing:e.easing||"out",duration:e.duration||this.options.zoomAnimationDuration,framer:function(t){m.callInNextFrame(t)}},function(t){if(r.isRemoved())g.finish();else{if("running"===g.playState){var o=r.getView();if(!e.continueOnViewChanged&&!equalView(o,d))return void r._stopAnim(g);if(t.styles.center){var s=t.styles.center;r._setPrjCenter(i.project(s)),r.onMoving(r._parseEventFromCoord(r.getCenter()))}l(t.styles.zoom)||r.onZooming(t.styles.zoom,p),l(t.styles.pitch)||r.setPitch(t.styles.pitch),l(t.styles.bearing)||r.setBearing(t.styles.bearing),d=r.getView(),r._fireEvent("animating")}else"finished"===g.playState&&(g._interupted||(a.center&&r._setPrjCenter(i.project(a.center[1])),l(a.pitch)||r.setPitch(a.pitch[1]),l(a.bearing)||r.setBearing(a.bearing[1])),r._endAnim(g,a,p,e),d=r.getView());n&&n(t)}});return this._startAnim(a,p),g},isAnimating:function(){return!!this._animPlayer},isRotating:function(){return this.isDragRotating()||!!this._animRotating},_endAnim:function(t,e,n,r){delete this._animRotating;var i,o=t._interupted?"animateinterrupted":"animateend";(t===this._animPlayer&&delete this._animPlayer,e.center)&&(i=t._interupted?this.getCenter():e.center[1],this.onMoveEnd(this._parseEventFromCoord(i)));l(e.zoom)||(t._interupted?this.onZoomEnd(this.getZoom(),n):r.wheelZoom?this.onZooming(e.zoom[1],n):this.onZoomEnd(e.zoom[1],n)),o&&this._fireEvent(o),l(e.pitch)||this.getPitch()||this.getRenderer().setToRedraw()},_startAnim:function(t,e){this._animPlayer&&(t.center&&this.onMoveStart(),t.zoom&&!this.isZooming()&&this.onZoomStart(t.zoom[1],e),(t.pitch||t.bearing)&&(this._animRotating=!0),this._fireEvent("animatestart"),this._animPlayer.play())},_stopAnim:function(t){t&&"finished"!==t.playState&&(t._interupted=!0,t.finish())}}),e.default=K,e.Map$1=ht,e.Coordinate=q,e.MultiPolygon=nt,e.Polygon=Z}).call(this,n(128))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],h=!1,l=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!h){var t=s(f);h=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,h=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||h||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(18),i=n(349),o=n(351),a=n(352),s=n(353),c=n(131),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(354);t.exports=function(t){return new Promise(function(e,h){var l=t.data,f=t.headers;r.isFormData(l)&&delete f["Content-Type"];var p=new XMLHttpRequest,d="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||s(t.url)||(p=new window.XDomainRequest,d="onload",m=!0,p.onprogress=function(){},p.ontimeout=function(){}),t.auth){var v=t.auth.username||"",g=t.auth.password||"";f.Authorization="Basic "+u(v+":"+g)}if(p.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p[d]=function(){if(p&&(4===p.readyState||m)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:t,request:p};i(e,h,r),p=null}},p.onerror=function(){h(c("Network Error",t,null,p)),p=null},p.ontimeout=function(){h(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=n(355),x=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;x&&(f[t.xsrfHeaderName]=x)}if("setRequestHeader"in p&&r.forEach(f,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)}),t.withCredentials&&(p.withCredentials=!0),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){p&&(p.abort(),h(t),p=null)}),void 0===l&&(l=null),p.send(l)})}},function(t,e,n){"use strict";var r=n(350);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};n(135),n(137);var i=u(n(127)),o=n(339),a=u(n(341)),s=u(n(342)),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(343));function u(t){return t&&t.__esModule?t:{default:t}}function h(t){var e=0,n=t.reduce(function(t,e){return t+e.length},0),r=new Float32Array(3*n);return t.forEach(function(t){for(var n=t.length,i=0;i<n;i++)r[e]=t[i].x,r[e+1]=t[i].y,r[e+2]=t[i].z,e+=3}),r}function l(t){for(var e=t[2],n=t.length,r=3;r<n;r+=3)e<t[r+2]&&(e=t[r+2]);return e}function f(t,e,n){for(var r=t.length,i=new Float32Array(r/3*e),o=0,a=0;o<r;o+=3,a++)for(var s=a*e,c=(n-t[o+2])/e,u=1;u<e+1;u++)i[s+u-1]=n-u*c;return i}function p(t,e,n){var r=function(t,e){var n=[],r=[];return(0,i.default)(e).forEach(function(i,s){var c=(0,o.toExtrudeGeometry)(i,t,3*e[s].properties.levels||3);c&&(Array.isArray(c)||(c=[c]),c.forEach(function(t){var e=(0,a.default)(t),i=e.vertices,o=e.normals;n.push(i),r.push(o)}))}),{verticesArray:h(n),normalsArray:h(r)}}(t,e),s=r.verticesArray,c=r.normalsArray,u=l(s);return{verticesBuffArrays:s,normalsBuffArrays:c,maxHeight:u,animateBuffArrays:f(s,n,u)}}function d(t,e){var n=function(t){var e=[],n=[[]];return t.forEach(function(t){if(t.properties&&t.properties.type){var r=e.indexOf(t.properties.type);~r?n[r+1].push(t):(e.push(t.properties.type),n[e.length]=[t])}else n[0].push(t)}),{typeFeatures:n,types:e}}(e),i=n.typeFeatures,a=n.types,c=[];(0,o.reductive)(t),i.forEach(function(e,n){e.length&&c.push(r({},p(t,e,s.default.stepTotal),{fids:e.map(function(t){return t.id}),type:0===n?"unknown":a[n-1]}))});var u=[];return c.forEach(function(t){u.push(t.verticesBuffArrays.buffer,t.normalsBuffArrays.buffer,t.animateBuffArrays.buffer)}),{geoJsonArray:c,transArray:u}}var m={initialAttribute:function(t){var e=JSON.parse(t.map),n=t.incident||"grentAttribute",r=d(e,JSON.parse(t.features)),i=r.geoJsonArray,o=r.transArray;self.postMessage({incident:n,geoJsonArray:i},o)},grentAnimationArray:function(t){var e=t.verticesBuffArrays,n=l(e),r=t.incident||"grentAnimationArray",i=f(e,s.default.stepTotal,n);self.postMessage({animationArray:i,incident:r},[i.buffer])},getGeo:function(t){console.log("handle"),self.postMessage({incident:"obsAddGeo"}),t.tiles.forEach(function(){var e=function(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}(regeneratorRuntime.mark(function e(n){var r,i,o,a,s,u,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.x,i=n.y,o=n.z,e.next=3,c.getFeatures(r,i,o);case 3:a=e.sent,s=d(t.map,a),u=s.geoJsonArray,h=s.transArray,self.postMessage({incident:"addGeo",geoJsonArray:u},h),setTimeout(function(){u[0]=17},500);case 7:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}())},clearFids:function(t){c.clearGeos(t.fids)}};self.addEventListener("message",function(t){var e=t.data;"string"==typeof t.data&&(e=JSON.parse(t.data)),m[e.thing]&&m[e.thing](e)})},function(t,e,n){t.exports=n(136)},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(){},t.exports=e.default},function(t,e,n){"use strict";(function(t){if(n(138),n(335),n(336),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function r(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}r(String.prototype,"padLeft","".padStart),r(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&r(Array,t,Function.call.bind([][t]))})}).call(this,n(92))},function(t,e,n){n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(219),n(220),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(86),n(243),n(244),n(111),n(245),n(246),n(247),n(248),n(249),n(114),n(116),n(117),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),t.exports=n(19)},function(t,e,n){"use strict";var r=n(2),i=n(14),o=n(6),a=n(0),s=n(12),c=n(30).KEY,u=n(3),h=n(50),l=n(43),f=n(34),p=n(5),d=n(94),m=n(66),v=n(140),g=n(53),y=n(1),x=n(4),_=n(15),w=n(23),b=n(33),M=n(37),E=n(97),S=n(16),T=n(7),A=n(35),P=S.f,L=T.f,C=E.f,R=r.Symbol,O=r.JSON,I=O&&O.stringify,N=p("_hidden"),D=p("toPrimitive"),F={}.propertyIsEnumerable,U=h("symbol-registry"),B=h("symbols"),j=h("op-symbols"),z=Object.prototype,G="function"==typeof R,H=r.QObject,k=!H||!H.prototype||!H.prototype.findChild,V=o&&u(function(){return 7!=M(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(z,e);r&&delete z[e],L(t,e,n),r&&t!==z&&L(z,e,r)}:L,W=function(t){var e=B[t]=M(R.prototype);return e._k=t,e},X=G&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},q=function(t,e,n){return t===z&&q(j,e,n),y(t),e=w(e,!0),y(n),i(B,e)?(n.enumerable?(i(t,N)&&t[N][e]&&(t[N][e]=!1),n=M(n,{enumerable:b(0,!1)})):(i(t,N)||L(t,N,b(1,{})),t[N][e]=!0),V(t,e,n)):L(t,e,n)},Z=function(t,e){y(t);for(var n,r=v(e=_(e)),i=0,o=r.length;o>i;)q(t,n=r[i++],e[n]);return t},Y=function(t){var e=F.call(this,t=w(t,!0));return!(this===z&&i(B,t)&&!i(j,t))&&(!(e||!i(this,t)||!i(B,t)||i(this,N)&&this[N][t])||e)},J=function(t,e){if(t=_(t),e=w(e,!0),t!==z||!i(B,e)||i(j,e)){var n=P(t,e);return!n||!i(B,e)||i(t,N)&&t[N][e]||(n.enumerable=!0),n}},K=function(t){for(var e,n=C(_(t)),r=[],o=0;n.length>o;)i(B,e=n[o++])||e==N||e==c||r.push(e);return r},Q=function(t){for(var e,n=t===z,r=C(n?j:_(t)),o=[],a=0;r.length>a;)!i(B,e=r[a++])||n&&!i(z,e)||o.push(B[e]);return o};G||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(j,n),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),V(this,t,b(1,n))};return o&&k&&V(z,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",function(){return this._k}),S.f=J,T.f=q,n(38).f=E.f=K,n(48).f=Y,n(52).f=Q,o&&!n(31)&&s(z,"propertyIsEnumerable",Y,!0),d.f=function(t){return W(p(t))}),a(a.G+a.W+a.F*!G,{Symbol:R});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)p($[tt++]);for(var et=A(p.store),nt=0;et.length>nt;)m(et[nt++]);a(a.S+a.F*!G,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){k=!0},useSimple:function(){k=!1}}),a(a.S+a.F*!G,"Object",{create:function(t,e){return void 0===e?M(t):Z(M(t),e)},defineProperty:q,defineProperties:Z,getOwnPropertyDescriptor:J,getOwnPropertyNames:K,getOwnPropertySymbols:Q}),O&&a(a.S+a.F*(!G||u(function(){var t=R();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(x(e)||void 0!==t)&&!X(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,I.apply(O,r)}}),R.prototype[D]||n(11)(R.prototype,D,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(35),i=n(52),o=n(48);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(37)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperty:n(7).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperties:n(96)})},function(t,e,n){var r=n(15),i=n(16).f;n(26)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(9),i=n(17);n(26)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(9),i=n(35);n(26)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(26)("getOwnPropertyNames",function(){return n(97).f})},function(t,e,n){var r=n(4),i=n(30).onFreeze;n(26)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4),i=n(30).onFreeze;n(26)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4),i=n(30).onFreeze;n(26)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4);n(26)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(4);n(26)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(4);n(26)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(98)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(156)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(70).set})},function(t,e,n){"use strict";var r=n(49),i={};i[n(5)("toStringTag")]="z",i+""!="[object z]"&&n(12)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(99)})},function(t,e,n){var r=n(7).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(6)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(5)("hasInstance"),a=Function.prototype;o in a||n(7).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),i=n(101);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(102);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(2),i=n(14),o=n(21),a=n(72),s=n(23),c=n(3),u=n(38).f,h=n(16).f,l=n(7).f,f=n(44).trim,p=r.Number,d=p,m=p.prototype,v="Number"==o(n(37)(m)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():f(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,c=e.slice(2),u=0,h=c.length;u<h;u++)if((a=c.charCodeAt(u))<48||a>i)return NaN;return parseInt(c,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(v?c(function(){m.valueOf.call(n)}):"Number"!=o(n))?a(new d(y(e)),n,p):y(e)};for(var x,_=n(6)?u(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)i(d,x=_[w])&&!i(p,x)&&l(p,x,h(d,x));p.prototype=m,m.constructor=p,n(12)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),i=n(25),o=n(103),a=n(73),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],h="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,c=o(this,h),u=i(t),m="",v="0";if(u<0||u>20)throw RangeError(h);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*d(2,69,1))-69)<0?c*d(2,-e,1):c/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=u;r>=7;)l(1e7,0),r-=7;for(l(d(10,r,1),0),r=e-1;r>=23;)f(1<<23),r-=23;f(1<<r),l(1,1),f(2),v=p()}else l(0,n),l(1<<-e,0),v=p()+a.call("0",u);return v=u>0?m+((s=v.length)<=u?"0."+a.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u)):m+v}})},function(t,e,n){"use strict";var r=n(0),i=n(3),o=n(103),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(104)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(104),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(102);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(101);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(105),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(74);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(75);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(106)})},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,c=0;a<s;)c<(n=i(arguments[a++]))?(o=o*(r=c/n)*r+1,c=n):o+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(3)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(105)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(74)})},function(t,e,n){var r=n(0),i=n(75),o=Math.exp;r(r.S+r.F*n(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(75),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),i=n(36),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),i=n(15),o=n(8);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){"use strict";n(44)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(76)(!0);n(77)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),i=n(76)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(79),a="".endsWith;r(r.P+r.F*n(80)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),c=String(t);return a?a.call(e,c,s):e.slice(s-c.length,s)===c}})},function(t,e,n){"use strict";var r=n(0),i=n(79);r(r.P+r.F*n(80)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(73)})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(79),a="".startsWith;r(r.P+r.F*n(80)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(13)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(13)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(13)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(13)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(13)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(13)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(13)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(13)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(13)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(13)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(13)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(13)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(13)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(23);r(r.P+r.F*n(3)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),i=n(218);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(3),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(12)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(5)("toPrimitive"),i=Date.prototype;r in i||n(11)(i,r,n(221))},function(t,e,n){"use strict";var r=n(1),i=n(23);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(53)})},function(t,e,n){"use strict";var r=n(20),i=n(0),o=n(9),a=n(107),s=n(81),c=n(8),u=n(82),h=n(83);i(i.S+i.F*!n(55)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,f=o(t),p="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,v=void 0!==m,g=0,y=h(f);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==y||p==Array&&s(y))for(n=new p(e=c(f.length));e>g;g++)u(n,g,v?m(f[g],g):f[g]);else for(l=y.call(f),n=new p;!(i=l.next()).done;g++)u(n,g,v?a(l,m,[i.value,g],!0):i.value);return n.length=g,n}})},function(t,e,n){"use strict";var r=n(0),i=n(82);r(r.S+r.F*n(3)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(15),o=[].join;r(r.P+r.F*(n(47)!=Object||!n(22)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(69),o=n(21),a=n(36),s=n(8),c=[].slice;r(r.P+r.F*n(3)(function(){i&&c.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=a(t,n),u=a(e,n),h=s(u-i),l=new Array(h),f=0;f<h;f++)l[f]="String"==r?this.charAt(i+f):this[i+f];return l}})},function(t,e,n){"use strict";var r=n(0),i=n(10),o=n(9),a=n(3),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(22)(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},function(t,e,n){"use strict";var r=n(0),i=n(27)(0),o=n(22)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(4),i=n(53),o=n(5)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(0),i=n(27)(1);r(r.P+r.F*!n(22)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(27)(2);r(r.P+r.F*!n(22)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(27)(3);r(r.P+r.F*!n(22)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(27)(4);r(r.P+r.F*!n(22)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(108);r(r.P+r.F*!n(22)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(0),i=n(108);r(r.P+r.F*!n(22)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(0),i=n(51)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(22)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),i=n(15),o=n(25),a=n(8),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(22)(s)),"Array",{lastIndexOf:function(t){if(c)return s.apply(this,arguments)||0;var e=i(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(109)}),n(32)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(85)}),n(32)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(27)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(32)("find")},function(t,e,n){"use strict";var r=n(0),i=n(27)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(32)(o)},function(t,e,n){n(39)("Array")},function(t,e,n){var r=n(2),i=n(72),o=n(7).f,a=n(38).f,s=n(54),c=n(56),u=r.RegExp,h=u,l=u.prototype,f=/a/g,p=/a/g,d=new u(f)!==f;if(n(6)&&(!d||n(3)(function(){return p[n(5)("match")]=!1,u(f)!=f||u(p)==p||"/a/i"!=u(f,"i")}))){u=function(t,e){var n=this instanceof u,r=s(t),o=void 0===e;return!n&&r&&t.constructor===u&&o?t:i(d?new h(r&&!o?t.source:t,e):h((r=t instanceof u)?t.source:t,r&&o?c.call(t):e),n?this:l,u)};for(var m=function(t){t in u||o(u,t,{configurable:!0,get:function(){return h[t]},set:function(e){h[t]=e}})},v=a(h),g=0;v.length>g;)m(v[g++]);l.constructor=u,u.prototype=l,n(12)(r,"RegExp",u)}n(39)("RegExp")},function(t,e,n){"use strict";n(111);var r=n(1),i=n(56),o=n(6),a=/./.toString,s=function(t){n(12)(RegExp.prototype,"toString",t,!0)};n(3)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,n){n(57)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(57)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(57)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(57)("split",2,function(t,e,r){"use strict";var i=n(54),o=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,c,u,h,l,f=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,m=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,p+"g");for(s||(r=new RegExp("^"+v.source+"$(?!\\s)",p));(c=v.exec(n))&&!((u=c.index+c[0].length)>d&&(f.push(n.slice(d,c.index)),!s&&c.length>1&&c[0].replace(r,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(c[l]=void 0)}),c.length>1&&c.index<n.length&&a.apply(f,c.slice(1)),h=c[0].length,d=u,f.length>=m));)v.lastIndex===c.index&&v.lastIndex++;return d===n.length?!h&&v.test("")||f.push(""):f.push(n.slice(d)),f.length>m?f.slice(0,m):f}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";var r,i,o,a,s=n(31),c=n(2),u=n(20),h=n(49),l=n(0),f=n(4),p=n(10),d=n(40),m=n(41),v=n(58),g=n(87).set,y=n(88)(),x=n(89),_=n(112),w=n(59),b=n(113),M=c.TypeError,E=c.process,S=E&&E.versions,T=S&&S.v8||"",A=c.Promise,P="process"==h(E),L=function(){},C=i=x.f,R=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[n(5)("species")]=function(t){t(L,L)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(L)instanceof e&&0!==T.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),O=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,h=e.domain;try{s?(i||(2==t._h&&F(t),t._h=1),!0===s?n=r:(h&&h.enter(),n=s(r),h&&(h.exit(),a=!0)),n===e.promise?u(M("Promise-chain cycle")):(o=O(n))?o.call(n,c,u):c(n)):u(r)}catch(t){h&&!a&&h.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&N(t)})}},N=function(t){g.call(c,function(){var e,n,r,i=t._v,o=D(t);if(o&&(e=_(function(){P?E.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=P||D(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},D=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){g.call(c,function(){var e;P?E.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},U=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw M("Promise can't be resolved itself");(e=O(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,u(B,r,1),u(U,r,1))}catch(t){U.call(r,t)}}):(n._v=t,n._s=1,I(n,!1))}catch(t){U.call({_w:n,_d:!1},t)}}};R||(A=function(t){d(this,A,"Promise","_h"),p(t),r.call(this);try{t(u(B,this,1),u(U,this,1))}catch(t){U.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(42)(A.prototype,{then:function(t,e){var n=C(v(this,A));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=P?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(B,t,1),this.reject=u(U,t,1)},x.f=C=function(t){return t===A||t===a?new o(t):i(t)}),l(l.G+l.W+l.F*!R,{Promise:A}),n(43)(A,"Promise"),n(39)("Promise"),a=n(19).Promise,l(l.S+l.F*!R,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!R),"Promise",{resolve:function(t){return b(s&&this===a?A:this,t)}}),l(l.S+l.F*!(R&&n(55)(function(t){A.all(t).catch(L)})),"Promise",{all:function(t){var e=this,n=C(e),r=n.resolve,i=n.reject,o=_(function(){var n=[],o=0,a=1;m(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=C(e),r=n.reject,i=_(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(118),i=n(46);n(60)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(61),o=n(90),a=n(1),s=n(36),c=n(8),u=n(4),h=n(2).ArrayBuffer,l=n(58),f=o.ArrayBuffer,p=o.DataView,d=i.ABV&&h.isView,m=f.prototype.slice,v=i.VIEW;r(r.G+r.W+r.F*(h!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||u(t)&&v in t}}),r(r.P+r.U+r.F*n(3)(function(){return!new f(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(l(this,f))(c(i-r)),u=new p(this),h=new p(o),d=0;r<i;)h.setUint8(d++,u.getUint8(r++));return o}}),n(39)("ArrayBuffer")},function(t,e,n){var r=n(0);r(r.G+r.W+r.F*!n(61).ABV,{DataView:n(90).DataView})},function(t,e,n){n(28)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(28)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(28)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(0),i=n(10),o=n(1),a=(n(2).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(3)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),c=o(n);return a?a(r,e,c):s.call(r,e,c)}})},function(t,e,n){var r=n(0),i=n(37),o=n(10),a=n(1),s=n(4),c=n(3),u=n(99),h=(n(2).Reflect||{}).construct,l=c(function(){function t(){}return!(h(function(){},[],t)instanceof t)}),f=!c(function(){h(function(){})});r(r.S+r.F*(l||f),"Reflect",{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(f&&!l)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,p=i(s(c)?c:Object.prototype),d=Function.apply.call(t,p,e);return s(d)?d:p}})},function(t,e,n){var r=n(7),i=n(0),o=n(1),a=n(23);i(i.S+i.F*n(3)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t),e=a(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),i=n(16).f,o=n(1);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(78)(o,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(16),i=n(17),o=n(14),a=n(0),s=n(4),c=n(1);a(a.S,"Reflect",{get:function t(e,n){var a,u,h=arguments.length<3?e:arguments[2];return c(e)===h?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(h):void 0:s(u=i(e))?t(u,n,h):void 0}})},function(t,e,n){var r=n(16),i=n(0),o=n(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(17),o=n(1);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(1),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(120)})},function(t,e,n){var r=n(0),i=n(1),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(7),i=n(16),o=n(17),a=n(14),s=n(0),c=n(33),u=n(1),h=n(4);s(s.S,"Reflect",{set:function t(e,n,s){var l,f,p=arguments.length<4?e:arguments[3],d=i.f(u(e),n);if(!d){if(h(f=o(e)))return t(f,n,s,p);d=c(0)}if(a(d,"value")){if(!1===d.writable||!h(p))return!1;if(l=i.f(p,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=s,r.f(p,n,l)}else r.f(p,n,c(0,s));return!0}return void 0!==d.set&&(d.set.call(p,s),!0)}})},function(t,e,n){var r=n(0),i=n(70);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(0),i=n(51)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(32)("includes")},function(t,e,n){"use strict";var r=n(0),i=n(121),o=n(9),a=n(8),s=n(10),c=n(84);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(32)("flatMap")},function(t,e,n){"use strict";var r=n(0),i=n(121),o=n(9),a=n(8),s=n(25),c=n(84);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=c(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(32)("flatten")},function(t,e,n){"use strict";var r=n(0),i=n(76)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(122),o=n(59);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(0),i=n(122),o=n(59);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(44)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(44)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(0),i=n(24),o=n(8),a=n(54),s=n(56),c=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};n(78)(u,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new u(r,e)}})},function(t,e,n){n(66)("asyncIterator")},function(t,e,n){n(66)("observable")},function(t,e,n){var r=n(0),i=n(120),o=n(15),a=n(16),s=n(82);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),c=a.f,u=i(r),h={},l=0;u.length>l;)void 0!==(n=c(r,e=u[l++]))&&s(h,e,n);return h}})},function(t,e,n){var r=n(0),i=n(123)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(0),i=n(123)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(10),a=n(7);n(6)&&r(r.P+n(62),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(10),a=n(7);n(6)&&r(r.P+n(62),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(23),a=n(17),s=n(16).f;n(6)&&r(r.P+n(62),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(23),a=n(17),s=n(16).f;n(6)&&r(r.P+n(62),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},function(t,e,n){var r=n(0);r(r.P+r.R,"Map",{toJSON:n(124)("Map")})},function(t,e,n){var r=n(0);r(r.P+r.R,"Set",{toJSON:n(124)("Set")})},function(t,e,n){n(63)("Map")},function(t,e,n){n(63)("Set")},function(t,e,n){n(63)("WeakMap")},function(t,e,n){n(63)("WeakSet")},function(t,e,n){n(64)("Map")},function(t,e,n){n(64)("Set")},function(t,e,n){n(64)("WeakMap")},function(t,e,n){n(64)("WeakSet")},function(t,e,n){var r=n(0);r(r.G,{global:n(2)})},function(t,e,n){var r=n(0);r(r.S,"System",{global:n(2)})},function(t,e,n){var r=n(0),i=n(21);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(0),i=n(126),o=n(106);r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>16,s=r>>16,c=(a*o>>>0)+(i*o>>>16);return a*s+(c>>16)+((i*s>>>0)+(65535&c)>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(0),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(0);r(r.S,"Math",{scale:n(126)})},function(t,e,n){var r=n(0);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>>16,s=r>>>16,c=(a*o>>>0)+(i*o>>>16);return a*s+(c>>>16)+((i*s>>>0)+(65535&c)>>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(0),i=n(19),o=n(2),a=n(58),s=n(113);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(0),i=n(89),o=n(112);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(29),i=n(1),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(29),i=n(1),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var c=s.get(e);return c.delete(n),!!c.size||s.delete(e)}})},function(t,e,n){var r=n(29),i=n(1),o=n(17),a=r.has,s=r.get,c=r.key,u=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=o(e);return null!==r?u(t,r,n):void 0};r.exp({getMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:c(arguments[2]))}})},function(t,e,n){var r=n(116),i=n(125),o=n(29),a=n(1),s=n(17),c=o.keys,u=o.key,h=function(t,e){var n=c(t,e),o=s(t);if(null===o)return n;var a=h(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return h(a(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,e,n){var r=n(29),i=n(1),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(29),i=n(1),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(29),i=n(1),o=n(17),a=r.has,s=r.key,c=function(t,e,n){if(a(t,e,n))return!0;var r=o(e);return null!==r&&c(t,r,n)};r.exp({hasMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(29),i=n(1),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(29),i=n(1),o=n(10),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){var r=n(0),i=n(88)(),o=n(2).process,a="process"==n(21)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(19),a=n(88)(),s=n(5)("observable"),c=n(10),u=n(1),h=n(40),l=n(42),f=n(11),p=n(41),d=p.RETURN,m=function(t){return null==t?void 0:c(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},y=function(t){g(t)||(t._o=void 0,v(t))},x=function(t,e){u(t),this._c=void 0,this._o=t,t=new _(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(e){return void t.error(e)}g(this)&&v(this)};x.prototype=l({},{unsubscribe:function(){y(this)}});var _=function(t){this._s=t};_.prototype=l({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=m(n.next);if(r)return r.call(n,t)}catch(t){try{y(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=m(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=m(n.complete);t=r?r.call(n,t):void 0}catch(t){try{v(e)}finally{throw t}}return v(e),t}}});var w=function(t){h(this,w,"Observable","_f")._f=c(t)};l(w.prototype,{subscribe:function(t){return new x(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){c(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),l(w,{from:function(t){var e="function"==typeof this?this:w,n=m(u(t)[s]);if(n){var r=u(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(p(t,!1,function(t){if(e.next(t),n)return d})===d)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),f(w.prototype,s,function(){return this}),r(r.G,{Observable:w}),n(39)("Observable")},function(t,e,n){var r=n(2),i=n(0),o=n(59),a=[].slice,s=/MSIE .\./.test(o),c=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){var r=n(0),i=n(87);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(86),i=n(35),o=n(12),a=n(2),s=n(11),c=n(45),u=n(5),h=u("iterator"),l=u("toStringTag"),f=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(p),m=0;m<d.length;m++){var v,g=d[m],y=p[g],x=a[g],_=x&&x.prototype;if(_&&(_[h]||s(_,h,f),_[l]||s(_,l,g),c[g]=f,y))for(v in r)_[v]||o(_,v,r[v],!0)}},function(t,e,n){(function(e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag",u="object"==typeof t,h=e.regeneratorRuntime;if(h)u&&(t.exports=h);else{(h=e.regeneratorRuntime=u?t.exports:{}).wrap=_;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",m={},v={};v[a]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(R([])));y&&y!==r&&i.call(y,a)&&(v=y);var x=E.prototype=b.prototype=Object.create(v);M.prototype=x.constructor=E,E.constructor=M,E[c]=M.displayName="GeneratorFunction",h.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===M||"GeneratorFunction"===(e.displayName||e.name))},h.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},h.awrap=function(t){return{__await:t}},S(T.prototype),T.prototype[s]=function(){return this},h.AsyncIterator=T,h.async=function(t,e,n,r){var i=new T(_(t,e,n,r));return h.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(x),x[c]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},h.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},h.values=R,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function _(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=w(t,e,n);if("normal"===c.type){if(r=n.done?d:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function b(){}function M(){}function E(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function T(t){function n(e,r,o,a){var s=w(t[e],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){n("next",t,o,a)},function(t){n("throw",t,o,a)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},a)}a(s.arg)}var r;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function i(){return new Promise(function(r,i){n(t,e,r,i)})}return r=r?r.then(i,i):i()}}function A(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,A(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=w(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function R(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:n,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,n(92))},function(t,e,n){n(337),t.exports=n(19).RegExp.escape},function(t,e,n){var r=n(0),i=n(338)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExtrudeGeometry=e.reductive=void 0;var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(340)),i=n(127);var o=new i.Map$1(null,{center:[0,0]});function a(t){return Math.sign?Math.sign(t):0===(t=+t)||isNaN(t)?Number(t):t>0?1:-1}function s(t,e){var n=o.coordinateToPoint(t,e.maxNativeZoom);return new r.Vector3(n.x,n.y,-0)}e.reductive=function(t){o.setCenter(new i.Coordinate(t.center))},e.toExtrudeGeometry=function t(e,n,c){if(!e||!(e instanceof i.MultiPolygon||e instanceof i.Polygon))return null;if(e instanceof i.MultiPolygon)return e.getGeometries().map(function(e){return t(e,n,c)});for(var u=function(t,e){var n=s(t.getCenter(),e),i=t.getShell().map(function(t){return s(t,e).sub(n)}),o=new r.Shape(i),a=t.getHoles();return a&&a.length>0&&(o.holes=a.map(function(t){var i=t.map(function(t){return s(t,e).sub(n)});return new r.Shape(i)})),o}(e,n),h=s(e.getCenter(),n),l=function(t,e){var n=e.maxNativeZoom,i=o.getCenter(),s=o.locate(i,t,t),c=o.coordinateToPoint(i,n),u=o.coordinateToPoint(s,n),h=Math.abs(u.x-c.x)*a(t),l=Math.abs(u.y-c.y)*a(t);return new r.Vector3(h,l,0).x}(c,n),f=new r.ExtrudeGeometry(u,{depth:l,bevelEnabled:!0}),p=f.vertices,d=p.length,m=0;m<d;m+=1)p[m].x+=h.x,p[m].y+=h.y,p[m].z+=-l;return f}},function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"WebGLRenderTargetCube",function(){return Ze}),n.d(e,"WebGLRenderTarget",function(){return qe}),n.d(e,"WebGLRenderer",function(){return ai}),n.d(e,"ShaderLib",function(){return an}),n.d(e,"UniformsLib",function(){return on}),n.d(e,"UniformsUtils",function(){return en}),n.d(e,"ShaderChunk",function(){return tn}),n.d(e,"FogExp2",function(){return si}),n.d(e,"Fog",function(){return ci}),n.d(e,"Scene",function(){return ui}),n.d(e,"Sprite",function(){return pi}),n.d(e,"LOD",function(){return di}),n.d(e,"SkinnedMesh",function(){return gi}),n.d(e,"Skeleton",function(){return mi}),n.d(e,"Bone",function(){return vi}),n.d(e,"Mesh",function(){return Hn}),n.d(e,"LineSegments",function(){return _i}),n.d(e,"LineLoop",function(){return wi}),n.d(e,"Line",function(){return xi}),n.d(e,"Points",function(){return Mi}),n.d(e,"Group",function(){return ni}),n.d(e,"VideoTexture",function(){return Ei}),n.d(e,"DataTexture",function(){return Ye}),n.d(e,"CompressedTexture",function(){return Si}),n.d(e,"CubeTexture",function(){return Vn}),n.d(e,"CanvasTexture",function(){return Ti}),n.d(e,"DepthTexture",function(){return Ai}),n.d(e,"Texture",function(){return We}),n.d(e,"CompressedTextureLoader",function(){return ra}),n.d(e,"DataTextureLoader",function(){return ia}),n.d(e,"CubeTextureLoader",function(){return aa}),n.d(e,"TextureLoader",function(){return sa}),n.d(e,"ObjectLoader",function(){return cs}),n.d(e,"MaterialLoader",function(){return ns}),n.d(e,"BufferGeometryLoader",function(){return rs}),n.d(e,"DefaultLoadingManager",function(){return ta}),n.d(e,"LoadingManager",function(){return $o}),n.d(e,"JSONLoader",function(){return ss}),n.d(e,"ImageLoader",function(){return oa}),n.d(e,"ImageBitmapLoader",function(){return ps}),n.d(e,"FontLoader",function(){return gs}),n.d(e,"FileLoader",function(){return na}),n.d(e,"Loader",function(){return os}),n.d(e,"LoaderUtils",function(){return as}),n.d(e,"Cache",function(){return Qo}),n.d(e,"AudioLoader",function(){return xs}),n.d(e,"SpotLightShadow",function(){return Na}),n.d(e,"SpotLight",function(){return Da}),n.d(e,"PointLight",function(){return Fa}),n.d(e,"RectAreaLight",function(){return za}),n.d(e,"HemisphereLight",function(){return Oa}),n.d(e,"DirectionalLightShadow",function(){return Ua}),n.d(e,"DirectionalLight",function(){return Ba}),n.d(e,"AmbientLight",function(){return ja}),n.d(e,"LightShadow",function(){return Ia}),n.d(e,"Light",function(){return Ra}),n.d(e,"StereoCamera",function(){return _s}),n.d(e,"PerspectiveCamera",function(){return ri}),n.d(e,"OrthographicCamera",function(){return dn}),n.d(e,"CubeCamera",function(){return ws}),n.d(e,"ArrayCamera",function(){return ii}),n.d(e,"Camera",function(){return pn}),n.d(e,"AudioListener",function(){return bs}),n.d(e,"PositionalAudio",function(){return Es}),n.d(e,"AudioContext",function(){return ys}),n.d(e,"AudioAnalyser",function(){return Ss}),n.d(e,"Audio",function(){return Ms}),n.d(e,"VectorKeyframeTrack",function(){return $a}),n.d(e,"StringKeyframeTrack",function(){return Qa}),n.d(e,"QuaternionKeyframeTrack",function(){return Ka}),n.d(e,"NumberKeyframeTrack",function(){return Ya}),n.d(e,"ColorKeyframeTrack",function(){return Za}),n.d(e,"BooleanKeyframeTrack",function(){return qa}),n.d(e,"PropertyMixer",function(){return Ts}),n.d(e,"PropertyBinding",function(){return Cs}),n.d(e,"KeyframeTrack",function(){return Xa}),n.d(e,"AnimationUtils",function(){return Ga}),n.d(e,"AnimationObjectGroup",function(){return Rs}),n.d(e,"AnimationMixer",function(){return Is}),n.d(e,"AnimationClip",function(){return ts}),n.d(e,"Uniform",function(){return Ns}),n.d(e,"InstancedBufferGeometry",function(){return Ds}),n.d(e,"BufferGeometry",function(){return Rn}),n.d(e,"Geometry",function(){return gn}),n.d(e,"InterleavedBufferAttribute",function(){return li}),n.d(e,"InstancedInterleavedBuffer",function(){return Fs}),n.d(e,"InterleavedBuffer",function(){return hi}),n.d(e,"InstancedBufferAttribute",function(){return Us}),n.d(e,"Face3",function(){return mn}),n.d(e,"Object3D",function(){return fn}),n.d(e,"Raycaster",function(){return Bs}),n.d(e,"Layers",function(){return hn}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return Gs}),n.d(e,"QuaternionLinearInterpolant",function(){return Ja}),n.d(e,"LinearInterpolant",function(){return Va}),n.d(e,"DiscreteInterpolant",function(){return Wa}),n.d(e,"CubicInterpolant",function(){return ka}),n.d(e,"Interpolant",function(){return Ha}),n.d(e,"Triangle",function(){return Gn}),n.d(e,"Math",function(){return Ue}),n.d(e,"Spherical",function(){return Hs}),n.d(e,"Cylindrical",function(){return ks}),n.d(e,"Plane",function(){return Qe}),n.d(e,"Frustum",function(){return $e}),n.d(e,"Sphere",function(){return Ke}),n.d(e,"Ray",function(){return zn}),n.d(e,"Matrix4",function(){return je}),n.d(e,"Matrix3",function(){return He}),n.d(e,"Box3",function(){return Je}),n.d(e,"Box2",function(){return Vs}),n.d(e,"Line3",function(){return Ws}),n.d(e,"Euler",function(){return un}),n.d(e,"Vector4",function(){return Xe}),n.d(e,"Vector3",function(){return Ge}),n.d(e,"Vector2",function(){return Be}),n.d(e,"Quaternion",function(){return ze}),n.d(e,"Color",function(){return rn}),n.d(e,"ImmediateRenderObject",function(){return Xs}),n.d(e,"VertexNormalsHelper",function(){return qs}),n.d(e,"SpotLightHelper",function(){return Zs}),n.d(e,"SkeletonHelper",function(){return Ys}),n.d(e,"PointLightHelper",function(){return Js}),n.d(e,"RectAreaLightHelper",function(){return Ks}),n.d(e,"HemisphereLightHelper",function(){return Qs}),n.d(e,"GridHelper",function(){return $s}),n.d(e,"PolarGridHelper",function(){return tc}),n.d(e,"FaceNormalsHelper",function(){return ec}),n.d(e,"DirectionalLightHelper",function(){return nc}),n.d(e,"CameraHelper",function(){return rc}),n.d(e,"BoxHelper",function(){return ic}),n.d(e,"Box3Helper",function(){return oc}),n.d(e,"PlaneHelper",function(){return ac}),n.d(e,"ArrowHelper",function(){return sc}),n.d(e,"AxesHelper",function(){return cc}),n.d(e,"Shape",function(){return Ca}),n.d(e,"Path",function(){return La}),n.d(e,"ShapePath",function(){return ds}),n.d(e,"Font",function(){return ms}),n.d(e,"CurvePath",function(){return Pa}),n.d(e,"Curve",function(){return ca}),n.d(e,"ImageUtils",function(){return ke}),n.d(e,"ShapeUtils",function(){return vo}),n.d(e,"WebGLUtils",function(){return ei}),n.d(e,"WireframeGeometry",function(){return Pi}),n.d(e,"ParametricGeometry",function(){return Li}),n.d(e,"ParametricBufferGeometry",function(){return Ci}),n.d(e,"TetrahedronGeometry",function(){return Ii}),n.d(e,"TetrahedronBufferGeometry",function(){return Ni}),n.d(e,"OctahedronGeometry",function(){return Di}),n.d(e,"OctahedronBufferGeometry",function(){return Fi}),n.d(e,"IcosahedronGeometry",function(){return Ui}),n.d(e,"IcosahedronBufferGeometry",function(){return Bi}),n.d(e,"DodecahedronGeometry",function(){return ji}),n.d(e,"DodecahedronBufferGeometry",function(){return zi}),n.d(e,"PolyhedronGeometry",function(){return Ri}),n.d(e,"PolyhedronBufferGeometry",function(){return Oi}),n.d(e,"TubeGeometry",function(){return Gi}),n.d(e,"TubeBufferGeometry",function(){return Hi}),n.d(e,"TorusKnotGeometry",function(){return ki}),n.d(e,"TorusKnotBufferGeometry",function(){return Vi}),n.d(e,"TorusGeometry",function(){return Wi}),n.d(e,"TorusBufferGeometry",function(){return Xi}),n.d(e,"TextGeometry",function(){return Mo}),n.d(e,"TextBufferGeometry",function(){return Eo}),n.d(e,"SphereGeometry",function(){return So}),n.d(e,"SphereBufferGeometry",function(){return To}),n.d(e,"RingGeometry",function(){return Ao}),n.d(e,"RingBufferGeometry",function(){return Po}),n.d(e,"PlaneGeometry",function(){return Nn}),n.d(e,"PlaneBufferGeometry",function(){return Dn}),n.d(e,"LatheGeometry",function(){return Lo}),n.d(e,"LatheBufferGeometry",function(){return Co}),n.d(e,"ShapeGeometry",function(){return Ro}),n.d(e,"ShapeBufferGeometry",function(){return Oo}),n.d(e,"ExtrudeGeometry",function(){return xo}),n.d(e,"ExtrudeBufferGeometry",function(){return _o}),n.d(e,"EdgesGeometry",function(){return No}),n.d(e,"ConeGeometry",function(){return Uo}),n.d(e,"ConeBufferGeometry",function(){return Bo}),n.d(e,"CylinderGeometry",function(){return Do}),n.d(e,"CylinderBufferGeometry",function(){return Fo}),n.d(e,"CircleGeometry",function(){return jo}),n.d(e,"CircleBufferGeometry",function(){return zo}),n.d(e,"BoxGeometry",function(){return On}),n.d(e,"BoxBufferGeometry",function(){return In}),n.d(e,"ShadowMaterial",function(){return Ho}),n.d(e,"SpriteMaterial",function(){return fi}),n.d(e,"RawShaderMaterial",function(){return ko}),n.d(e,"ShaderMaterial",function(){return jn}),n.d(e,"PointsMaterial",function(){return bi}),n.d(e,"MeshPhysicalMaterial",function(){return Wo}),n.d(e,"MeshStandardMaterial",function(){return Vo}),n.d(e,"MeshPhongMaterial",function(){return Xo}),n.d(e,"MeshToonMaterial",function(){return qo}),n.d(e,"MeshNormalMaterial",function(){return Zo}),n.d(e,"MeshLambertMaterial",function(){return Yo}),n.d(e,"MeshDepthMaterial",function(){return Kr}),n.d(e,"MeshDistanceMaterial",function(){return Qr}),n.d(e,"MeshBasicMaterial",function(){return Bn}),n.d(e,"LineDashedMaterial",function(){return Jo}),n.d(e,"LineBasicMaterial",function(){return yi}),n.d(e,"Material",function(){return Un}),n.d(e,"Float64BufferAttribute",function(){return An}),n.d(e,"Float32BufferAttribute",function(){return Tn}),n.d(e,"Uint32BufferAttribute",function(){return Sn}),n.d(e,"Int32BufferAttribute",function(){return En}),n.d(e,"Uint16BufferAttribute",function(){return Mn}),n.d(e,"Int16BufferAttribute",function(){return bn}),n.d(e,"Uint8ClampedBufferAttribute",function(){return wn}),n.d(e,"Uint8BufferAttribute",function(){return _n}),n.d(e,"Int8BufferAttribute",function(){return xn}),n.d(e,"BufferAttribute",function(){return yn}),n.d(e,"ArcCurve",function(){return ha}),n.d(e,"CatmullRomCurve3",function(){return va}),n.d(e,"CubicBezierCurve",function(){return _a}),n.d(e,"CubicBezierCurve3",function(){return wa}),n.d(e,"EllipseCurve",function(){return ua}),n.d(e,"LineCurve",function(){return ba}),n.d(e,"LineCurve3",function(){return Ma}),n.d(e,"QuadraticBezierCurve",function(){return Ea}),n.d(e,"QuadraticBezierCurve3",function(){return Sa}),n.d(e,"SplineCurve",function(){return Ta}),n.d(e,"REVISION",function(){return i}),n.d(e,"MOUSE",function(){return o}),n.d(e,"CullFaceNone",function(){return a}),n.d(e,"CullFaceBack",function(){return s}),n.d(e,"CullFaceFront",function(){return c}),n.d(e,"CullFaceFrontBack",function(){return u}),n.d(e,"FrontFaceDirectionCW",function(){return h}),n.d(e,"FrontFaceDirectionCCW",function(){return l}),n.d(e,"BasicShadowMap",function(){return f}),n.d(e,"PCFShadowMap",function(){return p}),n.d(e,"PCFSoftShadowMap",function(){return d}),n.d(e,"FrontSide",function(){return m}),n.d(e,"BackSide",function(){return v}),n.d(e,"DoubleSide",function(){return g}),n.d(e,"FlatShading",function(){return y}),n.d(e,"SmoothShading",function(){return x}),n.d(e,"NoColors",function(){return _}),n.d(e,"FaceColors",function(){return w}),n.d(e,"VertexColors",function(){return b}),n.d(e,"NoBlending",function(){return M}),n.d(e,"NormalBlending",function(){return E}),n.d(e,"AdditiveBlending",function(){return S}),n.d(e,"SubtractiveBlending",function(){return T}),n.d(e,"MultiplyBlending",function(){return A}),n.d(e,"CustomBlending",function(){return P}),n.d(e,"AddEquation",function(){return L}),n.d(e,"SubtractEquation",function(){return C}),n.d(e,"ReverseSubtractEquation",function(){return R}),n.d(e,"MinEquation",function(){return O}),n.d(e,"MaxEquation",function(){return I}),n.d(e,"ZeroFactor",function(){return N}),n.d(e,"OneFactor",function(){return D}),n.d(e,"SrcColorFactor",function(){return F}),n.d(e,"OneMinusSrcColorFactor",function(){return U}),n.d(e,"SrcAlphaFactor",function(){return B}),n.d(e,"OneMinusSrcAlphaFactor",function(){return j}),n.d(e,"DstAlphaFactor",function(){return z}),n.d(e,"OneMinusDstAlphaFactor",function(){return G}),n.d(e,"DstColorFactor",function(){return H}),n.d(e,"OneMinusDstColorFactor",function(){return k}),n.d(e,"SrcAlphaSaturateFactor",function(){return V}),n.d(e,"NeverDepth",function(){return W}),n.d(e,"AlwaysDepth",function(){return X}),n.d(e,"LessDepth",function(){return q}),n.d(e,"LessEqualDepth",function(){return Z}),n.d(e,"EqualDepth",function(){return Y}),n.d(e,"GreaterEqualDepth",function(){return J}),n.d(e,"GreaterDepth",function(){return K}),n.d(e,"NotEqualDepth",function(){return Q}),n.d(e,"MultiplyOperation",function(){return $}),n.d(e,"MixOperation",function(){return tt}),n.d(e,"AddOperation",function(){return et}),n.d(e,"NoToneMapping",function(){return nt}),n.d(e,"LinearToneMapping",function(){return rt}),n.d(e,"ReinhardToneMapping",function(){return it}),n.d(e,"Uncharted2ToneMapping",function(){return ot}),n.d(e,"CineonToneMapping",function(){return at}),n.d(e,"UVMapping",function(){return st}),n.d(e,"CubeReflectionMapping",function(){return ct}),n.d(e,"CubeRefractionMapping",function(){return ut}),n.d(e,"EquirectangularReflectionMapping",function(){return ht}),n.d(e,"EquirectangularRefractionMapping",function(){return lt}),n.d(e,"SphericalReflectionMapping",function(){return ft}),n.d(e,"CubeUVReflectionMapping",function(){return pt}),n.d(e,"CubeUVRefractionMapping",function(){return dt}),n.d(e,"RepeatWrapping",function(){return mt}),n.d(e,"ClampToEdgeWrapping",function(){return vt}),n.d(e,"MirroredRepeatWrapping",function(){return gt}),n.d(e,"NearestFilter",function(){return yt}),n.d(e,"NearestMipMapNearestFilter",function(){return xt}),n.d(e,"NearestMipMapLinearFilter",function(){return _t}),n.d(e,"LinearFilter",function(){return wt}),n.d(e,"LinearMipMapNearestFilter",function(){return bt}),n.d(e,"LinearMipMapLinearFilter",function(){return Mt}),n.d(e,"UnsignedByteType",function(){return Et}),n.d(e,"ByteType",function(){return St}),n.d(e,"ShortType",function(){return Tt}),n.d(e,"UnsignedShortType",function(){return At}),n.d(e,"IntType",function(){return Pt}),n.d(e,"UnsignedIntType",function(){return Lt}),n.d(e,"FloatType",function(){return Ct}),n.d(e,"HalfFloatType",function(){return Rt}),n.d(e,"UnsignedShort4444Type",function(){return Ot}),n.d(e,"UnsignedShort5551Type",function(){return It}),n.d(e,"UnsignedShort565Type",function(){return Nt}),n.d(e,"UnsignedInt248Type",function(){return Dt}),n.d(e,"AlphaFormat",function(){return Ft}),n.d(e,"RGBFormat",function(){return Ut}),n.d(e,"RGBAFormat",function(){return Bt}),n.d(e,"LuminanceFormat",function(){return jt}),n.d(e,"LuminanceAlphaFormat",function(){return zt}),n.d(e,"RGBEFormat",function(){return Gt}),n.d(e,"DepthFormat",function(){return Ht}),n.d(e,"DepthStencilFormat",function(){return kt}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return Vt}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return Wt}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return Xt}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return qt}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return Zt}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return Yt}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return Jt}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return Kt}),n.d(e,"RGB_ETC1_Format",function(){return Qt}),n.d(e,"RGBA_ASTC_4x4_Format",function(){return $t}),n.d(e,"RGBA_ASTC_5x4_Format",function(){return te}),n.d(e,"RGBA_ASTC_5x5_Format",function(){return ee}),n.d(e,"RGBA_ASTC_6x5_Format",function(){return ne}),n.d(e,"RGBA_ASTC_6x6_Format",function(){return re}),n.d(e,"RGBA_ASTC_8x5_Format",function(){return ie}),n.d(e,"RGBA_ASTC_8x6_Format",function(){return oe}),n.d(e,"RGBA_ASTC_8x8_Format",function(){return ae}),n.d(e,"RGBA_ASTC_10x5_Format",function(){return se}),n.d(e,"RGBA_ASTC_10x6_Format",function(){return ce}),n.d(e,"RGBA_ASTC_10x8_Format",function(){return ue}),n.d(e,"RGBA_ASTC_10x10_Format",function(){return he}),n.d(e,"RGBA_ASTC_12x10_Format",function(){return le}),n.d(e,"RGBA_ASTC_12x12_Format",function(){return fe}),n.d(e,"LoopOnce",function(){return pe}),n.d(e,"LoopRepeat",function(){return de}),n.d(e,"LoopPingPong",function(){return me}),n.d(e,"InterpolateDiscrete",function(){return ve}),n.d(e,"InterpolateLinear",function(){return ge}),n.d(e,"InterpolateSmooth",function(){return ye}),n.d(e,"ZeroCurvatureEnding",function(){return xe}),n.d(e,"ZeroSlopeEnding",function(){return _e}),n.d(e,"WrapAroundEnding",function(){return we}),n.d(e,"TrianglesDrawMode",function(){return be}),n.d(e,"TriangleStripDrawMode",function(){return Me}),n.d(e,"TriangleFanDrawMode",function(){return Ee}),n.d(e,"LinearEncoding",function(){return Se}),n.d(e,"sRGBEncoding",function(){return Te}),n.d(e,"GammaEncoding",function(){return Ae}),n.d(e,"RGBEEncoding",function(){return Pe}),n.d(e,"LogLuvEncoding",function(){return Le}),n.d(e,"RGBM7Encoding",function(){return Ce}),n.d(e,"RGBM16Encoding",function(){return Re}),n.d(e,"RGBDEncoding",function(){return Oe}),n.d(e,"BasicDepthPacking",function(){return Ie}),n.d(e,"RGBADepthPacking",function(){return Ne}),n.d(e,"TangentSpaceNormalMap",function(){return De}),n.d(e,"ObjectSpaceNormalMap",function(){return Fe}),n.d(e,"CubeGeometry",function(){return On}),n.d(e,"Face4",function(){return uc}),n.d(e,"LineStrip",function(){return hc}),n.d(e,"LinePieces",function(){return lc}),n.d(e,"MeshFaceMaterial",function(){return fc}),n.d(e,"MultiMaterial",function(){return pc}),n.d(e,"PointCloud",function(){return dc}),n.d(e,"Particle",function(){return mc}),n.d(e,"ParticleSystem",function(){return vc}),n.d(e,"PointCloudMaterial",function(){return gc}),n.d(e,"ParticleBasicMaterial",function(){return yc}),n.d(e,"ParticleSystemMaterial",function(){return xc}),n.d(e,"Vertex",function(){return _c}),n.d(e,"DynamicBufferAttribute",function(){return wc}),n.d(e,"Int8Attribute",function(){return bc}),n.d(e,"Uint8Attribute",function(){return Mc}),n.d(e,"Uint8ClampedAttribute",function(){return Ec}),n.d(e,"Int16Attribute",function(){return Sc}),n.d(e,"Uint16Attribute",function(){return Tc}),n.d(e,"Int32Attribute",function(){return Ac}),n.d(e,"Uint32Attribute",function(){return Pc}),n.d(e,"Float32Attribute",function(){return Lc}),n.d(e,"Float64Attribute",function(){return Cc}),n.d(e,"ClosedSplineCurve3",function(){return Rc}),n.d(e,"SplineCurve3",function(){return Oc}),n.d(e,"Spline",function(){return Ic}),n.d(e,"AxisHelper",function(){return Nc}),n.d(e,"BoundingBoxHelper",function(){return Dc}),n.d(e,"EdgesHelper",function(){return Fc}),n.d(e,"WireframeHelper",function(){return Uc}),n.d(e,"XHRLoader",function(){return Bc}),n.d(e,"BinaryTextureLoader",function(){return jc}),n.d(e,"GeometryUtils",function(){return zc}),n.d(e,"Projector",function(){return Gc}),n.d(e,"CanvasRenderer",function(){return Hc}),n.d(e,"SceneUtils",function(){return kc}),n.d(e,"LensFlare",function(){return Vc}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"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(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners[t];if(void 0!==n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var n=e.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,t)}}}});var i="96",o={LEFT:0,MIDDLE:1,RIGHT:2},a=0,s=1,c=2,u=3,h=0,l=1,f=0,p=1,d=2,m=0,v=1,g=2,y=1,x=2,_=0,w=1,b=2,M=0,E=1,S=2,T=3,A=4,P=5,L=100,C=101,R=102,O=103,I=104,N=200,D=201,F=202,U=203,B=204,j=205,z=206,G=207,H=208,k=209,V=210,W=0,X=1,q=2,Z=3,Y=4,J=5,K=6,Q=7,$=0,tt=1,et=2,nt=0,rt=1,it=2,ot=3,at=4,st=300,ct=301,ut=302,ht=303,lt=304,ft=305,pt=306,dt=307,mt=1e3,vt=1001,gt=1002,yt=1003,xt=1004,_t=1005,wt=1006,bt=1007,Mt=1008,Et=1009,St=1010,Tt=1011,At=1012,Pt=1013,Lt=1014,Ct=1015,Rt=1016,Ot=1017,It=1018,Nt=1019,Dt=1020,Ft=1021,Ut=1022,Bt=1023,jt=1024,zt=1025,Gt=Bt,Ht=1026,kt=1027,Vt=33776,Wt=33777,Xt=33778,qt=33779,Zt=35840,Yt=35841,Jt=35842,Kt=35843,Qt=36196,$t=37808,te=37809,ee=37810,ne=37811,re=37812,ie=37813,oe=37814,ae=37815,se=37816,ce=37817,ue=37818,he=37819,le=37820,fe=37821,pe=2200,de=2201,me=2202,ve=2300,ge=2301,ye=2302,xe=2400,_e=2401,we=2402,be=0,Me=1,Ee=2,Se=3e3,Te=3001,Ae=3007,Pe=3002,Le=3003,Ce=3004,Re=3005,Oe=3006,Ie=3200,Ne=3201,De=0,Fe=1,Ue={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&n]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[63&r|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[255&i]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]).toUpperCase()}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ue.DEG2RAD},radToDeg:function(t){return t*Ue.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function Be(t,e){this.x=t||0,this.y=e||0}function je(){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.")}function ze(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function Ge(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function He(){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.")}Object.defineProperties(Be.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(Be.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new Be,e=new Be;return function(n,r){return t.set(n,n),e.set(r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.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 t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}}),Object.assign(je.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,c,u,h,l,f,p,d,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=c,v[6]=u,v[10]=h,v[14]=l,v[3]=f,v[7]=p,v[11]=d,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 je).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(){var t=new Ge;return function(e){var n=this.elements,r=e.elements,i=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),c=Math.sin(r),u=Math.cos(i),h=Math.sin(i);if("XYZ"===t.order){var l=o*u,f=o*h,p=a*u,d=a*h;e[0]=s*u,e[4]=-s*h,e[8]=c,e[1]=f+p*c,e[5]=l-d*c,e[9]=-a*s,e[2]=d-l*c,e[6]=p+f*c,e[10]=o*s}else if("YXZ"===t.order){var m=s*u,v=s*h,g=c*u,y=c*h;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){m=s*u,v=s*h,g=c*u,y=c*h;e[0]=m-y*a,e[4]=-o*h,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*u,e[9]=y-m*a,e[2]=-o*c,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){l=o*u,f=o*h,p=a*u,d=a*h;e[0]=s*u,e[4]=p*c-f,e[8]=l*c+d,e[1]=s*h,e[5]=d*c+l,e[9]=f*c-p,e[2]=-c,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var x=o*s,_=o*c,w=a*s,b=a*c;e[0]=s*u,e[4]=b-x*h,e[8]=w*h+_,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=_*h+w,e[10]=x-b*h}else if("XZY"===t.order){x=o*s,_=o*c,w=a*s,b=a*c;e[0]=s*u,e[4]=-h,e[8]=c*u,e[1]=x*h+b,e[5]=o*u,e[9]=_*h-w,e[2]=w*h-_,e[6]=a*u,e[10]=b*h+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(){var t=new Ge(0,0,0),e=new Ge(1,1,1);return function(n){return this.compose(t,n,e)}}(),lookAt:function(){var t=new Ge,e=new Ge,n=new Ge;return function(r,i,o){var a=this.elements;return n.subVectors(r,i),0===n.lengthSq()&&(n.z=1),n.normalize(),t.crossVectors(o,n),0===t.lengthSq()&&(1===Math.abs(o.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),t.crossVectors(o,n)),t.normalize(),e.crossVectors(n,t),a[0]=t.x,a[4]=e.x,a[8]=n.x,a[1]=t.y,a[5]=e.y,a[9]=n.y,a[2]=t.z,a[6]=e.z,a[10]=n.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],c=n[12],u=n[1],h=n[5],l=n[9],f=n[13],p=n[2],d=n[6],m=n[10],v=n[14],g=n[3],y=n[7],x=n[11],_=n[15],w=r[0],b=r[4],M=r[8],E=r[12],S=r[1],T=r[5],A=r[9],P=r[13],L=r[2],C=r[6],R=r[10],O=r[14],I=r[3],N=r[7],D=r[11],F=r[15];return i[0]=o*w+a*S+s*L+c*I,i[4]=o*b+a*T+s*C+c*N,i[8]=o*M+a*A+s*R+c*D,i[12]=o*E+a*P+s*O+c*F,i[1]=u*w+h*S+l*L+f*I,i[5]=u*b+h*T+l*C+f*N,i[9]=u*M+h*A+l*R+f*D,i[13]=u*E+h*P+l*O+f*F,i[2]=p*w+d*S+m*L+v*I,i[6]=p*b+d*T+m*C+v*N,i[10]=p*M+d*A+m*R+v*D,i[14]=p*E+d*P+m*O+v*F,i[3]=g*w+y*S+x*L+_*I,i[7]=g*b+y*T+x*C+_*N,i[11]=g*M+y*A+x*R+_*D,i[15]=g*E+y*P+x*O+_*F,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new Ge;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],c=t[13],u=t[2],h=t[6],l=t[10],f=t[14];return t[3]*(+i*s*h-r*c*h-i*a*l+n*c*l+r*a*f-n*s*f)+t[7]*(+e*s*f-e*c*l+i*o*l-r*o*f+r*c*u-i*s*u)+t[11]*(+e*c*h-e*a*f-i*o*h+n*o*f+i*a*u-n*c*u)+t[15]*(-r*a*u-e*s*h+e*a*l+r*o*h-n*o*l+n*s*u)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=r[5],h=r[6],l=r[7],f=r[8],p=r[9],d=r[10],m=r[11],v=r[12],g=r[13],y=r[14],x=r[15],_=p*y*l-g*d*l+g*h*m-u*y*m-p*h*x+u*d*x,w=v*d*l-f*y*l-v*h*m+c*y*m+f*h*x-c*d*x,b=f*g*l-v*p*l+v*u*m-c*g*m-f*u*x+c*p*x,M=v*p*h-f*g*h-v*u*d+c*g*d+f*u*y-c*p*y,E=i*_+o*w+a*b+s*M;if(0===E){var S="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(S);return console.warn(S),this.identity()}var T=1/E;return n[0]=_*T,n[1]=(g*d*s-p*y*s-g*a*m+o*y*m+p*a*x-o*d*x)*T,n[2]=(u*y*s-g*h*s+g*a*l-o*y*l-u*a*x+o*h*x)*T,n[3]=(p*h*s-u*d*s-p*a*l+o*d*l+u*a*m-o*h*m)*T,n[4]=w*T,n[5]=(f*y*s-v*d*s+v*a*m-i*y*m-f*a*x+i*d*x)*T,n[6]=(v*h*s-c*y*s-v*a*l+i*y*l+c*a*x-i*h*x)*T,n[7]=(c*d*s-f*h*s+f*a*l-i*d*l-c*a*m+i*h*m)*T,n[8]=b*T,n[9]=(v*p*s-f*g*s-v*o*m+i*g*m+f*o*x-i*p*x)*T,n[10]=(c*g*s-v*u*s+v*o*l-i*g*l-c*o*x+i*u*x)*T,n[11]=(f*u*s-c*p*s-f*o*l+i*p*l+c*o*m-i*u*m)*T,n[12]=M*T,n[13]=(f*g*a-v*p*a+v*o*d-i*g*d-f*o*y+i*p*y)*T,n[14]=(v*u*a-c*g*a-v*o*h+i*g*h+c*o*y-i*u*y)*T,n[15]=(c*p*a-f*u*a+f*o*h-i*p*h-c*o*d+i*u*d)*T,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,c=i*o,u=i*a;return this.set(c*o+n,c*a-r*s,c*s+r*a,0,c*a+r*s,u*a+n,u*s-r*o,0,c*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){var r=this.elements,i=e._x,o=e._y,a=e._z,s=e._w,c=i+i,u=o+o,h=a+a,l=i*c,f=i*u,p=i*h,d=o*u,m=o*h,v=a*h,g=s*c,y=s*u,x=s*h,_=n.x,w=n.y,b=n.z;return r[0]=(1-(d+v))*_,r[1]=(f+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(f-x)*w,r[5]=(1-(l+v))*w,r[6]=(m+g)*w,r[7]=0,r[8]=(p+y)*b,r[9]=(m-g)*b,r[10]=(1-(l+d))*b,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this},decompose:function(){var t=new Ge,e=new je;return function(n,r,i){var o=this.elements,a=t.set(o[0],o[1],o[2]).length(),s=t.set(o[4],o[5],o[6]).length(),c=t.set(o[8],o[9],o[10]).length();this.determinant()<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],e.copy(this);var u=1/a,h=1/s,l=1/c;return e.elements[0]*=u,e.elements[1]*=u,e.elements[2]*=u,e.elements[4]*=h,e.elements[5]*=h,e.elements[6]*=h,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,r.setFromRotationMatrix(e),i.x=a,i.y=s,i.z=c,this}}(),makePerspective:function(t,e,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(e-t),c=2*i/(n-r),u=(e+t)/(e-t),h=(n+r)/(n-r),l=-(o+i)/(o-i),f=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=l,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),c=1/(n-r),u=1/(o-i),h=(e+t)*s,l=(n+r)*c,f=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-l,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),Object.assign(ze,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],c=n[r+1],u=n[r+2],h=n[r+3],l=i[o+0],f=i[o+1],p=i[o+2],d=i[o+3];if(h!==d||s!==l||c!==f||u!==p){var m=1-a,v=s*l+c*f+u*p+h*d,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,v*g);m=Math.sin(m*_)/x,a=Math.sin(a*_)/x}var w=a*g;if(s=s*m+l*w,c=c*m+f*w,u=u*m+p*w,h=h*m+d*w,m===1-a){var b=1/Math.sqrt(s*s+c*c+u*u+h*h);s*=b,c*=b,u*=b,h*=b}}t[e]=s,t[e+1]=c,t[e+2]=u,t[e+3]=h}}),Object.defineProperties(ze.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(ze.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,c=a(n/2),u=a(r/2),h=a(i/2),l=s(n/2),f=s(r/2),p=s(i/2);return"XYZ"===o?(this._x=l*u*h+c*f*p,this._y=c*f*h-l*u*p,this._z=c*u*p+l*f*h,this._w=c*u*h-l*f*p):"YXZ"===o?(this._x=l*u*h+c*f*p,this._y=c*f*h-l*u*p,this._z=c*u*p-l*f*h,this._w=c*u*h+l*f*p):"ZXY"===o?(this._x=l*u*h-c*f*p,this._y=c*f*h+l*u*p,this._z=c*u*p+l*f*h,this._w=c*u*h-l*f*p):"ZYX"===o?(this._x=l*u*h-c*f*p,this._y=c*f*h+l*u*p,this._z=c*u*p-l*f*h,this._w=c*u*h+l*f*p):"YZX"===o?(this._x=l*u*h+c*f*p,this._y=c*f*h+l*u*p,this._z=c*u*p-l*f*h,this._w=c*u*h-l*f*p):"XZY"===o&&(this._x=l*u*h-c*f*p,this._y=c*f*h-l*u*p,this._z=c*u*p+l*f*h,this._w=c*u*h+l*f*p),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],c=n[9],u=n[2],h=n[6],l=n[10],f=r+s+l;return f>0?(e=.5/Math.sqrt(f+1),this._w=.25/e,this._x=(h-c)*e,this._y=(o-u)*e,this._z=(a-i)*e):r>s&&r>l?(e=2*Math.sqrt(1+r-s-l),this._w=(h-c)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+u)/e):s>l?(e=2*Math.sqrt(1+s-r-l),this._w=(o-u)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(c+h)/e):(e=2*Math.sqrt(1+l-r-s),this._w=(a-i)/e,this._x=(o+u)/e,this._y=(c+h)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new Ge;return function(n,r){return void 0===e&&(e=new Ge),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs(Ue.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var n=this.angleTo(t);if(0===n)return this;var r=Math.min(1,e/n);return this.slerp(t,r),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+r*c-i*s,this._y=r*u+o*s+i*a-n*c,this._z=i*u+o*c+n*s-r*a,this._w=o*u-n*a-r*s-i*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=1-a*a;if(s<=Number.EPSILON){var c=1-e;return this._w=c*o+e*this._w,this._x=c*n+e*this._x,this._y=c*r+e*this._y,this._z=c*i+e*this._z,this.normalize()}var u=Math.sqrt(s),h=Math.atan2(u,a),l=Math.sin((1-e)*h)/u,f=Math.sin(e*h)/u;return this._w=o*l+this._w*f,this._x=n*l+this._x*f,this._y=r*l+this._y*f,this._z=i*l+this._z*f,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(Ge.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new ze;return function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new ze;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,c=s*e+o*r-a*n,u=s*n+a*e-i*r,h=s*r+i*n-o*e,l=-i*e-o*n-a*r;return this.x=c*s+l*-i+u*-a-h*-o,this.y=u*s+l*-o+h*-i-c*-a,this.z=h*s+l*-a+c*-o-u*-i,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new je;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new Ge,e=new Ge;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new Ge;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new Ge;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ue.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)},setFromSphericalCoords:function(t,e,n){var r=Math.sin(e)*t;return this.x=r*Math.sin(n),this.y=Math.cos(e)*t,this.z=r*Math.cos(n),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(He.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,c){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=e,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[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(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new Ge;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],c=n[1],u=n[4],h=n[7],l=n[2],f=n[5],p=n[8],d=r[0],m=r[3],v=r[6],g=r[1],y=r[4],x=r[7],_=r[2],w=r[5],b=r[8];return i[0]=o*d+a*g+s*_,i[3]=o*m+a*y+s*w,i[6]=o*v+a*x+s*b,i[1]=c*d+u*g+h*_,i[4]=c*m+u*y+h*w,i[7]=c*v+u*x+h*b,i[2]=l*d+f*g+p*_,i[5]=l*m+f*y+p*w,i[8]=l*v+f*x+p*b,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*i*u+n*a*s+r*i*c-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],c=n[4],u=n[5],h=n[6],l=n[7],f=n[8],p=f*c-u*l,d=u*h-f*s,m=l*s-c*h,v=i*p+o*d+a*m;if(0===v){var g="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=p*y,r[1]=(a*l-f*o)*y,r[2]=(u*o-a*c)*y,r[3]=d*y,r[4]=(f*i-a*h)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*h-l*i)*y,r[8]=(c*i-o*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,n,r,i,o,a){var s=Math.cos(i),c=Math.sin(i);this.set(n*s,n*c,-n*(s*o+c*a)+o+t,-r*c,r*s,-r*(-c*o+s*a)+a+e,0,0,1)},scale:function(t,e){var n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],c=r[4],u=r[7];return r[0]=e*i+n*s,r[3]=e*o+n*c,r[6]=e*a+n*u,r[1]=-n*i+e*s,r[4]=-n*o+e*c,r[7]=-n*a+e*u,this},translate:function(t,e){var n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}});var ke={getDataURL:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var n=e.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},Ve=0;function We(t,e,n,r,i,o,a,s,c,u){Object.defineProperty(this,"id",{value:Ve++}),this.uuid=Ue.generateUUID(),this.name="",this.image=void 0!==t?t:We.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:We.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:vt,this.wrapT=void 0!==r?r:vt,this.magFilter=void 0!==i?i:wt,this.minFilter=void 0!==o?o:Mt,this.anisotropy=void 0!==c?c:1,this.format=void 0!==a?a:Bt,this.type=void 0!==s?s:Et,this.offset=new Be(0,0),this.repeat=new Be(1,1),this.center=new Be(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new He,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:Se,this.version=0,this.onUpdate=null}function Xe(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function qe(t,e,n){this.width=t,this.height=e,this.scissor=new Xe(0,0,t,e),this.scissorTest=!1,this.viewport=new Xe(0,0,t,e),void 0===(n=n||{}).minFilter&&(n.minFilter=wt),this.texture=new We(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.generateMipmaps=void 0===n.generateMipmaps||n.generateMipmaps,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function Ze(t,e,n){qe.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function Ye(t,e,n,r,i,o,a,s,c,u,h,l){We.call(this,null,o,a,s,c,u,r,i,h,l),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:yt,this.minFilter=void 0!==u?u:yt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function Je(t,e){this.min=void 0!==t?t:new Ge(1/0,1/0,1/0),this.max=void 0!==e?e:new Ge(-1/0,-1/0,-1/0)}function Ke(t,e){this.center=void 0!==t?t:new Ge,this.radius=void 0!==e?e:0}function Qe(t,e){this.normal=void 0!==t?t:new Ge(1,0,0),this.constant=void 0!==e?e:0}function $e(t,e,n,r,i,o){this.planes=[void 0!==t?t:new Qe,void 0!==e?e:new Qe,void 0!==n?n:new Qe,void 0!==r?r:new Qe,void 0!==i?i:new Qe,void 0!==o?o:new Qe]}We.DEFAULT_IMAGE=void 0,We.DEFAULT_MAPPING=st,We.prototype=Object.assign(Object.create(r.prototype),{constructor:We,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(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=Ue.generateUUID()),!e&&void 0===t.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var o=0,a=r.length;o<a;o++)i.push(ke.getDataURL(r[o]))}else i=ke.getDataURL(r);t.images[r.uuid]={uuid:r.uuid,url:i}}n.image=r.uuid}return e||(t.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==st)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case mt:t.x=t.x-Math.floor(t.x);break;case vt:t.x=t.x<0?0:1;break;case gt:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case mt:t.y=t.y-Math.floor(t.y);break;case vt:t.y=t.y<0?0:1;break;case gt:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(We.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Xe.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){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: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],c=o[8],u=o[1],h=o[5],l=o[9],f=o[2],p=o[6],d=o[10];if(Math.abs(s-u)<.01&&Math.abs(c-f)<.01&&Math.abs(l-p)<.01){if(Math.abs(s+u)<.1&&Math.abs(c+f)<.1&&Math.abs(l+p)<.1&&Math.abs(a+h+d-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(h+1)/2,g=(d+1)/2,y=(s+u)/4,x=(c+f)/4,_=(l+p)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=x/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=x/(i=Math.sqrt(g)),r=_/i),this.set(n,r,i,e),this}var w=Math.sqrt((p-l)*(p-l)+(c-f)*(c-f)+(u-s)*(u-s));return Math.abs(w)<.001&&(w=1),this.x=(p-l)/w,this.y=(c-f)/w,this.z=(u-s)/w,this.w=Math.acos((a+h+d-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(n,r){return void 0===t&&(t=new Xe,e=new Xe),t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))},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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),qe.prototype=Object.assign(Object.create(r.prototype),{constructor:qe,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Ze.prototype=Object.create(qe.prototype),Ze.prototype.constructor=Ze,Ze.prototype.isWebGLRenderTargetCube=!0,Ye.prototype=Object.create(We.prototype),Ye.prototype.constructor=Ye,Ye.prototype.isDataTexture=!0,Object.assign(Je.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.length;s<c;s+=3){var u=t[s],h=t[s+1],l=t[s+2];u<e&&(e=u),h<n&&(n=h),l<r&&(r=l),u>i&&(i=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,c=t.count;s<c;s++){var u=t.getX(s),h=t.getY(s),l=t.getZ(s);u<e&&(e=u),h<n&&(n=h),l<r&&(r=l),u>i&&(i=u),h>o&&(o=h),l>a&&(a=l)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Ge;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.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(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new Ge),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new Ge),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t,e,n,r=new Ge;function i(i){var o=i.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(e=0,n=a.length;e<n;e++)r.copy(a[e]),r.applyMatrix4(i.matrixWorld),t.expandByPoint(r)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(e=0,n=s.count;e<n;e++)r.fromBufferAttribute(s,e).applyMatrix4(i.matrixWorld),t.expandByPoint(r)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(i),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new Ge),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new Ge;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},intersectsTriangle:function(){var t=new Ge,e=new Ge,n=new Ge,r=new Ge,i=new Ge,o=new Ge,a=new Ge,s=new Ge,c=new Ge,u=new Ge;function h(r){var i,o;for(i=0,o=r.length-3;i<=o;i+=3){a.fromArray(r,i);var s=c.x*Math.abs(a.x)+c.y*Math.abs(a.y)+c.z*Math.abs(a.z),u=t.dot(a),h=e.dot(a),l=n.dot(a);if(Math.max(-Math.max(u,h,l),Math.min(u,h,l))>s)return!1}return!0}return function(a){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(a.a,s),e.subVectors(a.b,s),n.subVectors(a.c,s),r.subVectors(e,t),i.subVectors(n,e),o.subVectors(t,n);var l=[0,-r.z,r.y,0,-i.z,i.y,0,-o.z,o.y,r.z,0,-r.x,i.z,0,-i.x,o.z,0,-o.x,-r.y,r.x,0,-i.y,i.x,0,-o.y,o.x,0];return!!h(l)&&(!!h(l=[1,0,0,0,1,0,0,0,1])&&(u.crossVectors(r,i),h(l=[u.x,u.y,u.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new Ge),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Ge;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new Ge;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Ke),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge,new Ge];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ke.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new Je;return function(e,n){var r=this.center;void 0!==n?r.copy(n):t.setFromPoints(e).getCenter(r);for(var i=0,o=0,a=e.length;o<a;o++)i=Math.max(i,r.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new Ge),e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new Je),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(Qe.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new Ge,e=new Ge;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new Ge),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new Ge;return function(e,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ge);var r=e.delta(t),i=this.normal.dot(r);if(0===i)return 0===this.distanceToPoint(e.start)?n.copy(e.start):void 0;var o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new Ge),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new Ge,e=new He;return function(n,r){var i=r||e.getNormalMatrix(n),o=this.coplanarPoint(t).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign($e.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],h=n[7],l=n[8],f=n[9],p=n[10],d=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,h-s,d-l,y-m).normalize(),e[1].setComponents(a+r,h+s,d+l,y+m).normalize(),e[2].setComponents(a+i,h+c,d+f,y+v).normalize(),e[3].setComponents(a-i,h-c,d-f,y-v).normalize(),e[4].setComponents(a-o,h-u,d-p,y-g).normalize(),e[5].setComponents(a+o,h+u,d+p,y+g).normalize(),this},intersectsObject:function(){var t=new Ke;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new Ke;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var t=new Ge;return function(e){for(var n=this.planes,r=0;r<6;r++){var i=n[r];if(t.x=i.normal.x>0?e.max.x:e.min.x,t.y=i.normal.y>0?e.max.y:e.min.y,t.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(t)<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}});var tn={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\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}\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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, 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_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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\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",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#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\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#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#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(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}\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};\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}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.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 = value.rgb * cLogLuvM;\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 = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, 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_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\tenvColor = envMapTexelToLinear( envColor );\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\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\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\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 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 blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, 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\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\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\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\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\n",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif\n",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\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\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = 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\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\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\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"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\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\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)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#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#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\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}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\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#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? 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#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? 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#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? 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 irradiance = getAmbientLightIrradiance( ambientLightColor );\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\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * 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( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif\n",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\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}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( 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\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\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\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( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, 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( 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 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\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\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\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 )\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\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\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\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\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\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\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\tshadow *= bool( pointLight.shadow ) ? 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}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform 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\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#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}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\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}\n",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\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}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\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\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <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}\n",meshbasic_frag:"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_pars_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\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * 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 <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\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_pars_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#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}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\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}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_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}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\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_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 <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 <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\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}\n",meshphysical_vert:"#define PHYSICAL\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}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\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>\nvoid main() {\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}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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>\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#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#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\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}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#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}\n",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_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 <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}\n",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\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}\n"},en={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t)for(var r in e[n]={},t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}return e}},nn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rn(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}Object.assign(rn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ue.euclideanModulo(e,1),n=Ue.clamp(n,0,1),r=Ue.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,e(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,e(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u,h=(u=n[1]).length;if(3===h)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(u=nn[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(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(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=0,n=0;else{var u=a-s;switch(n=c<=.5?u/(a+s):u/(2-a-s),a){case r:e=(i-o)/u+(i<o?6:0);break;case i:e=(o-r)/u+2;break;case o:e=(r-i)/u+4}e/=6}return t.h=e,t.s=n,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,n,r){return this.getHSL(t),t.h+=e,t.s+=n,t.l+=r,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(n,r){this.getHSL(t),n.getHSL(e);var i=Ue.lerp(t.h,e.h,r),o=Ue.lerp(t.s,e.s,r),a=Ue.lerp(t.l,e.l,r);return this.setHSL(i,o,a),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var on={common:{diffuse:{value:new rn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new He},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 Be(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 rn(16777215)}},lights:{ambientLightColor:{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 rn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new He}},sprite:{diffuse:{value:new rn(15658734)},opacity:{value:1},center:{value:new Be(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new He}}},an={basic:{uniforms:en.merge([on.common,on.specularmap,on.envmap,on.aomap,on.lightmap,on.fog]),vertexShader:tn.meshbasic_vert,fragmentShader:tn.meshbasic_frag},lambert:{uniforms:en.merge([on.common,on.specularmap,on.envmap,on.aomap,on.lightmap,on.emissivemap,on.fog,on.lights,{emissive:{value:new rn(0)}}]),vertexShader:tn.meshlambert_vert,fragmentShader:tn.meshlambert_frag},phong:{uniforms:en.merge([on.common,on.specularmap,on.envmap,on.aomap,on.lightmap,on.emissivemap,on.bumpmap,on.normalmap,on.displacementmap,on.gradientmap,on.fog,on.lights,{emissive:{value:new rn(0)},specular:{value:new rn(1118481)},shininess:{value:30}}]),vertexShader:tn.meshphong_vert,fragmentShader:tn.meshphong_frag},standard:{uniforms:en.merge([on.common,on.envmap,on.aomap,on.lightmap,on.emissivemap,on.bumpmap,on.normalmap,on.displacementmap,on.roughnessmap,on.metalnessmap,on.fog,on.lights,{emissive:{value:new rn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:tn.meshphysical_vert,fragmentShader:tn.meshphysical_frag},points:{uniforms:en.merge([on.points,on.fog]),vertexShader:tn.points_vert,fragmentShader:tn.points_frag},dashed:{uniforms:en.merge([on.common,on.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:tn.linedashed_vert,fragmentShader:tn.linedashed_frag},depth:{uniforms:en.merge([on.common,on.displacementmap]),vertexShader:tn.depth_vert,fragmentShader:tn.depth_frag},normal:{uniforms:en.merge([on.common,on.bumpmap,on.normalmap,on.displacementmap,{opacity:{value:1}}]),vertexShader:tn.normal_vert,fragmentShader:tn.normal_frag},sprite:{uniforms:en.merge([on.sprite,on.fog]),vertexShader:tn.sprite_vert,fragmentShader:tn.sprite_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:tn.cube_vert,fragmentShader:tn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:tn.equirect_vert,fragmentShader:tn.equirect_frag},distanceRGBA:{uniforms:en.merge([on.common,on.displacementmap,{referencePosition:{value:new Ge},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:tn.distanceRGBA_vert,fragmentShader:tn.distanceRGBA_frag},shadow:{uniforms:en.merge([on.lights,on.fog,{color:{value:new rn(0)},opacity:{value:1}}]),vertexShader:tn.shadow_vert,fragmentShader:tn.shadow_frag}};function sn(){var t=null,e=!1,n=null;function r(i,o){!1!==e&&(n(i,o),t.requestAnimationFrame(r))}return{start:function(){!0!==e&&null!==n&&(t.requestAnimationFrame(r),e=!0)},stop:function(){e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function cn(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=e.get(n);void 0===i?e.set(n,function(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(n,r)):i.version<n.version&&(function(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}(i.buffer,n,r),i.version=n.version)}}}function un(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||un.DefaultOrder}function hn(){this.mask=1}an.physical={uniforms:en.merge([an.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:tn.meshphysical_vert,fragmentShader:tn.meshphysical_frag},un.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],un.DefaultOrder="XYZ",Object.defineProperties(un.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(un.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var r=Ue.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],c=i[1],u=i[5],h=i[9],l=i[2],f=i[6],p=i[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,u),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(s,p),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-l,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(f,-1,1)),Math.abs(f)<.99999?(this._y=Math.atan2(-l,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o))):"ZYX"===e?(this._y=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(f,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===e?(this._z=Math.asin(r(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-l,o)):(this._x=0,this._y=Math.atan2(s,p))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(f,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-h,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new je;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new ze;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new Ge(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(hn.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var ln=0;function fn(){Object.defineProperty(this,"id",{value:ln++}),this.uuid=Ue.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=fn.DefaultUp.clone();var t=new Ge,e=new un,n=new ze,r=new Ge(1,1,1);e.onChange(function(){n.setFromEuler(e,!1)}),n.onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:n},scale:{enumerable:!0,value:r},modelViewMatrix:{value:new je},normalMatrix:{value:new He}}),this.matrix=new je,this.matrixWorld=new je,this.matrixAutoUpdate=fn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new hn,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function pn(){fn.call(this),this.type="Camera",this.matrixWorldInverse=new je,this.projectionMatrix=new je,this.projectionMatrixInverse=new je}function dn(t,e,n,r,i,o){pn.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function mn(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new Ge,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new rn,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}fn.DefaultUp=new Ge(0,1,0),fn.DefaultMatrixAutoUpdate=!0,fn.prototype=Object.assign(Object.create(r.prototype),{constructor:fn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new ze;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new ze;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new Ge(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new Ge(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new Ge(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new Ge;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new Ge(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new Ge(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new Ge(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new je;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new ze,e=new je,n=new Ge,r=new Ge;return function(i,o,a){i.isVector3?n.copy(i):n.set(i,o,a);var s=this.parent;this.updateWorldMatrix(!0,!1),r.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(r,n,this.up):e.lookAt(n,r,this.up),this.quaternion.setFromRotationMatrix(e),s&&(e.extractRotation(s.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var n=this.children.indexOf(t);return-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new Ge),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new Ge,e=new Ge;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),n=new ze),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,n,e),n}}(),getWorldScale:function(){var t=new Ge,e=new ze;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new Ge),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,n),n}}(),getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new Ge),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e)for(var r=this.children,i=0,o=r.length;i<o;i++)r[i].updateWorldMatrix(!1,!0)},toJSON:function(t){var e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){r.geometry=i(t.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,c=a.length;s<c;s++){var u=a[s];i(t.shapes,u)}else i(t.shapes,a)}}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(t.materials,this.material[s]));r.material=h}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(s=0;s<this.children.length;s++)r.children.push(this.children[s].toJSON(t).object)}if(e){var l=m(t.geometries),f=m(t.materials),p=m(t.textures),d=m(t.images);a=m(t.shapes);l.length>0&&(n.geometries=l),f.length>0&&(n.materials=f),p.length>0&&(n.textures=p),d.length>0&&(n.images=d),a.length>0&&(n.shapes=a)}return n.object=r,n;function m(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),pn.prototype=Object.assign(Object.create(fn.prototype),{constructor:pn,isCamera:!0,copy:function(t,e){return fn.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new Ge),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){fn.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),dn.prototype=Object.assign(Object.create(pn.prototype),{constructor:dn,isOrthographicCamera:!0,copy:function(t,e){return pn.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),h=(this.right-this.left)/this.view.width,l=(this.top-this.bottom)/this.view.height;o=(i+=h*(this.view.offsetX/c))+h*(this.view.width/c),s=(a-=l*(this.view.offsetY/u))-l*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){var e=fn.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(mn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var vn=0;function gn(){Object.defineProperty(this,"id",{value:vn+=2}),this.uuid=Ue.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}function yn(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function xn(t,e,n){yn.call(this,new Int8Array(t),e,n)}function _n(t,e,n){yn.call(this,new Uint8Array(t),e,n)}function wn(t,e,n){yn.call(this,new Uint8ClampedArray(t),e,n)}function bn(t,e,n){yn.call(this,new Int16Array(t),e,n)}function Mn(t,e,n){yn.call(this,new Uint16Array(t),e,n)}function En(t,e,n){yn.call(this,new Int32Array(t),e,n)}function Sn(t,e,n){yn.call(this,new Uint32Array(t),e,n)}function Tn(t,e,n){yn.call(this,new Float32Array(t),e,n)}function An(t,e,n){yn.call(this,new Float64Array(t),e,n)}function Pn(){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 Ln(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}gn.prototype=Object.assign(Object.create(r.prototype),{constructor:gn,isGeometry:!0,applyMatrix:function(t){for(var e=(new He).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new je;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new je;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new je;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new je;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new je;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new fn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){var e=this,n=null!==t.index?t.index.array:void 0,r=t.attributes,i=r.position.array,o=void 0!==r.normal?r.normal.array:void 0,a=void 0!==r.color?r.color.array:void 0,s=void 0!==r.uv?r.uv.array:void 0,c=void 0!==r.uv2?r.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var u=[],h=[],l=[],f=0,p=0;f<i.length;f+=3,p+=2)e.vertices.push(new Ge(i[f],i[f+1],i[f+2])),void 0!==o&&u.push(new Ge(o[f],o[f+1],o[f+2])),void 0!==a&&e.colors.push(new rn(a[f],a[f+1],a[f+2])),void 0!==s&&h.push(new Be(s[p],s[p+1])),void 0!==c&&l.push(new Be(c[p],c[p+1]));function d(t,n,r,i){var f=new mn(t,n,r,void 0!==o?[u[t].clone(),u[n].clone(),u[r].clone()]:[],void 0!==a?[e.colors[t].clone(),e.colors[n].clone(),e.colors[r].clone()]:[],i);e.faces.push(f),void 0!==s&&e.faceVertexUvs[0].push([h[t].clone(),h[n].clone(),h[r].clone()]),void 0!==c&&e.faceVertexUvs[1].push([l[t].clone(),l[n].clone(),l[r].clone()])}var m=t.groups;if(m.length>0)for(f=0;f<m.length;f++)for(var v=m[f],g=v.start,y=(p=g,g+v.count);p<y;p+=3)void 0!==n?d(n[p],n[p+1],n[p+2],v.materialIndex):d(p,p+1,p+2,v.materialIndex);else if(void 0!==n)for(f=0;f<n.length;f+=3)d(n[f],n[f+1],n[f+2]);else for(f=0;f<i.length/3;f+=3)d(f,f+1,f+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new Ge;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new je;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new Ge,e=new Ge,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){var e,n,r,i,o,a;for(void 0===t&&(t=!0),a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new Ge;if(t){var s,c,u,h=new Ge,l=new Ge;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],c=this.vertices[o.b],u=this.vertices[o.c],h.subVectors(u,c),l.subVectors(s,c),h.cross(l),a[o.a].add(h),a[o.b].add(h),a[o.c].add(h)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)a[(o=this.faces[r]).a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){var f=(o=this.faces[r]).vertexNormals;3===f.length?(f[0].copy(a[o.a]),f[1].copy(a[o.b]),f[2].copy(a[o.c])):(f[0]=a[o.a].clone(),f[1]=a[o.b].clone(),f[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var r=(n=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for((i=this.faces[n]).__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new gn;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)c=new Ge,u={a:new Ge,b:new Ge,c:new Ge},a.push(c),s.push(u)}var c,u,h=this.morphNormals[t];for(o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),n=0,r=this.faces.length;n<r;n++)i=this.faces[n],c=h.faceNormals[n],u=h.vertexNormals[n],c.copy(i.normal),u.a.copy(i.vertexNormals[0]),u.b.copy(i.vertexNormals[1]),u.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)(i=this.faces[n]).normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Je),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new Ke),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(t&&t.isGeometry){var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,c=t.faces,u=this.faceVertexUvs[0],h=t.faceVertexUvs[0],l=this.colors,f=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new He).getNormalMatrix(e));for(var p=0,d=a.length;p<d;p++){var m=a[p].clone();void 0!==e&&m.applyMatrix4(e),o.push(m)}for(p=0,d=f.length;p<d;p++)l.push(f[p].clone());for(p=0,d=c.length;p<d;p++){var v,g,y,x=c[p],_=x.vertexNormals,w=x.vertexColors;(v=new mn(x.a+i,x.b+i,x.c+i)).normal.copy(x.normal),void 0!==r&&v.normal.applyMatrix3(r).normalize();for(var b=0,M=_.length;b<M;b++)g=_[b].clone(),void 0!==r&&g.applyMatrix3(r).normalize(),v.vertexNormals.push(g);v.color.copy(x.color);for(b=0,M=w.length;b<M;b++)y=w[b],v.vertexColors.push(y.clone());v.materialIndex=x.materialIndex+n,s.push(v)}for(p=0,d=h.length;p<d;p++){var E=h[p],S=[];if(void 0!==E){for(b=0,M=E.length;b<M;b++)S.push(E[b].clone());u.push(S)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,n,r,i,o,a,s,c={},u=[],h=[],l=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],void 0===c[e=Math.round(t.x*l)+"_"+Math.round(t.y*l)+"_"+Math.round(t.z*l)]?(c[e]=n,u.push(this.vertices[n]),h[n]=u.length-1):h[n]=h[c[e]];var f=[];for(n=0,r=this.faces.length;n<r;n++){(i=this.faces[n]).a=h[i.a],i.b=h[i.b],i.c=h[i.c],o=[i.a,i.b,i.c];for(var p=0;p<3;p++)if(o[p]===o[(p+1)%3]){f.push(n);break}}for(n=f.length-1;n>=0;n--){var d=f[n];for(this.faces.splice(d,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(d,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(t){this.vertices=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];this.vertices.push(new Ge(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,n=0;n<e;n++)t[n]._id=n;t.sort(function(t,e){return t.materialIndex-e.materialIndex});var r,i,o=this.faceVertexUvs[0],a=this.faceVertexUvs[1];o&&o.length===e&&(r=[]),a&&a.length===e&&(i=[]);for(n=0;n<e;n++){var s=t[n]._id;r&&r.push(o[s]),i&&i.push(a[s])}r&&(this.faceVertexUvs[0]=r),i&&(this.faceVertexUvs[1]=i)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}for(var r=[],i=0;i<this.vertices.length;i++){var o=this.vertices[i];r.push(o.x,o.y,o.z)}var a=[],s=[],c={},u=[],h={},l=[],f={};for(i=0;i<this.faces.length;i++){var p=this.faces[i],d=void 0!==this.faceVertexUvs[0][i],m=p.normal.length()>0,v=p.vertexNormals.length>0,g=1!==p.color.r||1!==p.color.g||1!==p.color.b,y=p.vertexColors.length>0,x=0;if(x=M(x=M(x=M(x=M(x=M(x=M(x=M(x=M(x,0,0),1,!0),2,!1),3,d),4,m),5,v),6,g),7,y),a.push(x),a.push(p.a,p.b,p.c),a.push(p.materialIndex),d){var _=this.faceVertexUvs[0][i];a.push(T(_[0]),T(_[1]),T(_[2]))}if(m&&a.push(E(p.normal)),v){var w=p.vertexNormals;a.push(E(w[0]),E(w[1]),E(w[2]))}if(g&&a.push(S(p.color)),y){var b=p.vertexColors;a.push(S(b[0]),S(b[1]),S(b[2]))}}function M(t,e,n){return n?t|1<<e:t&~(1<<e)}function E(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]?c[e]:(c[e]=s.length/3,s.push(t.x,t.y,t.z),c[e])}function S(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==h[e]?h[e]:(h[e]=u.length,u.push(t.getHex()),h[e])}function T(t){var e=t.x.toString()+t.y.toString();return void 0!==f[e]?f[e]:(f[e]=l.length/2,l.push(t.x,t.y),f[e])}return t.data={},t.data.vertices=r,t.data.normals=s,u.length>0&&(t.data.colors=u),l.length>0&&(t.data.uvs=[l]),t.data.faces=a,t},clone:function(){return(new gn).copy(this)},copy:function(t){var e,n,r,i,o,a;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=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,n=c.length;e<n;e++)this.colors.push(c[e].clone());var u=t.faces;for(e=0,n=u.length;e<n;e++)this.faces.push(u[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var h=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=h.length;r<i;r++){var l=h[r],f=[];for(o=0,a=l.length;o<a;o++){var p=l[o];f.push(p.clone())}this.faceVertexUvs[e].push(f)}}var d=t.morphTargets;for(e=0,n=d.length;e<n;e++){var m={};if(m.name=d[e].name,void 0!==d[e].vertices)for(m.vertices=[],r=0,i=d[e].vertices.length;r<i;r++)m.vertices.push(d[e].vertices[r].clone());if(void 0!==d[e].normals)for(m.normals=[],r=0,i=d[e].normals.length;r<i;r++)m.normals.push(d[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],x={};x.a=y.a.clone(),x.b=y.b.clone(),x.c=y.c.clone(),g.vertexNormals.push(x)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var w=t.skinIndices;for(e=0,n=w.length;e<n;e++)this.skinIndices.push(w[e].clone());var b=t.lineDistances;for(e=0,n=b.length;e<n;e++)this.lineDistances.push(b[e]);var M=t.boundingBox;null!==M&&(this.boundingBox=M.clone());var E=t.boundingSphere;return null!==E&&(this.boundingSphere=E.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(yn.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(yn.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new rn),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new Be),e[n++]=o.x,e[n++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new Ge),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new Xe),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),xn.prototype=Object.create(yn.prototype),xn.prototype.constructor=xn,_n.prototype=Object.create(yn.prototype),_n.prototype.constructor=_n,wn.prototype=Object.create(yn.prototype),wn.prototype.constructor=wn,bn.prototype=Object.create(yn.prototype),bn.prototype.constructor=bn,Mn.prototype=Object.create(yn.prototype),Mn.prototype.constructor=Mn,En.prototype=Object.create(yn.prototype),En.prototype.constructor=En,Sn.prototype=Object.create(yn.prototype),Sn.prototype.constructor=Sn,Tn.prototype=Object.create(yn.prototype),Tn.prototype.constructor=Tn,An.prototype=Object.create(yn.prototype),An.prototype.constructor=An,Object.assign(Pn.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,i=t.faceVertexUvs,o=i[0]&&i[0].length>0,a=i[1]&&i[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var u=0;u<c;u++)e[u]={name:s[u].name,data:[]};this.morphTargets.position=e}var h,l=t.morphNormals,f=l.length;if(f>0){h=[];for(u=0;u<f;u++)h[u]={name:l[u].name,data:[]};this.morphTargets.normal=h}var p=t.skinIndices,d=t.skinWeights,m=p.length===r.length,v=d.length===r.length;r.length>0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(u=0;u<n.length;u++){var g=n[u];this.vertices.push(r[g.a],r[g.b],r[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 _,w=g.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var b=g.color;this.colors.push(b,b,b)}if(!0===o)void 0!==(_=i[0][u])?this.uvs.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new Be,new Be,new Be));if(!0===a)void 0!==(_=i[1][u])?this.uvs2.push(_[0],_[1],_[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new Be,new Be,new Be));for(var M=0;M<c;M++){var E=s[M].vertices;e[M].data.push(E[g.a],E[g.b],E[g.c])}for(M=0;M<f;M++){var S=l[M].vertexNormals[u];h[M].data.push(S.a,S.b,S.c)}m&&this.skinIndices.push(p[g.a],p[g.b],p[g.c]),v&&this.skinWeights.push(d[g.a],d[g.b],d[g.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Cn=1;function Rn(){Object.defineProperty(this,"id",{value:Cn+=2}),this.uuid=Ue.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function On(t,e,n,r,i,o){gn.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new In(t,e,n,r,i,o)),this.mergeVertices()}function In(t,e,n,r,i,o){Rn.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var a=this;t=t||1,e=e||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1;var s=[],c=[],u=[],h=[],l=0,f=0;function p(t,e,n,r,i,o,p,d,m,v,g){var y,x,_=o/m,w=p/v,b=o/2,M=p/2,E=d/2,S=m+1,T=v+1,A=0,P=0,L=new Ge;for(x=0;x<T;x++){var C=x*w-M;for(y=0;y<S;y++){var R=y*_-b;L[t]=R*r,L[e]=C*i,L[n]=E,c.push(L.x,L.y,L.z),L[t]=0,L[e]=0,L[n]=d>0?1:-1,u.push(L.x,L.y,L.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=l+y+S*x,I=l+y+S*(x+1),N=l+(y+1)+S*(x+1),D=l+(y+1)+S*x;s.push(O,I,D),s.push(I,N,D),P+=6}a.addGroup(f,P,g),f+=P,l+=A}p("z","y","x",-1,-1,n,e,t,o=Math.floor(o)||1,i,0),p("z","y","x",1,-1,n,e,-t,o,i,1),p("x","z","y",1,1,t,n,e,r,o,2),p("x","z","y",1,-1,t,n,-e,r,o,3),p("x","y","z",1,-1,t,e,n,r,i,4),p("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(s),this.addAttribute("position",new Tn(c,3)),this.addAttribute("normal",new Tn(u,3)),this.addAttribute("uv",new Tn(h,2))}function Nn(t,e,n,r){gn.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Dn(t,e,n,r)),this.mergeVertices()}function Dn(t,e,n,r){Rn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(n)||1,u=Math.floor(r)||1,h=c+1,l=u+1,f=t/c,p=e/u,d=[],m=[],v=[],g=[];for(o=0;o<l;o++){var y=o*p-s;for(i=0;i<h;i++){var x=i*f-a;m.push(x,-y,0),v.push(0,0,1),g.push(i/c),g.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<c;i++){var _=i+h*o,w=i+h*(o+1),b=i+1+h*(o+1),M=i+1+h*o;d.push(_,w,M),d.push(w,b,M)}this.setIndex(d),this.addAttribute("position",new Tn(m,3)),this.addAttribute("normal",new Tn(v,3)),this.addAttribute("uv",new Tn(g,2))}Rn.prototype=Object.assign(Object.create(r.prototype),{constructor:Rn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(Ln(t)>65535?Sn:Mn)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new yn(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new He).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new je;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new je;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new je;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new je;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new je;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new fn;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new Ge;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Tn(3*e.vertices.length,3),r=new Tn(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Tn(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];e.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new Tn(e,3)),this},updateFromObject:function(t){var e,n=t.geometry;if(t.isMesh){var r=n.__directGeometry;if(!0===n.elementsNeedUpdate&&(r=void 0,n.elementsNeedUpdate=!1),void 0===r)return this.fromGeometry(n);r.verticesNeedUpdate=n.verticesNeedUpdate,r.normalsNeedUpdate=n.normalsNeedUpdate,r.colorsNeedUpdate=n.colorsNeedUpdate,r.uvsNeedUpdate=n.uvsNeedUpdate,r.groupsNeedUpdate=n.groupsNeedUpdate,n.verticesNeedUpdate=!1,n.normalsNeedUpdate=!1,n.colorsNeedUpdate=!1,n.uvsNeedUpdate=!1,n.groupsNeedUpdate=!1,n=r}return!0===n.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(n.vertices),e.needsUpdate=!0),n.verticesNeedUpdate=!1),!0===n.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(n.normals),e.needsUpdate=!0),n.normalsNeedUpdate=!1),!0===n.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(n.colors),e.needsUpdate=!0),n.colorsNeedUpdate=!1),n.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(n.uvs),e.needsUpdate=!0),n.uvsNeedUpdate=!1),n.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(n.lineDistances),e.needsUpdate=!0),n.lineDistancesNeedUpdate=!1),n.groupsNeedUpdate&&(n.computeGroups(t.geometry),this.groups=n.groups,n.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Pn).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new yn(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new yn(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new yn(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new yn(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new yn(o,2).copyVector2sArray(t.uvs2))}for(var a in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[a],u=0,h=c.length;u<h;u++){var l=c[u],f=new Tn(3*l.data.length,3);f.name=l.name,s.push(f.copyVector3sArray(l.data))}this.morphAttributes[a]=s}if(t.skinIndices.length>0){var p=new Tn(4*t.skinIndices.length,4);this.addAttribute("skinIndex",p.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var d=new Tn(4*t.skinWeights.length,4);this.addAttribute("skinWeight",d.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Je);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):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(){var t=new Je,e=new Ge;return function(){null===this.boundingSphere&&(this.boundingSphere=new Ke);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(i),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 t=this.index,e=this.attributes;if(e.position){var n=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new yn(new Float32Array(n.length),3));else for(var r=e.normal.array,i=0,o=r.length;i<o;i++)r[i]=0;var a,s,c,u=e.normal.array,h=new Ge,l=new Ge,f=new Ge,p=new Ge,d=new Ge;if(t){var m=t.array;for(i=0,o=t.count;i<o;i+=3)a=3*m[i+0],s=3*m[i+1],c=3*m[i+2],h.fromArray(n,a),l.fromArray(n,s),f.fromArray(n,c),p.subVectors(f,l),d.subVectors(h,l),p.cross(d),u[a]+=p.x,u[a+1]+=p.y,u[a+2]+=p.z,u[s]+=p.x,u[s+1]+=p.y,u[s+2]+=p.z,u[c]+=p.x,u[c+1]+=p.y,u[c+2]+=p.z}else for(i=0,o=n.length;i<o;i+=9)h.fromArray(n,i),l.fromArray(n,i+3),f.fromArray(n,i+6),p.subVectors(f,l),d.subVectors(h,l),p.cross(d),u[i]=p.x,u[i+1]=p.y,u[i+2]=p.z,u[i+3]=p.x,u[i+4]=p.y,u[i+5]=p.z,u[i+6]=p.x,u[i+7]=p.y,u[i+8]=p.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r].array,o=t.attributes[r],a=o.array,s=0,c=o.itemSize*e;s<a.length;s++,c++)i[c]=a[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new Ge;return function(){for(var e=this.attributes.normal,n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.normalize(),e.setXYZ(n,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Rn,e=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(e.length*a),c=0,u=0,h=0,l=e.length;h<l;h++){c=e[h]*a;for(var f=0;f<a;f++)s[u++]=o[c++]}t.addAttribute(r,new yn(s,a))}var p=this.groups;for(h=0,l=p.length;h<l;h++){var d=p[h];t.addGroup(d.start,d.count,d.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n];i=Array.prototype.slice.call(a.array);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new Rn).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var c=[],u=s[e];for(n=0,r=u.length;n<r;n++)c.push(u[n].clone());this.morphAttributes[e]=c}var h=t.groups;for(n=0,r=h.length;n<r;n++){var l=h[n];this.addGroup(l.start,l.count,l.materialIndex)}var f=t.boundingBox;null!==f&&(this.boundingBox=f.clone());var p=t.boundingSphere;return null!==p&&(this.boundingSphere=p.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),On.prototype=Object.create(gn.prototype),On.prototype.constructor=On,In.prototype=Object.create(Rn.prototype),In.prototype.constructor=In,Nn.prototype=Object.create(gn.prototype),Nn.prototype.constructor=Nn,Dn.prototype=Object.create(Rn.prototype),Dn.prototype.constructor=Dn;var Fn=0;function Un(){Object.defineProperty(this,"id",{value:Fn++}),this.uuid=Ue.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=E,this.side=m,this.flatShading=!1,this.vertexColors=_,this.opacity=1,this.transparent=!1,this.blendSrc=B,this.blendDst=j,this.blendEquation=L,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Z,this.depthTest=!0,this.depthWrite=!0,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.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function Bn(t){Un.call(this),this.type="MeshBasicMaterial",this.color=new rn(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=$,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.lights=!1,this.setValues(t)}function jn(t){Un.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function zn(t,e){this.origin=void 0!==t?t:new Ge,this.direction=void 0!==e?e:new Ge}function Gn(t,e,n){this.a=void 0!==t?t:new Ge,this.b=void 0!==e?e:new Ge,this.c=void 0!==n?n:new Ge}function Hn(t,e){fn.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Rn,this.material=void 0!==e?e:new Bn({color:16777215*Math.random()}),this.drawMode=be,this.updateMorphTargets()}function kn(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Vn(t,e,n,r,i,o,a,s,c,u){t=void 0!==t?t:[],e=void 0!==e?e:ct,We.call(this,t,e,n,r,i,o,a,s,c,u),this.flipY=!1}Un.prototype=Object.assign(Object.create(r.prototype),{constructor:Un,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n)if("shading"!==e){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===y;else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==E&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==m&&(n.side=this.side),this.vertexColors!==_&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){var i=r(t.textures),o=r(t.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Bn.prototype=Object.create(Un.prototype),Bn.prototype.constructor=Bn,Bn.prototype.isMeshBasicMaterial=!0,Bn.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},jn.prototype=Object.create(Un.prototype),jn.prototype.constructor=jn,jn.prototype.isShaderMaterial=!0,jn.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=en.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},jn.prototype.toJSON=function(t){var e=Un.prototype.toJSON.call(this,t);for(var n in e.uniforms={},this.uniforms){var r=this.uniforms[n].value;r.isTexture?e.uniforms[n]={type:"t",value:r.toJSON(t).uuid}:r.isColor?e.uniforms[n]={type:"c",value:r.getHex()}:r.isVector2?e.uniforms[n]={type:"v2",value:r.toArray()}:r.isVector3?e.uniforms[n]={type:"v3",value:r.toArray()}:r.isVector4?e.uniforms[n]={type:"v4",value:r.toArray()}:r.isMatrix4?e.uniforms[n]={type:"m4",value:r.toArray()}:e.uniforms[n]={value:r}}return Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(zn.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new Ge),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new Ge;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new Ge),e.subVectors(t,this.origin);var n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new Ge;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new Ge,e=new Ge,n=new Ge;return function(r,i,o,a){t.copy(r).add(i).multiplyScalar(.5),e.copy(i).sub(r).normalize(),n.copy(this.origin).sub(t);var s,c,u,h,l=.5*r.distanceTo(i),f=-this.direction.dot(e),p=n.dot(this.direction),d=-n.dot(e),m=n.lengthSq(),v=Math.abs(1-f*f);if(v>0)if(c=f*p-d,h=l*v,(s=f*d-p)>=0)if(c>=-h)if(c<=h){var g=1/v;u=(s*=g)*(s+f*(c*=g)+2*p)+c*(f*s+c+2*d)+m}else c=l,u=-(s=Math.max(0,-(f*c+p)))*s+c*(c+2*d)+m;else c=-l,u=-(s=Math.max(0,-(f*c+p)))*s+c*(c+2*d)+m;else c<=-h?u=-(s=Math.max(0,-(-f*l+p)))*s+(c=s>0?-l:Math.min(Math.max(-l,-d),l))*(c+2*d)+m:c<=h?(s=0,u=(c=Math.min(Math.max(-l,-d),l))*(c+2*d)+m):u=-(s=Math.max(0,-(f*l+p)))*s+(c=s>0?l:Math.min(Math.max(-l,-d),l))*(c+2*d)+m;else c=f>0?-l:l,u=-(s=Math.max(0,-(f*c+p)))*s+c*(c+2*d)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(c).add(t),u}}(),intersectSphere:function(){var t=new Ge;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,c=r+a;return s<0&&c<0?null:s<0?this.at(c,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,l=this.origin;return c>=0?(n=(t.min.x-l.x)*c,r=(t.max.x-l.x)*c):(n=(t.max.x-l.x)*c,r=(t.min.x-l.x)*c),u>=0?(i=(t.min.y-l.y)*u,o=(t.max.y-l.y)*u):(i=(t.max.y-l.y)*u,o=(t.min.y-l.y)*u),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),h>=0?(a=(t.min.z-l.z)*h,s=(t.max.z-l.z)*h):(a=(t.max.z-l.z)*h,s=(t.min.z-l.z)*h),n>s||a>r?null:((a>n||n!=n)&&(n=a),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,e)))},intersectsBox:function(){var t=new Ge;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new Ge,e=new Ge,n=new Ge,r=new Ge;return function(i,o,a,s,c){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var u,h=this.direction.dot(r);if(h>0){if(s)return null;u=1}else{if(!(h<0))return null;u=-1,h=-h}t.subVectors(this.origin,i);var l=u*this.direction.dot(n.crossVectors(t,n));if(l<0)return null;var f=u*this.direction.dot(e.cross(t));if(f<0)return null;if(l+f>h)return null;var p=-u*t.dot(r);return p<0?null:this.at(p/h,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Gn,{getNormal:function(){var t=new Ge;return function(e,n,r,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new Ge),i.subVectors(r,n),t.subVectors(e,n),i.cross(t);var o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}}(),getBarycoord:function(){var t=new Ge,e=new Ge,n=new Ge;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var c=t.dot(t),u=t.dot(e),h=t.dot(n),l=e.dot(e),f=e.dot(n),p=c*l-u*u;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new Ge),0===p)return s.set(-2,-1,-1);var d=1/p,m=(l*h-u*f)*d,v=(c*f-u*h)*d;return s.set(1-m-v,v,m)}}(),containsPoint:function(){var t=new Ge;return function(e,n,r,i){return Gn.getBarycoord(e,n,r,i,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}(),getUV:function(){var t=new Ge;return function(e,n,r,i,o,a,s,c){return this.getBarycoord(e,n,r,i,t),c.set(0,0),c.addScaledVector(o,t.x),c.addScaledVector(a,t.y),c.addScaledVector(s,t.z),c}}()}),Object.assign(Gn.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new Ge,e=new Ge;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new Ge),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Gn.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new Ge),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Gn.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Gn.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,n,r,i){return Gn.getUV(t,this.a,this.b,this.c,e,n,r,i)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new Ge,e=new Ge,n=new Ge,r=new Ge,i=new Ge,o=new Ge;return function(a,s){void 0===s&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),s=new Ge);var c,u,h=this.a,l=this.b,f=this.c;t.subVectors(l,h),e.subVectors(f,h),r.subVectors(a,h);var p=t.dot(r),d=e.dot(r);if(p<=0&&d<=0)return s.copy(h);i.subVectors(a,l);var m=t.dot(i),v=e.dot(i);if(m>=0&&v<=m)return s.copy(l);var g=p*v-m*d;if(g<=0&&p>=0&&m<=0)return c=p/(p-m),s.copy(h).addScaledVector(t,c);o.subVectors(a,f);var y=t.dot(o),x=e.dot(o);if(x>=0&&y<=x)return s.copy(f);var _=y*d-p*x;if(_<=0&&d>=0&&x<=0)return u=d/(d-x),s.copy(h).addScaledVector(e,u);var w=m*x-y*v;if(w<=0&&v-m>=0&&y-x>=0)return n.subVectors(f,l),u=(v-m)/(v-m+(y-x)),s.copy(l).addScaledVector(n,u);var b=1/(w+_+g);return c=_*b,u=g*b,s.copy(h).addScaledVector(t,c).addScaledVector(e,u)}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Hn.prototype=Object.assign(Object.create(fn.prototype),{constructor:Hn,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return fn.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=a.length;t<e;t++)n=a[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)n=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}},raycast:function(){var t=new je,e=new zn,n=new Ke,r=new Ge,i=new Ge,o=new Ge,a=new Ge,s=new Ge,c=new Ge,u=new Be,h=new Be,l=new Be,f=new Ge,p=new Ge;function d(t,e,n,r,i,o,a,s){if(null===(e.side===v?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,e.side!==g,s)))return null;p.copy(s),p.applyMatrix4(t.matrixWorld);var c=n.ray.origin.distanceTo(p);return c<n.near||c>n.far?null:{distance:c,point:p.clone(),object:t}}function m(t,e,n,a,s,c,p,m,v){r.fromBufferAttribute(s,p),i.fromBufferAttribute(s,m),o.fromBufferAttribute(s,v);var g=d(t,e,n,a,r,i,o,f);if(g){c&&(u.fromBufferAttribute(c,p),h.fromBufferAttribute(c,m),l.fromBufferAttribute(c,v),g.uv=Gn.getUV(f,r,i,o,u,h,l,new Be));var y=new mn(p,m,v);Gn.getNormal(r,i,o,y.normal),g.face=y}return g}return function(p,v){var g,y=this.geometry,x=this.material,_=this.matrixWorld;if(void 0!==x&&(null===y.boundingSphere&&y.computeBoundingSphere(),n.copy(y.boundingSphere),n.applyMatrix4(_),!1!==p.ray.intersectsSphere(n)&&(t.getInverse(_),e.copy(p.ray).applyMatrix4(t),null===y.boundingBox||!1!==e.intersectsBox(y.boundingBox))))if(y.isBufferGeometry){var w,b,M,E,S,T,A,P,L,C=y.index,R=y.attributes.position,O=y.attributes.uv,I=y.groups,N=y.drawRange;if(null!==C)if(Array.isArray(x))for(E=0,T=I.length;E<T;E++)for(L=x[(P=I[E]).materialIndex],S=Math.max(P.start,N.start),A=Math.min(P.start+P.count,N.start+N.count);S<A;S+=3)w=C.getX(S),b=C.getX(S+1),M=C.getX(S+2),(g=m(this,L,p,e,R,O,w,b,M))&&(g.faceIndex=Math.floor(S/3),v.push(g));else for(E=Math.max(0,N.start),T=Math.min(C.count,N.start+N.count);E<T;E+=3)w=C.getX(E),b=C.getX(E+1),M=C.getX(E+2),(g=m(this,x,p,e,R,O,w,b,M))&&(g.faceIndex=Math.floor(E/3),v.push(g));else if(void 0!==R)if(Array.isArray(x))for(E=0,T=I.length;E<T;E++)for(L=x[(P=I[E]).materialIndex],S=Math.max(P.start,N.start),A=Math.min(P.start+P.count,N.start+N.count);S<A;S+=3)(g=m(this,L,p,e,R,O,w=S,b=S+1,M=S+2))&&(g.faceIndex=Math.floor(S/3),v.push(g));else for(E=Math.max(0,N.start),T=Math.min(R.count,N.start+N.count);E<T;E+=3)(g=m(this,x,p,e,R,O,w=E,b=E+1,M=E+2))&&(g.faceIndex=Math.floor(E/3),v.push(g))}else if(y.isGeometry){var D,F,U,B,j=Array.isArray(x),z=y.vertices,G=y.faces,H=y.faceVertexUvs[0];H.length>0&&(B=H);for(var k=0,V=G.length;k<V;k++){var W=G[k],X=j?x[W.materialIndex]:x;if(void 0!==X){if(D=z[W.a],F=z[W.b],U=z[W.c],!0===X.morphTargets){var q=y.morphTargets,Z=this.morphTargetInfluences;r.set(0,0,0),i.set(0,0,0),o.set(0,0,0);for(var Y=0,J=q.length;Y<J;Y++){var K=Z[Y];if(0!==K){var Q=q[Y].vertices;r.addScaledVector(a.subVectors(Q[W.a],D),K),i.addScaledVector(s.subVectors(Q[W.b],F),K),o.addScaledVector(c.subVectors(Q[W.c],U),K)}}r.add(D),i.add(F),o.add(U),D=r,F=i,U=o}if(g=d(this,X,p,e,D,F,U,f)){if(B&&B[k]){var $=B[k];u.copy($[0]),h.copy($[1]),l.copy($[2]),g.uv=Gn.getUV(f,D,F,U,u,h,l,new Be)}g.face=W,g.faceIndex=k,v.push(g)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Vn.prototype=Object.create(We.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isCubeTexture=!0,Object.defineProperty(Vn.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var Wn=new We,Xn=new Vn;function qn(){this.seq=[],this.map={}}var Zn=[],Yn=[],Jn=new Float32Array(16),Kn=new Float32Array(9),Qn=new Float32Array(4);function $n(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=Zn[i];if(void 0===o&&(o=new Float32Array(i),Zn[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function tr(t,e){if(t.length!==e.length)return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function er(t,e){for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}function nr(t,e){var n=Yn[e];void 0===n&&(n=new Int32Array(e),Yn[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function rr(t,e){var n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function ir(t,e){var n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function or(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(tr(n,e))return;t.uniform2fv(this.addr,e),er(n,e)}}function ar(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(tr(n,e))return;t.uniform3fv(this.addr,e),er(n,e)}}function sr(t,e){var n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(tr(n,e))return;t.uniform4fv(this.addr,e),er(n,e)}}function cr(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(tr(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),er(n,e)}else{if(tr(n,r))return;Qn.set(r),t.uniformMatrix2fv(this.addr,!1,Qn),er(n,r)}}function ur(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(tr(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),er(n,e)}else{if(tr(n,r))return;Kn.set(r),t.uniformMatrix3fv(this.addr,!1,Kn),er(n,r)}}function hr(t,e){var n=this.cache,r=e.elements;if(void 0===r){if(tr(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),er(n,e)}else{if(tr(n,r))return;Jn.set(r),t.uniformMatrix4fv(this.addr,!1,Jn),er(n,r)}}function lr(t,e,n){var r=this.cache,i=n.allocTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(e||Wn,i)}function fr(t,e,n){var r=this.cache,i=n.allocTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(e||Xn,i)}function pr(t,e){var n=this.cache;tr(n,e)||(t.uniform2iv(this.addr,e),er(n,e))}function dr(t,e){var n=this.cache;tr(n,e)||(t.uniform3iv(this.addr,e),er(n,e))}function mr(t,e){var n=this.cache;tr(n,e)||(t.uniform4iv(this.addr,e),er(n,e))}function vr(t,e){var n=this.cache;tr(n,e)||(t.uniform1fv(this.addr,e),er(n,e))}function gr(t,e){var n=this.cache;tr(n,e)||(t.uniform1iv(this.addr,e),er(n,e))}function yr(t,e){var n=this.cache,r=$n(e,this.size,2);tr(n,r)||(t.uniform2fv(this.addr,r),this.updateCache(r))}function xr(t,e){var n=this.cache,r=$n(e,this.size,3);tr(n,r)||(t.uniform3fv(this.addr,r),this.updateCache(r))}function _r(t,e){var n=this.cache,r=$n(e,this.size,4);tr(n,r)||(t.uniform4fv(this.addr,r),this.updateCache(r))}function wr(t,e){var n=this.cache,r=$n(e,this.size,4);tr(n,r)||(t.uniformMatrix2fv(this.addr,!1,r),this.updateCache(r))}function br(t,e){var n=this.cache,r=$n(e,this.size,9);tr(n,r)||(t.uniformMatrix3fv(this.addr,!1,r),this.updateCache(r))}function Mr(t,e){var n=this.cache,r=$n(e,this.size,16);tr(n,r)||(t.uniformMatrix4fv(this.addr,!1,r),this.updateCache(r))}function Er(t,e,n){var r=this.cache,i=e.length,o=nr(n,i);!1===tr(r,o)&&(t.uniform1iv(this.addr,o),er(r,o));for(var a=0;a!==i;++a)n.setTexture2D(e[a]||Wn,o[a])}function Sr(t,e,n){var r=this.cache,i=e.length,o=nr(n,i);!1===tr(r,o)&&(t.uniform1iv(this.addr,o),er(r,o));for(var a=0;a!==i;++a)n.setTextureCube(e[a]||Xn,o[a])}function Tr(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return rr;case 35664:return or;case 35665:return ar;case 35666:return sr;case 35674:return cr;case 35675:return ur;case 35676:return hr;case 35678:case 36198:return lr;case 35680:return fr;case 5124:case 35670:return ir;case 35667:case 35671:return pr;case 35668:case 35672:return dr;case 35669:case 35673:return mr}}(e.type)}function Ar(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return vr;case 35664:return yr;case 35665:return xr;case 35666:return _r;case 35674:return wr;case 35675:return br;case 35676:return Mr;case 35678:return Er;case 35680:return Sr;case 5124:case 35670:return gr;case 35667:case 35671:return pr;case 35668:case 35672:return dr;case 35669:case 35673:return mr}}(e.type)}function Pr(t){this.id=t,qn.call(this)}Ar.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),er(e,t)},Pr.prototype.setValue=function(t,e,n){for(var r=this.seq,i=0,o=r.length;i!==o;++i){var a=r[i];a.setValue(t,e[a.id],n)}};var Lr=/([\w\d_]+)(\])?(\[|\.)?/g;function Cr(t,e){t.seq.push(e),t.map[e.id]=e}function Rr(t,e,n){var r=t.name,i=r.length;for(Lr.lastIndex=0;;){var o=Lr.exec(r),a=Lr.lastIndex,s=o[1],c="]"===o[2],u=o[3];if(c&&(s|=0),void 0===u||"["===u&&a+2===i){Cr(n,void 0===u?new Tr(s,t,e):new Ar(s,t,e));break}var h=n.map[s];void 0===h&&Cr(n,h=new Pr(s)),n=h}}function Or(t,e,n){qn.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i);Rr(o,t.getUniformLocation(e,o.name),this)}}function Ir(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),function(t){for(var e=t.split("\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\n")}(n)),r}Or.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},Or.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},Or.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},Or.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var Nr=0;function Dr(t){switch(t){case Se:return["Linear","( value )"];case Te:return["sRGB","( value )"];case Pe:return["RGBE","( value )"];case Ce:return["RGBM","( value, 7.0 )"];case Re:return["RGBM","( value, 16.0 )"];case Oe:return["RGBD","( value, 256.0 )"];case Ae:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function Fr(t,e){var n=Dr(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Ur(t){return""!==t}function Br(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function jr(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function zr(t){return t.replace(/^[ \t]*#include +<([\w\d./]+)>/gm,function(t,e){var n=tn[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return zr(n)})}function Gr(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i})}function Hr(t,e,n,r,i,o,a){var s=t.context,c=r.defines,u=i.vertexShader,h=i.fragmentShader,l="SHADOWMAP_TYPE_BASIC";o.shadowMapType===p?l="SHADOWMAP_TYPE_PCF":o.shadowMapType===d&&(l="SHADOWMAP_TYPE_PCF_SOFT");var f="ENVMAP_TYPE_CUBE",m="ENVMAP_MODE_REFLECTION",v="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case ct:case ut:f="ENVMAP_TYPE_CUBE";break;case pt:case dt:f="ENVMAP_TYPE_CUBE_UV";break;case ht:case lt:f="ENVMAP_TYPE_EQUIREC";break;case ft:f="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case ut:case lt:m="ENVMAP_MODE_REFRACTION"}switch(r.combine){case $:v="ENVMAP_BLENDING_MULTIPLY";break;case tt:v="ENVMAP_BLENDING_MIX";break;case et:v="ENVMAP_BLENDING_ADD"}}var g,y,x=t.gammaFactor>0?t.gammaFactor:1,_=a.isWebGL2?"":function(t,e,n){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap&&!e.objectSpaceNormalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ur).join("\n")}(r.extensions,o,e),w=function(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}(c),b=s.createProgram();if(r.isRawShaderMaterial?((g=[w].filter(Ur).join("\n")).length>0&&(g+="\n"),(y=[_,w].filter(Ur).join("\n")).length>0&&(y+="\n")):(g=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+x,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+m:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMap&&o.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&(a.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#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(Ur).join("\n"),y=[_,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,w,o.alphaTest?"#define ALPHATEST "+o.alphaTest+(o.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+x,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+f:"",o.envMap?"#define "+m:"",o.envMap?"#define "+v:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.normalMap&&o.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+l:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&(a.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&(a.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==nt?"#define TONE_MAPPING":"",o.toneMapping!==nt?tn.tonemapping_pars_fragment:"",o.toneMapping!==nt?function(t,e){var n;switch(e){case rt:n="Linear";break;case it:n="Reinhard";break;case ot:n="Uncharted2";break;case at:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?tn.encodings_pars_fragment:"",o.mapEncoding?Fr("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?Fr("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?Fr("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?function(t,e){var n=Dr(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}("linearToOutputTexel",o.outputEncoding):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Ur).join("\n")),u=jr(u=Br(u=zr(u),o),o),h=jr(h=Br(h=zr(h),o),o),u=Gr(u),h=Gr(h),a.isWebGL2&&!r.isRawShaderMaterial){var M=!1,E=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==u.match(E)&&null!==h.match(E)&&(M=!0,u=u.replace(E,""),h=h.replace(E,"")),g=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,y=["#version 300 es\n","#define varying in",M?"":"out highp vec4 pc_fragColor;",M?"":"#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"+y}var S=g+u,T=y+h,A=Ir(s,s.VERTEX_SHADER,S),P=Ir(s,s.FRAGMENT_SHADER,T);s.attachShader(b,A),s.attachShader(b,P),void 0!==r.index0AttributeName?s.bindAttribLocation(b,0,r.index0AttributeName):!0===o.morphTargets&&s.bindAttribLocation(b,0,"position"),s.linkProgram(b);var L,C,R=s.getProgramInfoLog(b).trim(),O=s.getShaderInfoLog(A).trim(),I=s.getShaderInfoLog(P).trim(),N=!0,D=!0;return!1===s.getProgramParameter(b,s.LINK_STATUS)?(N=!1,console.error("THREE.WebGLProgram: shader error: ",s.getError(),"gl.VALIDATE_STATUS",s.getProgramParameter(b,s.VALIDATE_STATUS),"gl.getProgramInfoLog",R,O,I)):""!==R?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",R):""!==O&&""!==I||(D=!1),D&&(this.diagnostics={runnable:N,material:r,programLog:R,vertexShader:{log:O,prefix:g},fragmentShader:{log:I,prefix:y}}),s.deleteShader(A),s.deleteShader(P),this.getUniforms=function(){return void 0===L&&(L=new Or(s,b,t)),L},this.getAttributes=function(){return void 0===C&&(C=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=t.getActiveAttrib(e,i).name;n[o]=t.getAttribLocation(e,o)}return n}(s,b)),C},this.destroy=function(){s.deleteProgram(b),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=Nr++,this.code=n,this.usedTimes=1,this.program=b,this.vertexShader=A,this.fragmentShader=P,this}function kr(t,e,n){var r=[],i={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},o=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function a(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=Se,n===Se&&e&&(n=Ae),n}this.getParameters=function(e,r,o,s,c,u,h){var l=i[e.type],f=h.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(n.floatVertexTextures)return 1024;var r=n.maxVertexUniforms,i=Math.floor((r-20)/4),o=Math.min(i,e.length);return o<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+o+"."),0):o}(h):0,p=n.precision;null!==e.precision&&(p=n.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",p,"instead.");var d=t.getRenderTarget();return{shaderID:l,precision:p,supportsVertexTextures:n.vertexTextures,outputEncoding:a(d?d.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:a(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:a(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===pt||e.envMap.mapping===dt),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:a(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,objectSpaceNormalMap:e.normalMapType===Fe,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:e.skinning&&f>0,maxBones:f,useVertexTexture:n.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:c,numClipIntersection:u,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.receiveShadow&&o.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===g,flipSided:e.side===v,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(e.fragmentShader),r.push(e.vertexShader)),void 0!==e.defines)for(var i in e.defines)r.push(i),r.push(e.defines[i]);for(var a=0;a<o.length;a++)r.push(n[o[a]]);return r.push(e.onBeforeCompile.toString()),r.push(t.gammaOutput),r.join()},this.acquireProgram=function(i,o,a,s){for(var c,u=0,h=r.length;u<h;u++){var l=r[u];if(l.code===s){++(c=l).usedTimes;break}}return void 0===c&&(c=new Hr(t,e,s,i,o,a,n),r.push(c)),c},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=r.indexOf(t);r[e]=r[r.length-1],r.pop(),t.destroy()}},this.programs=r}function Vr(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Wr(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function Xr(){var t={};return{get:function(e,n){var r=e.id+","+n.id,i=t[r];return void 0===i&&(i=new function(){var t=[],e=0,n=[],r=[];return{opaque:n,transparent:r,init:function(){e=0,n.length=0,r.length=0},push:function(i,o,a,s,c){var u=t[e];void 0===u?(u={id:i.id,object:i,geometry:o,material:a,program:a.program,renderOrder:i.renderOrder,z:s,group:c},t[e]=u):(u.id=i.id,u.object=i,u.geometry=o,u.material=a,u.program=a.program,u.renderOrder=i.renderOrder,u.z=s,u.group=c),(!0===a.transparent?r:n).push(u),e++},sort:function(){n.length>1&&n.sort(Vr),r.length>1&&r.sort(Wr)}}},t[r]=i),i},dispose:function(){t={}}}}var qr,Zr=0;function Yr(){var t=new function(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new Ge,color:new rn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Be};break;case"SpotLight":n={position:new Ge,direction:new Ge,color:new rn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Be};break;case"PointLight":n={position:new Ge,color:new rn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Be,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ge,skyColor:new rn,groundColor:new rn};break;case"RectAreaLight":n={color:new rn,position:new Ge,halfWidth:new Ge,halfHeight:new Ge}}return t[e.id]=n,n}}},e={id:Zr++,hash:{stateID:-1,directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=new Ge,r=new je,i=new je;return{setup:function(o,a,s){for(var c=0,u=0,h=0,l=0,f=0,p=0,d=0,m=0,v=s.matrixWorldInverse,g=0,y=o.length;g<y;g++){var x=o[g],_=x.color,w=x.intensity,b=x.distance,M=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)c+=_.r*w,u+=_.g*w,h+=_.b*w;else if(x.isDirectionalLight){if((S=t.get(x)).color.copy(x.color).multiplyScalar(x.intensity),S.direction.setFromMatrixPosition(x.matrixWorld),n.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(v),S.shadow=x.castShadow,x.castShadow){var E=x.shadow;S.shadowBias=E.bias,S.shadowRadius=E.radius,S.shadowMapSize=E.mapSize}e.directionalShadowMap[l]=M,e.directionalShadowMatrix[l]=x.shadow.matrix,e.directional[l]=S,l++}else if(x.isSpotLight)(S=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(v),S.color.copy(_).multiplyScalar(w),S.distance=b,S.direction.setFromMatrixPosition(x.matrixWorld),n.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(n),S.direction.transformDirection(v),S.coneCos=Math.cos(x.angle),S.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),S.decay=0===x.distance?0:x.decay,S.shadow=x.castShadow,x.castShadow&&(E=x.shadow,S.shadowBias=E.bias,S.shadowRadius=E.radius,S.shadowMapSize=E.mapSize),e.spotShadowMap[p]=M,e.spotShadowMatrix[p]=x.shadow.matrix,e.spot[p]=S,p++;else if(x.isRectAreaLight)(S=t.get(x)).color.copy(_).multiplyScalar(w),S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(v),i.identity(),r.copy(x.matrixWorld),r.premultiply(v),i.extractRotation(r),S.halfWidth.set(.5*x.width,0,0),S.halfHeight.set(0,.5*x.height,0),S.halfWidth.applyMatrix4(i),S.halfHeight.applyMatrix4(i),e.rectArea[d]=S,d++;else if(x.isPointLight)(S=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(v),S.color.copy(x.color).multiplyScalar(x.intensity),S.distance=x.distance,S.decay=0===x.distance?0:x.decay,S.shadow=x.castShadow,x.castShadow&&(E=x.shadow,S.shadowBias=E.bias,S.shadowRadius=E.radius,S.shadowMapSize=E.mapSize,S.shadowCameraNear=E.camera.near,S.shadowCameraFar=E.camera.far),e.pointShadowMap[f]=M,e.pointShadowMatrix[f]=x.shadow.matrix,e.point[f]=S,f++;else if(x.isHemisphereLight){var S;(S=t.get(x)).direction.setFromMatrixPosition(x.matrixWorld),S.direction.transformDirection(v),S.direction.normalize(),S.skyColor.copy(x.color).multiplyScalar(w),S.groundColor.copy(x.groundColor).multiplyScalar(w),e.hemi[m]=S,m++}}e.ambient[0]=c,e.ambient[1]=u,e.ambient[2]=h,e.directional.length=l,e.spot.length=p,e.rectArea.length=d,e.point.length=f,e.hemi.length=m,e.hash.stateID=e.id,e.hash.directionalLength=l,e.hash.pointLength=f,e.hash.spotLength=p,e.hash.rectAreaLength=d,e.hash.hemiLength=m,e.hash.shadowsLength=a.length},state:e}}function Jr(){var t=new Yr,e=[],n=[];return{init:function(){e.length=0,n.length=0},state:{lightsArray:e,shadowsArray:n,lights:t},setupLights:function(r){t.setup(e,n,r)},pushLight:function(t){e.push(t)},pushShadow:function(t){n.push(t)}}}function Kr(t){Un.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ie,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.lights=!1,this.setValues(t)}function Qr(t){Un.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Ge,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.lights=!1,this.setValues(t)}function $r(t,e,n){for(var r=new $e,i=new je,o=new Be,a=new Be(n,n),s=new Ge,c=new Ge,u=1,h=2,l=1+(u|h),f=new Array(l),d=new Array(l),y={},x={0:v,1:m,2:g},_=[new Ge(1,0,0),new Ge(-1,0,0),new Ge(0,0,1),new Ge(0,0,-1),new Ge(0,1,0),new Ge(0,-1,0)],w=[new Ge(0,1,0),new Ge(0,1,0),new Ge(0,1,0),new Ge(0,1,0),new Ge(0,0,1),new Ge(0,0,-1)],b=[new Xe,new Xe,new Xe,new Xe,new Xe,new Xe],M=0;M!==l;++M){var E=0!=(M&u),S=0!=(M&h),T=new Kr({depthPacking:Ne,morphTargets:E,skinning:S});f[M]=T;var A=new Qr({morphTargets:E,skinning:S});d[M]=A}var P=this;function L(e,n,r,i,o,a){var s=e.geometry,c=null,l=f,p=e.customDepthMaterial;if(r&&(l=d,p=e.customDistanceMaterial),p)c=p;else{var m=!1;n.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var v=e.isSkinnedMesh&&n.skinning,g=0;m&&(g|=u),v&&(g|=h),c=l[g]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var _=c.uuid,w=n.uuid,b=y[_];void 0===b&&(b={},y[_]=b);var M=b[w];void 0===M&&(M=c.clone(),b[w]=M),c=M}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=null!=n.shadowSide?n.shadowSide:x[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,r&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(i),c.nearDistance=o,c.farDistance=a),c}function C(n,i,o,a){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var s=e.update(n),u=n.material;if(Array.isArray(u))for(var h=s.groups,l=0,f=h.length;l<f;l++){var p=h[l],d=u[p.materialIndex];if(d&&d.visible){var m=L(n,d,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,p)}}else if(u.visible){m=L(n,u,a,c,o.near,o.far);t.renderBufferDirect(o,null,s,m,n,null)}}for(var v=n.children,g=0,y=v.length;g<y;g++)C(v[g],i,o,a)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=p,this.render=function(e,n,u){if(!1!==P.enabled&&(!1!==P.autoUpdate||!1!==P.needsUpdate)&&0!==e.length){var h,l=t.context,f=t.state;f.disable(l.BLEND),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);for(var p=0,d=e.length;p<d;p++){var m=e[p],v=m.shadow,g=m&&m.isPointLight;if(void 0!==v){var y=v.camera;if(o.copy(v.mapSize),o.min(a),g){var x=o.x,M=o.y;b[0].set(2*x,M,x,M),b[1].set(0,M,x,M),b[2].set(3*x,M,x,M),b[3].set(x,M,x,M),b[4].set(3*x,0,x,M),b[5].set(x,0,x,M),o.x*=4,o.y*=2}if(null===v.map){var E={minFilter:yt,magFilter:yt,format:Bt};v.map=new qe(o.x,o.y,E),v.map.texture.name=m.name+".shadowMap",y.updateProjectionMatrix()}v.isSpotLightShadow&&v.update(m);var S=v.map,T=v.matrix;c.setFromMatrixPosition(m.matrixWorld),y.position.copy(c),g?(h=6,T.makeTranslation(-c.x,-c.y,-c.z)):(h=1,s.setFromMatrixPosition(m.target.matrixWorld),y.lookAt(s),y.updateMatrixWorld(),T.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),T.multiply(y.projectionMatrix),T.multiply(y.matrixWorldInverse)),t.setRenderTarget(S),t.clear();for(var A=0;A<h;A++){if(g){s.copy(y.position),s.add(_[A]),y.up.copy(w[A]),y.lookAt(s),y.updateMatrixWorld();var L=b[A];f.viewport(L)}i.multiplyMatrices(y.projectionMatrix,y.matrixWorldInverse),r.setFromMatrix(i),C(n,u,y,g)}}else console.warn("THREE.WebGLShadowMap:",m,"has no shadow.")}P.needsUpdate=!1}}}function ti(t,e,n,r,i,o,a){var s,c={};function u(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n),r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height),r}return t}function h(t){return Ue.isPowerOfTwo(t.width)&&Ue.isPowerOfTwo(t.height)}function l(t,e){return t.generateMipmaps&&e&&t.minFilter!==yt&&t.minFilter!==wt}function f(e,n,i,o){t.generateMipmap(e),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function p(e,n){if(!i.isWebGL2)return e;if(e===t.RGB){if(n===t.FLOAT)return t.RGB32F;if(n===t.HALF_FLOAT)return t.RGB16F;if(n===t.UNSIGNED_BYTE)return t.RGB8}if(e===t.RGBA){if(n===t.FLOAT)return t.RGBA32F;if(n===t.HALF_FLOAT)return t.RGBA16F;if(n===t.UNSIGNED_BYTE)return t.RGBA8}return e}function d(e){return e===yt||e===xt||e===_t?t.NEAREST:t.LINEAR}function m(e){var n=e.target;n.removeEventListener("dispose",m),function(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}(n),n.isVideoTexture&&delete c[n.id],a.memory.textures--}function v(e){var n=e.target;n.removeEventListener("dispose",v),function(e){var n=r.get(e),i=r.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}(n),a.memory.textures--}function g(e,d){var v=r.get(e);if(e.isVideoTexture&&function(t){var e=t.id,n=a.render.frame;c[e]!==n&&(c[e]=n,t.update())}(e),e.version>0&&v.__version!==e.version){var g=e.image;if(void 0===g)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==g.complete)return void function(e,r,c){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),a.memory.textures++);n.activeTexture(t.TEXTURE0+c),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var d=u(r.image,i.maxTextureSize);(function(t){return!i.isWebGL2&&(t.wrapS!==vt||t.wrapT!==vt||t.minFilter!==yt&&t.minFilter!==wt)})(r)&&!1===h(d)&&(d=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=Ue.floorPowerOfTwo(t.width),s.height=Ue.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height),s):t}(d));var v=h(d),g=o.convert(r.format),x=o.convert(r.type),_=p(g,x);y(t.TEXTURE_2D,r,v);var w,b=r.mipmaps;if(r.isDepthTexture){if(_=t.DEPTH_COMPONENT,r.type===Ct){if(!i.isWebGL2)throw new Error("Float Depth Texture only supported in WebGL2.0");_=t.DEPTH_COMPONENT32F}else i.isWebGL2&&(_=t.DEPTH_COMPONENT16);r.format===Ht&&_===t.DEPTH_COMPONENT&&r.type!==At&&r.type!==Lt&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=At,x=o.convert(r.type)),r.format===kt&&(_=t.DEPTH_STENCIL,r.type!==Dt&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Dt,x=o.convert(r.type))),n.texImage2D(t.TEXTURE_2D,0,_,d.width,d.height,0,g,x,null)}else if(r.isDataTexture)if(b.length>0&&v){for(var M=0,E=b.length;M<E;M++)w=b[M],n.texImage2D(t.TEXTURE_2D,M,_,w.width,w.height,0,g,x,w.data);r.generateMipmaps=!1,e.__maxMipLevel=b.length-1}else n.texImage2D(t.TEXTURE_2D,0,_,d.width,d.height,0,g,x,d.data),e.__maxMipLevel=0;else if(r.isCompressedTexture){for(var M=0,E=b.length;M<E;M++)w=b[M],r.format!==Bt&&r.format!==Ut?n.getCompressedTextureFormats().indexOf(g)>-1?n.compressedTexImage2D(t.TEXTURE_2D,M,_,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,M,_,w.width,w.height,0,g,x,w.data);e.__maxMipLevel=b.length-1}else if(b.length>0&&v){for(var M=0,E=b.length;M<E;M++)w=b[M],n.texImage2D(t.TEXTURE_2D,M,_,g,x,w);r.generateMipmaps=!1,e.__maxMipLevel=b.length-1}else n.texImage2D(t.TEXTURE_2D,0,_,g,x,d),e.__maxMipLevel=0;l(r,v)&&f(t.TEXTURE_2D,r,d.width,d.height);e.__version=r.version,r.onUpdate&&r.onUpdate(r)}(v,e,d);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(t.TEXTURE0+d),n.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function y(n,a,s){var c;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o.convert(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o.convert(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===vt&&a.wrapT===vt||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,t.TEXTURE_MAG_FILTER,d(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,d(a.minFilter)),a.minFilter!==yt&&a.minFilter!==wt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),c=e.get("EXT_texture_filter_anisotropic")){if(a.type===Ct&&null===e.get("OES_texture_float_linear"))return;if(a.type===Rt&&null===(i.isWebGL2||e.get("OES_texture_half_float_linear")))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function x(e,i,a,s){var c=o.convert(i.texture.format),u=o.convert(i.texture.type),h=p(c,u);n.texImage2D(s,0,h,i.width,i.height,0,c,u,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function _(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function w(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),g(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Ht)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==kt)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),_(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),_(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=g,this.setTextureCube=function(e,s){var c=r.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),a.memory.textures++),n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var d=e&&e.isCompressedTexture,v=e.image[0]&&e.image[0].isDataTexture,g=[],x=0;x<6;x++)g[x]=d||v?v?e.image[x].image:e.image[x]:u(e.image[x],i.maxCubemapSize);var _=g[0],w=h(_),b=o.convert(e.format),M=o.convert(e.type),E=p(b,M);for(y(t.TEXTURE_CUBE_MAP,e,w),x=0;x<6;x++)if(d)for(var S,T=g[x].mipmaps,A=0,P=T.length;A<P;A++)S=T[A],e.format!==Bt&&e.format!==Ut?n.getCompressedTextureFormats().indexOf(b)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+x,A,E,S.width,S.height,0,S.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+x,A,E,S.width,S.height,0,b,M,S.data);else v?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+x,0,E,g[x].width,g[x].height,0,b,M,g[x].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+x,0,E,b,M,g[x]);c.__maxMipLevel=d?T.length-1:0,l(e,w)&&f(t.TEXTURE_CUBE_MAP,e,_.width,_.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+s),n.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)},this.setupRenderTarget=function(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",v),o.__webglTexture=t.createTexture(),a.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=h(e);if(s){i.__webglFramebuffer=[];for(var u=0;u<6;u++)i.__webglFramebuffer[u]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){for(n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),y(t.TEXTURE_CUBE_MAP,e.texture,c),u=0;u<6;u++)x(i.__webglFramebuffer[u],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+u);l(e.texture,c)&&f(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),y(t.TEXTURE_2D,e.texture,c),x(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),l(e.texture,c)&&f(t.TEXTURE_2D,e.texture,e.width,e.height),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&w(e)},this.updateRenderTargetMipmap=function(e){var i=e.texture;if(l(i,h(e))){var o=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),f(o,i,e.width,e.height),n.bindTexture(o,null)}}}function ei(t,e,n){return{convert:function(r){var i;if(r===mt)return t.REPEAT;if(r===vt)return t.CLAMP_TO_EDGE;if(r===gt)return t.MIRRORED_REPEAT;if(r===yt)return t.NEAREST;if(r===xt)return t.NEAREST_MIPMAP_NEAREST;if(r===_t)return t.NEAREST_MIPMAP_LINEAR;if(r===wt)return t.LINEAR;if(r===bt)return t.LINEAR_MIPMAP_NEAREST;if(r===Mt)return t.LINEAR_MIPMAP_LINEAR;if(r===Et)return t.UNSIGNED_BYTE;if(r===Ot)return t.UNSIGNED_SHORT_4_4_4_4;if(r===It)return t.UNSIGNED_SHORT_5_5_5_1;if(r===Nt)return t.UNSIGNED_SHORT_5_6_5;if(r===St)return t.BYTE;if(r===Tt)return t.SHORT;if(r===At)return t.UNSIGNED_SHORT;if(r===Pt)return t.INT;if(r===Lt)return t.UNSIGNED_INT;if(r===Ct)return t.FLOAT;if(r===Rt){if(n.isWebGL2)return t.HALF_FLOAT;if(null!==(i=e.get("OES_texture_half_float")))return i.HALF_FLOAT_OES}if(r===Ft)return t.ALPHA;if(r===Ut)return t.RGB;if(r===Bt)return t.RGBA;if(r===jt)return t.LUMINANCE;if(r===zt)return t.LUMINANCE_ALPHA;if(r===Ht)return t.DEPTH_COMPONENT;if(r===kt)return t.DEPTH_STENCIL;if(r===L)return t.FUNC_ADD;if(r===C)return t.FUNC_SUBTRACT;if(r===R)return t.FUNC_REVERSE_SUBTRACT;if(r===N)return t.ZERO;if(r===D)return t.ONE;if(r===F)return t.SRC_COLOR;if(r===U)return t.ONE_MINUS_SRC_COLOR;if(r===B)return t.SRC_ALPHA;if(r===j)return t.ONE_MINUS_SRC_ALPHA;if(r===z)return t.DST_ALPHA;if(r===G)return t.ONE_MINUS_DST_ALPHA;if(r===H)return t.DST_COLOR;if(r===k)return t.ONE_MINUS_DST_COLOR;if(r===V)return t.SRC_ALPHA_SATURATE;if((r===Vt||r===Wt||r===Xt||r===qt)&&null!==(i=e.get("WEBGL_compressed_texture_s3tc"))){if(r===Vt)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Wt)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===Xt)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===qt)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((r===Zt||r===Yt||r===Jt||r===Kt)&&null!==(i=e.get("WEBGL_compressed_texture_pvrtc"))){if(r===Zt)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===Yt)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===Jt)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===Kt)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(r===Qt&&null!==(i=e.get("WEBGL_compressed_texture_etc1")))return i.COMPRESSED_RGB_ETC1_WEBGL;if((r===$t||r===te||r===ee||r===ne||r===re||r===ie||r===oe||r===ae||r===se||r===ce||r===ue||r===he||r===le||r===fe)&&null!==(i=e.get("WEBGL_compressed_texture_astc")))return r;if(r===O||r===I){if(n.isWebGL2){if(r===O)return t.MIN;if(r===I)return t.MAX}if(null!==(i=e.get("EXT_blend_minmax"))){if(r===O)return i.MIN_EXT;if(r===I)return i.MAX_EXT}}if(r===Dt){if(n.isWebGL2)return t.UNSIGNED_INT_24_8;if(null!==(i=e.get("WEBGL_depth_texture")))return i.UNSIGNED_INT_24_8_WEBGL}return 0}}}function ni(){fn.call(this),this.type="Group"}function ri(t,e,n,r){pn.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function ii(t){ri.call(this),this.cameras=t||[]}function oi(t){var e=this,n=null,r=null,i=null,o=[],a=new je,s=new je,c="stage";"undefined"!=typeof window&&"VRFrameData"in window&&(r=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",y,!1));var u=new je,h=new ze,l=new Ge,f=new ri;f.bounds=new Xe(0,0,.5,1),f.layers.enable(1);var p=new ri;p.bounds=new Xe(.5,0,.5,1),p.layers.enable(2);var d,m,v=new ii([f,p]);function g(){return null!==n&&!0===n.isPresenting}function y(){if(g()){var r=n.getEyeParameters("left"),i=r.renderWidth,o=r.renderHeight;m=t.getPixelRatio(),d=t.getSize(),t.setDrawingBufferSize(2*i,o,1),w.start()}else e.enabled&&t.setDrawingBufferSize(d.width,d.height,m),w.stop()}v.layers.enable(1),v.layers.enable(2);var x=[];function _(t){for(var e=navigator.getGamepads&&navigator.getGamepads(),n=0,r=0,i=e.length;n<i;n++){var o=e[n];if(o&&("Daydream Controller"===o.id||"Gear VR Controller"===o.id||"Oculus Go Controller"===o.id||"OpenVR Gamepad"===o.id||o.id.startsWith("Oculus Touch")||o.id.startsWith("Spatial Controller"))){if(r===t)return o;r++}}}this.enabled=!1,this.getController=function(t){var e=o[t];return void 0===e&&((e=new ni).matrixAutoUpdate=!1,e.visible=!1,o[t]=e),e},this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t),w.setContext(t)},this.setFrameOfReferenceType=function(t){c=t},this.setPoseTarget=function(t){void 0!==t&&(i=t)},this.getCamera=function(t){var e="stage"===c?1.6:0;if(null===n)return t.position.set(0,e,0),t;if(n.depthNear=t.near,n.depthFar=t.far,n.getFrameData(r),"stage"===c){var d=n.stageParameters;d?a.fromArray(d.sittingToStandingTransform):a.makeTranslation(0,e,0)}var m=r.pose,g=null!==i?i:t;if(g.matrix.copy(a),g.matrix.decompose(g.position,g.quaternion,g.scale),null!==m.orientation&&(h.fromArray(m.orientation),g.quaternion.multiply(h)),null!==m.position&&(h.setFromRotationMatrix(a),l.fromArray(m.position),l.applyQuaternion(h),g.position.add(l)),g.updateMatrixWorld(),!1===n.isPresenting)return t;f.near=t.near,p.near=t.near,f.far=t.far,p.far=t.far,v.matrixWorld.copy(t.matrixWorld),v.matrixWorldInverse.copy(t.matrixWorldInverse),f.matrixWorldInverse.fromArray(r.leftViewMatrix),p.matrixWorldInverse.fromArray(r.rightViewMatrix),s.getInverse(a),"stage"===c&&(f.matrixWorldInverse.multiply(s),p.matrixWorldInverse.multiply(s));var y=g.parent;null!==y&&(u.getInverse(y.matrixWorld),f.matrixWorldInverse.multiply(u),p.matrixWorldInverse.multiply(u)),f.matrixWorld.getInverse(f.matrixWorldInverse),p.matrixWorld.getInverse(p.matrixWorldInverse),f.projectionMatrix.fromArray(r.leftProjectionMatrix),p.projectionMatrix.fromArray(r.rightProjectionMatrix),v.projectionMatrix.copy(f.projectionMatrix);var w=n.getLayers();if(w.length){var b=w[0];null!==b.leftBounds&&4===b.leftBounds.length&&f.bounds.fromArray(b.leftBounds),null!==b.rightBounds&&4===b.rightBounds.length&&p.bounds.fromArray(b.rightBounds)}return function(){for(var t=0;t<o.length;t++){var e=o[t],n=_(t);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var r=n.pose;!1===r.hasPosition&&e.position.set(.2,-.6,-.05),null!==r.position&&e.position.fromArray(r.position),null!==r.orientation&&e.quaternion.fromArray(r.orientation),e.matrix.compose(e.position,e.quaternion,e.scale),e.matrix.premultiply(a),e.matrix.decompose(e.position,e.quaternion,e.scale),e.matrixWorldNeedsUpdate=!0,e.visible=!0;var i="Daydream Controller"===n.id?0:1;x[t]!==n.buttons[i].pressed&&(x[t]=n.buttons[i].pressed,!0===x[t]?e.dispatchEvent({type:"selectstart"}):(e.dispatchEvent({type:"selectend"}),e.dispatchEvent({type:"select"})))}else e.visible=!1}}(),v},this.getStandingMatrix=function(){return a},this.isPresenting=g;var w=new sn;this.setAnimationLoop=function(t){w.setAnimationLoop(t)},this.submitFrame=function(){g()&&n.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",y)}}function ai(t){console.log("THREE.WebGLRenderer",i);var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),n=void 0!==t.context?t.context:null,r=void 0!==t.alpha&&t.alpha,o=void 0===t.depth||t.depth,u=void 0===t.stencil||t.stencil,h=void 0!==t.antialias&&t.antialias,l=void 0===t.premultipliedAlpha||t.premultipliedAlpha,f=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,p=void 0!==t.powerPreference?t.powerPreference:"default",d=null,m=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=rt,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var y,x,_,w,b,C,R,O,I,N,D,F,U,B,j,z,G,H,k=this,V=!1,$=null,tt=null,et=null,nt=-1,it={geometry:null,program:null,wireframe:!1},ot=null,at=null,st=new Xe,ct=new Xe,ut=null,ht=0,lt=e.width,ft=e.height,pt=1,dt=new Xe(0,0,lt,ft),mt=new Xe(0,0,lt,ft),vt=!1,gt=new $e,yt=new function(){var t=this,e=null,n=0,r=!1,i=!1,o=new Qe,a=new He,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(e,n,r,i){var c=null!==e?e.length:0,u=null;if(0!==c){if(u=s.value,!0!==i||null===u){var h=r+4*c,l=n.matrixWorldInverse;a.getNormalMatrix(l),(null===u||u.length<h)&&(u=new Float32Array(h));for(var f=0,p=r;f!==c;++f,p+=4)o.copy(e[f]).applyMatrix4(l,a),o.normal.toArray(u,p),u[p+3]=o.constant}s.value=u,s.needsUpdate=!0}return t.numPlanes=c,u}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,i,o){var a=0!==t.length||i||0!==n||r;return r=i,e=u(t,o,0),n=t.length,a},this.beginShadows=function(){i=!0,u(null)},this.endShadows=function(){i=!1,c()},this.setState=function(t,o,a,h,l,f){if(!r||null===t||0===t.length||i&&!a)i?u(null):c();else{var p=i?0:n,d=4*p,m=l.clippingState||null;s.value=m,m=u(t,h,d,f);for(var v=0;v!==d;++v)m[v]=e[v];l.clippingState=m,this.numIntersection=o?this.numPlanes:0,this.numPlanes+=p}}},xt=!1,_t=!1,wt=new je,bt=new Ge;function Mt(){return null===tt?pt:1}try{var St={alpha:r,depth:o,stencil:u,antialias:h,premultipliedAlpha:l,preserveDrawingBuffer:f,powerPreference:p};if(e.addEventListener("webglcontextlost",Lt,!1),e.addEventListener("webglcontextrestored",Ot,!1),null===(y=n||e.getContext("webgl",St)||e.getContext("experimental-webgl",St)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===y.getShaderPrecisionFormat&&(y.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function Tt(){x=new function(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}(y),(_=new function(t,e,n){var r;function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var c=!0===n.logarithmicDepthBuffer,u=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),f=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=h>0,y=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=e.get("EXT_texture_filter_anisotropic");return r=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:d,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y}}(y,x,t)).isWebGL2||(x.get("WEBGL_depth_texture"),x.get("OES_texture_float"),x.get("OES_texture_half_float"),x.get("OES_texture_half_float_linear"),x.get("OES_standard_derivatives"),x.get("OES_element_index_uint"),x.get("ANGLE_instanced_arrays")),x.get("OES_texture_float_linear"),H=new ei(y,x,_),(w=new function(t,e,n,r){var i=new function(){var e=!1,n=new Xe,r=null,i=new Xe(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?ot(t.DEPTH_TEST):at(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case W:t.depthFunc(t.NEVER);break;case X:t.depthFunc(t.ALWAYS);break;case q:t.depthFunc(t.LESS);break;case Z:t.depthFunc(t.LEQUAL);break;case Y:t.depthFunc(t.EQUAL);break;case J:t.depthFunc(t.GEQUAL);break;case K:t.depthFunc(t.GREATER);break;case Q:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}},u=new function(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null;return{setTest:function(e){e?ot(t.STENCIL_TEST):at(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&c===r||(t.stencilOp(e,n,r),a=e,s=n,c=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,c=null,u=null}}},h=t.getParameter(t.MAX_VERTEX_ATTRIBS),l=new Uint8Array(h),f=new Uint8Array(h),p=new Uint8Array(h),d={},m=null,y=null,x=null,_=null,w=null,b=null,C=null,R=null,O=null,I=null,N=!1,D=null,F=null,U=null,B=null,j=null,z=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),G=!1,H=0,k=t.getParameter(t.VERSION);-1!==k.indexOf("WebGL")?(H=parseFloat(/^WebGL\ ([0-9])/.exec(k)[1]),G=H>=1):-1!==k.indexOf("OpenGL ES")&&(H=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(k)[1]),G=H>=2);var V=null,$={},tt=new Xe,et=new Xe;function nt(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}var rt={};function it(n,i){l[n]=1,0===f[n]&&(t.enableVertexAttribArray(n),f[n]=1),p[n]!==i&&((r.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),p[n]=i)}function ot(e){!0!==d[e]&&(t.enable(e),d[e]=!0)}function at(e){!1!==d[e]&&(t.disable(e),d[e]=!1)}function st(e,r,i,o,a,s,c,u){if(e!==M){if(x||(ot(t.BLEND),x=!0),e===P)a=a||r,s=s||i,c=c||o,r===w&&a===R||(t.blendEquationSeparate(n.convert(r),n.convert(a)),w=r,R=a),i===b&&o===C&&s===O&&c===I||(t.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(c)),b=i,C=o,O=s,I=c),_=e,N=null;else if(e!==_||u!==N){if(w===L&&R===L||(t.blendEquation(t.FUNC_ADD),w=L,R=L),u)switch(e){case E:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case S:t.blendFunc(t.ONE,t.ONE);break;case T:t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA);break;case A:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case E:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case S:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case T:t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR);break;case A:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}b=null,C=null,O=null,I=null,_=e,N=u}}else x&&(at(t.BLEND),x=!1)}function ct(e){D!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),D=e)}function ut(e){e!==a?(ot(t.CULL_FACE),e!==F&&(e===s?t.cullFace(t.BACK):e===c?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):at(t.CULL_FACE),F=e}function ht(e,n,r){e?(ot(t.POLYGON_OFFSET_FILL),B===n&&j===r||(t.polygonOffset(n,r),B=n,j=r)):at(t.POLYGON_OFFSET_FILL)}function lt(e){void 0===e&&(e=t.TEXTURE0+z-1),V!==e&&(t.activeTexture(e),V=e)}return rt[t.TEXTURE_2D]=nt(t.TEXTURE_2D,t.TEXTURE_2D,1),rt[t.TEXTURE_CUBE_MAP]=nt(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),i.setClear(0,0,0,1),o.setClear(1),u.setClear(0),ot(t.DEPTH_TEST),o.setFunc(Z),ct(!1),ut(s),ot(t.CULL_FACE),st(M),{buffers:{color:i,depth:o,stencil:u},initAttributes:function(){for(var t=0,e=l.length;t<e;t++)l[t]=0},enableAttribute:function(t){it(t,0)},enableAttributeAndDivisor:it,disableUnusedAttributes:function(){for(var e=0,n=f.length;e!==n;++e)f[e]!==l[e]&&(t.disableVertexAttribArray(e),f[e]=0)},enable:ot,disable:at,getCompressedTextureFormats:function(){if(null===m&&(m=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)m.push(n[r]);return m},useProgram:function(e){return y!==e&&(t.useProgram(e),y=e,!0)},setBlending:st,setMaterial:function(e,n){e.side===g?at(t.CULL_FACE):ot(t.CULL_FACE);var r=e.side===v;n&&(r=!r),ct(r),e.blending===E&&!1===e.transparent?st(M):st(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite),ht(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:ct,setCullFace:ut,setLineWidth:function(e){e!==U&&(G&&t.lineWidth(e),U=e)},setPolygonOffset:ht,setScissorTest:function(e){e?ot(t.SCISSOR_TEST):at(t.SCISSOR_TEST)},activeTexture:lt,bindTexture:function(e,n){null===V&<();var r=$[V];void 0===r&&(r={type:void 0,texture:void 0},$[V]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||rt[e]),r.type=e,r.texture=n)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===tt.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),tt.copy(e))},viewport:function(e){!1===et.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),et.copy(e))},reset:function(){for(var e=0;e<f.length;e++)1===f[e]&&(t.disableVertexAttribArray(e),f[e]=0);d={},m=null,V=null,$={},y=null,_=null,D=null,F=null,i.reset(),o.reset(),u.reset()}}}(y,x,H,_)).scissor(ct.copy(mt).multiplyScalar(pt)),w.viewport(st.copy(dt).multiplyScalar(pt)),b=new function(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(i=i||1,e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=i*(n-2);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}(y),C=new function(){var t=new WeakMap;return{get:function(e){var n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}},R=new ti(y,x,w,C,_,H,b),O=new cn(y),I=new function(t,e,n){var r={},i={};function o(t){var a=t.target,s=r[a.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);a.removeEventListener("dispose",o),delete r[a.id];var u=i[s.id];u&&(e.remove(u),delete i[s.id]),n.memory.geometries--}return{get:function(t,e){var i=r[e.id];return i||(e.addEventListener("dispose",o),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Rn).setFromObject(t)),i=e._bufferGeometry),r[e.id]=i,n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var o in null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER),i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],c=0,u=s.length;c<u;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(n){var r=i[n.id];if(r)return r;var o,a=[],s=n.index,c=n.attributes;if(null!==s)for(var u=0,h=(o=s.array).length;u<h;u+=3){var l=o[u+0],f=o[u+1],p=o[u+2];a.push(l,f,f,p,p,l)}else for(u=0,h=(o=c.position.array).length/3-1;u<h;u+=3)l=u+0,f=u+1,p=u+2,a.push(l,f,f,p,p,l);return r=new(Ln(a)>65535?Sn:Mn)(a,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),i[n.id]=r,r}}}(y,O,b),N=new function(t,e){var n={};return{update:function(r){var i=e.render.frame,o=r.geometry,a=t.get(r,o);return n[a.id]!==i&&(o.isGeometry&&a.updateFromObject(r),t.update(a),n[a.id]=i),a},dispose:function(){n={}}}}(I,b),j=new function(t){var e={},n=new Float32Array(8);return{update:function(r,i,o,a){var s=r.morphTargetInfluences,c=s.length,u=e[i.id];if(void 0===u){u=[];for(var h=0;h<c;h++)u[h]=[h,0];e[i.id]=u}var l=o.morphTargets&&i.morphAttributes.position,f=o.morphNormals&&i.morphAttributes.normal;for(h=0;h<c;h++)0!==(p=u[h])[1]&&(l&&i.removeAttribute("morphTarget"+h),f&&i.removeAttribute("morphNormal"+h));for(h=0;h<c;h++)(p=u[h])[0]=h,p[1]=s[h];for(u.sort(kn),h=0;h<8;h++){var p;if(p=u[h]){var d=p[0],m=p[1];if(m){l&&i.addAttribute("morphTarget"+h,l[d]),f&&i.addAttribute("morphNormal"+h,f[d]),n[h]=m;continue}}n[h]=0}a.getUniforms().setValue(t,"morphTargetInfluences",n)}}}(y),D=new kr(k,x,_),F=new Xr,U=new function(){var t={};return{get:function(e,n){var r;return void 0===t[e.id]?(r=new Jr,t[e.id]={},t[e.id][n.id]=r):void 0===t[e.id][n.id]?(r=new Jr,t[e.id][n.id]=r):r=t[e.id][n.id],r},dispose:function(){t={}}}},B=new function(t,e,n,r){var i,o,a,s=new rn(0),c=0;function u(t,n){e.buffers.color.setClear(t.r,t.g,t.b,n,r)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),u(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){u(s,c=t)},render:function(e,r,h,l){var f=r.background;null===f?u(s,c):f&&f.isColor&&(u(f,1),l=!0),(t.autoClear||l)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),f&&f.isCubeTexture?(void 0===a&&((a=new Hn(new In(1,1,1),new jn({uniforms:an.cube.uniforms,vertexShader:an.cube.vertexShader,fragmentShader:an.cube.fragmentShader,side:v,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),a.geometry.removeAttribute("uv"),a.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(a)),a.material.uniforms.tCube.value=f,e.push(a,a.geometry,a.material,0,null)):f&&f.isTexture&&(void 0===i&&(i=new dn(-1,1,1,-1,0,1),o=new Hn(new Dn(2,2),new Bn({depthTest:!1,depthWrite:!1,fog:!1})),n.update(o)),o.material.map=f,t.renderBufferDirect(i,null,o.geometry,o.material,o,null))}}}(k,w,N,l),z=new function(t,e,n,r){var i;this.setMode=function(t){i=t},this.render=function(e,r){t.drawArrays(i,e,r),n.update(r,i)},this.renderInstances=function(o,a,s){var c;if(r.isWebGL2)c=t;else if(null===(c=e.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[r.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](i,a,s,o.maxInstancedCount),n.update(s,i,o.maxInstancedCount)}}(y,x,b,_),G=new function(t,e,n,r){var i,o,a;this.setMode=function(t){i=t},this.setIndex=function(t){o=t.type,a=t.bytesPerElement},this.render=function(e,r){t.drawElements(i,r,o,e*a),n.update(r,i)},this.renderInstances=function(s,c,u){var h;if(r.isWebGL2)h=t;else if(null===(h=e.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");h[r.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](i,u,o,c*a,s.maxInstancedCount),n.update(u,i,s.maxInstancedCount)}}(y,x,b,_),b.programs=D.programs,k.context=y,k.capabilities=_,k.extensions=x,k.properties=C,k.renderLists=F,k.state=w,k.info=b}Tt();var At="xr"in navigator?new function(t){var e=t.context,n=null,r=null,i=null,o="stage",a=null,s=[],c=[];function u(){return null!==r&&null!==i}var h=new ri;h.layers.enable(1),h.viewport=new Xe;var l=new ri;l.layers.enable(2),l.viewport=new Xe;var f=new ii([h,l]);function p(t){var e=s[c.indexOf(t.inputSource)];e&&e.dispatchEvent({type:t.type})}function d(){t.setFramebuffer(null),g.stop()}function m(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.getController=function(t){var e=s[t];return void 0===e&&((e=new ni).matrixAutoUpdate=!1,e.visible=!1,s[t]=e),e},this.getDevice=function(){return n},this.setDevice=function(t){void 0!==t&&(n=t),t instanceof XRDevice&&e.setCompatibleXRDevice(t)},this.setFrameOfReferenceType=function(t){o=t},this.setSession=function(n){null!==(r=n)&&(r.addEventListener("select",p),r.addEventListener("selectstart",p),r.addEventListener("selectend",p),r.addEventListener("end",d),r.baseLayer=new XRWebGLLayer(r,e),r.requestFrameOfReference(o).then(function(e){i=e,t.setFramebuffer(r.baseLayer.framebuffer),g.setContext(r),g.start()}),c=r.getInputSources(),r.addEventListener("inputsourceschange",function(){c=r.getInputSources(),console.log(c)}))},this.getCamera=function(t){if(u()){var e=t.parent,n=f.cameras;m(f,e);for(var r=0;r<n.length;r++)m(n[r],e);t.matrixWorld.copy(f.matrixWorld);for(var i=t.children,o=(r=0,i.length);r<o;r++)i[r].updateMatrixWorld(!0);return f}return t},this.isPresenting=u;var v=null,g=new sn;g.setAnimationLoop(function(t,e){if(null!==(a=e.getDevicePose(i)))for(var n=r.baseLayer,o=e.views,u=0;u<o.length;u++){var h=o[u],l=n.getViewport(h),p=a.getViewMatrix(h),d=f.cameras[u];d.matrix.fromArray(p).getInverse(d.matrix),d.projectionMatrix.fromArray(h.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===u&&(f.matrix.copy(d.matrix),f.projectionMatrix.copy(d.projectionMatrix))}for(u=0;u<s.length;u++){var m=s[u],g=c[u];if(g){var y=e.getInputPose(g,i);if(null!==y){"targetRay"in y?m.matrix.elements=y.targetRay.transformMatrix:"pointerMatrix"in y&&(m.matrix.elements=y.pointerMatrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.visible=!0;continue}}m.visible=!1}v&&v(t)}),this.setAnimationLoop=function(t){v=t},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}(k):new oi(k);this.vr=At;var Pt=new $r(k,N,_.maxTextureSize);function Lt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),V=!0}function Ot(){console.log("THREE.WebGLRenderer: Context Restored."),V=!1,Tt()}function It(t){var e=t.target;e.removeEventListener("dispose",It),function(t){Nt(t),C.remove(t)}(e)}function Nt(t){var e=C.get(t).program;t.program=void 0,void 0!==e&&D.releaseProgram(e)}this.shadowMap=Pt,this.getContext=function(){return y},this.getContextAttributes=function(){return y.getContextAttributes()},this.forceContextLoss=function(){var t=x.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=x.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return pt},this.setPixelRatio=function(t){void 0!==t&&(pt=t,this.setSize(lt,ft,!1))},this.getSize=function(){return{width:lt,height:ft}},this.setSize=function(t,n,r){At.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(lt=t,ft=n,e.width=t*pt,e.height=n*pt,!1!==r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(){return{width:lt*pt,height:ft*pt}},this.setDrawingBufferSize=function(t,n,r){lt=t,ft=n,pt=r,e.width=t*r,e.height=n*r,this.setViewport(0,0,t,n)},this.getCurrentViewport=function(){return st},this.setViewport=function(t,e,n,r){dt.set(t,ft-e-r,n,r),w.viewport(st.copy(dt).multiplyScalar(pt))},this.setScissor=function(t,e,n,r){mt.set(t,ft-e-r,n,r),w.scissor(ct.copy(mt).multiplyScalar(pt))},this.setScissorTest=function(t){w.setScissorTest(vt=t)},this.getClearColor=function(){return B.getClearColor()},this.setClearColor=function(){B.setClearColor.apply(B,arguments)},this.getClearAlpha=function(){return B.getClearAlpha()},this.setClearAlpha=function(){B.setClearAlpha.apply(B,arguments)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=y.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=y.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=y.STENCIL_BUFFER_BIT),y.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.dispose=function(){e.removeEventListener("webglcontextlost",Lt,!1),e.removeEventListener("webglcontextrestored",Ot,!1),F.dispose(),U.dispose(),C.dispose(),N.dispose(),At.dispose(),Ft.stop()},this.renderBufferImmediate=function(t,e){w.initAttributes();var n=C.get(t);t.hasPositions&&!n.position&&(n.position=y.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=y.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=y.createBuffer()),t.hasColors&&!n.color&&(n.color=y.createBuffer());var r=e.getAttributes();t.hasPositions&&(y.bindBuffer(y.ARRAY_BUFFER,n.position),y.bufferData(y.ARRAY_BUFFER,t.positionArray,y.DYNAMIC_DRAW),w.enableAttribute(r.position),y.vertexAttribPointer(r.position,3,y.FLOAT,!1,0,0)),t.hasNormals&&(y.bindBuffer(y.ARRAY_BUFFER,n.normal),y.bufferData(y.ARRAY_BUFFER,t.normalArray,y.DYNAMIC_DRAW),w.enableAttribute(r.normal),y.vertexAttribPointer(r.normal,3,y.FLOAT,!1,0,0)),t.hasUvs&&(y.bindBuffer(y.ARRAY_BUFFER,n.uv),y.bufferData(y.ARRAY_BUFFER,t.uvArray,y.DYNAMIC_DRAW),w.enableAttribute(r.uv),y.vertexAttribPointer(r.uv,2,y.FLOAT,!1,0,0)),t.hasColors&&(y.bindBuffer(y.ARRAY_BUFFER,n.color),y.bufferData(y.ARRAY_BUFFER,t.colorArray,y.DYNAMIC_DRAW),w.enableAttribute(r.color),y.vertexAttribPointer(r.color,3,y.FLOAT,!1,0,0)),w.disableUnusedAttributes(),y.drawArrays(y.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,n,r,i,o){var a=i.isMesh&&i.normalMatrix.determinant()<0;w.setMaterial(r,a);var s=Gt(t,e,r,i),c=!1;it.geometry===n.id&&it.program===s.id&&it.wireframe===(!0===r.wireframe)||(it.geometry=n.id,it.program=s.id,it.wireframe=!0===r.wireframe,c=!0),i.morphTargetInfluences&&(j.update(i,n,r,s),c=!0);var u,h=n.index,l=n.attributes.position,f=1;!0===r.wireframe&&(h=I.getWireframeAttribute(n),f=2);var p=z;null!==h&&(u=O.get(h),(p=G).setIndex(u)),c&&(!function(t,e,n){if(n&&n.isInstancedBufferGeometry&!_.isWebGL2&&null===x.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");w.initAttributes();var r=n.attributes,i=e.getAttributes(),o=t.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var c=r[a];if(void 0!==c){var u=c.normalized,h=c.itemSize,l=O.get(c);if(void 0===l)continue;var f=l.buffer,p=l.type,d=l.bytesPerElement;if(c.isInterleavedBufferAttribute){var m=c.data,v=m.stride,g=c.offset;m&&m.isInstancedInterleavedBuffer?(w.enableAttributeAndDivisor(s,m.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=m.meshPerAttribute*m.count)):w.enableAttribute(s),y.bindBuffer(y.ARRAY_BUFFER,f),y.vertexAttribPointer(s,h,p,u,v*d,g*d)}else c.isInstancedBufferAttribute?(w.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):w.enableAttribute(s),y.bindBuffer(y.ARRAY_BUFFER,f),y.vertexAttribPointer(s,h,p,u,0,0)}else if(void 0!==o){var b=o[a];if(void 0!==b)switch(b.length){case 2:y.vertexAttrib2fv(s,b);break;case 3:y.vertexAttrib3fv(s,b);break;case 4:y.vertexAttrib4fv(s,b);break;default:y.vertexAttrib1fv(s,b)}}}}w.disableUnusedAttributes()}(r,s,n),null!==h&&y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,u.buffer));var d=1/0;null!==h?d=h.count:void 0!==l&&(d=l.count);var m=n.drawRange.start*f,v=n.drawRange.count*f,g=null!==o?o.start*f:0,b=null!==o?o.count*f:1/0,M=Math.max(m,g),E=Math.min(d,m+v,g+b)-1,S=Math.max(0,E-M+1);if(0!==S){if(i.isMesh)if(!0===r.wireframe)w.setLineWidth(r.wireframeLinewidth*Mt()),p.setMode(y.LINES);else switch(i.drawMode){case be:p.setMode(y.TRIANGLES);break;case Me:p.setMode(y.TRIANGLE_STRIP);break;case Ee:p.setMode(y.TRIANGLE_FAN)}else if(i.isLine){var T=r.linewidth;void 0===T&&(T=1),w.setLineWidth(T*Mt()),i.isLineSegments?p.setMode(y.LINES):i.isLineLoop?p.setMode(y.LINE_LOOP):p.setMode(y.LINE_STRIP)}else i.isPoints?p.setMode(y.POINTS):i.isSprite&&p.setMode(y.TRIANGLES);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&p.renderInstances(n,M,S):p.render(M,S)}},this.compile=function(t,e){(m=U.get(t,e)).init(),t.traverse(function(t){t.isLight&&(m.pushLight(t),t.castShadow&&m.pushShadow(t))}),m.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)zt(e.material[n],t.fog,e);else zt(e.material,t.fog,e)})};var Dt=null;var Ft=new sn;function Ut(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,c=a.geometry,u=void 0===r?a.material:r,h=a.group;if(n.isArrayCamera){at=n;for(var l=n.cameras,f=0,p=l.length;f<p;f++){var d=l[f];if(s.layers.test(d.layers)){if("viewport"in d)w.viewport(st.copy(d.viewport));else{var v=d.bounds,g=v.x*lt,y=v.y*ft,x=v.z*lt,_=v.w*ft;w.viewport(st.set(g,y,x,_).multiplyScalar(pt))}m.setupLights(d),jt(s,e,d,c,u,h)}}}else at=null,jt(s,e,n,c,u,h)}}function jt(t,e,n,r,i,o){if(t.onBeforeRender(k,e,n,r,i,o),m=U.get(e,at||n),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){w.setMaterial(i);var a=Gt(n,e.fog,i,t);it.geometry=null,it.program=null,it.wireframe=!1,function(t,e){t.render(function(t){k.renderBufferImmediate(t,e)})}(t,a)}else k.renderBufferDirect(n,e.fog,r,i,t,o);t.onAfterRender(k,e,n,r,i,o),m=U.get(e,at||n)}function zt(t,e,n){var r=C.get(t),i=m.state.lights,o=m.state.shadowsArray,a=r.lightsHash,s=i.state.hash,c=D.getParameters(t,i.state,o,e,yt.numPlanes,yt.numIntersection,n),u=D.getProgramCode(t,c),h=r.program,l=!0;if(void 0===h)t.addEventListener("dispose",It);else if(h.code!==u)Nt(t);else if(a.stateID!==s.stateID||a.directionalLength!==s.directionalLength||a.pointLength!==s.pointLength||a.spotLength!==s.spotLength||a.rectAreaLength!==s.rectAreaLength||a.hemiLength!==s.hemiLength||a.shadowsLength!==s.shadowsLength)a.stateID=s.stateID,a.directionalLength=s.directionalLength,a.pointLength=s.pointLength,a.spotLength=s.spotLength,a.rectAreaLength=s.rectAreaLength,a.hemiLength=s.hemiLength,a.shadowsLength=s.shadowsLength,l=!1;else{if(void 0!==c.shaderID)return;l=!1}if(l){if(c.shaderID){var f=an[c.shaderID];r.shader={name:t.type,uniforms:en.clone(f.uniforms),vertexShader:f.vertexShader,fragmentShader:f.fragmentShader}}else r.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(r.shader,k),u=D.getProgramCode(t,c),h=D.acquireProgram(t,r.shader,c,u),r.program=h,t.program=h}var p=h.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<k.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<k.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var v=r.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=yt.numPlanes,r.numIntersection=yt.numIntersection,v.clippingPlanes=yt.uniform),r.fog=e,void 0===a&&(r.lightsHash=a={}),a.stateID=s.stateID,a.directionalLength=s.directionalLength,a.pointLength=s.pointLength,a.spotLength=s.spotLength,a.rectAreaLength=s.rectAreaLength,a.hemiLength=s.hemiLength,a.shadowsLength=s.shadowsLength,t.lights&&(v.ambientLightColor.value=i.state.ambient,v.directionalLights.value=i.state.directional,v.spotLights.value=i.state.spot,v.rectAreaLights.value=i.state.rectArea,v.pointLights.value=i.state.point,v.hemisphereLights.value=i.state.hemi,v.directionalShadowMap.value=i.state.directionalShadowMap,v.directionalShadowMatrix.value=i.state.directionalShadowMatrix,v.spotShadowMap.value=i.state.spotShadowMap,v.spotShadowMatrix.value=i.state.spotShadowMatrix,v.pointShadowMap.value=i.state.pointShadowMap,v.pointShadowMatrix.value=i.state.pointShadowMatrix);var g=r.program.getUniforms(),y=Or.seqWithValue(g.seq,v);r.uniformsList=y}function Gt(t,e,n,r){ht=0;var i=C.get(n),o=m.state.lights,a=i.lightsHash,s=o.state.hash;if(xt&&(_t||t!==ot)){var c=t===ot&&n.id===nt;yt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,c)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:(!n.lights||a.stateID===s.stateID&&a.directionalLength===s.directionalLength&&a.pointLength===s.pointLength&&a.spotLength===s.spotLength&&a.rectAreaLength===s.rectAreaLength&&a.hemiLength===s.hemiLength&&a.shadowsLength===s.shadowsLength)&&(void 0===i.numClippingPlanes||i.numClippingPlanes===yt.numPlanes&&i.numIntersection===yt.numIntersection)||(n.needsUpdate=!0)),n.needsUpdate&&(zt(n,e,r),n.needsUpdate=!1);var u=!1,h=!1,l=!1,f=i.program,p=f.getUniforms(),d=i.shader.uniforms;if(w.useProgram(f.program)&&(u=!0,h=!0,l=!0),n.id!==nt&&(nt=n.id,h=!0),u||ot!==t){if(p.setValue(y,"projectionMatrix",t.projectionMatrix),_.logarithmicDepthBuffer&&p.setValue(y,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),ot!==t&&(ot=t,h=!0,l=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var g=p.map.cameraPosition;void 0!==g&&g.setValue(y,bt.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&p.setValue(y,"viewMatrix",t.matrixWorldInverse)}if(n.skinning){p.setOptional(y,r,"bindMatrix"),p.setOptional(y,r,"bindMatrixInverse");var x=r.skeleton;if(x){var b=x.bones;if(_.floatVertexTextures){if(void 0===x.boneTexture){var M=Math.sqrt(4*b.length);M=Ue.ceilPowerOfTwo(M),M=Math.max(M,4);var E=new Float32Array(M*M*4);E.set(x.boneMatrices);var S=new Ye(E,M,M,Bt,Ct);S.needsUpdate=!0,x.boneMatrices=E,x.boneTexture=S,x.boneTextureSize=M}p.setValue(y,"boneTexture",x.boneTexture),p.setValue(y,"boneTextureSize",x.boneTextureSize)}else p.setOptional(y,x,"boneMatrices")}}return h&&(p.setValue(y,"toneMappingExposure",k.toneMappingExposure),p.setValue(y,"toneMappingWhitePoint",k.toneMappingWhitePoint),n.lights&&function(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}(d,l),e&&n.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(d,e),n.isMeshBasicMaterial?Ht(d,n):n.isMeshLambertMaterial?(Ht(d,n),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(d,n)):n.isMeshPhongMaterial?(Ht(d,n),n.isMeshToonMaterial?function(t,e){kt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(d,n):kt(d,n)):n.isMeshStandardMaterial?(Ht(d,n),n.isMeshPhysicalMaterial?function(t,e){Vt(t,e),t.reflectivity.value=e.reflectivity,t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness}(d,n):Vt(d,n)):n.isMeshDepthMaterial?(Ht(d,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(d,n)):n.isMeshDistanceMaterial?(Ht(d,n),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(d,n)):n.isMeshNormalMaterial?(Ht(d,n),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===v&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===v&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(d,n)):n.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(d,n),n.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(d,n)):n.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*pt,t.scale.value=.5*ft,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(d,n):n.isSpriteMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.rotation.value=e.rotation,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(d,n):n.isShadowMaterial&&(d.color.value=n.color,d.opacity.value=n.opacity),void 0!==d.ltc_1&&(d.ltc_1.value=on.LTC_1),void 0!==d.ltc_2&&(d.ltc_2.value=on.LTC_2),Or.upload(y,i.uniformsList,d,k)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Or.upload(y,i.uniformsList,d,k),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&p.setValue(y,"center",r.center),p.setValue(y,"modelViewMatrix",r.modelViewMatrix),p.setValue(y,"normalMatrix",r.normalMatrix),p.setValue(y,"modelMatrix",r.matrixWorld),f}function Ht(t,e){var n;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=C.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}function kt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===v&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===v&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Vt(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===v&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===v&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}Ft.setAnimationLoop(function(t){At.isPresenting()||Dt&&Dt(t)}),"undefined"!=typeof window&&Ft.setContext(window),this.setAnimationLoop=function(t){Dt=t,At.setAnimationLoop(t),Ft.start()},this.render=function(t,e,n,r){if(e&&e.isCamera){if(!V){it.geometry=null,it.program=null,it.wireframe=!1,nt=-1,ot=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),At.enabled&&(e=At.getCamera(e)),(m=U.get(t,e)).init(),t.onBeforeRender(k,t,e,n),wt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),gt.setFromMatrix(wt),_t=this.localClippingEnabled,xt=yt.init(this.clippingPlanes,_t,e),(d=F.get(t,e)).init(),function t(e,n,r){if(!1===e.visible)return;var i=e.layers.test(n.layers);if(i)if(e.isLight)m.pushLight(e),e.castShadow&&m.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||gt.intersectsSprite(e)){r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(wt);var o=N.update(e),a=e.material;d.push(e,o,a,bt.z,null)}}else if(e.isImmediateRenderObject)r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(wt),d.push(e,null,e.material,bt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||gt.intersectsObject(e))){r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(wt);var o=N.update(e),a=e.material;if(Array.isArray(a))for(var s=o.groups,c=0,u=s.length;c<u;c++){var h=s[c],l=a[h.materialIndex];l&&l.visible&&d.push(e,o,l,bt.z,h)}else a.visible&&d.push(e,o,a,bt.z,null)}var f=e.children;for(var c=0,u=f.length;c<u;c++)t(f[c],n,r)}(t,e,k.sortObjects),!0===k.sortObjects&&d.sort(),xt&&yt.beginShadows();var i=m.state.shadowsArray;Pt.render(i,t,e),m.setupLights(e),xt&&yt.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),B.render(d,t,e,r);var o=d.opaque,a=d.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&Ut(o,t,e,s),a.length&&Ut(a,t,e,s)}else o.length&&Ut(o,t,e),a.length&&Ut(a,t,e);n&&R.updateRenderTargetMipmap(n),w.buffers.depth.setTest(!0),w.buffers.depth.setMask(!0),w.buffers.color.setMask(!0),w.setPolygonOffset(!1),t.onAfterRender(k,t,e),At.enabled&&At.submitFrame(),d=null,m=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=ht;return t>=_.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+_.maxTextures),ht+=1,t},this.setTexture2D=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),R.setTexture2D(e,n)}}(),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),R.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?R.setTextureCube(e,n):R.setTextureCubeDynamic(e,n)}}(),this.setFramebuffer=function(t){$=t},this.getRenderTarget=function(){return tt},this.setRenderTarget=function(t){tt=t,t&&void 0===C.get(t).__webglFramebuffer&&R.setupRenderTarget(t);var e=$,n=!1;if(t){var r=C.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=r[t.activeCubeFace],n=!0):e=r,st.copy(t.viewport),ct.copy(t.scissor),ut=t.scissorTest}else st.copy(dt).multiplyScalar(pt),ct.copy(mt).multiplyScalar(pt),ut=vt;if(et!==e&&(y.bindFramebuffer(y.FRAMEBUFFER,e),et=e),w.viewport(st),w.scissor(ct),w.setScissorTest(ut),n){var i=C.get(t.texture);y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(t&&t.isWebGLRenderTarget){var a=C.get(t).__webglFramebuffer;if(a){var s=!1;a!==et&&(y.bindFramebuffer(y.FRAMEBUFFER,a),s=!0);try{var c=t.texture,u=c.format,h=c.type;if(u!==Bt&&H.convert(u)!==y.getParameter(y.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(h===Et||H.convert(h)===y.getParameter(y.IMPLEMENTATION_COLOR_READ_TYPE)||h===Ct&&(_.isWebGL2||x.get("OES_texture_float")||x.get("WEBGL_color_buffer_float"))||h===Rt&&(_.isWebGL2?x.get("EXT_color_buffer_float"):x.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");y.checkFramebufferStatus(y.FRAMEBUFFER)===y.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&y.readPixels(e,n,r,i,H.convert(u),H.convert(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&y.bindFramebuffer(y.FRAMEBUFFER,et)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,n){var r=e.image.width,i=e.image.height,o=H.convert(e.format);this.setTexture2D(e,0),y.copyTexImage2D(y.TEXTURE_2D,n||0,o,t.x,t.y,r,i,0)},this.copyTextureToTexture=function(t,e,n,r){var i=e.image.width,o=e.image.height,a=H.convert(n.format),s=H.convert(n.type);this.setTexture2D(n,0),e.isDataTexture?y.texSubImage2D(y.TEXTURE_2D,r||0,t.x,t.y,i,o,a,s,e.image.data):y.texSubImage2D(y.TEXTURE_2D,r||0,t.x,t.y,a,s,e.image)}}function si(t,e){this.name="",this.color=new rn(t),this.density=void 0!==e?e:25e-5}function ci(t,e,n){this.name="",this.color=new rn(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ui(){fn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function hi(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function li(t,e,n,r){this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function fi(t){Un.call(this),this.type="SpriteMaterial",this.color=new rn(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function pi(t){if(fn.call(this),this.type="Sprite",void 0===qr){qr=new Rn;var e=new hi(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);qr.setIndex([0,1,2,0,2,3]),qr.addAttribute("position",new li(e,3,0,!1)),qr.addAttribute("uv",new li(e,2,3,!1))}this.geometry=qr,this.material=void 0!==t?t:new fi,this.center=new Be(.5,.5)}function di(){fn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function mi(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new je)}}function vi(){fn.call(this),this.type="Bone"}function gi(t,e){Hn.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new je,this.bindMatrixInverse=new je;var n=new mi(this.initBones());this.bind(n,this.matrixWorld),this.normalizeSkinWeights()}function yi(t){Un.call(this),this.type="LineBasicMaterial",this.color=new rn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function xi(t,e,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),fn.call(this),this.type="Line",this.geometry=void 0!==t?t:new Rn,this.material=void 0!==e?e:new yi({color:16777215*Math.random()})}function _i(t,e){xi.call(this,t,e),this.type="LineSegments"}function wi(t,e){xi.call(this,t,e),this.type="LineLoop"}function bi(t){Un.call(this),this.type="PointsMaterial",this.color=new rn(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function Mi(t,e){fn.call(this),this.type="Points",this.geometry=void 0!==t?t:new Rn,this.material=void 0!==e?e:new bi({color:16777215*Math.random()})}function Ei(t,e,n,r,i,o,a,s,c){We.call(this,t,e,n,r,i,o,a,s,c),this.generateMipmaps=!1}function Si(t,e,n,r,i,o,a,s,c,u,h,l){We.call(this,null,o,a,s,c,u,r,i,h,l),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Ti(t,e,n,r,i,o,a,s,c){We.call(this,t,e,n,r,i,o,a,s,c),this.needsUpdate=!0}function Ai(t,e,n,r,i,o,a,s,c,u){if((u=void 0!==u?u:Ht)!==Ht&&u!==kt)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ht&&(n=At),void 0===n&&u===kt&&(n=Dt),We.call(this,null,r,i,o,a,s,u,n,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:yt,this.minFilter=void 0!==s?s:yt,this.flipY=!1,this.generateMipmaps=!1}function Pi(t){Rn.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,c,u,h,l=[],f=[0,0],p={},d=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,r=m.length;e<r;e++){var v=m[e];for(n=0;n<3;n++)s=v[d[n]],c=v[d[(n+1)%3]],f[0]=Math.min(s,c),f[1]=Math.max(s,c),void 0===p[u=f[0]+","+f[1]]&&(p[u]={index1:f[0],index2:f[1]})}for(u in p)a=p[u],h=t.vertices[a.index1],l.push(h.x,h.y,h.z),h=t.vertices[a.index2],l.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry){var g,y,x,_,w,b,M;if(h=new Ge,null!==t.index){for(g=t.attributes.position,y=t.index,0===(x=t.groups).length&&(x=[{start:0,count:y.count,materialIndex:0}]),i=0,o=x.length;i<o;++i)for(e=w=(_=x[i]).start,r=w+_.count;e<r;e+=3)for(n=0;n<3;n++)s=y.getX(e+n),c=y.getX(e+(n+1)%3),f[0]=Math.min(s,c),f[1]=Math.max(s,c),void 0===p[u=f[0]+","+f[1]]&&(p[u]={index1:f[0],index2:f[1]});for(u in p)a=p[u],h.fromBufferAttribute(g,a.index1),l.push(h.x,h.y,h.z),h.fromBufferAttribute(g,a.index2),l.push(h.x,h.y,h.z)}else for(e=0,r=(g=t.attributes.position).count/3;e<r;e++)for(n=0;n<3;n++)b=3*e+n,h.fromBufferAttribute(g,b),l.push(h.x,h.y,h.z),M=3*e+(n+1)%3,h.fromBufferAttribute(g,M),l.push(h.x,h.y,h.z)}this.addAttribute("position",new Tn(l,3))}function Li(t,e,n){gn.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Ci(t,e,n)),this.mergeVertices()}function Ci(t,e,n){Rn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],c=[],u=new Ge,h=new Ge,l=new Ge,f=new Ge,p=new Ge;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var d=e+1;for(r=0;r<=n;r++){var m=r/n;for(i=0;i<=e;i++){var v=i/e;t(v,m,h),a.push(h.x,h.y,h.z),v-1e-5>=0?(t(v-1e-5,m,l),f.subVectors(h,l)):(t(v+1e-5,m,l),f.subVectors(l,h)),m-1e-5>=0?(t(v,m-1e-5,l),p.subVectors(h,l)):(t(v,m+1e-5,l),p.subVectors(l,h)),u.crossVectors(f,p).normalize(),s.push(u.x,u.y,u.z),c.push(v,m)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var g=r*d+i,y=r*d+i+1,x=(r+1)*d+i+1,_=(r+1)*d+i;o.push(g,y,_),o.push(y,x,_)}this.setIndex(o),this.addAttribute("position",new Tn(a,3)),this.addAttribute("normal",new Tn(s,3)),this.addAttribute("uv",new Tn(c,2))}function Ri(t,e,n,r){gn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new Oi(t,e,n,r)),this.mergeVertices()}function Oi(t,e,n,r){Rn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1;var i=[],o=[];function a(t,e,n,r){var i,o,a=Math.pow(2,r),c=[];for(i=0;i<=a;i++){c[i]=[];var u=t.clone().lerp(n,i/a),h=e.clone().lerp(n,i/a),l=a-i;for(o=0;o<=l;o++)c[i][o]=0===o&&i===a?u:u.clone().lerp(h,o/l)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var f=Math.floor(o/2);o%2==0?(s(c[i][f+1]),s(c[i+1][f]),s(c[i][f])):(s(c[i][f+1]),s(c[i+1][f+1]),s(c[i+1][f]))}}function s(t){i.push(t.x,t.y,t.z)}function c(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function u(t,e,n,r){r<0&&1===t.x&&(o[e]=t.x-1),0===n.x&&0===n.z&&(o[e]=r/2/Math.PI+.5)}function h(t){return Math.atan2(t.z,-t.x)}function l(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}!function(t){for(var n=new Ge,r=new Ge,i=new Ge,o=0;o<e.length;o+=3)c(e[o+0],n),c(e[o+1],r),c(e[o+2],i),a(n,r,i,t)}(r=r||0),function(t){for(var e=new Ge,n=0;n<i.length;n+=3)e.x=i[n+0],e.y=i[n+1],e.z=i[n+2],e.normalize().multiplyScalar(t),i[n+0]=e.x,i[n+1]=e.y,i[n+2]=e.z}(n),function(){for(var t=new Ge,e=0;e<i.length;e+=3){t.x=i[e+0],t.y=i[e+1],t.z=i[e+2];var n=h(t)/2/Math.PI+.5,r=l(t)/Math.PI+.5;o.push(n,1-r)}(function(){for(var t=new Ge,e=new Ge,n=new Ge,r=new Ge,a=new Be,s=new Be,c=new Be,l=0,f=0;l<i.length;l+=9,f+=6){t.set(i[l+0],i[l+1],i[l+2]),e.set(i[l+3],i[l+4],i[l+5]),n.set(i[l+6],i[l+7],i[l+8]),a.set(o[f+0],o[f+1]),s.set(o[f+2],o[f+3]),c.set(o[f+4],o[f+5]),r.copy(t).add(e).add(n).divideScalar(3);var p=h(r);u(a,f+0,t,p),u(s,f+2,e,p),u(c,f+4,n,p)}})(),function(){for(var t=0;t<o.length;t+=6){var e=o[t+0],n=o[t+2],r=o[t+4],i=Math.max(e,n,r),a=Math.min(e,n,r);i>.9&&a<.1&&(e<.2&&(o[t+0]+=1),n<.2&&(o[t+2]+=1),r<.2&&(o[t+4]+=1))}}()}(),this.addAttribute("position",new Tn(i,3)),this.addAttribute("normal",new Tn(i.slice(),3)),this.addAttribute("uv",new Tn(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Ii(t,e){gn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Ni(t,e)),this.mergeVertices()}function Ni(t,e){Oi.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Di(t,e){gn.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Fi(t,e)),this.mergeVertices()}function Fi(t,e){Oi.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ui(t,e){gn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Bi(t,e)),this.mergeVertices()}function Bi(t,e){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];Oi.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function ji(t,e){gn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new zi(t,e)),this.mergeVertices()}function zi(t,e){var n=(1+Math.sqrt(5))/2,r=1/n,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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];Oi.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],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Gi(t,e,n,r,i,o){gn.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new Hi(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function Hi(t,e,n,r,i){Rn.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},e=e||64,n=n||1,r=r||8,i=i||!1;var o=t.computeFrenetFrames(e,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;var a,s,c=new Ge,u=new Ge,h=new Be,l=new Ge,f=[],p=[],d=[],m=[];function v(i){l=t.getPointAt(i/e,l);var a=o.normals[i],h=o.binormals[i];for(s=0;s<=r;s++){var d=s/r*Math.PI*2,m=Math.sin(d),v=-Math.cos(d);u.x=v*a.x+m*h.x,u.y=v*a.y+m*h.y,u.z=v*a.z+m*h.z,u.normalize(),p.push(u.x,u.y,u.z),c.x=l.x+n*u.x,c.y=l.y+n*u.y,c.z=l.z+n*u.z,f.push(c.x,c.y,c.z)}}!function(){for(a=0;a<e;a++)v(a);v(!1===i?e:0),function(){for(a=0;a<=e;a++)for(s=0;s<=r;s++)h.x=a/e,h.y=s/r,d.push(h.x,h.y)}(),function(){for(s=1;s<=e;s++)for(a=1;a<=r;a++){var t=(r+1)*(s-1)+(a-1),n=(r+1)*s+(a-1),i=(r+1)*s+a,o=(r+1)*(s-1)+a;m.push(t,n,o),m.push(n,i,o)}}()}(),this.setIndex(m),this.addAttribute("position",new Tn(f,3)),this.addAttribute("normal",new Tn(p,3)),this.addAttribute("uv",new Tn(d,2))}function ki(t,e,n,r,i,o,a){gn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new Vi(t,e,n,r,i,o)),this.mergeVertices()}function Vi(t,e,n,r,i,o){Rn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||1,e=e||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var a,s,c=[],u=[],h=[],l=[],f=new Ge,p=new Ge,d=new Ge,m=new Ge,v=new Ge,g=new Ge,y=new Ge;for(a=0;a<=n;++a){var x=a/n*i*Math.PI*2;for(A(x,i,o,t,d),A(x+.01,i,o,t,m),g.subVectors(m,d),y.addVectors(m,d),v.crossVectors(g,y),y.crossVectors(v,g),v.normalize(),y.normalize(),s=0;s<=r;++s){var _=s/r*Math.PI*2,w=-e*Math.cos(_),b=e*Math.sin(_);f.x=d.x+(w*y.x+b*v.x),f.y=d.y+(w*y.y+b*v.y),f.z=d.z+(w*y.z+b*v.z),u.push(f.x,f.y,f.z),p.subVectors(f,d).normalize(),h.push(p.x,p.y,p.z),l.push(a/n),l.push(s/r)}}for(s=1;s<=n;s++)for(a=1;a<=r;a++){var M=(r+1)*(s-1)+(a-1),E=(r+1)*s+(a-1),S=(r+1)*s+a,T=(r+1)*(s-1)+a;c.push(M,E,T),c.push(E,S,T)}function A(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,c=Math.cos(s);i.x=r*(2+c)*.5*o,i.y=r*(2+c)*a*.5,i.z=r*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new Tn(u,3)),this.addAttribute("normal",new Tn(h,3)),this.addAttribute("uv",new Tn(l,2))}function Wi(t,e,n,r,i){gn.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new Xi(t,e,n,r,i)),this.mergeVertices()}function Xi(t,e,n,r,i){Rn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||1,e=e||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],c=[],u=[],h=[],l=new Ge,f=new Ge,p=new Ge;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var d=a/r*i,m=o/n*Math.PI*2;f.x=(t+e*Math.cos(m))*Math.cos(d),f.y=(t+e*Math.cos(m))*Math.sin(d),f.z=e*Math.sin(m),c.push(f.x,f.y,f.z),l.x=t*Math.cos(d),l.y=t*Math.sin(d),p.subVectors(f,l).normalize(),u.push(p.x,p.y,p.z),h.push(a/r),h.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,g=(r+1)*(o-1)+a-1,y=(r+1)*(o-1)+a,x=(r+1)*o+a;s.push(v,g,x),s.push(g,y,x)}this.setIndex(s),this.addAttribute("position",new Tn(c,3)),this.addAttribute("normal",new Tn(u,3)),this.addAttribute("uv",new Tn(h,2))}Kr.prototype=Object.create(Un.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isMeshDepthMaterial=!0,Kr.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Qr.prototype=Object.create(Un.prototype),Qr.prototype.constructor=Qr,Qr.prototype.isMeshDistanceMaterial=!0,Qr.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},ni.prototype=Object.assign(Object.create(fn.prototype),{constructor:ni,isGroup:!0}),ri.prototype=Object.assign(Object.create(pn.prototype),{constructor:ri,isPerspectiveCamera:!0,copy:function(t,e){return pn.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ue.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ue.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ue.RAD2DEG*Math.atan(Math.tan(.5*Ue.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(t,e,n,r,i,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ue.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var c=this.filmOffset;0!==c&&(i+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){var e=fn.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),ii.prototype=Object.assign(Object.create(ri.prototype),{constructor:ii,isArrayCamera:!0}),si.prototype.isFogExp2=!0,si.prototype.clone=function(){return new si(this.color,this.density)},si.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},ci.prototype.isFog=!0,ci.prototype.clone=function(){return new ci(this.color,this.near,this.far)},ci.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ui.prototype=Object.assign(Object.create(fn.prototype),{constructor:ui,copy:function(t,e){return fn.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=fn.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(hi.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(hi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(li.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(li.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),fi.prototype=Object.create(Un.prototype),fi.prototype.constructor=fi,fi.prototype.isSpriteMaterial=!0,fi.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this},pi.prototype=Object.assign(Object.create(fn.prototype),{constructor:pi,isSprite:!0,raycast:function(){var t=new Ge,e=new Ge,n=new Ge,r=new Be,i=new Be,o=new je,a=new Ge,s=new Ge,c=new Ge,u=new Be,h=new Be,l=new Be;function f(t,e,n,a,s,c){r.subVectors(t,n).addScalar(.5).multiply(a),void 0!==s?(i.x=c*r.x-s*r.y,i.y=s*r.x+c*r.y):i.copy(r),t.copy(e),t.x+=i.x,t.y+=i.y,t.applyMatrix4(o)}return function(r,i){e.setFromMatrixScale(this.matrixWorld),o.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var p,d,m=this.material.rotation;0!==m&&(d=Math.cos(m),p=Math.sin(m));var v=this.center;f(a.set(-.5,-.5,0),n,v,e,p,d),f(s.set(.5,-.5,0),n,v,e,p,d),f(c.set(.5,.5,0),n,v,e,p,d),u.set(0,0),h.set(1,0),l.set(1,1);var g=r.ray.intersectTriangle(a,s,c,!1,t);if(null!==g||(f(s.set(-.5,.5,0),n,v,e,p,d),h.set(0,1),null!==(g=r.ray.intersectTriangle(a,c,s,!1,t)))){var y=r.ray.origin.distanceTo(t);y<r.near||y>r.far||i.push({distance:y,point:t.clone(),uv:Gn.getUV(t,a,s,c,u,h,l,new Be),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return fn.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),di.prototype=Object.assign(Object.create(fn.prototype),{constructor:di,copy:function(t){fn.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new Ge;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(t);this.getObjectForDistance(r).raycast(e,n)}}(),update:function(){var t=new Ge,e=new Ge;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(t){var e=fn.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(mi.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new je;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new je,e=new je;return function(){for(var n=this.bones,r=this.boneInverses,i=this.boneMatrices,o=this.boneTexture,a=0,s=n.length;a<s;a++){var c=n[a]?n[a].matrixWorld:e;t.multiplyMatrices(c,r[a]),t.toArray(i,16*a)}void 0!==o&&(o.needsUpdate=!0)}}(),clone:function(){return new mi(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,n=this.bones.length;e<n;e++){var r=this.bones[e];if(r.name===t)return r}}}),vi.prototype=Object.assign(Object.create(fn.prototype),{constructor:vi,isBone:!0}),gi.prototype=Object.assign(Object.create(Hn.prototype),{constructor:gi,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new vi,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)-1!==(e=this.geometry.bones[n]).parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new Xe,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),(t=1/r.manhattanLength())!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){Hn.prototype.updateMatrixWorld.call(this,t),"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)}}),yi.prototype=Object.create(Un.prototype),yi.prototype.constructor=yi,yi.prototype.isLineBasicMaterial=!0,yi.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},xi.prototype=Object.assign(Object.create(fn.prototype),{constructor:xi,isLine:!0,computeLineDistances:function(){var t=new Ge,e=new Ge;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[0],o=1,a=r.count;o<a;o++)t.fromBufferAttribute(r,o-1),e.fromBufferAttribute(r,o),i[o]=i[o-1],i[o]+=t.distanceTo(e);n.addAttribute("lineDistance",new Tn(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;(i=n.lineDistances)[0]=0;for(o=1,a=s.length;o<a;o++)i[o]=i[o-1],i[o]+=s[o-1].distanceTo(s[o])}return this}}(),raycast:function(){var t=new je,e=new zn,n=new Ke;return function(r,i){var o=r.linePrecision,a=this.geometry,s=this.matrixWorld;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=o,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var c=o/((this.scale.x+this.scale.y+this.scale.z)/3),u=c*c,h=new Ge,l=new Ge,f=new Ge,p=new Ge,d=this&&this.isLineSegments?2:1;if(a.isBufferGeometry){var m=a.index,v=a.attributes.position.array;if(null!==m)for(var g=m.array,y=0,x=g.length-1;y<x;y+=d){var _=g[y],w=g[y+1];if(h.fromArray(v,3*_),l.fromArray(v,3*w),!(e.distanceSqToSegment(h,l,p,f)>u))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(y=0,x=v.length/3-1;y<x;y+=d){if(h.fromArray(v,3*y),l.fromArray(v,3*y+3),!(e.distanceSqToSegment(h,l,p,f)>u))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(a.isGeometry){var b=a.vertices,M=b.length;for(y=0;y<M-1;y+=d){var E;if(!(e.distanceSqToSegment(b[y],b[y+1],p,f)>u))p.applyMatrix4(this.matrixWorld),(E=r.ray.origin.distanceTo(p))<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_i.prototype=Object.assign(Object.create(xi.prototype),{constructor:_i,isLineSegments:!0,computeLineDistances:function(){var t=new Ge,e=new Ge;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)t.fromBufferAttribute(r,o),e.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e);n.addAttribute("lineDistance",new Tn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices;for(i=n.lineDistances,o=0,a=s.length;o<a;o+=2)t.copy(s[o]),e.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+t.distanceTo(e)}return this}}()}),wi.prototype=Object.assign(Object.create(xi.prototype),{constructor:wi,isLineLoop:!0}),bi.prototype=Object.create(Un.prototype),bi.prototype.constructor=bi,bi.prototype.isPointsMaterial=!0,bi.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},Mi.prototype=Object.assign(Object.create(fn.prototype),{constructor:Mi,isPoints:!0,raycast:function(){var t=new je,e=new zn,n=new Ke;return function(r,i){var o=this,a=this.geometry,s=this.matrixWorld,c=r.params.Points.threshold;if(null===a.boundingSphere&&a.computeBoundingSphere(),n.copy(a.boundingSphere),n.applyMatrix4(s),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(s),e.copy(r.ray).applyMatrix4(t);var u=c/((this.scale.x+this.scale.y+this.scale.z)/3),h=u*u,l=new Ge,f=new Ge;if(a.isBufferGeometry){var p=a.index,d=a.attributes.position.array;if(null!==p)for(var m=p.array,v=0,g=m.length;v<g;v++){var y=m[v];l.fromArray(d,3*y),w(l,y)}else{v=0;for(var x=d.length/3;v<x;v++)l.fromArray(d,3*v),w(l,v)}}else{var _=a.vertices;for(v=0,x=_.length;v<x;v++)w(_[v],v)}}function w(t,n){var a=e.distanceSqToPoint(t);if(a<h){e.closestPointToPoint(t,f),f.applyMatrix4(s);var c=r.ray.origin.distanceTo(f);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(a),point:f.clone(),index:n,face:null,object:o})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ei.prototype=Object.assign(Object.create(We.prototype),{constructor:Ei,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Si.prototype=Object.create(We.prototype),Si.prototype.constructor=Si,Si.prototype.isCompressedTexture=!0,Ti.prototype=Object.create(We.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCanvasTexture=!0,Ai.prototype=Object.create(We.prototype),Ai.prototype.constructor=Ai,Ai.prototype.isDepthTexture=!0,Pi.prototype=Object.create(Rn.prototype),Pi.prototype.constructor=Pi,Li.prototype=Object.create(gn.prototype),Li.prototype.constructor=Li,Ci.prototype=Object.create(Rn.prototype),Ci.prototype.constructor=Ci,Ri.prototype=Object.create(gn.prototype),Ri.prototype.constructor=Ri,Oi.prototype=Object.create(Rn.prototype),Oi.prototype.constructor=Oi,Ii.prototype=Object.create(gn.prototype),Ii.prototype.constructor=Ii,Ni.prototype=Object.create(Oi.prototype),Ni.prototype.constructor=Ni,Di.prototype=Object.create(gn.prototype),Di.prototype.constructor=Di,Fi.prototype=Object.create(Oi.prototype),Fi.prototype.constructor=Fi,Ui.prototype=Object.create(gn.prototype),Ui.prototype.constructor=Ui,Bi.prototype=Object.create(Oi.prototype),Bi.prototype.constructor=Bi,ji.prototype=Object.create(gn.prototype),ji.prototype.constructor=ji,zi.prototype=Object.create(Oi.prototype),zi.prototype.constructor=zi,Gi.prototype=Object.create(gn.prototype),Gi.prototype.constructor=Gi,Hi.prototype=Object.create(Rn.prototype),Hi.prototype.constructor=Hi,ki.prototype=Object.create(gn.prototype),ki.prototype.constructor=ki,Vi.prototype=Object.create(Rn.prototype),Vi.prototype.constructor=Vi,Wi.prototype=Object.create(gn.prototype),Wi.prototype.constructor=Wi,Xi.prototype=Object.create(Rn.prototype),Xi.prototype.constructor=Xi;var qi=function(t,e,n){n=n||2;var r,i,o,a,s,c,u,h=e&&e.length,l=h?e[0]*n:t.length,f=Zi(t,0,l,n,!0),p=[];if(!f)return p;if(h&&(f=function(t,e,n,r){var i,o,a,s,c,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*r,s=i<o-1?e[i+1]*r:t.length,(c=Zi(t,a,s,r,!1))===c.next&&(c.steiner=!0),u.push(io(c));for(u.sort(eo),i=0;i<u.length;i++)no(u[i],n),n=Yi(n,n.next);return n}(t,e,f,n)),t.length>80*n){r=o=t[0],i=a=t[1];for(var d=n;d<l;d+=n)s=t[d],c=t[d+1],s<r&&(r=s),c<i&&(i=c),s>o&&(o=s),c>a&&(a=c);u=0!==(u=Math.max(o-r,a-i))?1/u:0}return Ji(f,p,n,r,i,u),p};function Zi(t,e,n,r,i){var o,a;if(i===function(t,e,n,r){for(var i=0,o=e,a=n-r;o<n;o+=r)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}(t,e,n,r)>0)for(o=e;o<n;o+=r)a=fo(o,t[o],t[o+1],a);else for(o=n-r;o>=e;o-=r)a=fo(o,t[o],t[o+1],a);return a&&co(a,a.next)&&(po(a),a=a.next),a}function Yi(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!co(r,r.next)&&0!==so(r.prev,r,r.next))r=r.next;else{if(po(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Ji(t,e,n,r,i,o,a){if(t){!a&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=ro(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,c,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e<u&&(s++,r=r.nextZ);e++);for(c=u;s>0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(t,r,i,o);for(var s,c,u=t;t.prev!==t.next;)if(s=t.prev,c=t.next,o?Qi(t,r,i,o):Ki(t))e.push(s.i/n),e.push(t.i/n),e.push(c.i/n),po(t),t=c.next,u=c.next;else if((t=c)===u){a?1===a?Ji(t=$i(t,e,n),e,n,r,i,o,2):2===a&&to(t,e,n,r,i,o):Ji(Yi(t),e,n,r,i,o,1);break}}}function Ki(t){var e=t.prev,n=t,r=t.next;if(so(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(oo(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&so(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Qi(t,e,n,r){var i=t.prev,o=t,a=t.next;if(so(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,c=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,h=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,l=ro(s,c,e,n,r),f=ro(u,h,e,n,r),p=t.nextZ;p&&p.z<=f;){if(p!==t.prev&&p!==t.next&&oo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&so(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=l;){if(p!==t.prev&&p!==t.next&&oo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&so(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function $i(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!co(i,o)&&uo(i,r,r.next,o)&&ho(i,o)&&ho(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),po(r),po(r.next),r=t=o),r=r.next}while(r!==t);return r}function to(t,e,n,r,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&ao(a,s)){var c=lo(a,s);return a=Yi(a,a.next),c=Yi(c,c.next),Ji(a,e,n,r,i,o),void Ji(c,e,n,r,i,o)}s=s.next}a=a.next}while(a!==t)}function eo(t,e){return t.x-e.x}function no(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===a)return n.prev;var c,u=n,h=n.x,l=n.y,f=1/0;r=n.next;for(;r!==u;)i>=r.x&&r.x>=h&&i!==r.x&&oo(o<l?i:a,o,h,l,o<l?a:i,o,r.x,r.y)&&((c=Math.abs(o-r.y)/(i-r.x))<f||c===f&&r.x>n.x)&&ho(r,t)&&(n=r,f=c),r=r.next;return n}(t,e)){var n=lo(e,t);Yi(n,n.next)}}function ro(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function io(t){var e=t,n=t;do{e.x<n.x&&(n=e),e=e.next}while(e!==t);return n}function oo(t,e,n,r,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function ao(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&uo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&ho(t,e)&&ho(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function so(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function co(t,e){return t.x===e.x&&t.y===e.y}function uo(t,e,n,r){return!!(co(t,e)&&co(n,r)||co(t,r)&&co(n,e))||so(t,e,n)>0!=so(t,e,r)>0&&so(n,r,t)>0!=so(n,r,e)>0}function ho(t,e){return so(t.prev,t,t.next)<0?so(t,e,t.next)>=0&&so(t,t.prev,e)>=0:so(t,e,t.prev)<0||so(t,t.next,e)<0}function lo(t,e){var n=new mo(t.i,t.x,t.y),r=new mo(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function fo(t,e,n,r){var i=new mo(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function po(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function mo(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var vo={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},isClockWise:function(t){return vo.area(t)<0},triangulateShape:function(t,e){var n=[],r=[],i=[];go(t),yo(n,t);var o=t.length;e.forEach(go);for(var a=0;a<e.length;a++)r.push(o),o+=e[a].length,yo(n,e[a]);var s=qi(n,r);for(a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};function go(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function yo(t,e){for(var n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}function xo(t,e){gn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new _o(t,e)),this.mergeVertices()}function _o(t,e){Rn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e};for(var n=this,r=[],i=[],o=0,a=(t=Array.isArray(t)?t:[t]).length;o<a;o++){s(t[o])}function s(t){var o=[],a=void 0!==e.curveSegments?e.curveSegments:12,s=void 0!==e.steps?e.steps:1,c=void 0!==e.depth?e.depth:100,u=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:6,l=void 0!==e.bevelSize?e.bevelSize:h-2,f=void 0!==e.bevelSegments?e.bevelSegments:3,p=e.extrudePath,d=void 0!==e.UVGenerator?e.UVGenerator:wo;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=e.amount);var m,v,g,y,x,_,w,b,M=!1;p&&(m=p.getSpacedPoints(s),M=!0,u=!1,v=p.computeFrenetFrames(s,!1),g=new Ge,y=new Ge,x=new Ge),u||(f=0,h=0,l=0);var E=t.extractPoints(a),S=E.shape,T=E.holes;if(!vo.isClockWise(S))for(S=S.reverse(),w=0,b=T.length;w<b;w++)_=T[w],vo.isClockWise(_)&&(T[w]=_.reverse());var A=vo.triangulateShape(S,T),P=S;for(w=0,b=T.length;w<b;w++)_=T[w],S=S.concat(_);function L(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}var C,R,O,I,N,D,F=S.length,U=A.length;function B(t,e,n){var r,i,o,a=t.x-e.x,s=t.y-e.y,c=n.x-t.x,u=n.y-t.y,h=a*a+s*s,l=a*u-s*c;if(Math.abs(l)>Number.EPSILON){var f=Math.sqrt(h),p=Math.sqrt(c*c+u*u),d=e.x-s/f,m=e.y+a/f,v=((n.x-u/p-d)*u-(n.y+c/p-m)*c)/(a*u-s*c),g=(r=d+a*v-t.x)*r+(i=m+s*v-t.y)*i;if(g<=2)return new Be(r,i);o=Math.sqrt(g/2)}else{var y=!1;a>Number.EPSILON?c>Number.EPSILON&&(y=!0):a<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(u)&&(y=!0),y?(r=-s,i=a,o=Math.sqrt(h)):(r=a,i=s,o=Math.sqrt(h/2))}return new Be(r/o,i/o)}for(var j=[],z=0,G=P.length,H=G-1,k=z+1;z<G;z++,H++,k++)H===G&&(H=0),k===G&&(k=0),j[z]=B(P[z],P[H],P[k]);var V,W,X=[],q=j.concat();for(w=0,b=T.length;w<b;w++){for(_=T[w],V=[],z=0,H=(G=_.length)-1,k=z+1;z<G;z++,H++,k++)H===G&&(H=0),k===G&&(k=0),V[z]=B(_[z],_[H],_[k]);X.push(V),q=q.concat(V)}for(C=0;C<f;C++){for(O=C/f,I=h*Math.cos(O*Math.PI/2),R=l*Math.sin(O*Math.PI/2),z=0,G=P.length;z<G;z++)Y((N=L(P[z],j[z],R)).x,N.y,-I);for(w=0,b=T.length;w<b;w++)for(_=T[w],V=X[w],z=0,G=_.length;z<G;z++)Y((N=L(_[z],V[z],R)).x,N.y,-I)}for(R=l,z=0;z<F;z++)N=u?L(S[z],q[z],R):S[z],M?(y.copy(v.normals[0]).multiplyScalar(N.x),g.copy(v.binormals[0]).multiplyScalar(N.y),x.copy(m[0]).add(y).add(g),Y(x.x,x.y,x.z)):Y(N.x,N.y,0);for(W=1;W<=s;W++)for(z=0;z<F;z++)N=u?L(S[z],q[z],R):S[z],M?(y.copy(v.normals[W]).multiplyScalar(N.x),g.copy(v.binormals[W]).multiplyScalar(N.y),x.copy(m[W]).add(y).add(g),Y(x.x,x.y,x.z)):Y(N.x,N.y,c/s*W);for(C=f-1;C>=0;C--){for(O=C/f,I=h*Math.cos(O*Math.PI/2),R=l*Math.sin(O*Math.PI/2),z=0,G=P.length;z<G;z++)Y((N=L(P[z],j[z],R)).x,N.y,c+I);for(w=0,b=T.length;w<b;w++)for(_=T[w],V=X[w],z=0,G=_.length;z<G;z++)N=L(_[z],V[z],R),M?Y(N.x,N.y+m[s-1].y,m[s-1].x+I):Y(N.x,N.y,c+I)}function Z(t,e){var n,r;for(z=t.length;--z>=0;){n=z,(r=z-1)<0&&(r=t.length-1);var i=0,o=s+2*f;for(i=0;i<o;i++){var a=F*i,c=F*(i+1);K(e+n+a,e+r+a,e+r+c,e+n+c)}}}function Y(t,e,n){o.push(t),o.push(e),o.push(n)}function J(t,e,i){Q(t),Q(e),Q(i);var o=r.length/3,a=d.generateTopUV(n,r,o-3,o-2,o-1);$(a[0]),$(a[1]),$(a[2])}function K(t,e,i,o){Q(t),Q(e),Q(o),Q(e),Q(i),Q(o);var a=r.length/3,s=d.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);$(s[0]),$(s[1]),$(s[3]),$(s[1]),$(s[2]),$(s[3])}function Q(t){r.push(o[3*t+0]),r.push(o[3*t+1]),r.push(o[3*t+2])}function $(t){i.push(t.x),i.push(t.y)}!function(){var t=r.length/3;if(u){var e=0,i=F*e;for(z=0;z<U;z++)J((D=A[z])[2]+i,D[1]+i,D[0]+i);for(i=F*(e=s+2*f),z=0;z<U;z++)J((D=A[z])[0]+i,D[1]+i,D[2]+i)}else{for(z=0;z<U;z++)J((D=A[z])[2],D[1],D[0]);for(z=0;z<U;z++)J((D=A[z])[0]+F*s,D[1]+F*s,D[2]+F*s)}n.addGroup(t,r.length/3-t,0)}(),function(){var t=r.length/3,e=0;for(Z(P,e),e+=P.length,w=0,b=T.length;w<b;w++)Z(_=T[w],e),e+=_.length;n.addGroup(t,r.length/3-t,1)}()}this.addAttribute("position",new Tn(r,3)),this.addAttribute("uv",new Tn(i,2)),this.computeVertexNormals()}xo.prototype=Object.create(gn.prototype),xo.prototype.constructor=xo,xo.prototype.toJSON=function(){var t=gn.prototype.toJSON.call(this);return bo(this.parameters.shapes,this.parameters.options,t)},_o.prototype=Object.create(Rn.prototype),_o.prototype.constructor=_o,_o.prototype.toJSON=function(){var t=Rn.prototype.toJSON.call(this);return bo(this.parameters.shapes,this.parameters.options,t)};var wo={generateTopUV:function(t,e,n,r,i){var o=e[3*n],a=e[3*n+1],s=e[3*r],c=e[3*r+1],u=e[3*i],h=e[3*i+1];return[new Be(o,a),new Be(s,c),new Be(u,h)]},generateSideWallUV:function(t,e,n,r,i,o){var a=e[3*n],s=e[3*n+1],c=e[3*n+2],u=e[3*r],h=e[3*r+1],l=e[3*r+2],f=e[3*i],p=e[3*i+1],d=e[3*i+2],m=e[3*o],v=e[3*o+1],g=e[3*o+2];return Math.abs(s-h)<.01?[new Be(a,1-c),new Be(u,1-l),new Be(f,1-d),new Be(m,1-g)]:[new Be(s,1-c),new Be(h,1-l),new Be(p,1-d),new Be(v,1-g)]}};function bo(t,e,n){if(n.shapes=[],Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r];n.shapes.push(o.uuid)}else n.shapes.push(t.uuid);return void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON()),n}function Mo(t,e){gn.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Eo(t,e)),this.mergeVertices()}function Eo(t,e){var n=(e=e||{}).font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new gn;var r=n.generateShapes(t,e.size);e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),_o.call(this,r,e),this.type="TextBufferGeometry"}function So(t,e,n,r,i,o,a){gn.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new To(t,e,n,r,i,o,a)),this.mergeVertices()}function To(t,e,n,r,i,o,a){Rn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||1,e=Math.max(3,Math.floor(e)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var s,c,u=(o=void 0!==o?o:0)+(a=void 0!==a?a:Math.PI),h=0,l=[],f=new Ge,p=new Ge,d=[],m=[],v=[],g=[];for(c=0;c<=n;c++){var y=[],x=c/n;for(s=0;s<=e;s++){var _=s/e;f.x=-t*Math.cos(r+_*i)*Math.sin(o+x*a),f.y=t*Math.cos(o+x*a),f.z=t*Math.sin(r+_*i)*Math.sin(o+x*a),m.push(f.x,f.y,f.z),p.set(f.x,f.y,f.z).normalize(),v.push(p.x,p.y,p.z),g.push(_,1-x),y.push(h++)}l.push(y)}for(c=0;c<n;c++)for(s=0;s<e;s++){var w=l[c][s+1],b=l[c][s],M=l[c+1][s],E=l[c+1][s+1];(0!==c||o>0)&&d.push(w,b,E),(c!==n-1||u<Math.PI)&&d.push(b,M,E)}this.setIndex(d),this.addAttribute("position",new Tn(m,3)),this.addAttribute("normal",new Tn(v,3)),this.addAttribute("uv",new Tn(g,2))}function Ao(t,e,n,r,i,o){gn.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Po(t,e,n,r,i,o)),this.mergeVertices()}function Po(t,e,n,r,i,o){Rn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},t=t||.5,e=e||1,i=void 0!==i?i:0,o=void 0!==o?o:2*Math.PI,n=void 0!==n?Math.max(3,n):8;var a,s,c,u=[],h=[],l=[],f=[],p=t,d=(e-t)/(r=void 0!==r?Math.max(1,r):1),m=new Ge,v=new Be;for(s=0;s<=r;s++){for(c=0;c<=n;c++)a=i+c/n*o,m.x=p*Math.cos(a),m.y=p*Math.sin(a),h.push(m.x,m.y,m.z),l.push(0,0,1),v.x=(m.x/e+1)/2,v.y=(m.y/e+1)/2,f.push(v.x,v.y);p+=d}for(s=0;s<r;s++){var g=s*(n+1);for(c=0;c<n;c++){var y=a=c+g,x=a+n+1,_=a+n+2,w=a+1;u.push(y,x,w),u.push(x,_,w)}}this.setIndex(u),this.addAttribute("position",new Tn(h,3)),this.addAttribute("normal",new Tn(l,3)),this.addAttribute("uv",new Tn(f,2))}function Lo(t,e,n,r){gn.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new Co(t,e,n,r)),this.mergeVertices()}function Co(t,e,n,r){Rn.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ue.clamp(r,0,2*Math.PI);var i,o,a,s=[],c=[],u=[],h=1/e,l=new Ge,f=new Be;for(o=0;o<=e;o++){var p=n+o*h*r,d=Math.sin(p),m=Math.cos(p);for(a=0;a<=t.length-1;a++)l.x=t[a].x*d,l.y=t[a].y,l.z=t[a].x*m,c.push(l.x,l.y,l.z),f.x=o/e,f.y=a/(t.length-1),u.push(f.x,f.y)}for(o=0;o<e;o++)for(a=0;a<t.length-1;a++){var v=i=a+o*t.length,g=i+t.length,y=i+t.length+1,x=i+1;s.push(v,g,x),s.push(g,y,x)}if(this.setIndex(s),this.addAttribute("position",new Tn(c,3)),this.addAttribute("uv",new Tn(u,2)),this.computeVertexNormals(),r===2*Math.PI){var _=this.attributes.normal.array,w=new Ge,b=new Ge,M=new Ge;for(i=e*t.length*3,o=0,a=0;o<t.length;o++,a+=3)w.x=_[a+0],w.y=_[a+1],w.z=_[a+2],b.x=_[i+a+0],b.y=_[i+a+1],b.z=_[i+a+2],M.addVectors(w,b).normalize(),_[a+0]=_[i+a+0]=M.x,_[a+1]=_[i+a+1]=M.y,_[a+2]=_[i+a+2]=M.z}}function Ro(t,e){gn.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Oo(t,e)),this.mergeVertices()}function Oo(t,e){Rn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],i=[],o=[],a=0,s=0;if(!1===Array.isArray(t))u(t);else for(var c=0;c<t.length;c++)u(t[c]),this.addGroup(a,s,c),a+=s,s=0;function u(t){var a,c,u,h=r.length/3,l=t.extractPoints(e),f=l.shape,p=l.holes;if(!1===vo.isClockWise(f))for(f=f.reverse(),a=0,c=p.length;a<c;a++)u=p[a],!0===vo.isClockWise(u)&&(p[a]=u.reverse());var d=vo.triangulateShape(f,p);for(a=0,c=p.length;a<c;a++)u=p[a],f=f.concat(u);for(a=0,c=f.length;a<c;a++){var m=f[a];r.push(m.x,m.y,0),i.push(0,0,1),o.push(m.x,m.y)}for(a=0,c=d.length;a<c;a++){var v=d[a],g=v[0]+h,y=v[1]+h,x=v[2]+h;n.push(g,y,x),s+=3}}this.setIndex(n),this.addAttribute("position",new Tn(r,3)),this.addAttribute("normal",new Tn(i,3)),this.addAttribute("uv",new Tn(o,2))}function Io(t,e){if(e.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}function No(t,e){Rn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ue.DEG2RAD*e),c=[0,0],u={},h=["a","b","c"];t.isBufferGeometry?(o=new gn).fromBufferGeometry(t):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var l=o.vertices,f=o.faces,p=0,d=f.length;p<d;p++)for(var m=f[p],v=0;v<3;v++)n=m[h[v]],r=m[h[(v+1)%3]],c[0]=Math.min(n,r),c[1]=Math.max(n,r),void 0===u[i=c[0]+","+c[1]]?u[i]={index1:c[0],index2:c[1],face1:p,face2:void 0}:u[i].face2=p;for(i in u){var g=u[i];if(void 0===g.face2||f[g.face1].normal.dot(f[g.face2].normal)<=s){var y=l[g.index1];a.push(y.x,y.y,y.z),y=l[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Tn(a,3))}function Do(t,e,n,r,i,o,a,s){gn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new Fo(t,e,n,r,i,o,a,s)),this.mergeVertices()}function Fo(t,e,n,r,i,o,a,s){Rn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,n=n||1,r=Math.floor(r)||8,i=Math.floor(i)||1,o=void 0!==o&&o,a=void 0!==a?a:0,s=void 0!==s?s:2*Math.PI;var u=[],h=[],l=[],f=[],p=0,d=[],m=n/2,v=0;function g(n){var i,o,d,g=new Be,y=new Ge,x=0,_=!0===n?t:e,w=!0===n?1:-1;for(o=p,i=1;i<=r;i++)h.push(0,m*w,0),l.push(0,w,0),f.push(.5,.5),p++;for(d=p,i=0;i<=r;i++){var b=i/r*s+a,M=Math.cos(b),E=Math.sin(b);y.x=_*E,y.y=m*w,y.z=_*M,h.push(y.x,y.y,y.z),l.push(0,w,0),g.x=.5*M+.5,g.y=.5*E*w+.5,f.push(g.x,g.y),p++}for(i=0;i<r;i++){var S=o+i,T=d+i;!0===n?u.push(T,T+1,S):u.push(T+1,T,S),x+=3}c.addGroup(v,x,!0===n?1:2),v+=x}!function(){var o,g,y=new Ge,x=new Ge,_=0,w=(e-t)/n;for(g=0;g<=i;g++){var b=[],M=g/i,E=M*(e-t)+t;for(o=0;o<=r;o++){var S=o/r,T=S*s+a,A=Math.sin(T),P=Math.cos(T);x.x=E*A,x.y=-M*n+m,x.z=E*P,h.push(x.x,x.y,x.z),y.set(A,w,P).normalize(),l.push(y.x,y.y,y.z),f.push(S,1-M),b.push(p++)}d.push(b)}for(o=0;o<r;o++)for(g=0;g<i;g++){var L=d[g][o],C=d[g+1][o],R=d[g+1][o+1],O=d[g][o+1];u.push(L,C,O),u.push(C,R,O),_+=6}c.addGroup(v,_,0),v+=_}(),!1===o&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(u),this.addAttribute("position",new Tn(h,3)),this.addAttribute("normal",new Tn(l,3)),this.addAttribute("uv",new Tn(f,2))}function Uo(t,e,n,r,i,o,a){Do.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function Bo(t,e,n,r,i,o,a){Fo.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function jo(t,e,n,r){gn.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new zo(t,e,n,r)),this.mergeVertices()}function zo(t,e,n,r){Rn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||1,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,o,a=[],s=[],c=[],u=[],h=new Ge,l=new Be;for(s.push(0,0,0),c.push(0,0,1),u.push(.5,.5),o=0,i=3;o<=e;o++,i+=3){var f=n+o/e*r;h.x=t*Math.cos(f),h.y=t*Math.sin(f),s.push(h.x,h.y,h.z),c.push(0,0,1),l.x=(s[i]/t+1)/2,l.y=(s[i+1]/t+1)/2,u.push(l.x,l.y)}for(i=1;i<=e;i++)a.push(i,i+1,0);this.setIndex(a),this.addAttribute("position",new Tn(s,3)),this.addAttribute("normal",new Tn(c,3)),this.addAttribute("uv",new Tn(u,2))}Mo.prototype=Object.create(gn.prototype),Mo.prototype.constructor=Mo,Eo.prototype=Object.create(_o.prototype),Eo.prototype.constructor=Eo,So.prototype=Object.create(gn.prototype),So.prototype.constructor=So,To.prototype=Object.create(Rn.prototype),To.prototype.constructor=To,Ao.prototype=Object.create(gn.prototype),Ao.prototype.constructor=Ao,Po.prototype=Object.create(Rn.prototype),Po.prototype.constructor=Po,Lo.prototype=Object.create(gn.prototype),Lo.prototype.constructor=Lo,Co.prototype=Object.create(Rn.prototype),Co.prototype.constructor=Co,Ro.prototype=Object.create(gn.prototype),Ro.prototype.constructor=Ro,Ro.prototype.toJSON=function(){var t=gn.prototype.toJSON.call(this);return Io(this.parameters.shapes,t)},Oo.prototype=Object.create(Rn.prototype),Oo.prototype.constructor=Oo,Oo.prototype.toJSON=function(){var t=Rn.prototype.toJSON.call(this);return Io(this.parameters.shapes,t)},No.prototype=Object.create(Rn.prototype),No.prototype.constructor=No,Do.prototype=Object.create(gn.prototype),Do.prototype.constructor=Do,Fo.prototype=Object.create(Rn.prototype),Fo.prototype.constructor=Fo,Uo.prototype=Object.create(Do.prototype),Uo.prototype.constructor=Uo,Bo.prototype=Object.create(Fo.prototype),Bo.prototype.constructor=Bo,jo.prototype=Object.create(gn.prototype),jo.prototype.constructor=jo,zo.prototype=Object.create(Rn.prototype),zo.prototype.constructor=zo;var Go=Object.freeze({WireframeGeometry:Pi,ParametricGeometry:Li,ParametricBufferGeometry:Ci,TetrahedronGeometry:Ii,TetrahedronBufferGeometry:Ni,OctahedronGeometry:Di,OctahedronBufferGeometry:Fi,IcosahedronGeometry:Ui,IcosahedronBufferGeometry:Bi,DodecahedronGeometry:ji,DodecahedronBufferGeometry:zi,PolyhedronGeometry:Ri,PolyhedronBufferGeometry:Oi,TubeGeometry:Gi,TubeBufferGeometry:Hi,TorusKnotGeometry:ki,TorusKnotBufferGeometry:Vi,TorusGeometry:Wi,TorusBufferGeometry:Xi,TextGeometry:Mo,TextBufferGeometry:Eo,SphereGeometry:So,SphereBufferGeometry:To,RingGeometry:Ao,RingBufferGeometry:Po,PlaneGeometry:Nn,PlaneBufferGeometry:Dn,LatheGeometry:Lo,LatheBufferGeometry:Co,ShapeGeometry:Ro,ShapeBufferGeometry:Oo,ExtrudeGeometry:xo,ExtrudeBufferGeometry:_o,EdgesGeometry:No,ConeGeometry:Uo,ConeBufferGeometry:Bo,CylinderGeometry:Do,CylinderBufferGeometry:Fo,CircleGeometry:jo,CircleBufferGeometry:zo,BoxGeometry:On,BoxBufferGeometry:In});function Ho(t){Un.call(this),this.type="ShadowMaterial",this.color=new rn(0),this.transparent=!0,this.setValues(t)}function ko(t){jn.call(this,t),this.type="RawShaderMaterial"}function Vo(t){Un.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new rn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=De,this.normalScale=new Be(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(t)}function Wo(t){Vo.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Xo(t){Un.call(this),this.type="MeshPhongMaterial",this.color=new rn(16777215),this.specular=new rn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=De,this.normalScale=new Be(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=$,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(t)}function qo(t){Xo.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function Zo(t){Un.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=De,this.normalScale=new Be(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function Yo(t){Un.call(this),this.type="MeshLambertMaterial",this.color=new rn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=$,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(t)}function Jo(t){yi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}Ho.prototype=Object.create(Un.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isShadowMaterial=!0,Ho.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this},ko.prototype=Object.create(jn.prototype),ko.prototype.constructor=ko,ko.prototype.isRawShaderMaterial=!0,Vo.prototype=Object.create(Un.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isMeshStandardMaterial=!0,Vo.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Wo.prototype=Object.create(Vo.prototype),Wo.prototype.constructor=Wo,Wo.prototype.isMeshPhysicalMaterial=!0,Wo.prototype.copy=function(t){return Vo.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Xo.prototype=Object.create(Un.prototype),Xo.prototype.constructor=Xo,Xo.prototype.isMeshPhongMaterial=!0,Xo.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},qo.prototype=Object.create(Xo.prototype),qo.prototype.constructor=qo,qo.prototype.isMeshToonMaterial=!0,qo.prototype.copy=function(t){return Xo.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Zo.prototype=Object.create(Un.prototype),Zo.prototype.constructor=Zo,Zo.prototype.isMeshNormalMaterial=!0,Zo.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Yo.prototype=Object.create(Un.prototype),Yo.prototype.constructor=Yo,Yo.prototype.isMeshLambertMaterial=!0,Yo.prototype.copy=function(t){return Un.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Jo.prototype=Object.create(yi.prototype),Jo.prototype.constructor=Jo,Jo.prototype.isLineDashedMaterial=!0,Jo.prototype.copy=function(t){return yi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Ko=Object.freeze({ShadowMaterial:Ho,SpriteMaterial:fi,RawShaderMaterial:ko,ShaderMaterial:jn,PointsMaterial:bi,MeshPhysicalMaterial:Wo,MeshStandardMaterial:Vo,MeshPhongMaterial:Xo,MeshToonMaterial:qo,MeshNormalMaterial:Zo,MeshLambertMaterial:Yo,MeshDepthMaterial:Kr,MeshDistanceMaterial:Qr,MeshBasicMaterial:Bn,LineDashedMaterial:Jo,LineBasicMaterial:yi,Material:Un}),Qo={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function $o(t,e,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var ta=new $o,ea={};function na(t){this.manager=void 0!==t?t:ta}function ra(t){this.manager=void 0!==t?t:ta,this._parser=null}function ia(t){this.manager=void 0!==t?t:ta,this._parser=null}function oa(t){this.manager=void 0!==t?t:ta}function aa(t){this.manager=void 0!==t?t:ta}function sa(t){this.manager=void 0!==t?t:ta}function ca(){this.type="Curve",this.arcLengthDivisions=200}function ua(t,e,n,r,i,o,a,s){ca.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function ha(t,e,n,r,i,o){ua.call(this,t,e,n,n,r,i,o),this.type="ArcCurve"}function la(){var t=0,e=0,n=0,r=0;function i(i,o,a,s){t=i,e=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(t,e,n,r,o){i(e,n,o*(n-t),o*(r-e))},initNonuniformCatmullRom:function(t,e,n,r,o,a,s){var c=(e-t)/o-(n-t)/(o+a)+(n-e)/a,u=(n-e)/a-(r-e)/(a+s)+(r-n)/s;i(e,n,c*=a,u*=a)},calc:function(i){var o=i*i;return t+e*i+n*o+r*(o*i)}}}Object.assign(na.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Qo.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;if(void 0===ea[t]){var a=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(a){var s=a[1],c=!!a[2],u=a[3];u=window.decodeURIComponent(u),c&&(u=window.atob(u));try{var h,l=(this.responseType||"").toLowerCase();switch(l){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),p=0;p<u.length;p++)f[p]=u.charCodeAt(p);h="blob"===l?new Blob([f.buffer],{type:s}):f.buffer;break;case"document":var d=new DOMParser;h=d.parseFromString(u,s);break;case"json":h=JSON.parse(u);break;default:h=u}window.setTimeout(function(){e&&e(h),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{ea[t]=[],ea[t].push({onLoad:e,onProgress:n,onError:r});var m=new XMLHttpRequest;for(var v in m.open("GET",t,!0),m.addEventListener("load",function(e){var n=this.response;Qo.add(t,n);var r=ea[t];if(delete ea[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var o=0,a=r.length;o<a;o++){(s=r[o]).onLoad&&s.onLoad(n)}i.manager.itemEnd(t)}else{for(o=0,a=r.length;o<a;o++){var s;(s=r[o]).onError&&s.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)}},!1),m.addEventListener("progress",function(e){for(var n=ea[t],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(e)}},!1),m.addEventListener("error",function(e){var n=ea[t];delete ea[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!1),m.addEventListener("abort",function(e){var n=ea[t];delete ea[t];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(e)}i.manager.itemEnd(t),i.manager.itemError(t)},!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(t),m}ea[t].push({onLoad:e,onProgress:n,onError:r})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(ra.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new Si;a.image=o;var s=new na(this.manager);function c(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=wt),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,h=0,l=t.length;h<l;++h)c(h);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var c=0;c<n.mipmapCount;c++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+c]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=wt),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(ia.prototype,{load:function(t,e,n,r){var i=this,o=new Ye,a=new na(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:vt,o.wrapT=void 0!==n.wrapT?n.wrapT:vt,o.magFilter=void 0!==n.magFilter?n.magFilter:wt,o.minFilter=void 0!==n.minFilter?n.minFilter:Mt,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=wt),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(oa.prototype,{crossOrigin:"anonymous",load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Qo.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),Qo.add(t,this),e&&e(this),i.manager.itemEnd(t)}function c(e){a.removeEventListener("load",s,!1),a.removeEventListener("error",c,!1),r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)}return a.addEventListener("load",s,!1),a.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(aa.prototype,{crossOrigin:"anonymous",load:function(t,e,n,r){var i=new Vn,o=new oa(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(t[n],function(t){i.images[n]=t,6===++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}for(var c=0;c<t.length;++c)s(c);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(sa.prototype,{crossOrigin:"anonymous",load:function(t,e,n,r){var i=new We,o=new oa(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(n){i.image=n;var r=t.search(/\.jpe?g$/i)>0||0===t.search(/^data\:image\/jpeg/);i.format=r?Ut:Bt,i.needsUpdate=!0,void 0!==e&&e(i)},n,r),i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(ca.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var n=this.getUtoTmapping(t);return this.getPoint(n,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)o+=(e=this.getPoint(n/t)).distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,c=o-1;s<=c;)if((a=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new Ge,a=[],s=[],c=[],u=new Ge,h=new je;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new Ge,c[0]=new Ge;var l=Number.MAX_VALUE,f=Math.abs(a[0].x),p=Math.abs(a[0].y),d=Math.abs(a[0].z);for(f<=l&&(l=f,o.set(1,0,0)),p<=l&&(l=p,o.set(0,1,0)),d<=l&&o.set(0,0,1),u.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],u),c[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),u.crossVectors(a[n-1],a[n]),u.length()>Number.EPSILON&&(u.normalize(),i=Math.acos(Ue.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(h.makeRotationAxis(u,i))),c[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ue.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(u.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(h.makeRotationAxis(a[n],i*n)),c[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),ua.prototype=Object.create(ca.prototype),ua.prototype.constructor=ua,ua.prototype.isEllipseCurve=!0,ua.prototype.getPoint=function(t,e){for(var n=e||new Be,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+t*i,s=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var u=Math.cos(this.aRotation),h=Math.sin(this.aRotation),l=s-this.aX,f=c-this.aY;s=l*u-f*h+this.aX,c=l*h+f*u+this.aY}return n.set(s,c)},ua.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},ua.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},ua.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},ha.prototype=Object.create(ua.prototype),ha.prototype.constructor=ha,ha.prototype.isArcCurve=!0;var fa=new Ge,pa=new la,da=new la,ma=new la;function va(t,e,n,r){ca.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=n||"centripetal",this.tension=r||.5}function ga(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function ya(t,e,n,r){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,r)}function xa(t,e,n,r,i){return function(t,e){var n=1-t;return n*n*n*e}(t,e)+function(t,e){var n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,r)+function(t,e){return t*t*t*e}(t,i)}function _a(t,e,n,r){ca.call(this),this.type="CubicBezierCurve",this.v0=t||new Be,this.v1=e||new Be,this.v2=n||new Be,this.v3=r||new Be}function wa(t,e,n,r){ca.call(this),this.type="CubicBezierCurve3",this.v0=t||new Ge,this.v1=e||new Ge,this.v2=n||new Ge,this.v3=r||new Ge}function ba(t,e){ca.call(this),this.type="LineCurve",this.v1=t||new Be,this.v2=e||new Be}function Ma(t,e){ca.call(this),this.type="LineCurve3",this.v1=t||new Ge,this.v2=e||new Ge}function Ea(t,e,n){ca.call(this),this.type="QuadraticBezierCurve",this.v0=t||new Be,this.v1=e||new Be,this.v2=n||new Be}function Sa(t,e,n){ca.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new Ge,this.v1=e||new Ge,this.v2=n||new Ge}function Ta(t){ca.call(this),this.type="SplineCurve",this.points=t||[]}va.prototype=Object.create(ca.prototype),va.prototype.constructor=va,va.prototype.isCatmullRomCurve3=!0,va.prototype.getPoint=function(t,e){var n,r,i,o,a=e||new Ge,s=this.points,c=s.length,u=(c-(this.closed?0:1))*t,h=Math.floor(u),l=u-h;if(this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/c)+1)*c:0===l&&h===c-1&&(h=c-2,l=1),this.closed||h>0?n=s[(h-1)%c]:(fa.subVectors(s[0],s[1]).add(s[0]),n=fa),r=s[h%c],i=s[(h+1)%c],this.closed||h+2<c?o=s[(h+2)%c]:(fa.subVectors(s[c-1],s[c-2]).add(s[c-1]),o=fa),"centripetal"===this.curveType||"chordal"===this.curveType){var f="chordal"===this.curveType?.5:.25,p=Math.pow(n.distanceToSquared(r),f),d=Math.pow(r.distanceToSquared(i),f),m=Math.pow(i.distanceToSquared(o),f);d<1e-4&&(d=1),p<1e-4&&(p=d),m<1e-4&&(m=d),pa.initNonuniformCatmullRom(n.x,r.x,i.x,o.x,p,d,m),da.initNonuniformCatmullRom(n.y,r.y,i.y,o.y,p,d,m),ma.initNonuniformCatmullRom(n.z,r.z,i.z,o.z,p,d,m)}else"catmullrom"===this.curveType&&(pa.initCatmullRom(n.x,r.x,i.x,o.x,this.tension),da.initCatmullRom(n.y,r.y,i.y,o.y,this.tension),ma.initCatmullRom(n.z,r.z,i.z,o.z,this.tension));return a.set(pa.calc(l),da.calc(l),ma.calc(l)),a},va.prototype.copy=function(t){ca.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},va.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},va.prototype.fromJSON=function(t){ca.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Ge).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},_a.prototype=Object.create(ca.prototype),_a.prototype.constructor=_a,_a.prototype.isCubicBezierCurve=!0,_a.prototype.getPoint=function(t,e){var n=e||new Be,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(xa(t,r.x,i.x,o.x,a.x),xa(t,r.y,i.y,o.y,a.y)),n},_a.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},_a.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},_a.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},wa.prototype=Object.create(ca.prototype),wa.prototype.constructor=wa,wa.prototype.isCubicBezierCurve3=!0,wa.prototype.getPoint=function(t,e){var n=e||new Ge,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(xa(t,r.x,i.x,o.x,a.x),xa(t,r.y,i.y,o.y,a.y),xa(t,r.z,i.z,o.z,a.z)),n},wa.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},wa.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},wa.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},ba.prototype=Object.create(ca.prototype),ba.prototype.constructor=ba,ba.prototype.isLineCurve=!0,ba.prototype.getPoint=function(t,e){var n=e||new Be;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},ba.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},ba.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ba.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ba.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ba.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ma.prototype=Object.create(ca.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isLineCurve3=!0,Ma.prototype.getPoint=function(t,e){var n=e||new Ge;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n},Ma.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ma.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ma.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ma.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ea.prototype=Object.create(ca.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isQuadraticBezierCurve=!0,Ea.prototype.getPoint=function(t,e){var n=e||new Be,r=this.v0,i=this.v1,o=this.v2;return n.set(ya(t,r.x,i.x,o.x),ya(t,r.y,i.y,o.y)),n},Ea.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ea.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ea.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Sa.prototype=Object.create(ca.prototype),Sa.prototype.constructor=Sa,Sa.prototype.isQuadraticBezierCurve3=!0,Sa.prototype.getPoint=function(t,e){var n=e||new Ge,r=this.v0,i=this.v1,o=this.v2;return n.set(ya(t,r.x,i.x,o.x),ya(t,r.y,i.y,o.y),ya(t,r.z,i.z,o.z)),n},Sa.prototype.copy=function(t){return ca.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Sa.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Sa.prototype.fromJSON=function(t){return ca.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ta.prototype=Object.create(ca.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isSplineCurve=!0,Ta.prototype.getPoint=function(t,e){var n=e||new Be,r=this.points,i=(r.length-1)*t,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return n.set(ga(a,s.x,c.x,u.x,h.x),ga(a,s.y,c.y,u.y,h.y)),n},Ta.prototype.copy=function(t){ca.prototype.copy.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push(r.clone())}return this},Ta.prototype.toJSON=function(){var t=ca.prototype.toJSON.call(this);t.points=[];for(var e=0,n=this.points.length;e<n;e++){var r=this.points[e];t.points.push(r.toArray())}return t},Ta.prototype.fromJSON=function(t){ca.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,n=t.points.length;e<n;e++){var r=t.points[e];this.points.push((new Be).fromArray(r))}return this};var Aa=Object.freeze({ArcCurve:ha,CatmullRomCurve3:va,CubicBezierCurve:_a,CubicBezierCurve3:wa,EllipseCurve:ua,LineCurve:ba,LineCurve3:Ma,QuadraticBezierCurve:Ea,QuadraticBezierCurve3:Sa,SplineCurve:Ta});function Pa(){ca.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function La(t){Pa.call(this),this.type="Path",this.currentPoint=new Be,t&&this.setFromPoints(t)}function Ca(t){La.call(this,t),this.uuid=Ue.generateUUID(),this.type="Shape",this.holes=[]}function Ra(t,e){fn.call(this),this.type="Light",this.color=new rn(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Oa(t,e,n){Ra.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(fn.DefaultUp),this.updateMatrix(),this.groundColor=new rn(e)}function Ia(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new Be(512,512),this.map=null,this.matrix=new je}function Na(){Ia.call(this,new ri(50,1,.5,500))}function Da(t,e,n,r,i,o){Ra.call(this,t,e),this.type="SpotLight",this.position.copy(fn.DefaultUp),this.updateMatrix(),this.target=new fn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Na}function Fa(t,e,n,r){Ra.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Ia(new ri(90,1,.5,500))}function Ua(){Ia.call(this,new dn(-5,5,5,-5,.5,500))}function Ba(t,e){Ra.call(this,t,e),this.type="DirectionalLight",this.position.copy(fn.DefaultUp),this.updateMatrix(),this.target=new fn,this.shadow=new Ua}function ja(t,e){Ra.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function za(t,e,n,r){Ra.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}Pa.prototype=Object.assign(Object.create(ca.prototype),{constructor:Pa,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new ba(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.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 t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),c=0;c<s.length;c++){var u=s[c];e&&e.equals(u)||(n.push(u),e=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(t){ca.prototype.copy.call(this,t),this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push(r.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=ca.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,n=this.curves.length;e<n;e++){var r=this.curves[e];t.curves.push(r.toJSON())}return t},fromJSON:function(t){ca.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,n=t.curves.length;e<n;e++){var r=t.curves[e];this.curves.push((new Aa[r.type]).fromJSON(r))}return this}}),La.prototype=Object.assign(Object.create(Pa.prototype),{constructor:La,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new ba(this.currentPoint.clone(),new Be(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var i=new Ea(this.currentPoint.clone(),new Be(t,e),new Be(n,r));this.curves.push(i),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,i,o){var a=new _a(this.currentPoint.clone(),new Be(t,e),new Be(n,r),new Be(i,o));this.curves.push(a),this.currentPoint.set(i,o)},splineThru:function(t){var e=new Ta([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var c=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(t+c,e+u,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var c=new ua(t,e,n,r,i,o,a,s);if(this.curves.length>0){var u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);var h=c.getPoint(1);this.currentPoint.copy(h)},copy:function(t){return Pa.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Pa.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Pa.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Ca.prototype=Object.assign(Object.create(La.prototype),{constructor:Ca,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){La.prototype.copy.call(this,t),this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push(r.clone())}return this},toJSON:function(){var t=La.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,n=this.holes.length;e<n;e++){var r=this.holes[e];t.holes.push(r.toJSON())}return t},fromJSON:function(t){La.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,n=t.holes.length;e<n;e++){var r=t.holes[e];this.holes.push((new La).fromJSON(r))}return this}}),Ra.prototype=Object.assign(Object.create(fn.prototype),{constructor:Ra,isLight:!0,copy:function(t){return fn.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=fn.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),Oa.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Oa,isHemisphereLight:!0,copy:function(t){return Ra.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Ia.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),Na.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Na,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ue.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),Da.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Da,isSpotLight:!0,copy:function(t){return Ra.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Fa.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Fa,isPointLight:!0,copy:function(t){return Ra.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Ua.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Ua}),Ba.prototype=Object.assign(Object.create(Ra.prototype),{constructor:Ba,isDirectionalLight:!0,copy:function(t){return Ra.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ja.prototype=Object.assign(Object.create(Ra.prototype),{constructor:ja,isAmbientLight:!0}),za.prototype=Object.assign(Object.create(Ra.prototype),{constructor:za,isRectAreaLight:!0,copy:function(t){return Ra.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Ra.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var Ga={arraySlice:function(t,e,n){return Ga.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,n=new Array(e),r=0;r!==e;++r)n[r]=r;return n.sort(function(e,n){return t[e]-t[n]}),n},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,c=0;c!==e;++c)i[a++]=t[s+c];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};function Ha(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function ka(t,e,n,r){Ha.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Va(t,e,n,r){Ha.call(this,t,e,n,r)}function Wa(t,e,n,r){Ha.call(this,t,e,n,r)}function Xa(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ga.convertArray(e,this.TimeBufferType),this.values=Ga.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function qa(t,e,n){Xa.call(this,t,e,n)}function Za(t,e,n,r){Xa.call(this,t,e,n,r)}function Ya(t,e,n,r){Xa.call(this,t,e,n,r)}function Ja(t,e,n,r){Ha.call(this,t,e,n,r)}function Ka(t,e,n,r){Xa.call(this,t,e,n,r)}function Qa(t,e,n,r){Xa.call(this,t,e,n,r)}function $a(t,e,n,r){Xa.call(this,t,e,n,r)}function ts(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ue.generateUUID(),this.duration<0&&this.resetDuration()}function es(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ya;case"vector":case"vector2":case"vector3":case"vector4":return $a;case"color":return Za;case"quaternion":return Ka;case"bool":case"boolean":return qa;case"string":return Qa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){var n=[],r=[];Ga.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function ns(t){this.manager=void 0!==t?t:ta,this.textures={}}function rs(t){this.manager=void 0!==t?t:ta}Object.assign(Ha.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,t<(r=e[++n]))break e}o=e.length;break n}if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,t>=(i=e[--n-1]))break e}o=n,n=0}for(;n<o;){var c=n+o>>>1;t<e[c]?o=c:n=c+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
- //!\ DECLARE ALIAS AFTER assign prototype !
- Object.assign(Ha.prototype,{beforeStart_:Ha.prototype.copySampleValue_,afterEnd_:Ha.prototype.copySampleValue_}),ka.prototype=Object.assign(Object.create(Ha.prototype),{constructor:ka,DefaultSettings_:{endingStart:xe,endingEnd:xe},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case _e:i=t,a=2*e-n;break;case we:a=e+r[i=r.length-2]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case _e:o=t,s=2*n-e;break;case we:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var c=.5*(n-e),u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=this._offsetPrev,h=this._offsetNext,l=this._weightPrev,f=this._weightNext,p=(n-e)/(r-e),d=p*p,m=d*p,v=-l*m+2*l*d-l*p,g=(1+l)*m+(-1.5-2*l)*d+(-.5+l)*p+1,y=(-1-f)*m+(1.5+f)*d+.5*p,x=f*m-f*d,_=0;_!==a;++_)i[_]=v*o[u+_]+g*o[c+_]+y*o[s+_]+x*o[h+_];return i}}),Va.prototype=Object.assign(Object.create(Ha.prototype),{constructor:Va,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=s-a,u=(n-e)/(r-e),h=1-u,l=0;l!==a;++l)i[l]=o[c+l]*h+o[s+l]*u;return i}}),Wa.prototype=Object.assign(Object.create(Ha.prototype),{constructor:Wa,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(Xa,{toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Ga.convertArray(t.times,Array),values:Ga.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e}}),Object.assign(Xa.prototype,{constructor:Xa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:ge,InterpolantFactoryMethodDiscrete:function(t){return new Wa(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Va(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new ka(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case ve:e=this.InterpolantFactoryMethodDiscrete;break;case ge:e=this.InterpolantFactoryMethodLinear;break;case ye:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return ve;case this.InterpolantFactoryMethodLinear:return ge;case this.InterpolantFactoryMethodSmooth:return ye}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Ga.arraySlice(n,i,o),this.values=Ga.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Ga.isTypedArray(r)){a=0;for(var c=r.length;a!==c;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===ye,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==c[0]))if(r)s=!0;else for(var u=a*n,h=u-n,l=u+n,f=0;f!==n;++f){var p=e[u+f];if(p!==e[h+f]||p!==e[l+f]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];var d=a*n,m=i*n;for(f=0;f!==n;++f)e[m+f]=e[d+f]}++i}}if(o>0){t[i]=t[o];for(d=o*n,m=i*n,f=0;f!==n;++f)e[m+f]=e[d+f];++i}return i!==t.length&&(this.times=Ga.arraySlice(t,0,i),this.values=Ga.arraySlice(e,0,i*n)),this}}),qa.prototype=Object.assign(Object.create(Xa.prototype),{constructor:qa,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:ve,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Za.prototype=Object.assign(Object.create(Xa.prototype),{constructor:Za,ValueTypeName:"color"}),Ya.prototype=Object.assign(Object.create(Xa.prototype),{constructor:Ya,ValueTypeName:"number"}),Ja.prototype=Object.assign(Object.create(Ha.prototype),{constructor:Ja,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,c=(n-e)/(r-e),u=s+a;s!==u;s+=4)ze.slerpFlat(i,0,o,s-a,o,s,c);return i}}),Ka.prototype=Object.assign(Object.create(Xa.prototype),{constructor:Ka,ValueTypeName:"quaternion",DefaultInterpolation:ge,InterpolantFactoryMethodLinear:function(t){return new Ja(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Qa.prototype=Object.assign(Object.create(Xa.prototype),{constructor:Qa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:ve,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),$a.prototype=Object.assign(Object.create(Xa.prototype),{constructor:$a,ValueTypeName:"vector"}),Object.assign(ts,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(es(n[i]).scale(r));return new ts(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid},i=0,o=n.length;i!==o;++i)e.push(Xa.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],c=[];s.push((a+i-1)%i,a,(a+1)%i),c.push(0,1,0);var u=Ga.getKeyframeOrder(s);s=Ga.sortedArray(s,1,u),c=Ga.sortedArray(c,1,u),r||0!==s[0]||(s.push(i),c.push(c[0])),o.push(new Ya(".morphTargetInfluences["+e[a].name+"]",s,c).scale(1/n))}return new ts(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],c=s.name.match(i);if(c&&c.length>1){var u=r[l=c[1]];u||(r[l]=u=[]),u.push(s)}}var h=[];for(var l in r)h.push(ts.CreateFromMorphTargetSequence(l,r[l],e,n));return h},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Ga.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var u=s[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var h={},l=0;l<u.length;l++)if(u[l].morphTargets)for(var f=0;f<u[l].morphTargets.length;f++)h[u[l].morphTargets[f]]=-1;for(var p in h){var d=[],m=[];for(f=0;f!==u[l].morphTargets.length;++f){var v=u[l];d.push(v.time),m.push(v.morphTarget===p?1:0)}r.push(new Ya(".morphTargetInfluence["+p+"]",d,m))}o=h.length*(a||1)}else{var g=".bones["+e[c].name+"]";n($a,g+".position",u,"pos",r),n(Ka,g+".quaternion",u,"rot",r),n($a,g+".scale",u,"scl",r)}}return 0===r.length?null:new ts(i,o,r)}}),Object.assign(ts.prototype,{resetDuration:function(){for(var t=0,e=0,n=this.tracks.length;e!==n;++e){var r=this.tracks[e];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(ns.prototype,{load:function(t,e,n,r){var i=this;new na(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var r=new Ko[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.flatShading&&(r.flatShading=t.flatShading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(r.rotation=t.rotation),1!==t.linewidth&&(r.linewidth=t.linewidth),void 0!==t.dashSize&&(r.dashSize=t.dashSize),void 0!==t.gapSize&&(r.gapSize=t.gapSize),void 0!==t.scale&&(r.scale=t.scale),void 0!==t.polygonOffset&&(r.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(r.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(r.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.dithering&&(r.dithering=t.dithering),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.uniforms)for(var i in t.uniforms){var o=t.uniforms[i];switch(r.uniforms[i]={},o.type){case"t":r.uniforms[i].value=n(o.value);break;case"c":r.uniforms[i].value=(new rn).setHex(o.value);break;case"v2":r.uniforms[i].value=(new Be).fromArray(o.value);break;case"v3":r.uniforms[i].value=(new Ge).fromArray(o.value);break;case"v4":r.uniforms[i].value=(new Xe).fromArray(o.value);break;case"m4":r.uniforms[i].value=(new je).fromArray(o.value);break;default:r.uniforms[i].value=o.value}}if(void 0!==t.defines&&(r.defines=t.defines),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.shading&&(r.flatShading=1===t.shading),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=n(t.map)),void 0!==t.alphaMap&&(r.alphaMap=n(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(r.normalMapType=t.normalMapType),void 0!==t.normalScale){var a=t.normalScale;!1===Array.isArray(a)&&(a=[a,a]),r.normalScale=(new Be).fromArray(a)}return void 0!==t.displacementMap&&(r.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=n(t.specularMap)),void 0!==t.envMap&&(r.envMap=n(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=n(t.gradientMap)),r}}),Object.assign(rs.prototype,{load:function(t,e,n,r){var i=this;new na(i.manager).load(t,function(t){e(i.parse(JSON.parse(t)))},n,r)},parse:function(t){var e=new Rn,n=t.data.index;if(void 0!==n){var r=new is[n.type](n.array);e.setIndex(new yn(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o];r=new is[a.type](a.array);e.addAttribute(o,new yn(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,u=s.length;c!==u;++c){var h=s[c];e.addGroup(h.start,h.count,h.materialIndex)}var l=t.data.boundingSphere;if(void 0!==l){var f=new Ge;void 0!==l.center&&f.fromArray(l.center),e.boundingSphere=new Ke(f,l.radius)}return e}});var is={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function os(){}os.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(os.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:function(){var t={NoBlending:M,NormalBlending:E,AdditiveBlending:S,SubtractiveBlending:T,MultiplyBlending:A,CustomBlending:P},e=new rn,n=new sa,r=new ns;return function(i,o,a){var s={};function c(t,e,r,i,c){var u,h=o+t,l=os.Handlers.get(h);null!==l?u=l.load(h):(n.setCrossOrigin(a),u=n.load(h)),void 0!==e&&(u.repeat.fromArray(e),1!==e[0]&&(u.wrapS=mt),1!==e[1]&&(u.wrapT=mt)),void 0!==r&&u.offset.fromArray(r),void 0!==i&&("repeat"===i[0]&&(u.wrapS=mt),"mirror"===i[0]&&(u.wrapS=gt),"repeat"===i[1]&&(u.wrapT=mt),"mirror"===i[1]&&(u.wrapT=gt)),void 0!==c&&(u.anisotropy=c);var f=Ue.generateUUID();return s[f]=u,f}var u={uuid:Ue.generateUUID(),type:"MeshLambertMaterial"};for(var h in i){var l=i[h];switch(h){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=l;break;case"blending":u.blending=t[l];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",h,"is no longer supported.");break;case"colorDiffuse":u.color=e.fromArray(l).getHex();break;case"colorSpecular":u.specular=e.fromArray(l).getHex();break;case"colorEmissive":u.emissive=e.fromArray(l).getHex();break;case"specularCoef":u.shininess=l;break;case"shading":"basic"===l.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===l.toLowerCase()&&(u.type="MeshPhongMaterial"),"standard"===l.toLowerCase()&&(u.type="MeshStandardMaterial");break;case"mapDiffuse":u.map=c(l,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":u.emissiveMap=c(l,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":u.lightMap=c(l,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=c(l,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=c(l,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=l;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=c(l,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=l;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=c(l,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":u.metalnessMap=c(l,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":u.roughnessMap=c(l,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":u.alphaMap=c(l,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=v;break;case"doubleSided":u.side=g;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=l;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[h]=l;break;case"vertexColors":!0===l&&(u.vertexColors=b),"face"===l&&(u.vertexColors=w);break;default:console.error("THREE.Loader.createMaterial: Unsupported",h,l)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),r.setTextures(s),r.parse(u)}}()});var as={decodeText:function(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e="",n=0,r=t.length;n<r;n++)e+=String.fromCharCode(t[n]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}};function ss(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:ta,this.withCredentials=!1}function cs(t){this.manager=void 0!==t?t:ta,this.texturePath=""}Object.assign(ss.prototype,{crossOrigin:"anonymous",load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:as.extractUrlBase(t),a=new na(this.manager);a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=i.parse(r,o);e(c.geometry,c.materials)},n,r)},setCrossOrigin:function(t){return this.crossOrigin=t,this},setTexturePath:function(t){return this.texturePath=t,this},parse:function(){return function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var n=new gn;return function(t,e){function n(t,e){return t&1<<e}var r,i,o,a,s,c,u,h,l,f,p,d,m,v,g,y,x,_,w,b,M,E,S,T,A,P=t.faces,L=t.vertices,C=t.normals,R=t.colors,O=t.scale,I=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&I++;for(r=0;r<I;r++)e.faceVertexUvs[r]=[]}for(a=0,s=L.length;a<s;)(_=new Ge).x=L[a++]*O,_.y=L[a++]*O,_.z=L[a++]*O,e.vertices.push(_);for(a=0,s=P.length;a<s;)if(p=n(f=P[a++],0),d=n(f,1),m=n(f,3),v=n(f,4),g=n(f,5),y=n(f,6),x=n(f,7),p){if((b=new mn).a=P[a],b.b=P[a+1],b.c=P[a+3],(M=new mn).a=P[a+1],M.b=P[a+2],M.c=P[a+3],a+=4,d&&(l=P[a++],b.materialIndex=l,M.materialIndex=l),o=e.faces.length,m)for(r=0;r<I;r++)for(T=t.uvs[r],e.faceVertexUvs[r][o]=[],e.faceVertexUvs[r][o+1]=[],i=0;i<4;i++)A=new Be(T[2*(h=P[a++])],T[2*h+1]),2!==i&&e.faceVertexUvs[r][o].push(A),0!==i&&e.faceVertexUvs[r][o+1].push(A);if(v&&(u=3*P[a++],b.normal.set(C[u++],C[u++],C[u]),M.normal.copy(b.normal)),g)for(r=0;r<4;r++)u=3*P[a++],S=new Ge(C[u++],C[u++],C[u]),2!==r&&b.vertexNormals.push(S),0!==r&&M.vertexNormals.push(S);if(y&&(E=R[c=P[a++]],b.color.setHex(E),M.color.setHex(E)),x)for(r=0;r<4;r++)E=R[c=P[a++]],2!==r&&b.vertexColors.push(new rn(E)),0!==r&&M.vertexColors.push(new rn(E));e.faces.push(b),e.faces.push(M)}else{if((w=new mn).a=P[a++],w.b=P[a++],w.c=P[a++],d&&(l=P[a++],w.materialIndex=l),o=e.faces.length,m)for(r=0;r<I;r++)for(T=t.uvs[r],e.faceVertexUvs[r][o]=[],i=0;i<3;i++)A=new Be(T[2*(h=P[a++])],T[2*h+1]),e.faceVertexUvs[r][o].push(A);if(v&&(u=3*P[a++],w.normal.set(C[u++],C[u++],C[u])),g)for(r=0;r<3;r++)u=3*P[a++],S=new Ge(C[u++],C[u++],C[u]),w.vertexNormals.push(S);if(y&&(c=P[a++],w.color.setHex(R[c])),x)for(r=0;r<3;r++)c=P[a++],w.vertexColors.push(new rn(R[c]));e.faces.push(w)}}(t,n),function(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],a=n>1?t.skinWeights[r+1]:0,s=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new Xe(o,a,s,c))}if(t.skinIndices)for(r=0,i=t.skinIndices.length;r<i;r+=n){var u=t.skinIndices[r],h=n>1?t.skinIndices[r+1]:0,l=n>2?t.skinIndices[r+2]:0,f=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new Xe(u,h,l,f))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,n),function(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,c=a.length;s<c;s+=3){var u=new Ge;u.x=a[s]*n,u.y=a[s+1]*n,u.z=a[s+2]*n,o.push(u)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');var h=e.faces,l=t.morphColors[0].colors;for(r=0,i=h.length;r<i;r++)h[r].color.fromArray(l,3*r)}}(t,n),function(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=ts.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=ts.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.animations=n)}(t,n),n.computeFaceNormals(),n.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:n}:{geometry:n,materials:os.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}()}),Object.assign(cs.prototype,{crossOrigin:"anonymous",load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new na(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,e):console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.")},n,r)},setTexturePath:function(t){return this.texturePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var n=this.parseShape(t.shapes),r=this.parseGeometries(t.geometries,n),i=this.parseImages(t.images,function(){void 0!==e&&e(s)}),o=this.parseTextures(t.textures,i),a=this.parseMaterials(t.materials,o),s=this.parseObject(t.object,r,a);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var n=0,r=t.length;n<r;n++){var i=(new Ca).fromJSON(t[n]);e[i.uuid]=i}return e},parseGeometries:function(t,e){var n={};if(void 0!==t)for(var r=new ss,i=new rs,o=0,a=t.length;o<a;o++){var s,c=t[o];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new Go[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new Go[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new Go[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new Go[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new Go[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new Go[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new Go[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new Go[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new Go[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new Go[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new Go[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new Go[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],h=0,l=c.shapes.length;h<l;h++){var f=e[c.shapes[h]];u.push(f)}s=new Go[c.type](u,c.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(u=[],h=0,l=c.shapes.length;h<l;h++){f=e[c.shapes[h]];u.push(f)}var p=c.options.extrudePath;void 0!==p&&(c.options.extrudePath=(new Aa[p.type]).fromJSON(p)),s=new Go[c.type](u,c.options);break;case"BufferGeometry":s=i.parse(c);break;case"Geometry":s=r.parse(c,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),!0===s.isBufferGeometry&&void 0!==c.userData&&(s.userData=c.userData),n[c.uuid]=s}return n},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new ns;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],c=0;c<a.materials.length;c++)s.push(r.parse(a.materials[c]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=ts.parse(r);void 0!==r.uuid&&(i.uuid=r.uuid),e.push(i)}return e},parseImages:function(t,e){var n=this,r={};function i(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}if(void 0!==t&&t.length>0){var o=new oa(new $o(e));o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var c=t[a],u=c.url;if(Array.isArray(u)){r[c.uuid]=[];for(var h=0,l=u.length;h<l;h++){var f=u[h],p=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(f)?f:n.texturePath+f;r[c.uuid].push(i(p))}}else{p=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:n.texturePath+c.url;r[c.uuid]=i(p)}}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,o=t.length;i<o;i++){var a,s=t[i];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image),(a=Array.isArray(e[s.image])?new Vn(e[s.image]):new We(e[s.image])).needsUpdate=!0,a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.mapping&&(a.mapping=n(s.mapping,hs)),void 0!==s.offset&&a.offset.fromArray(s.offset),void 0!==s.repeat&&a.repeat.fromArray(s.repeat),void 0!==s.center&&a.center.fromArray(s.center),void 0!==s.rotation&&(a.rotation=s.rotation),void 0!==s.wrap&&(a.wrapS=n(s.wrap[0],ls),a.wrapT=n(s.wrap[1],ls)),void 0!==s.format&&(a.format=s.format),void 0!==s.minFilter&&(a.minFilter=n(s.minFilter,fs)),void 0!==s.magFilter&&(a.magFilter=n(s.magFilter,fs)),void 0!==s.anisotropy&&(a.anisotropy=s.anisotropy),void 0!==s.flipY&&(a.flipY=s.flipY),r[s.uuid]=a}return r},parseObject:function(t,e,n){var r;function i(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],r=0,i=t.length;r<i;r++){var o=t[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(n[o])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}switch(t.type){case"Scene":r=new ui,void 0!==t.background&&Number.isInteger(t.background)&&(r.background=new rn(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?r.fog=new ci(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(r.fog=new si(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":r=new ri(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(r.focus=t.focus),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.filmGauge&&(r.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(r.filmOffset=t.filmOffset),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new dn(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(r.zoom=t.zoom),void 0!==t.view&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new ja(t.color,t.intensity);break;case"DirectionalLight":r=new Ba(t.color,t.intensity);break;case"PointLight":r=new Fa(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new za(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new Da(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":r=new Oa(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=i(t.geometry),s=o(t.material);r=a.bones&&a.bones.length>0?new gi(a,s):new Hn(a,s);break;case"LOD":r=new di;break;case"Line":r=new xi(i(t.geometry),o(t.material),t.mode);break;case"LineLoop":r=new wi(i(t.geometry),o(t.material));break;case"LineSegments":r=new _i(i(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new Mi(i(t.geometry),o(t.material));break;case"Sprite":r=new pi(o(t.material));break;case"Group":r=new ni;break;default:r=new fn}if(r.uuid=t.uuid,void 0!==t.name&&(r.name=t.name),void 0!==t.matrix?(r.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==t.position&&r.position.fromArray(t.position),void 0!==t.rotation&&r.rotation.fromArray(t.rotation),void 0!==t.quaternion&&r.quaternion.fromArray(t.quaternion),void 0!==t.scale&&r.scale.fromArray(t.scale)),void 0!==t.castShadow&&(r.castShadow=t.castShadow),void 0!==t.receiveShadow&&(r.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(r.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(r.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&r.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(r.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(r.visible=t.visible),void 0!==t.frustumCulled&&(r.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(r.renderOrder=t.renderOrder),void 0!==t.userData&&(r.userData=t.userData),void 0!==t.layers&&(r.layers.mask=t.layers),void 0!==t.children)for(var c=t.children,u=0;u<c.length;u++)r.add(this.parseObject(c[u],e,n));if("LOD"===t.type)for(var h=t.levels,l=0;l<h.length;l++){var f=h[l],p=r.getObjectByProperty("uuid",f.object);void 0!==p&&r.addLevel(p,f.distance)}return r}});var us,hs={UVMapping:st,CubeReflectionMapping:ct,CubeRefractionMapping:ut,EquirectangularReflectionMapping:ht,EquirectangularRefractionMapping:lt,SphericalReflectionMapping:ft,CubeUVReflectionMapping:pt,CubeUVRefractionMapping:dt},ls={RepeatWrapping:mt,ClampToEdgeWrapping:vt,MirroredRepeatWrapping:gt},fs={NearestFilter:yt,NearestMipMapNearestFilter:xt,NearestMipMapLinearFilter:_t,LinearFilter:wt,LinearMipMapNearestFilter:bt,LinearMipMapLinearFilter:Mt};function ps(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:ta,this.options=void 0}function ds(){this.type="ShapePath",this.color=new rn,this.subPaths=[],this.currentPath=null}function ms(t){this.type="Font",this.data=t}function vs(t,e,n,r,i){var o=i.glyphs[t]||i.glyphs["?"];if(o){var a,s,c,u,h,l,f,p,d=new ds;if(o.o)for(var m=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),v=0,g=m.length;v<g;){switch(m[v++]){case"m":a=m[v++]*e+n,s=m[v++]*e+r,d.moveTo(a,s);break;case"l":a=m[v++]*e+n,s=m[v++]*e+r,d.lineTo(a,s);break;case"q":c=m[v++]*e+n,u=m[v++]*e+r,h=m[v++]*e+n,l=m[v++]*e+r,d.quadraticCurveTo(h,l,c,u);break;case"b":c=m[v++]*e+n,u=m[v++]*e+r,h=m[v++]*e+n,l=m[v++]*e+r,f=m[v++]*e+n,p=m[v++]*e+r,d.bezierCurveTo(h,l,f,p,c,u)}}return{offsetX:o.ha*e,path:d}}}function gs(t){this.manager=void 0!==t?t:ta}ps.prototype={constructor:ps,setOptions:function(t){return this.options=t,this},load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var i=this,o=Qo.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;fetch(t).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,i.options)}).then(function(n){Qo.add(t,n),e&&e(n),i.manager.itemEnd(t)}).catch(function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(ds.prototype,{moveTo:function(t,e){this.currentPath=new La,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new Ca;o.curves=i.curves,e.push(o)}return e}function r(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],c=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=e[o],c=-c,s=e[i],u=-u),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var h=u*(t.x-a.x)-c*(t.y-a.y);if(0===h)return!0;if(h<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r}var i=vo.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===e)return n(o);var a,s,c,u=[];if(1===o.length)return s=o[0],(c=new Ca).curves=s.curves,u.push(c),u;var h=!i(o[0].getPoints());h=t?!h:h;var l,f,p=[],d=[],m=[],v=0;d[v]=void 0,m[v]=[];for(var g=0,y=o.length;g<y;g++)a=i(l=(s=o[g]).getPoints()),(a=t?!a:a)?(!h&&d[v]&&v++,d[v]={s:new Ca,p:l},d[v].s.curves=s.curves,h&&v++,m[v]=[]):m[v].push({h:s,p:l[0]});if(!d[0])return n(o);if(d.length>1){for(var x=!1,_=[],w=0,b=d.length;w<b;w++)p[w]=[];for(w=0,b=d.length;w<b;w++)for(var M=m[w],E=0;E<M.length;E++){for(var S=M[E],T=!0,A=0;A<d.length;A++)r(S.p,d[A].p)&&(w!==A&&_.push({froms:w,tos:A,hole:E}),T?(T=!1,p[A].push(S)):x=!0);T&&p[w].push(S)}_.length>0&&(x||(m=p))}g=0;for(var P=d.length;g<P;g++){c=d[g].s,u.push(c);for(var L=0,C=(f=m[g]).length;L<C;L++)c.holes.push(f[L].h)}return u}}),Object.assign(ms.prototype,{isFont:!0,generateShapes:function(t,e){void 0===e&&(e=100);for(var n=[],r=function(t,e,n){for(var r=Array.from?Array.from(t):String(t).split(""),i=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[],s=0,c=0,u=0;u<r.length;u++){var h=r[u];if("\n"===h)s=0,c-=o;else{var l=vs(h,i,s,c,n);s+=l.offsetX,a.push(l.path)}}return a}(t,e,this.data),i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}),Object.assign(gs.prototype,{load:function(t,e,n,r){var i=this,o=new na(this.manager);o.setPath(this.path),o.load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new ms(t)},setPath:function(t){return this.path=t,this}});var ys={getContext:function(){return void 0===us&&(us=new(window.AudioContext||window.webkitAudioContext)),us},setContext:function(t){us=t}};function xs(t){this.manager=void 0!==t?t:ta}function _s(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ri,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ri,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function ws(t,e,n){fn.call(this),this.type="CubeCamera";var r=new ri(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new Ge(1,0,0)),this.add(r);var i=new ri(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new Ge(-1,0,0)),this.add(i);var o=new ri(90,1,t,e);o.up.set(0,0,1),o.lookAt(new Ge(0,1,0)),this.add(o);var a=new ri(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new Ge(0,-1,0)),this.add(a);var s=new ri(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new Ge(0,0,1)),this.add(s);var c=new ri(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new Ge(0,0,-1)),this.add(c);var u={format:Ut,magFilter:wt,minFilter:wt};this.renderTarget=new Ze(n,n,u),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)},this.clear=function(t,e,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,t.setRenderTarget(i),t.clear(e,n,r);t.setRenderTarget(null)}}function bs(){fn.call(this),this.type="AudioListener",this.context=ys.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Ms(t){fn.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Es(t){Ms.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Ss(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Ts(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(xs.prototype,{load:function(t,e,n,r){var i=new na(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){var n=t.slice(0);ys.getContext().decodeAudioData(n,function(t){e(t)})},n,r)}}),Object.assign(_s.prototype,{update:function(){var t,e,n,r,i,o,a,s,c=new je,u=new je;return function(h){if(t!==this||e!==h.focus||n!==h.fov||r!==h.aspect*this.aspect||i!==h.near||o!==h.far||a!==h.zoom||s!==this.eyeSep){t=this,e=h.focus,n=h.fov,r=h.aspect*this.aspect,i=h.near,o=h.far,a=h.zoom;var l,f,p=h.projectionMatrix.clone(),d=(s=this.eyeSep/2)*i/e,m=i*Math.tan(Ue.DEG2RAD*n*.5)/a;u.elements[12]=-s,c.elements[12]=s,l=-m*r+d,f=m*r+d,p.elements[0]=2*i/(f-l),p.elements[8]=(f+l)/(f-l),this.cameraL.projectionMatrix.copy(p),l=-m*r-d,f=m*r-d,p.elements[0]=2*i/(f-l),p.elements[8]=(f+l)/(f-l),this.cameraR.projectionMatrix.copy(p)}this.cameraL.matrixWorld.copy(h.matrixWorld).multiply(u),this.cameraR.matrixWorld.copy(h.matrixWorld).multiply(c)}}()}),ws.prototype=Object.create(fn.prototype),ws.prototype.constructor=ws,bs.prototype=Object.assign(Object.create(fn.prototype),{constructor:bs,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(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new Ge,e=new ze,n=new Ge,r=new Ge;return function(i){fn.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),Ms.prototype=Object.assign(Object.create(fn.prototype),{constructor:Ms,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,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.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.source.onended=null,this.offset=0,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 t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);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 t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),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(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),Es.prototype=Object.assign(Object.create(Ms.prototype),{constructor:Es,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=n,this},updateMatrixWorld:function(){var t=new Ge,e=new ze,n=new Ge,r=new Ge;return function(i){fn.prototype.updateMatrixWorld.call(this,i);var o=this.panner;this.matrixWorld.decompose(t,e,n),r.set(0,0,1).applyQuaternion(e),o.setPosition(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z)}}()}),Object.assign(Ss.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(Ts.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{var s=e/(o+=e);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,c=e+e;s!==c;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){ze.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}});var As,Ps;function Ls(t,e,n){var r=n||Cs.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Cs(t,e,n){this.path=e,this.parsedPath=n||Cs.parseTrackName(e),this.node=Cs.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Rs(){this.uuid=Ue.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Os(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:xe,endingEnd:xe},s=0;s!==i;++s){var c=r[s].createInterpolant(null);o[s]=c,c.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=de,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 Is(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Ns(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Ds(){Rn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Fs(t,e,n){hi.call(this,t,e),this.meshPerAttribute=n||1}function Us(t,e,n,r){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),yn.call(this,t,e,n),this.meshPerAttribute=r||1}function Bs(t,e,n,r){this.ray=new zn(t,e),this.near=n||0,this.far=r||1/0,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 js(t,e){return t.distance-e.distance}function zs(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)zs(i[o],e,n,!0)}function Gs(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Hs(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function ks(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function Vs(t,e){this.min=void 0!==t?t:new Be(1/0,1/0),this.max=void 0!==e?e:new Be(-1/0,-1/0)}function Ws(t,e){this.start=void 0!==t?t:new Ge,this.end=void 0!==e?e:new Ge}function Xs(t){fn.call(this),this.material=t,this.render=function(){}}function qs(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var c=new Rn,u=new Tn(2*a*3,3);c.addAttribute("position",u),_i.call(this,c,new yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function Zs(t,e){fn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var n=new Rn,r=[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,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new Tn(r,3));var c=new yi({fog:!1});this.cone=new _i(n,c),this.add(this.cone),this.update()}function Ys(t){for(var e=function t(e){var n=[];e&&e.isBone&&n.push(e);for(var r=0;r<e.children.length;r++)n.push.apply(n,t(e.children[r]));return n}(t),n=new Rn,r=[],i=[],o=new rn(0,0,1),a=new rn(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new Tn(r,3)),n.addAttribute("color",new Tn(i,3));var u=new yi({vertexColors:b,depthTest:!1,depthWrite:!1,transparent:!0});_i.call(this,n,u),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Js(t,e,n){this.light=t,this.light.updateMatrixWorld(),this.color=n;var r=new To(e,4,2),i=new Bn({wireframe:!0,fog:!1});Hn.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ks(t,e){fn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var n=new yi({fog:!1}),r=new Rn;r.addAttribute("position",new yn(new Float32Array(15),3)),this.line=new xi(r,n),this.add(this.line),this.update()}function Qs(t,e,n){fn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Fi(e);r.rotateY(.5*Math.PI),this.material=new Bn({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=b);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new yn(o,3)),this.add(new Hn(r,this.material)),this.update()}function $s(t,e,n,r){t=t||10,e=e||10,n=new rn(void 0!==n?n:4473924),r=new rn(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],c=[],u=0,h=0,l=-a;u<=e;u++,l+=o){s.push(-a,0,l,a,0,l),s.push(l,0,-a,l,0,a);var f=u===i?n:r;f.toArray(c,h),h+=3,f.toArray(c,h),h+=3,f.toArray(c,h),h+=3,f.toArray(c,h),h+=3}var p=new Rn;p.addAttribute("position",new Tn(s,3)),p.addAttribute("color",new Tn(c,3));var d=new yi({vertexColors:b});_i.call(this,p,d)}function tc(t,e,n,r,i,o){t=t||10,e=e||16,n=n||8,r=r||64,i=new rn(void 0!==i?i:4473924),o=new rn(void 0!==o?o:8947848);var a,s,c,u,h,l,f,p=[],d=[];for(u=0;u<=e;u++)c=u/e*(2*Math.PI),a=Math.sin(c)*t,s=Math.cos(c)*t,p.push(0,0,0),p.push(a,0,s),f=1&u?i:o,d.push(f.r,f.g,f.b),d.push(f.r,f.g,f.b);for(u=0;u<=n;u++)for(f=1&u?i:o,l=t-t/n*u,h=0;h<r;h++)c=h/r*(2*Math.PI),a=Math.sin(c)*l,s=Math.cos(c)*l,p.push(a,0,s),d.push(f.r,f.g,f.b),c=(h+1)/r*(2*Math.PI),a=Math.sin(c)*l,s=Math.cos(c)*l,p.push(a,0,s),d.push(f.r,f.g,f.b);var m=new Rn;m.addAttribute("position",new Tn(p,3)),m.addAttribute("color",new Tn(d,3));var v=new yi({vertexColors:b});_i.call(this,m,v)}function ec(t,e,n,r){this.object=t,this.size=void 0!==e?e:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new Rn,u=new Tn(2*a*3,3);c.addAttribute("position",u),_i.call(this,c,new yi({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function nc(t,e,n){fn.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);var r=new Rn;r.addAttribute("position",new Tn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var i=new yi({fog:!1});this.lightPlane=new xi(r,i),this.add(this.lightPlane),(r=new Rn).addAttribute("position",new Tn([0,0,0,0,0,1],3)),this.targetLine=new xi(r,i),this.add(this.targetLine),this.update()}function rc(t){var e=new Rn,n=new yi({color:16777215,vertexColors:w}),r=[],i=[],o={},a=new rn(16755200),s=new rn(16711680),c=new rn(43775),u=new rn(16777215),h=new rn(3355443);function l(t,e,n){f(t,n),f(e,n)}function f(t,e){r.push(0,0,0),i.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(r.length/3-1)}l("n1","n2",a),l("n2","n4",a),l("n4","n3",a),l("n3","n1",a),l("f1","f2",a),l("f2","f4",a),l("f4","f3",a),l("f3","f1",a),l("n1","f1",a),l("n2","f2",a),l("n3","f3",a),l("n4","f4",a),l("p","n1",s),l("p","n2",s),l("p","n3",s),l("p","n4",s),l("u1","u2",c),l("u2","u3",c),l("u3","u1",c),l("c","t",u),l("p","c",h),l("cn1","cn2",h),l("cn3","cn4",h),l("cf1","cf2",h),l("cf3","cf4",h),e.addAttribute("position",new Tn(r,3)),e.addAttribute("color",new Tn(i,3)),_i.call(this,e,n),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}function ic(t,e){this.object=t,void 0===e&&(e=16776960);var n=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]),r=new Float32Array(24),i=new Rn;i.setIndex(new yn(n,1)),i.addAttribute("position",new yn(r,3)),_i.call(this,i,new yi({color:e})),this.matrixAutoUpdate=!1,this.update()}function oc(t,e){this.type="Box3Helper",this.box=t;var n=void 0!==e?e:16776960,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]),i=new Rn;i.setIndex(new yn(r,1)),i.addAttribute("position",new Tn([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)),_i.call(this,i,new yi({color:n})),this.geometry.computeBoundingSphere()}function ac(t,e,n){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var r=void 0!==n?n:16776960,i=new Rn;i.addAttribute("position",new Tn([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(),xi.call(this,i,new yi({color:r}));var o=new Rn;o.addAttribute("position",new Tn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new Hn(o,new Bn({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function sc(t,e,n,r,i,o){fn.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===As&&((As=new Rn).addAttribute("position",new Tn([0,0,0,0,1,0],3)),(Ps=new Fo(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new xi(As,new yi({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Hn(Ps,new Bn({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function cc(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new Rn;n.addAttribute("position",new Tn(e,3)),n.addAttribute("color",new Tn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var r=new yi({vertexColors:b});_i.call(this,n,r)}function uc(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new mn(t,e,n,i,o,a)}Object.assign(Ls.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Cs,{Composite:Ls,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Cs.Composite(t,e,n):new Cs(t,e,n)},sanitizeNodeName:function(){var t=new RegExp("[\\[\\]\\.:\\/]","g");return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^\\[\\]\\.:\\/]",e="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",n=/((?:WC+[\/:])*)/.source.replace("WC",t),r=/(WCOD+)?/.source.replace("WCOD",e),i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",t),o=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",t),a=new RegExp("^"+n+r+i+o+"$"),s=["material","materials","bones"];return function(t){var e=a.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==s.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Cs.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(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Cs.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[o]}}var s=t[r];if(void 0!==s){var c=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?c=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate);var u=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(t.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(u=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][c]}else{var h=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+h+"."+r+" but it wasn't found.",t)}}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}}),
- //!\ DECLARE ALIAS AFTER assign prototype !
- Object.assign(Cs.prototype,{_getValue_unbound:Cs.prototype.getValue,_setValue_unbound:Cs.prototype.setValue}),Object.assign(Rs.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,c=void 0,u=0,h=arguments.length;u!==h;++u){var l=arguments[u],f=l.uuid,p=r[f];if(void 0===p){p=e++,r[f]=p,t.push(l);for(var d=0,m=s;d!==m;++d)a[d].push(new Cs(l,i[d],o[d]))}else if(p<n){c=t[p];var v=--n,g=t[v];r[g.uuid]=p,t[p]=g,r[f]=v,t[v]=l;for(d=0,m=s;d!==m;++d){var y=a[d],x=y[v],_=y[p];y[p]=x,void 0===_&&(_=new Cs(l,i[d],o[d])),y[v]=_}}else t[p]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],c=s.uuid,u=n[c];if(void 0!==u&&u>=e){var h=e++,l=t[h];n[l.uuid]=u,t[u]=l,n[c]=h,t[h]=s;for(var f=0,p=i;f!==p;++f){var d=r[f],m=d[h],v=d[u];d[u]=m,d[h]=v}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var c=arguments[a].uuid,u=r[c];if(void 0!==u)if(delete r[c],u<n){var h=--n,l=t[h],f=t[g=--e];r[l.uuid]=u,t[u]=l,r[f.uuid]=h,t[h]=f,t.pop();for(var p=0,d=o;p!==d;++p){var m=(y=i[p])[h],v=y[g];y[u]=m,y[h]=v,y.pop()}}else{var g;r[(f=t[g=--e]).uuid]=u,t[u]=f,t.pop();for(p=0,d=o;p!==d;++p){var y;(y=i[p])[u]=y[g],y.pop()}}}this.nCachedObjects_=n},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,c=s.length,u=this.nCachedObjects_,h=new Array(c);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(h);for(var l=u,f=s.length;l!==f;++l){var p=s[l];h[l]=new Cs(p,t,e)}return h},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Os.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(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,c=o.sampleValues;return s[0]=i,s[1]=i+n,c[0]=t/a,c[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,u=this._propertyBindings,h=0,l=c.length;h!==l;++h)c[h].evaluate(a),u[h].accumulate(r,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t,n=this._clip.duration,r=this.loop,i=this._loopCount,o=r===me;if(0===t)return-1===i?e:o&&1==(1&i)?n-e:e;if(r===pe){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=_e,r.endingEnd=_e):(r.endingStart=t?this.zeroSlopeAtStart?_e:xe:we,r.endingEnd=e?this.zeroSlopeAtEnd?_e:xe:we)},_scheduleFading:function(t,e,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=e,a[1]=i+t,s[1]=n,this}}),Is.prototype=Object.assign(Object.create(r.prototype),{constructor:Is,_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,c=this._bindingsByRootAndName,u=c[s];void 0===u&&(u={},c[s]=u);for(var h=0;h!==i;++h){var l=r[h],f=l.name,p=u[f];if(void 0!==p)o[h]=p;else{if(void 0!==(p=o[h])){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,s,f));continue}var d=e&&e._propertyBindings[h].binding.parsedPath;++(p=new Ts(Cs.create(n,f,d),l.ValueTypeName,l.getValueSize())).referenceCount,this._addInactiveBinding(p,s,f),o[h]=p}a[h].resultBuffer=p.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,c=s[s.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,s[u]=c,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete a[i];t:{for(var u in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&((n=new Va(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?ts.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var c=a.actionByRoot[r];if(void 0!==c)return c;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Os(this,i,e);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?ts.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}var s=this._bindings,c=this._nActiveBindings;for(a=0;a!==c;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var c=o[a];this._deactivateAction(c);var u=c._cacheIndex,h=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,h._cacheIndex=u,e[u]=h,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[e];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Ns.prototype.clone=function(){return new Ns(void 0===this.value.clone?this.value:this.value.clone())},Ds.prototype=Object.assign(Object.create(Rn.prototype),{constructor:Ds,isInstancedBufferGeometry:!0,copy:function(t){return Rn.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Fs.prototype=Object.assign(Object.create(hi.prototype),{constructor:Fs,isInstancedInterleavedBuffer:!0,copy:function(t){return hi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Us.prototype=Object.assign(Object.create(yn.prototype),{constructor:Us,isInstancedBufferAttribute:!0,copy:function(t){return yn.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Bs.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,n){var r=n||[];return zs(t,this,r,e),r.sort(js),r},intersectObjects:function(t,e,n){var r=n||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=t.length;i<o;i++)zs(t[i],this,r,e);return r.sort(js),r}}),Object.assign(Gs.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 t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(Hs.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(Ue.clamp(e/this.radius,-1,1))),this}}),Object.assign(ks.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=e,this}}),Object.assign(Vs.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new Be;return function(e,n){var r=t.copy(n).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(t){return this.min.copy(t.min),this.max.copy(t.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(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new Be),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new Be),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new Be),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new Be),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new Be;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ws.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new Ge),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new Ge),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new Ge),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new Ge,e=new Ge;return function(n,r){t.subVectors(n,this.start),e.subVectors(this.end,this.start);var i=e.dot(e),o=e.dot(t)/i;return r&&(o=Ue.clamp(o,0,1)),o}}(),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ge),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Xs.prototype=Object.create(fn.prototype),Xs.prototype.constructor=Xs,Xs.prototype.isImmediateRenderObject=!0,qs.prototype=Object.create(_i.prototype),qs.prototype.constructor=qs,qs.prototype.update=function(){var t=new Ge,e=new Ge,n=new He;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,c=a.faces,u=0,h=0,l=c.length;h<l;h++)for(var f=c[h],p=0,d=f.vertexNormals.length;p<d;p++){var m=s[f[r[p]]],v=f.vertexNormals[p];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}else if(a&&a.isBufferGeometry){var g=a.attributes.position,y=a.attributes.normal;for(u=0,p=0,d=g.count;p<d;p++)t.set(g.getX(p),g.getY(p),g.getZ(p)).applyMatrix4(i),e.set(y.getX(p),y.getY(p),y.getZ(p)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(u,t.x,t.y,t.z),u+=1,o.setXYZ(u,e.x,e.y,e.z),u+=1}o.needsUpdate=!0}}(),Zs.prototype=Object.create(fn.prototype),Zs.prototype.constructor=Zs,Zs.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Zs.prototype.update=function(){var t=new Ge,e=new Ge;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Ys.prototype=Object.create(_i.prototype),Ys.prototype.constructor=Ys,Ys.prototype.updateMatrixWorld=function(){var t=new Ge,e=new je,n=new je;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(e.multiplyMatrices(n,u.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(n,u.parent.matrixWorld),t.setFromMatrixPosition(e),a.setXYZ(c+1,t.x,t.y,t.z),c+=2)}o.getAttribute("position").needsUpdate=!0,fn.prototype.updateMatrixWorld.call(this,r)}}(),Js.prototype=Object.create(Hn.prototype),Js.prototype.constructor=Js,Js.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Js.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ks.prototype=Object.create(fn.prototype),Ks.prototype.constructor=Ks,Ks.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ks.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=t,r[1]=-e,r[2]=0,r[3]=t,r[4]=e,r[5]=0,r[6]=-t,r[7]=e,r[8]=0,r[9]=-t,r[10]=-e,r[11]=0,r[12]=t,r[13]=-e,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Qs.prototype=Object.create(fn.prototype),Qs.prototype.constructor=Qs,Qs.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Qs.prototype.update=function(){var t=new Ge,e=new rn,n=new rn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),$s.prototype=Object.create(_i.prototype),$s.prototype.constructor=$s,tc.prototype=Object.create(_i.prototype),tc.prototype.constructor=tc,ec.prototype=Object.create(_i.prototype),ec.prototype.constructor=ec,ec.prototype.update=function(){var t=new Ge,e=new Ge,n=new He;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,c=0,u=0,h=s.length;u<h;u++){var l=s[u],f=l.normal;t.copy(a[l.a]).add(a[l.b]).add(a[l.c]).divideScalar(3).applyMatrix4(r),e.copy(f).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(c,t.x,t.y,t.z),c+=1,i.setXYZ(c,e.x,e.y,e.z),c+=1}i.needsUpdate=!0}}(),nc.prototype=Object.create(fn.prototype),nc.prototype.constructor=nc,nc.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},nc.prototype.update=function(){var t=new Ge,e=new Ge,n=new Ge;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t),this.lightPlane.lookAt(n),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(n),this.targetLine.scale.z=n.length()}}(),rc.prototype=Object.create(_i.prototype),rc.prototype.constructor=rc,rc.prototype.update=function(){var t,e,n=new Ge,r=new pn;function i(i,o,a,s){n.set(o,a,s).unproject(r);var c=e[i];if(void 0!==c)for(var u=t.getAttribute("position"),h=0,l=c.length;h<l;h++)u.setXYZ(c[h],n.x,n.y,n.z)}return function(){t=this.geometry,e=this.pointMap;r.projectionMatrix.copy(this.camera.projectionMatrix),i("c",0,0,-1),i("t",0,0,1),i("n1",-1,-1,-1),i("n2",1,-1,-1),i("n3",-1,1,-1),i("n4",1,1,-1),i("f1",-1,-1,1),i("f2",1,-1,1),i("f3",-1,1,1),i("f4",1,1,1),i("u1",.7,1.1,-1),i("u2",-.7,1.1,-1),i("u3",0,2,-1),i("cf1",-1,0,1),i("cf2",1,0,1),i("cf3",0,-1,1),i("cf4",0,1,1),i("cn1",-1,0,-1),i("cn2",1,0,-1),i("cn3",0,-1,-1),i("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),ic.prototype=Object.create(_i.prototype),ic.prototype.constructor=ic,ic.prototype.update=function(){var t=new Je;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),ic.prototype.setFromObject=function(t){return this.object=t,this.update(),this},oc.prototype=Object.create(_i.prototype),oc.prototype.constructor=oc,oc.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),fn.prototype.updateMatrixWorld.call(this,t))},ac.prototype=Object.create(xi.prototype),ac.prototype.constructor=ac,ac.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?v:m,this.lookAt(this.plane.normal),fn.prototype.updateMatrixWorld.call(this,t)},sc.prototype=Object.create(fn.prototype),sc.prototype.constructor=sc,sc.prototype.setDirection=function(){var t,e=new Ge;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),sc.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},sc.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},cc.prototype=Object.create(_i.prototype),cc.prototype.constructor=cc;var hc=0,lc=1;function fc(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function pc(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function dc(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Mi(t,e)}function mc(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new pi(t)}function vc(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Mi(t,e)}function gc(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new bi(t)}function yc(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new bi(t)}function xc(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new bi(t)}function _c(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ge(t,e,n)}function wc(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new yn(t,e).setDynamic(!0)}function bc(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new xn(t,e)}function Mc(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new _n(t,e)}function Ec(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new wn(t,e)}function Sc(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new bn(t,e)}function Tc(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Mn(t,e)}function Ac(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new En(t,e)}function Pc(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Sn(t,e)}function Lc(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Tn(t,e)}function Cc(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new An(t,e)}function Rc(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),va.call(this,t),this.type="catmullrom",this.closed=!0}function Oc(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),va.call(this,t),this.type="catmullrom"}function Ic(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),va.call(this,t),this.type="catmullrom"}function Nc(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cc(t)}function Dc(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new ic(t,e)}function Fc(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new _i(new No(t.geometry),new yi({color:void 0!==e?e:16777215}))}function Uc(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new _i(new Pi(t.geometry),new yi({color:void 0!==e?e:16777215}))}function Bc(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new na(t)}function jc(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ia(t)}ca.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(ca.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Pa.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new gn,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new Ge(i.x,i.y,i.z||0))}return e}}),Object.assign(La.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Rc.prototype=Object.create(va.prototype),Oc.prototype=Object.create(va.prototype),Ic.prototype=Object.create(va.prototype),Object.assign(Ic.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.")}}),$s.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ys.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(os.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),as.extractUrlBase(t)}}),Object.assign(Vs.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(Je.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Ws.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ue,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ue.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ue.ceilPowerOfTwo(t)}}),Object.assign(He.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(je.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new Ge),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.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.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),Qe.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},ze.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(zn.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Gn.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Gn,{barycoordFromPoint:function(t,e,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Gn.getBarycoord(t,e,n,r,i)},normal:function(t,e,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Gn.getNormal(t,e,n,r)}}),Object.assign(Ca.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new xo(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ro(this,t)}}),Object.assign(Be.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Ge.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(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Xe.prototype,{fromAttribute:function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(gn.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.")}}),Object.assign(fn.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(fn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},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.defineProperties(di.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(mi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(ca.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ri.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Ra.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(yn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Rn.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},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.")}}),Object.defineProperties(Rn.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.assign(_o.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(Ns.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(Un.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new rn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===y}}}),Object.defineProperties(Xo.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(jn.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(ai.prototype,{animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},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(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},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.")}}),Object.defineProperties(ai.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},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.")}}}),Object.defineProperties($r.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(qe.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(oi.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Ms.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new xs).load(t,function(t){e.setBuffer(t)}),this},Ss.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},ws.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var zc={merge:function(t,e,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}};function Gc(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function Hc(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}ke.crossOrigin=void 0,ke.loadTexture=function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new sa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},ke.loadTextureCube=function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new aa;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},ke.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},ke.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var kc={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 Vc(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.faces,n=t.vertices;n.length>0&&0===e.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(var r=[],i=[],o=0;o<e.length;o++){var a=e[o];r.push(n[a.a],n[a.b],n[a.c]);var s=a.vertexNormals;if(3===s.length)i.push(s[0],s[1],s[2]);else{var c=a.normal;i.push(c,c,c)}}return{vertices:r,normals:i}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={stepTotal:10}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clearGeos=e.getFeatures=void 0;var r=function(){var t=o(regeneratorRuntime.mark(function t(e,n,r){var i,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c(e,n,r);case 2:return i=t.sent,o=u(i.features),t.abrupt("return",o);case 5:case"end":return t.stop()}},t,this)}));return function(e,n,r){return t.apply(this,arguments)}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(n(344));function o(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}var a={},s=[],c=function(){var t=function(){var t=o(regeneratorRuntime.mark(function t(e,n,r){var o,c,u;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e+"-"+n+"-"+r,c=s.replace("{s}",h()).replace("{x}",e).replace("{y}",n).replace("{z}",r),!a[o]){t.next=7;break}return f(o),t.abrupt("return",a[o]);case 7:return t.next=9,i.default.get(c).then(function(t){return t.data});case 9:return u=t.sent,l(o,u),t.abrupt("return",u);case 12:case"end":return t.stop()}},t,this)}));return function(e,n,r){return t.apply(this,arguments)}}(),e=5e4,n=[],r=50,s="https://{s}.data.osmbuildings.org/0.2/anonymous/tile/{z}/{x}/{y}.json",c=["a","b","c","d"],u=0;function h(){return u===c.length&&(u=0),c[u++]}function l(t,i){if(n.length>=e)for(var o=0;o<r;o++){var s=n.shift();delete a[s]}n.push(t),a[t]=i}function f(t){var e=n.indexOf(t);n.splice(e,1),n.push(t)}return t}();function u(t){var e=[];return t.forEach(function(t){~s.indexOf(t.id)||(s.push(t.id),e.push(t))}),e}e.getFeatures=r,e.clearGeos=function(t){t.forEach(function(t){var e=s.indexOf(t);~e&&s.splice(e,1)})}},function(t,e,n){t.exports=n(345)},function(t,e,n){"use strict";var r=n(18),i=n(129),o=n(347),a=n(91);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var c=s(a);c.Axios=o,c.create=function(t){return s(r.merge(a,t))},c.Cancel=n(133),c.CancelToken=n(361),c.isCancel=n(132),c.all=function(t){return Promise.all(t)},c.spread=n(362),t.exports=c,t.exports.default=c},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
- /*!
- * Determine if an object is a Buffer
- *
- * @author Feross Aboukhadijeh <https://feross.org>
- * @license MIT
- */
- t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,n){"use strict";var r=n(91),i=n(18),o=n(356),a=n(357);function s(t){this.defaults=t,this.interceptors={request:new o,response:new o}}s.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=s},function(t,e,n){"use strict";var r=n(18);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(131);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";var r=n(18);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";var r=n(18),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(18);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,o=String(t),a="",s=0,c=r;o.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&e>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new i;e=e<<8|n}return a}},function(t,e,n){"use strict";var r=n(18);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(18);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,n){"use strict";var r=n(18),i=n(358),o=n(132),a=n(91),s=n(359),c=n(360);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return u(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(18);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(133);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}}]);
|