chbim-plugins 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chbim-plugins.js +33 -33
- package/chbim-plugins.umd.cjs +8 -8
- package/package.json +5 -2
- package/style.css +1 -1
package/chbim-plugins.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Fi,
|
|
1
|
+
(function(Fi,Ee){typeof exports=="object"&&typeof module<"u"?Ee(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],Ee):(Fi=typeof globalThis<"u"?globalThis:Fi||self,Ee(Fi["chbim-plugins"]={},Fi.Vue))})(this,function(Fi,Ee){"use strict";const yh="",Fs=((p,Ot)=>{const $=p.__vccOpts||p;for(const[mt,ht]of Ot)$[mt]=ht;return $})(Object.assign({name:"MukButton"},{props:{size:{type:String,default:"middle"},type:{type:String,default:"default"}},setup(p){return(Ot,$)=>(Ee.openBlock(),Ee.createElementBlock("button",{class:Ee.normalizeClass(["muk-btn",[p.size,p.type]])},[Ee.renderSlot(Ot.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0e6d93cd"]]);class Oa{constructor(){this.dom={mask:document.querySelector(".js-mask"),slices:[...document.querySelectorAll(".js-mask__slice")],lines:[...document.querySelectorAll(".js-mask-line")],logo:document.querySelector(".js-logo"),titles:[...document.querySelectorAll(".js-transition-title")]},this.tl=null,this.state=!1,this.init()}resetScroll(){window.scrollTo(0,0)}createTimeline(){this.tl=new TimelineMax({paused:!0,onComplete:()=>{this.state=!1}}),this.tl.set(this.dom.titles,{yPercent:0}).set(this.dom.mask,{autoAlpha:1}).staggerFromTo(this.dom.slices,1.5,{xPercent:100},{xPercent:0,ease:Expo.easeInOut},-.075).addCallback(this.resetScroll.bind(this)).addLabel("loaderStart").set(this.dom.titles,{yPercent:-100}).set([this.dom.lines[0],this.dom.logo],{autoAlpha:1}).fromTo(this.dom.logo,1,{yPercent:-100,rotation:10},{yPercent:0,rotation:0,ease:Expo.easeOut}).addLabel("intermediateFrame").staggerFromTo(this.dom.lines,.5,{scaleX:0},{scaleX:1,ease:Expo.easeInOut},.75,"-=1").set(this.dom.lines,{transformOrigin:"right"}).fromTo(this.dom.lines[0],1,{scaleX:1},{scaleX:0,ease:Expo.easeInOut}).fromTo(this.dom.logo,1,{yPercent:0},{yPercent:105,ease:Expo.easeOut},"-=1").staggerFromTo(this.dom.slices,.5,{xPercent:0},{xPercent:100,ease:Expo.easeInOut},.075).set(this.dom.mask,{autoAlpha:0}).addLabel("imagesStart","-=0.85").staggerFromTo(this.dom.titles,1.5,{yPercent:100},{yPercent:0,ease:Expo.easeInOut},.05,"imagesStart").addLabel("loaderEnd")}continuation(){this.init(),this.resetScroll(),this.tl.tweenFromTo("loaderStart","loaderEnd")}show(){this.init(),this.tl.tweenFromTo("loaderStart","intermediateFrame")}hide(){this.resetScroll(),this.tl.tweenFromTo("intermediateFrame","loaderEnd")}init(){document.querySelector(".mask-line.js-mask-line")&&document.querySelector(".mask-line.js-mask-line").removeAttribute("style"),document.querySelector(".mask-line__inner.js-mask-line")&&document.querySelector(".mask-line__inner.js-mask-line").removeAttribute("style"),this.createTimeline()}}const Ia={class:"mask js-mask"},Da=Ee.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),za=Ee.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Na=Ee.createElementVNode("div",{class:"mask__slice js-mask__slice"},null,-1),Ba={class:"mask__inner"},Ua={class:"logo logo--mask"},Fa={class:"js-logo",style:{color:"#fff"}},Ga=Ee.createElementVNode("div",{class:"mask-line js-mask-line"},[Ee.createElementVNode("div",{class:"mask-line__inner js-mask-line"})],-1),Ha={name:"BimCutscenes"},Gs=Ee.defineComponent({...Ha,props:{text:{type:String,default:"CHBIM云平台"}},setup(p,{expose:Ot}){const $=Ee.ref(null),mt=()=>{$.value===null&&($.value=new Oa)},ht=()=>{mt(),$.value.continuation()};return Ee.onMounted(()=>{mt()}),Ot({continuation:ht}),(M,yt)=>(Ee.openBlock(),Ee.createElementBlock("div",Ia,[Da,za,Na,Ee.createElementVNode("div",Ba,[Ee.createElementVNode("figure",Ua,[Ee.createElementVNode("p",Fa,Ee.toDisplayString(p.text),1)]),Ga])]))}}),Mh="";/*!
|
|
2
2
|
* VERSION: 2.0.2
|
|
3
3
|
* DATE: 2018-08-27
|
|
4
4
|
* UPDATES AND DOCS AT: http://greensock.com
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Club GreenSock members, the software agreement that was issued with your membership.
|
|
11
11
|
*
|
|
12
12
|
* @author: Jack Doyle, jack@greensock.com
|
|
13
|
-
**/var $e=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;($e._gsQueue||($e._gsQueue=[])).push(function(){$e._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,Ot,$){var mt=function(K){var H,m=[],f=K.length;for(H=0;H!==f;m.push(K[H++]));return m},ht=function(K,H,m){var f,O,w=K.cycle;for(f in w)O=w[f],K[f]=typeof O=="function"?O(m,H[m]):O[m%O.length];delete K.cycle},M=function(K,H,m){$.call(this,K,H,m),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=M.prototype.render},yt=1e-10,Ct=$._internals,Y=Ct.isSelector,lt=Ct.isArray,St=M.prototype=$.to({},.1,{}),ut=[];M.version="2.0.2",St.constructor=M,St.kill()._gc=!1,M.killTweensOf=M.killDelayedCallsTo=$.killTweensOf,M.getTweensOf=$.getTweensOf,M.lagSmoothing=$.lagSmoothing,M.ticker=$.ticker,M.render=$.render,St.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),$.prototype.invalidate.call(this)},St.updateTo=function(K,H){var m,f=this.ratio,O=this.vars.immediateRender||K.immediateRender;H&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(m in K)this.vars[m]=K[m];if(this._initted||O){if(H)this._initted=!1,O&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&$._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var w=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(w,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||O)for(var X,b=1/(1-f),F=this._firstPT;F;)X=F.s+F.c,F.c*=b,F.s=X-F.c,F=F._next}return this},St.render=function(K,H,m){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var f,O,w,X,b,F,Z,st,it,Pt=this._dirty?this.totalDuration():this._totalDuration,Lt=this._time,Gt=this._totalTime,jt=this._cycle,ie=this._duration,ct=this._rawPrevTime;if(K>=Pt-1e-7&&K>=0?(this._totalTime=Pt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=ie,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(f=!0,O="onComplete",m=m||this._timeline.autoRemoveChildren),ie===0&&(this._initted||!this.vars.lazy||m)&&(this._startTime===this._timeline._duration&&(K=0),(0>ct||0>=K&&K>=-1e-7||ct===yt&&this.data!=="isPause")&&ct!==K&&(m=!0,ct>yt&&(O="onReverseComplete")),this._rawPrevTime=st=!H||K||ct===K?K:yt)):1e-7>K?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Gt!==0||ie===0&&ct>0)&&(O="onReverseComplete",f=this._reversed),0>K&&(this._active=!1,ie===0&&(this._initted||!this.vars.lazy||m)&&(ct>=0&&(m=!0),this._rawPrevTime=st=!H||K||ct===K?K:yt)),this._initted||(m=!0)):(this._totalTime=this._time=K,this._repeat!==0&&(X=ie+this._repeatDelay,this._cycle=this._totalTime/X>>0,this._cycle!==0&&this._cycle===this._totalTime/X&&K>=Gt&&this._cycle--,this._time=this._totalTime-this._cycle*X,this._yoyo&&1&this._cycle&&(this._time=ie-this._time,it=this._yoyoEase||this.vars.yoyoEase,it&&(this._yoyoEase||(it!==!0||this._initted?this._yoyoEase=it=it===!0?this._ease:it instanceof Ease?it:Ease.map[it]:(it=this.vars.ease,this._yoyoEase=it=it?it instanceof Ease?it:typeof it=="function"?new Ease(it,this.vars.easeParams):Ease.map[it]||$.defaultEase:$.defaultEase)),this.ratio=it?1-it.getRatio((ie-this._time)/ie):0)),this._time>ie?this._time=ie:this._time<0&&(this._time=0)),this._easeType&&!it?(b=this._time/ie,F=this._easeType,Z=this._easePower,(F===1||F===3&&b>=.5)&&(b=1-b),F===3&&(b*=2),Z===1?b*=b:Z===2?b*=b*b:Z===3?b*=b*b*b:Z===4&&(b*=b*b*b*b),F===1?this.ratio=1-b:F===2?this.ratio=b:this._time/ie<.5?this.ratio=b/2:this.ratio=1-b/2):it||(this.ratio=this._ease.getRatio(this._time/ie))),Lt===this._time&&!m&&jt===this._cycle)return void(Gt!==this._totalTime&&this._onUpdate&&(H||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!m&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=Lt,this._totalTime=Gt,this._rawPrevTime=ct,this._cycle=jt,Ct.lazyTweens.push(this),void(this._lazy=[K,H]);!this._time||f||it?f&&this._ease._calcEnd&&!it&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/ie)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Lt&&K>=0&&(this._active=!0),Gt===0&&(this._initted===2&&K>0&&this._init(),this._startAt&&(K>=0?this._startAt.render(K,!0,m):O||(O="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||ie===0)&&(H||this._callback("onStart"))),w=this._firstPT;w;)w.f?w.t[w.p](w.c*this.ratio+w.s):w.t[w.p]=w.c*this.ratio+w.s,w=w._next;this._onUpdate&&(0>K&&this._startAt&&this._startTime&&this._startAt.render(K,!0,m),H||(this._totalTime!==Gt||O)&&this._callback("onUpdate")),this._cycle!==jt&&(H||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),O&&(!this._gc||m)&&(0>K&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(K,!0,m),f&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!H&&this.vars[O]&&this._callback(O),ie===0&&this._rawPrevTime===yt&&st!==yt&&(this._rawPrevTime=0))},M.to=function(K,H,m){return new M(K,H,m)},M.from=function(K,H,m){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,new M(K,H,m)},M.fromTo=function(K,H,m,f){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,new M(K,H,f)},M.staggerTo=M.allTo=function(K,H,m,f,O,w,X){f=f||0;var b,F,Z,st,it=0,Pt=[],Lt=function(){m.onComplete&&m.onComplete.apply(m.onCompleteScope||this,arguments),O.apply(X||m.callbackScope||this,w||ut)},Gt=m.cycle,jt=m.startAt&&m.startAt.cycle;for(lt(K)||(typeof K=="string"&&(K=$.selector(K)||K),Y(K)&&(K=mt(K))),K=K||[],0>f&&(K=mt(K),K.reverse(),f*=-1),b=K.length-1,Z=0;b>=Z;Z++){F={};for(st in m)F[st]=m[st];if(Gt&&(ht(F,K,Z),F.duration!=null&&(H=F.duration,delete F.duration)),jt){jt=F.startAt={};for(st in m.startAt)jt[st]=m.startAt[st];ht(F.startAt,K,Z)}F.delay=it+(F.delay||0),Z===b&&O&&(F.onComplete=Lt),Pt[Z]=new M(K[Z],H,F),it+=f}return Pt},M.staggerFrom=M.allFrom=function(K,H,m,f,O,w,X){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,M.staggerTo(K,H,m,f,O,w,X)},M.staggerFromTo=M.allFromTo=function(K,H,m,f,O,w,X,b){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,M.staggerTo(K,H,f,O,w,X,b)},M.delayedCall=function(K,H,m,f,O){return new M(H,0,{delay:K,onComplete:H,onCompleteParams:m,callbackScope:f,onReverseComplete:H,onReverseCompleteParams:m,immediateRender:!1,useFrames:O,overwrite:0})},M.set=function(K,H){return new M(K,0,H)},M.isTweening=function(K){return $.getTweensOf(K,!0).length>0};var At=function(K,H){for(var m=[],f=0,O=K._first;O;)O instanceof $?m[f++]=O:(H&&(m[f++]=O),m=m.concat(At(O,H)),f=m.length),O=O._next;return m},Dt=M.getAllTweens=function(K){return At(p._rootTimeline,K).concat(At(p._rootFramesTimeline,K))};M.killAll=function(K,H,m,f){H==null&&(H=!0),m==null&&(m=!0);var O,w,X,b=Dt(f!=0),F=b.length,Z=H&&m&&f;for(X=0;F>X;X++)w=b[X],(Z||w instanceof Ot||(O=w.target===w.vars.onComplete)&&m||H&&!O)&&(K?w.totalTime(w._reversed?0:w.totalDuration()):w._enabled(!1,!1))},M.killChildTweensOf=function(K,H){if(K!=null){var m,f,O,w,X,b=Ct.tweenLookup;if(typeof K=="string"&&(K=$.selector(K)||K),Y(K)&&(K=mt(K)),lt(K))for(w=K.length;--w>-1;)M.killChildTweensOf(K[w],H);else{m=[];for(O in b)for(f=b[O].target.parentNode;f;)f===K&&(m=m.concat(b[O].tweens)),f=f.parentNode;for(X=m.length,w=0;X>w;w++)H&&m[w].totalTime(m[w].totalDuration()),m[w]._enabled(!1,!1)}}};var _t=function(K,H,m,f){H=H!==!1,m=m!==!1,f=f!==!1;for(var O,w,X=Dt(f),b=H&&m&&f,F=X.length;--F>-1;)w=X[F],(b||w instanceof Ot||(O=w.target===w.vars.onComplete)&&m||H&&!O)&&w.paused(K)};return M.pauseAll=function(K,H,m){_t(!0,K,H,m)},M.resumeAll=function(K,H,m){_t(!1,K,H,m)},M.globalTimeScale=function(K){var H=p._rootTimeline,m=$.ticker.time;return arguments.length?(K=K||yt,H._startTime=m-(m-H._startTime)*H._timeScale/K,H=p._rootFramesTimeline,m=$.ticker.frame,H._startTime=m-(m-H._startTime)*H._timeScale/K,H._timeScale=p._rootTimeline._timeScale=K,K):H._timeScale},St.progress=function(K,H){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-K:K)+this._cycle*(this._duration+this._repeatDelay),H):this._time/this.duration()},St.totalProgress=function(K,H){return arguments.length?this.totalTime(this.totalDuration()*K,H):this._totalTime/this.totalDuration()},St.time=function(K,H){return arguments.length?(this._dirty&&this.totalDuration(),K>this._duration&&(K=this._duration),this._yoyo&&1&this._cycle?K=this._duration-K+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(K+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(K,H)):this._time},St.duration=function(K){return arguments.length?p.prototype.duration.call(this,K):this._duration},St.totalDuration=function(K){return arguments.length?this._repeat===-1?this:this.duration((K-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},St.repeat=function(K){return arguments.length?(this._repeat=K,this._uncache(!0)):this._repeat},St.repeatDelay=function(K){return arguments.length?(this._repeatDelay=K,this._uncache(!0)):this._repeatDelay},St.yoyo=function(K){return arguments.length?(this._yoyo=K,this):this._yoyo},M},!0),$e._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,Ot,$){var mt=function(m){Ot.call(this,m),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var f,O,w=this.vars;for(O in w)f=w[O],Y(f)&&f.join("").indexOf("{self}")!==-1&&(w[O]=this._swapSelfInParams(f));Y(w.tweens)&&this.add(w.tweens,0,w.align,w.stagger)},ht=1e-10,M=$._internals,yt=mt._internals={},Ct=M.isSelector,Y=M.isArray,lt=M.lazyTweens,St=M.lazyRender,ut=$e._gsDefine.globals,At=function(m){var f,O={};for(f in m)O[f]=m[f];return O},Dt=function(m,f,O){var w,X,b=m.cycle;for(w in b)X=b[w],m[w]=typeof X=="function"?X(O,f[O]):X[O%X.length];delete m.cycle},_t=yt.pauseCallback=function(){},K=function(m){var f,O=[],w=m.length;for(f=0;f!==w;O.push(m[f++]));return O},H=mt.prototype=new Ot;return mt.version="2.0.2",H.constructor=mt,H.kill()._gc=H._forcingPlayhead=H._hasPause=!1,H.to=function(m,f,O,w){var X=O.repeat&&ut.TweenMax||$;return f?this.add(new X(m,f,O),w):this.set(m,O,w)},H.from=function(m,f,O,w){return this.add((O.repeat&&ut.TweenMax||$).from(m,f,O),w)},H.fromTo=function(m,f,O,w,X){var b=w.repeat&&ut.TweenMax||$;return f?this.add(b.fromTo(m,f,O,w),X):this.set(m,w,X)},H.staggerTo=function(m,f,O,w,X,b,F,Z){var st,it,Pt=new mt({onComplete:b,onCompleteParams:F,callbackScope:Z,smoothChildTiming:this.smoothChildTiming}),Lt=O.cycle;for(typeof m=="string"&&(m=$.selector(m)||m),m=m||[],Ct(m)&&(m=K(m)),w=w||0,0>w&&(m=K(m),m.reverse(),w*=-1),it=0;it<m.length;it++)st=At(O),st.startAt&&(st.startAt=At(st.startAt),st.startAt.cycle&&Dt(st.startAt,m,it)),Lt&&(Dt(st,m,it),st.duration!=null&&(f=st.duration,delete st.duration)),Pt.to(m[it],f,st,it*w);return this.add(Pt,X)},H.staggerFrom=function(m,f,O,w,X,b,F,Z){return O.immediateRender=O.immediateRender!=0,O.runBackwards=!0,this.staggerTo(m,f,O,w,X,b,F,Z)},H.staggerFromTo=function(m,f,O,w,X,b,F,Z,st){return w.startAt=O,w.immediateRender=w.immediateRender!=0&&O.immediateRender!=0,this.staggerTo(m,f,w,X,b,F,Z,st)},H.call=function(m,f,O,w){return this.add($.delayedCall(0,m,f,O),w)},H.set=function(m,f,O){return O=this._parseTimeOrLabel(O,0,!0),f.immediateRender==null&&(f.immediateRender=O===this._time&&!this._paused),this.add(new $(m,0,f),O)},mt.exportRoot=function(m,f){m=m||{},m.smoothChildTiming==null&&(m.smoothChildTiming=!0);var O,w,X,b,F=new mt(m),Z=F._timeline;for(f==null&&(f=!0),Z._remove(F,!0),F._startTime=0,F._rawPrevTime=F._time=F._totalTime=Z._time,X=Z._first;X;)b=X._next,f&&X instanceof $&&X.target===X.vars.onComplete||(w=X._startTime-X._delay,0>w&&(O=1),F.add(X,w)),X=b;return Z.add(F,0),O&&F.totalDuration(),F},H.add=function(m,f,O,w){var X,b,F,Z,st,it;if(typeof f!="number"&&(f=this._parseTimeOrLabel(f,0,!0,m)),!(m instanceof p)){if(m instanceof Array||m&&m.push&&Y(m)){for(O=O||"normal",w=w||0,X=f,b=m.length,F=0;b>F;F++)Y(Z=m[F])&&(Z=new mt({tweens:Z})),this.add(Z,X),typeof Z!="string"&&typeof Z!="function"&&(O==="sequence"?X=Z._startTime+Z.totalDuration()/Z._timeScale:O==="start"&&(Z._startTime-=Z.delay())),X+=w;return this._uncache(!0)}if(typeof m=="string")return this.addLabel(m,f);if(typeof m!="function")throw"Cannot add "+m+" into the timeline; it is not a tween, timeline, function, or string.";m=$.delayedCall(0,m)}if(Ot.prototype.add.call(this,m,f),m._time&&(X=Math.max(0,Math.min(m.totalDuration(),(this.rawTime()-m._startTime)*m._timeScale)),Math.abs(X-m._totalTime)>1e-5&&m.render(X,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(st=this,it=st.rawTime()>m._startTime;st._timeline;)it&&st._timeline.smoothChildTiming?st.totalTime(st._totalTime,!0):st._gc&&st._enabled(!0,!1),st=st._timeline;return this},H.remove=function(m){if(m instanceof p){this._remove(m,!1);var f=m._timeline=m.vars.useFrames?p._rootFramesTimeline:p._rootTimeline;return m._startTime=(m._paused?m._pauseTime:f._time)-(m._reversed?m.totalDuration()-m._totalTime:m._totalTime)/m._timeScale,this}if(m instanceof Array||m&&m.push&&Y(m)){for(var O=m.length;--O>-1;)this.remove(m[O]);return this}return typeof m=="string"?this.removeLabel(m):this.kill(null,m)},H._remove=function(m,f){Ot.prototype._remove.call(this,m,f);var O=this._last;return O?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},H.append=function(m,f){return this.add(m,this._parseTimeOrLabel(null,f,!0,m))},H.insert=H.insertMultiple=function(m,f,O,w){return this.add(m,f||0,O,w)},H.appendMultiple=function(m,f,O,w){return this.add(m,this._parseTimeOrLabel(null,f,!0,m),O,w)},H.addLabel=function(m,f){return this._labels[m]=this._parseTimeOrLabel(f),this},H.addPause=function(m,f,O,w){var X=$.delayedCall(0,_t,O,w||this);return X.vars.onComplete=X.vars.onReverseComplete=f,X.data="isPause",this._hasPause=!0,this.add(X,m)},H.removeLabel=function(m){return delete this._labels[m],this},H.getLabelTime=function(m){return this._labels[m]!=null?this._labels[m]:-1},H._parseTimeOrLabel=function(m,f,O,w){var X,b;if(w instanceof p&&w.timeline===this)this.remove(w);else if(w&&(w instanceof Array||w.push&&Y(w)))for(b=w.length;--b>-1;)w[b]instanceof p&&w[b].timeline===this&&this.remove(w[b]);if(X=typeof m!="number"||f?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof f=="string")return this._parseTimeOrLabel(f,O&&typeof m=="number"&&this._labels[f]==null?m-X:0,O);if(f=f||0,typeof m!="string"||!isNaN(m)&&this._labels[m]==null)m==null&&(m=X);else{if(b=m.indexOf("="),b===-1)return this._labels[m]==null?O?this._labels[m]=X+f:f:this._labels[m]+f;f=parseInt(m.charAt(b-1)+"1",10)*Number(m.substr(b+1)),m=b>1?this._parseTimeOrLabel(m.substr(0,b-1),0,O):X}return Number(m)+f},H.seek=function(m,f){return this.totalTime(typeof m=="number"?m:this._parseTimeOrLabel(m),f!==!1)},H.stop=function(){return this.paused(!0)},H.gotoAndPlay=function(m,f){return this.play(m,f)},H.gotoAndStop=function(m,f){return this.pause(m,f)},H.render=function(m,f,O){this._gc&&this._enabled(!0,!1);var w,X,b,F,Z,st,it,Pt=this._time,Lt=this._dirty?this.totalDuration():this._totalDuration,Gt=this._startTime,jt=this._timeScale,ie=this._paused;if(Pt!==this._time&&(m+=this._time-Pt),m>=Lt-1e-7&&m>=0)this._totalTime=this._time=Lt,this._reversed||this._hasPausedChild()||(X=!0,F="onComplete",Z=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=m&&m>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===ht)&&this._rawPrevTime!==m&&this._first&&(Z=!0,this._rawPrevTime>ht&&(F="onReverseComplete"))),this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:ht,m=Lt+1e-4;else if(1e-7>m)if(this._totalTime=this._time=0,(Pt!==0||this._duration===0&&this._rawPrevTime!==ht&&(this._rawPrevTime>0||0>m&&this._rawPrevTime>=0))&&(F="onReverseComplete",X=this._reversed),0>m)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(Z=X=!0,F="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(Z=!0),this._rawPrevTime=m;else{if(this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:ht,m===0&&X)for(w=this._first;w&&w._startTime===0;)w._duration||(X=!1),w=w._next;m=0,this._initted||(Z=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!f){if(m>=Pt)for(w=this._first;w&&w._startTime<=m&&!st;)w._duration||w.data!=="isPause"||w.ratio||w._startTime===0&&this._rawPrevTime===0||(st=w),w=w._next;else for(w=this._last;w&&w._startTime>=m&&!st;)w._duration||w.data==="isPause"&&w._rawPrevTime>0&&(st=w),w=w._prev;st&&(this._time=m=st._startTime,this._totalTime=m+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=m}if(this._time!==Pt&&this._first||O||Z||st){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Pt&&m>0&&(this._active=!0),Pt===0&&this.vars.onStart&&(this._time===0&&this._duration||f||this._callback("onStart")),it=this._time,it>=Pt)for(w=this._first;w&&(b=w._next,it===this._time&&(!this._paused||ie));)(w._active||w._startTime<=it&&!w._paused&&!w._gc)&&(st===w&&this.pause(),w._reversed?w.render((w._dirty?w.totalDuration():w._totalDuration)-(m-w._startTime)*w._timeScale,f,O):w.render((m-w._startTime)*w._timeScale,f,O)),w=b;else for(w=this._last;w&&(b=w._prev,it===this._time&&(!this._paused||ie));){if(w._active||w._startTime<=Pt&&!w._paused&&!w._gc){if(st===w){for(st=w._prev;st&&st.endTime()>this._time;)st.render(st._reversed?st.totalDuration()-(m-st._startTime)*st._timeScale:(m-st._startTime)*st._timeScale,f,O),st=st._prev;st=null,this.pause()}w._reversed?w.render((w._dirty?w.totalDuration():w._totalDuration)-(m-w._startTime)*w._timeScale,f,O):w.render((m-w._startTime)*w._timeScale,f,O)}w=b}this._onUpdate&&(f||(lt.length&&St(),this._callback("onUpdate"))),F&&(this._gc||(Gt===this._startTime||jt!==this._timeScale)&&(this._time===0||Lt>=this.totalDuration())&&(X&&(lt.length&&St(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!f&&this.vars[F]&&this._callback(F)))}},H._hasPausedChild=function(){for(var m=this._first;m;){if(m._paused||m instanceof mt&&m._hasPausedChild())return!0;m=m._next}return!1},H.getChildren=function(m,f,O,w){w=w||-9999999999;for(var X=[],b=this._first,F=0;b;)b._startTime<w||(b instanceof $?f!==!1&&(X[F++]=b):(O!==!1&&(X[F++]=b),m!==!1&&(X=X.concat(b.getChildren(!0,f,O)),F=X.length))),b=b._next;return X},H.getTweensOf=function(m,f){var O,w,X=this._gc,b=[],F=0;for(X&&this._enabled(!0,!0),O=$.getTweensOf(m),w=O.length;--w>-1;)(O[w].timeline===this||f&&this._contains(O[w]))&&(b[F++]=O[w]);return X&&this._enabled(!1,!0),b},H.recent=function(){return this._recent},H._contains=function(m){for(var f=m.timeline;f;){if(f===this)return!0;f=f.timeline}return!1},H.shiftChildren=function(m,f,O){O=O||0;for(var w,X=this._first,b=this._labels;X;)X._startTime>=O&&(X._startTime+=m),X=X._next;if(f)for(w in b)b[w]>=O&&(b[w]+=m);return this._uncache(!0)},H._kill=function(m,f){if(!m&&!f)return this._enabled(!1,!1);for(var O=f?this.getTweensOf(f):this.getChildren(!0,!0,!1),w=O.length,X=!1;--w>-1;)O[w]._kill(m,f)&&(X=!0);return X},H.clear=function(m){var f=this.getChildren(!1,!0,!0),O=f.length;for(this._time=this._totalTime=0;--O>-1;)f[O]._enabled(!1,!1);return m!==!1&&(this._labels={}),this._uncache(!0)},H.invalidate=function(){for(var m=this._first;m;)m.invalidate(),m=m._next;return p.prototype.invalidate.call(this)},H._enabled=function(m,f){if(m===this._gc)for(var O=this._first;O;)O._enabled(m,!0),O=O._next;return Ot.prototype._enabled.call(this,m,f)},H.totalTime=function(m,f,O){this._forcingPlayhead=!0;var w=p.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,w},H.duration=function(m){return arguments.length?(this.duration()!==0&&m!==0&&this.timeScale(this._duration/m),this):(this._dirty&&this.totalDuration(),this._duration)},H.totalDuration=function(m){if(!arguments.length){if(this._dirty){for(var f,O,w=0,X=this._last,b=999999999999;X;)f=X._prev,X._dirty&&X.totalDuration(),X._startTime>b&&this._sortChildren&&!X._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(X,X._startTime-X._delay),this._calculatingDuration=0):b=X._startTime,X._startTime<0&&!X._paused&&(w-=X._startTime,this._timeline.smoothChildTiming&&(this._startTime+=X._startTime/this._timeScale,this._time-=X._startTime,this._totalTime-=X._startTime,this._rawPrevTime-=X._startTime),this.shiftChildren(-X._startTime,!1,-9999999999),b=0),O=X._startTime+X._totalDuration/X._timeScale,O>w&&(w=O),X=f;this._duration=this._totalDuration=w,this._dirty=!1}return this._totalDuration}return m&&this.totalDuration()?this.timeScale(this._totalDuration/m):this},H.paused=function(m){if(!m)for(var f=this._first,O=this._time;f;)f._startTime===O&&f.data==="isPause"&&(f._rawPrevTime=0),f=f._next;return p.prototype.paused.apply(this,arguments)},H.usesFrames=function(){for(var m=this._timeline;m._timeline;)m=m._timeline;return m===p._rootFramesTimeline},H.rawTime=function(m){return m&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(m)-this._startTime)*this._timeScale},mt},!0),$e._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(p,Ot,$){var mt=function(ut){p.call(this,ut),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},ht=1e-10,M=Ot._internals,yt=M.lazyTweens,Ct=M.lazyRender,Y=$e._gsDefine.globals,lt=new $(null,null,1,0),St=mt.prototype=new p;return St.constructor=mt,St.kill()._gc=!1,mt.version="2.0.2",St.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),p.prototype.invalidate.call(this)},St.addCallback=function(ut,At,Dt,_t){return this.add(Ot.delayedCall(0,ut,Dt,_t),At)},St.removeCallback=function(ut,At){if(ut)if(At==null)this._kill(null,ut);else for(var Dt=this.getTweensOf(ut,!1),_t=Dt.length,K=this._parseTimeOrLabel(At);--_t>-1;)Dt[_t]._startTime===K&&Dt[_t]._enabled(!1,!1);return this},St.removePause=function(ut){return this.removeCallback(p._internals.pauseCallback,ut)},St.tweenTo=function(ut,At){At=At||{};var Dt,_t,K,H={ease:lt,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},m=At.repeat&&Y.TweenMax||Ot;for(_t in At)H[_t]=At[_t];return H.time=this._parseTimeOrLabel(ut),Dt=Math.abs(Number(H.time)-this._time)/this._timeScale||.001,K=new m(this,Dt,H),H.onStart=function(){K.target.paused(!0),K.vars.time===K.target.time()||Dt!==K.duration()||K.isFromTo||K.duration(Math.abs(K.vars.time-K.target.time())/K.target._timeScale).render(K.time(),!0,!0),At.onStart&&At.onStart.apply(At.onStartScope||At.callbackScope||K,At.onStartParams||[])},K},St.tweenFromTo=function(ut,At,Dt){Dt=Dt||{},ut=this._parseTimeOrLabel(ut),Dt.startAt={onComplete:this.seek,onCompleteParams:[ut],callbackScope:this},Dt.immediateRender=Dt.immediateRender!==!1;var _t=this.tweenTo(At,Dt);return _t.isFromTo=1,_t.duration(Math.abs(_t.vars.time-ut)/this._timeScale||.001)},St.render=function(ut,At,Dt){this._gc&&this._enabled(!0,!1);var _t,K,H,m,f,O,w,X,b=this._time,F=this._dirty?this.totalDuration():this._totalDuration,Z=this._duration,st=this._totalTime,it=this._startTime,Pt=this._timeScale,Lt=this._rawPrevTime,Gt=this._paused,jt=this._cycle;if(b!==this._time&&(ut+=this._time-b),ut>=F-1e-7&&ut>=0)this._locked||(this._totalTime=F,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(K=!0,m="onComplete",f=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=ut&&ut>=-1e-7||0>Lt||Lt===ht)&&Lt!==ut&&this._first&&(f=!0,Lt>ht&&(m="onReverseComplete"))),this._rawPrevTime=this._duration||!At||ut||this._rawPrevTime===ut?ut:ht,this._yoyo&&1&this._cycle?this._time=ut=0:(this._time=Z,ut=Z+1e-4);else if(1e-7>ut)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(b!==0||Z===0&&Lt!==ht&&(Lt>0||0>ut&&Lt>=0)&&!this._locked)&&(m="onReverseComplete",K=this._reversed),0>ut)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(f=K=!0,m="onReverseComplete"):Lt>=0&&this._first&&(f=!0),this._rawPrevTime=ut;else{if(this._rawPrevTime=Z||!At||ut||this._rawPrevTime===ut?ut:ht,ut===0&&K)for(_t=this._first;_t&&_t._startTime===0;)_t._duration||(K=!1),_t=_t._next;ut=0,this._initted||(f=!0)}else if(Z===0&&0>Lt&&(f=!0),this._time=this._rawPrevTime=ut,this._locked||(this._totalTime=ut,this._repeat!==0&&(O=Z+this._repeatDelay,this._cycle=this._totalTime/O>>0,this._cycle!==0&&this._cycle===this._totalTime/O&&ut>=st&&this._cycle--,this._time=this._totalTime-this._cycle*O,this._yoyo&&1&this._cycle&&(this._time=Z-this._time),this._time>Z?(this._time=Z,ut=Z+1e-4):this._time<0?this._time=ut=0:ut=this._time)),this._hasPause&&!this._forcingPlayhead&&!At){if(ut=this._time,ut>=b||this._repeat&&jt!==this._cycle)for(_t=this._first;_t&&_t._startTime<=ut&&!w;)_t._duration||_t.data!=="isPause"||_t.ratio||_t._startTime===0&&this._rawPrevTime===0||(w=_t),_t=_t._next;else for(_t=this._last;_t&&_t._startTime>=ut&&!w;)_t._duration||_t.data==="isPause"&&_t._rawPrevTime>0&&(w=_t),_t=_t._prev;w&&w._startTime<Z&&(this._time=ut=w._startTime,this._totalTime=ut+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==jt&&!this._locked){var ie=this._yoyo&&(1&jt)!==0,ct=ie===(this._yoyo&&(1&this._cycle)!==0),kt=this._totalTime,Me=this._cycle,gi=this._rawPrevTime,Rt=this._time;if(this._totalTime=jt*Z,this._cycle<jt?ie=!ie:this._totalTime+=Z,this._time=b,this._rawPrevTime=Z===0?Lt-1e-4:Lt,this._cycle=jt,this._locked=!0,b=ie?0:Z,this.render(b,At,Z===0),At||this._gc||this.vars.onRepeat&&(this._cycle=Me,this._locked=!1,this._callback("onRepeat")),b!==this._time||(ct&&(this._cycle=jt,this._locked=!0,b=ie?Z+1e-4:-1e-4,this.render(b,!0,!1)),this._locked=!1,this._paused&&!Gt))return;this._time=Rt,this._totalTime=kt,this._cycle=Me,this._rawPrevTime=gi}if(!(this._time!==b&&this._first||Dt||f||w))return void(st!==this._totalTime&&this._onUpdate&&(At||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==st&&ut>0&&(this._active=!0),st===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||At||this._callback("onStart")),X=this._time,X>=b)for(_t=this._first;_t&&(H=_t._next,X===this._time&&(!this._paused||Gt));)(_t._active||_t._startTime<=this._time&&!_t._paused&&!_t._gc)&&(w===_t&&this.pause(),_t._reversed?_t.render((_t._dirty?_t.totalDuration():_t._totalDuration)-(ut-_t._startTime)*_t._timeScale,At,Dt):_t.render((ut-_t._startTime)*_t._timeScale,At,Dt)),_t=H;else for(_t=this._last;_t&&(H=_t._prev,X===this._time&&(!this._paused||Gt));){if(_t._active||_t._startTime<=b&&!_t._paused&&!_t._gc){if(w===_t){for(w=_t._prev;w&&w.endTime()>this._time;)w.render(w._reversed?w.totalDuration()-(ut-w._startTime)*w._timeScale:(ut-w._startTime)*w._timeScale,At,Dt),w=w._prev;w=null,this.pause()}_t._reversed?_t.render((_t._dirty?_t.totalDuration():_t._totalDuration)-(ut-_t._startTime)*_t._timeScale,At,Dt):_t.render((ut-_t._startTime)*_t._timeScale,At,Dt)}_t=H}this._onUpdate&&(At||(yt.length&&Ct(),this._callback("onUpdate"))),m&&(this._locked||this._gc||(it===this._startTime||Pt!==this._timeScale)&&(this._time===0||F>=this.totalDuration())&&(K&&(yt.length&&Ct(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!At&&this.vars[m]&&this._callback(m)))},St.getActive=function(ut,At,Dt){ut==null&&(ut=!0),At==null&&(At=!0),Dt==null&&(Dt=!1);var _t,K,H=[],m=this.getChildren(ut,At,Dt),f=0,O=m.length;for(_t=0;O>_t;_t++)K=m[_t],K.isActive()&&(H[f++]=K);return H},St.getLabelAfter=function(ut){ut||ut!==0&&(ut=this._time);var At,Dt=this.getLabelsArray(),_t=Dt.length;for(At=0;_t>At;At++)if(Dt[At].time>ut)return Dt[At].name;return null},St.getLabelBefore=function(ut){ut==null&&(ut=this._time);for(var At=this.getLabelsArray(),Dt=At.length;--Dt>-1;)if(At[Dt].time<ut)return At[Dt].name;return null},St.getLabelsArray=function(){var ut,At=[],Dt=0;for(ut in this._labels)At[Dt++]={time:this._labels[ut],name:ut};return At.sort(function(_t,K){return _t.time-K.time}),At},St.invalidate=function(){return this._locked=!1,p.prototype.invalidate.call(this)},St.progress=function(ut,At){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-ut:ut)+this._cycle*(this._duration+this._repeatDelay),At):this._time/this.duration()||0},St.totalProgress=function(ut,At){return arguments.length?this.totalTime(this.totalDuration()*ut,At):this._totalTime/this.totalDuration()||0},St.totalDuration=function(ut){return arguments.length?this._repeat!==-1&&ut?this.timeScale(this.totalDuration()/ut):this:(this._dirty&&(p.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},St.time=function(ut,At){return arguments.length?(this._dirty&&this.totalDuration(),ut>this._duration&&(ut=this._duration),this._yoyo&&1&this._cycle?ut=this._duration-ut+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(ut+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(ut,At)):this._time},St.repeat=function(ut){return arguments.length?(this._repeat=ut,this._uncache(!0)):this._repeat},St.repeatDelay=function(ut){return arguments.length?(this._repeatDelay=ut,this._uncache(!0)):this._repeatDelay},St.yoyo=function(ut){return arguments.length?(this._yoyo=ut,this):this._yoyo},St.currentLabel=function(ut){return arguments.length?this.seek(ut,!0):this.getLabelBefore(this._time+1e-8)},mt},!0),function(){var p=180/Math.PI,Ot=[],$=[],mt=[],ht={},M=$e._gsDefine.globals,yt=function(m,f,O,w){O===w&&(O=w-(w-f)/1e6),m===f&&(f=m+(O-m)/1e6),this.a=m,this.b=f,this.c=O,this.d=w,this.da=w-m,this.ca=O-m,this.ba=f-m},Ct=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",Y=function(m,f,O,w){var X={a:m},b={},F={},Z={c:w},st=(m+f)/2,it=(f+O)/2,Pt=(O+w)/2,Lt=(st+it)/2,Gt=(it+Pt)/2,jt=(Gt-Lt)/8;return X.b=st+(m-st)/4,b.b=Lt+jt,X.c=b.a=(X.b+b.b)/2,b.c=F.a=(Lt+Gt)/2,F.b=Gt-jt,Z.b=Pt+(w-Pt)/4,F.c=Z.a=(F.b+Z.b)/2,[X,b,F,Z]},lt=function(m,f,O,w,X){var b,F,Z,st,it,Pt,Lt,Gt,jt,ie,ct,kt,Me,gi=m.length-1,Rt=0,Fe=m[0].a;for(b=0;gi>b;b++)it=m[Rt],F=it.a,Z=it.d,st=m[Rt+1].d,X?(ct=Ot[b],kt=$[b],Me=(kt+ct)*f*.25/(w?.5:mt[b]||.5),Pt=Z-(Z-F)*(w?.5*f:ct!==0?Me/ct:0),Lt=Z+(st-Z)*(w?.5*f:kt!==0?Me/kt:0),Gt=Z-(Pt+((Lt-Pt)*(3*ct/(ct+kt)+.5)/4||0))):(Pt=Z-(Z-F)*f*.5,Lt=Z+(st-Z)*f*.5,Gt=Z-(Pt+Lt)/2),Pt+=Gt,Lt+=Gt,it.c=jt=Pt,b!==0?it.b=Fe:it.b=Fe=it.a+.6*(it.c-it.a),it.da=Z-F,it.ca=jt-F,it.ba=Fe-F,O?(ie=Y(F,Fe,jt,Z),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]),Rt+=4):Rt++,Fe=Lt;it=m[Rt],it.b=Fe,it.c=Fe+.4*(it.d-Fe),it.da=it.d-it.a,it.ca=it.c-it.a,it.ba=Fe-it.a,O&&(ie=Y(it.a,Fe,it.c,it.d),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]))},St=function(m,f,O,w){var X,b,F,Z,st,it,Pt=[];if(w)for(m=[w].concat(m),b=m.length;--b>-1;)typeof(it=m[b][f])=="string"&&it.charAt(1)==="="&&(m[b][f]=w[f]+Number(it.charAt(0)+it.substr(2)));if(X=m.length-2,0>X)return Pt[0]=new yt(m[0][f],0,0,m[0][f]),Pt;for(b=0;X>b;b++)F=m[b][f],Z=m[b+1][f],Pt[b]=new yt(F,0,0,Z),O&&(st=m[b+2][f],Ot[b]=(Ot[b]||0)+(Z-F)*(Z-F),$[b]=($[b]||0)+(st-Z)*(st-Z));return Pt[b]=new yt(m[b][f],0,0,m[b+1][f]),Pt},ut=function(m,f,O,w,X,b){var F,Z,st,it,Pt,Lt,Gt,jt,ie={},ct=[],kt=b||m[0];X=typeof X=="string"?","+X+",":Ct,f==null&&(f=1);for(Z in m[0])ct.push(Z);if(m.length>1){for(jt=m[m.length-1],Gt=!0,F=ct.length;--F>-1;)if(Z=ct[F],Math.abs(kt[Z]-jt[Z])>.05){Gt=!1;break}Gt&&(m=m.concat(),b&&m.unshift(b),m.push(m[1]),b=m[m.length-3])}for(Ot.length=$.length=mt.length=0,F=ct.length;--F>-1;)Z=ct[F],ht[Z]=X.indexOf(","+Z+",")!==-1,ie[Z]=St(m,Z,ht[Z],b);for(F=Ot.length;--F>-1;)Ot[F]=Math.sqrt(Ot[F]),$[F]=Math.sqrt($[F]);if(!w){for(F=ct.length;--F>-1;)if(ht[Z])for(st=ie[ct[F]],Lt=st.length-1,it=0;Lt>it;it++)Pt=st[it+1].da/$[it]+st[it].da/Ot[it]||0,mt[it]=(mt[it]||0)+Pt*Pt;for(F=mt.length;--F>-1;)mt[F]=Math.sqrt(mt[F])}for(F=ct.length,it=O?4:1;--F>-1;)Z=ct[F],st=ie[Z],lt(st,f,O,w,ht[Z]),Gt&&(st.splice(0,it),st.splice(st.length-it,it));return ie},At=function(m,f,O){f=f||"soft";var w,X,b,F,Z,st,it,Pt,Lt,Gt,jt,ie={},ct=f==="cubic"?3:2,kt=f==="soft",Me=[];if(kt&&O&&(m=[O].concat(m)),m==null||m.length<ct+1)throw"invalid Bezier data";for(Lt in m[0])Me.push(Lt);for(st=Me.length;--st>-1;){for(Lt=Me[st],ie[Lt]=Z=[],Gt=0,Pt=m.length,it=0;Pt>it;it++)w=O==null?m[it][Lt]:typeof(jt=m[it][Lt])=="string"&&jt.charAt(1)==="="?O[Lt]+Number(jt.charAt(0)+jt.substr(2)):Number(jt),kt&&it>1&&Pt-1>it&&(Z[Gt++]=(w+Z[Gt-2])/2),Z[Gt++]=w;for(Pt=Gt-ct+1,Gt=0,it=0;Pt>it;it+=ct)w=Z[it],X=Z[it+1],b=Z[it+2],F=ct===2?0:Z[it+3],Z[Gt++]=jt=ct===3?new yt(w,X,b,F):new yt(w,(2*X+w)/3,(2*X+b)/3,b);Z.length=Gt}return ie},Dt=function(m,f,O){for(var w,X,b,F,Z,st,it,Pt,Lt,Gt,jt,ie=1/O,ct=m.length;--ct>-1;)for(Gt=m[ct],b=Gt.a,F=Gt.d-b,Z=Gt.c-b,st=Gt.b-b,w=X=0,Pt=1;O>=Pt;Pt++)it=ie*Pt,Lt=1-it,w=X-(X=(it*it*F+3*Lt*(it*Z+Lt*st))*it),jt=ct*O+Pt-1,f[jt]=(f[jt]||0)+w*w},_t=function(m,f){f=f>>0||6;var O,w,X,b,F=[],Z=[],st=0,it=0,Pt=f-1,Lt=[],Gt=[];for(O in m)Dt(m[O],F,f);for(X=F.length,w=0;X>w;w++)st+=Math.sqrt(F[w]),b=w%f,Gt[b]=st,b===Pt&&(it+=st,b=w/f>>0,Lt[b]=Gt,Z[b]=it,st=0,Gt=[]);return{length:it,lengths:Z,segments:Lt}},K=$e._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(m,f,O){this._target=m,f instanceof Array&&(f={values:f}),this._func={},this._mod={},this._props=[],this._timeRes=f.timeResolution==null?6:parseInt(f.timeResolution,10);var w,X,b,F,Z,st=f.values||[],it={},Pt=st[0],Lt=f.autoRotate||O.vars.orientToBezier;this._autoRotate=Lt?Lt instanceof Array?Lt:[["x","y","rotation",Lt===!0?0:Number(Lt)||0]]:null;for(w in Pt)this._props.push(w);for(b=this._props.length;--b>-1;)w=this._props[b],this._overwriteProps.push(w),X=this._func[w]=typeof m[w]=="function",it[w]=X?m[w.indexOf("set")||typeof m["get"+w.substr(3)]!="function"?w:"get"+w.substr(3)]():parseFloat(m[w]),Z||it[w]!==st[0][w]&&(Z=it);if(this._beziers=f.type!=="cubic"&&f.type!=="quadratic"&&f.type!=="soft"?ut(st,isNaN(f.curviness)?1:f.curviness,!1,f.type==="thruBasic",f.correlate,Z):At(st,f.type,it),this._segCount=this._beziers[w].length,this._timeRes){var Gt=_t(this._beziers,this._timeRes);this._length=Gt.length,this._lengths=Gt.lengths,this._segments=Gt.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(Lt=this._autoRotate)for(this._initialRotations=[],Lt[0]instanceof Array||(this._autoRotate=Lt=[Lt]),b=Lt.length;--b>-1;){for(F=0;3>F;F++)w=Lt[b][F],this._func[w]=typeof m[w]=="function"?m[w.indexOf("set")||typeof m["get"+w.substr(3)]!="function"?w:"get"+w.substr(3)]:!1;w=Lt[b][2],this._initialRotations[b]=(this._func[w]?this._func[w].call(this._target):this._target[w])||0,this._overwriteProps.push(w)}return this._startRatio=O.vars.runBackwards?1:0,!0},set:function(m){var f,O,w,X,b,F,Z,st,it,Pt,Lt=this._segCount,Gt=this._func,jt=this._target,ie=m!==this._startRatio;if(this._timeRes){if(it=this._lengths,Pt=this._curSeg,m*=this._length,w=this._li,m>this._l2&&Lt-1>w){for(st=Lt-1;st>w&&(this._l2=it[++w])<=m;);this._l1=it[w-1],this._li=w,this._curSeg=Pt=this._segments[w],this._s2=Pt[this._s1=this._si=0]}else if(m<this._l1&&w>0){for(;w>0&&(this._l1=it[--w])>=m;);w===0&&m<this._l1?this._l1=0:w++,this._l2=it[w],this._li=w,this._curSeg=Pt=this._segments[w],this._s1=Pt[(this._si=Pt.length-1)-1]||0,this._s2=Pt[this._si]}if(f=w,m-=this._l1,w=this._si,m>this._s2&&w<Pt.length-1){for(st=Pt.length-1;st>w&&(this._s2=Pt[++w])<=m;);this._s1=Pt[w-1],this._si=w}else if(m<this._s1&&w>0){for(;w>0&&(this._s1=Pt[--w])>=m;);w===0&&m<this._s1?this._s1=0:w++,this._s2=Pt[w],this._si=w}F=(w+(m-this._s1)/(this._s2-this._s1))*this._prec||0}else f=0>m?0:m>=1?Lt-1:Lt*m>>0,F=(m-f*(1/Lt))*Lt;for(O=1-F,w=this._props.length;--w>-1;)X=this._props[w],b=this._beziers[X][f],Z=(F*F*b.da+3*O*(F*b.ca+O*b.ba))*F+b.a,this._mod[X]&&(Z=this._mod[X](Z,jt)),Gt[X]?jt[X](Z):jt[X]=Z;if(this._autoRotate){var ct,kt,Me,gi,Rt,Fe,vi,Ti=this._autoRotate;for(w=Ti.length;--w>-1;)X=Ti[w][2],Fe=Ti[w][3]||0,vi=Ti[w][4]===!0?1:p,b=this._beziers[Ti[w][0]],ct=this._beziers[Ti[w][1]],b&&ct&&(b=b[f],ct=ct[f],kt=b.a+(b.b-b.a)*F,gi=b.b+(b.c-b.b)*F,kt+=(gi-kt)*F,gi+=(b.c+(b.d-b.c)*F-gi)*F,Me=ct.a+(ct.b-ct.a)*F,Rt=ct.b+(ct.c-ct.b)*F,Me+=(Rt-Me)*F,Rt+=(ct.c+(ct.d-ct.c)*F-Rt)*F,Z=ie?Math.atan2(Rt-Me,gi-kt)*vi+Fe:this._initialRotations[w],this._mod[X]&&(Z=this._mod[X](Z,jt)),Gt[X]?jt[X](Z):jt[X]=Z)}}}),H=K.prototype;K.bezierThrough=ut,K.cubicToQuadratic=Y,K._autoCSS=!0,K.quadraticToCubic=function(m,f,O){return new yt(m,(2*f+m)/3,(2*f+O)/3,O)},K._cssRegister=function(){var m=M.CSSPlugin;if(m){var f=m._internals,O=f._parseToProxy,w=f._setPluginRatio,X=f.CSSPropTween;f._registerComplexSpecialProp("bezier",{parser:function(b,F,Z,st,it,Pt){F instanceof Array&&(F={values:F}),Pt=new K;var Lt,Gt,jt,ie=F.values,ct=ie.length-1,kt=[],Me={};if(0>ct)return it;for(Lt=0;ct>=Lt;Lt++)jt=O(b,ie[Lt],st,it,Pt,ct!==Lt),kt[Lt]=jt.end;for(Gt in F)Me[Gt]=F[Gt];return Me.values=kt,it=new X(b,"bezier",0,0,jt.pt,2),it.data=jt,it.plugin=Pt,it.setRatio=w,Me.autoRotate===0&&(Me.autoRotate=!0),!Me.autoRotate||Me.autoRotate instanceof Array||(Lt=Me.autoRotate===!0?0:Number(Me.autoRotate),Me.autoRotate=jt.end.left!=null?[["left","top","rotation",Lt,!1]]:jt.end.x!=null?[["x","y","rotation",Lt,!1]]:!1),Me.autoRotate&&(st._transform||st._enableTransforms(!1),jt.autoRotate=st._target._gsTransform,jt.proxy.rotation=jt.autoRotate.rotation||0,st._overwriteProps.push("rotation")),Pt._onInitTween(jt.proxy,Me,st._tween),it}})}},H._mod=function(m){for(var f,O=this._overwriteProps,w=O.length;--w>-1;)f=m[O[w]],f&&typeof f=="function"&&(this._mod[O[w]]=f)},H._kill=function(m){var f,O,w=this._props;for(f in this._beziers)if(f in m)for(delete this._beziers[f],delete this._func[f],O=w.length;--O>-1;)w[O]===f&&w.splice(O,1);if(w=this._autoRotate)for(O=w.length;--O>-1;)m[w[O][2]]&&w.splice(O,1);return this._super._kill.call(this,m)}}(),$e._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(p,Ot){var $,mt,ht,M,yt=function(){p.call(this,"css"),this._overwriteProps.length=0,this.setRatio=yt.prototype.setRatio},Ct=$e._gsDefine.globals,Y={},lt=yt.prototype=new p("css");lt.constructor=yt,yt.version="2.0.2",yt.API=2,yt.defaultTransformPerspective=0,yt.defaultSkewType="compensated",yt.defaultSmoothOrigin=!0,lt="px",yt.suffixMap={top:lt,right:lt,bottom:lt,left:lt,width:lt,height:lt,fontSize:lt,padding:lt,margin:lt,perspective:lt,lineHeight:""};var St,ut,At,Dt,_t,K,H,m,f=/(?:\-|\.|\b)(\d|\.|e\-)+/g,O=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,w=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,X=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,b=/(?:\d|\-|\+|=|#|\.)*/g,F=/opacity *= *([^)]*)/i,Z=/opacity:([^;]*)/i,st=/alpha\(opacity *=.+?\)/i,it=/^(rgb|hsl)/,Pt=/([A-Z])/g,Lt=/-([a-z])/gi,Gt=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,jt=function(v,E){return E.toUpperCase()},ie=/(?:Left|Right|Width)/i,ct=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,kt=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,Me=/,(?=[^\)]*(?:\(|$))/gi,gi=/[\s,\(]/i,Rt=Math.PI/180,Fe=180/Math.PI,vi={},Ti={style:{}},oi=$e.document||{createElement:function(){return Ti}},fe=function(v,E){return oi.createElementNS?oi.createElementNS(E||"http://www.w3.org/1999/xhtml",v):oi.createElement(v)},Je=fe("div"),Ri=fe("img"),be=yt._internals={_specialProps:Y},Ve=($e.navigator||{}).userAgent||"",Ke=function(){var v=Ve.indexOf("Android"),E=fe("a");return At=Ve.indexOf("Safari")!==-1&&Ve.indexOf("Chrome")===-1&&(v===-1||parseFloat(Ve.substr(v+8,2))>3),_t=At&&parseFloat(Ve.substr(Ve.indexOf("Version/")+8,2))<6,Dt=Ve.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Ve)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Ve))&&(K=parseFloat(RegExp.$1)),E?(E.style.cssText="top:1px;opacity:.55;",/^0.55/.test(E.style.opacity)):!1}(),Mn=function(v){return F.test(typeof v=="string"?v:(v.currentStyle?v.currentStyle.filter:v.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Cn=function(v){$e.console&&console.log(v)},ji="",Ii="",en=function(v,E){E=E||Je;var R,L,y=E.style;if(y[v]!==void 0)return v;for(v=v.charAt(0).toUpperCase()+v.substr(1),R=["O","Moz","ms","Ms","Webkit"],L=5;--L>-1&&y[R[L]+v]===void 0;);return L>=0?(Ii=L===3?"ms":R[L],ji="-"+Ii.toLowerCase()+"-",Ii+v):null},ci=(typeof window<"u"?window:oi.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Oe=yt.getStyle=function(v,E,R,L,y){var W;return Ke||E!=="opacity"?(!L&&v.style[E]?W=v.style[E]:(R=R||ci(v))?W=R[E]||R.getPropertyValue(E)||R.getPropertyValue(E.replace(Pt,"-$1").toLowerCase()):v.currentStyle&&(W=v.currentStyle[E]),y==null||W&&W!=="none"&&W!=="auto"&&W!=="auto auto"?W:y):Mn(v)},Si=be.convertToPixels=function(v,E,R,L,y){if(L==="px"||!L&&E!=="lineHeight")return R;if(L==="auto"||!R)return 0;var W,C,Q,rt=ie.test(E),et=v,j=Je.style,Mt=0>R,Tt=R===1;if(Mt&&(R=-R),Tt&&(R*=100),E!=="lineHeight"||L)if(L==="%"&&E.indexOf("border")!==-1)W=R/100*(rt?v.clientWidth:v.clientHeight);else{if(j.cssText="border:0 solid red;position:"+Oe(v,"position")+";line-height:0;",L!=="%"&&et.appendChild&&L.charAt(0)!=="v"&&L!=="rem")j[rt?"borderLeftWidth":"borderTopWidth"]=R+L;else{if(et=v.parentNode||oi.body,Oe(et,"display").indexOf("flex")!==-1&&(j.position="absolute"),C=et._gsCache,Q=Ot.ticker.frame,C&&rt&&C.time===Q)return C.width*R/100;j[rt?"width":"height"]=R+L}et.appendChild(Je),W=parseFloat(Je[rt?"offsetWidth":"offsetHeight"]),et.removeChild(Je),rt&&L==="%"&&yt.cacheWidths!==!1&&(C=et._gsCache=et._gsCache||{},C.time=Q,C.width=W/R*100),W!==0||y||(W=Si(v,E,R,L,!0))}else C=ci(v).lineHeight,v.style.lineHeight=R,W=parseFloat(ci(v).lineHeight),v.style.lineHeight=C;return Tt&&(W/=100),Mt?-W:W},Tn=be.calculateOffset=function(v,E,R){if(Oe(v,"position",R)!=="absolute")return 0;var L=E==="left"?"Left":"Top",y=Oe(v,"margin"+L,R);return v["offset"+L]-(Si(v,E,parseFloat(y),y.replace(b,""))||0)},nn=function(v,E){var R,L,y,W={};if(E=E||ci(v,null))if(R=E.length)for(;--R>-1;)y=E[R],(y.indexOf("-transform")===-1||zr===y)&&(W[y.replace(Lt,jt)]=E.getPropertyValue(y));else for(R in E)(R.indexOf("Transform")===-1||ui===R)&&(W[R]=E[R]);else if(E=v.currentStyle||v.style)for(R in E)typeof R=="string"&&W[R]===void 0&&(W[R.replace(Lt,jt)]=E[R]);return Ke||(W.opacity=Mn(v)),L=sn(v,E,!1),W.rotation=L.rotation,W.skewX=L.skewX,W.scaleX=L.scaleX,W.scaleY=L.scaleY,W.x=L.x,W.y=L.y,Gi&&(W.z=L.z,W.rotationX=L.rotationX,W.rotationY=L.rotationY,W.scaleZ=L.scaleZ),W.filters&&delete W.filters,W},Ci=function(v,E,R,L,y){var W,C,Q,rt={},et=v.style;for(C in R)C!=="cssText"&&C!=="length"&&isNaN(C)&&(E[C]!==(W=R[C])||y&&y[C])&&C.indexOf("Origin")===-1&&(typeof W=="number"||typeof W=="string")&&(rt[C]=W!=="auto"||C!=="left"&&C!=="top"?W!==""&&W!=="auto"&&W!=="none"||typeof E[C]!="string"||E[C].replace(X,"")===""?W:0:Tn(v,C),et[C]!==void 0&&(Q=new Ce(et,C,et[C],Q)));if(L)for(C in L)C!=="className"&&(rt[C]=L[C]);return{difs:rt,firstMPT:Q}},_={width:["Left","Right"],height:["Top","Bottom"]},D=["marginLeft","marginRight","marginTop","marginBottom"],B=function(v,E,R){if((v.nodeName+"").toLowerCase()==="svg")return(R||ci(v))[E]||0;if(v.getCTM&&Br(v))return v.getBBox()[E]||0;var L=parseFloat(E==="width"?v.offsetWidth:v.offsetHeight),y=_[E],W=y.length;for(R=R||ci(v,null);--W>-1;)L-=parseFloat(Oe(v,"padding"+y[W],R,!0))||0,L-=parseFloat(Oe(v,"border"+y[W]+"Width",R,!0))||0;return L},U=function(v,E){if(v==="contain"||v==="auto"||v==="auto auto")return v+" ";(v==null||v==="")&&(v="0 0");var R,L=v.split(" "),y=v.indexOf("left")!==-1?"0%":v.indexOf("right")!==-1?"100%":L[0],W=v.indexOf("top")!==-1?"0%":v.indexOf("bottom")!==-1?"100%":L[1];if(L.length>3&&!E){for(L=v.split(", ").join(",").split(","),v=[],R=0;R<L.length;R++)v.push(U(L[R]));return v.join(",")}return W==null?W=y==="center"?"50%":"0":W==="center"&&(W="50%"),(y==="center"||isNaN(parseFloat(y))&&(y+"").indexOf("=")===-1)&&(y="50%"),v=y+" "+W+(L.length>2?" "+L[2]:""),E&&(E.oxp=y.indexOf("%")!==-1,E.oyp=W.indexOf("%")!==-1,E.oxr=y.charAt(1)==="=",E.oyr=W.charAt(1)==="=",E.ox=parseFloat(y.replace(X,"")),E.oy=parseFloat(W.replace(X,"")),E.v=v),E||v},J=function(v,E){return typeof v=="function"&&(v=v(m,H)),typeof v=="string"&&v.charAt(1)==="="?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2)):parseFloat(v)-parseFloat(E)||0},dt=function(v,E){typeof v=="function"&&(v=v(m,H));var R=typeof v=="string"&&v.charAt(1)==="=";return typeof v=="string"&&v.charAt(v.length-2)==="v"&&(v=(R?v.substr(0,2):0)+window["inner"+(v.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(R?v.substr(2):v)/100)),v==null?E:R?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2))+E:parseFloat(v)||0},wt=function(v,E,R,L){var y,W,C,Q,rt,et=1e-6;return typeof v=="function"&&(v=v(m,H)),v==null?Q=E:typeof v=="number"?Q=v:(y=360,W=v.split("_"),rt=v.charAt(1)==="=",C=(rt?parseInt(v.charAt(0)+"1",10)*parseFloat(W[0].substr(2)):parseFloat(W[0]))*(v.indexOf("rad")===-1?1:Fe)-(rt?0:E),W.length&&(L&&(L[R]=E+C),v.indexOf("short")!==-1&&(C%=y,C!==C%(y/2)&&(C=0>C?C+y:C-y)),v.indexOf("_cw")!==-1&&0>C?C=(C+9999999999*y)%y-(C/y|0)*y:v.indexOf("ccw")!==-1&&C>0&&(C=(C-9999999999*y)%y-(C/y|0)*y)),Q=E+C),et>Q&&Q>-et&&(Q=0),Q},pt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ae=function(v,E,R){return v=0>v?v+1:v>1?v-1:v,255*(1>6*v?E+(R-E)*v*6:.5>v?R:2>3*v?E+(R-E)*(2/3-v)*6:E)+.5|0},se=yt.parseColor=function(v,E){var R,L,y,W,C,Q,rt,et,j,Mt,Tt;if(v)if(typeof v=="number")R=[v>>16,v>>8&255,255&v];else{if(v.charAt(v.length-1)===","&&(v=v.substr(0,v.length-1)),pt[v])R=pt[v];else if(v.charAt(0)==="#")v.length===4&&(L=v.charAt(1),y=v.charAt(2),W=v.charAt(3),v="#"+L+L+y+y+W+W),v=parseInt(v.substr(1),16),R=[v>>16,v>>8&255,255&v];else if(v.substr(0,3)==="hsl")if(R=Tt=v.match(f),E){if(v.indexOf("=")!==-1)return v.match(O)}else C=Number(R[0])%360/360,Q=Number(R[1])/100,rt=Number(R[2])/100,y=.5>=rt?rt*(Q+1):rt+Q-rt*Q,L=2*rt-y,R.length>3&&(R[3]=Number(R[3])),R[0]=ae(C+1/3,L,y),R[1]=ae(C,L,y),R[2]=ae(C-1/3,L,y);else R=v.match(f)||pt.transparent;R[0]=Number(R[0]),R[1]=Number(R[1]),R[2]=Number(R[2]),R.length>3&&(R[3]=Number(R[3]))}else R=pt.black;return E&&!Tt&&(L=R[0]/255,y=R[1]/255,W=R[2]/255,et=Math.max(L,y,W),j=Math.min(L,y,W),rt=(et+j)/2,et===j?C=Q=0:(Mt=et-j,Q=rt>.5?Mt/(2-et-j):Mt/(et+j),C=et===L?(y-W)/Mt+(W>y?6:0):et===y?(W-L)/Mt+2:(L-y)/Mt+4,C*=60),R[0]=C+.5|0,R[1]=100*Q+.5|0,R[2]=100*rt+.5|0),R},Ut=function(v,E){var R,L,y,W=v.match(he)||[],C=0,Q="";if(!W.length)return v;for(R=0;R<W.length;R++)L=W[R],y=v.substr(C,v.indexOf(L,C)-C),C+=y.length+L.length,L=se(L,E),L.length===3&&L.push(1),Q+=y+(E?"hsla("+L[0]+","+L[1]+"%,"+L[2]+"%,"+L[3]:"rgba("+L.join(","))+")";return Q+v.substr(C)},he="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(lt in pt)he+="|"+lt+"\\b";he=new RegExp(he+")","gi"),yt.colorStringFilter=function(v){var E,R=v[0]+" "+v[1];he.test(R)&&(E=R.indexOf("hsl(")!==-1||R.indexOf("hsla(")!==-1,v[0]=Ut(v[0],E),v[1]=Ut(v[1],E)),he.lastIndex=0},Ot.defaultStringFilter||(Ot.defaultStringFilter=yt.colorStringFilter);var ze=function(v,E,R,L){if(v==null)return function(Tt){return Tt};var y,W=E?(v.match(he)||[""])[0]:"",C=v.split(W).join("").match(w)||[],Q=v.substr(0,v.indexOf(C[0])),rt=v.charAt(v.length-1)===")"?")":"",et=v.indexOf(" ")!==-1?" ":",",j=C.length,Mt=j>0?C[0].replace(f,""):"";return j?y=E?function(Tt){var gt,Nt,Et,oe;if(typeof Tt=="number")Tt+=Mt;else if(L&&Me.test(Tt)){for(oe=Tt.replace(Me,"|").split("|"),Et=0;Et<oe.length;Et++)oe[Et]=y(oe[Et]);return oe.join(",")}if(gt=(Tt.match(he)||[W])[0],Nt=Tt.split(gt).join("").match(w)||[],Et=Nt.length,j>Et--)for(;++Et<j;)Nt[Et]=R?Nt[(Et-1)/2|0]:C[Et];return Q+Nt.join(et)+et+gt+rt+(Tt.indexOf("inset")!==-1?" inset":"")}:function(Tt){var gt,Nt,Et;if(typeof Tt=="number")Tt+=Mt;else if(L&&Me.test(Tt)){for(Nt=Tt.replace(Me,"|").split("|"),Et=0;Et<Nt.length;Et++)Nt[Et]=y(Nt[Et]);return Nt.join(",")}if(gt=Tt.match(w)||[],Et=gt.length,j>Et--)for(;++Et<j;)gt[Et]=R?gt[(Et-1)/2|0]:C[Et];return Q+gt.join(et)+rt}:function(Tt){return Tt}},Xe=function(v){return v=v.split(","),function(E,R,L,y,W,C,Q){var rt,et=(R+"").split(" ");for(Q={},rt=0;4>rt;rt++)Q[v[rt]]=et[rt]=et[rt]||et[(rt-1)/2>>0];return y.parse(E,Q,W,C)}},Ce=(be._setPluginRatio=function(v){this.plugin.setRatio(v);for(var E,R,L,y,W,C=this.data,Q=C.proxy,rt=C.firstMPT,et=1e-6;rt;)E=Q[rt.v],rt.r?E=rt.r(E):et>E&&E>-et&&(E=0),rt.t[rt.p]=E,rt=rt._next;if(C.autoRotate&&(C.autoRotate.rotation=C.mod?C.mod.call(this._tween,Q.rotation,this.t,this._tween):Q.rotation),v===1||v===0)for(rt=C.firstMPT,W=v===1?"e":"b";rt;){if(R=rt.t,R.type){if(R.type===1){for(y=R.xs0+R.s+R.xs1,L=1;L<R.l;L++)y+=R["xn"+L]+R["xs"+(L+1)];R[W]=y}}else R[W]=R.s+R.xs0;rt=rt._next}},function(v,E,R,L,y){this.t=v,this.p=E,this.v=R,this.r=y,L&&(L._prev=this,this._next=L)}),je=(be._parseToProxy=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt=L,Tt={},gt={},Nt=R._transform,Et=vi;for(R._transform=null,vi=E,L=j=R.parse(v,E,L,y),vi=Et,W&&(R._transform=Nt,Mt&&(Mt._prev=null,Mt._prev&&(Mt._prev._next=null)));L&&L!==Mt;){if(L.type<=1&&(Q=L.p,gt[Q]=L.s+L.c,Tt[Q]=L.s,W||(et=new Ce(L,"s",Q,et,L.r),L.c=0),L.type===1))for(C=L.l;--C>0;)rt="xn"+C,Q=L.p+"_"+rt,gt[Q]=L.data[rt],Tt[Q]=L[rt],W||(et=new Ce(L,rt,Q,et,L.rxp[rt]));L=L._next}return{proxy:Tt,end:gt,firstMPT:et,pt:j}},be.CSSPropTween=function(v,E,R,L,y,W,C,Q,rt,et,j){this.t=v,this.p=E,this.s=R,this.c=L,this.n=C||E,v instanceof je||M.push(this.n),this.r=Q&&(typeof Q=="function"?Q:Math.round),this.type=W||0,rt&&(this.pr=rt,$=!0),this.b=et===void 0?R:et,this.e=j===void 0?R+L:j,y&&(this._next=y,y._prev=this)}),gn=function(v,E,R,L,y,W){var C=new je(v,E,R,L-R,y,-1,W);return C.b=R,C.e=C.xs0=L,C},Wi=yt.parseComplex=function(v,E,R,L,y,W,C,Q,rt,et){R=R||W||"",typeof L=="function"&&(L=L(m,H)),C=new je(v,E,0,0,C,et?2:1,null,!1,Q,R,L),L+="",y&&he.test(L+R)&&(L=[R,L],yt.colorStringFilter(L),R=L[0],L=L[1]);var j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt,Le=R.split(", ").join(",").split(" "),Zt=L.split(", ").join(",").split(" "),Ft=Le.length,Jt=St!==!1;for((L.indexOf(",")!==-1||R.indexOf(",")!==-1)&&((L+R).indexOf("rgb")!==-1||(L+R).indexOf("hsl")!==-1?(Le=Le.join(" ").replace(Me,", ").split(" "),Zt=Zt.join(" ").replace(Me,", ").split(" ")):(Le=Le.join(" ").split(",").join(", ").split(" "),Zt=Zt.join(" ").split(",").join(", ").split(" ")),Ft=Le.length),Ft!==Zt.length&&(Le=(W||"").split(" "),Ft=Le.length),C.plugin=rt,C.setRatio=et,he.lastIndex=0,j=0;Ft>j;j++)if(gt=Le[j],Nt=Zt[j]+"",ne=parseFloat(gt),ne||ne===0)C.appendXtra("",ne,J(Nt,ne),Nt.replace(O,""),Jt&&Nt.indexOf("px")!==-1?Math.round:!1,!0);else if(y&&he.test(gt))te=Nt.indexOf(")")+1,te=")"+(te?Nt.substr(te):""),bt=Nt.indexOf("hsl")!==-1&&Ke,Kt=Nt,gt=se(gt,bt),Nt=se(Nt,bt),Pe=gt.length+Nt.length>6,Pe&&!Ke&&Nt[3]===0?(C["xs"+C.l]+=C.l?" transparent":"transparent",C.e=C.e.split(Zt[j]).join("transparent")):(Ke||(Pe=!1),bt?C.appendXtra(Kt.substr(0,Kt.indexOf("hsl"))+(Pe?"hsla(":"hsl("),gt[0],J(Nt[0],gt[0]),",",!1,!0).appendXtra("",gt[1],J(Nt[1],gt[1]),"%,",!1).appendXtra("",gt[2],J(Nt[2],gt[2]),Pe?"%,":"%"+te,!1):C.appendXtra(Kt.substr(0,Kt.indexOf("rgb"))+(Pe?"rgba(":"rgb("),gt[0],Nt[0]-gt[0],",",Math.round,!0).appendXtra("",gt[1],Nt[1]-gt[1],",",Math.round).appendXtra("",gt[2],Nt[2]-gt[2],Pe?",":te,Math.round),Pe&&(gt=gt.length<4?1:gt[3],C.appendXtra("",gt,(Nt.length<4?1:Nt[3])-gt,te,!1))),he.lastIndex=0;else if(Et=gt.match(f)){if(oe=Nt.match(O),!oe||oe.length!==Et.length)return C;for(Tt=0,Mt=0;Mt<Et.length;Mt++)Bt=Et[Mt],Kt=gt.indexOf(Bt,Tt),C.appendXtra(gt.substr(Tt,Kt-Tt),Number(Bt),J(oe[Mt],Bt),"",Jt&>.substr(Kt+Bt.length,2)==="px"?Math.round:!1,Mt===0),Tt=Kt+Bt.length;C["xs"+C.l]+=gt.substr(Tt)}else C["xs"+C.l]+=C.l||C["xs"+C.l]?" "+Nt:Nt;if(L.indexOf("=")!==-1&&C.data){for(te=C.xs0+C.data.s,j=1;j<C.l;j++)te+=C["xs"+j]+C.data["xn"+j];C.e=te+C["xs"+j]}return C.l||(C.type=-1,C.xs0=C.e),C.xfirst||C},si=9;for(lt=je.prototype,lt.l=lt.pr=0;--si>0;)lt["xn"+si]=0,lt["xs"+si]="";lt.xs0="",lt._next=lt._prev=lt.xfirst=lt.data=lt.plugin=lt.setRatio=lt.rxp=null,lt.appendXtra=function(v,E,R,L,y,W){var C=this,Q=C.l;return C["xs"+Q]+=W&&(Q||C["xs"+Q])?" "+v:v||"",R||Q===0||C.plugin?(C.l++,C.type=C.setRatio?2:1,C["xs"+C.l]=L||"",Q>0?(C.data["xn"+Q]=E+R,C.rxp["xn"+Q]=y,C["xn"+Q]=E,C.plugin||(C.xfirst=new je(C,"xn"+Q,E,R,C.xfirst||C,0,C.n,y,C.pr),C.xfirst.xs0=0),C):(C.data={s:E+R},C.rxp={},C.s=E,C.c=R,C.r=y,C)):(C["xs"+Q]+=E+(L||""),C)};var Dr=function(v,E){E=E||{},this.p=E.prefix&&en(v)||v,Y[v]=Y[this.p]=this,this.format=E.formatter||ze(E.defaultValue,E.color,E.collapsible,E.multi),E.parser&&(this.parse=E.parser),this.clrs=E.color,this.multi=E.multi,this.keyword=E.keyword,this.dflt=E.defaultValue,this.pr=E.priority||0},Qe=be._registerComplexSpecialProp=function(v,E,R){typeof E!="object"&&(E={parser:R});var L,y=v.split(","),W=E.defaultValue;for(R=R||[W],L=0;L<y.length;L++)E.prefix=L===0&&E.prefix,E.defaultValue=R[L]||W,new Dr(y[L],E)},Ko=be._registerPluginProp=function(v){if(!Y[v]){var E=v.charAt(0).toUpperCase()+v.substr(1)+"Plugin";Qe(v,{parser:function(R,L,y,W,C,Q,rt){var et=Ct.com.greensock.plugins[E];return et?(et._cssRegister(),Y[y].parse(R,L,y,W,C,Q,rt)):(Cn("Error: "+E+" js file not loaded."),C)}})}};lt=Dr.prototype,lt.parseComplex=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt=this.keyword;if(this.multi&&(Me.test(R)||Me.test(E)?(Q=E.replace(Me,"|").split("|"),rt=R.replace(Me,"|").split("|")):Tt&&(Q=[E],rt=[R])),rt){for(et=rt.length>Q.length?rt.length:Q.length,C=0;et>C;C++)E=Q[C]=Q[C]||this.dflt,R=rt[C]=rt[C]||this.dflt,Tt&&(j=E.indexOf(Tt),Mt=R.indexOf(Tt),j!==Mt&&(Mt===-1?Q[C]=Q[C].split(Tt).join(""):j===-1&&(Q[C]+=" "+Tt)));E=Q.join(", "),R=rt.join(", ")}return Wi(v,this.p,E,R,this.clrs,this.dflt,L,this.pr,y,W)},lt.parse=function(v,E,R,L,y,W,C){return this.parseComplex(v.style,this.format(Oe(v,this.p,ht,!1,this.dflt)),this.format(E),y,W)},yt.registerSpecialProp=function(v,E,R){Qe(v,{parser:function(L,y,W,C,Q,rt,et){var j=new je(L,W,0,0,Q,2,W,!1,R);return j.plugin=rt,j.setRatio=E(L,y,C._tween,W),j},priority:R})},yt.useSVGTransformAttr=!0;var rn,Mo="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),ui=en("transform"),zr=ji+"transform",bn=en("transformOrigin"),Gi=en("perspective")!==null,Kn=be.Transform=function(){this.perspective=parseFloat(yt.defaultTransformPerspective)||0,this.force3D=yt.defaultForce3D!==!1&&Gi?yt.defaultForce3D||"auto":!1},ts=$e.SVGElement,To=function(v,E,R){var L,y=oi.createElementNS("http://www.w3.org/2000/svg",v),W=/([a-z])([A-Z])/g;for(L in R)y.setAttributeNS(null,L.replace(W,"$1-$2").toLowerCase(),R[L]);return E.appendChild(y),y},Sn=oi.documentElement||{},es=function(){var v,E,R,L=K||/Android/i.test(Ve)&&!$e.chrome;return oi.createElementNS&&!L&&(v=To("svg",Sn),E=To("rect",v,{width:100,height:50,x:100}),R=E.getBoundingClientRect().width,E.style[bn]="50% 50%",E.style[ui]="scaleX(0.5)",L=R===E.getBoundingClientRect().width&&!(Dt&&Gi),Sn.removeChild(v)),L}(),tr=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt=v._gsTransform,te=ir(v,!0);Bt&&(Pe=Bt.xOrigin,Kt=Bt.yOrigin),(!L||(C=L.split(" ")).length<2)&&(Tt=v.getBBox(),Tt.x===0&&Tt.y===0&&Tt.width+Tt.height===0&&(Tt={x:parseFloat(v.hasAttribute("x")?v.getAttribute("x"):v.hasAttribute("cx")?v.getAttribute("cx"):0)||0,y:parseFloat(v.hasAttribute("y")?v.getAttribute("y"):v.hasAttribute("cy")?v.getAttribute("cy"):0)||0,width:0,height:0}),E=U(E).split(" "),C=[(E[0].indexOf("%")!==-1?parseFloat(E[0])/100*Tt.width:parseFloat(E[0]))+Tt.x,(E[1].indexOf("%")!==-1?parseFloat(E[1])/100*Tt.height:parseFloat(E[1]))+Tt.y]),R.xOrigin=et=parseFloat(C[0]),R.yOrigin=j=parseFloat(C[1]),L&&te!==er&&(Mt=te[0],Tt=te[1],gt=te[2],Nt=te[3],Et=te[4],oe=te[5],ne=Mt*Nt-Tt*gt,ne&&(Q=et*(Nt/ne)+j*(-gt/ne)+(gt*oe-Nt*Et)/ne,rt=et*(-Tt/ne)+j*(Mt/ne)-(Mt*oe-Tt*Et)/ne,et=R.xOrigin=C[0]=Q,j=R.yOrigin=C[1]=rt)),Bt&&(W&&(R.xOffset=Bt.xOffset,R.yOffset=Bt.yOffset,Bt=R),y||y!==!1&&yt.defaultSmoothOrigin!==!1?(Q=et-Pe,rt=j-Kt,Bt.xOffset+=Q*te[0]+rt*te[2]-Q,Bt.yOffset+=Q*te[1]+rt*te[3]-rt):Bt.xOffset=Bt.yOffset=0),W||v.setAttribute("data-svg-origin",C.join(" "))},Nr=function(v){var E,R=fe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),L=this.parentNode,y=this.nextSibling,W=this.style.cssText;if(Sn.appendChild(R),R.appendChild(this),this.style.display="block",v)try{E=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Nr}catch{}else this._originalGetBBox&&(E=this._originalGetBBox());return y?L.insertBefore(this,y):L.appendChild(this),Sn.removeChild(R),this.style.cssText=W,E},on=function(v){try{return v.getBBox()}catch{return Nr.call(v,!0)}},Br=function(v){return!(!ts||!v.getCTM||v.parentNode&&!v.ownerSVGElement||!on(v))},er=[1,0,0,1,0,0],ir=function(v,E){var R,L,y,W,C,Q,rt=v._gsTransform||new Kn,et=1e5,j=v.style;if(ui?L=Oe(v,zr,null,!0):v.currentStyle&&(L=v.currentStyle.filter.match(ct),L=L&&L.length===4?[L[0].substr(4),Number(L[2].substr(4)),Number(L[1].substr(4)),L[3].substr(4),rt.x||0,rt.y||0].join(","):""),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",!ui||!(Q=!ci(v)||ci(v).display==="none")&&v.parentNode||(Q&&(W=j.display,j.display="block"),v.parentNode||(C=1,Sn.appendChild(v)),L=Oe(v,zr,null,!0),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",W?j.display=W:Q&&On(j,"display"),C&&Sn.removeChild(v)),(rt.svg||v.getCTM&&Br(v))&&(R&&(j[ui]+"").indexOf("matrix")!==-1&&(L=j[ui],R=0),y=v.getAttribute("transform"),R&&y&&(y=v.transform.baseVal.consolidate().matrix,L="matrix("+y.a+","+y.b+","+y.c+","+y.d+","+y.e+","+y.f+")",R=0)),R)return er;for(y=(L||"").match(f)||[],si=y.length;--si>-1;)W=Number(y[si]),y[si]=(C=W-(W|=0))?(C*et+(0>C?-.5:.5)|0)/et+W:W;return E&&y.length>6?[y[0],y[1],y[4],y[5],y[12],y[13]]:y},sn=be.getTransform=function(v,E,R,L){if(v._gsTransform&&R&&!L)return v._gsTransform;var y,W,C,Q,rt,et,j=R?v._gsTransform||new Kn:new Kn,Mt=j.scaleX<0,Tt=2e-5,gt=1e5,Nt=Gi&&(parseFloat(Oe(v,bn,E,!1,"0 0 0").split(" ")[2])||j.zOrigin)||0,Et=parseFloat(yt.defaultTransformPerspective)||0;if(j.svg=!(!v.getCTM||!Br(v)),j.svg&&(tr(v,Oe(v,bn,E,!1,"50% 50%")+"",j,v.getAttribute("data-svg-origin")),rn=yt.useSVGTransformAttr||es),y=ir(v),y!==er){if(y.length===16){var oe,ne,Pe,Kt,Bt,te=y[0],bt=y[1],Le=y[2],Zt=y[3],Ft=y[4],Jt=y[5],yi=y[6],qi=y[7],Ge=y[8],He=y[9],We=y[10],ei=y[12],ii=y[13],ai=y[14],hi=y[11],ke=Math.atan2(yi,We);j.zOrigin&&(ai=-j.zOrigin,ei=Ge*ai-y[12],ii=He*ai-y[13],ai=We*ai+j.zOrigin-y[14]),j.rotationX=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=Ft*Kt+Ge*Bt,ne=Jt*Kt+He*Bt,Pe=yi*Kt+We*Bt,Ge=Ft*-Bt+Ge*Kt,He=Jt*-Bt+He*Kt,We=yi*-Bt+We*Kt,hi=qi*-Bt+hi*Kt,Ft=oe,Jt=ne,yi=Pe),ke=Math.atan2(-Le,We),j.rotationY=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=te*Kt-Ge*Bt,ne=bt*Kt-He*Bt,Pe=Le*Kt-We*Bt,He=bt*Bt+He*Kt,We=Le*Bt+We*Kt,hi=Zt*Bt+hi*Kt,te=oe,bt=ne,Le=Pe),ke=Math.atan2(bt,te),j.rotation=ke*Fe,ke&&(Kt=Math.cos(ke),Bt=Math.sin(ke),oe=te*Kt+bt*Bt,ne=Ft*Kt+Jt*Bt,Pe=Ge*Kt+He*Bt,bt=bt*Kt-te*Bt,Jt=Jt*Kt-Ft*Bt,He=He*Kt-Ge*Bt,te=oe,Ft=ne,Ge=Pe),j.rotationX&&Math.abs(j.rotationX)+Math.abs(j.rotation)>359.9&&(j.rotationX=j.rotation=0,j.rotationY=180-j.rotationY),ke=Math.atan2(Ft,Jt),j.scaleX=(Math.sqrt(te*te+bt*bt+Le*Le)*gt+.5|0)/gt,j.scaleY=(Math.sqrt(Jt*Jt+yi*yi)*gt+.5|0)/gt,j.scaleZ=(Math.sqrt(Ge*Ge+He*He+We*We)*gt+.5|0)/gt,te/=j.scaleX,Ft/=j.scaleY,bt/=j.scaleX,Jt/=j.scaleY,Math.abs(ke)>Tt?(j.skewX=ke*Fe,Ft=0,j.skewType!=="simple"&&(j.scaleY*=1/Math.cos(ke))):j.skewX=0,j.perspective=hi?1/(0>hi?-hi:hi):0,j.x=ei,j.y=ii,j.z=ai,j.svg&&(j.x-=j.xOrigin-(j.xOrigin*te-j.yOrigin*Ft),j.y-=j.yOrigin-(j.yOrigin*bt-j.xOrigin*Jt))}else if(!Gi||L||!y.length||j.x!==y[4]||j.y!==y[5]||!j.rotationX&&!j.rotationY){var Ne=y.length>=6,qe=Ne?y[0]:1,Re=y[1]||0,an=y[2]||0,xi=Ne?y[3]:1;j.x=y[4]||0,j.y=y[5]||0,C=Math.sqrt(qe*qe+Re*Re),Q=Math.sqrt(xi*xi+an*an),rt=qe||Re?Math.atan2(Re,qe)*Fe:j.rotation||0,et=an||xi?Math.atan2(an,xi)*Fe+rt:j.skewX||0,j.scaleX=C,j.scaleY=Q,j.rotation=rt,j.skewX=et,Gi&&(j.rotationX=j.rotationY=j.z=0,j.perspective=Et,j.scaleZ=1),j.svg&&(j.x-=j.xOrigin-(j.xOrigin*qe+j.yOrigin*an),j.y-=j.yOrigin-(j.xOrigin*Re+j.yOrigin*xi))}Math.abs(j.skewX)>90&&Math.abs(j.skewX)<270&&(Mt?(j.scaleX*=-1,j.skewX+=j.rotation<=0?180:-180,j.rotation+=j.rotation<=0?180:-180):(j.scaleY*=-1,j.skewX+=j.skewX<=0?180:-180)),j.zOrigin=Nt;for(W in j)j[W]<Tt&&j[W]>-Tt&&(j[W]=0)}return R&&(v._gsTransform=j,j.svg&&(rn&&v.style[ui]?Ot.delayedCall(.001,function(){On(v.style,ui)}):!rn&&v.getAttribute("transform")&&Ot.delayedCall(.001,function(){v.removeAttribute("transform")}))),j},is=function(v){var E,R,L=this.data,y=-L.rotation*Rt,W=y+L.skewX*Rt,C=1e5,Q=(Math.cos(y)*L.scaleX*C|0)/C,rt=(Math.sin(y)*L.scaleX*C|0)/C,et=(Math.sin(W)*-L.scaleY*C|0)/C,j=(Math.cos(W)*L.scaleY*C|0)/C,Mt=this.t.style,Tt=this.t.currentStyle;if(Tt){R=rt,rt=-et,et=-R,E=Tt.filter,Mt.filter="";var gt,Nt,Et=this.t.offsetWidth,oe=this.t.offsetHeight,ne=Tt.position!=="absolute",Pe="progid:DXImageTransform.Microsoft.Matrix(M11="+Q+", M12="+rt+", M21="+et+", M22="+j,Kt=L.x+Et*L.xPercent/100,Bt=L.y+oe*L.yPercent/100;if(L.ox!=null&&(gt=(L.oxp?Et*L.ox*.01:L.ox)-Et/2,Nt=(L.oyp?oe*L.oy*.01:L.oy)-oe/2,Kt+=gt-(gt*Q+Nt*rt),Bt+=Nt-(gt*et+Nt*j)),ne?(gt=Et/2,Nt=oe/2,Pe+=", Dx="+(gt-(gt*Q+Nt*rt)+Kt)+", Dy="+(Nt-(gt*et+Nt*j)+Bt)+")"):Pe+=", sizingMethod='auto expand')",E.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?Mt.filter=E.replace(kt,Pe):Mt.filter=Pe+" "+E,(v===0||v===1)&&Q===1&&rt===0&&et===0&&j===1&&(ne&&Pe.indexOf("Dx=0, Dy=0")===-1||F.test(E)&&parseFloat(RegExp.$1)!==100||E.indexOf(E.indexOf("Alpha"))===-1&&Mt.removeAttribute("filter")),!ne){var te,bt,Le,Zt=8>K?1:-1;for(gt=L.ieOffsetX||0,Nt=L.ieOffsetY||0,L.ieOffsetX=Math.round((Et-((0>Q?-Q:Q)*Et+(0>rt?-rt:rt)*oe))/2+Kt),L.ieOffsetY=Math.round((oe-((0>j?-j:j)*oe+(0>et?-et:et)*Et))/2+Bt),si=0;4>si;si++)bt=D[si],te=Tt[bt],R=te.indexOf("px")!==-1?parseFloat(te):Si(this.t,bt,parseFloat(te),te.replace(b,""))||0,Le=R!==L[bt]?2>si?-L.ieOffsetX:-L.ieOffsetY:2>si?gt-L.ieOffsetX:Nt-L.ieOffsetY,Mt[bt]=(L[bt]=Math.round(R-Le*(si===0||si===2?1:Zt)))+"px"}}},ns=be.set3DTransformRatio=be.setTransformRatio=function(v){var E,R,L,y,W,C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt,Le,Zt=this.data,Ft=this.t.style,Jt=Zt.rotation,yi=Zt.rotationX,qi=Zt.rotationY,Ge=Zt.scaleX,He=Zt.scaleY,We=Zt.scaleZ,ei=Zt.x,ii=Zt.y,ai=Zt.z,hi=Zt.svg,ke=Zt.perspective,Ne=Zt.force3D,qe=Zt.skewY,Re=Zt.skewX;if(qe&&(Re+=qe,Jt+=qe),((v===1||v===0)&&Ne==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ne)&&!ai&&!ke&&!qi&&!yi&&We===1||rn&&hi||!Gi)return void(Jt||Re||hi?(Jt*=Rt,bt=Re*Rt,Le=1e5,R=Math.cos(Jt)*Ge,W=Math.sin(Jt)*Ge,L=Math.sin(Jt-bt)*-He,C=Math.cos(Jt-bt)*He,bt&&Zt.skewType==="simple"&&(E=Math.tan(bt-qe*Rt),E=Math.sqrt(1+E*E),L*=E,C*=E,qe&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,W*=E)),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset,rn&&(Zt.xPercent||Zt.yPercent)&&(Et=this.t.getBBox(),ei+=.01*Zt.xPercent*Et.width,ii+=.01*Zt.yPercent*Et.height),Et=1e-6,Et>ei&&ei>-Et&&(ei=0),Et>ii&&ii>-Et&&(ii=0)),Kt=(R*Le|0)/Le+","+(W*Le|0)/Le+","+(L*Le|0)/Le+","+(C*Le|0)/Le+","+ei+","+ii+")",hi&&rn?this.t.setAttribute("transform","matrix("+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Ge+",0,0,"+He+","+ei+","+ii+")");if(Dt&&(Et=1e-4,Et>Ge&&Ge>-Et&&(Ge=We=2e-5),Et>He&&He>-Et&&(He=We=2e-5),!ke||Zt.z||Zt.rotationX||Zt.rotationY||(ke=0)),Jt||Re)Jt*=Rt,oe=R=Math.cos(Jt),ne=W=Math.sin(Jt),Re&&(Jt-=Re*Rt,oe=Math.cos(Jt),ne=Math.sin(Jt),Zt.skewType==="simple"&&(E=Math.tan((Re-qe)*Rt),E=Math.sqrt(1+E*E),oe*=E,ne*=E,Zt.skewY&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,W*=E))),L=-ne,C=oe;else{if(!(qi||yi||We!==1||ke||hi))return void(Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) translate3d(":"translate3d(")+ei+"px,"+ii+"px,"+ai+"px)"+(Ge!==1||He!==1?" scale("+Ge+","+He+")":""));R=C=1,L=W=0}j=1,y=Q=rt=et=Mt=Tt=0,gt=ke?-1/ke:0,Nt=Zt.zOrigin,Et=1e-6,Bt=",",te="0",Jt=qi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),rt=-ne,Mt=gt*-ne,y=R*ne,Q=W*ne,j=oe,gt*=oe,R*=oe,W*=oe),Jt=yi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),E=L*oe+y*ne,Pe=C*oe+Q*ne,et=j*ne,Tt=gt*ne,y=L*-ne+y*oe,Q=C*-ne+Q*oe,j*=oe,gt*=oe,L=E,C=Pe),We!==1&&(y*=We,Q*=We,j*=We,gt*=We),He!==1&&(L*=He,C*=He,et*=He,Tt*=He),Ge!==1&&(R*=Ge,W*=Ge,rt*=Ge,Mt*=Ge),(Nt||hi)&&(Nt&&(ei+=y*-Nt,ii+=Q*-Nt,ai+=j*-Nt+Nt),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset),Et>ei&&ei>-Et&&(ei=te),Et>ii&&ii>-Et&&(ii=te),Et>ai&&ai>-Et&&(ai=0)),Kt=Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix3d(":"matrix3d(",Kt+=(Et>R&&R>-Et?te:R)+Bt+(Et>W&&W>-Et?te:W)+Bt+(Et>rt&&rt>-Et?te:rt),Kt+=Bt+(Et>Mt&&Mt>-Et?te:Mt)+Bt+(Et>L&&L>-Et?te:L)+Bt+(Et>C&&C>-Et?te:C),yi||qi||We!==1?(Kt+=Bt+(Et>et&&et>-Et?te:et)+Bt+(Et>Tt&&Tt>-Et?te:Tt)+Bt+(Et>y&&y>-Et?te:y),Kt+=Bt+(Et>Q&&Q>-Et?te:Q)+Bt+(Et>j&&j>-Et?te:j)+Bt+(Et>gt&>>-Et?te:gt)+Bt):Kt+=",0,0,0,0,1,0,",Kt+=ei+Bt+ii+Bt+ai+Bt+(ke?1+-ai/ke:1)+")",Ft[ui]=Kt};lt=Kn.prototype,lt.x=lt.y=lt.z=lt.skewX=lt.skewY=lt.rotation=lt.rotationX=lt.rotationY=lt.zOrigin=lt.xPercent=lt.yPercent=lt.xOffset=lt.yOffset=0,lt.scaleX=lt.scaleY=lt.scaleZ=1,Qe("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(v,E,R,L,y,W,C){if(L._lastParsedTransform===C)return y;L._lastParsedTransform=C;var Q,rt=C.scale&&typeof C.scale=="function"?C.scale:0;typeof C[R]=="function"&&(Q=C[R],C[R]=E),rt&&(C.scale=rt(m,v));var et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe=v._gsTransform,Kt=v.style,Bt=1e-6,te=Mo.length,bt=C,Le={},Zt="transformOrigin",Ft=sn(v,ht,!0,bt.parseTransform),Jt=bt.transform&&(typeof bt.transform=="function"?bt.transform(m,H):bt.transform);if(Ft.skewType=bt.skewType||Ft.skewType||yt.defaultSkewType,L._transform=Ft,"rotationZ"in bt&&(bt.rotation=bt.rotationZ),Jt&&typeof Jt=="string"&&ui)j=Je.style,j[ui]=Jt,j.display="block",j.position="absolute",Jt.indexOf("%")!==-1&&(j.width=Oe(v,"width"),j.height=Oe(v,"height")),oi.body.appendChild(Je),et=sn(Je,null,!1),Ft.skewType==="simple"&&(et.scaleY*=Math.cos(et.skewX*Rt)),Ft.svg&&(Nt=Ft.xOrigin,Et=Ft.yOrigin,et.x-=Ft.xOffset,et.y-=Ft.yOffset,(bt.transformOrigin||bt.svgOrigin)&&(Jt={},tr(v,U(bt.transformOrigin),Jt,bt.svgOrigin,bt.smoothOrigin,!0),Nt=Jt.xOrigin,Et=Jt.yOrigin,et.x-=Jt.xOffset-Ft.xOffset,et.y-=Jt.yOffset-Ft.yOffset),(Nt||Et)&&(oe=ir(Je,!0),et.x-=Nt-(Nt*oe[0]+Et*oe[2]),et.y-=Et-(Nt*oe[1]+Et*oe[3]))),oi.body.removeChild(Je),et.perspective||(et.perspective=Ft.perspective),bt.xPercent!=null&&(et.xPercent=dt(bt.xPercent,Ft.xPercent)),bt.yPercent!=null&&(et.yPercent=dt(bt.yPercent,Ft.yPercent));else if(typeof bt=="object"){if(et={scaleX:dt(bt.scaleX!=null?bt.scaleX:bt.scale,Ft.scaleX),scaleY:dt(bt.scaleY!=null?bt.scaleY:bt.scale,Ft.scaleY),scaleZ:dt(bt.scaleZ,Ft.scaleZ),x:dt(bt.x,Ft.x),y:dt(bt.y,Ft.y),z:dt(bt.z,Ft.z),xPercent:dt(bt.xPercent,Ft.xPercent),yPercent:dt(bt.yPercent,Ft.yPercent),perspective:dt(bt.transformPerspective,Ft.perspective)},gt=bt.directionalRotation,gt!=null)if(typeof gt=="object")for(j in gt)bt[j]=gt[j];else bt.rotation=gt;typeof bt.x=="string"&&bt.x.indexOf("%")!==-1&&(et.x=0,et.xPercent=dt(bt.x,Ft.xPercent)),typeof bt.y=="string"&&bt.y.indexOf("%")!==-1&&(et.y=0,et.yPercent=dt(bt.y,Ft.yPercent)),et.rotation=wt("rotation"in bt?bt.rotation:"shortRotation"in bt?bt.shortRotation+"_short":Ft.rotation,Ft.rotation,"rotation",Le),Gi&&(et.rotationX=wt("rotationX"in bt?bt.rotationX:"shortRotationX"in bt?bt.shortRotationX+"_short":Ft.rotationX||0,Ft.rotationX,"rotationX",Le),et.rotationY=wt("rotationY"in bt?bt.rotationY:"shortRotationY"in bt?bt.shortRotationY+"_short":Ft.rotationY||0,Ft.rotationY,"rotationY",Le)),et.skewX=wt(bt.skewX,Ft.skewX),et.skewY=wt(bt.skewY,Ft.skewY)}for(Gi&&bt.force3D!=null&&(Ft.force3D=bt.force3D,Tt=!0),Mt=Ft.force3D||Ft.z||Ft.rotationX||Ft.rotationY||et.z||et.rotationX||et.rotationY||et.perspective,Mt||bt.scale==null||(et.scaleZ=1);--te>-1;)ne=Mo[te],Jt=et[ne]-Ft[ne],(Jt>Bt||-Bt>Jt||bt[ne]!=null||vi[ne]!=null)&&(Tt=!0,y=new je(Ft,ne,Ft[ne],Jt,y),ne in Le&&(y.e=Le[ne]),y.xs0=0,y.plugin=W,L._overwriteProps.push(y.n));return Jt=bt.transformOrigin,Ft.svg&&(Jt||bt.svgOrigin)&&(Nt=Ft.xOffset,Et=Ft.yOffset,tr(v,U(Jt),et,bt.svgOrigin,bt.smoothOrigin),y=gn(Ft,"xOrigin",(Pe?Ft:et).xOrigin,et.xOrigin,y,Zt),y=gn(Ft,"yOrigin",(Pe?Ft:et).yOrigin,et.yOrigin,y,Zt),(Nt!==Ft.xOffset||Et!==Ft.yOffset)&&(y=gn(Ft,"xOffset",Pe?Nt:Ft.xOffset,Ft.xOffset,y,Zt),y=gn(Ft,"yOffset",Pe?Et:Ft.yOffset,Ft.yOffset,y,Zt)),Jt="0px 0px"),(Jt||Gi&&Mt&&Ft.zOrigin)&&(ui?(Tt=!0,ne=bn,Jt=(Jt||Oe(v,ne,ht,!1,"50% 50%"))+"",y=new je(Kt,ne,0,0,y,-1,Zt),y.b=Kt[ne],y.plugin=W,Gi?(j=Ft.zOrigin,Jt=Jt.split(" "),Ft.zOrigin=(Jt.length>2&&(j===0||Jt[2]!=="0px")?parseFloat(Jt[2]):j)||0,y.xs0=y.e=Jt[0]+" "+(Jt[1]||"50%")+" 0px",y=new je(Ft,"zOrigin",0,0,y,-1,y.n),y.b=j,y.xs0=y.e=Ft.zOrigin):y.xs0=y.e=Jt):U(Jt+"",Ft)),Tt&&(L._transformType=Ft.svg&&rn||!Mt&&this._transformType!==3?2:3),Q&&(C[R]=Q),rt&&(C.scale=rt),y},prefix:!0}),Qe("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Qe("borderRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){E=this.format(E);var C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Le=v.style;for(Nt=parseFloat(v.offsetWidth),Et=parseFloat(v.offsetHeight),C=E.split(" "),Q=0;Q<bt.length;Q++)this.p.indexOf("border")&&(bt[Q]=en(bt[Q])),j=et=Oe(v,bt[Q],ht,!1,"0px"),j.indexOf(" ")!==-1&&(et=j.split(" "),j=et[0],et=et[1]),Mt=rt=C[Q],Tt=parseFloat(j),ne=j.substr((Tt+"").length),Pe=Mt.charAt(1)==="=",Pe?(gt=parseInt(Mt.charAt(0)+"1",10),Mt=Mt.substr(2),gt*=parseFloat(Mt),oe=Mt.substr((gt+"").length-(0>gt?1:0))||""):(gt=parseFloat(Mt),oe=Mt.substr((gt+"").length)),oe===""&&(oe=mt[R]||ne),oe!==ne&&(Kt=Si(v,"borderLeft",Tt,ne),Bt=Si(v,"borderTop",Tt,ne),oe==="%"?(j=Kt/Nt*100+"%",et=Bt/Et*100+"%"):oe==="em"?(te=Si(v,"borderLeft",1,"em"),j=Kt/te+"em",et=Bt/te+"em"):(j=Kt+"px",et=Bt+"px"),Pe&&(Mt=parseFloat(j)+gt+oe,rt=parseFloat(et)+gt+oe)),y=Wi(Le,bt[Q],j+" "+et,Mt+" "+rt,!1,"0px",y);return y},prefix:!0,formatter:ze("0px 0px 0px 0px",!1,!0)}),Qe("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){return Wi(v.style,R,this.format(Oe(v,R,ht,!1,"0px 0px")),this.format(E),!1,"0px",y)},prefix:!0,formatter:ze("0px 0px",!1,!0)}),Qe("backgroundPosition",{defaultValue:"0 0",parser:function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt="background-position",gt=ht||ci(v,null),Nt=this.format((gt?K?gt.getPropertyValue(Tt+"-x")+" "+gt.getPropertyValue(Tt+"-y"):gt.getPropertyValue(Tt):v.currentStyle.backgroundPositionX+" "+v.currentStyle.backgroundPositionY)||"0 0"),Et=this.format(E);if(Nt.indexOf("%")!==-1!=(Et.indexOf("%")!==-1)&&Et.split(",").length<2&&(Mt=Oe(v,"backgroundImage").replace(Gt,""),Mt&&Mt!=="none")){for(C=Nt.split(" "),Q=Et.split(" "),Ri.setAttribute("src",Mt),rt=2;--rt>-1;)Nt=C[rt],et=Nt.indexOf("%")!==-1,et!==(Q[rt].indexOf("%")!==-1)&&(j=rt===0?v.offsetWidth-Ri.width:v.offsetHeight-Ri.height,C[rt]=et?parseFloat(Nt)/100*j+"px":parseFloat(Nt)/j*100+"%");Nt=C.join(" ")}return this.parseComplex(v.style,Nt,Et,y,W)},formatter:U}),Qe("backgroundSize",{defaultValue:"0 0",formatter:function(v){return v+="",v.substr(0,2)==="co"?v:U(v.indexOf(" ")===-1?v+" "+v:v)}}),Qe("perspective",{defaultValue:"0px",prefix:!0}),Qe("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Qe("transformStyle",{prefix:!0}),Qe("backfaceVisibility",{prefix:!0}),Qe("userSelect",{prefix:!0}),Qe("margin",{parser:Xe("marginTop,marginRight,marginBottom,marginLeft")}),Qe("padding",{parser:Xe("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Qe("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(v,E,R,L,y,W){var C,Q,rt;return 9>K?(Q=v.currentStyle,rt=8>K?" ":",",C="rect("+Q.clipTop+rt+Q.clipRight+rt+Q.clipBottom+rt+Q.clipLeft+")",E=this.format(E).split(",").join(rt)):(C=this.format(Oe(v,this.p,ht,!1,this.dflt)),E=this.format(E)),this.parseComplex(v.style,C,E,y,W)}}),Qe("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Qe("autoRound,strictUnits",{parser:function(v,E,R,L,y){return y}}),Qe("border",{defaultValue:"0px solid #000",parser:function(v,E,R,L,y,W){var C=Oe(v,"borderTopWidth",ht,!1,"0px"),Q=this.format(E).split(" "),rt=Q[0].replace(b,"");return rt!=="px"&&(C=parseFloat(C)/Si(v,"borderTopWidth",1,rt)+rt),this.parseComplex(v.style,this.format(C+" "+Oe(v,"borderTopStyle",ht,!1,"solid")+" "+Oe(v,"borderTopColor",ht,!1,"#000")),Q.join(" "),y,W)},color:!0,formatter:function(v){var E=v.split(" ");return E[0]+" "+(E[1]||"solid")+" "+(v.match(he)||["#000"])[0]}}),Qe("borderWidth",{parser:Xe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Qe("float,cssFloat,styleFloat",{parser:function(v,E,R,L,y,W){var C=v.style,Q="cssFloat"in C?"cssFloat":"styleFloat";return new je(C,Q,0,0,y,-1,R,!1,0,C[Q],E)}});var rs=function(v){var E,R=this.t,L=R.filter||Oe(this.data,"filter")||"",y=this.s+this.c*v|0;y===100&&(L.indexOf("atrix(")===-1&&L.indexOf("radient(")===-1&&L.indexOf("oader(")===-1?(R.removeAttribute("filter"),E=!Oe(this.data,"filter")):(R.filter=L.replace(st,""),E=!0)),E||(this.xn1&&(R.filter=L=L||"alpha(opacity="+y+")"),L.indexOf("pacity")===-1?y===0&&this.xn1||(R.filter=L+" alpha(opacity="+y+")"):R.filter=L.replace(F,"opacity="+y))};Qe("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(v,E,R,L,y,W){var C=parseFloat(Oe(v,"opacity",ht,!1,"1")),Q=v.style,rt=R==="autoAlpha";return typeof E=="string"&&E.charAt(1)==="="&&(E=(E.charAt(0)==="-"?-1:1)*parseFloat(E.substr(2))+C),rt&&C===1&&Oe(v,"visibility",ht)==="hidden"&&E!==0&&(C=0),Ke?y=new je(Q,"opacity",C,E-C,y):(y=new je(Q,"opacity",100*C,100*(E-C),y),y.xn1=rt?1:0,Q.zoom=1,y.type=2,y.b="alpha(opacity="+y.s+")",y.e="alpha(opacity="+(y.s+y.c)+")",y.data=v,y.plugin=W,y.setRatio=rs),rt&&(y=new je(Q,"visibility",0,0,y,-1,null,!1,0,C!==0?"inherit":"hidden",E===0?"hidden":"inherit"),y.xs0="inherit",L._overwriteProps.push(y.n),L._overwriteProps.push(R)),y}});var On=function(v,E){E&&(v.removeProperty?((E.substr(0,2)==="ms"||E.substr(0,6)==="webkit")&&(E="-"+E),v.removeProperty(E.replace(Pt,"-$1").toLowerCase())):v.removeAttribute(E))},In=function(v){if(this.t._gsClassPT=this,v===1||v===0){this.t.setAttribute("class",v===0?this.b:this.e);for(var E=this.data,R=this.t.style;E;)E.v?R[E.p]=E.v:On(R,E.p),E=E._next;v===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Qe("className",{parser:function(v,E,R,L,y,W,C){var Q,rt,et,j,Mt,Tt=v.getAttribute("class")||"",gt=v.style.cssText;if(y=L._classNamePT=new je(v,R,0,0,y,2),y.setRatio=In,y.pr=-11,$=!0,y.b=Tt,rt=nn(v,ht),et=v._gsClassPT){for(j={},Mt=et.data;Mt;)j[Mt.p]=1,Mt=Mt._next;et.setRatio(1)}return v._gsClassPT=y,y.e=E.charAt(1)!=="="?E:Tt.replace(new RegExp("(?:\\s|^)"+E.substr(2)+"(?![\\w-])"),"")+(E.charAt(0)==="+"?" "+E.substr(2):""),v.setAttribute("class",y.e),Q=Ci(v,rt,nn(v),C,j),v.setAttribute("class",Tt),y.data=Q.firstMPT,v.style.cssText=gt,y=y.xfirst=L.parse(v,Q.difs,y,W)}});var So=function(v){if((v===1||v===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var E,R,L,y,W,C=this.t.style,Q=Y.transform.parse;if(this.e==="all")C.cssText="",y=!0;else for(E=this.e.split(" ").join("").split(","),L=E.length;--L>-1;)R=E[L],Y[R]&&(Y[R].parse===Q?y=!0:R=R==="transformOrigin"?bn:Y[R].p),On(C,R);y&&(On(C,ui),W=this.t._gsTransform,W&&(W.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Qe("clearProps",{parser:function(v,E,R,L,y){return y=new je(v,R,0,0,y,2),y.setRatio=So,y.e=E,y.pr=-10,y.data=L._tween,$=!0,y}}),lt="bezier,throwProps,physicsProps,physics2D".split(","),si=lt.length;si--;)Ko(lt[si]);lt=yt.prototype,lt._firstPT=lt._lastParsedTransform=lt._transform=null,lt._onInitTween=function(v,E,R,L){if(!v.nodeType)return!1;this._target=H=v,this._tween=R,this._vars=E,m=L,St=E.autoRound,$=!1,mt=E.suffixMap||yt.suffixMap,ht=ci(v,""),M=this._overwriteProps;var y,W,C,Q,rt,et,j,Mt,Tt,gt=v.style;if(ut&>.zIndex===""&&(y=Oe(v,"zIndex",ht),(y==="auto"||y==="")&&this._addLazySet(gt,"zIndex",0)),typeof E=="string"&&(Q=gt.cssText,y=nn(v,ht),gt.cssText=Q+";"+E,y=Ci(v,y,nn(v)).difs,!Ke&&Z.test(E)&&(y.opacity=parseFloat(RegExp.$1)),E=y,gt.cssText=Q),E.className?this._firstPT=W=Y.className.parse(v,E.className,"className",this,null,null,E):this._firstPT=W=this.parse(v,E,null),this._transformType){for(Tt=this._transformType===3,ui?At&&(ut=!0,gt.zIndex===""&&(j=Oe(v,"zIndex",ht),(j==="auto"||j==="")&&this._addLazySet(gt,"zIndex",0)),_t&&this._addLazySet(gt,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(Tt?"visible":"hidden"))):gt.zoom=1,C=W;C&&C._next;)C=C._next;Mt=new je(v,"transform",0,0,null,2),this._linkCSSP(Mt,null,C),Mt.setRatio=ui?ns:is,Mt.data=this._transform||sn(v,ht,!0),Mt.tween=R,Mt.pr=-1,M.pop()}if($){for(;W;){for(et=W._next,C=Q;C&&C.pr>W.pr;)C=C._next;(W._prev=C?C._prev:rt)?W._prev._next=W:Q=W,(W._next=C)?C._prev=W:rt=W,W=et}this._firstPT=Q}return!0},lt.parse=function(v,E,R,L){var y,W,C,Q,rt,et,j,Mt,Tt,gt,Nt=v.style;for(y in E){if(et=E[y],typeof et=="function"&&(et=et(m,H)),W=Y[y])R=W.parse(v,et,y,this,R,L,E);else{if(y.substr(0,2)==="--"){this._tween._propLookup[y]=this._addTween.call(this._tween,v.style,"setProperty",ci(v).getPropertyValue(y)+"",et+"",y,!1,y);continue}rt=Oe(v,y,ht)+"",Tt=typeof et=="string",y==="color"||y==="fill"||y==="stroke"||y.indexOf("Color")!==-1||Tt&&it.test(et)?(Tt||(et=se(et),et=(et.length>3?"rgba(":"rgb(")+et.join(",")+")"),R=Wi(Nt,y,rt,et,!0,"transparent",R,0,L)):Tt&&gi.test(et)?R=Wi(Nt,y,rt,et,!0,null,R,0,L):(C=parseFloat(rt),j=C||C===0?rt.substr((C+"").length):"",(rt===""||rt==="auto")&&(y==="width"||y==="height"?(C=B(v,y,ht),j="px"):y==="left"||y==="top"?(C=Tn(v,y,ht),j="px"):(C=y!=="opacity"?0:1,j="")),gt=Tt&&et.charAt(1)==="=",gt?(Q=parseInt(et.charAt(0)+"1",10),et=et.substr(2),Q*=parseFloat(et),Mt=et.replace(b,"")):(Q=parseFloat(et),Mt=Tt?et.replace(b,""):""),Mt===""&&(Mt=y in mt?mt[y]:j),et=Q||Q===0?(gt?Q+C:Q)+Mt:E[y],j!==Mt&&(Mt!==""||y==="lineHeight")&&(Q||Q===0)&&C&&(C=Si(v,y,C,j),Mt==="%"?(C/=Si(v,y,100,"%")/100,E.strictUnits!==!0&&(rt=C+"%")):Mt==="em"||Mt==="rem"||Mt==="vw"||Mt==="vh"?C/=Si(v,y,1,Mt):Mt!=="px"&&(Q=Si(v,y,Q,Mt),Mt="px"),gt&&(Q||Q===0)&&(et=Q+C+Mt)),gt&&(Q+=C),!C&&C!==0||!Q&&Q!==0?Nt[y]!==void 0&&(et||et+""!="NaN"&&et!=null)?(R=new je(Nt,y,Q||C||0,0,R,-1,y,!1,0,rt,et),R.xs0=et!=="none"||y!=="display"&&y.indexOf("Style")===-1?et:rt):Cn("invalid "+y+" tween value: "+E[y]):(R=new je(Nt,y,C,Q-C,R,0,y,St!==!1&&(Mt==="px"||y==="zIndex"),0,rt,et),R.xs0=Mt))}L&&R&&!R.plugin&&(R.plugin=L)}return R},lt.setRatio=function(v){var E,R,L,y=this._firstPT,W=1e-6;if(v!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(v||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;y;){if(E=y.c*v+y.s,y.r?E=y.r(E):W>E&&E>-W&&(E=0),y.type)if(y.type===1)if(L=y.l,L===2)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2;else if(L===3)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3;else if(L===4)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4;else if(L===5)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4+y.xn4+y.xs5;else{for(R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}else y.type===-1?y.t[y.p]=y.xs0:y.setRatio&&y.setRatio(v);else y.t[y.p]=E+y.xs0;y=y._next}else for(;y;)y.type!==2?y.t[y.p]=y.b:y.setRatio(v),y=y._next;else for(;y;){if(y.type!==2)if(y.r&&y.type!==-1)if(E=y.r(y.s+y.c),y.type){if(y.type===1){for(L=y.l,R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}}else y.t[y.p]=E+y.xs0;else y.t[y.p]=y.e;else y.setRatio(v);y=y._next}},lt._enableTransforms=function(v){this._transform=this._transform||sn(this._target,ht,!0),this._transformType=this._transform.svg&&rn||!v&&this._transformType!==3?2:3};var Eo=function(v){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};lt._addLazySet=function(v,E,R){var L=this._firstPT=new je(v,E,0,0,this._firstPT,2);L.e=R,L.setRatio=Eo,L.data=this},lt._linkCSSP=function(v,E,R,L){return v&&(E&&(E._prev=v),v._next&&(v._next._prev=v._prev),v._prev?v._prev._next=v._next:this._firstPT===v&&(this._firstPT=v._next,L=!0),R?R._next=v:L||this._firstPT!==null||(this._firstPT=v),v._next=E,v._prev=R),v},lt._mod=function(v){for(var E=this._firstPT;E;)typeof v[E.p]=="function"&&(E.r=v[E.p]),E=E._next},lt._kill=function(v){var E,R,L,y=v;if(v.autoAlpha||v.alpha){y={};for(R in v)y[R]=v[R];y.opacity=1,y.autoAlpha&&(y.visibility=1)}for(v.className&&(E=this._classNamePT)&&(L=E.xfirst,L&&L._prev?this._linkCSSP(L._prev,E._next,L._prev._prev):L===this._firstPT&&(this._firstPT=E._next),E._next&&this._linkCSSP(E._next,E._next._next,L._prev),this._classNamePT=null),E=this._firstPT;E;)E.plugin&&E.plugin!==R&&E.plugin._kill&&(E.plugin._kill(v),R=E.plugin),E=E._next;return p.prototype._kill.call(this,y)};var En=function(v,E,R){var L,y,W,C;if(v.slice)for(y=v.length;--y>-1;)En(v[y],E,R);else for(L=v.childNodes,y=L.length;--y>-1;)W=L[y],C=W.type,W.style&&(E.push(nn(W)),R&&R.push(W)),C!==1&&C!==9&&C!==11||!W.childNodes.length||En(W,E,R)};return yt.cascadeTo=function(v,E,R){var L,y,W,C,Q=Ot.to(v,E,R),rt=[Q],et=[],j=[],Mt=[],Tt=Ot._internals.reservedProps;for(v=Q._targets||Q.target,En(v,et,Mt),Q.render(E,!0,!0),En(v,j),Q.render(0,!0,!0),Q._enabled(!0),L=Mt.length;--L>-1;)if(y=Ci(Mt[L],et[L],j[L]),y.firstMPT){y=y.difs;for(W in R)Tt[W]&&(y[W]=R[W]);C={};for(W in y)C[W]=et[L][W];rt.push(Ot.fromTo(Mt[L],E,C,y))}return rt},p.activate([yt]),yt},!0),function(){var p=$e._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(ht,M,yt){return this._tween=yt,!0}}),Ot=function(ht){var M=1>ht?Math.pow(10,(ht+"").length-2):1;return function(yt){return(Math.round(yt/ht)*ht*M|0)/M}},$=function(ht,M){for(;ht;)ht.f||ht.blob||(ht.m=M||Math.round),ht=ht._next},mt=p.prototype;mt._onInitAllProps=function(){var ht,M,yt,Ct,Y=this._tween,lt=Y.vars.roundProps,St={},ut=Y._propLookup.roundProps;if(typeof lt!="object"||lt.push)for(typeof lt=="string"&&(lt=lt.split(",")),yt=lt.length;--yt>-1;)St[lt[yt]]=Math.round;else for(Ct in lt)St[Ct]=Ot(lt[Ct]);for(Ct in St)for(ht=Y._firstPT;ht;)M=ht._next,ht.pg?ht.t._mod(St):ht.n===Ct&&(ht.f===2&&ht.t?$(ht.t._firstPT,St[Ct]):(this._add(ht.t,Ct,ht.s,ht.c,St[Ct]),M&&(M._prev=ht._prev),ht._prev?ht._prev._next=M:Y._firstPT===ht&&(Y._firstPT=M),ht._next=ht._prev=null,Y._propLookup[Ct]=ut)),ht=M;return!1},mt._add=function(ht,M,yt,Ct,Y){this._addTween(ht,M,yt,yt+Ct,M,Y||Math.round),this._overwriteProps.push(M)}}(),function(){$e._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(p,Ot,$,mt){var ht,M;if(typeof p.setAttribute!="function")return!1;for(ht in Ot)M=Ot[ht],typeof M=="function"&&(M=M(mt,p)),this._addTween(p,"setAttribute",p.getAttribute(ht)+"",M+"",ht,!1,ht),this._overwriteProps.push(ht);return!0}})}(),$e._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(p,Ot,$,mt){typeof Ot!="object"&&(Ot={rotation:Ot}),this.finals={};var ht,M,yt,Ct,Y,lt,St=Ot.useRadians===!0?2*Math.PI:360,ut=1e-6;for(ht in Ot)ht!=="useRadians"&&(Ct=Ot[ht],typeof Ct=="function"&&(Ct=Ct(mt,p)),lt=(Ct+"").split("_"),M=lt[0],yt=parseFloat(typeof p[ht]!="function"?p[ht]:p[ht.indexOf("set")||typeof p["get"+ht.substr(3)]!="function"?ht:"get"+ht.substr(3)]()),Ct=this.finals[ht]=typeof M=="string"&&M.charAt(1)==="="?yt+parseInt(M.charAt(0)+"1",10)*Number(M.substr(2)):Number(M)||0,Y=Ct-yt,lt.length&&(M=lt.join("_"),M.indexOf("short")!==-1&&(Y%=St,Y!==Y%(St/2)&&(Y=0>Y?Y+St:Y-St)),M.indexOf("_cw")!==-1&&0>Y?Y=(Y+9999999999*St)%St-(Y/St|0)*St:M.indexOf("ccw")!==-1&&Y>0&&(Y=(Y-9999999999*St)%St-(Y/St|0)*St)),(Y>ut||-ut>Y)&&(this._addTween(p,ht,yt,yt+Y,ht),this._overwriteProps.push(ht)));return!0},set:function(p){var Ot;if(p!==1)this._super.setRatio.call(this,p);else for(Ot=this._firstPT;Ot;)Ot.f?Ot.t[Ot.p](this.finals[Ot.p]):Ot.t[Ot.p]=this.finals[Ot.p],Ot=Ot._next}})._autoCSS=!0,$e._gsDefine("easing.Back",["easing.Ease"],function(p){var Ot,$,mt,ht,M=$e.GreenSockGlobals||$e,yt=M.com.greensock,Ct=2*Math.PI,Y=Math.PI/2,lt=yt._class,St=function(f,O){var w=lt("easing."+f,function(){},!0),X=w.prototype=new p;return X.constructor=w,X.getRatio=O,w},ut=p.register||function(){},At=function(f,O,w,X,b){var F=lt("easing."+f,{easeOut:new O,easeIn:new w,easeInOut:new X},!0);return ut(F,f),F},Dt=function(f,O,w){this.t=f,this.v=O,w&&(this.next=w,w.prev=this,this.c=w.v-O,this.gap=w.t-f)},_t=function(f,O){var w=lt("easing."+f,function(b){this._p1=b||b===0?b:1.70158,this._p2=1.525*this._p1},!0),X=w.prototype=new p;return X.constructor=w,X.getRatio=O,X.config=function(b){return new w(b)},w},K=At("Back",_t("BackOut",function(f){return(f-=1)*f*((this._p1+1)*f+this._p1)+1}),_t("BackIn",function(f){return f*f*((this._p1+1)*f-this._p1)}),_t("BackInOut",function(f){return(f*=2)<1?.5*f*f*((this._p2+1)*f-this._p2):.5*((f-=2)*f*((this._p2+1)*f+this._p2)+2)})),H=lt("easing.SlowMo",function(f,O,w){O=O||O===0?O:.7,f==null?f=.7:f>1&&(f=1),this._p=f!==1?O:0,this._p1=(1-f)/2,this._p2=f,this._p3=this._p1+this._p2,this._calcEnd=w===!0},!0),m=H.prototype=new p;return m.constructor=H,m.getRatio=function(f){var O=f+(.5-f)*this._p;return f<this._p1?this._calcEnd?1-(f=1-f/this._p1)*f:O-(f=1-f/this._p1)*f*f*f*O:f>this._p3?this._calcEnd?f===1?0:1-(f=(f-this._p3)/this._p1)*f:O+(f-O)*(f=(f-this._p3)/this._p1)*f*f*f:this._calcEnd?1:O},H.ease=new H(.7,.7),m.config=H.config=function(f,O,w){return new H(f,O,w)},Ot=lt("easing.SteppedEase",function(f,O){f=f||1,this._p1=1/f,this._p2=f+(O?0:1),this._p3=O?1:0},!0),m=Ot.prototype=new p,m.constructor=Ot,m.getRatio=function(f){return 0>f?f=0:f>=1&&(f=.999999999),((this._p2*f|0)+this._p3)*this._p1},m.config=Ot.config=function(f,O){return new Ot(f,O)},$=lt("easing.ExpoScaleEase",function(f,O,w){this._p1=Math.log(O/f),this._p2=O-f,this._p3=f,this._ease=w},!0),m=$.prototype=new p,m.constructor=$,m.getRatio=function(f){return this._ease&&(f=this._ease.getRatio(f)),(this._p3*Math.exp(this._p1*f)-this._p3)/this._p2},m.config=$.config=function(f,O,w){return new $(f,O,w)},mt=lt("easing.RoughEase",function(f){f=f||{};for(var O,w,X,b,F,Z,st=f.taper||"none",it=[],Pt=0,Lt=0|(f.points||20),Gt=Lt,jt=f.randomize!==!1,ie=f.clamp===!0,ct=f.template instanceof p?f.template:null,kt=typeof f.strength=="number"?.4*f.strength:.4;--Gt>-1;)O=jt?Math.random():1/Lt*Gt,w=ct?ct.getRatio(O):O,st==="none"?X=kt:st==="out"?(b=1-O,X=b*b*kt):st==="in"?X=O*O*kt:.5>O?(b=2*O,X=b*b*.5*kt):(b=2*(1-O),X=b*b*.5*kt),jt?w+=Math.random()*X-.5*X:Gt%2?w+=.5*X:w-=.5*X,ie&&(w>1?w=1:0>w&&(w=0)),it[Pt++]={x:O,y:w};for(it.sort(function(Me,gi){return Me.x-gi.x}),Z=new Dt(1,1,null),Gt=Lt;--Gt>-1;)F=it[Gt],Z=new Dt(F.x,F.y,Z);this._prev=new Dt(0,0,Z.t!==0?Z:Z.next)},!0),m=mt.prototype=new p,m.constructor=mt,m.getRatio=function(f){var O=this._prev;if(f>O.t){for(;O.next&&f>=O.t;)O=O.next;O=O.prev}else for(;O.prev&&f<=O.t;)O=O.prev;return this._prev=O,O.v+(f-O.t)/O.gap*O.c},m.config=function(f){return new mt(f)},mt.ease=new mt,At("Bounce",St("BounceOut",function(f){return 1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375}),St("BounceIn",function(f){return(f=1-f)<1/2.75?1-7.5625*f*f:2/2.75>f?1-(7.5625*(f-=1.5/2.75)*f+.75):2.5/2.75>f?1-(7.5625*(f-=2.25/2.75)*f+.9375):1-(7.5625*(f-=2.625/2.75)*f+.984375)}),St("BounceInOut",function(f){var O=.5>f;return f=O?1-2*f:2*f-1,f=1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375,O?.5*(1-f):.5*f+.5})),At("Circ",St("CircOut",function(f){return Math.sqrt(1-(f-=1)*f)}),St("CircIn",function(f){return-(Math.sqrt(1-f*f)-1)}),St("CircInOut",function(f){return(f*=2)<1?-.5*(Math.sqrt(1-f*f)-1):.5*(Math.sqrt(1-(f-=2)*f)+1)})),ht=function(f,O,w){var X=lt("easing."+f,function(F,Z){this._p1=F>=1?F:1,this._p2=(Z||w)/(1>F?F:1),this._p3=this._p2/Ct*(Math.asin(1/this._p1)||0),this._p2=Ct/this._p2},!0),b=X.prototype=new p;return b.constructor=X,b.getRatio=O,b.config=function(F,Z){return new X(F,Z)},X},At("Elastic",ht("ElasticOut",function(f){return this._p1*Math.pow(2,-10*f)*Math.sin((f-this._p3)*this._p2)+1},.3),ht("ElasticIn",function(f){return-(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2))},.3),ht("ElasticInOut",function(f){return(f*=2)<1?-.5*(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(f-=1))*Math.sin((f-this._p3)*this._p2)*.5+1},.45)),At("Expo",St("ExpoOut",function(f){return 1-Math.pow(2,-10*f)}),St("ExpoIn",function(f){return Math.pow(2,10*(f-1))-.001}),St("ExpoInOut",function(f){return(f*=2)<1?.5*Math.pow(2,10*(f-1)):.5*(2-Math.pow(2,-10*(f-1)))})),At("Sine",St("SineOut",function(f){return Math.sin(f*Y)}),St("SineIn",function(f){return-Math.cos(f*Y)+1}),St("SineInOut",function(f){return-.5*(Math.cos(Math.PI*f)-1)})),lt("easing.EaseLookup",{find:function(f){return p.map[f]}},!0),ut(M.SlowMo,"SlowMo","ease,"),ut(mt,"RoughEase","ease,"),ut(Ot,"SteppedEase","ease,"),K},!0)}),$e._gsDefine&&$e._gsQueue.pop()(),function(p,Ot){var $={},mt=p.document,ht=p.GreenSockGlobals=p.GreenSockGlobals||p,M=ht[Ot];if(M)return typeof module<"u"&&module.exports&&(module.exports=M),M;var yt,Ct,Y,lt,St,ut=function(_){var D,B=_.split("."),U=ht;for(D=0;D<B.length;D++)U[B[D]]=U=U[B[D]]||{};return U},At=ut("com.greensock"),Dt=1e-10,_t=function(_){var D,B=[],U=_.length;for(D=0;D!==U;B.push(_[D++]));return B},K=function(){},H=function(){var _=Object.prototype.toString,D=_.call([]);return function(B){return B!=null&&(B instanceof Array||typeof B=="object"&&!!B.push&&_.call(B)===D)}}(),m={},f=function(_,D,B,U){this.sc=m[_]?m[_].sc:[],m[_]=this,this.gsClass=null,this.func=B;var J=[];this.check=function(dt){for(var wt,pt,ae,se,Ut=D.length,he=Ut;--Ut>-1;)(wt=m[D[Ut]]||new f(D[Ut],[])).gsClass?(J[Ut]=wt.gsClass,he--):dt&&wt.sc.push(this);if(he===0&&B){if(pt=("com.greensock."+_).split("."),ae=pt.pop(),se=ut(pt.join("."))[ae]=this.gsClass=B.apply(B,J),U)if(ht[ae]=$[ae]=se,typeof module<"u"&&module.exports)if(_===Ot){module.exports=$[Ot]=se;for(Ut in $)se[Ut]=$[Ut]}else $[Ot]&&($[Ot][ae]=se);else typeof define=="function"&&define.amd&&define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+_.split(".").pop(),[],function(){return se});for(Ut=0;Ut<this.sc.length;Ut++)this.sc[Ut].check()}},this.check(!0)},O=p._gsDefine=function(_,D,B,U){return new f(_,D,B,U)},w=At._class=function(_,D,B){return D=D||function(){},O(_,[],function(){return D},B),D};O.globals=ht;var X=[0,0,1,1],b=w("easing.Ease",function(_,D,B,U){this._func=_,this._type=B||0,this._power=U||0,this._params=D?X.concat(D):X},!0),F=b.map={},Z=b.register=function(_,D,B,U){for(var J,dt,wt,pt,ae=D.split(","),se=ae.length,Ut=(B||"easeIn,easeOut,easeInOut").split(",");--se>-1;)for(dt=ae[se],J=U?w("easing."+dt,null,!0):At.easing[dt]||{},wt=Ut.length;--wt>-1;)pt=Ut[wt],F[dt+"."+pt]=F[pt+dt]=J[pt]=_.getRatio?_:_[pt]||new _};for(Y=b.prototype,Y._calcEnd=!1,Y.getRatio=function(_){if(this._func)return this._params[0]=_,this._func.apply(null,this._params);var D=this._type,B=this._power,U=D===1?1-_:D===2?_:.5>_?2*_:2*(1-_);return B===1?U*=U:B===2?U*=U*U:B===3?U*=U*U*U:B===4&&(U*=U*U*U*U),D===1?1-U:D===2?U:.5>_?U/2:1-U/2},yt=["Linear","Quad","Cubic","Quart","Quint,Strong"],Ct=yt.length;--Ct>-1;)Y=yt[Ct]+",Power"+Ct,Z(new b(null,null,1,Ct),Y,"easeOut",!0),Z(new b(null,null,2,Ct),Y,"easeIn"+(Ct===0?",easeNone":"")),Z(new b(null,null,3,Ct),Y,"easeInOut");F.linear=At.easing.Linear.easeIn,F.swing=At.easing.Quad.easeInOut;var st=w("events.EventDispatcher",function(_){this._listeners={},this._eventTarget=_||this});Y=st.prototype,Y.addEventListener=function(_,D,B,U,J){J=J||0;var dt,wt,pt=this._listeners[_],ae=0;for(this!==lt||St||lt.wake(),pt==null&&(this._listeners[_]=pt=[]),wt=pt.length;--wt>-1;)dt=pt[wt],dt.c===D&&dt.s===B?pt.splice(wt,1):ae===0&&dt.pr<J&&(ae=wt+1);pt.splice(ae,0,{c:D,s:B,up:U,pr:J})},Y.removeEventListener=function(_,D){var B,U=this._listeners[_];if(U){for(B=U.length;--B>-1;)if(U[B].c===D)return void U.splice(B,1)}},Y.dispatchEvent=function(_){var D,B,U,J=this._listeners[_];if(J)for(D=J.length,D>1&&(J=J.slice(0)),B=this._eventTarget;--D>-1;)U=J[D],U&&(U.up?U.c.call(U.s||B,{type:_,target:B}):U.c.call(U.s||B))};var it=p.requestAnimationFrame,Pt=p.cancelAnimationFrame,Lt=Date.now||function(){return new Date().getTime()},Gt=Lt();for(yt=["ms","moz","webkit","o"],Ct=yt.length;--Ct>-1&&!it;)it=p[yt[Ct]+"RequestAnimationFrame"],Pt=p[yt[Ct]+"CancelAnimationFrame"]||p[yt[Ct]+"CancelRequestAnimationFrame"];w("Ticker",function(_,D){var B,U,J,dt,wt,pt=this,ae=Lt(),se=D!==!1&&it?"auto":!1,Ut=500,he=33,ze="tick",Xe=function(Ce){var je,gn,Wi=Lt()-Gt;Wi>Ut&&(ae+=Wi-he),Gt+=Wi,pt.time=(Gt-ae)/1e3,je=pt.time-wt,(!B||je>0||Ce===!0)&&(pt.frame++,wt+=je+(je>=dt?.004:dt-je),gn=!0),Ce!==!0&&(J=U(Xe)),gn&&pt.dispatchEvent(ze)};st.call(pt),pt.time=pt.frame=0,pt.tick=function(){Xe(!0)},pt.lagSmoothing=function(Ce,je){return arguments.length?(Ut=Ce||1/Dt,void(he=Math.min(je,Ut,0))):1/Dt>Ut},pt.sleep=function(){J!=null&&(se&&Pt?Pt(J):clearTimeout(J),U=K,J=null,pt===lt&&(St=!1))},pt.wake=function(Ce){J!==null?pt.sleep():Ce?ae+=-Gt+(Gt=Lt()):pt.frame>10&&(Gt=Lt()-Ut+5),U=B===0?K:se&&it?it:function(je){return setTimeout(je,1e3*(wt-pt.time)+1|0)},pt===lt&&(St=!0),Xe(2)},pt.fps=function(Ce){return arguments.length?(B=Ce,dt=1/(B||60),wt=this.time+dt,void pt.wake()):B},pt.useRAF=function(Ce){return arguments.length?(pt.sleep(),se=Ce,void pt.fps(B)):se},pt.fps(_),setTimeout(function(){se==="auto"&&pt.frame<5&&(mt||{}).visibilityState!=="hidden"&&pt.useRAF(!1)},1500)}),Y=At.Ticker.prototype=new At.events.EventDispatcher,Y.constructor=At.Ticker;var jt=w("core.Animation",function(_,D){if(this.vars=D=D||{},this._duration=this._totalDuration=_||0,this._delay=Number(D.delay)||0,this._timeScale=1,this._active=D.immediateRender===!0,this.data=D.data,this._reversed=D.reversed===!0,Ii){St||lt.wake();var B=this.vars.useFrames?ji:Ii;B.add(this,B._time),this.vars.paused&&this.paused(!0)}});lt=jt.ticker=new At.Ticker,Y=jt.prototype,Y._dirty=Y._gc=Y._initted=Y._paused=!1,Y._totalTime=Y._time=0,Y._rawPrevTime=-1,Y._next=Y._last=Y._onUpdate=Y._timeline=Y.timeline=null,Y._paused=!1;var ie=function(){St&&Lt()-Gt>2e3&&((mt||{}).visibilityState!=="hidden"||!lt.lagSmoothing())&<.wake();var _=setTimeout(ie,2e3);_.unref&&_.unref()};ie(),Y.play=function(_,D){return _!=null&&this.seek(_,D),this.reversed(!1).paused(!1)},Y.pause=function(_,D){return _!=null&&this.seek(_,D),this.paused(!0)},Y.resume=function(_,D){return _!=null&&this.seek(_,D),this.paused(!1)},Y.seek=function(_,D){return this.totalTime(Number(_),D!==!1)},Y.restart=function(_,D){return this.reversed(!1).paused(!1).totalTime(_?-this._delay:0,D!==!1,!0)},Y.reverse=function(_,D){return _!=null&&this.seek(_||this.totalDuration(),D),this.reversed(!0).paused(!1)},Y.render=function(_,D,B){},Y.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},Y.isActive=function(){var _,D=this._timeline,B=this._startTime;return!D||!this._gc&&!this._paused&&D.isActive()&&(_=D.rawTime(!0))>=B&&_<B+this.totalDuration()/this._timeScale-1e-7},Y._enabled=function(_,D){return St||lt.wake(),this._gc=!_,this._active=this.isActive(),D!==!0&&(_&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!_&&this.timeline&&this._timeline._remove(this,!0)),!1},Y._kill=function(_,D){return this._enabled(!1,!1)},Y.kill=function(_,D){return this._kill(_,D),this},Y._uncache=function(_){for(var D=_?this:this.timeline;D;)D._dirty=!0,D=D.timeline;return this},Y._swapSelfInParams=function(_){for(var D=_.length,B=_.concat();--D>-1;)_[D]==="{self}"&&(B[D]=this);return B},Y._callback=function(_){var D=this.vars,B=D[_],U=D[_+"Params"],J=D[_+"Scope"]||D.callbackScope||this,dt=U?U.length:0;switch(dt){case 0:B.call(J);break;case 1:B.call(J,U[0]);break;case 2:B.call(J,U[0],U[1]);break;default:B.apply(J,U)}},Y.eventCallback=function(_,D,B,U){if((_||"").substr(0,2)==="on"){var J=this.vars;if(arguments.length===1)return J[_];D==null?delete J[_]:(J[_]=D,J[_+"Params"]=H(B)&&B.join("").indexOf("{self}")!==-1?this._swapSelfInParams(B):B,J[_+"Scope"]=U),_==="onUpdate"&&(this._onUpdate=D)}return this},Y.delay=function(_){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+_-this._delay),this._delay=_,this):this._delay},Y.duration=function(_){return arguments.length?(this._duration=this._totalDuration=_,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&_!==0&&this.totalTime(this._totalTime*(_/this._duration),!0),this):(this._dirty=!1,this._duration)},Y.totalDuration=function(_){return this._dirty=!1,arguments.length?this.duration(_):this._totalDuration},Y.time=function(_,D){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(_>this._duration?this._duration:_,D)):this._time},Y.totalTime=function(_,D,B){if(St||lt.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>_&&!B&&(_+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var U=this._totalDuration,J=this._timeline;if(_>U&&!B&&(_=U),this._startTime=(this._paused?this._pauseTime:J._time)-(this._reversed?U-_:_)/this._timeScale,J._dirty||this._uncache(!1),J._timeline)for(;J._timeline;)J._timeline._time!==(J._startTime+J._totalTime)/J._timeScale&&J.totalTime(J._totalTime,!0),J=J._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==_||this._duration===0)&&(Rt.length&&ci(),this.render(_,D,!1),Rt.length&&ci())}return this},Y.progress=Y.totalProgress=function(_,D){var B=this.duration();return arguments.length?this.totalTime(B*_,D):B?this._time/B:this.ratio},Y.startTime=function(_){return arguments.length?(_!==this._startTime&&(this._startTime=_,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,_-this._delay)),this):this._startTime},Y.endTime=function(_){return this._startTime+(_!=0?this.totalDuration():this.duration())/this._timeScale},Y.timeScale=function(_){if(!arguments.length)return this._timeScale;var D,B;for(_=_||Dt,this._timeline&&this._timeline.smoothChildTiming&&(D=this._pauseTime,B=D||D===0?D:this._timeline.totalTime(),this._startTime=B-(B-this._startTime)*this._timeScale/_),this._timeScale=_,B=this.timeline;B&&B.timeline;)B._dirty=!0,B.totalDuration(),B=B.timeline;return this},Y.reversed=function(_){return arguments.length?(_!=this._reversed&&(this._reversed=_,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},Y.paused=function(_){if(!arguments.length)return this._paused;var D,B,U=this._timeline;return _!=this._paused&&U&&(St||_||lt.wake(),D=U.rawTime(),B=D-this._pauseTime,!_&&U.smoothChildTiming&&(this._startTime+=B,this._uncache(!1)),this._pauseTime=_?D:null,this._paused=_,this._active=this.isActive(),!_&&B!==0&&this._initted&&this.duration()&&(D=U.smoothChildTiming?this._totalTime:(D-this._startTime)/this._timeScale,this.render(D,D===this._totalTime,!0))),this._gc&&!_&&this._enabled(!0,!1),this};var ct=w("core.SimpleTimeline",function(_){jt.call(this,0,_),this.autoRemoveChildren=this.smoothChildTiming=!0});Y=ct.prototype=new jt,Y.constructor=ct,Y.kill()._gc=!1,Y._first=Y._last=Y._recent=null,Y._sortChildren=!1,Y.add=Y.insert=function(_,D,B,U){var J,dt;if(_._startTime=Number(D||0)+_._delay,_._paused&&this!==_._timeline&&(_._pauseTime=this.rawTime()-(_._timeline.rawTime()-_._pauseTime)),_.timeline&&_.timeline._remove(_,!0),_.timeline=_._timeline=this,_._gc&&_._enabled(!0,!0),J=this._last,this._sortChildren)for(dt=_._startTime;J&&J._startTime>dt;)J=J._prev;return J?(_._next=J._next,J._next=_):(_._next=this._first,this._first=_),_._next?_._next._prev=_:this._last=_,_._prev=J,this._recent=_,this._timeline&&this._uncache(!0),this},Y._remove=function(_,D){return _.timeline===this&&(D||_._enabled(!1,!0),_._prev?_._prev._next=_._next:this._first===_&&(this._first=_._next),_._next?_._next._prev=_._prev:this._last===_&&(this._last=_._prev),_._next=_._prev=_.timeline=null,_===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},Y.render=function(_,D,B){var U,J=this._first;for(this._totalTime=this._time=this._rawPrevTime=_;J;)U=J._next,(J._active||_>=J._startTime&&!J._paused&&!J._gc)&&(J._reversed?J.render((J._dirty?J.totalDuration():J._totalDuration)-(_-J._startTime)*J._timeScale,D,B):J.render((_-J._startTime)*J._timeScale,D,B)),J=U},Y.rawTime=function(){return St||lt.wake(),this._totalTime};var kt=w("TweenLite",function(_,D,B){if(jt.call(this,D,B),this.render=kt.prototype.render,_==null)throw"Cannot tween a null target.";this.target=_=typeof _!="string"?_:kt.selector(_)||_;var U,J,dt,wt=_.jquery||_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType),pt=this.vars.overwrite;if(this._overwrite=pt=pt==null?Cn[kt.defaultOverwrite]:typeof pt=="number"?pt>>0:Cn[pt],(wt||_ instanceof Array||_.push&&H(_))&&typeof _[0]!="number")for(this._targets=dt=_t(_),this._propLookup=[],this._siblings=[],U=0;U<dt.length;U++)J=dt[U],J?typeof J!="string"?J.length&&J!==p&&J[0]&&(J[0]===p||J[0].nodeType&&J[0].style&&!J.nodeType)?(dt.splice(U--,1),this._targets=dt=dt.concat(_t(J))):(this._siblings[U]=Oe(J,this,!1),pt===1&&this._siblings[U].length>1&&Tn(J,this,null,1,this._siblings[U])):(J=dt[U--]=kt.selector(J),typeof J=="string"&&dt.splice(U+1,1)):dt.splice(U--,1);else this._propLookup={},this._siblings=Oe(_,this,!1),pt===1&&this._siblings.length>1&&Tn(_,this,null,1,this._siblings);(this.vars.immediateRender||D===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-Dt,this.render(Math.min(0,-this._delay)))},!0),Me=function(_){return _&&_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType)},gi=function(_,D){var B,U={};for(B in _)Mn[B]||B in D&&B!=="transform"&&B!=="x"&&B!=="y"&&B!=="width"&&B!=="height"&&B!=="className"&&B!=="border"||!(!be[B]||be[B]&&be[B]._autoCSS)||(U[B]=_[B],delete _[B]);_.css=U};Y=kt.prototype=new jt,Y.constructor=kt,Y.kill()._gc=!1,Y.ratio=0,Y._firstPT=Y._targets=Y._overwrittenProps=Y._startAt=null,Y._notifyPluginsOfEnabled=Y._lazy=!1,kt.version="2.0.2",kt.defaultEase=Y._ease=new b(null,null,1,1),kt.defaultOverwrite="auto",kt.ticker=lt,kt.autoSleep=120,kt.lagSmoothing=function(_,D){lt.lagSmoothing(_,D)},kt.selector=p.$||p.jQuery||function(_){var D=p.$||p.jQuery;return D?(kt.selector=D,D(_)):(mt||(mt=p.document),mt?mt.querySelectorAll?mt.querySelectorAll(_):mt.getElementById(_.charAt(0)==="#"?_.substr(1):_):_)};var Rt=[],Fe={},vi=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Ti=/[\+-]=-?[\.\d]/,oi=function(_){for(var D,B=this._firstPT,U=1e-6;B;)D=B.blob?_===1&&this.end!=null?this.end:_?this.join(""):this.start:B.c*_+B.s,B.m?D=B.m.call(this._tween,D,this._target||B.t,this._tween):U>D&&D>-U&&!B.blob&&(D=0),B.f?B.fp?B.t[B.p](B.fp,D):B.t[B.p](D):B.t[B.p]=D,B=B._next},fe=function(_,D,B,U){var J,dt,wt,pt,ae,se,Ut,he=[],ze=0,Xe="",Ce=0;for(he.start=_,he.end=D,_=he[0]=_+"",D=he[1]=D+"",B&&(B(he),_=he[0],D=he[1]),he.length=0,J=_.match(vi)||[],dt=D.match(vi)||[],U&&(U._next=null,U.blob=1,he._firstPT=he._applyPT=U),ae=dt.length,pt=0;ae>pt;pt++)Ut=dt[pt],se=D.substr(ze,D.indexOf(Ut,ze)-ze),Xe+=se||!pt?se:",",ze+=se.length,Ce?Ce=(Ce+1)%5:se.substr(-5)==="rgba("&&(Ce=1),Ut===J[pt]||J.length<=pt?Xe+=Ut:(Xe&&(he.push(Xe),Xe=""),wt=parseFloat(J[pt]),he.push(wt),he._firstPT={_next:he._firstPT,t:he,p:he.length-1,s:wt,c:(Ut.charAt(1)==="="?parseInt(Ut.charAt(0)+"1",10)*parseFloat(Ut.substr(2)):parseFloat(Ut)-wt)||0,f:0,m:Ce&&4>Ce?Math.round:0}),ze+=Ut.length;return Xe+=D.substr(ze),Xe&&he.push(Xe),he.setRatio=oi,Ti.test(D)&&(he.end=null),he},Je=function(_,D,B,U,J,dt,wt,pt,ae){typeof U=="function"&&(U=U(ae||0,_));var se,Ut=typeof _[D],he=Ut!=="function"?"":D.indexOf("set")||typeof _["get"+D.substr(3)]!="function"?D:"get"+D.substr(3),ze=B!=="get"?B:he?wt?_[he](wt):_[he]():_[D],Xe=typeof U=="string"&&U.charAt(1)==="=",Ce={t:_,p:D,s:ze,f:Ut==="function",pg:0,n:J||D,m:dt?typeof dt=="function"?dt:Math.round:0,pr:0,c:Xe?parseInt(U.charAt(0)+"1",10)*parseFloat(U.substr(2)):parseFloat(U)-ze||0};return(typeof ze!="number"||typeof U!="number"&&!Xe)&&(wt||isNaN(ze)||!Xe&&isNaN(U)||typeof ze=="boolean"||typeof U=="boolean"?(Ce.fp=wt,se=fe(ze,Xe?parseFloat(Ce.s)+Ce.c+(Ce.s+"").replace(/[0-9\-\.]/g,""):U,pt||kt.defaultStringFilter,Ce),Ce={t:se,p:"setRatio",s:0,c:1,f:2,pg:0,n:J||D,pr:0,m:0}):(Ce.s=parseFloat(ze),Xe||(Ce.c=parseFloat(U)-Ce.s||0))),Ce.c?((Ce._next=this._firstPT)&&(Ce._next._prev=Ce),this._firstPT=Ce,Ce):void 0},Ri=kt._internals={isArray:H,isSelector:Me,lazyTweens:Rt,blobDif:fe},be=kt._plugins={},Ve=Ri.tweenLookup={},Ke=0,Mn=Ri.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},Cn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},ji=jt._rootFramesTimeline=new ct,Ii=jt._rootTimeline=new ct,en=30,ci=Ri.lazyRender=function(){var _,D=Rt.length;for(Fe={};--D>-1;)_=Rt[D],_&&_._lazy!==!1&&(_.render(_._lazy[0],_._lazy[1],!0),_._lazy=!1);Rt.length=0};Ii._startTime=lt.time,ji._startTime=lt.frame,Ii._active=ji._active=!0,setTimeout(ci,1),jt._updateRoot=kt.render=function(){var _,D,B;if(Rt.length&&ci(),Ii.render((lt.time-Ii._startTime)*Ii._timeScale,!1,!1),ji.render((lt.frame-ji._startTime)*ji._timeScale,!1,!1),Rt.length&&ci(),lt.frame>=en){en=lt.frame+(parseInt(kt.autoSleep,10)||120);for(B in Ve){for(D=Ve[B].tweens,_=D.length;--_>-1;)D[_]._gc&&D.splice(_,1);D.length===0&&delete Ve[B]}if(B=Ii._first,(!B||B._paused)&&kt.autoSleep&&!ji._first&<._listeners.tick.length===1){for(;B&&B._paused;)B=B._next;B||lt.sleep()}}},lt.addEventListener("tick",jt._updateRoot);var Oe=function(_,D,B){var U,J,dt=_._gsTweenID;if(Ve[dt||(_._gsTweenID=dt="t"+Ke++)]||(Ve[dt]={target:_,tweens:[]}),D&&(U=Ve[dt].tweens,U[J=U.length]=D,B))for(;--J>-1;)U[J]===D&&U.splice(J,1);return Ve[dt].tweens},Si=function(_,D,B,U){var J,dt,wt=_.vars.onOverwrite;return wt&&(J=wt(_,D,B,U)),wt=kt.onOverwrite,wt&&(dt=wt(_,D,B,U)),J!==!1&&dt!==!1},Tn=function(_,D,B,U,J){var dt,wt,pt,ae;if(U===1||U>=4){for(ae=J.length,dt=0;ae>dt;dt++)if((pt=J[dt])!==D)pt._gc||pt._kill(null,_,D)&&(wt=!0);else if(U===5)break;return wt}var se,Ut=D._startTime+Dt,he=[],ze=0,Xe=D._duration===0;for(dt=J.length;--dt>-1;)(pt=J[dt])===D||pt._gc||pt._paused||(pt._timeline!==D._timeline?(se=se||nn(D,0,Xe),nn(pt,se,Xe)===0&&(he[ze++]=pt)):pt._startTime<=Ut&&pt._startTime+pt.totalDuration()/pt._timeScale>Ut&&((Xe||!pt._initted)&&Ut-pt._startTime<=2e-10||(he[ze++]=pt)));for(dt=ze;--dt>-1;)if(pt=he[dt],ae=pt._firstPT,U===2&&pt._kill(B,_,D)&&(wt=!0),U!==2||!pt._firstPT&&pt._initted&&ae){if(U!==2&&!Si(pt,D))continue;pt._enabled(!1,!1)&&(wt=!0)}return wt},nn=function(_,D,B){for(var U=_._timeline,J=U._timeScale,dt=_._startTime;U._timeline;){if(dt+=U._startTime,J*=U._timeScale,U._paused)return-100;U=U._timeline}return dt/=J,dt>D?dt-D:B&&dt===D||!_._initted&&2*Dt>dt-D?Dt:(dt+=_.totalDuration()/_._timeScale/J)>D+Dt?0:dt-D-Dt};Y._init=function(){var _,D,B,U,J,dt,wt=this.vars,pt=this._overwrittenProps,ae=this._duration,se=!!wt.immediateRender,Ut=wt.ease;if(wt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),J={};for(U in wt.startAt)J[U]=wt.startAt[U];if(J.data="isStart",J.overwrite=!1,J.immediateRender=!0,J.lazy=se&&wt.lazy!==!1,J.startAt=J.delay=null,J.onUpdate=wt.onUpdate,J.onUpdateParams=wt.onUpdateParams,J.onUpdateScope=wt.onUpdateScope||wt.callbackScope||this,this._startAt=kt.to(this.target||{},0,J),se){if(this._time>0)this._startAt=null;else if(ae!==0)return}}else if(wt.runBackwards&&ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(se=!1),B={};for(U in wt)Mn[U]&&U!=="autoCSS"||(B[U]=wt[U]);if(B.overwrite=0,B.data="isFromStart",B.lazy=se&&wt.lazy!==!1,B.immediateRender=se,this._startAt=kt.to(this.target,0,B),se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=Ut=Ut?Ut instanceof b?Ut:typeof Ut=="function"?new b(Ut,wt.easeParams):F[Ut]||kt.defaultEase:kt.defaultEase,wt.easeParams instanceof Array&&Ut.config&&(this._ease=Ut.config.apply(Ut,wt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(dt=this._targets.length,_=0;dt>_;_++)this._initProps(this._targets[_],this._propLookup[_]={},this._siblings[_],pt?pt[_]:null,_)&&(D=!0);else D=this._initProps(this.target,this._propLookup,this._siblings,pt,0);if(D&&kt._onPluginEvent("_onInitAllProps",this),pt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),wt.runBackwards)for(B=this._firstPT;B;)B.s+=B.c,B.c=-B.c,B=B._next;this._onUpdate=wt.onUpdate,this._initted=!0},Y._initProps=function(_,D,B,U,J){var dt,wt,pt,ae,se,Ut;if(_==null)return!1;Fe[_._gsTweenID]&&ci(),this.vars.css||_.style&&_!==p&&_.nodeType&&be.css&&this.vars.autoCSS!==!1&&gi(this.vars,_);for(dt in this.vars)if(Ut=this.vars[dt],Mn[dt])Ut&&(Ut instanceof Array||Ut.push&&H(Ut))&&Ut.join("").indexOf("{self}")!==-1&&(this.vars[dt]=Ut=this._swapSelfInParams(Ut,this));else if(be[dt]&&(ae=new be[dt])._onInitTween(_,this.vars[dt],this,J)){for(this._firstPT=se={_next:this._firstPT,t:ae,p:"setRatio",s:0,c:1,f:1,n:dt,pg:1,pr:ae._priority,m:0},wt=ae._overwriteProps.length;--wt>-1;)D[ae._overwriteProps[wt]]=this._firstPT;(ae._priority||ae._onInitAllProps)&&(pt=!0),(ae._onDisable||ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),se._next&&(se._next._prev=se)}else D[dt]=Je.call(this,_,dt,"get",Ut,dt,0,null,this.vars.stringFilter,J);return U&&this._kill(U,_)?this._initProps(_,D,B,U,J):this._overwrite>1&&this._firstPT&&B.length>1&&Tn(_,this,D,this._overwrite,B)?(this._kill(D,_),this._initProps(_,D,B,U,J)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Fe[_._gsTweenID]=!0),pt)},Y.render=function(_,D,B){var U,J,dt,wt,pt=this._time,ae=this._duration,se=this._rawPrevTime;if(_>=ae-1e-7&&_>=0)this._totalTime=this._time=ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(U=!0,J="onComplete",B=B||this._timeline.autoRemoveChildren),ae===0&&(this._initted||!this.vars.lazy||B)&&(this._startTime===this._timeline._duration&&(_=0),(0>se||0>=_&&_>=-1e-7||se===Dt&&this.data!=="isPause")&&se!==_&&(B=!0,se>Dt&&(J="onReverseComplete")),this._rawPrevTime=wt=!D||_||se===_?_:Dt);else if(1e-7>_)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(pt!==0||ae===0&&se>0)&&(J="onReverseComplete",U=this._reversed),0>_&&(this._active=!1,ae===0&&(this._initted||!this.vars.lazy||B)&&(se>=0&&(se!==Dt||this.data!=="isPause")&&(B=!0),this._rawPrevTime=wt=!D||_||se===_?_:Dt)),(!this._initted||this._startAt&&this._startAt.progress())&&(B=!0);else if(this._totalTime=this._time=_,this._easeType){var Ut=_/ae,he=this._easeType,ze=this._easePower;(he===1||he===3&&Ut>=.5)&&(Ut=1-Ut),he===3&&(Ut*=2),ze===1?Ut*=Ut:ze===2?Ut*=Ut*Ut:ze===3?Ut*=Ut*Ut*Ut:ze===4&&(Ut*=Ut*Ut*Ut*Ut),he===1?this.ratio=1-Ut:he===2?this.ratio=Ut:.5>_/ae?this.ratio=Ut/2:this.ratio=1-Ut/2}else this.ratio=this._ease.getRatio(_/ae);if(this._time!==pt||B){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!B&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=pt,this._rawPrevTime=se,Rt.push(this),void(this._lazy=[_,D]);this._time&&!U?this.ratio=this._ease.getRatio(this._time/ae):U&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==pt&&_>=0&&(this._active=!0),pt===0&&(this._startAt&&(_>=0?this._startAt.render(_,!0,B):J||(J="_dummyGS")),this.vars.onStart&&(this._time!==0||ae===0)&&(D||this._callback("onStart"))),dt=this._firstPT;dt;)dt.f?dt.t[dt.p](dt.c*this.ratio+dt.s):dt.t[dt.p]=dt.c*this.ratio+dt.s,dt=dt._next;this._onUpdate&&(0>_&&this._startAt&&_!==-1e-4&&this._startAt.render(_,!0,B),D||(this._time!==pt||U||B)&&this._callback("onUpdate")),J&&(!this._gc||B)&&(0>_&&this._startAt&&!this._onUpdate&&_!==-1e-4&&this._startAt.render(_,!0,B),U&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!D&&this.vars[J]&&this._callback(J),ae===0&&this._rawPrevTime===Dt&&wt!==Dt&&(this._rawPrevTime=0))}},Y._kill=function(_,D,B){if(_==="all"&&(_=null),_==null&&(D==null||D===this.target))return this._lazy=!1,this._enabled(!1,!1);D=typeof D!="string"?D||this._targets||this.target:kt.selector(D)||D;var U,J,dt,wt,pt,ae,se,Ut,he,ze=B&&this._time&&B._startTime===this._startTime&&this._timeline===B._timeline,Xe=this._firstPT;if((H(D)||Me(D))&&typeof D[0]!="number")for(U=D.length;--U>-1;)this._kill(_,D[U],B)&&(ae=!0);else{if(this._targets){for(U=this._targets.length;--U>-1;)if(D===this._targets[U]){pt=this._propLookup[U]||{},this._overwrittenProps=this._overwrittenProps||[],J=this._overwrittenProps[U]=_?this._overwrittenProps[U]||{}:"all";break}}else{if(D!==this.target)return!1;pt=this._propLookup,J=this._overwrittenProps=_?this._overwrittenProps||{}:"all"}if(pt){if(se=_||pt,Ut=_!==J&&J!=="all"&&_!==pt&&(typeof _!="object"||!_._tempKill),B&&(kt.onOverwrite||this.vars.onOverwrite)){for(dt in se)pt[dt]&&(he||(he=[]),he.push(dt));if((he||!_)&&!Si(this,B,D,he))return!1}for(dt in se)(wt=pt[dt])&&(ze&&(wt.f?wt.t[wt.p](wt.s):wt.t[wt.p]=wt.s,ae=!0),wt.pg&&wt.t._kill(se)&&(ae=!0),wt.pg&&wt.t._overwriteProps.length!==0||(wt._prev?wt._prev._next=wt._next:wt===this._firstPT&&(this._firstPT=wt._next),wt._next&&(wt._next._prev=wt._prev),wt._next=wt._prev=null),delete pt[dt]),Ut&&(J[dt]=1);!this._firstPT&&this._initted&&Xe&&this._enabled(!1,!1)}}return ae},Y.invalidate=function(){return this._notifyPluginsOfEnabled&&kt._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],jt.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-Dt,this.render(Math.min(0,-this._delay))),this},Y._enabled=function(_,D){if(St||lt.wake(),_&&this._gc){var B,U=this._targets;if(U)for(B=U.length;--B>-1;)this._siblings[B]=Oe(U[B],this,!0);else this._siblings=Oe(this.target,this,!0)}return jt.prototype._enabled.call(this,_,D),this._notifyPluginsOfEnabled&&this._firstPT?kt._onPluginEvent(_?"_onEnable":"_onDisable",this):!1},kt.to=function(_,D,B){return new kt(_,D,B)},kt.from=function(_,D,B){return B.runBackwards=!0,B.immediateRender=B.immediateRender!=0,new kt(_,D,B)},kt.fromTo=function(_,D,B,U){return U.startAt=B,U.immediateRender=U.immediateRender!=0&&B.immediateRender!=0,new kt(_,D,U)},kt.delayedCall=function(_,D,B,U,J){return new kt(D,0,{delay:_,onComplete:D,onCompleteParams:B,callbackScope:U,onReverseComplete:D,onReverseCompleteParams:B,immediateRender:!1,lazy:!1,useFrames:J,overwrite:0})},kt.set=function(_,D){return new kt(_,0,D)},kt.getTweensOf=function(_,D){if(_==null)return[];_=typeof _!="string"?_:kt.selector(_)||_;var B,U,J,dt;if((H(_)||Me(_))&&typeof _[0]!="number"){for(B=_.length,U=[];--B>-1;)U=U.concat(kt.getTweensOf(_[B],D));for(B=U.length;--B>-1;)for(dt=U[B],J=B;--J>-1;)dt===U[J]&&U.splice(B,1)}else if(_._gsTweenID)for(U=Oe(_).concat(),B=U.length;--B>-1;)(U[B]._gc||D&&!U[B].isActive())&&U.splice(B,1);return U||[]},kt.killTweensOf=kt.killDelayedCallsTo=function(_,D,B){typeof D=="object"&&(B=D,D=!1);for(var U=kt.getTweensOf(_,D),J=U.length;--J>-1;)U[J]._kill(B,_)};var Ci=w("plugins.TweenPlugin",function(_,D){this._overwriteProps=(_||"").split(","),this._propName=this._overwriteProps[0],this._priority=D||0,this._super=Ci.prototype},!0);if(Y=Ci.prototype,Ci.version="1.19.0",Ci.API=2,Y._firstPT=null,Y._addTween=Je,Y.setRatio=oi,Y._kill=function(_){var D,B=this._overwriteProps,U=this._firstPT;if(_[this._propName]!=null)this._overwriteProps=[];else for(D=B.length;--D>-1;)_[B[D]]!=null&&B.splice(D,1);for(;U;)_[U.n]!=null&&(U._next&&(U._next._prev=U._prev),U._prev?(U._prev._next=U._next,U._prev=null):this._firstPT===U&&(this._firstPT=U._next)),U=U._next;return!1},Y._mod=Y._roundProps=function(_){for(var D,B=this._firstPT;B;)D=_[this._propName]||B.n!=null&&_[B.n.split(this._propName+"_").join("")],D&&typeof D=="function"&&(B.f===2?B.t._applyPT.m=D:B.m=D),B=B._next},kt._onPluginEvent=function(_,D){var B,U,J,dt,wt,pt=D._firstPT;if(_==="_onInitAllProps"){for(;pt;){for(wt=pt._next,U=J;U&&U.pr>pt.pr;)U=U._next;(pt._prev=U?U._prev:dt)?pt._prev._next=pt:J=pt,(pt._next=U)?U._prev=pt:dt=pt,pt=wt}pt=D._firstPT=J}for(;pt;)pt.pg&&typeof pt.t[_]=="function"&&pt.t[_]()&&(B=!0),pt=pt._next;return B},Ci.activate=function(_){for(var D=_.length;--D>-1;)_[D].API===Ci.API&&(be[new _[D]()._propName]=_[D]);return!0},O.plugin=function(_){if(!(_&&_.propName&&_.init&&_.API))throw"illegal plugin definition.";var D,B=_.propName,U=_.priority||0,J=_.overwriteProps,dt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},wt=w("plugins."+B.charAt(0).toUpperCase()+B.substr(1)+"Plugin",function(){Ci.call(this,B,U),this._overwriteProps=J||[]},_.global===!0),pt=wt.prototype=new Ci(B);pt.constructor=wt,wt.API=_.API;for(D in dt)typeof _[D]=="function"&&(pt[dt[D]]=_[D]);return wt.version=_.version,Ci.activate([wt]),wt},yt=p._gsQueue){for(Ct=0;Ct<yt.length;Ct++)yt[Ct]();for(Y in m)m[Y].func||p.console.log("GSAP encountered missing dependency: "+Y)}St=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const ka={class:"modal-background"},Va=["innerHTML"],ja={name:"MapModali"},Hs=Se.defineComponent({...ja,props:{},setup(p,{expose:Ot}){const $=Se.ref(""),mt=Se.ref(""),ht=yt=>{mt.value=yt,$.value="five"},M=()=>{$.value=$.value+" out"};return Se.onMounted(()=>{}),Ot({text:mt,show:ht,hide:M}),(yt,Ct)=>(Se.openBlock(),Se.createElementBlock("div",{id:"modal-container",class:Se.normalizeClass($.value),onClick:M},[Se.createElementVNode("div",ka,[Se.createElementVNode("div",{class:"modal",onClick:Ct[0]||(Ct[0]=Y=>{Y.stopPropagation()})},[Se.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:mt.value},null,8,Va)])])],2))}}),Mh="",Wa={class:"content"},Xa=Se.createElementVNode("canvas",{class:"landscape"},null,-1),qa={class:"content__title"},Ya=Se.createElementVNode("div",{class:"overlay"},null,-1),Za={name:"BimBackgroundPlate"},ks=Se.defineComponent({...Za,setup(p){const Ot=()=>{let ht=`
|
|
13
|
+
**/var $e=typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window;($e._gsQueue||($e._gsQueue=[])).push(function(){$e._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,Ot,$){var mt=function(K){var H,m=[],f=K.length;for(H=0;H!==f;m.push(K[H++]));return m},ht=function(K,H,m){var f,O,w=K.cycle;for(f in w)O=w[f],K[f]=typeof O=="function"?O(m,H[m]):O[m%O.length];delete K.cycle},M=function(K,H,m){$.call(this,K,H,m),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=M.prototype.render},yt=1e-10,Ct=$._internals,Y=Ct.isSelector,lt=Ct.isArray,St=M.prototype=$.to({},.1,{}),ut=[];M.version="2.0.2",St.constructor=M,St.kill()._gc=!1,M.killTweensOf=M.killDelayedCallsTo=$.killTweensOf,M.getTweensOf=$.getTweensOf,M.lagSmoothing=$.lagSmoothing,M.ticker=$.ticker,M.render=$.render,St.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),$.prototype.invalidate.call(this)},St.updateTo=function(K,H){var m,f=this.ratio,O=this.vars.immediateRender||K.immediateRender;H&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(m in K)this.vars[m]=K[m];if(this._initted||O){if(H)this._initted=!1,O&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&$._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var w=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(w,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||O)for(var X,b=1/(1-f),F=this._firstPT;F;)X=F.s+F.c,F.c*=b,F.s=X-F.c,F=F._next}return this},St.render=function(K,H,m){this._initted||this._duration===0&&this.vars.repeat&&this.invalidate();var f,O,w,X,b,F,Z,st,it,Pt=this._dirty?this.totalDuration():this._totalDuration,Lt=this._time,Gt=this._totalTime,jt=this._cycle,ie=this._duration,ct=this._rawPrevTime;if(K>=Pt-1e-7&&K>=0?(this._totalTime=Pt,this._cycle=this._repeat,this._yoyo&&1&this._cycle?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=ie,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(f=!0,O="onComplete",m=m||this._timeline.autoRemoveChildren),ie===0&&(this._initted||!this.vars.lazy||m)&&(this._startTime===this._timeline._duration&&(K=0),(0>ct||0>=K&&K>=-1e-7||ct===yt&&this.data!=="isPause")&&ct!==K&&(m=!0,ct>yt&&(O="onReverseComplete")),this._rawPrevTime=st=!H||K||ct===K?K:yt)):1e-7>K?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(Gt!==0||ie===0&&ct>0)&&(O="onReverseComplete",f=this._reversed),0>K&&(this._active=!1,ie===0&&(this._initted||!this.vars.lazy||m)&&(ct>=0&&(m=!0),this._rawPrevTime=st=!H||K||ct===K?K:yt)),this._initted||(m=!0)):(this._totalTime=this._time=K,this._repeat!==0&&(X=ie+this._repeatDelay,this._cycle=this._totalTime/X>>0,this._cycle!==0&&this._cycle===this._totalTime/X&&K>=Gt&&this._cycle--,this._time=this._totalTime-this._cycle*X,this._yoyo&&1&this._cycle&&(this._time=ie-this._time,it=this._yoyoEase||this.vars.yoyoEase,it&&(this._yoyoEase||(it!==!0||this._initted?this._yoyoEase=it=it===!0?this._ease:it instanceof Ease?it:Ease.map[it]:(it=this.vars.ease,this._yoyoEase=it=it?it instanceof Ease?it:typeof it=="function"?new Ease(it,this.vars.easeParams):Ease.map[it]||$.defaultEase:$.defaultEase)),this.ratio=it?1-it.getRatio((ie-this._time)/ie):0)),this._time>ie?this._time=ie:this._time<0&&(this._time=0)),this._easeType&&!it?(b=this._time/ie,F=this._easeType,Z=this._easePower,(F===1||F===3&&b>=.5)&&(b=1-b),F===3&&(b*=2),Z===1?b*=b:Z===2?b*=b*b:Z===3?b*=b*b*b:Z===4&&(b*=b*b*b*b),F===1?this.ratio=1-b:F===2?this.ratio=b:this._time/ie<.5?this.ratio=b/2:this.ratio=1-b/2):it||(this.ratio=this._ease.getRatio(this._time/ie))),Lt===this._time&&!m&&jt===this._cycle)return void(Gt!==this._totalTime&&this._onUpdate&&(H||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!m&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=Lt,this._totalTime=Gt,this._rawPrevTime=ct,this._cycle=jt,Ct.lazyTweens.push(this),void(this._lazy=[K,H]);!this._time||f||it?f&&this._ease._calcEnd&&!it&&(this.ratio=this._ease.getRatio(this._time===0?0:1)):this.ratio=this._ease.getRatio(this._time/ie)}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==Lt&&K>=0&&(this._active=!0),Gt===0&&(this._initted===2&&K>0&&this._init(),this._startAt&&(K>=0?this._startAt.render(K,!0,m):O||(O="_dummyGS")),this.vars.onStart&&(this._totalTime!==0||ie===0)&&(H||this._callback("onStart"))),w=this._firstPT;w;)w.f?w.t[w.p](w.c*this.ratio+w.s):w.t[w.p]=w.c*this.ratio+w.s,w=w._next;this._onUpdate&&(0>K&&this._startAt&&this._startTime&&this._startAt.render(K,!0,m),H||(this._totalTime!==Gt||O)&&this._callback("onUpdate")),this._cycle!==jt&&(H||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),O&&(!this._gc||m)&&(0>K&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(K,!0,m),f&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!H&&this.vars[O]&&this._callback(O),ie===0&&this._rawPrevTime===yt&&st!==yt&&(this._rawPrevTime=0))},M.to=function(K,H,m){return new M(K,H,m)},M.from=function(K,H,m){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,new M(K,H,m)},M.fromTo=function(K,H,m,f){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,new M(K,H,f)},M.staggerTo=M.allTo=function(K,H,m,f,O,w,X){f=f||0;var b,F,Z,st,it=0,Pt=[],Lt=function(){m.onComplete&&m.onComplete.apply(m.onCompleteScope||this,arguments),O.apply(X||m.callbackScope||this,w||ut)},Gt=m.cycle,jt=m.startAt&&m.startAt.cycle;for(lt(K)||(typeof K=="string"&&(K=$.selector(K)||K),Y(K)&&(K=mt(K))),K=K||[],0>f&&(K=mt(K),K.reverse(),f*=-1),b=K.length-1,Z=0;b>=Z;Z++){F={};for(st in m)F[st]=m[st];if(Gt&&(ht(F,K,Z),F.duration!=null&&(H=F.duration,delete F.duration)),jt){jt=F.startAt={};for(st in m.startAt)jt[st]=m.startAt[st];ht(F.startAt,K,Z)}F.delay=it+(F.delay||0),Z===b&&O&&(F.onComplete=Lt),Pt[Z]=new M(K[Z],H,F),it+=f}return Pt},M.staggerFrom=M.allFrom=function(K,H,m,f,O,w,X){return m.runBackwards=!0,m.immediateRender=m.immediateRender!=0,M.staggerTo(K,H,m,f,O,w,X)},M.staggerFromTo=M.allFromTo=function(K,H,m,f,O,w,X,b){return f.startAt=m,f.immediateRender=f.immediateRender!=0&&m.immediateRender!=0,M.staggerTo(K,H,f,O,w,X,b)},M.delayedCall=function(K,H,m,f,O){return new M(H,0,{delay:K,onComplete:H,onCompleteParams:m,callbackScope:f,onReverseComplete:H,onReverseCompleteParams:m,immediateRender:!1,useFrames:O,overwrite:0})},M.set=function(K,H){return new M(K,0,H)},M.isTweening=function(K){return $.getTweensOf(K,!0).length>0};var At=function(K,H){for(var m=[],f=0,O=K._first;O;)O instanceof $?m[f++]=O:(H&&(m[f++]=O),m=m.concat(At(O,H)),f=m.length),O=O._next;return m},Dt=M.getAllTweens=function(K){return At(p._rootTimeline,K).concat(At(p._rootFramesTimeline,K))};M.killAll=function(K,H,m,f){H==null&&(H=!0),m==null&&(m=!0);var O,w,X,b=Dt(f!=0),F=b.length,Z=H&&m&&f;for(X=0;F>X;X++)w=b[X],(Z||w instanceof Ot||(O=w.target===w.vars.onComplete)&&m||H&&!O)&&(K?w.totalTime(w._reversed?0:w.totalDuration()):w._enabled(!1,!1))},M.killChildTweensOf=function(K,H){if(K!=null){var m,f,O,w,X,b=Ct.tweenLookup;if(typeof K=="string"&&(K=$.selector(K)||K),Y(K)&&(K=mt(K)),lt(K))for(w=K.length;--w>-1;)M.killChildTweensOf(K[w],H);else{m=[];for(O in b)for(f=b[O].target.parentNode;f;)f===K&&(m=m.concat(b[O].tweens)),f=f.parentNode;for(X=m.length,w=0;X>w;w++)H&&m[w].totalTime(m[w].totalDuration()),m[w]._enabled(!1,!1)}}};var _t=function(K,H,m,f){H=H!==!1,m=m!==!1,f=f!==!1;for(var O,w,X=Dt(f),b=H&&m&&f,F=X.length;--F>-1;)w=X[F],(b||w instanceof Ot||(O=w.target===w.vars.onComplete)&&m||H&&!O)&&w.paused(K)};return M.pauseAll=function(K,H,m){_t(!0,K,H,m)},M.resumeAll=function(K,H,m){_t(!1,K,H,m)},M.globalTimeScale=function(K){var H=p._rootTimeline,m=$.ticker.time;return arguments.length?(K=K||yt,H._startTime=m-(m-H._startTime)*H._timeScale/K,H=p._rootFramesTimeline,m=$.ticker.frame,H._startTime=m-(m-H._startTime)*H._timeScale/K,H._timeScale=p._rootTimeline._timeScale=K,K):H._timeScale},St.progress=function(K,H){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-K:K)+this._cycle*(this._duration+this._repeatDelay),H):this._time/this.duration()},St.totalProgress=function(K,H){return arguments.length?this.totalTime(this.totalDuration()*K,H):this._totalTime/this.totalDuration()},St.time=function(K,H){return arguments.length?(this._dirty&&this.totalDuration(),K>this._duration&&(K=this._duration),this._yoyo&&1&this._cycle?K=this._duration-K+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(K+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(K,H)):this._time},St.duration=function(K){return arguments.length?p.prototype.duration.call(this,K):this._duration},St.totalDuration=function(K){return arguments.length?this._repeat===-1?this:this.duration((K-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},St.repeat=function(K){return arguments.length?(this._repeat=K,this._uncache(!0)):this._repeat},St.repeatDelay=function(K){return arguments.length?(this._repeatDelay=K,this._uncache(!0)):this._repeatDelay},St.yoyo=function(K){return arguments.length?(this._yoyo=K,this):this._yoyo},M},!0),$e._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(p,Ot,$){var mt=function(m){Ot.call(this,m),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var f,O,w=this.vars;for(O in w)f=w[O],Y(f)&&f.join("").indexOf("{self}")!==-1&&(w[O]=this._swapSelfInParams(f));Y(w.tweens)&&this.add(w.tweens,0,w.align,w.stagger)},ht=1e-10,M=$._internals,yt=mt._internals={},Ct=M.isSelector,Y=M.isArray,lt=M.lazyTweens,St=M.lazyRender,ut=$e._gsDefine.globals,At=function(m){var f,O={};for(f in m)O[f]=m[f];return O},Dt=function(m,f,O){var w,X,b=m.cycle;for(w in b)X=b[w],m[w]=typeof X=="function"?X(O,f[O]):X[O%X.length];delete m.cycle},_t=yt.pauseCallback=function(){},K=function(m){var f,O=[],w=m.length;for(f=0;f!==w;O.push(m[f++]));return O},H=mt.prototype=new Ot;return mt.version="2.0.2",H.constructor=mt,H.kill()._gc=H._forcingPlayhead=H._hasPause=!1,H.to=function(m,f,O,w){var X=O.repeat&&ut.TweenMax||$;return f?this.add(new X(m,f,O),w):this.set(m,O,w)},H.from=function(m,f,O,w){return this.add((O.repeat&&ut.TweenMax||$).from(m,f,O),w)},H.fromTo=function(m,f,O,w,X){var b=w.repeat&&ut.TweenMax||$;return f?this.add(b.fromTo(m,f,O,w),X):this.set(m,w,X)},H.staggerTo=function(m,f,O,w,X,b,F,Z){var st,it,Pt=new mt({onComplete:b,onCompleteParams:F,callbackScope:Z,smoothChildTiming:this.smoothChildTiming}),Lt=O.cycle;for(typeof m=="string"&&(m=$.selector(m)||m),m=m||[],Ct(m)&&(m=K(m)),w=w||0,0>w&&(m=K(m),m.reverse(),w*=-1),it=0;it<m.length;it++)st=At(O),st.startAt&&(st.startAt=At(st.startAt),st.startAt.cycle&&Dt(st.startAt,m,it)),Lt&&(Dt(st,m,it),st.duration!=null&&(f=st.duration,delete st.duration)),Pt.to(m[it],f,st,it*w);return this.add(Pt,X)},H.staggerFrom=function(m,f,O,w,X,b,F,Z){return O.immediateRender=O.immediateRender!=0,O.runBackwards=!0,this.staggerTo(m,f,O,w,X,b,F,Z)},H.staggerFromTo=function(m,f,O,w,X,b,F,Z,st){return w.startAt=O,w.immediateRender=w.immediateRender!=0&&O.immediateRender!=0,this.staggerTo(m,f,w,X,b,F,Z,st)},H.call=function(m,f,O,w){return this.add($.delayedCall(0,m,f,O),w)},H.set=function(m,f,O){return O=this._parseTimeOrLabel(O,0,!0),f.immediateRender==null&&(f.immediateRender=O===this._time&&!this._paused),this.add(new $(m,0,f),O)},mt.exportRoot=function(m,f){m=m||{},m.smoothChildTiming==null&&(m.smoothChildTiming=!0);var O,w,X,b,F=new mt(m),Z=F._timeline;for(f==null&&(f=!0),Z._remove(F,!0),F._startTime=0,F._rawPrevTime=F._time=F._totalTime=Z._time,X=Z._first;X;)b=X._next,f&&X instanceof $&&X.target===X.vars.onComplete||(w=X._startTime-X._delay,0>w&&(O=1),F.add(X,w)),X=b;return Z.add(F,0),O&&F.totalDuration(),F},H.add=function(m,f,O,w){var X,b,F,Z,st,it;if(typeof f!="number"&&(f=this._parseTimeOrLabel(f,0,!0,m)),!(m instanceof p)){if(m instanceof Array||m&&m.push&&Y(m)){for(O=O||"normal",w=w||0,X=f,b=m.length,F=0;b>F;F++)Y(Z=m[F])&&(Z=new mt({tweens:Z})),this.add(Z,X),typeof Z!="string"&&typeof Z!="function"&&(O==="sequence"?X=Z._startTime+Z.totalDuration()/Z._timeScale:O==="start"&&(Z._startTime-=Z.delay())),X+=w;return this._uncache(!0)}if(typeof m=="string")return this.addLabel(m,f);if(typeof m!="function")throw"Cannot add "+m+" into the timeline; it is not a tween, timeline, function, or string.";m=$.delayedCall(0,m)}if(Ot.prototype.add.call(this,m,f),m._time&&(X=Math.max(0,Math.min(m.totalDuration(),(this.rawTime()-m._startTime)*m._timeScale)),Math.abs(X-m._totalTime)>1e-5&&m.render(X,!1,!1)),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(st=this,it=st.rawTime()>m._startTime;st._timeline;)it&&st._timeline.smoothChildTiming?st.totalTime(st._totalTime,!0):st._gc&&st._enabled(!0,!1),st=st._timeline;return this},H.remove=function(m){if(m instanceof p){this._remove(m,!1);var f=m._timeline=m.vars.useFrames?p._rootFramesTimeline:p._rootTimeline;return m._startTime=(m._paused?m._pauseTime:f._time)-(m._reversed?m.totalDuration()-m._totalTime:m._totalTime)/m._timeScale,this}if(m instanceof Array||m&&m.push&&Y(m)){for(var O=m.length;--O>-1;)this.remove(m[O]);return this}return typeof m=="string"?this.removeLabel(m):this.kill(null,m)},H._remove=function(m,f){Ot.prototype._remove.call(this,m,f);var O=this._last;return O?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},H.append=function(m,f){return this.add(m,this._parseTimeOrLabel(null,f,!0,m))},H.insert=H.insertMultiple=function(m,f,O,w){return this.add(m,f||0,O,w)},H.appendMultiple=function(m,f,O,w){return this.add(m,this._parseTimeOrLabel(null,f,!0,m),O,w)},H.addLabel=function(m,f){return this._labels[m]=this._parseTimeOrLabel(f),this},H.addPause=function(m,f,O,w){var X=$.delayedCall(0,_t,O,w||this);return X.vars.onComplete=X.vars.onReverseComplete=f,X.data="isPause",this._hasPause=!0,this.add(X,m)},H.removeLabel=function(m){return delete this._labels[m],this},H.getLabelTime=function(m){return this._labels[m]!=null?this._labels[m]:-1},H._parseTimeOrLabel=function(m,f,O,w){var X,b;if(w instanceof p&&w.timeline===this)this.remove(w);else if(w&&(w instanceof Array||w.push&&Y(w)))for(b=w.length;--b>-1;)w[b]instanceof p&&w[b].timeline===this&&this.remove(w[b]);if(X=typeof m!="number"||f?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,typeof f=="string")return this._parseTimeOrLabel(f,O&&typeof m=="number"&&this._labels[f]==null?m-X:0,O);if(f=f||0,typeof m!="string"||!isNaN(m)&&this._labels[m]==null)m==null&&(m=X);else{if(b=m.indexOf("="),b===-1)return this._labels[m]==null?O?this._labels[m]=X+f:f:this._labels[m]+f;f=parseInt(m.charAt(b-1)+"1",10)*Number(m.substr(b+1)),m=b>1?this._parseTimeOrLabel(m.substr(0,b-1),0,O):X}return Number(m)+f},H.seek=function(m,f){return this.totalTime(typeof m=="number"?m:this._parseTimeOrLabel(m),f!==!1)},H.stop=function(){return this.paused(!0)},H.gotoAndPlay=function(m,f){return this.play(m,f)},H.gotoAndStop=function(m,f){return this.pause(m,f)},H.render=function(m,f,O){this._gc&&this._enabled(!0,!1);var w,X,b,F,Z,st,it,Pt=this._time,Lt=this._dirty?this.totalDuration():this._totalDuration,Gt=this._startTime,jt=this._timeScale,ie=this._paused;if(Pt!==this._time&&(m+=this._time-Pt),m>=Lt-1e-7&&m>=0)this._totalTime=this._time=Lt,this._reversed||this._hasPausedChild()||(X=!0,F="onComplete",Z=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=m&&m>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===ht)&&this._rawPrevTime!==m&&this._first&&(Z=!0,this._rawPrevTime>ht&&(F="onReverseComplete"))),this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:ht,m=Lt+1e-4;else if(1e-7>m)if(this._totalTime=this._time=0,(Pt!==0||this._duration===0&&this._rawPrevTime!==ht&&(this._rawPrevTime>0||0>m&&this._rawPrevTime>=0))&&(F="onReverseComplete",X=this._reversed),0>m)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(Z=X=!0,F="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(Z=!0),this._rawPrevTime=m;else{if(this._rawPrevTime=this._duration||!f||m||this._rawPrevTime===m?m:ht,m===0&&X)for(w=this._first;w&&w._startTime===0;)w._duration||(X=!1),w=w._next;m=0,this._initted||(Z=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!f){if(m>=Pt)for(w=this._first;w&&w._startTime<=m&&!st;)w._duration||w.data!=="isPause"||w.ratio||w._startTime===0&&this._rawPrevTime===0||(st=w),w=w._next;else for(w=this._last;w&&w._startTime>=m&&!st;)w._duration||w.data==="isPause"&&w._rawPrevTime>0&&(st=w),w=w._prev;st&&(this._time=m=st._startTime,this._totalTime=m+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=m}if(this._time!==Pt&&this._first||O||Z||st){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==Pt&&m>0&&(this._active=!0),Pt===0&&this.vars.onStart&&(this._time===0&&this._duration||f||this._callback("onStart")),it=this._time,it>=Pt)for(w=this._first;w&&(b=w._next,it===this._time&&(!this._paused||ie));)(w._active||w._startTime<=it&&!w._paused&&!w._gc)&&(st===w&&this.pause(),w._reversed?w.render((w._dirty?w.totalDuration():w._totalDuration)-(m-w._startTime)*w._timeScale,f,O):w.render((m-w._startTime)*w._timeScale,f,O)),w=b;else for(w=this._last;w&&(b=w._prev,it===this._time&&(!this._paused||ie));){if(w._active||w._startTime<=Pt&&!w._paused&&!w._gc){if(st===w){for(st=w._prev;st&&st.endTime()>this._time;)st.render(st._reversed?st.totalDuration()-(m-st._startTime)*st._timeScale:(m-st._startTime)*st._timeScale,f,O),st=st._prev;st=null,this.pause()}w._reversed?w.render((w._dirty?w.totalDuration():w._totalDuration)-(m-w._startTime)*w._timeScale,f,O):w.render((m-w._startTime)*w._timeScale,f,O)}w=b}this._onUpdate&&(f||(lt.length&&St(),this._callback("onUpdate"))),F&&(this._gc||(Gt===this._startTime||jt!==this._timeScale)&&(this._time===0||Lt>=this.totalDuration())&&(X&&(lt.length&&St(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!f&&this.vars[F]&&this._callback(F)))}},H._hasPausedChild=function(){for(var m=this._first;m;){if(m._paused||m instanceof mt&&m._hasPausedChild())return!0;m=m._next}return!1},H.getChildren=function(m,f,O,w){w=w||-9999999999;for(var X=[],b=this._first,F=0;b;)b._startTime<w||(b instanceof $?f!==!1&&(X[F++]=b):(O!==!1&&(X[F++]=b),m!==!1&&(X=X.concat(b.getChildren(!0,f,O)),F=X.length))),b=b._next;return X},H.getTweensOf=function(m,f){var O,w,X=this._gc,b=[],F=0;for(X&&this._enabled(!0,!0),O=$.getTweensOf(m),w=O.length;--w>-1;)(O[w].timeline===this||f&&this._contains(O[w]))&&(b[F++]=O[w]);return X&&this._enabled(!1,!0),b},H.recent=function(){return this._recent},H._contains=function(m){for(var f=m.timeline;f;){if(f===this)return!0;f=f.timeline}return!1},H.shiftChildren=function(m,f,O){O=O||0;for(var w,X=this._first,b=this._labels;X;)X._startTime>=O&&(X._startTime+=m),X=X._next;if(f)for(w in b)b[w]>=O&&(b[w]+=m);return this._uncache(!0)},H._kill=function(m,f){if(!m&&!f)return this._enabled(!1,!1);for(var O=f?this.getTweensOf(f):this.getChildren(!0,!0,!1),w=O.length,X=!1;--w>-1;)O[w]._kill(m,f)&&(X=!0);return X},H.clear=function(m){var f=this.getChildren(!1,!0,!0),O=f.length;for(this._time=this._totalTime=0;--O>-1;)f[O]._enabled(!1,!1);return m!==!1&&(this._labels={}),this._uncache(!0)},H.invalidate=function(){for(var m=this._first;m;)m.invalidate(),m=m._next;return p.prototype.invalidate.call(this)},H._enabled=function(m,f){if(m===this._gc)for(var O=this._first;O;)O._enabled(m,!0),O=O._next;return Ot.prototype._enabled.call(this,m,f)},H.totalTime=function(m,f,O){this._forcingPlayhead=!0;var w=p.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,w},H.duration=function(m){return arguments.length?(this.duration()!==0&&m!==0&&this.timeScale(this._duration/m),this):(this._dirty&&this.totalDuration(),this._duration)},H.totalDuration=function(m){if(!arguments.length){if(this._dirty){for(var f,O,w=0,X=this._last,b=999999999999;X;)f=X._prev,X._dirty&&X.totalDuration(),X._startTime>b&&this._sortChildren&&!X._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(X,X._startTime-X._delay),this._calculatingDuration=0):b=X._startTime,X._startTime<0&&!X._paused&&(w-=X._startTime,this._timeline.smoothChildTiming&&(this._startTime+=X._startTime/this._timeScale,this._time-=X._startTime,this._totalTime-=X._startTime,this._rawPrevTime-=X._startTime),this.shiftChildren(-X._startTime,!1,-9999999999),b=0),O=X._startTime+X._totalDuration/X._timeScale,O>w&&(w=O),X=f;this._duration=this._totalDuration=w,this._dirty=!1}return this._totalDuration}return m&&this.totalDuration()?this.timeScale(this._totalDuration/m):this},H.paused=function(m){if(!m)for(var f=this._first,O=this._time;f;)f._startTime===O&&f.data==="isPause"&&(f._rawPrevTime=0),f=f._next;return p.prototype.paused.apply(this,arguments)},H.usesFrames=function(){for(var m=this._timeline;m._timeline;)m=m._timeline;return m===p._rootFramesTimeline},H.rawTime=function(m){return m&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(m)-this._startTime)*this._timeScale},mt},!0),$e._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(p,Ot,$){var mt=function(ut){p.call(this,ut),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},ht=1e-10,M=Ot._internals,yt=M.lazyTweens,Ct=M.lazyRender,Y=$e._gsDefine.globals,lt=new $(null,null,1,0),St=mt.prototype=new p;return St.constructor=mt,St.kill()._gc=!1,mt.version="2.0.2",St.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),p.prototype.invalidate.call(this)},St.addCallback=function(ut,At,Dt,_t){return this.add(Ot.delayedCall(0,ut,Dt,_t),At)},St.removeCallback=function(ut,At){if(ut)if(At==null)this._kill(null,ut);else for(var Dt=this.getTweensOf(ut,!1),_t=Dt.length,K=this._parseTimeOrLabel(At);--_t>-1;)Dt[_t]._startTime===K&&Dt[_t]._enabled(!1,!1);return this},St.removePause=function(ut){return this.removeCallback(p._internals.pauseCallback,ut)},St.tweenTo=function(ut,At){At=At||{};var Dt,_t,K,H={ease:lt,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},m=At.repeat&&Y.TweenMax||Ot;for(_t in At)H[_t]=At[_t];return H.time=this._parseTimeOrLabel(ut),Dt=Math.abs(Number(H.time)-this._time)/this._timeScale||.001,K=new m(this,Dt,H),H.onStart=function(){K.target.paused(!0),K.vars.time===K.target.time()||Dt!==K.duration()||K.isFromTo||K.duration(Math.abs(K.vars.time-K.target.time())/K.target._timeScale).render(K.time(),!0,!0),At.onStart&&At.onStart.apply(At.onStartScope||At.callbackScope||K,At.onStartParams||[])},K},St.tweenFromTo=function(ut,At,Dt){Dt=Dt||{},ut=this._parseTimeOrLabel(ut),Dt.startAt={onComplete:this.seek,onCompleteParams:[ut],callbackScope:this},Dt.immediateRender=Dt.immediateRender!==!1;var _t=this.tweenTo(At,Dt);return _t.isFromTo=1,_t.duration(Math.abs(_t.vars.time-ut)/this._timeScale||.001)},St.render=function(ut,At,Dt){this._gc&&this._enabled(!0,!1);var _t,K,H,m,f,O,w,X,b=this._time,F=this._dirty?this.totalDuration():this._totalDuration,Z=this._duration,st=this._totalTime,it=this._startTime,Pt=this._timeScale,Lt=this._rawPrevTime,Gt=this._paused,jt=this._cycle;if(b!==this._time&&(ut+=this._time-b),ut>=F-1e-7&&ut>=0)this._locked||(this._totalTime=F,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(K=!0,m="onComplete",f=!!this._timeline.autoRemoveChildren,this._duration===0&&(0>=ut&&ut>=-1e-7||0>Lt||Lt===ht)&&Lt!==ut&&this._first&&(f=!0,Lt>ht&&(m="onReverseComplete"))),this._rawPrevTime=this._duration||!At||ut||this._rawPrevTime===ut?ut:ht,this._yoyo&&1&this._cycle?this._time=ut=0:(this._time=Z,ut=Z+1e-4);else if(1e-7>ut)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(b!==0||Z===0&&Lt!==ht&&(Lt>0||0>ut&&Lt>=0)&&!this._locked)&&(m="onReverseComplete",K=this._reversed),0>ut)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(f=K=!0,m="onReverseComplete"):Lt>=0&&this._first&&(f=!0),this._rawPrevTime=ut;else{if(this._rawPrevTime=Z||!At||ut||this._rawPrevTime===ut?ut:ht,ut===0&&K)for(_t=this._first;_t&&_t._startTime===0;)_t._duration||(K=!1),_t=_t._next;ut=0,this._initted||(f=!0)}else if(Z===0&&0>Lt&&(f=!0),this._time=this._rawPrevTime=ut,this._locked||(this._totalTime=ut,this._repeat!==0&&(O=Z+this._repeatDelay,this._cycle=this._totalTime/O>>0,this._cycle!==0&&this._cycle===this._totalTime/O&&ut>=st&&this._cycle--,this._time=this._totalTime-this._cycle*O,this._yoyo&&1&this._cycle&&(this._time=Z-this._time),this._time>Z?(this._time=Z,ut=Z+1e-4):this._time<0?this._time=ut=0:ut=this._time)),this._hasPause&&!this._forcingPlayhead&&!At){if(ut=this._time,ut>=b||this._repeat&&jt!==this._cycle)for(_t=this._first;_t&&_t._startTime<=ut&&!w;)_t._duration||_t.data!=="isPause"||_t.ratio||_t._startTime===0&&this._rawPrevTime===0||(w=_t),_t=_t._next;else for(_t=this._last;_t&&_t._startTime>=ut&&!w;)_t._duration||_t.data==="isPause"&&_t._rawPrevTime>0&&(w=_t),_t=_t._prev;w&&w._startTime<Z&&(this._time=ut=w._startTime,this._totalTime=ut+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==jt&&!this._locked){var ie=this._yoyo&&(1&jt)!==0,ct=ie===(this._yoyo&&(1&this._cycle)!==0),kt=this._totalTime,Me=this._cycle,gi=this._rawPrevTime,Rt=this._time;if(this._totalTime=jt*Z,this._cycle<jt?ie=!ie:this._totalTime+=Z,this._time=b,this._rawPrevTime=Z===0?Lt-1e-4:Lt,this._cycle=jt,this._locked=!0,b=ie?0:Z,this.render(b,At,Z===0),At||this._gc||this.vars.onRepeat&&(this._cycle=Me,this._locked=!1,this._callback("onRepeat")),b!==this._time||(ct&&(this._cycle=jt,this._locked=!0,b=ie?Z+1e-4:-1e-4,this.render(b,!0,!1)),this._locked=!1,this._paused&&!Gt))return;this._time=Rt,this._totalTime=kt,this._cycle=Me,this._rawPrevTime=gi}if(!(this._time!==b&&this._first||Dt||f||w))return void(st!==this._totalTime&&this._onUpdate&&(At||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==st&&ut>0&&(this._active=!0),st===0&&this.vars.onStart&&(this._totalTime===0&&this._totalDuration||At||this._callback("onStart")),X=this._time,X>=b)for(_t=this._first;_t&&(H=_t._next,X===this._time&&(!this._paused||Gt));)(_t._active||_t._startTime<=this._time&&!_t._paused&&!_t._gc)&&(w===_t&&this.pause(),_t._reversed?_t.render((_t._dirty?_t.totalDuration():_t._totalDuration)-(ut-_t._startTime)*_t._timeScale,At,Dt):_t.render((ut-_t._startTime)*_t._timeScale,At,Dt)),_t=H;else for(_t=this._last;_t&&(H=_t._prev,X===this._time&&(!this._paused||Gt));){if(_t._active||_t._startTime<=b&&!_t._paused&&!_t._gc){if(w===_t){for(w=_t._prev;w&&w.endTime()>this._time;)w.render(w._reversed?w.totalDuration()-(ut-w._startTime)*w._timeScale:(ut-w._startTime)*w._timeScale,At,Dt),w=w._prev;w=null,this.pause()}_t._reversed?_t.render((_t._dirty?_t.totalDuration():_t._totalDuration)-(ut-_t._startTime)*_t._timeScale,At,Dt):_t.render((ut-_t._startTime)*_t._timeScale,At,Dt)}_t=H}this._onUpdate&&(At||(yt.length&&Ct(),this._callback("onUpdate"))),m&&(this._locked||this._gc||(it===this._startTime||Pt!==this._timeScale)&&(this._time===0||F>=this.totalDuration())&&(K&&(yt.length&&Ct(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!At&&this.vars[m]&&this._callback(m)))},St.getActive=function(ut,At,Dt){ut==null&&(ut=!0),At==null&&(At=!0),Dt==null&&(Dt=!1);var _t,K,H=[],m=this.getChildren(ut,At,Dt),f=0,O=m.length;for(_t=0;O>_t;_t++)K=m[_t],K.isActive()&&(H[f++]=K);return H},St.getLabelAfter=function(ut){ut||ut!==0&&(ut=this._time);var At,Dt=this.getLabelsArray(),_t=Dt.length;for(At=0;_t>At;At++)if(Dt[At].time>ut)return Dt[At].name;return null},St.getLabelBefore=function(ut){ut==null&&(ut=this._time);for(var At=this.getLabelsArray(),Dt=At.length;--Dt>-1;)if(At[Dt].time<ut)return At[Dt].name;return null},St.getLabelsArray=function(){var ut,At=[],Dt=0;for(ut in this._labels)At[Dt++]={time:this._labels[ut],name:ut};return At.sort(function(_t,K){return _t.time-K.time}),At},St.invalidate=function(){return this._locked=!1,p.prototype.invalidate.call(this)},St.progress=function(ut,At){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&1&this._cycle?1-ut:ut)+this._cycle*(this._duration+this._repeatDelay),At):this._time/this.duration()||0},St.totalProgress=function(ut,At){return arguments.length?this.totalTime(this.totalDuration()*ut,At):this._totalTime/this.totalDuration()||0},St.totalDuration=function(ut){return arguments.length?this._repeat!==-1&&ut?this.timeScale(this.totalDuration()/ut):this:(this._dirty&&(p.prototype.totalDuration.call(this),this._totalDuration=this._repeat===-1?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},St.time=function(ut,At){return arguments.length?(this._dirty&&this.totalDuration(),ut>this._duration&&(ut=this._duration),this._yoyo&&1&this._cycle?ut=this._duration-ut+this._cycle*(this._duration+this._repeatDelay):this._repeat!==0&&(ut+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(ut,At)):this._time},St.repeat=function(ut){return arguments.length?(this._repeat=ut,this._uncache(!0)):this._repeat},St.repeatDelay=function(ut){return arguments.length?(this._repeatDelay=ut,this._uncache(!0)):this._repeatDelay},St.yoyo=function(ut){return arguments.length?(this._yoyo=ut,this):this._yoyo},St.currentLabel=function(ut){return arguments.length?this.seek(ut,!0):this.getLabelBefore(this._time+1e-8)},mt},!0),function(){var p=180/Math.PI,Ot=[],$=[],mt=[],ht={},M=$e._gsDefine.globals,yt=function(m,f,O,w){O===w&&(O=w-(w-f)/1e6),m===f&&(f=m+(O-m)/1e6),this.a=m,this.b=f,this.c=O,this.d=w,this.da=w-m,this.ca=O-m,this.ba=f-m},Ct=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",Y=function(m,f,O,w){var X={a:m},b={},F={},Z={c:w},st=(m+f)/2,it=(f+O)/2,Pt=(O+w)/2,Lt=(st+it)/2,Gt=(it+Pt)/2,jt=(Gt-Lt)/8;return X.b=st+(m-st)/4,b.b=Lt+jt,X.c=b.a=(X.b+b.b)/2,b.c=F.a=(Lt+Gt)/2,F.b=Gt-jt,Z.b=Pt+(w-Pt)/4,F.c=Z.a=(F.b+Z.b)/2,[X,b,F,Z]},lt=function(m,f,O,w,X){var b,F,Z,st,it,Pt,Lt,Gt,jt,ie,ct,kt,Me,gi=m.length-1,Rt=0,Fe=m[0].a;for(b=0;gi>b;b++)it=m[Rt],F=it.a,Z=it.d,st=m[Rt+1].d,X?(ct=Ot[b],kt=$[b],Me=(kt+ct)*f*.25/(w?.5:mt[b]||.5),Pt=Z-(Z-F)*(w?.5*f:ct!==0?Me/ct:0),Lt=Z+(st-Z)*(w?.5*f:kt!==0?Me/kt:0),Gt=Z-(Pt+((Lt-Pt)*(3*ct/(ct+kt)+.5)/4||0))):(Pt=Z-(Z-F)*f*.5,Lt=Z+(st-Z)*f*.5,Gt=Z-(Pt+Lt)/2),Pt+=Gt,Lt+=Gt,it.c=jt=Pt,b!==0?it.b=Fe:it.b=Fe=it.a+.6*(it.c-it.a),it.da=Z-F,it.ca=jt-F,it.ba=Fe-F,O?(ie=Y(F,Fe,jt,Z),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]),Rt+=4):Rt++,Fe=Lt;it=m[Rt],it.b=Fe,it.c=Fe+.4*(it.d-Fe),it.da=it.d-it.a,it.ca=it.c-it.a,it.ba=Fe-it.a,O&&(ie=Y(it.a,Fe,it.c,it.d),m.splice(Rt,1,ie[0],ie[1],ie[2],ie[3]))},St=function(m,f,O,w){var X,b,F,Z,st,it,Pt=[];if(w)for(m=[w].concat(m),b=m.length;--b>-1;)typeof(it=m[b][f])=="string"&&it.charAt(1)==="="&&(m[b][f]=w[f]+Number(it.charAt(0)+it.substr(2)));if(X=m.length-2,0>X)return Pt[0]=new yt(m[0][f],0,0,m[0][f]),Pt;for(b=0;X>b;b++)F=m[b][f],Z=m[b+1][f],Pt[b]=new yt(F,0,0,Z),O&&(st=m[b+2][f],Ot[b]=(Ot[b]||0)+(Z-F)*(Z-F),$[b]=($[b]||0)+(st-Z)*(st-Z));return Pt[b]=new yt(m[b][f],0,0,m[b+1][f]),Pt},ut=function(m,f,O,w,X,b){var F,Z,st,it,Pt,Lt,Gt,jt,ie={},ct=[],kt=b||m[0];X=typeof X=="string"?","+X+",":Ct,f==null&&(f=1);for(Z in m[0])ct.push(Z);if(m.length>1){for(jt=m[m.length-1],Gt=!0,F=ct.length;--F>-1;)if(Z=ct[F],Math.abs(kt[Z]-jt[Z])>.05){Gt=!1;break}Gt&&(m=m.concat(),b&&m.unshift(b),m.push(m[1]),b=m[m.length-3])}for(Ot.length=$.length=mt.length=0,F=ct.length;--F>-1;)Z=ct[F],ht[Z]=X.indexOf(","+Z+",")!==-1,ie[Z]=St(m,Z,ht[Z],b);for(F=Ot.length;--F>-1;)Ot[F]=Math.sqrt(Ot[F]),$[F]=Math.sqrt($[F]);if(!w){for(F=ct.length;--F>-1;)if(ht[Z])for(st=ie[ct[F]],Lt=st.length-1,it=0;Lt>it;it++)Pt=st[it+1].da/$[it]+st[it].da/Ot[it]||0,mt[it]=(mt[it]||0)+Pt*Pt;for(F=mt.length;--F>-1;)mt[F]=Math.sqrt(mt[F])}for(F=ct.length,it=O?4:1;--F>-1;)Z=ct[F],st=ie[Z],lt(st,f,O,w,ht[Z]),Gt&&(st.splice(0,it),st.splice(st.length-it,it));return ie},At=function(m,f,O){f=f||"soft";var w,X,b,F,Z,st,it,Pt,Lt,Gt,jt,ie={},ct=f==="cubic"?3:2,kt=f==="soft",Me=[];if(kt&&O&&(m=[O].concat(m)),m==null||m.length<ct+1)throw"invalid Bezier data";for(Lt in m[0])Me.push(Lt);for(st=Me.length;--st>-1;){for(Lt=Me[st],ie[Lt]=Z=[],Gt=0,Pt=m.length,it=0;Pt>it;it++)w=O==null?m[it][Lt]:typeof(jt=m[it][Lt])=="string"&&jt.charAt(1)==="="?O[Lt]+Number(jt.charAt(0)+jt.substr(2)):Number(jt),kt&&it>1&&Pt-1>it&&(Z[Gt++]=(w+Z[Gt-2])/2),Z[Gt++]=w;for(Pt=Gt-ct+1,Gt=0,it=0;Pt>it;it+=ct)w=Z[it],X=Z[it+1],b=Z[it+2],F=ct===2?0:Z[it+3],Z[Gt++]=jt=ct===3?new yt(w,X,b,F):new yt(w,(2*X+w)/3,(2*X+b)/3,b);Z.length=Gt}return ie},Dt=function(m,f,O){for(var w,X,b,F,Z,st,it,Pt,Lt,Gt,jt,ie=1/O,ct=m.length;--ct>-1;)for(Gt=m[ct],b=Gt.a,F=Gt.d-b,Z=Gt.c-b,st=Gt.b-b,w=X=0,Pt=1;O>=Pt;Pt++)it=ie*Pt,Lt=1-it,w=X-(X=(it*it*F+3*Lt*(it*Z+Lt*st))*it),jt=ct*O+Pt-1,f[jt]=(f[jt]||0)+w*w},_t=function(m,f){f=f>>0||6;var O,w,X,b,F=[],Z=[],st=0,it=0,Pt=f-1,Lt=[],Gt=[];for(O in m)Dt(m[O],F,f);for(X=F.length,w=0;X>w;w++)st+=Math.sqrt(F[w]),b=w%f,Gt[b]=st,b===Pt&&(it+=st,b=w/f>>0,Lt[b]=Gt,Z[b]=it,st=0,Gt=[]);return{length:it,lengths:Z,segments:Lt}},K=$e._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(m,f,O){this._target=m,f instanceof Array&&(f={values:f}),this._func={},this._mod={},this._props=[],this._timeRes=f.timeResolution==null?6:parseInt(f.timeResolution,10);var w,X,b,F,Z,st=f.values||[],it={},Pt=st[0],Lt=f.autoRotate||O.vars.orientToBezier;this._autoRotate=Lt?Lt instanceof Array?Lt:[["x","y","rotation",Lt===!0?0:Number(Lt)||0]]:null;for(w in Pt)this._props.push(w);for(b=this._props.length;--b>-1;)w=this._props[b],this._overwriteProps.push(w),X=this._func[w]=typeof m[w]=="function",it[w]=X?m[w.indexOf("set")||typeof m["get"+w.substr(3)]!="function"?w:"get"+w.substr(3)]():parseFloat(m[w]),Z||it[w]!==st[0][w]&&(Z=it);if(this._beziers=f.type!=="cubic"&&f.type!=="quadratic"&&f.type!=="soft"?ut(st,isNaN(f.curviness)?1:f.curviness,!1,f.type==="thruBasic",f.correlate,Z):At(st,f.type,it),this._segCount=this._beziers[w].length,this._timeRes){var Gt=_t(this._beziers,this._timeRes);this._length=Gt.length,this._lengths=Gt.lengths,this._segments=Gt.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(Lt=this._autoRotate)for(this._initialRotations=[],Lt[0]instanceof Array||(this._autoRotate=Lt=[Lt]),b=Lt.length;--b>-1;){for(F=0;3>F;F++)w=Lt[b][F],this._func[w]=typeof m[w]=="function"?m[w.indexOf("set")||typeof m["get"+w.substr(3)]!="function"?w:"get"+w.substr(3)]:!1;w=Lt[b][2],this._initialRotations[b]=(this._func[w]?this._func[w].call(this._target):this._target[w])||0,this._overwriteProps.push(w)}return this._startRatio=O.vars.runBackwards?1:0,!0},set:function(m){var f,O,w,X,b,F,Z,st,it,Pt,Lt=this._segCount,Gt=this._func,jt=this._target,ie=m!==this._startRatio;if(this._timeRes){if(it=this._lengths,Pt=this._curSeg,m*=this._length,w=this._li,m>this._l2&&Lt-1>w){for(st=Lt-1;st>w&&(this._l2=it[++w])<=m;);this._l1=it[w-1],this._li=w,this._curSeg=Pt=this._segments[w],this._s2=Pt[this._s1=this._si=0]}else if(m<this._l1&&w>0){for(;w>0&&(this._l1=it[--w])>=m;);w===0&&m<this._l1?this._l1=0:w++,this._l2=it[w],this._li=w,this._curSeg=Pt=this._segments[w],this._s1=Pt[(this._si=Pt.length-1)-1]||0,this._s2=Pt[this._si]}if(f=w,m-=this._l1,w=this._si,m>this._s2&&w<Pt.length-1){for(st=Pt.length-1;st>w&&(this._s2=Pt[++w])<=m;);this._s1=Pt[w-1],this._si=w}else if(m<this._s1&&w>0){for(;w>0&&(this._s1=Pt[--w])>=m;);w===0&&m<this._s1?this._s1=0:w++,this._s2=Pt[w],this._si=w}F=(w+(m-this._s1)/(this._s2-this._s1))*this._prec||0}else f=0>m?0:m>=1?Lt-1:Lt*m>>0,F=(m-f*(1/Lt))*Lt;for(O=1-F,w=this._props.length;--w>-1;)X=this._props[w],b=this._beziers[X][f],Z=(F*F*b.da+3*O*(F*b.ca+O*b.ba))*F+b.a,this._mod[X]&&(Z=this._mod[X](Z,jt)),Gt[X]?jt[X](Z):jt[X]=Z;if(this._autoRotate){var ct,kt,Me,gi,Rt,Fe,vi,Ti=this._autoRotate;for(w=Ti.length;--w>-1;)X=Ti[w][2],Fe=Ti[w][3]||0,vi=Ti[w][4]===!0?1:p,b=this._beziers[Ti[w][0]],ct=this._beziers[Ti[w][1]],b&&ct&&(b=b[f],ct=ct[f],kt=b.a+(b.b-b.a)*F,gi=b.b+(b.c-b.b)*F,kt+=(gi-kt)*F,gi+=(b.c+(b.d-b.c)*F-gi)*F,Me=ct.a+(ct.b-ct.a)*F,Rt=ct.b+(ct.c-ct.b)*F,Me+=(Rt-Me)*F,Rt+=(ct.c+(ct.d-ct.c)*F-Rt)*F,Z=ie?Math.atan2(Rt-Me,gi-kt)*vi+Fe:this._initialRotations[w],this._mod[X]&&(Z=this._mod[X](Z,jt)),Gt[X]?jt[X](Z):jt[X]=Z)}}}),H=K.prototype;K.bezierThrough=ut,K.cubicToQuadratic=Y,K._autoCSS=!0,K.quadraticToCubic=function(m,f,O){return new yt(m,(2*f+m)/3,(2*f+O)/3,O)},K._cssRegister=function(){var m=M.CSSPlugin;if(m){var f=m._internals,O=f._parseToProxy,w=f._setPluginRatio,X=f.CSSPropTween;f._registerComplexSpecialProp("bezier",{parser:function(b,F,Z,st,it,Pt){F instanceof Array&&(F={values:F}),Pt=new K;var Lt,Gt,jt,ie=F.values,ct=ie.length-1,kt=[],Me={};if(0>ct)return it;for(Lt=0;ct>=Lt;Lt++)jt=O(b,ie[Lt],st,it,Pt,ct!==Lt),kt[Lt]=jt.end;for(Gt in F)Me[Gt]=F[Gt];return Me.values=kt,it=new X(b,"bezier",0,0,jt.pt,2),it.data=jt,it.plugin=Pt,it.setRatio=w,Me.autoRotate===0&&(Me.autoRotate=!0),!Me.autoRotate||Me.autoRotate instanceof Array||(Lt=Me.autoRotate===!0?0:Number(Me.autoRotate),Me.autoRotate=jt.end.left!=null?[["left","top","rotation",Lt,!1]]:jt.end.x!=null?[["x","y","rotation",Lt,!1]]:!1),Me.autoRotate&&(st._transform||st._enableTransforms(!1),jt.autoRotate=st._target._gsTransform,jt.proxy.rotation=jt.autoRotate.rotation||0,st._overwriteProps.push("rotation")),Pt._onInitTween(jt.proxy,Me,st._tween),it}})}},H._mod=function(m){for(var f,O=this._overwriteProps,w=O.length;--w>-1;)f=m[O[w]],f&&typeof f=="function"&&(this._mod[O[w]]=f)},H._kill=function(m){var f,O,w=this._props;for(f in this._beziers)if(f in m)for(delete this._beziers[f],delete this._func[f],O=w.length;--O>-1;)w[O]===f&&w.splice(O,1);if(w=this._autoRotate)for(O=w.length;--O>-1;)m[w[O][2]]&&w.splice(O,1);return this._super._kill.call(this,m)}}(),$e._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(p,Ot){var $,mt,ht,M,yt=function(){p.call(this,"css"),this._overwriteProps.length=0,this.setRatio=yt.prototype.setRatio},Ct=$e._gsDefine.globals,Y={},lt=yt.prototype=new p("css");lt.constructor=yt,yt.version="2.0.2",yt.API=2,yt.defaultTransformPerspective=0,yt.defaultSkewType="compensated",yt.defaultSmoothOrigin=!0,lt="px",yt.suffixMap={top:lt,right:lt,bottom:lt,left:lt,width:lt,height:lt,fontSize:lt,padding:lt,margin:lt,perspective:lt,lineHeight:""};var St,ut,At,Dt,_t,K,H,m,f=/(?:\-|\.|\b)(\d|\.|e\-)+/g,O=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,w=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,X=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,b=/(?:\d|\-|\+|=|#|\.)*/g,F=/opacity *= *([^)]*)/i,Z=/opacity:([^;]*)/i,st=/alpha\(opacity *=.+?\)/i,it=/^(rgb|hsl)/,Pt=/([A-Z])/g,Lt=/-([a-z])/gi,Gt=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,jt=function(v,E){return E.toUpperCase()},ie=/(?:Left|Right|Width)/i,ct=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,kt=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,Me=/,(?=[^\)]*(?:\(|$))/gi,gi=/[\s,\(]/i,Rt=Math.PI/180,Fe=180/Math.PI,vi={},Ti={style:{}},oi=$e.document||{createElement:function(){return Ti}},fe=function(v,E){return oi.createElementNS?oi.createElementNS(E||"http://www.w3.org/1999/xhtml",v):oi.createElement(v)},Je=fe("div"),Ri=fe("img"),be=yt._internals={_specialProps:Y},Ve=($e.navigator||{}).userAgent||"",Ke=function(){var v=Ve.indexOf("Android"),E=fe("a");return At=Ve.indexOf("Safari")!==-1&&Ve.indexOf("Chrome")===-1&&(v===-1||parseFloat(Ve.substr(v+8,2))>3),_t=At&&parseFloat(Ve.substr(Ve.indexOf("Version/")+8,2))<6,Dt=Ve.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Ve)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Ve))&&(K=parseFloat(RegExp.$1)),E?(E.style.cssText="top:1px;opacity:.55;",/^0.55/.test(E.style.opacity)):!1}(),Mn=function(v){return F.test(typeof v=="string"?v:(v.currentStyle?v.currentStyle.filter:v.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Cn=function(v){$e.console&&console.log(v)},ji="",Ii="",en=function(v,E){E=E||Je;var R,L,y=E.style;if(y[v]!==void 0)return v;for(v=v.charAt(0).toUpperCase()+v.substr(1),R=["O","Moz","ms","Ms","Webkit"],L=5;--L>-1&&y[R[L]+v]===void 0;);return L>=0?(Ii=L===3?"ms":R[L],ji="-"+Ii.toLowerCase()+"-",Ii+v):null},ci=(typeof window<"u"?window:oi.defaultView||{getComputedStyle:function(){}}).getComputedStyle,Oe=yt.getStyle=function(v,E,R,L,y){var W;return Ke||E!=="opacity"?(!L&&v.style[E]?W=v.style[E]:(R=R||ci(v))?W=R[E]||R.getPropertyValue(E)||R.getPropertyValue(E.replace(Pt,"-$1").toLowerCase()):v.currentStyle&&(W=v.currentStyle[E]),y==null||W&&W!=="none"&&W!=="auto"&&W!=="auto auto"?W:y):Mn(v)},Si=be.convertToPixels=function(v,E,R,L,y){if(L==="px"||!L&&E!=="lineHeight")return R;if(L==="auto"||!R)return 0;var W,C,Q,rt=ie.test(E),et=v,j=Je.style,Mt=0>R,Tt=R===1;if(Mt&&(R=-R),Tt&&(R*=100),E!=="lineHeight"||L)if(L==="%"&&E.indexOf("border")!==-1)W=R/100*(rt?v.clientWidth:v.clientHeight);else{if(j.cssText="border:0 solid red;position:"+Oe(v,"position")+";line-height:0;",L!=="%"&&et.appendChild&&L.charAt(0)!=="v"&&L!=="rem")j[rt?"borderLeftWidth":"borderTopWidth"]=R+L;else{if(et=v.parentNode||oi.body,Oe(et,"display").indexOf("flex")!==-1&&(j.position="absolute"),C=et._gsCache,Q=Ot.ticker.frame,C&&rt&&C.time===Q)return C.width*R/100;j[rt?"width":"height"]=R+L}et.appendChild(Je),W=parseFloat(Je[rt?"offsetWidth":"offsetHeight"]),et.removeChild(Je),rt&&L==="%"&&yt.cacheWidths!==!1&&(C=et._gsCache=et._gsCache||{},C.time=Q,C.width=W/R*100),W!==0||y||(W=Si(v,E,R,L,!0))}else C=ci(v).lineHeight,v.style.lineHeight=R,W=parseFloat(ci(v).lineHeight),v.style.lineHeight=C;return Tt&&(W/=100),Mt?-W:W},Tn=be.calculateOffset=function(v,E,R){if(Oe(v,"position",R)!=="absolute")return 0;var L=E==="left"?"Left":"Top",y=Oe(v,"margin"+L,R);return v["offset"+L]-(Si(v,E,parseFloat(y),y.replace(b,""))||0)},nn=function(v,E){var R,L,y,W={};if(E=E||ci(v,null))if(R=E.length)for(;--R>-1;)y=E[R],(y.indexOf("-transform")===-1||zr===y)&&(W[y.replace(Lt,jt)]=E.getPropertyValue(y));else for(R in E)(R.indexOf("Transform")===-1||ui===R)&&(W[R]=E[R]);else if(E=v.currentStyle||v.style)for(R in E)typeof R=="string"&&W[R]===void 0&&(W[R.replace(Lt,jt)]=E[R]);return Ke||(W.opacity=Mn(v)),L=sn(v,E,!1),W.rotation=L.rotation,W.skewX=L.skewX,W.scaleX=L.scaleX,W.scaleY=L.scaleY,W.x=L.x,W.y=L.y,Gi&&(W.z=L.z,W.rotationX=L.rotationX,W.rotationY=L.rotationY,W.scaleZ=L.scaleZ),W.filters&&delete W.filters,W},Ci=function(v,E,R,L,y){var W,C,Q,rt={},et=v.style;for(C in R)C!=="cssText"&&C!=="length"&&isNaN(C)&&(E[C]!==(W=R[C])||y&&y[C])&&C.indexOf("Origin")===-1&&(typeof W=="number"||typeof W=="string")&&(rt[C]=W!=="auto"||C!=="left"&&C!=="top"?W!==""&&W!=="auto"&&W!=="none"||typeof E[C]!="string"||E[C].replace(X,"")===""?W:0:Tn(v,C),et[C]!==void 0&&(Q=new Ce(et,C,et[C],Q)));if(L)for(C in L)C!=="className"&&(rt[C]=L[C]);return{difs:rt,firstMPT:Q}},_={width:["Left","Right"],height:["Top","Bottom"]},D=["marginLeft","marginRight","marginTop","marginBottom"],B=function(v,E,R){if((v.nodeName+"").toLowerCase()==="svg")return(R||ci(v))[E]||0;if(v.getCTM&&Br(v))return v.getBBox()[E]||0;var L=parseFloat(E==="width"?v.offsetWidth:v.offsetHeight),y=_[E],W=y.length;for(R=R||ci(v,null);--W>-1;)L-=parseFloat(Oe(v,"padding"+y[W],R,!0))||0,L-=parseFloat(Oe(v,"border"+y[W]+"Width",R,!0))||0;return L},U=function(v,E){if(v==="contain"||v==="auto"||v==="auto auto")return v+" ";(v==null||v==="")&&(v="0 0");var R,L=v.split(" "),y=v.indexOf("left")!==-1?"0%":v.indexOf("right")!==-1?"100%":L[0],W=v.indexOf("top")!==-1?"0%":v.indexOf("bottom")!==-1?"100%":L[1];if(L.length>3&&!E){for(L=v.split(", ").join(",").split(","),v=[],R=0;R<L.length;R++)v.push(U(L[R]));return v.join(",")}return W==null?W=y==="center"?"50%":"0":W==="center"&&(W="50%"),(y==="center"||isNaN(parseFloat(y))&&(y+"").indexOf("=")===-1)&&(y="50%"),v=y+" "+W+(L.length>2?" "+L[2]:""),E&&(E.oxp=y.indexOf("%")!==-1,E.oyp=W.indexOf("%")!==-1,E.oxr=y.charAt(1)==="=",E.oyr=W.charAt(1)==="=",E.ox=parseFloat(y.replace(X,"")),E.oy=parseFloat(W.replace(X,"")),E.v=v),E||v},J=function(v,E){return typeof v=="function"&&(v=v(m,H)),typeof v=="string"&&v.charAt(1)==="="?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2)):parseFloat(v)-parseFloat(E)||0},dt=function(v,E){typeof v=="function"&&(v=v(m,H));var R=typeof v=="string"&&v.charAt(1)==="=";return typeof v=="string"&&v.charAt(v.length-2)==="v"&&(v=(R?v.substr(0,2):0)+window["inner"+(v.substr(-2)==="vh"?"Height":"Width")]*(parseFloat(R?v.substr(2):v)/100)),v==null?E:R?parseInt(v.charAt(0)+"1",10)*parseFloat(v.substr(2))+E:parseFloat(v)||0},wt=function(v,E,R,L){var y,W,C,Q,rt,et=1e-6;return typeof v=="function"&&(v=v(m,H)),v==null?Q=E:typeof v=="number"?Q=v:(y=360,W=v.split("_"),rt=v.charAt(1)==="=",C=(rt?parseInt(v.charAt(0)+"1",10)*parseFloat(W[0].substr(2)):parseFloat(W[0]))*(v.indexOf("rad")===-1?1:Fe)-(rt?0:E),W.length&&(L&&(L[R]=E+C),v.indexOf("short")!==-1&&(C%=y,C!==C%(y/2)&&(C=0>C?C+y:C-y)),v.indexOf("_cw")!==-1&&0>C?C=(C+9999999999*y)%y-(C/y|0)*y:v.indexOf("ccw")!==-1&&C>0&&(C=(C-9999999999*y)%y-(C/y|0)*y)),Q=E+C),et>Q&&Q>-et&&(Q=0),Q},pt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ae=function(v,E,R){return v=0>v?v+1:v>1?v-1:v,255*(1>6*v?E+(R-E)*v*6:.5>v?R:2>3*v?E+(R-E)*(2/3-v)*6:E)+.5|0},se=yt.parseColor=function(v,E){var R,L,y,W,C,Q,rt,et,j,Mt,Tt;if(v)if(typeof v=="number")R=[v>>16,v>>8&255,255&v];else{if(v.charAt(v.length-1)===","&&(v=v.substr(0,v.length-1)),pt[v])R=pt[v];else if(v.charAt(0)==="#")v.length===4&&(L=v.charAt(1),y=v.charAt(2),W=v.charAt(3),v="#"+L+L+y+y+W+W),v=parseInt(v.substr(1),16),R=[v>>16,v>>8&255,255&v];else if(v.substr(0,3)==="hsl")if(R=Tt=v.match(f),E){if(v.indexOf("=")!==-1)return v.match(O)}else C=Number(R[0])%360/360,Q=Number(R[1])/100,rt=Number(R[2])/100,y=.5>=rt?rt*(Q+1):rt+Q-rt*Q,L=2*rt-y,R.length>3&&(R[3]=Number(R[3])),R[0]=ae(C+1/3,L,y),R[1]=ae(C,L,y),R[2]=ae(C-1/3,L,y);else R=v.match(f)||pt.transparent;R[0]=Number(R[0]),R[1]=Number(R[1]),R[2]=Number(R[2]),R.length>3&&(R[3]=Number(R[3]))}else R=pt.black;return E&&!Tt&&(L=R[0]/255,y=R[1]/255,W=R[2]/255,et=Math.max(L,y,W),j=Math.min(L,y,W),rt=(et+j)/2,et===j?C=Q=0:(Mt=et-j,Q=rt>.5?Mt/(2-et-j):Mt/(et+j),C=et===L?(y-W)/Mt+(W>y?6:0):et===y?(W-L)/Mt+2:(L-y)/Mt+4,C*=60),R[0]=C+.5|0,R[1]=100*Q+.5|0,R[2]=100*rt+.5|0),R},Ut=function(v,E){var R,L,y,W=v.match(he)||[],C=0,Q="";if(!W.length)return v;for(R=0;R<W.length;R++)L=W[R],y=v.substr(C,v.indexOf(L,C)-C),C+=y.length+L.length,L=se(L,E),L.length===3&&L.push(1),Q+=y+(E?"hsla("+L[0]+","+L[1]+"%,"+L[2]+"%,"+L[3]:"rgba("+L.join(","))+")";return Q+v.substr(C)},he="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(lt in pt)he+="|"+lt+"\\b";he=new RegExp(he+")","gi"),yt.colorStringFilter=function(v){var E,R=v[0]+" "+v[1];he.test(R)&&(E=R.indexOf("hsl(")!==-1||R.indexOf("hsla(")!==-1,v[0]=Ut(v[0],E),v[1]=Ut(v[1],E)),he.lastIndex=0},Ot.defaultStringFilter||(Ot.defaultStringFilter=yt.colorStringFilter);var ze=function(v,E,R,L){if(v==null)return function(Tt){return Tt};var y,W=E?(v.match(he)||[""])[0]:"",C=v.split(W).join("").match(w)||[],Q=v.substr(0,v.indexOf(C[0])),rt=v.charAt(v.length-1)===")"?")":"",et=v.indexOf(" ")!==-1?" ":",",j=C.length,Mt=j>0?C[0].replace(f,""):"";return j?y=E?function(Tt){var gt,Nt,Et,oe;if(typeof Tt=="number")Tt+=Mt;else if(L&&Me.test(Tt)){for(oe=Tt.replace(Me,"|").split("|"),Et=0;Et<oe.length;Et++)oe[Et]=y(oe[Et]);return oe.join(",")}if(gt=(Tt.match(he)||[W])[0],Nt=Tt.split(gt).join("").match(w)||[],Et=Nt.length,j>Et--)for(;++Et<j;)Nt[Et]=R?Nt[(Et-1)/2|0]:C[Et];return Q+Nt.join(et)+et+gt+rt+(Tt.indexOf("inset")!==-1?" inset":"")}:function(Tt){var gt,Nt,Et;if(typeof Tt=="number")Tt+=Mt;else if(L&&Me.test(Tt)){for(Nt=Tt.replace(Me,"|").split("|"),Et=0;Et<Nt.length;Et++)Nt[Et]=y(Nt[Et]);return Nt.join(",")}if(gt=Tt.match(w)||[],Et=gt.length,j>Et--)for(;++Et<j;)gt[Et]=R?gt[(Et-1)/2|0]:C[Et];return Q+gt.join(et)+rt}:function(Tt){return Tt}},Xe=function(v){return v=v.split(","),function(E,R,L,y,W,C,Q){var rt,et=(R+"").split(" ");for(Q={},rt=0;4>rt;rt++)Q[v[rt]]=et[rt]=et[rt]||et[(rt-1)/2>>0];return y.parse(E,Q,W,C)}},Ce=(be._setPluginRatio=function(v){this.plugin.setRatio(v);for(var E,R,L,y,W,C=this.data,Q=C.proxy,rt=C.firstMPT,et=1e-6;rt;)E=Q[rt.v],rt.r?E=rt.r(E):et>E&&E>-et&&(E=0),rt.t[rt.p]=E,rt=rt._next;if(C.autoRotate&&(C.autoRotate.rotation=C.mod?C.mod.call(this._tween,Q.rotation,this.t,this._tween):Q.rotation),v===1||v===0)for(rt=C.firstMPT,W=v===1?"e":"b";rt;){if(R=rt.t,R.type){if(R.type===1){for(y=R.xs0+R.s+R.xs1,L=1;L<R.l;L++)y+=R["xn"+L]+R["xs"+(L+1)];R[W]=y}}else R[W]=R.s+R.xs0;rt=rt._next}},function(v,E,R,L,y){this.t=v,this.p=E,this.v=R,this.r=y,L&&(L._prev=this,this._next=L)}),je=(be._parseToProxy=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt=L,Tt={},gt={},Nt=R._transform,Et=vi;for(R._transform=null,vi=E,L=j=R.parse(v,E,L,y),vi=Et,W&&(R._transform=Nt,Mt&&(Mt._prev=null,Mt._prev&&(Mt._prev._next=null)));L&&L!==Mt;){if(L.type<=1&&(Q=L.p,gt[Q]=L.s+L.c,Tt[Q]=L.s,W||(et=new Ce(L,"s",Q,et,L.r),L.c=0),L.type===1))for(C=L.l;--C>0;)rt="xn"+C,Q=L.p+"_"+rt,gt[Q]=L.data[rt],Tt[Q]=L[rt],W||(et=new Ce(L,rt,Q,et,L.rxp[rt]));L=L._next}return{proxy:Tt,end:gt,firstMPT:et,pt:j}},be.CSSPropTween=function(v,E,R,L,y,W,C,Q,rt,et,j){this.t=v,this.p=E,this.s=R,this.c=L,this.n=C||E,v instanceof je||M.push(this.n),this.r=Q&&(typeof Q=="function"?Q:Math.round),this.type=W||0,rt&&(this.pr=rt,$=!0),this.b=et===void 0?R:et,this.e=j===void 0?R+L:j,y&&(this._next=y,y._prev=this)}),gn=function(v,E,R,L,y,W){var C=new je(v,E,R,L-R,y,-1,W);return C.b=R,C.e=C.xs0=L,C},Wi=yt.parseComplex=function(v,E,R,L,y,W,C,Q,rt,et){R=R||W||"",typeof L=="function"&&(L=L(m,H)),C=new je(v,E,0,0,C,et?2:1,null,!1,Q,R,L),L+="",y&&he.test(L+R)&&(L=[R,L],yt.colorStringFilter(L),R=L[0],L=L[1]);var j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt,Le=R.split(", ").join(",").split(" "),Zt=L.split(", ").join(",").split(" "),Ft=Le.length,Jt=St!==!1;for((L.indexOf(",")!==-1||R.indexOf(",")!==-1)&&((L+R).indexOf("rgb")!==-1||(L+R).indexOf("hsl")!==-1?(Le=Le.join(" ").replace(Me,", ").split(" "),Zt=Zt.join(" ").replace(Me,", ").split(" ")):(Le=Le.join(" ").split(",").join(", ").split(" "),Zt=Zt.join(" ").split(",").join(", ").split(" ")),Ft=Le.length),Ft!==Zt.length&&(Le=(W||"").split(" "),Ft=Le.length),C.plugin=rt,C.setRatio=et,he.lastIndex=0,j=0;Ft>j;j++)if(gt=Le[j],Nt=Zt[j]+"",ne=parseFloat(gt),ne||ne===0)C.appendXtra("",ne,J(Nt,ne),Nt.replace(O,""),Jt&&Nt.indexOf("px")!==-1?Math.round:!1,!0);else if(y&&he.test(gt))te=Nt.indexOf(")")+1,te=")"+(te?Nt.substr(te):""),bt=Nt.indexOf("hsl")!==-1&&Ke,Kt=Nt,gt=se(gt,bt),Nt=se(Nt,bt),Pe=gt.length+Nt.length>6,Pe&&!Ke&&Nt[3]===0?(C["xs"+C.l]+=C.l?" transparent":"transparent",C.e=C.e.split(Zt[j]).join("transparent")):(Ke||(Pe=!1),bt?C.appendXtra(Kt.substr(0,Kt.indexOf("hsl"))+(Pe?"hsla(":"hsl("),gt[0],J(Nt[0],gt[0]),",",!1,!0).appendXtra("",gt[1],J(Nt[1],gt[1]),"%,",!1).appendXtra("",gt[2],J(Nt[2],gt[2]),Pe?"%,":"%"+te,!1):C.appendXtra(Kt.substr(0,Kt.indexOf("rgb"))+(Pe?"rgba(":"rgb("),gt[0],Nt[0]-gt[0],",",Math.round,!0).appendXtra("",gt[1],Nt[1]-gt[1],",",Math.round).appendXtra("",gt[2],Nt[2]-gt[2],Pe?",":te,Math.round),Pe&&(gt=gt.length<4?1:gt[3],C.appendXtra("",gt,(Nt.length<4?1:Nt[3])-gt,te,!1))),he.lastIndex=0;else if(Et=gt.match(f)){if(oe=Nt.match(O),!oe||oe.length!==Et.length)return C;for(Tt=0,Mt=0;Mt<Et.length;Mt++)Bt=Et[Mt],Kt=gt.indexOf(Bt,Tt),C.appendXtra(gt.substr(Tt,Kt-Tt),Number(Bt),J(oe[Mt],Bt),"",Jt&>.substr(Kt+Bt.length,2)==="px"?Math.round:!1,Mt===0),Tt=Kt+Bt.length;C["xs"+C.l]+=gt.substr(Tt)}else C["xs"+C.l]+=C.l||C["xs"+C.l]?" "+Nt:Nt;if(L.indexOf("=")!==-1&&C.data){for(te=C.xs0+C.data.s,j=1;j<C.l;j++)te+=C["xs"+j]+C.data["xn"+j];C.e=te+C["xs"+j]}return C.l||(C.type=-1,C.xs0=C.e),C.xfirst||C},si=9;for(lt=je.prototype,lt.l=lt.pr=0;--si>0;)lt["xn"+si]=0,lt["xs"+si]="";lt.xs0="",lt._next=lt._prev=lt.xfirst=lt.data=lt.plugin=lt.setRatio=lt.rxp=null,lt.appendXtra=function(v,E,R,L,y,W){var C=this,Q=C.l;return C["xs"+Q]+=W&&(Q||C["xs"+Q])?" "+v:v||"",R||Q===0||C.plugin?(C.l++,C.type=C.setRatio?2:1,C["xs"+C.l]=L||"",Q>0?(C.data["xn"+Q]=E+R,C.rxp["xn"+Q]=y,C["xn"+Q]=E,C.plugin||(C.xfirst=new je(C,"xn"+Q,E,R,C.xfirst||C,0,C.n,y,C.pr),C.xfirst.xs0=0),C):(C.data={s:E+R},C.rxp={},C.s=E,C.c=R,C.r=y,C)):(C["xs"+Q]+=E+(L||""),C)};var Dr=function(v,E){E=E||{},this.p=E.prefix&&en(v)||v,Y[v]=Y[this.p]=this,this.format=E.formatter||ze(E.defaultValue,E.color,E.collapsible,E.multi),E.parser&&(this.parse=E.parser),this.clrs=E.color,this.multi=E.multi,this.keyword=E.keyword,this.dflt=E.defaultValue,this.pr=E.priority||0},Qe=be._registerComplexSpecialProp=function(v,E,R){typeof E!="object"&&(E={parser:R});var L,y=v.split(","),W=E.defaultValue;for(R=R||[W],L=0;L<y.length;L++)E.prefix=L===0&&E.prefix,E.defaultValue=R[L]||W,new Dr(y[L],E)},Ko=be._registerPluginProp=function(v){if(!Y[v]){var E=v.charAt(0).toUpperCase()+v.substr(1)+"Plugin";Qe(v,{parser:function(R,L,y,W,C,Q,rt){var et=Ct.com.greensock.plugins[E];return et?(et._cssRegister(),Y[y].parse(R,L,y,W,C,Q,rt)):(Cn("Error: "+E+" js file not loaded."),C)}})}};lt=Dr.prototype,lt.parseComplex=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt=this.keyword;if(this.multi&&(Me.test(R)||Me.test(E)?(Q=E.replace(Me,"|").split("|"),rt=R.replace(Me,"|").split("|")):Tt&&(Q=[E],rt=[R])),rt){for(et=rt.length>Q.length?rt.length:Q.length,C=0;et>C;C++)E=Q[C]=Q[C]||this.dflt,R=rt[C]=rt[C]||this.dflt,Tt&&(j=E.indexOf(Tt),Mt=R.indexOf(Tt),j!==Mt&&(Mt===-1?Q[C]=Q[C].split(Tt).join(""):j===-1&&(Q[C]+=" "+Tt)));E=Q.join(", "),R=rt.join(", ")}return Wi(v,this.p,E,R,this.clrs,this.dflt,L,this.pr,y,W)},lt.parse=function(v,E,R,L,y,W,C){return this.parseComplex(v.style,this.format(Oe(v,this.p,ht,!1,this.dflt)),this.format(E),y,W)},yt.registerSpecialProp=function(v,E,R){Qe(v,{parser:function(L,y,W,C,Q,rt,et){var j=new je(L,W,0,0,Q,2,W,!1,R);return j.plugin=rt,j.setRatio=E(L,y,C._tween,W),j},priority:R})},yt.useSVGTransformAttr=!0;var rn,Mo="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),ui=en("transform"),zr=ji+"transform",bn=en("transformOrigin"),Gi=en("perspective")!==null,Kn=be.Transform=function(){this.perspective=parseFloat(yt.defaultTransformPerspective)||0,this.force3D=yt.defaultForce3D!==!1&&Gi?yt.defaultForce3D||"auto":!1},ts=$e.SVGElement,To=function(v,E,R){var L,y=oi.createElementNS("http://www.w3.org/2000/svg",v),W=/([a-z])([A-Z])/g;for(L in R)y.setAttributeNS(null,L.replace(W,"$1-$2").toLowerCase(),R[L]);return E.appendChild(y),y},Sn=oi.documentElement||{},es=function(){var v,E,R,L=K||/Android/i.test(Ve)&&!$e.chrome;return oi.createElementNS&&!L&&(v=To("svg",Sn),E=To("rect",v,{width:100,height:50,x:100}),R=E.getBoundingClientRect().width,E.style[bn]="50% 50%",E.style[ui]="scaleX(0.5)",L=R===E.getBoundingClientRect().width&&!(Dt&&Gi),Sn.removeChild(v)),L}(),tr=function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt=v._gsTransform,te=ir(v,!0);Bt&&(Pe=Bt.xOrigin,Kt=Bt.yOrigin),(!L||(C=L.split(" ")).length<2)&&(Tt=v.getBBox(),Tt.x===0&&Tt.y===0&&Tt.width+Tt.height===0&&(Tt={x:parseFloat(v.hasAttribute("x")?v.getAttribute("x"):v.hasAttribute("cx")?v.getAttribute("cx"):0)||0,y:parseFloat(v.hasAttribute("y")?v.getAttribute("y"):v.hasAttribute("cy")?v.getAttribute("cy"):0)||0,width:0,height:0}),E=U(E).split(" "),C=[(E[0].indexOf("%")!==-1?parseFloat(E[0])/100*Tt.width:parseFloat(E[0]))+Tt.x,(E[1].indexOf("%")!==-1?parseFloat(E[1])/100*Tt.height:parseFloat(E[1]))+Tt.y]),R.xOrigin=et=parseFloat(C[0]),R.yOrigin=j=parseFloat(C[1]),L&&te!==er&&(Mt=te[0],Tt=te[1],gt=te[2],Nt=te[3],Et=te[4],oe=te[5],ne=Mt*Nt-Tt*gt,ne&&(Q=et*(Nt/ne)+j*(-gt/ne)+(gt*oe-Nt*Et)/ne,rt=et*(-Tt/ne)+j*(Mt/ne)-(Mt*oe-Tt*Et)/ne,et=R.xOrigin=C[0]=Q,j=R.yOrigin=C[1]=rt)),Bt&&(W&&(R.xOffset=Bt.xOffset,R.yOffset=Bt.yOffset,Bt=R),y||y!==!1&&yt.defaultSmoothOrigin!==!1?(Q=et-Pe,rt=j-Kt,Bt.xOffset+=Q*te[0]+rt*te[2]-Q,Bt.yOffset+=Q*te[1]+rt*te[3]-rt):Bt.xOffset=Bt.yOffset=0),W||v.setAttribute("data-svg-origin",C.join(" "))},Nr=function(v){var E,R=fe("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),L=this.parentNode,y=this.nextSibling,W=this.style.cssText;if(Sn.appendChild(R),R.appendChild(this),this.style.display="block",v)try{E=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Nr}catch{}else this._originalGetBBox&&(E=this._originalGetBBox());return y?L.insertBefore(this,y):L.appendChild(this),Sn.removeChild(R),this.style.cssText=W,E},on=function(v){try{return v.getBBox()}catch{return Nr.call(v,!0)}},Br=function(v){return!(!ts||!v.getCTM||v.parentNode&&!v.ownerSVGElement||!on(v))},er=[1,0,0,1,0,0],ir=function(v,E){var R,L,y,W,C,Q,rt=v._gsTransform||new Kn,et=1e5,j=v.style;if(ui?L=Oe(v,zr,null,!0):v.currentStyle&&(L=v.currentStyle.filter.match(ct),L=L&&L.length===4?[L[0].substr(4),Number(L[2].substr(4)),Number(L[1].substr(4)),L[3].substr(4),rt.x||0,rt.y||0].join(","):""),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",!ui||!(Q=!ci(v)||ci(v).display==="none")&&v.parentNode||(Q&&(W=j.display,j.display="block"),v.parentNode||(C=1,Sn.appendChild(v)),L=Oe(v,zr,null,!0),R=!L||L==="none"||L==="matrix(1, 0, 0, 1, 0, 0)",W?j.display=W:Q&&On(j,"display"),C&&Sn.removeChild(v)),(rt.svg||v.getCTM&&Br(v))&&(R&&(j[ui]+"").indexOf("matrix")!==-1&&(L=j[ui],R=0),y=v.getAttribute("transform"),R&&y&&(y=v.transform.baseVal.consolidate().matrix,L="matrix("+y.a+","+y.b+","+y.c+","+y.d+","+y.e+","+y.f+")",R=0)),R)return er;for(y=(L||"").match(f)||[],si=y.length;--si>-1;)W=Number(y[si]),y[si]=(C=W-(W|=0))?(C*et+(0>C?-.5:.5)|0)/et+W:W;return E&&y.length>6?[y[0],y[1],y[4],y[5],y[12],y[13]]:y},sn=be.getTransform=function(v,E,R,L){if(v._gsTransform&&R&&!L)return v._gsTransform;var y,W,C,Q,rt,et,j=R?v._gsTransform||new Kn:new Kn,Mt=j.scaleX<0,Tt=2e-5,gt=1e5,Nt=Gi&&(parseFloat(Oe(v,bn,E,!1,"0 0 0").split(" ")[2])||j.zOrigin)||0,Et=parseFloat(yt.defaultTransformPerspective)||0;if(j.svg=!(!v.getCTM||!Br(v)),j.svg&&(tr(v,Oe(v,bn,E,!1,"50% 50%")+"",j,v.getAttribute("data-svg-origin")),rn=yt.useSVGTransformAttr||es),y=ir(v),y!==er){if(y.length===16){var oe,ne,Pe,Kt,Bt,te=y[0],bt=y[1],Le=y[2],Zt=y[3],Ft=y[4],Jt=y[5],yi=y[6],qi=y[7],Ge=y[8],He=y[9],We=y[10],ei=y[12],ii=y[13],ai=y[14],hi=y[11],ke=Math.atan2(yi,We);j.zOrigin&&(ai=-j.zOrigin,ei=Ge*ai-y[12],ii=He*ai-y[13],ai=We*ai+j.zOrigin-y[14]),j.rotationX=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=Ft*Kt+Ge*Bt,ne=Jt*Kt+He*Bt,Pe=yi*Kt+We*Bt,Ge=Ft*-Bt+Ge*Kt,He=Jt*-Bt+He*Kt,We=yi*-Bt+We*Kt,hi=qi*-Bt+hi*Kt,Ft=oe,Jt=ne,yi=Pe),ke=Math.atan2(-Le,We),j.rotationY=ke*Fe,ke&&(Kt=Math.cos(-ke),Bt=Math.sin(-ke),oe=te*Kt-Ge*Bt,ne=bt*Kt-He*Bt,Pe=Le*Kt-We*Bt,He=bt*Bt+He*Kt,We=Le*Bt+We*Kt,hi=Zt*Bt+hi*Kt,te=oe,bt=ne,Le=Pe),ke=Math.atan2(bt,te),j.rotation=ke*Fe,ke&&(Kt=Math.cos(ke),Bt=Math.sin(ke),oe=te*Kt+bt*Bt,ne=Ft*Kt+Jt*Bt,Pe=Ge*Kt+He*Bt,bt=bt*Kt-te*Bt,Jt=Jt*Kt-Ft*Bt,He=He*Kt-Ge*Bt,te=oe,Ft=ne,Ge=Pe),j.rotationX&&Math.abs(j.rotationX)+Math.abs(j.rotation)>359.9&&(j.rotationX=j.rotation=0,j.rotationY=180-j.rotationY),ke=Math.atan2(Ft,Jt),j.scaleX=(Math.sqrt(te*te+bt*bt+Le*Le)*gt+.5|0)/gt,j.scaleY=(Math.sqrt(Jt*Jt+yi*yi)*gt+.5|0)/gt,j.scaleZ=(Math.sqrt(Ge*Ge+He*He+We*We)*gt+.5|0)/gt,te/=j.scaleX,Ft/=j.scaleY,bt/=j.scaleX,Jt/=j.scaleY,Math.abs(ke)>Tt?(j.skewX=ke*Fe,Ft=0,j.skewType!=="simple"&&(j.scaleY*=1/Math.cos(ke))):j.skewX=0,j.perspective=hi?1/(0>hi?-hi:hi):0,j.x=ei,j.y=ii,j.z=ai,j.svg&&(j.x-=j.xOrigin-(j.xOrigin*te-j.yOrigin*Ft),j.y-=j.yOrigin-(j.yOrigin*bt-j.xOrigin*Jt))}else if(!Gi||L||!y.length||j.x!==y[4]||j.y!==y[5]||!j.rotationX&&!j.rotationY){var Ne=y.length>=6,qe=Ne?y[0]:1,Re=y[1]||0,an=y[2]||0,xi=Ne?y[3]:1;j.x=y[4]||0,j.y=y[5]||0,C=Math.sqrt(qe*qe+Re*Re),Q=Math.sqrt(xi*xi+an*an),rt=qe||Re?Math.atan2(Re,qe)*Fe:j.rotation||0,et=an||xi?Math.atan2(an,xi)*Fe+rt:j.skewX||0,j.scaleX=C,j.scaleY=Q,j.rotation=rt,j.skewX=et,Gi&&(j.rotationX=j.rotationY=j.z=0,j.perspective=Et,j.scaleZ=1),j.svg&&(j.x-=j.xOrigin-(j.xOrigin*qe+j.yOrigin*an),j.y-=j.yOrigin-(j.xOrigin*Re+j.yOrigin*xi))}Math.abs(j.skewX)>90&&Math.abs(j.skewX)<270&&(Mt?(j.scaleX*=-1,j.skewX+=j.rotation<=0?180:-180,j.rotation+=j.rotation<=0?180:-180):(j.scaleY*=-1,j.skewX+=j.skewX<=0?180:-180)),j.zOrigin=Nt;for(W in j)j[W]<Tt&&j[W]>-Tt&&(j[W]=0)}return R&&(v._gsTransform=j,j.svg&&(rn&&v.style[ui]?Ot.delayedCall(.001,function(){On(v.style,ui)}):!rn&&v.getAttribute("transform")&&Ot.delayedCall(.001,function(){v.removeAttribute("transform")}))),j},is=function(v){var E,R,L=this.data,y=-L.rotation*Rt,W=y+L.skewX*Rt,C=1e5,Q=(Math.cos(y)*L.scaleX*C|0)/C,rt=(Math.sin(y)*L.scaleX*C|0)/C,et=(Math.sin(W)*-L.scaleY*C|0)/C,j=(Math.cos(W)*L.scaleY*C|0)/C,Mt=this.t.style,Tt=this.t.currentStyle;if(Tt){R=rt,rt=-et,et=-R,E=Tt.filter,Mt.filter="";var gt,Nt,Et=this.t.offsetWidth,oe=this.t.offsetHeight,ne=Tt.position!=="absolute",Pe="progid:DXImageTransform.Microsoft.Matrix(M11="+Q+", M12="+rt+", M21="+et+", M22="+j,Kt=L.x+Et*L.xPercent/100,Bt=L.y+oe*L.yPercent/100;if(L.ox!=null&&(gt=(L.oxp?Et*L.ox*.01:L.ox)-Et/2,Nt=(L.oyp?oe*L.oy*.01:L.oy)-oe/2,Kt+=gt-(gt*Q+Nt*rt),Bt+=Nt-(gt*et+Nt*j)),ne?(gt=Et/2,Nt=oe/2,Pe+=", Dx="+(gt-(gt*Q+Nt*rt)+Kt)+", Dy="+(Nt-(gt*et+Nt*j)+Bt)+")"):Pe+=", sizingMethod='auto expand')",E.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?Mt.filter=E.replace(kt,Pe):Mt.filter=Pe+" "+E,(v===0||v===1)&&Q===1&&rt===0&&et===0&&j===1&&(ne&&Pe.indexOf("Dx=0, Dy=0")===-1||F.test(E)&&parseFloat(RegExp.$1)!==100||E.indexOf(E.indexOf("Alpha"))===-1&&Mt.removeAttribute("filter")),!ne){var te,bt,Le,Zt=8>K?1:-1;for(gt=L.ieOffsetX||0,Nt=L.ieOffsetY||0,L.ieOffsetX=Math.round((Et-((0>Q?-Q:Q)*Et+(0>rt?-rt:rt)*oe))/2+Kt),L.ieOffsetY=Math.round((oe-((0>j?-j:j)*oe+(0>et?-et:et)*Et))/2+Bt),si=0;4>si;si++)bt=D[si],te=Tt[bt],R=te.indexOf("px")!==-1?parseFloat(te):Si(this.t,bt,parseFloat(te),te.replace(b,""))||0,Le=R!==L[bt]?2>si?-L.ieOffsetX:-L.ieOffsetY:2>si?gt-L.ieOffsetX:Nt-L.ieOffsetY,Mt[bt]=(L[bt]=Math.round(R-Le*(si===0||si===2?1:Zt)))+"px"}}},ns=be.set3DTransformRatio=be.setTransformRatio=function(v){var E,R,L,y,W,C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt,Le,Zt=this.data,Ft=this.t.style,Jt=Zt.rotation,yi=Zt.rotationX,qi=Zt.rotationY,Ge=Zt.scaleX,He=Zt.scaleY,We=Zt.scaleZ,ei=Zt.x,ii=Zt.y,ai=Zt.z,hi=Zt.svg,ke=Zt.perspective,Ne=Zt.force3D,qe=Zt.skewY,Re=Zt.skewX;if(qe&&(Re+=qe,Jt+=qe),((v===1||v===0)&&Ne==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!Ne)&&!ai&&!ke&&!qi&&!yi&&We===1||rn&&hi||!Gi)return void(Jt||Re||hi?(Jt*=Rt,bt=Re*Rt,Le=1e5,R=Math.cos(Jt)*Ge,W=Math.sin(Jt)*Ge,L=Math.sin(Jt-bt)*-He,C=Math.cos(Jt-bt)*He,bt&&Zt.skewType==="simple"&&(E=Math.tan(bt-qe*Rt),E=Math.sqrt(1+E*E),L*=E,C*=E,qe&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,W*=E)),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset,rn&&(Zt.xPercent||Zt.yPercent)&&(Et=this.t.getBBox(),ei+=.01*Zt.xPercent*Et.width,ii+=.01*Zt.yPercent*Et.height),Et=1e-6,Et>ei&&ei>-Et&&(ei=0),Et>ii&&ii>-Et&&(ii=0)),Kt=(R*Le|0)/Le+","+(W*Le|0)/Le+","+(L*Le|0)/Le+","+(C*Le|0)/Le+","+ei+","+ii+")",hi&&rn?this.t.setAttribute("transform","matrix("+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Kt):Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix(":"matrix(")+Ge+",0,0,"+He+","+ei+","+ii+")");if(Dt&&(Et=1e-4,Et>Ge&&Ge>-Et&&(Ge=We=2e-5),Et>He&&He>-Et&&(He=We=2e-5),!ke||Zt.z||Zt.rotationX||Zt.rotationY||(ke=0)),Jt||Re)Jt*=Rt,oe=R=Math.cos(Jt),ne=W=Math.sin(Jt),Re&&(Jt-=Re*Rt,oe=Math.cos(Jt),ne=Math.sin(Jt),Zt.skewType==="simple"&&(E=Math.tan((Re-qe)*Rt),E=Math.sqrt(1+E*E),oe*=E,ne*=E,Zt.skewY&&(E=Math.tan(qe*Rt),E=Math.sqrt(1+E*E),R*=E,W*=E))),L=-ne,C=oe;else{if(!(qi||yi||We!==1||ke||hi))return void(Ft[ui]=(Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) translate3d(":"translate3d(")+ei+"px,"+ii+"px,"+ai+"px)"+(Ge!==1||He!==1?" scale("+Ge+","+He+")":""));R=C=1,L=W=0}j=1,y=Q=rt=et=Mt=Tt=0,gt=ke?-1/ke:0,Nt=Zt.zOrigin,Et=1e-6,Bt=",",te="0",Jt=qi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),rt=-ne,Mt=gt*-ne,y=R*ne,Q=W*ne,j=oe,gt*=oe,R*=oe,W*=oe),Jt=yi*Rt,Jt&&(oe=Math.cos(Jt),ne=Math.sin(Jt),E=L*oe+y*ne,Pe=C*oe+Q*ne,et=j*ne,Tt=gt*ne,y=L*-ne+y*oe,Q=C*-ne+Q*oe,j*=oe,gt*=oe,L=E,C=Pe),We!==1&&(y*=We,Q*=We,j*=We,gt*=We),He!==1&&(L*=He,C*=He,et*=He,Tt*=He),Ge!==1&&(R*=Ge,W*=Ge,rt*=Ge,Mt*=Ge),(Nt||hi)&&(Nt&&(ei+=y*-Nt,ii+=Q*-Nt,ai+=j*-Nt+Nt),hi&&(ei+=Zt.xOrigin-(Zt.xOrigin*R+Zt.yOrigin*L)+Zt.xOffset,ii+=Zt.yOrigin-(Zt.xOrigin*W+Zt.yOrigin*C)+Zt.yOffset),Et>ei&&ei>-Et&&(ei=te),Et>ii&&ii>-Et&&(ii=te),Et>ai&&ai>-Et&&(ai=0)),Kt=Zt.xPercent||Zt.yPercent?"translate("+Zt.xPercent+"%,"+Zt.yPercent+"%) matrix3d(":"matrix3d(",Kt+=(Et>R&&R>-Et?te:R)+Bt+(Et>W&&W>-Et?te:W)+Bt+(Et>rt&&rt>-Et?te:rt),Kt+=Bt+(Et>Mt&&Mt>-Et?te:Mt)+Bt+(Et>L&&L>-Et?te:L)+Bt+(Et>C&&C>-Et?te:C),yi||qi||We!==1?(Kt+=Bt+(Et>et&&et>-Et?te:et)+Bt+(Et>Tt&&Tt>-Et?te:Tt)+Bt+(Et>y&&y>-Et?te:y),Kt+=Bt+(Et>Q&&Q>-Et?te:Q)+Bt+(Et>j&&j>-Et?te:j)+Bt+(Et>gt&>>-Et?te:gt)+Bt):Kt+=",0,0,0,0,1,0,",Kt+=ei+Bt+ii+Bt+ai+Bt+(ke?1+-ai/ke:1)+")",Ft[ui]=Kt};lt=Kn.prototype,lt.x=lt.y=lt.z=lt.skewX=lt.skewY=lt.rotation=lt.rotationX=lt.rotationY=lt.zOrigin=lt.xPercent=lt.yPercent=lt.xOffset=lt.yOffset=0,lt.scaleX=lt.scaleY=lt.scaleZ=1,Qe("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(v,E,R,L,y,W,C){if(L._lastParsedTransform===C)return y;L._lastParsedTransform=C;var Q,rt=C.scale&&typeof C.scale=="function"?C.scale:0;typeof C[R]=="function"&&(Q=C[R],C[R]=E),rt&&(C.scale=rt(m,v));var et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe=v._gsTransform,Kt=v.style,Bt=1e-6,te=Mo.length,bt=C,Le={},Zt="transformOrigin",Ft=sn(v,ht,!0,bt.parseTransform),Jt=bt.transform&&(typeof bt.transform=="function"?bt.transform(m,H):bt.transform);if(Ft.skewType=bt.skewType||Ft.skewType||yt.defaultSkewType,L._transform=Ft,"rotationZ"in bt&&(bt.rotation=bt.rotationZ),Jt&&typeof Jt=="string"&&ui)j=Je.style,j[ui]=Jt,j.display="block",j.position="absolute",Jt.indexOf("%")!==-1&&(j.width=Oe(v,"width"),j.height=Oe(v,"height")),oi.body.appendChild(Je),et=sn(Je,null,!1),Ft.skewType==="simple"&&(et.scaleY*=Math.cos(et.skewX*Rt)),Ft.svg&&(Nt=Ft.xOrigin,Et=Ft.yOrigin,et.x-=Ft.xOffset,et.y-=Ft.yOffset,(bt.transformOrigin||bt.svgOrigin)&&(Jt={},tr(v,U(bt.transformOrigin),Jt,bt.svgOrigin,bt.smoothOrigin,!0),Nt=Jt.xOrigin,Et=Jt.yOrigin,et.x-=Jt.xOffset-Ft.xOffset,et.y-=Jt.yOffset-Ft.yOffset),(Nt||Et)&&(oe=ir(Je,!0),et.x-=Nt-(Nt*oe[0]+Et*oe[2]),et.y-=Et-(Nt*oe[1]+Et*oe[3]))),oi.body.removeChild(Je),et.perspective||(et.perspective=Ft.perspective),bt.xPercent!=null&&(et.xPercent=dt(bt.xPercent,Ft.xPercent)),bt.yPercent!=null&&(et.yPercent=dt(bt.yPercent,Ft.yPercent));else if(typeof bt=="object"){if(et={scaleX:dt(bt.scaleX!=null?bt.scaleX:bt.scale,Ft.scaleX),scaleY:dt(bt.scaleY!=null?bt.scaleY:bt.scale,Ft.scaleY),scaleZ:dt(bt.scaleZ,Ft.scaleZ),x:dt(bt.x,Ft.x),y:dt(bt.y,Ft.y),z:dt(bt.z,Ft.z),xPercent:dt(bt.xPercent,Ft.xPercent),yPercent:dt(bt.yPercent,Ft.yPercent),perspective:dt(bt.transformPerspective,Ft.perspective)},gt=bt.directionalRotation,gt!=null)if(typeof gt=="object")for(j in gt)bt[j]=gt[j];else bt.rotation=gt;typeof bt.x=="string"&&bt.x.indexOf("%")!==-1&&(et.x=0,et.xPercent=dt(bt.x,Ft.xPercent)),typeof bt.y=="string"&&bt.y.indexOf("%")!==-1&&(et.y=0,et.yPercent=dt(bt.y,Ft.yPercent)),et.rotation=wt("rotation"in bt?bt.rotation:"shortRotation"in bt?bt.shortRotation+"_short":Ft.rotation,Ft.rotation,"rotation",Le),Gi&&(et.rotationX=wt("rotationX"in bt?bt.rotationX:"shortRotationX"in bt?bt.shortRotationX+"_short":Ft.rotationX||0,Ft.rotationX,"rotationX",Le),et.rotationY=wt("rotationY"in bt?bt.rotationY:"shortRotationY"in bt?bt.shortRotationY+"_short":Ft.rotationY||0,Ft.rotationY,"rotationY",Le)),et.skewX=wt(bt.skewX,Ft.skewX),et.skewY=wt(bt.skewY,Ft.skewY)}for(Gi&&bt.force3D!=null&&(Ft.force3D=bt.force3D,Tt=!0),Mt=Ft.force3D||Ft.z||Ft.rotationX||Ft.rotationY||et.z||et.rotationX||et.rotationY||et.perspective,Mt||bt.scale==null||(et.scaleZ=1);--te>-1;)ne=Mo[te],Jt=et[ne]-Ft[ne],(Jt>Bt||-Bt>Jt||bt[ne]!=null||vi[ne]!=null)&&(Tt=!0,y=new je(Ft,ne,Ft[ne],Jt,y),ne in Le&&(y.e=Le[ne]),y.xs0=0,y.plugin=W,L._overwriteProps.push(y.n));return Jt=bt.transformOrigin,Ft.svg&&(Jt||bt.svgOrigin)&&(Nt=Ft.xOffset,Et=Ft.yOffset,tr(v,U(Jt),et,bt.svgOrigin,bt.smoothOrigin),y=gn(Ft,"xOrigin",(Pe?Ft:et).xOrigin,et.xOrigin,y,Zt),y=gn(Ft,"yOrigin",(Pe?Ft:et).yOrigin,et.yOrigin,y,Zt),(Nt!==Ft.xOffset||Et!==Ft.yOffset)&&(y=gn(Ft,"xOffset",Pe?Nt:Ft.xOffset,Ft.xOffset,y,Zt),y=gn(Ft,"yOffset",Pe?Et:Ft.yOffset,Ft.yOffset,y,Zt)),Jt="0px 0px"),(Jt||Gi&&Mt&&Ft.zOrigin)&&(ui?(Tt=!0,ne=bn,Jt=(Jt||Oe(v,ne,ht,!1,"50% 50%"))+"",y=new je(Kt,ne,0,0,y,-1,Zt),y.b=Kt[ne],y.plugin=W,Gi?(j=Ft.zOrigin,Jt=Jt.split(" "),Ft.zOrigin=(Jt.length>2&&(j===0||Jt[2]!=="0px")?parseFloat(Jt[2]):j)||0,y.xs0=y.e=Jt[0]+" "+(Jt[1]||"50%")+" 0px",y=new je(Ft,"zOrigin",0,0,y,-1,y.n),y.b=j,y.xs0=y.e=Ft.zOrigin):y.xs0=y.e=Jt):U(Jt+"",Ft)),Tt&&(L._transformType=Ft.svg&&rn||!Mt&&this._transformType!==3?2:3),Q&&(C[R]=Q),rt&&(C.scale=rt),y},prefix:!0}),Qe("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Qe("borderRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){E=this.format(E);var C,Q,rt,et,j,Mt,Tt,gt,Nt,Et,oe,ne,Pe,Kt,Bt,te,bt=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Le=v.style;for(Nt=parseFloat(v.offsetWidth),Et=parseFloat(v.offsetHeight),C=E.split(" "),Q=0;Q<bt.length;Q++)this.p.indexOf("border")&&(bt[Q]=en(bt[Q])),j=et=Oe(v,bt[Q],ht,!1,"0px"),j.indexOf(" ")!==-1&&(et=j.split(" "),j=et[0],et=et[1]),Mt=rt=C[Q],Tt=parseFloat(j),ne=j.substr((Tt+"").length),Pe=Mt.charAt(1)==="=",Pe?(gt=parseInt(Mt.charAt(0)+"1",10),Mt=Mt.substr(2),gt*=parseFloat(Mt),oe=Mt.substr((gt+"").length-(0>gt?1:0))||""):(gt=parseFloat(Mt),oe=Mt.substr((gt+"").length)),oe===""&&(oe=mt[R]||ne),oe!==ne&&(Kt=Si(v,"borderLeft",Tt,ne),Bt=Si(v,"borderTop",Tt,ne),oe==="%"?(j=Kt/Nt*100+"%",et=Bt/Et*100+"%"):oe==="em"?(te=Si(v,"borderLeft",1,"em"),j=Kt/te+"em",et=Bt/te+"em"):(j=Kt+"px",et=Bt+"px"),Pe&&(Mt=parseFloat(j)+gt+oe,rt=parseFloat(et)+gt+oe)),y=Wi(Le,bt[Q],j+" "+et,Mt+" "+rt,!1,"0px",y);return y},prefix:!0,formatter:ze("0px 0px 0px 0px",!1,!0)}),Qe("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(v,E,R,L,y,W){return Wi(v.style,R,this.format(Oe(v,R,ht,!1,"0px 0px")),this.format(E),!1,"0px",y)},prefix:!0,formatter:ze("0px 0px",!1,!0)}),Qe("backgroundPosition",{defaultValue:"0 0",parser:function(v,E,R,L,y,W){var C,Q,rt,et,j,Mt,Tt="background-position",gt=ht||ci(v,null),Nt=this.format((gt?K?gt.getPropertyValue(Tt+"-x")+" "+gt.getPropertyValue(Tt+"-y"):gt.getPropertyValue(Tt):v.currentStyle.backgroundPositionX+" "+v.currentStyle.backgroundPositionY)||"0 0"),Et=this.format(E);if(Nt.indexOf("%")!==-1!=(Et.indexOf("%")!==-1)&&Et.split(",").length<2&&(Mt=Oe(v,"backgroundImage").replace(Gt,""),Mt&&Mt!=="none")){for(C=Nt.split(" "),Q=Et.split(" "),Ri.setAttribute("src",Mt),rt=2;--rt>-1;)Nt=C[rt],et=Nt.indexOf("%")!==-1,et!==(Q[rt].indexOf("%")!==-1)&&(j=rt===0?v.offsetWidth-Ri.width:v.offsetHeight-Ri.height,C[rt]=et?parseFloat(Nt)/100*j+"px":parseFloat(Nt)/j*100+"%");Nt=C.join(" ")}return this.parseComplex(v.style,Nt,Et,y,W)},formatter:U}),Qe("backgroundSize",{defaultValue:"0 0",formatter:function(v){return v+="",v.substr(0,2)==="co"?v:U(v.indexOf(" ")===-1?v+" "+v:v)}}),Qe("perspective",{defaultValue:"0px",prefix:!0}),Qe("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Qe("transformStyle",{prefix:!0}),Qe("backfaceVisibility",{prefix:!0}),Qe("userSelect",{prefix:!0}),Qe("margin",{parser:Xe("marginTop,marginRight,marginBottom,marginLeft")}),Qe("padding",{parser:Xe("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Qe("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(v,E,R,L,y,W){var C,Q,rt;return 9>K?(Q=v.currentStyle,rt=8>K?" ":",",C="rect("+Q.clipTop+rt+Q.clipRight+rt+Q.clipBottom+rt+Q.clipLeft+")",E=this.format(E).split(",").join(rt)):(C=this.format(Oe(v,this.p,ht,!1,this.dflt)),E=this.format(E)),this.parseComplex(v.style,C,E,y,W)}}),Qe("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Qe("autoRound,strictUnits",{parser:function(v,E,R,L,y){return y}}),Qe("border",{defaultValue:"0px solid #000",parser:function(v,E,R,L,y,W){var C=Oe(v,"borderTopWidth",ht,!1,"0px"),Q=this.format(E).split(" "),rt=Q[0].replace(b,"");return rt!=="px"&&(C=parseFloat(C)/Si(v,"borderTopWidth",1,rt)+rt),this.parseComplex(v.style,this.format(C+" "+Oe(v,"borderTopStyle",ht,!1,"solid")+" "+Oe(v,"borderTopColor",ht,!1,"#000")),Q.join(" "),y,W)},color:!0,formatter:function(v){var E=v.split(" ");return E[0]+" "+(E[1]||"solid")+" "+(v.match(he)||["#000"])[0]}}),Qe("borderWidth",{parser:Xe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Qe("float,cssFloat,styleFloat",{parser:function(v,E,R,L,y,W){var C=v.style,Q="cssFloat"in C?"cssFloat":"styleFloat";return new je(C,Q,0,0,y,-1,R,!1,0,C[Q],E)}});var rs=function(v){var E,R=this.t,L=R.filter||Oe(this.data,"filter")||"",y=this.s+this.c*v|0;y===100&&(L.indexOf("atrix(")===-1&&L.indexOf("radient(")===-1&&L.indexOf("oader(")===-1?(R.removeAttribute("filter"),E=!Oe(this.data,"filter")):(R.filter=L.replace(st,""),E=!0)),E||(this.xn1&&(R.filter=L=L||"alpha(opacity="+y+")"),L.indexOf("pacity")===-1?y===0&&this.xn1||(R.filter=L+" alpha(opacity="+y+")"):R.filter=L.replace(F,"opacity="+y))};Qe("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(v,E,R,L,y,W){var C=parseFloat(Oe(v,"opacity",ht,!1,"1")),Q=v.style,rt=R==="autoAlpha";return typeof E=="string"&&E.charAt(1)==="="&&(E=(E.charAt(0)==="-"?-1:1)*parseFloat(E.substr(2))+C),rt&&C===1&&Oe(v,"visibility",ht)==="hidden"&&E!==0&&(C=0),Ke?y=new je(Q,"opacity",C,E-C,y):(y=new je(Q,"opacity",100*C,100*(E-C),y),y.xn1=rt?1:0,Q.zoom=1,y.type=2,y.b="alpha(opacity="+y.s+")",y.e="alpha(opacity="+(y.s+y.c)+")",y.data=v,y.plugin=W,y.setRatio=rs),rt&&(y=new je(Q,"visibility",0,0,y,-1,null,!1,0,C!==0?"inherit":"hidden",E===0?"hidden":"inherit"),y.xs0="inherit",L._overwriteProps.push(y.n),L._overwriteProps.push(R)),y}});var On=function(v,E){E&&(v.removeProperty?((E.substr(0,2)==="ms"||E.substr(0,6)==="webkit")&&(E="-"+E),v.removeProperty(E.replace(Pt,"-$1").toLowerCase())):v.removeAttribute(E))},In=function(v){if(this.t._gsClassPT=this,v===1||v===0){this.t.setAttribute("class",v===0?this.b:this.e);for(var E=this.data,R=this.t.style;E;)E.v?R[E.p]=E.v:On(R,E.p),E=E._next;v===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Qe("className",{parser:function(v,E,R,L,y,W,C){var Q,rt,et,j,Mt,Tt=v.getAttribute("class")||"",gt=v.style.cssText;if(y=L._classNamePT=new je(v,R,0,0,y,2),y.setRatio=In,y.pr=-11,$=!0,y.b=Tt,rt=nn(v,ht),et=v._gsClassPT){for(j={},Mt=et.data;Mt;)j[Mt.p]=1,Mt=Mt._next;et.setRatio(1)}return v._gsClassPT=y,y.e=E.charAt(1)!=="="?E:Tt.replace(new RegExp("(?:\\s|^)"+E.substr(2)+"(?![\\w-])"),"")+(E.charAt(0)==="+"?" "+E.substr(2):""),v.setAttribute("class",y.e),Q=Ci(v,rt,nn(v),C,j),v.setAttribute("class",Tt),y.data=Q.firstMPT,v.style.cssText=gt,y=y.xfirst=L.parse(v,Q.difs,y,W)}});var So=function(v){if((v===1||v===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var E,R,L,y,W,C=this.t.style,Q=Y.transform.parse;if(this.e==="all")C.cssText="",y=!0;else for(E=this.e.split(" ").join("").split(","),L=E.length;--L>-1;)R=E[L],Y[R]&&(Y[R].parse===Q?y=!0:R=R==="transformOrigin"?bn:Y[R].p),On(C,R);y&&(On(C,ui),W=this.t._gsTransform,W&&(W.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Qe("clearProps",{parser:function(v,E,R,L,y){return y=new je(v,R,0,0,y,2),y.setRatio=So,y.e=E,y.pr=-10,y.data=L._tween,$=!0,y}}),lt="bezier,throwProps,physicsProps,physics2D".split(","),si=lt.length;si--;)Ko(lt[si]);lt=yt.prototype,lt._firstPT=lt._lastParsedTransform=lt._transform=null,lt._onInitTween=function(v,E,R,L){if(!v.nodeType)return!1;this._target=H=v,this._tween=R,this._vars=E,m=L,St=E.autoRound,$=!1,mt=E.suffixMap||yt.suffixMap,ht=ci(v,""),M=this._overwriteProps;var y,W,C,Q,rt,et,j,Mt,Tt,gt=v.style;if(ut&>.zIndex===""&&(y=Oe(v,"zIndex",ht),(y==="auto"||y==="")&&this._addLazySet(gt,"zIndex",0)),typeof E=="string"&&(Q=gt.cssText,y=nn(v,ht),gt.cssText=Q+";"+E,y=Ci(v,y,nn(v)).difs,!Ke&&Z.test(E)&&(y.opacity=parseFloat(RegExp.$1)),E=y,gt.cssText=Q),E.className?this._firstPT=W=Y.className.parse(v,E.className,"className",this,null,null,E):this._firstPT=W=this.parse(v,E,null),this._transformType){for(Tt=this._transformType===3,ui?At&&(ut=!0,gt.zIndex===""&&(j=Oe(v,"zIndex",ht),(j==="auto"||j==="")&&this._addLazySet(gt,"zIndex",0)),_t&&this._addLazySet(gt,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(Tt?"visible":"hidden"))):gt.zoom=1,C=W;C&&C._next;)C=C._next;Mt=new je(v,"transform",0,0,null,2),this._linkCSSP(Mt,null,C),Mt.setRatio=ui?ns:is,Mt.data=this._transform||sn(v,ht,!0),Mt.tween=R,Mt.pr=-1,M.pop()}if($){for(;W;){for(et=W._next,C=Q;C&&C.pr>W.pr;)C=C._next;(W._prev=C?C._prev:rt)?W._prev._next=W:Q=W,(W._next=C)?C._prev=W:rt=W,W=et}this._firstPT=Q}return!0},lt.parse=function(v,E,R,L){var y,W,C,Q,rt,et,j,Mt,Tt,gt,Nt=v.style;for(y in E){if(et=E[y],typeof et=="function"&&(et=et(m,H)),W=Y[y])R=W.parse(v,et,y,this,R,L,E);else{if(y.substr(0,2)==="--"){this._tween._propLookup[y]=this._addTween.call(this._tween,v.style,"setProperty",ci(v).getPropertyValue(y)+"",et+"",y,!1,y);continue}rt=Oe(v,y,ht)+"",Tt=typeof et=="string",y==="color"||y==="fill"||y==="stroke"||y.indexOf("Color")!==-1||Tt&&it.test(et)?(Tt||(et=se(et),et=(et.length>3?"rgba(":"rgb(")+et.join(",")+")"),R=Wi(Nt,y,rt,et,!0,"transparent",R,0,L)):Tt&&gi.test(et)?R=Wi(Nt,y,rt,et,!0,null,R,0,L):(C=parseFloat(rt),j=C||C===0?rt.substr((C+"").length):"",(rt===""||rt==="auto")&&(y==="width"||y==="height"?(C=B(v,y,ht),j="px"):y==="left"||y==="top"?(C=Tn(v,y,ht),j="px"):(C=y!=="opacity"?0:1,j="")),gt=Tt&&et.charAt(1)==="=",gt?(Q=parseInt(et.charAt(0)+"1",10),et=et.substr(2),Q*=parseFloat(et),Mt=et.replace(b,"")):(Q=parseFloat(et),Mt=Tt?et.replace(b,""):""),Mt===""&&(Mt=y in mt?mt[y]:j),et=Q||Q===0?(gt?Q+C:Q)+Mt:E[y],j!==Mt&&(Mt!==""||y==="lineHeight")&&(Q||Q===0)&&C&&(C=Si(v,y,C,j),Mt==="%"?(C/=Si(v,y,100,"%")/100,E.strictUnits!==!0&&(rt=C+"%")):Mt==="em"||Mt==="rem"||Mt==="vw"||Mt==="vh"?C/=Si(v,y,1,Mt):Mt!=="px"&&(Q=Si(v,y,Q,Mt),Mt="px"),gt&&(Q||Q===0)&&(et=Q+C+Mt)),gt&&(Q+=C),!C&&C!==0||!Q&&Q!==0?Nt[y]!==void 0&&(et||et+""!="NaN"&&et!=null)?(R=new je(Nt,y,Q||C||0,0,R,-1,y,!1,0,rt,et),R.xs0=et!=="none"||y!=="display"&&y.indexOf("Style")===-1?et:rt):Cn("invalid "+y+" tween value: "+E[y]):(R=new je(Nt,y,C,Q-C,R,0,y,St!==!1&&(Mt==="px"||y==="zIndex"),0,rt,et),R.xs0=Mt))}L&&R&&!R.plugin&&(R.plugin=L)}return R},lt.setRatio=function(v){var E,R,L,y=this._firstPT,W=1e-6;if(v!==1||this._tween._time!==this._tween._duration&&this._tween._time!==0)if(v||this._tween._time!==this._tween._duration&&this._tween._time!==0||this._tween._rawPrevTime===-1e-6)for(;y;){if(E=y.c*v+y.s,y.r?E=y.r(E):W>E&&E>-W&&(E=0),y.type)if(y.type===1)if(L=y.l,L===2)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2;else if(L===3)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3;else if(L===4)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4;else if(L===5)y.t[y.p]=y.xs0+E+y.xs1+y.xn1+y.xs2+y.xn2+y.xs3+y.xn3+y.xs4+y.xn4+y.xs5;else{for(R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}else y.type===-1?y.t[y.p]=y.xs0:y.setRatio&&y.setRatio(v);else y.t[y.p]=E+y.xs0;y=y._next}else for(;y;)y.type!==2?y.t[y.p]=y.b:y.setRatio(v),y=y._next;else for(;y;){if(y.type!==2)if(y.r&&y.type!==-1)if(E=y.r(y.s+y.c),y.type){if(y.type===1){for(L=y.l,R=y.xs0+E+y.xs1,L=1;L<y.l;L++)R+=y["xn"+L]+y["xs"+(L+1)];y.t[y.p]=R}}else y.t[y.p]=E+y.xs0;else y.t[y.p]=y.e;else y.setRatio(v);y=y._next}},lt._enableTransforms=function(v){this._transform=this._transform||sn(this._target,ht,!0),this._transformType=this._transform.svg&&rn||!v&&this._transformType!==3?2:3};var Eo=function(v){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};lt._addLazySet=function(v,E,R){var L=this._firstPT=new je(v,E,0,0,this._firstPT,2);L.e=R,L.setRatio=Eo,L.data=this},lt._linkCSSP=function(v,E,R,L){return v&&(E&&(E._prev=v),v._next&&(v._next._prev=v._prev),v._prev?v._prev._next=v._next:this._firstPT===v&&(this._firstPT=v._next,L=!0),R?R._next=v:L||this._firstPT!==null||(this._firstPT=v),v._next=E,v._prev=R),v},lt._mod=function(v){for(var E=this._firstPT;E;)typeof v[E.p]=="function"&&(E.r=v[E.p]),E=E._next},lt._kill=function(v){var E,R,L,y=v;if(v.autoAlpha||v.alpha){y={};for(R in v)y[R]=v[R];y.opacity=1,y.autoAlpha&&(y.visibility=1)}for(v.className&&(E=this._classNamePT)&&(L=E.xfirst,L&&L._prev?this._linkCSSP(L._prev,E._next,L._prev._prev):L===this._firstPT&&(this._firstPT=E._next),E._next&&this._linkCSSP(E._next,E._next._next,L._prev),this._classNamePT=null),E=this._firstPT;E;)E.plugin&&E.plugin!==R&&E.plugin._kill&&(E.plugin._kill(v),R=E.plugin),E=E._next;return p.prototype._kill.call(this,y)};var En=function(v,E,R){var L,y,W,C;if(v.slice)for(y=v.length;--y>-1;)En(v[y],E,R);else for(L=v.childNodes,y=L.length;--y>-1;)W=L[y],C=W.type,W.style&&(E.push(nn(W)),R&&R.push(W)),C!==1&&C!==9&&C!==11||!W.childNodes.length||En(W,E,R)};return yt.cascadeTo=function(v,E,R){var L,y,W,C,Q=Ot.to(v,E,R),rt=[Q],et=[],j=[],Mt=[],Tt=Ot._internals.reservedProps;for(v=Q._targets||Q.target,En(v,et,Mt),Q.render(E,!0,!0),En(v,j),Q.render(0,!0,!0),Q._enabled(!0),L=Mt.length;--L>-1;)if(y=Ci(Mt[L],et[L],j[L]),y.firstMPT){y=y.difs;for(W in R)Tt[W]&&(y[W]=R[W]);C={};for(W in y)C[W]=et[L][W];rt.push(Ot.fromTo(Mt[L],E,C,y))}return rt},p.activate([yt]),yt},!0),function(){var p=$e._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(ht,M,yt){return this._tween=yt,!0}}),Ot=function(ht){var M=1>ht?Math.pow(10,(ht+"").length-2):1;return function(yt){return(Math.round(yt/ht)*ht*M|0)/M}},$=function(ht,M){for(;ht;)ht.f||ht.blob||(ht.m=M||Math.round),ht=ht._next},mt=p.prototype;mt._onInitAllProps=function(){var ht,M,yt,Ct,Y=this._tween,lt=Y.vars.roundProps,St={},ut=Y._propLookup.roundProps;if(typeof lt!="object"||lt.push)for(typeof lt=="string"&&(lt=lt.split(",")),yt=lt.length;--yt>-1;)St[lt[yt]]=Math.round;else for(Ct in lt)St[Ct]=Ot(lt[Ct]);for(Ct in St)for(ht=Y._firstPT;ht;)M=ht._next,ht.pg?ht.t._mod(St):ht.n===Ct&&(ht.f===2&&ht.t?$(ht.t._firstPT,St[Ct]):(this._add(ht.t,Ct,ht.s,ht.c,St[Ct]),M&&(M._prev=ht._prev),ht._prev?ht._prev._next=M:Y._firstPT===ht&&(Y._firstPT=M),ht._next=ht._prev=null,Y._propLookup[Ct]=ut)),ht=M;return!1},mt._add=function(ht,M,yt,Ct,Y){this._addTween(ht,M,yt,yt+Ct,M,Y||Math.round),this._overwriteProps.push(M)}}(),function(){$e._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(p,Ot,$,mt){var ht,M;if(typeof p.setAttribute!="function")return!1;for(ht in Ot)M=Ot[ht],typeof M=="function"&&(M=M(mt,p)),this._addTween(p,"setAttribute",p.getAttribute(ht)+"",M+"",ht,!1,ht),this._overwriteProps.push(ht);return!0}})}(),$e._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(p,Ot,$,mt){typeof Ot!="object"&&(Ot={rotation:Ot}),this.finals={};var ht,M,yt,Ct,Y,lt,St=Ot.useRadians===!0?2*Math.PI:360,ut=1e-6;for(ht in Ot)ht!=="useRadians"&&(Ct=Ot[ht],typeof Ct=="function"&&(Ct=Ct(mt,p)),lt=(Ct+"").split("_"),M=lt[0],yt=parseFloat(typeof p[ht]!="function"?p[ht]:p[ht.indexOf("set")||typeof p["get"+ht.substr(3)]!="function"?ht:"get"+ht.substr(3)]()),Ct=this.finals[ht]=typeof M=="string"&&M.charAt(1)==="="?yt+parseInt(M.charAt(0)+"1",10)*Number(M.substr(2)):Number(M)||0,Y=Ct-yt,lt.length&&(M=lt.join("_"),M.indexOf("short")!==-1&&(Y%=St,Y!==Y%(St/2)&&(Y=0>Y?Y+St:Y-St)),M.indexOf("_cw")!==-1&&0>Y?Y=(Y+9999999999*St)%St-(Y/St|0)*St:M.indexOf("ccw")!==-1&&Y>0&&(Y=(Y-9999999999*St)%St-(Y/St|0)*St)),(Y>ut||-ut>Y)&&(this._addTween(p,ht,yt,yt+Y,ht),this._overwriteProps.push(ht)));return!0},set:function(p){var Ot;if(p!==1)this._super.setRatio.call(this,p);else for(Ot=this._firstPT;Ot;)Ot.f?Ot.t[Ot.p](this.finals[Ot.p]):Ot.t[Ot.p]=this.finals[Ot.p],Ot=Ot._next}})._autoCSS=!0,$e._gsDefine("easing.Back",["easing.Ease"],function(p){var Ot,$,mt,ht,M=$e.GreenSockGlobals||$e,yt=M.com.greensock,Ct=2*Math.PI,Y=Math.PI/2,lt=yt._class,St=function(f,O){var w=lt("easing."+f,function(){},!0),X=w.prototype=new p;return X.constructor=w,X.getRatio=O,w},ut=p.register||function(){},At=function(f,O,w,X,b){var F=lt("easing."+f,{easeOut:new O,easeIn:new w,easeInOut:new X},!0);return ut(F,f),F},Dt=function(f,O,w){this.t=f,this.v=O,w&&(this.next=w,w.prev=this,this.c=w.v-O,this.gap=w.t-f)},_t=function(f,O){var w=lt("easing."+f,function(b){this._p1=b||b===0?b:1.70158,this._p2=1.525*this._p1},!0),X=w.prototype=new p;return X.constructor=w,X.getRatio=O,X.config=function(b){return new w(b)},w},K=At("Back",_t("BackOut",function(f){return(f-=1)*f*((this._p1+1)*f+this._p1)+1}),_t("BackIn",function(f){return f*f*((this._p1+1)*f-this._p1)}),_t("BackInOut",function(f){return(f*=2)<1?.5*f*f*((this._p2+1)*f-this._p2):.5*((f-=2)*f*((this._p2+1)*f+this._p2)+2)})),H=lt("easing.SlowMo",function(f,O,w){O=O||O===0?O:.7,f==null?f=.7:f>1&&(f=1),this._p=f!==1?O:0,this._p1=(1-f)/2,this._p2=f,this._p3=this._p1+this._p2,this._calcEnd=w===!0},!0),m=H.prototype=new p;return m.constructor=H,m.getRatio=function(f){var O=f+(.5-f)*this._p;return f<this._p1?this._calcEnd?1-(f=1-f/this._p1)*f:O-(f=1-f/this._p1)*f*f*f*O:f>this._p3?this._calcEnd?f===1?0:1-(f=(f-this._p3)/this._p1)*f:O+(f-O)*(f=(f-this._p3)/this._p1)*f*f*f:this._calcEnd?1:O},H.ease=new H(.7,.7),m.config=H.config=function(f,O,w){return new H(f,O,w)},Ot=lt("easing.SteppedEase",function(f,O){f=f||1,this._p1=1/f,this._p2=f+(O?0:1),this._p3=O?1:0},!0),m=Ot.prototype=new p,m.constructor=Ot,m.getRatio=function(f){return 0>f?f=0:f>=1&&(f=.999999999),((this._p2*f|0)+this._p3)*this._p1},m.config=Ot.config=function(f,O){return new Ot(f,O)},$=lt("easing.ExpoScaleEase",function(f,O,w){this._p1=Math.log(O/f),this._p2=O-f,this._p3=f,this._ease=w},!0),m=$.prototype=new p,m.constructor=$,m.getRatio=function(f){return this._ease&&(f=this._ease.getRatio(f)),(this._p3*Math.exp(this._p1*f)-this._p3)/this._p2},m.config=$.config=function(f,O,w){return new $(f,O,w)},mt=lt("easing.RoughEase",function(f){f=f||{};for(var O,w,X,b,F,Z,st=f.taper||"none",it=[],Pt=0,Lt=0|(f.points||20),Gt=Lt,jt=f.randomize!==!1,ie=f.clamp===!0,ct=f.template instanceof p?f.template:null,kt=typeof f.strength=="number"?.4*f.strength:.4;--Gt>-1;)O=jt?Math.random():1/Lt*Gt,w=ct?ct.getRatio(O):O,st==="none"?X=kt:st==="out"?(b=1-O,X=b*b*kt):st==="in"?X=O*O*kt:.5>O?(b=2*O,X=b*b*.5*kt):(b=2*(1-O),X=b*b*.5*kt),jt?w+=Math.random()*X-.5*X:Gt%2?w+=.5*X:w-=.5*X,ie&&(w>1?w=1:0>w&&(w=0)),it[Pt++]={x:O,y:w};for(it.sort(function(Me,gi){return Me.x-gi.x}),Z=new Dt(1,1,null),Gt=Lt;--Gt>-1;)F=it[Gt],Z=new Dt(F.x,F.y,Z);this._prev=new Dt(0,0,Z.t!==0?Z:Z.next)},!0),m=mt.prototype=new p,m.constructor=mt,m.getRatio=function(f){var O=this._prev;if(f>O.t){for(;O.next&&f>=O.t;)O=O.next;O=O.prev}else for(;O.prev&&f<=O.t;)O=O.prev;return this._prev=O,O.v+(f-O.t)/O.gap*O.c},m.config=function(f){return new mt(f)},mt.ease=new mt,At("Bounce",St("BounceOut",function(f){return 1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375}),St("BounceIn",function(f){return(f=1-f)<1/2.75?1-7.5625*f*f:2/2.75>f?1-(7.5625*(f-=1.5/2.75)*f+.75):2.5/2.75>f?1-(7.5625*(f-=2.25/2.75)*f+.9375):1-(7.5625*(f-=2.625/2.75)*f+.984375)}),St("BounceInOut",function(f){var O=.5>f;return f=O?1-2*f:2*f-1,f=1/2.75>f?7.5625*f*f:2/2.75>f?7.5625*(f-=1.5/2.75)*f+.75:2.5/2.75>f?7.5625*(f-=2.25/2.75)*f+.9375:7.5625*(f-=2.625/2.75)*f+.984375,O?.5*(1-f):.5*f+.5})),At("Circ",St("CircOut",function(f){return Math.sqrt(1-(f-=1)*f)}),St("CircIn",function(f){return-(Math.sqrt(1-f*f)-1)}),St("CircInOut",function(f){return(f*=2)<1?-.5*(Math.sqrt(1-f*f)-1):.5*(Math.sqrt(1-(f-=2)*f)+1)})),ht=function(f,O,w){var X=lt("easing."+f,function(F,Z){this._p1=F>=1?F:1,this._p2=(Z||w)/(1>F?F:1),this._p3=this._p2/Ct*(Math.asin(1/this._p1)||0),this._p2=Ct/this._p2},!0),b=X.prototype=new p;return b.constructor=X,b.getRatio=O,b.config=function(F,Z){return new X(F,Z)},X},At("Elastic",ht("ElasticOut",function(f){return this._p1*Math.pow(2,-10*f)*Math.sin((f-this._p3)*this._p2)+1},.3),ht("ElasticIn",function(f){return-(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2))},.3),ht("ElasticInOut",function(f){return(f*=2)<1?-.5*(this._p1*Math.pow(2,10*(f-=1))*Math.sin((f-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(f-=1))*Math.sin((f-this._p3)*this._p2)*.5+1},.45)),At("Expo",St("ExpoOut",function(f){return 1-Math.pow(2,-10*f)}),St("ExpoIn",function(f){return Math.pow(2,10*(f-1))-.001}),St("ExpoInOut",function(f){return(f*=2)<1?.5*Math.pow(2,10*(f-1)):.5*(2-Math.pow(2,-10*(f-1)))})),At("Sine",St("SineOut",function(f){return Math.sin(f*Y)}),St("SineIn",function(f){return-Math.cos(f*Y)+1}),St("SineInOut",function(f){return-.5*(Math.cos(Math.PI*f)-1)})),lt("easing.EaseLookup",{find:function(f){return p.map[f]}},!0),ut(M.SlowMo,"SlowMo","ease,"),ut(mt,"RoughEase","ease,"),ut(Ot,"SteppedEase","ease,"),K},!0)}),$e._gsDefine&&$e._gsQueue.pop()(),function(p,Ot){var $={},mt=p.document,ht=p.GreenSockGlobals=p.GreenSockGlobals||p,M=ht[Ot];if(M)return typeof module<"u"&&module.exports&&(module.exports=M),M;var yt,Ct,Y,lt,St,ut=function(_){var D,B=_.split("."),U=ht;for(D=0;D<B.length;D++)U[B[D]]=U=U[B[D]]||{};return U},At=ut("com.greensock"),Dt=1e-10,_t=function(_){var D,B=[],U=_.length;for(D=0;D!==U;B.push(_[D++]));return B},K=function(){},H=function(){var _=Object.prototype.toString,D=_.call([]);return function(B){return B!=null&&(B instanceof Array||typeof B=="object"&&!!B.push&&_.call(B)===D)}}(),m={},f=function(_,D,B,U){this.sc=m[_]?m[_].sc:[],m[_]=this,this.gsClass=null,this.func=B;var J=[];this.check=function(dt){for(var wt,pt,ae,se,Ut=D.length,he=Ut;--Ut>-1;)(wt=m[D[Ut]]||new f(D[Ut],[])).gsClass?(J[Ut]=wt.gsClass,he--):dt&&wt.sc.push(this);if(he===0&&B){if(pt=("com.greensock."+_).split("."),ae=pt.pop(),se=ut(pt.join("."))[ae]=this.gsClass=B.apply(B,J),U)if(ht[ae]=$[ae]=se,typeof module<"u"&&module.exports)if(_===Ot){module.exports=$[Ot]=se;for(Ut in $)se[Ut]=$[Ut]}else $[Ot]&&($[Ot][ae]=se);else typeof define=="function"&&define.amd&&define((p.GreenSockAMDPath?p.GreenSockAMDPath+"/":"")+_.split(".").pop(),[],function(){return se});for(Ut=0;Ut<this.sc.length;Ut++)this.sc[Ut].check()}},this.check(!0)},O=p._gsDefine=function(_,D,B,U){return new f(_,D,B,U)},w=At._class=function(_,D,B){return D=D||function(){},O(_,[],function(){return D},B),D};O.globals=ht;var X=[0,0,1,1],b=w("easing.Ease",function(_,D,B,U){this._func=_,this._type=B||0,this._power=U||0,this._params=D?X.concat(D):X},!0),F=b.map={},Z=b.register=function(_,D,B,U){for(var J,dt,wt,pt,ae=D.split(","),se=ae.length,Ut=(B||"easeIn,easeOut,easeInOut").split(",");--se>-1;)for(dt=ae[se],J=U?w("easing."+dt,null,!0):At.easing[dt]||{},wt=Ut.length;--wt>-1;)pt=Ut[wt],F[dt+"."+pt]=F[pt+dt]=J[pt]=_.getRatio?_:_[pt]||new _};for(Y=b.prototype,Y._calcEnd=!1,Y.getRatio=function(_){if(this._func)return this._params[0]=_,this._func.apply(null,this._params);var D=this._type,B=this._power,U=D===1?1-_:D===2?_:.5>_?2*_:2*(1-_);return B===1?U*=U:B===2?U*=U*U:B===3?U*=U*U*U:B===4&&(U*=U*U*U*U),D===1?1-U:D===2?U:.5>_?U/2:1-U/2},yt=["Linear","Quad","Cubic","Quart","Quint,Strong"],Ct=yt.length;--Ct>-1;)Y=yt[Ct]+",Power"+Ct,Z(new b(null,null,1,Ct),Y,"easeOut",!0),Z(new b(null,null,2,Ct),Y,"easeIn"+(Ct===0?",easeNone":"")),Z(new b(null,null,3,Ct),Y,"easeInOut");F.linear=At.easing.Linear.easeIn,F.swing=At.easing.Quad.easeInOut;var st=w("events.EventDispatcher",function(_){this._listeners={},this._eventTarget=_||this});Y=st.prototype,Y.addEventListener=function(_,D,B,U,J){J=J||0;var dt,wt,pt=this._listeners[_],ae=0;for(this!==lt||St||lt.wake(),pt==null&&(this._listeners[_]=pt=[]),wt=pt.length;--wt>-1;)dt=pt[wt],dt.c===D&&dt.s===B?pt.splice(wt,1):ae===0&&dt.pr<J&&(ae=wt+1);pt.splice(ae,0,{c:D,s:B,up:U,pr:J})},Y.removeEventListener=function(_,D){var B,U=this._listeners[_];if(U){for(B=U.length;--B>-1;)if(U[B].c===D)return void U.splice(B,1)}},Y.dispatchEvent=function(_){var D,B,U,J=this._listeners[_];if(J)for(D=J.length,D>1&&(J=J.slice(0)),B=this._eventTarget;--D>-1;)U=J[D],U&&(U.up?U.c.call(U.s||B,{type:_,target:B}):U.c.call(U.s||B))};var it=p.requestAnimationFrame,Pt=p.cancelAnimationFrame,Lt=Date.now||function(){return new Date().getTime()},Gt=Lt();for(yt=["ms","moz","webkit","o"],Ct=yt.length;--Ct>-1&&!it;)it=p[yt[Ct]+"RequestAnimationFrame"],Pt=p[yt[Ct]+"CancelAnimationFrame"]||p[yt[Ct]+"CancelRequestAnimationFrame"];w("Ticker",function(_,D){var B,U,J,dt,wt,pt=this,ae=Lt(),se=D!==!1&&it?"auto":!1,Ut=500,he=33,ze="tick",Xe=function(Ce){var je,gn,Wi=Lt()-Gt;Wi>Ut&&(ae+=Wi-he),Gt+=Wi,pt.time=(Gt-ae)/1e3,je=pt.time-wt,(!B||je>0||Ce===!0)&&(pt.frame++,wt+=je+(je>=dt?.004:dt-je),gn=!0),Ce!==!0&&(J=U(Xe)),gn&&pt.dispatchEvent(ze)};st.call(pt),pt.time=pt.frame=0,pt.tick=function(){Xe(!0)},pt.lagSmoothing=function(Ce,je){return arguments.length?(Ut=Ce||1/Dt,void(he=Math.min(je,Ut,0))):1/Dt>Ut},pt.sleep=function(){J!=null&&(se&&Pt?Pt(J):clearTimeout(J),U=K,J=null,pt===lt&&(St=!1))},pt.wake=function(Ce){J!==null?pt.sleep():Ce?ae+=-Gt+(Gt=Lt()):pt.frame>10&&(Gt=Lt()-Ut+5),U=B===0?K:se&&it?it:function(je){return setTimeout(je,1e3*(wt-pt.time)+1|0)},pt===lt&&(St=!0),Xe(2)},pt.fps=function(Ce){return arguments.length?(B=Ce,dt=1/(B||60),wt=this.time+dt,void pt.wake()):B},pt.useRAF=function(Ce){return arguments.length?(pt.sleep(),se=Ce,void pt.fps(B)):se},pt.fps(_),setTimeout(function(){se==="auto"&&pt.frame<5&&(mt||{}).visibilityState!=="hidden"&&pt.useRAF(!1)},1500)}),Y=At.Ticker.prototype=new At.events.EventDispatcher,Y.constructor=At.Ticker;var jt=w("core.Animation",function(_,D){if(this.vars=D=D||{},this._duration=this._totalDuration=_||0,this._delay=Number(D.delay)||0,this._timeScale=1,this._active=D.immediateRender===!0,this.data=D.data,this._reversed=D.reversed===!0,Ii){St||lt.wake();var B=this.vars.useFrames?ji:Ii;B.add(this,B._time),this.vars.paused&&this.paused(!0)}});lt=jt.ticker=new At.Ticker,Y=jt.prototype,Y._dirty=Y._gc=Y._initted=Y._paused=!1,Y._totalTime=Y._time=0,Y._rawPrevTime=-1,Y._next=Y._last=Y._onUpdate=Y._timeline=Y.timeline=null,Y._paused=!1;var ie=function(){St&&Lt()-Gt>2e3&&((mt||{}).visibilityState!=="hidden"||!lt.lagSmoothing())&<.wake();var _=setTimeout(ie,2e3);_.unref&&_.unref()};ie(),Y.play=function(_,D){return _!=null&&this.seek(_,D),this.reversed(!1).paused(!1)},Y.pause=function(_,D){return _!=null&&this.seek(_,D),this.paused(!0)},Y.resume=function(_,D){return _!=null&&this.seek(_,D),this.paused(!1)},Y.seek=function(_,D){return this.totalTime(Number(_),D!==!1)},Y.restart=function(_,D){return this.reversed(!1).paused(!1).totalTime(_?-this._delay:0,D!==!1,!0)},Y.reverse=function(_,D){return _!=null&&this.seek(_||this.totalDuration(),D),this.reversed(!0).paused(!1)},Y.render=function(_,D,B){},Y.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},Y.isActive=function(){var _,D=this._timeline,B=this._startTime;return!D||!this._gc&&!this._paused&&D.isActive()&&(_=D.rawTime(!0))>=B&&_<B+this.totalDuration()/this._timeScale-1e-7},Y._enabled=function(_,D){return St||lt.wake(),this._gc=!_,this._active=this.isActive(),D!==!0&&(_&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!_&&this.timeline&&this._timeline._remove(this,!0)),!1},Y._kill=function(_,D){return this._enabled(!1,!1)},Y.kill=function(_,D){return this._kill(_,D),this},Y._uncache=function(_){for(var D=_?this:this.timeline;D;)D._dirty=!0,D=D.timeline;return this},Y._swapSelfInParams=function(_){for(var D=_.length,B=_.concat();--D>-1;)_[D]==="{self}"&&(B[D]=this);return B},Y._callback=function(_){var D=this.vars,B=D[_],U=D[_+"Params"],J=D[_+"Scope"]||D.callbackScope||this,dt=U?U.length:0;switch(dt){case 0:B.call(J);break;case 1:B.call(J,U[0]);break;case 2:B.call(J,U[0],U[1]);break;default:B.apply(J,U)}},Y.eventCallback=function(_,D,B,U){if((_||"").substr(0,2)==="on"){var J=this.vars;if(arguments.length===1)return J[_];D==null?delete J[_]:(J[_]=D,J[_+"Params"]=H(B)&&B.join("").indexOf("{self}")!==-1?this._swapSelfInParams(B):B,J[_+"Scope"]=U),_==="onUpdate"&&(this._onUpdate=D)}return this},Y.delay=function(_){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+_-this._delay),this._delay=_,this):this._delay},Y.duration=function(_){return arguments.length?(this._duration=this._totalDuration=_,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&_!==0&&this.totalTime(this._totalTime*(_/this._duration),!0),this):(this._dirty=!1,this._duration)},Y.totalDuration=function(_){return this._dirty=!1,arguments.length?this.duration(_):this._totalDuration},Y.time=function(_,D){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(_>this._duration?this._duration:_,D)):this._time},Y.totalTime=function(_,D,B){if(St||lt.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>_&&!B&&(_+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var U=this._totalDuration,J=this._timeline;if(_>U&&!B&&(_=U),this._startTime=(this._paused?this._pauseTime:J._time)-(this._reversed?U-_:_)/this._timeScale,J._dirty||this._uncache(!1),J._timeline)for(;J._timeline;)J._timeline._time!==(J._startTime+J._totalTime)/J._timeScale&&J.totalTime(J._totalTime,!0),J=J._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==_||this._duration===0)&&(Rt.length&&ci(),this.render(_,D,!1),Rt.length&&ci())}return this},Y.progress=Y.totalProgress=function(_,D){var B=this.duration();return arguments.length?this.totalTime(B*_,D):B?this._time/B:this.ratio},Y.startTime=function(_){return arguments.length?(_!==this._startTime&&(this._startTime=_,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,_-this._delay)),this):this._startTime},Y.endTime=function(_){return this._startTime+(_!=0?this.totalDuration():this.duration())/this._timeScale},Y.timeScale=function(_){if(!arguments.length)return this._timeScale;var D,B;for(_=_||Dt,this._timeline&&this._timeline.smoothChildTiming&&(D=this._pauseTime,B=D||D===0?D:this._timeline.totalTime(),this._startTime=B-(B-this._startTime)*this._timeScale/_),this._timeScale=_,B=this.timeline;B&&B.timeline;)B._dirty=!0,B.totalDuration(),B=B.timeline;return this},Y.reversed=function(_){return arguments.length?(_!=this._reversed&&(this._reversed=_,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},Y.paused=function(_){if(!arguments.length)return this._paused;var D,B,U=this._timeline;return _!=this._paused&&U&&(St||_||lt.wake(),D=U.rawTime(),B=D-this._pauseTime,!_&&U.smoothChildTiming&&(this._startTime+=B,this._uncache(!1)),this._pauseTime=_?D:null,this._paused=_,this._active=this.isActive(),!_&&B!==0&&this._initted&&this.duration()&&(D=U.smoothChildTiming?this._totalTime:(D-this._startTime)/this._timeScale,this.render(D,D===this._totalTime,!0))),this._gc&&!_&&this._enabled(!0,!1),this};var ct=w("core.SimpleTimeline",function(_){jt.call(this,0,_),this.autoRemoveChildren=this.smoothChildTiming=!0});Y=ct.prototype=new jt,Y.constructor=ct,Y.kill()._gc=!1,Y._first=Y._last=Y._recent=null,Y._sortChildren=!1,Y.add=Y.insert=function(_,D,B,U){var J,dt;if(_._startTime=Number(D||0)+_._delay,_._paused&&this!==_._timeline&&(_._pauseTime=this.rawTime()-(_._timeline.rawTime()-_._pauseTime)),_.timeline&&_.timeline._remove(_,!0),_.timeline=_._timeline=this,_._gc&&_._enabled(!0,!0),J=this._last,this._sortChildren)for(dt=_._startTime;J&&J._startTime>dt;)J=J._prev;return J?(_._next=J._next,J._next=_):(_._next=this._first,this._first=_),_._next?_._next._prev=_:this._last=_,_._prev=J,this._recent=_,this._timeline&&this._uncache(!0),this},Y._remove=function(_,D){return _.timeline===this&&(D||_._enabled(!1,!0),_._prev?_._prev._next=_._next:this._first===_&&(this._first=_._next),_._next?_._next._prev=_._prev:this._last===_&&(this._last=_._prev),_._next=_._prev=_.timeline=null,_===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},Y.render=function(_,D,B){var U,J=this._first;for(this._totalTime=this._time=this._rawPrevTime=_;J;)U=J._next,(J._active||_>=J._startTime&&!J._paused&&!J._gc)&&(J._reversed?J.render((J._dirty?J.totalDuration():J._totalDuration)-(_-J._startTime)*J._timeScale,D,B):J.render((_-J._startTime)*J._timeScale,D,B)),J=U},Y.rawTime=function(){return St||lt.wake(),this._totalTime};var kt=w("TweenLite",function(_,D,B){if(jt.call(this,D,B),this.render=kt.prototype.render,_==null)throw"Cannot tween a null target.";this.target=_=typeof _!="string"?_:kt.selector(_)||_;var U,J,dt,wt=_.jquery||_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType),pt=this.vars.overwrite;if(this._overwrite=pt=pt==null?Cn[kt.defaultOverwrite]:typeof pt=="number"?pt>>0:Cn[pt],(wt||_ instanceof Array||_.push&&H(_))&&typeof _[0]!="number")for(this._targets=dt=_t(_),this._propLookup=[],this._siblings=[],U=0;U<dt.length;U++)J=dt[U],J?typeof J!="string"?J.length&&J!==p&&J[0]&&(J[0]===p||J[0].nodeType&&J[0].style&&!J.nodeType)?(dt.splice(U--,1),this._targets=dt=dt.concat(_t(J))):(this._siblings[U]=Oe(J,this,!1),pt===1&&this._siblings[U].length>1&&Tn(J,this,null,1,this._siblings[U])):(J=dt[U--]=kt.selector(J),typeof J=="string"&&dt.splice(U+1,1)):dt.splice(U--,1);else this._propLookup={},this._siblings=Oe(_,this,!1),pt===1&&this._siblings.length>1&&Tn(_,this,null,1,this._siblings);(this.vars.immediateRender||D===0&&this._delay===0&&this.vars.immediateRender!==!1)&&(this._time=-Dt,this.render(Math.min(0,-this._delay)))},!0),Me=function(_){return _&&_.length&&_!==p&&_[0]&&(_[0]===p||_[0].nodeType&&_[0].style&&!_.nodeType)},gi=function(_,D){var B,U={};for(B in _)Mn[B]||B in D&&B!=="transform"&&B!=="x"&&B!=="y"&&B!=="width"&&B!=="height"&&B!=="className"&&B!=="border"||!(!be[B]||be[B]&&be[B]._autoCSS)||(U[B]=_[B],delete _[B]);_.css=U};Y=kt.prototype=new jt,Y.constructor=kt,Y.kill()._gc=!1,Y.ratio=0,Y._firstPT=Y._targets=Y._overwrittenProps=Y._startAt=null,Y._notifyPluginsOfEnabled=Y._lazy=!1,kt.version="2.0.2",kt.defaultEase=Y._ease=new b(null,null,1,1),kt.defaultOverwrite="auto",kt.ticker=lt,kt.autoSleep=120,kt.lagSmoothing=function(_,D){lt.lagSmoothing(_,D)},kt.selector=p.$||p.jQuery||function(_){var D=p.$||p.jQuery;return D?(kt.selector=D,D(_)):(mt||(mt=p.document),mt?mt.querySelectorAll?mt.querySelectorAll(_):mt.getElementById(_.charAt(0)==="#"?_.substr(1):_):_)};var Rt=[],Fe={},vi=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,Ti=/[\+-]=-?[\.\d]/,oi=function(_){for(var D,B=this._firstPT,U=1e-6;B;)D=B.blob?_===1&&this.end!=null?this.end:_?this.join(""):this.start:B.c*_+B.s,B.m?D=B.m.call(this._tween,D,this._target||B.t,this._tween):U>D&&D>-U&&!B.blob&&(D=0),B.f?B.fp?B.t[B.p](B.fp,D):B.t[B.p](D):B.t[B.p]=D,B=B._next},fe=function(_,D,B,U){var J,dt,wt,pt,ae,se,Ut,he=[],ze=0,Xe="",Ce=0;for(he.start=_,he.end=D,_=he[0]=_+"",D=he[1]=D+"",B&&(B(he),_=he[0],D=he[1]),he.length=0,J=_.match(vi)||[],dt=D.match(vi)||[],U&&(U._next=null,U.blob=1,he._firstPT=he._applyPT=U),ae=dt.length,pt=0;ae>pt;pt++)Ut=dt[pt],se=D.substr(ze,D.indexOf(Ut,ze)-ze),Xe+=se||!pt?se:",",ze+=se.length,Ce?Ce=(Ce+1)%5:se.substr(-5)==="rgba("&&(Ce=1),Ut===J[pt]||J.length<=pt?Xe+=Ut:(Xe&&(he.push(Xe),Xe=""),wt=parseFloat(J[pt]),he.push(wt),he._firstPT={_next:he._firstPT,t:he,p:he.length-1,s:wt,c:(Ut.charAt(1)==="="?parseInt(Ut.charAt(0)+"1",10)*parseFloat(Ut.substr(2)):parseFloat(Ut)-wt)||0,f:0,m:Ce&&4>Ce?Math.round:0}),ze+=Ut.length;return Xe+=D.substr(ze),Xe&&he.push(Xe),he.setRatio=oi,Ti.test(D)&&(he.end=null),he},Je=function(_,D,B,U,J,dt,wt,pt,ae){typeof U=="function"&&(U=U(ae||0,_));var se,Ut=typeof _[D],he=Ut!=="function"?"":D.indexOf("set")||typeof _["get"+D.substr(3)]!="function"?D:"get"+D.substr(3),ze=B!=="get"?B:he?wt?_[he](wt):_[he]():_[D],Xe=typeof U=="string"&&U.charAt(1)==="=",Ce={t:_,p:D,s:ze,f:Ut==="function",pg:0,n:J||D,m:dt?typeof dt=="function"?dt:Math.round:0,pr:0,c:Xe?parseInt(U.charAt(0)+"1",10)*parseFloat(U.substr(2)):parseFloat(U)-ze||0};return(typeof ze!="number"||typeof U!="number"&&!Xe)&&(wt||isNaN(ze)||!Xe&&isNaN(U)||typeof ze=="boolean"||typeof U=="boolean"?(Ce.fp=wt,se=fe(ze,Xe?parseFloat(Ce.s)+Ce.c+(Ce.s+"").replace(/[0-9\-\.]/g,""):U,pt||kt.defaultStringFilter,Ce),Ce={t:se,p:"setRatio",s:0,c:1,f:2,pg:0,n:J||D,pr:0,m:0}):(Ce.s=parseFloat(ze),Xe||(Ce.c=parseFloat(U)-Ce.s||0))),Ce.c?((Ce._next=this._firstPT)&&(Ce._next._prev=Ce),this._firstPT=Ce,Ce):void 0},Ri=kt._internals={isArray:H,isSelector:Me,lazyTweens:Rt,blobDif:fe},be=kt._plugins={},Ve=Ri.tweenLookup={},Ke=0,Mn=Ri.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},Cn={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},ji=jt._rootFramesTimeline=new ct,Ii=jt._rootTimeline=new ct,en=30,ci=Ri.lazyRender=function(){var _,D=Rt.length;for(Fe={};--D>-1;)_=Rt[D],_&&_._lazy!==!1&&(_.render(_._lazy[0],_._lazy[1],!0),_._lazy=!1);Rt.length=0};Ii._startTime=lt.time,ji._startTime=lt.frame,Ii._active=ji._active=!0,setTimeout(ci,1),jt._updateRoot=kt.render=function(){var _,D,B;if(Rt.length&&ci(),Ii.render((lt.time-Ii._startTime)*Ii._timeScale,!1,!1),ji.render((lt.frame-ji._startTime)*ji._timeScale,!1,!1),Rt.length&&ci(),lt.frame>=en){en=lt.frame+(parseInt(kt.autoSleep,10)||120);for(B in Ve){for(D=Ve[B].tweens,_=D.length;--_>-1;)D[_]._gc&&D.splice(_,1);D.length===0&&delete Ve[B]}if(B=Ii._first,(!B||B._paused)&&kt.autoSleep&&!ji._first&<._listeners.tick.length===1){for(;B&&B._paused;)B=B._next;B||lt.sleep()}}},lt.addEventListener("tick",jt._updateRoot);var Oe=function(_,D,B){var U,J,dt=_._gsTweenID;if(Ve[dt||(_._gsTweenID=dt="t"+Ke++)]||(Ve[dt]={target:_,tweens:[]}),D&&(U=Ve[dt].tweens,U[J=U.length]=D,B))for(;--J>-1;)U[J]===D&&U.splice(J,1);return Ve[dt].tweens},Si=function(_,D,B,U){var J,dt,wt=_.vars.onOverwrite;return wt&&(J=wt(_,D,B,U)),wt=kt.onOverwrite,wt&&(dt=wt(_,D,B,U)),J!==!1&&dt!==!1},Tn=function(_,D,B,U,J){var dt,wt,pt,ae;if(U===1||U>=4){for(ae=J.length,dt=0;ae>dt;dt++)if((pt=J[dt])!==D)pt._gc||pt._kill(null,_,D)&&(wt=!0);else if(U===5)break;return wt}var se,Ut=D._startTime+Dt,he=[],ze=0,Xe=D._duration===0;for(dt=J.length;--dt>-1;)(pt=J[dt])===D||pt._gc||pt._paused||(pt._timeline!==D._timeline?(se=se||nn(D,0,Xe),nn(pt,se,Xe)===0&&(he[ze++]=pt)):pt._startTime<=Ut&&pt._startTime+pt.totalDuration()/pt._timeScale>Ut&&((Xe||!pt._initted)&&Ut-pt._startTime<=2e-10||(he[ze++]=pt)));for(dt=ze;--dt>-1;)if(pt=he[dt],ae=pt._firstPT,U===2&&pt._kill(B,_,D)&&(wt=!0),U!==2||!pt._firstPT&&pt._initted&&ae){if(U!==2&&!Si(pt,D))continue;pt._enabled(!1,!1)&&(wt=!0)}return wt},nn=function(_,D,B){for(var U=_._timeline,J=U._timeScale,dt=_._startTime;U._timeline;){if(dt+=U._startTime,J*=U._timeScale,U._paused)return-100;U=U._timeline}return dt/=J,dt>D?dt-D:B&&dt===D||!_._initted&&2*Dt>dt-D?Dt:(dt+=_.totalDuration()/_._timeScale/J)>D+Dt?0:dt-D-Dt};Y._init=function(){var _,D,B,U,J,dt,wt=this.vars,pt=this._overwrittenProps,ae=this._duration,se=!!wt.immediateRender,Ut=wt.ease;if(wt.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),J={};for(U in wt.startAt)J[U]=wt.startAt[U];if(J.data="isStart",J.overwrite=!1,J.immediateRender=!0,J.lazy=se&&wt.lazy!==!1,J.startAt=J.delay=null,J.onUpdate=wt.onUpdate,J.onUpdateParams=wt.onUpdateParams,J.onUpdateScope=wt.onUpdateScope||wt.callbackScope||this,this._startAt=kt.to(this.target||{},0,J),se){if(this._time>0)this._startAt=null;else if(ae!==0)return}}else if(wt.runBackwards&&ae!==0)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{this._time!==0&&(se=!1),B={};for(U in wt)Mn[U]&&U!=="autoCSS"||(B[U]=wt[U]);if(B.overwrite=0,B.data="isFromStart",B.lazy=se&&wt.lazy!==!1,B.immediateRender=se,this._startAt=kt.to(this.target,0,B),se){if(this._time===0)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=Ut=Ut?Ut instanceof b?Ut:typeof Ut=="function"?new b(Ut,wt.easeParams):F[Ut]||kt.defaultEase:kt.defaultEase,wt.easeParams instanceof Array&&Ut.config&&(this._ease=Ut.config.apply(Ut,wt.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(dt=this._targets.length,_=0;dt>_;_++)this._initProps(this._targets[_],this._propLookup[_]={},this._siblings[_],pt?pt[_]:null,_)&&(D=!0);else D=this._initProps(this.target,this._propLookup,this._siblings,pt,0);if(D&&kt._onPluginEvent("_onInitAllProps",this),pt&&(this._firstPT||typeof this.target!="function"&&this._enabled(!1,!1)),wt.runBackwards)for(B=this._firstPT;B;)B.s+=B.c,B.c=-B.c,B=B._next;this._onUpdate=wt.onUpdate,this._initted=!0},Y._initProps=function(_,D,B,U,J){var dt,wt,pt,ae,se,Ut;if(_==null)return!1;Fe[_._gsTweenID]&&ci(),this.vars.css||_.style&&_!==p&&_.nodeType&&be.css&&this.vars.autoCSS!==!1&&gi(this.vars,_);for(dt in this.vars)if(Ut=this.vars[dt],Mn[dt])Ut&&(Ut instanceof Array||Ut.push&&H(Ut))&&Ut.join("").indexOf("{self}")!==-1&&(this.vars[dt]=Ut=this._swapSelfInParams(Ut,this));else if(be[dt]&&(ae=new be[dt])._onInitTween(_,this.vars[dt],this,J)){for(this._firstPT=se={_next:this._firstPT,t:ae,p:"setRatio",s:0,c:1,f:1,n:dt,pg:1,pr:ae._priority,m:0},wt=ae._overwriteProps.length;--wt>-1;)D[ae._overwriteProps[wt]]=this._firstPT;(ae._priority||ae._onInitAllProps)&&(pt=!0),(ae._onDisable||ae._onEnable)&&(this._notifyPluginsOfEnabled=!0),se._next&&(se._next._prev=se)}else D[dt]=Je.call(this,_,dt,"get",Ut,dt,0,null,this.vars.stringFilter,J);return U&&this._kill(U,_)?this._initProps(_,D,B,U,J):this._overwrite>1&&this._firstPT&&B.length>1&&Tn(_,this,D,this._overwrite,B)?(this._kill(D,_),this._initProps(_,D,B,U,J)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(Fe[_._gsTweenID]=!0),pt)},Y.render=function(_,D,B){var U,J,dt,wt,pt=this._time,ae=this._duration,se=this._rawPrevTime;if(_>=ae-1e-7&&_>=0)this._totalTime=this._time=ae,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(U=!0,J="onComplete",B=B||this._timeline.autoRemoveChildren),ae===0&&(this._initted||!this.vars.lazy||B)&&(this._startTime===this._timeline._duration&&(_=0),(0>se||0>=_&&_>=-1e-7||se===Dt&&this.data!=="isPause")&&se!==_&&(B=!0,se>Dt&&(J="onReverseComplete")),this._rawPrevTime=wt=!D||_||se===_?_:Dt);else if(1e-7>_)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(pt!==0||ae===0&&se>0)&&(J="onReverseComplete",U=this._reversed),0>_&&(this._active=!1,ae===0&&(this._initted||!this.vars.lazy||B)&&(se>=0&&(se!==Dt||this.data!=="isPause")&&(B=!0),this._rawPrevTime=wt=!D||_||se===_?_:Dt)),(!this._initted||this._startAt&&this._startAt.progress())&&(B=!0);else if(this._totalTime=this._time=_,this._easeType){var Ut=_/ae,he=this._easeType,ze=this._easePower;(he===1||he===3&&Ut>=.5)&&(Ut=1-Ut),he===3&&(Ut*=2),ze===1?Ut*=Ut:ze===2?Ut*=Ut*Ut:ze===3?Ut*=Ut*Ut*Ut:ze===4&&(Ut*=Ut*Ut*Ut*Ut),he===1?this.ratio=1-Ut:he===2?this.ratio=Ut:.5>_/ae?this.ratio=Ut/2:this.ratio=1-Ut/2}else this.ratio=this._ease.getRatio(_/ae);if(this._time!==pt||B){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!B&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=pt,this._rawPrevTime=se,Rt.push(this),void(this._lazy=[_,D]);this._time&&!U?this.ratio=this._ease.getRatio(this._time/ae):U&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(this._time===0?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==pt&&_>=0&&(this._active=!0),pt===0&&(this._startAt&&(_>=0?this._startAt.render(_,!0,B):J||(J="_dummyGS")),this.vars.onStart&&(this._time!==0||ae===0)&&(D||this._callback("onStart"))),dt=this._firstPT;dt;)dt.f?dt.t[dt.p](dt.c*this.ratio+dt.s):dt.t[dt.p]=dt.c*this.ratio+dt.s,dt=dt._next;this._onUpdate&&(0>_&&this._startAt&&_!==-1e-4&&this._startAt.render(_,!0,B),D||(this._time!==pt||U||B)&&this._callback("onUpdate")),J&&(!this._gc||B)&&(0>_&&this._startAt&&!this._onUpdate&&_!==-1e-4&&this._startAt.render(_,!0,B),U&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!D&&this.vars[J]&&this._callback(J),ae===0&&this._rawPrevTime===Dt&&wt!==Dt&&(this._rawPrevTime=0))}},Y._kill=function(_,D,B){if(_==="all"&&(_=null),_==null&&(D==null||D===this.target))return this._lazy=!1,this._enabled(!1,!1);D=typeof D!="string"?D||this._targets||this.target:kt.selector(D)||D;var U,J,dt,wt,pt,ae,se,Ut,he,ze=B&&this._time&&B._startTime===this._startTime&&this._timeline===B._timeline,Xe=this._firstPT;if((H(D)||Me(D))&&typeof D[0]!="number")for(U=D.length;--U>-1;)this._kill(_,D[U],B)&&(ae=!0);else{if(this._targets){for(U=this._targets.length;--U>-1;)if(D===this._targets[U]){pt=this._propLookup[U]||{},this._overwrittenProps=this._overwrittenProps||[],J=this._overwrittenProps[U]=_?this._overwrittenProps[U]||{}:"all";break}}else{if(D!==this.target)return!1;pt=this._propLookup,J=this._overwrittenProps=_?this._overwrittenProps||{}:"all"}if(pt){if(se=_||pt,Ut=_!==J&&J!=="all"&&_!==pt&&(typeof _!="object"||!_._tempKill),B&&(kt.onOverwrite||this.vars.onOverwrite)){for(dt in se)pt[dt]&&(he||(he=[]),he.push(dt));if((he||!_)&&!Si(this,B,D,he))return!1}for(dt in se)(wt=pt[dt])&&(ze&&(wt.f?wt.t[wt.p](wt.s):wt.t[wt.p]=wt.s,ae=!0),wt.pg&&wt.t._kill(se)&&(ae=!0),wt.pg&&wt.t._overwriteProps.length!==0||(wt._prev?wt._prev._next=wt._next:wt===this._firstPT&&(this._firstPT=wt._next),wt._next&&(wt._next._prev=wt._prev),wt._next=wt._prev=null),delete pt[dt]),Ut&&(J[dt]=1);!this._firstPT&&this._initted&&Xe&&this._enabled(!1,!1)}}return ae},Y.invalidate=function(){return this._notifyPluginsOfEnabled&&kt._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],jt.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-Dt,this.render(Math.min(0,-this._delay))),this},Y._enabled=function(_,D){if(St||lt.wake(),_&&this._gc){var B,U=this._targets;if(U)for(B=U.length;--B>-1;)this._siblings[B]=Oe(U[B],this,!0);else this._siblings=Oe(this.target,this,!0)}return jt.prototype._enabled.call(this,_,D),this._notifyPluginsOfEnabled&&this._firstPT?kt._onPluginEvent(_?"_onEnable":"_onDisable",this):!1},kt.to=function(_,D,B){return new kt(_,D,B)},kt.from=function(_,D,B){return B.runBackwards=!0,B.immediateRender=B.immediateRender!=0,new kt(_,D,B)},kt.fromTo=function(_,D,B,U){return U.startAt=B,U.immediateRender=U.immediateRender!=0&&B.immediateRender!=0,new kt(_,D,U)},kt.delayedCall=function(_,D,B,U,J){return new kt(D,0,{delay:_,onComplete:D,onCompleteParams:B,callbackScope:U,onReverseComplete:D,onReverseCompleteParams:B,immediateRender:!1,lazy:!1,useFrames:J,overwrite:0})},kt.set=function(_,D){return new kt(_,0,D)},kt.getTweensOf=function(_,D){if(_==null)return[];_=typeof _!="string"?_:kt.selector(_)||_;var B,U,J,dt;if((H(_)||Me(_))&&typeof _[0]!="number"){for(B=_.length,U=[];--B>-1;)U=U.concat(kt.getTweensOf(_[B],D));for(B=U.length;--B>-1;)for(dt=U[B],J=B;--J>-1;)dt===U[J]&&U.splice(B,1)}else if(_._gsTweenID)for(U=Oe(_).concat(),B=U.length;--B>-1;)(U[B]._gc||D&&!U[B].isActive())&&U.splice(B,1);return U||[]},kt.killTweensOf=kt.killDelayedCallsTo=function(_,D,B){typeof D=="object"&&(B=D,D=!1);for(var U=kt.getTweensOf(_,D),J=U.length;--J>-1;)U[J]._kill(B,_)};var Ci=w("plugins.TweenPlugin",function(_,D){this._overwriteProps=(_||"").split(","),this._propName=this._overwriteProps[0],this._priority=D||0,this._super=Ci.prototype},!0);if(Y=Ci.prototype,Ci.version="1.19.0",Ci.API=2,Y._firstPT=null,Y._addTween=Je,Y.setRatio=oi,Y._kill=function(_){var D,B=this._overwriteProps,U=this._firstPT;if(_[this._propName]!=null)this._overwriteProps=[];else for(D=B.length;--D>-1;)_[B[D]]!=null&&B.splice(D,1);for(;U;)_[U.n]!=null&&(U._next&&(U._next._prev=U._prev),U._prev?(U._prev._next=U._next,U._prev=null):this._firstPT===U&&(this._firstPT=U._next)),U=U._next;return!1},Y._mod=Y._roundProps=function(_){for(var D,B=this._firstPT;B;)D=_[this._propName]||B.n!=null&&_[B.n.split(this._propName+"_").join("")],D&&typeof D=="function"&&(B.f===2?B.t._applyPT.m=D:B.m=D),B=B._next},kt._onPluginEvent=function(_,D){var B,U,J,dt,wt,pt=D._firstPT;if(_==="_onInitAllProps"){for(;pt;){for(wt=pt._next,U=J;U&&U.pr>pt.pr;)U=U._next;(pt._prev=U?U._prev:dt)?pt._prev._next=pt:J=pt,(pt._next=U)?U._prev=pt:dt=pt,pt=wt}pt=D._firstPT=J}for(;pt;)pt.pg&&typeof pt.t[_]=="function"&&pt.t[_]()&&(B=!0),pt=pt._next;return B},Ci.activate=function(_){for(var D=_.length;--D>-1;)_[D].API===Ci.API&&(be[new _[D]()._propName]=_[D]);return!0},O.plugin=function(_){if(!(_&&_.propName&&_.init&&_.API))throw"illegal plugin definition.";var D,B=_.propName,U=_.priority||0,J=_.overwriteProps,dt={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},wt=w("plugins."+B.charAt(0).toUpperCase()+B.substr(1)+"Plugin",function(){Ci.call(this,B,U),this._overwriteProps=J||[]},_.global===!0),pt=wt.prototype=new Ci(B);pt.constructor=wt,wt.API=_.API;for(D in dt)typeof _[D]=="function"&&(pt[dt[D]]=_[D]);return wt.version=_.version,Ci.activate([wt]),wt},yt=p._gsQueue){for(Ct=0;Ct<yt.length;Ct++)yt[Ct]();for(Y in m)m[Y].func||p.console.log("GSAP encountered missing dependency: "+Y)}St=!1}(typeof module<"u"&&module.exports&&typeof global<"u"?global:globalThis||window,"TweenMax");const ka={class:"modal-background"},Va=["innerHTML"],ja={name:"MapModali"},Hs=Ee.defineComponent({...ja,props:{},setup(p,{expose:Ot}){const $=Ee.ref(""),mt=Ee.ref(""),ht=yt=>{mt.value=yt,$.value="five"},M=()=>{$.value=$.value+" out"};return Ee.onMounted(()=>{}),Ot({text:mt,show:ht,hide:M}),(yt,Ct)=>(Ee.openBlock(),Ee.createElementBlock("div",{id:"modal-container",class:Ee.normalizeClass($.value),onClick:M},[Ee.createElementVNode("div",ka,[Ee.createElementVNode("div",{class:"modal",onClick:Ct[0]||(Ct[0]=Y=>{Y.stopPropagation()})},[Ee.createElementVNode("p",{style:{"white-space":"pre-line","line-height":"1",margin:"0",color:"#fff"},innerHTML:mt.value},null,8,Va)])])],2))}}),Th="",Wa={class:"bim_background_plate"},Xa={class:"content"},qa=Ee.createElementVNode("canvas",{class:"landscape"},null,-1),Ya={class:"content__title"},Za=Ee.createElementVNode("div",{class:"overlay"},null,-1),Ja={name:"BimBackgroundPlate"},ks=Ee.defineComponent({...Ja,setup(p){const Ot=()=>{let ht=`
|
|
14
14
|
vec3 mod289(vec3 x)
|
|
15
15
|
{
|
|
16
16
|
return x - floor(x * (1.0 / 289.0)) * 289.0;
|
|
@@ -248,11 +248,11 @@
|
|
|
248
248
|
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
|
|
249
249
|
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
|
|
250
250
|
#endif
|
|
251
|
-
}`;var yt=document.querySelector(".landscape"),Ct=window.innerWidth,Y=window.innerHeight,lt,St,ut,At,Dt={x:0,y:0,xDamped:0,yDamped:0},_t=typeof window.orientation<"u";K();function K(){H(),m(),f(),b(),_t?window.addEventListener("touchmove",X,{passive:!1}):window.addEventListener("mousemove",X),window.addEventListener("resize",w),w()}function H(){lt=new THREE.Scene;var st=new THREE.Color(3355443);lt.background=st,lt.fog=new THREE.Fog(st,0,400),O(),ut=new THREE.PerspectiveCamera(60,Ct/Y,.1,1e4),ut.position.y=8,ut.position.z=4;let it=new THREE.AmbientLight(16777215,1);lt.add(it),St=new THREE.WebGLRenderer({canvas:yt,antialias:!0}),St.setPixelRatio=devicePixelRatio,St.setSize(Ct,Y)}function m(){var st=new THREE.PlaneBufferGeometry(100,400,400,400),it={time:{type:"f",value:0},scroll:{type:"f",value:0},distortCenter:{type:"f",value:.1},roadWidth:{type:"f",value:.5},pallete:{type:"t",value:null},speed:{type:"f",value:3},maxHeight:{type:"f",value:10},color:new THREE.Color(1,1,1)},Pt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,it]),vertexShader:ht,fragmentShader:M,wireframe:!1,fog:!0});At=new THREE.Mesh(st,Pt),At.position.z=-180,At.rotation.x=-Math.PI/2,lt.add(At)}function f(){new THREE.TextureLoader().load(params.palleteImage,function(st){At.material.uniforms.pallete.value=st,At.material.needsUpdate=!0})}function O(){O=new THREE.Sky,O.scale.setScalar(45e4),O.material.uniforms.turbidity.value=13,O.material.uniforms.rayleigh.value=1.2,O.material.uniforms.luminance.value=1,O.material.uniforms.mieCoefficient.value=.1,O.material.uniforms.mieDirectionalG.value=.58,lt.add(O);let st=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));st.visible=!1,lt.add(st);var it=Math.PI*-.002,Pt=2*Math.PI*-.25;st.position.x=4e5*Math.cos(Pt),st.position.y=4e5*Math.sin(Pt)*Math.sin(it),st.position.z=4e5*Math.sin(Pt)*Math.cos(it),O.material.uniforms.sunPosition.value.copy(st.position)}function w(){Ct=window.innerWidth,Y=window.innerHeight,ut.aspect=Ct/Y,ut.updateProjectionMatrix(),St.setSize(Ct,Y)}function X(st){st.preventDefault();var it,Pt;st.type=="mousemove"?(it=st.clientX,Pt=st.clientY):(it=st.changedTouches[0].clientX,Pt=st.changedTouches[0].clientY),Dt.x=it,Dt.y=Pt}function b(){requestAnimationFrame(b),Dt.xDamped=Z(Dt.xDamped,Dt.x,.1),Dt.yDamped=Z(Dt.yDamped,Dt.y,.1);var st=performance.now()*.001;At.material.uniforms.time.value=st,At.material.uniforms.scroll.value=st+F(Dt.yDamped,0,Y,0,4),At.material.uniforms.distortCenter.value=Math.sin(st)*.1,At.material.uniforms.roadWidth.value=F(Dt.xDamped,0,Ct,1,4.5),ut.position.y=F(Dt.yDamped,0,Y,4,11),St.render(lt,ut)}function F(st,it,Pt,Lt,Gt){return Lt+(Gt-Lt)*((st-it)/(Pt-it))}function Z(st,it,Pt){return(1-Pt)*st+Pt*it}},$=()=>{const ht=document.querySelector(".overlay"),M=document.querySelector(".content__title");charming(M);const yt=Array.from(M.querySelectorAll("span"));TweenMax.to(ht,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(yt,{opacity:0}),TweenMax.staggerTo(yt,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1);const Ct=document.querySelector(".content__subtitle");TweenMax.set(Ct,{opacity:0}),TweenMax.to(Ct,1.5,{ease:Expo.easeOut,startAt:{y:30},opacity:1,y:0})},mt=()=>{Ot(),$()};return Se.onMounted(()=>{mt()}),(ht,M)=>(Se.openBlock(),Se.createElementBlock(Se.Fragment,null,[Se.createElementVNode("div",Wa,[Xa,Se.createElementVNode("h2",qa,[Se.renderSlot(ht.$slots,"default")])]),Ya],64))}}),Th="";(function(p,Ot){typeof Fi=="object"&&typeof module<"u"?Ot(Fi):typeof define=="function"&&define.amd?define(["exports"],Ot):Ot(p.THREE={})})(window,function(p){function Ot(){}function $(t,e){this.x=t||0,this.y=e||0}function mt(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function ht(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function M(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function yt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Ct(t,e,i,n,r,o,s,a,h,l){Object.defineProperty(this,"id",{value:nh++}),this.uuid=Ee.generateUUID(),this.name="",this.image=t!==void 0?t:Ct.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:Ct.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=r!==void 0?r:1006,this.minFilter=o!==void 0?o:1008,this.anisotropy=h!==void 0?h:1,this.format=s!==void 0?s:1023,this.type=a!==void 0?a:1009,this.offset=new $(0,0),this.repeat=new $(1,1),this.center=new $(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l!==void 0?l:3e3,this.version=0,this.onUpdate=null}function Y(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function lt(t,e,i){this.width=t,this.height=e,this.scissor=new Y(0,0,t,e),this.scissorTest=!1,this.viewport=new Y(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new Ct(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!0,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!0,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null}function St(t,e,i){lt.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function ut(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={data:t,width:e,height:i},this.magFilter=h!==void 0?h:1003,this.minFilter=l!==void 0?l:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function At(t,e){this.min=t!==void 0?t:new M(1/0,1/0,1/0),this.max=e!==void 0?e:new M(-1/0,-1/0,-1/0)}function Dt(t,e){this.center=t!==void 0?t:new M,this.radius=e!==void 0?e:0}function _t(t,e){this.normal=t!==void 0?t:new M(1,0,0),this.constant=e!==void 0?e:0}function K(t,e,i,n,r,o){this.planes=[t!==void 0?t:new _t,e!==void 0?e:new _t,i!==void 0?i:new _t,n!==void 0?n:new _t,r!==void 0?r:new _t,o!==void 0?o:new _t]}function H(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function m(){function t(r,o){i!==!1&&(n(r,o),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(r){n=r},setContext:function(r){e=r}}}function f(t){function e(n,r){var o=n.array,s=n.dynamic?35048:35044,a=t.createBuffer();return t.bindBuffer(r,a),t.bufferData(r,o,s),n.onUploadCallback(),r=5126,o instanceof Float32Array?r=5126:o instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):o instanceof Uint16Array?r=5123:o instanceof Int16Array?r=5122:o instanceof Uint32Array?r=5125:o instanceof Int32Array?r=5124:o instanceof Int8Array?r=5120:o instanceof Uint8Array&&(r=5121),{buffer:a,type:r,bytesPerElement:o.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=i.get(n);r&&(t.deleteBuffer(r.buffer),i.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);if(o===void 0)i.set(n,e(n,r));else if(o.version<n.version){var s=n,a=s.array,h=s.updateRange;t.bindBuffer(r,o.buffer),s.dynamic===!1?t.bufferData(r,a,35044):h.count===-1?t.bufferSubData(r,0,a):h.count===0?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,h.offset*a.BYTES_PER_ELEMENT,a.subarray(h.offset,h.offset+h.count)),h.count=-1),o.version=n.version}}}}function O(t,e,i,n,r,o){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new M,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=o!==void 0?o:0}function w(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||w.DefaultOrder}function X(){this.mask=1}function b(){Object.defineProperty(this,"id",{value:oh++}),this.uuid=Ee.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=b.DefaultUp.clone();var t=new M,e=new w,i=new ht,n=new M(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new mt},normalMatrix:{value:new yt}}),this.matrix=new mt,this.matrixWorld=new mt,this.matrixAutoUpdate=b.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new X,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function F(){Object.defineProperty(this,"id",{value:sh+=2}),this.uuid=Ee.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.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Z(t,e,i){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=t!==void 0?t.length/e:0,this.normalized=i===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function st(t,e,i){Z.call(this,new Int8Array(t),e,i)}function it(t,e,i){Z.call(this,new Uint8Array(t),e,i)}function Pt(t,e,i){Z.call(this,new Uint8ClampedArray(t),e,i)}function Lt(t,e,i){Z.call(this,new Int16Array(t),e,i)}function Gt(t,e,i){Z.call(this,new Uint16Array(t),e,i)}function jt(t,e,i){Z.call(this,new Int32Array(t),e,i)}function ie(t,e,i){Z.call(this,new Uint32Array(t),e,i)}function ct(t,e,i){Z.call(this,new Float32Array(t),e,i)}function kt(t,e,i){Z.call(this,new Float64Array(t),e,i)}function Me(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function gi(t){if(t.length===0)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}function Rt(){Object.defineProperty(this,"id",{value:ah+=2}),this.uuid=Ee.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Fe(t,e,i,n,r,o){F.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.fromBufferGeometry(new vi(t,e,i,n,r,o)),this.mergeVertices()}function vi(t,e,i,n,r,o){function s(x,S,P,G,N,q,V,ot,T,A,tt){var vt=q/T,ft=V/A,at=q/2,Ht=V/2,It=ot/2;V=T+1;var $t=A+1,Xt=q=0,Qt,re,me=new M;for(re=0;re<$t;re++){var Ae=re*ft-Ht;for(Qt=0;Qt<V;Qt++)me[x]=(Qt*vt-at)*G,me[S]=Ae*N,me[P]=It,l.push(me.x,me.y,me.z),me[x]=0,me[S]=0,me[P]=0<ot?1:-1,c.push(me.x,me.y,me.z),u.push(Qt/T),u.push(1-re/A),q+=1}for(re=0;re<A;re++)for(Qt=0;Qt<T;Qt++)x=d+Qt+V*(re+1),S=d+(Qt+1)+V*(re+1),P=d+(Qt+1)+V*re,h.push(d+Qt+V*re,x,P),h.push(x,S,P),Xt+=6;a.addGroup(g,Xt,tt),g+=Xt,d+=q}Rt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o};var a=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,o=Math.floor(o)||1;var h=[],l=[],c=[],u=[],d=0,g=0;s("z","y","x",-1,-1,i,e,t,o,r,0),s("z","y","x",1,-1,i,e,-t,o,r,1),s("x","z","y",1,1,t,i,e,n,o,2),s("x","z","y",1,-1,t,i,-e,n,o,3),s("x","y","z",1,-1,t,e,i,n,r,4),s("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(h),this.addAttribute("position",new ct(l,3)),this.addAttribute("normal",new ct(c,3)),this.addAttribute("uv",new ct(u,2))}function Ti(t,e,i,n){F.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){Rt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},t=t||1,e=e||1;var r=t/2,o=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var s=i+1,a=n+1,h=t/i,l=e/n,c=[],u=[],d=[],g=[];for(t=0;t<a;t++){var x=t*l-o;for(e=0;e<s;e++)u.push(e*h-r,-x,0),d.push(0,0,1),g.push(e/i),g.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)r=e+s*(t+1),o=e+1+s*(t+1),a=e+1+s*t,c.push(e+s*t,r,a),c.push(r,o,a);this.setIndex(c),this.addAttribute("position",new ct(u,3)),this.addAttribute("normal",new ct(d,3)),this.addAttribute("uv",new ct(g,2))}function fe(){Object.defineProperty(this,"id",{value:hh++}),this.uuid=Ee.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Je(t){fe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
251
|
+
}`;var yt=document.querySelector(".landscape"),Ct=window.innerWidth,Y=window.innerHeight,lt,St,ut,At,Dt={x:0,y:0,xDamped:0,yDamped:0},_t=typeof window.orientation<"u";K();function K(){H(),m(),f(),b(),_t?window.addEventListener("touchmove",X,{passive:!1}):window.addEventListener("mousemove",X),window.addEventListener("resize",w),w()}function H(){lt=new THREE.Scene;var st=new THREE.Color(3355443);lt.background=st,lt.fog=new THREE.Fog(st,0,400),O(),ut=new THREE.PerspectiveCamera(60,Ct/Y,.1,1e4),ut.position.y=8,ut.position.z=4;let it=new THREE.AmbientLight(16777215,1);lt.add(it),St=new THREE.WebGLRenderer({canvas:yt,antialias:!0}),St.setPixelRatio=devicePixelRatio,St.setSize(Ct,Y)}function m(){var st=new THREE.PlaneBufferGeometry(100,400,400,400),it={time:{type:"f",value:0},scroll:{type:"f",value:0},distortCenter:{type:"f",value:.1},roadWidth:{type:"f",value:.5},pallete:{type:"t",value:null},speed:{type:"f",value:3},maxHeight:{type:"f",value:10},color:new THREE.Color(1,1,1)},Pt=new THREE.ShaderMaterial({uniforms:THREE.UniformsUtils.merge([THREE.ShaderLib.basic.uniforms,it]),vertexShader:ht,fragmentShader:M,wireframe:!1,fog:!0});At=new THREE.Mesh(st,Pt),At.position.z=-180,At.rotation.x=-Math.PI/2,lt.add(At)}function f(){new THREE.TextureLoader().load("",function(st){At.material.uniforms.pallete.value=st,At.material.needsUpdate=!0})}function O(){O=new THREE.Sky,O.scale.setScalar(45e4),O.material.uniforms.turbidity.value=13,O.material.uniforms.rayleigh.value=1.2,O.material.uniforms.luminance.value=1,O.material.uniforms.mieCoefficient.value=.1,O.material.uniforms.mieDirectionalG.value=.58,lt.add(O);let st=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));st.visible=!1,lt.add(st);var it=Math.PI*-.002,Pt=2*Math.PI*-.25;st.position.x=4e5*Math.cos(Pt),st.position.y=4e5*Math.sin(Pt)*Math.sin(it),st.position.z=4e5*Math.sin(Pt)*Math.cos(it),O.material.uniforms.sunPosition.value.copy(st.position)}function w(){Ct=window.innerWidth,Y=window.innerHeight,ut.aspect=Ct/Y,ut.updateProjectionMatrix(),St.setSize(Ct,Y)}function X(st){st.preventDefault();var it,Pt;st.type=="mousemove"?(it=st.clientX,Pt=st.clientY):(it=st.changedTouches[0].clientX,Pt=st.changedTouches[0].clientY),Dt.x=it,Dt.y=Pt}function b(){requestAnimationFrame(b),Dt.xDamped=Z(Dt.xDamped,Dt.x,.1),Dt.yDamped=Z(Dt.yDamped,Dt.y,.1);var st=performance.now()*.001;At.material.uniforms.time.value=st,At.material.uniforms.scroll.value=st+F(Dt.yDamped,0,Y,0,4),At.material.uniforms.distortCenter.value=Math.sin(st)*.1,At.material.uniforms.roadWidth.value=F(Dt.xDamped,0,Ct,1,4.5),ut.position.y=F(Dt.yDamped,0,Y,4,11),St.render(lt,ut)}function F(st,it,Pt,Lt,Gt){return Lt+(Gt-Lt)*((st-it)/(Pt-it))}function Z(st,it,Pt){return(1-Pt)*st+Pt*it}},$=()=>{const ht=document.querySelector(".overlay"),M=document.querySelector(".content__title");charming(M);const yt=Array.from(M.querySelectorAll("span"));TweenMax.to(ht,2,{ease:Quad.easeOut,opacity:0}),TweenMax.set(yt,{opacity:0}),TweenMax.staggerTo(yt,1.5,{ease:Expo.easeOut,startAt:{rotationX:-100,z:-1e3},opacity:1,rotationX:0,z:0},.1);const Ct=document.querySelector(".content__subtitle");TweenMax.set(Ct,{opacity:0}),TweenMax.to(Ct,1.5,{ease:Expo.easeOut,startAt:{y:30},opacity:1,y:0})},mt=()=>{Ot(),$()};return Ee.onMounted(()=>{mt()}),(ht,M)=>(Ee.openBlock(),Ee.createElementBlock("div",Wa,[Ee.createElementVNode("div",Xa,[qa,Ee.createElementVNode("h2",Ya,[Ee.renderSlot(ht.$slots,"default")])]),Za]))}}),Sh="";(function(p,Ot){typeof Fi=="object"&&typeof module<"u"?Ot(Fi):typeof define=="function"&&define.amd?define(["exports"],Ot):Ot(p.THREE={})})(window,function(p){function Ot(){}function $(t,e){this.x=t||0,this.y=e||0}function mt(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function ht(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=n!==void 0?n:1}function M(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function yt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Ct(t,e,i,n,r,o,s,a,h,l){Object.defineProperty(this,"id",{value:rh++}),this.uuid=Se.generateUUID(),this.name="",this.image=t!==void 0?t:Ct.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:Ct.DEFAULT_MAPPING,this.wrapS=i!==void 0?i:1001,this.wrapT=n!==void 0?n:1001,this.magFilter=r!==void 0?r:1006,this.minFilter=o!==void 0?o:1008,this.anisotropy=h!==void 0?h:1,this.format=s!==void 0?s:1023,this.type=a!==void 0?a:1009,this.offset=new $(0,0),this.repeat=new $(1,1),this.center=new $(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l!==void 0?l:3e3,this.version=0,this.onUpdate=null}function Y(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=n!==void 0?n:1}function lt(t,e,i){this.width=t,this.height=e,this.scissor=new Y(0,0,t,e),this.scissorTest=!1,this.viewport=new Y(0,0,t,e),i=i||{},i.minFilter===void 0&&(i.minFilter=1006),this.texture=new Ct(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!0,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!0,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null}function St(t,e,i){lt.call(this,t,e,i),this.activeMipMapLevel=this.activeCubeFace=0}function ut(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={data:t,width:e,height:i},this.magFilter=h!==void 0?h:1003,this.minFilter=l!==void 0?l:1003,this.flipY=this.generateMipmaps=!1,this.unpackAlignment=1}function At(t,e){this.min=t!==void 0?t:new M(1/0,1/0,1/0),this.max=e!==void 0?e:new M(-1/0,-1/0,-1/0)}function Dt(t,e){this.center=t!==void 0?t:new M,this.radius=e!==void 0?e:0}function _t(t,e){this.normal=t!==void 0?t:new M(1,0,0),this.constant=e!==void 0?e:0}function K(t,e,i,n,r,o){this.planes=[t!==void 0?t:new _t,e!==void 0?e:new _t,i!==void 0?i:new _t,n!==void 0?n:new _t,r!==void 0?r:new _t,o!==void 0?o:new _t]}function H(t,e,i){return e===void 0&&i===void 0?this.set(t):this.setRGB(t,e,i)}function m(){function t(r,o){i!==!1&&(n(r,o),e.requestAnimationFrame(t))}var e=null,i=!1,n=null;return{start:function(){i!==!0&&n!==null&&(e.requestAnimationFrame(t),i=!0)},stop:function(){i=!1},setAnimationLoop:function(r){n=r},setContext:function(r){e=r}}}function f(t){function e(n,r){var o=n.array,s=n.dynamic?35048:35044,a=t.createBuffer();return t.bindBuffer(r,a),t.bufferData(r,o,s),n.onUploadCallback(),r=5126,o instanceof Float32Array?r=5126:o instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):o instanceof Uint16Array?r=5123:o instanceof Int16Array?r=5122:o instanceof Uint32Array?r=5125:o instanceof Int32Array?r=5124:o instanceof Int8Array?r=5120:o instanceof Uint8Array&&(r=5121),{buffer:a,type:r,bytesPerElement:o.BYTES_PER_ELEMENT,version:n.version}}var i=new WeakMap;return{get:function(n){return n.isInterleavedBufferAttribute&&(n=n.data),i.get(n)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=i.get(n);r&&(t.deleteBuffer(r.buffer),i.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var o=i.get(n);if(o===void 0)i.set(n,e(n,r));else if(o.version<n.version){var s=n,a=s.array,h=s.updateRange;t.bindBuffer(r,o.buffer),s.dynamic===!1?t.bufferData(r,a,35044):h.count===-1?t.bufferSubData(r,0,a):h.count===0?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,h.offset*a.BYTES_PER_ELEMENT,a.subarray(h.offset,h.offset+h.count)),h.count=-1),o.version=n.version}}}}function O(t,e,i,n,r,o){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new M,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=o!==void 0?o:0}function w(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||w.DefaultOrder}function X(){this.mask=1}function b(){Object.defineProperty(this,"id",{value:sh++}),this.uuid=Se.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=b.DefaultUp.clone();var t=new M,e=new w,i=new ht,n=new M(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:n},modelViewMatrix:{value:new mt},normalMatrix:{value:new yt}}),this.matrix=new mt,this.matrixWorld=new mt,this.matrixAutoUpdate=b.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new X,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function F(){Object.defineProperty(this,"id",{value:ah+=2}),this.uuid=Se.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.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Z(t,e,i){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=t!==void 0?t.length/e:0,this.normalized=i===!0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function st(t,e,i){Z.call(this,new Int8Array(t),e,i)}function it(t,e,i){Z.call(this,new Uint8Array(t),e,i)}function Pt(t,e,i){Z.call(this,new Uint8ClampedArray(t),e,i)}function Lt(t,e,i){Z.call(this,new Int16Array(t),e,i)}function Gt(t,e,i){Z.call(this,new Uint16Array(t),e,i)}function jt(t,e,i){Z.call(this,new Int32Array(t),e,i)}function ie(t,e,i){Z.call(this,new Uint32Array(t),e,i)}function ct(t,e,i){Z.call(this,new Float32Array(t),e,i)}function kt(t,e,i){Z.call(this,new Float64Array(t),e,i)}function Me(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingSphere=this.boundingBox=null,this.groupsNeedUpdate=this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function gi(t){if(t.length===0)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}function Rt(){Object.defineProperty(this,"id",{value:hh+=2}),this.uuid=Se.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.drawRange={start:0,count:1/0},this.userData={}}function Fe(t,e,i,n,r,o){F.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.fromBufferGeometry(new vi(t,e,i,n,r,o)),this.mergeVertices()}function vi(t,e,i,n,r,o){function s(x,S,P,G,N,q,V,ot,T,A,tt){var vt=q/T,ft=V/A,at=q/2,Ht=V/2,It=ot/2;V=T+1;var $t=A+1,Xt=q=0,Qt,re,me=new M;for(re=0;re<$t;re++){var Ae=re*ft-Ht;for(Qt=0;Qt<V;Qt++)me[x]=(Qt*vt-at)*G,me[S]=Ae*N,me[P]=It,l.push(me.x,me.y,me.z),me[x]=0,me[S]=0,me[P]=0<ot?1:-1,c.push(me.x,me.y,me.z),u.push(Qt/T),u.push(1-re/A),q+=1}for(re=0;re<A;re++)for(Qt=0;Qt<T;Qt++)x=d+Qt+V*(re+1),S=d+(Qt+1)+V*(re+1),P=d+(Qt+1)+V*re,h.push(d+Qt+V*re,x,P),h.push(x,S,P),Xt+=6;a.addGroup(g,Xt,tt),g+=Xt,d+=q}Rt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o};var a=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,o=Math.floor(o)||1;var h=[],l=[],c=[],u=[],d=0,g=0;s("z","y","x",-1,-1,i,e,t,o,r,0),s("z","y","x",1,-1,i,e,-t,o,r,1),s("x","z","y",1,1,t,i,e,n,o,2),s("x","z","y",1,-1,t,i,-e,n,o,3),s("x","y","z",1,-1,t,e,i,n,r,4),s("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(h),this.addAttribute("position",new ct(l,3)),this.addAttribute("normal",new ct(c,3)),this.addAttribute("uv",new ct(u,2))}function Ti(t,e,i,n){F.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new oi(t,e,i,n)),this.mergeVertices()}function oi(t,e,i,n){Rt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},t=t||1,e=e||1;var r=t/2,o=e/2;i=Math.floor(i)||1,n=Math.floor(n)||1;var s=i+1,a=n+1,h=t/i,l=e/n,c=[],u=[],d=[],g=[];for(t=0;t<a;t++){var x=t*l-o;for(e=0;e<s;e++)u.push(e*h-r,-x,0),d.push(0,0,1),g.push(e/i),g.push(1-t/n)}for(t=0;t<n;t++)for(e=0;e<i;e++)r=e+s*(t+1),o=e+1+s*(t+1),a=e+1+s*t,c.push(e+s*t,r,a),c.push(r,o,a);this.setIndex(c),this.addAttribute("position",new ct(u,3)),this.addAttribute("normal",new ct(d,3)),this.addAttribute("uv",new ct(g,2))}function fe(){Object.defineProperty(this,"id",{value:lh++}),this.uuid=Se.generateUUID(),this.name="",this.type="Material",this.lights=this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null,this.depthFunc=3,this.depthWrite=this.depthTest=!0,this.clippingPlanes=null,this.clipShadows=this.clipIntersection=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.userData={},this.needsUpdate=!0}function Je(t){fe.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
|
|
252
252
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
253
253
|
}`,this.fragmentShader=`void main() {
|
|
254
254
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
255
|
-
}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!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,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function Ri(t,e){this.origin=t!==void 0?t:new M,this.direction=e!==void 0?e:new M}function be(t,e,i){this.a=t!==void 0?t:new M,this.b=e!==void 0?e:new M,this.c=i!==void 0?i:new M}function Ve(t){fe.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Ke(t,e){b.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new Ve({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Mn(t,e,i,n){function r(l,c){e.buffers.color.setClear(l.r,l.g,l.b,c,n)}var o=new H(0),s=0,a,h;return{getClearColor:function(){return o},setClearColor:function(l,c){o.set(l),s=c!==void 0?c:1,r(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(l){s=l,r(o,s)},render:function(l,c,u,d){c=c.background,c===null?r(o,s):c&&c.isColor&&(r(c,1),d=!0),(t.autoClear||d)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),c&&(c.isCubeTexture||c.isWebGLRenderTargetCube)?(h===void 0&&(h=new Ke(new vi(1,1,1),new Je({type:"BackgroundCubeMaterial",uniforms:_i.clone(pn.cube.uniforms),vertexShader:pn.cube.vertexShader,fragmentShader:pn.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),h.geometry.removeAttribute("uv"),h.onBeforeRender=function(g,x,S){this.matrixWorld.copyPosition(S.matrixWorld)},i.update(h)),h.material.uniforms.tCube.value=c.isWebGLRenderTargetCube?c.texture:c,h.material.uniforms.tFlip.value=c.isWebGLRenderTargetCube?1:-1,l.push(h,h.geometry,h.material,0,null)):c&&c.isTexture&&(a===void 0&&(a=new Ke(new oi(2,2),new Je({type:"BackgroundMaterial",uniforms:_i.clone(pn.background.uniforms),vertexShader:pn.background.vertexShader,fragmentShader:pn.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),a.geometry.removeAttribute("normal"),i.update(a)),a.material.uniforms.t2D.value=c,c.matrixAutoUpdate===!0&&c.updateMatrix(),a.material.uniforms.uvTransform.value.copy(c.matrix),l.push(a,a.geometry,a.material,0,null))}}}function Cn(t,e,i,n){var r;this.setMode=function(o){r=o},this.render=function(o,s){t.drawArrays(r,o,s),i.update(s,r)},this.renderInstances=function(o,s,a){if(n.isWebGL2)var h=t;else if(h=e.get("ANGLE_instanced_arrays"),h===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}h[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,s,a,o.maxInstancedCount),i.update(a,r,o.maxInstancedCount)}}function ji(t,e,i){function n(G){if(G==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";G="mediump"}return G==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var r,o=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,s=i.precision!==void 0?i.precision:"highp",a=n(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a),i=i.logarithmicDepthBuffer===!0,a=t.getParameter(34930);var h=t.getParameter(35660),l=t.getParameter(3379),c=t.getParameter(34076),u=t.getParameter(34921),d=t.getParameter(36347),g=t.getParameter(36348),x=t.getParameter(36349),S=0<h,P=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(r!==void 0)return r;var G=e.get("EXT_texture_filter_anisotropic");return r=G!==null?t.getParameter(G.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:s,logarithmicDepthBuffer:i,maxTextures:a,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:x,vertexTextures:S,floatFragmentTextures:P,floatVertexTextures:S&&P}}function Ii(){function t(){l.value!==n&&(l.value=n,l.needsUpdate=0<r),i.numPlanes=r,i.numIntersection=0}function e(c,u,d,g){var x=c!==null?c.length:0,S=null;if(x!==0){if(S=l.value,g!==!0||S===null)for(g=d+4*x,u=u.matrixWorldInverse,h.getNormalMatrix(u),(S===null||S.length<g)&&(S=new Float32Array(g)),g=0;g!==x;++g,d+=4)a.copy(c[g]).applyMatrix4(u,h),a.normal.toArray(S,d),S[d+3]=a.constant;l.value=S,l.needsUpdate=!0}return i.numPlanes=x,S}var i=this,n=null,r=0,o=!1,s=!1,a=new _t,h=new yt,l={value:null,needsUpdate:!1};this.uniform=l,this.numIntersection=this.numPlanes=0,this.init=function(c,u,d){var g=c.length!==0||u||r!==0||o;return o=u,n=e(c,d,0),r=c.length,g},this.beginShadows=function(){s=!0,e(null)},this.endShadows=function(){s=!1,t()},this.setState=function(c,u,d,g,x,S){if(!o||c===null||c.length===0||s&&!d)s?e(null):t();else{d=s?0:r;var P=4*d,G=x.clippingState||null;for(l.value=G,G=e(c,g,P,S),c=0;c!==P;++c)G[c]=n[c];x.clippingState=G,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=d}}}function en(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=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":n=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":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function ci(t,e,i){function n(s){var a=s.target;s=r[a.id],s.index!==null&&e.remove(s.index);for(var h in s.attributes)e.remove(s.attributes[h]);a.removeEventListener("dispose",n),delete r[a.id],(h=o[s.id])&&(e.remove(h),delete o[s.id]),i.memory.geometries--}var r={},o={};return{get:function(s,a){var h=r[a.id];return h||(a.addEventListener("dispose",n),a.isBufferGeometry?h=a:a.isGeometry&&(a._bufferGeometry===void 0&&(a._bufferGeometry=new Rt().setFromObject(s)),h=a._bufferGeometry),r[a.id]=h,i.memory.geometries++,h)},update:function(s){var a=s.index,h=s.attributes;a!==null&&e.update(a,34963);for(var l in h)e.update(h[l],34962);s=s.morphAttributes;for(l in s){a=s[l],h=0;for(var c=a.length;h<c;h++)e.update(a[h],34962)}},getWireframeAttribute:function(s){var a=o[s.id];if(a)return a;a=[];var h=s.index,l=s.attributes;if(h!==null){h=h.array,l=0;for(var c=h.length;l<c;l+=3){var u=h[l+0],d=h[l+1],g=h[l+2];a.push(u,d,d,g,g,u)}}else for(h=l.position.array,l=0,c=h.length/3-1;l<c;l+=3)u=l+0,d=l+1,g=l+2,a.push(u,d,d,g,g,u);return a=new(65535<gi(a)?ie:Gt)(a,1),e.update(a,34963),o[s.id]=a}}}function Oe(t,e,i,n){var r,o,s;this.setMode=function(a){r=a},this.setIndex=function(a){o=a.type,s=a.bytesPerElement},this.render=function(a,h){t.drawElements(r,h,o,a*s),i.update(h,r)},this.renderInstances=function(a,h,l){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,l,o,h*s,a.maxInstancedCount),i.update(l,r,a.maxInstancedCount)}}function Si(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(i,n,r){switch(r=r||1,e.calls++,n){case 4:e.triangles+=i/3*r;break;case 5:case 6:e.triangles+=r*(i-2);break;case 1:e.lines+=i/2*r;break;case 3:e.lines+=r*(i-1);break;case 2:e.lines+=r*i;break;case 0:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Tn(t,e){return Math.abs(e[1])-Math.abs(t[1])}function nn(t){var e={},i=new Float32Array(8);return{update:function(n,r,o,s){var a=n.morphTargetInfluences,h=a.length;if(n=e[r.id],n===void 0){n=[];for(var l=0;l<h;l++)n[l]=[l,0];e[r.id]=n}var c=o.morphTargets&&r.morphAttributes.position;for(o=o.morphNormals&&r.morphAttributes.normal,l=0;l<h;l++){var u=n[l];u[1]!==0&&(c&&r.removeAttribute("morphTarget"+l),o&&r.removeAttribute("morphNormal"+l))}for(l=0;l<h;l++)u=n[l],u[0]=l,u[1]=a[l];for(n.sort(Tn),l=0;8>l;l++){if((u=n[l])&&(a=u[0],h=u[1])){c&&r.addAttribute("morphTarget"+l,c[a]),o&&r.addAttribute("morphNormal"+l,o[a]),i[l]=h;continue}i[l]=0}s.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Ci(t,e){var i={};return{update:function(n){var r=e.render.frame,o=n.geometry,s=t.get(n,o);return i[s.id]!==r&&(o.isGeometry&&s.updateFromObject(n),t.update(s),i[s.id]=r),s},dispose:function(){i={}}}}function _(t,e,i,n,r,o,s,a,h,l){t=t!==void 0?t:[],Ct.call(this,t,e!==void 0?e:301,i,n,r,o,s,a,h,l),this.flipY=!1}function D(t,e,i,n){Ct.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function B(t,e,i){var n=t[0];if(0>=n||0<n)return t;var r=e*i,o=fa[r];if(o===void 0&&(o=new Float32Array(r),fa[r]=o),e!==0)for(n.toArray(o,0),n=1,r=0;n!==e;++n)r+=i,t[n].toArray(o,r);return o}function U(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function J(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function dt(t,e){var i=ma[e];i===void 0&&(i=new Int32Array(e),ma[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function wt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function pt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):U(i,e)||(t.uniform2fv(this.addr,e),J(i,e))}function se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):U(i,e)||(t.uniform3fv(this.addr,e),J(i,e))}function Ut(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):U(i,e)||(t.uniform4fv(this.addr,e),J(i,e))}function he(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),J(i,e)):U(i,n)||(ya.set(n),t.uniformMatrix2fv(this.addr,!1,ya),J(i,n))}function ze(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),J(i,e)):U(i,n)||(va.set(n),t.uniformMatrix3fv(this.addr,!1,va),J(i,n))}function Xe(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),J(i,e)):U(i,n)||(ga.set(n),t.uniformMatrix4fv(this.addr,!1,ga),J(i,n))}function Ce(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||pa,r)}function je(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture3D(e||lh,r)}function gn(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||da,r)}function Wi(t,e){var i=this.cache;U(i,e)||(t.uniform2iv(this.addr,e),J(i,e))}function si(t,e){var i=this.cache;U(i,e)||(t.uniform3iv(this.addr,e),J(i,e))}function Dr(t,e){var i=this.cache;U(i,e)||(t.uniform4iv(this.addr,e),J(i,e))}function Qe(t){switch(t){case 5126:return wt;case 35664:return ae;case 35665:return se;case 35666:return Ut;case 35674:return he;case 35675:return ze;case 35676:return Xe;case 35678:case 36198:return Ce;case 35679:return je;case 35680:return gn;case 5124:case 35670:return pt;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function Ko(t,e){var i=this.cache;U(i,e)||(t.uniform1fv(this.addr,e),J(i,e))}function rn(t,e){var i=this.cache;U(i,e)||(t.uniform1iv(this.addr,e),J(i,e))}function Mo(t,e){var i=this.cache;e=B(e,this.size,2),U(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function ui(t,e){var i=this.cache;e=B(e,this.size,3),U(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function zr(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function bn(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Gi(t,e){var i=this.cache;e=B(e,this.size,9),U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function Kn(t,e){var i=this.cache;e=B(e,this.size,16),U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function ts(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTexture2D(e[t]||pa,o[t])}function To(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTextureCube(e[t]||da,o[t])}function Sn(t){switch(t){case 5126:return Ko;case 35664:return Mo;case 35665:return ui;case 35666:return zr;case 35674:return bn;case 35675:return Gi;case 35676:return Kn;case 35678:return ts;case 35680:return To;case 5124:case 35670:return rn;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function es(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Qe(e.type)}function tr(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Sn(e.type)}function Nr(t){this.id=t,this.seq=[],this.map={}}function on(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var r=t.getActiveUniform(e,n),o=t.getUniformLocation(e,r.name),s=this,a=r.name,h=a.length;for(bs.lastIndex=0;;){var l=bs.exec(a),c=bs.lastIndex,u=l[1],d=l[3];if(l[2]==="]"&&(u|=0),d===void 0||d==="["&&c+2===h){a=s,r=d===void 0?new es(u,r,o):new tr(u,r,o),a.seq.push(r),a.map[r.id]=r;break}else d=s.map[u],d===void 0&&(d=new Nr(u),u=s,s=d,u.seq.push(s),u.map[s.id]=s),s=d}}}function Br(t){t=t.split(`
|
|
255
|
+
}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!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,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function Ri(t,e){this.origin=t!==void 0?t:new M,this.direction=e!==void 0?e:new M}function be(t,e,i){this.a=t!==void 0?t:new M,this.b=e!==void 0?e:new M,this.c=i!==void 0?i:new M}function Ve(t){fe.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.lights=this.morphTargets=this.skinning=!1,this.setValues(t)}function Ke(t,e){b.call(this),this.type="Mesh",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new Ve({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Mn(t,e,i,n){function r(l,c){e.buffers.color.setClear(l.r,l.g,l.b,c,n)}var o=new H(0),s=0,a,h;return{getClearColor:function(){return o},setClearColor:function(l,c){o.set(l),s=c!==void 0?c:1,r(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(l){s=l,r(o,s)},render:function(l,c,u,d){c=c.background,c===null?r(o,s):c&&c.isColor&&(r(c,1),d=!0),(t.autoClear||d)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),c&&(c.isCubeTexture||c.isWebGLRenderTargetCube)?(h===void 0&&(h=new Ke(new vi(1,1,1),new Je({type:"BackgroundCubeMaterial",uniforms:_i.clone(pn.cube.uniforms),vertexShader:pn.cube.vertexShader,fragmentShader:pn.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1})),h.geometry.removeAttribute("normal"),h.geometry.removeAttribute("uv"),h.onBeforeRender=function(g,x,S){this.matrixWorld.copyPosition(S.matrixWorld)},i.update(h)),h.material.uniforms.tCube.value=c.isWebGLRenderTargetCube?c.texture:c,h.material.uniforms.tFlip.value=c.isWebGLRenderTargetCube?1:-1,l.push(h,h.geometry,h.material,0,null)):c&&c.isTexture&&(a===void 0&&(a=new Ke(new oi(2,2),new Je({type:"BackgroundMaterial",uniforms:_i.clone(pn.background.uniforms),vertexShader:pn.background.vertexShader,fragmentShader:pn.background.fragmentShader,side:0,depthTest:!0,depthWrite:!1,fog:!1})),a.geometry.removeAttribute("normal"),i.update(a)),a.material.uniforms.t2D.value=c,c.matrixAutoUpdate===!0&&c.updateMatrix(),a.material.uniforms.uvTransform.value.copy(c.matrix),l.push(a,a.geometry,a.material,0,null))}}}function Cn(t,e,i,n){var r;this.setMode=function(o){r=o},this.render=function(o,s){t.drawArrays(r,o,s),i.update(s,r)},this.renderInstances=function(o,s,a){if(n.isWebGL2)var h=t;else if(h=e.get("ANGLE_instanced_arrays"),h===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}h[n.isWebGL2?"drawArraysInstanced":"drawArraysInstancedANGLE"](r,s,a,o.maxInstancedCount),i.update(a,r,o.maxInstancedCount)}}function ji(t,e,i){function n(G){if(G==="highp"){if(0<t.getShaderPrecisionFormat(35633,36338).precision&&0<t.getShaderPrecisionFormat(35632,36338).precision)return"highp";G="mediump"}return G==="mediump"&&0<t.getShaderPrecisionFormat(35633,36337).precision&&0<t.getShaderPrecisionFormat(35632,36337).precision?"mediump":"lowp"}var r,o=typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext,s=i.precision!==void 0?i.precision:"highp",a=n(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a),i=i.logarithmicDepthBuffer===!0,a=t.getParameter(34930);var h=t.getParameter(35660),l=t.getParameter(3379),c=t.getParameter(34076),u=t.getParameter(34921),d=t.getParameter(36347),g=t.getParameter(36348),x=t.getParameter(36349),S=0<h,P=o||!!e.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(r!==void 0)return r;var G=e.get("EXT_texture_filter_anisotropic");return r=G!==null?t.getParameter(G.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:n,precision:s,logarithmicDepthBuffer:i,maxTextures:a,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:c,maxAttributes:u,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:x,vertexTextures:S,floatFragmentTextures:P,floatVertexTextures:S&&P}}function Ii(){function t(){l.value!==n&&(l.value=n,l.needsUpdate=0<r),i.numPlanes=r,i.numIntersection=0}function e(c,u,d,g){var x=c!==null?c.length:0,S=null;if(x!==0){if(S=l.value,g!==!0||S===null)for(g=d+4*x,u=u.matrixWorldInverse,h.getNormalMatrix(u),(S===null||S.length<g)&&(S=new Float32Array(g)),g=0;g!==x;++g,d+=4)a.copy(c[g]).applyMatrix4(u,h),a.normal.toArray(S,d),S[d+3]=a.constant;l.value=S,l.needsUpdate=!0}return i.numPlanes=x,S}var i=this,n=null,r=0,o=!1,s=!1,a=new _t,h=new yt,l={value:null,needsUpdate:!1};this.uniform=l,this.numIntersection=this.numPlanes=0,this.init=function(c,u,d){var g=c.length!==0||u||r!==0||o;return o=u,n=e(c,d,0),r=c.length,g},this.beginShadows=function(){s=!0,e(null)},this.endShadows=function(){s=!1,t()},this.setState=function(c,u,d,g,x,S){if(!o||c===null||c.length===0||s&&!d)s?e(null):t();else{d=s?0:r;var P=4*d,G=x.clippingState||null;for(l.value=G,G=e(c,g,P,S),c=0;c!==P;++c)G[c]=n[c];x.clippingState=G,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=d}}}function en(t){var e={};return{get:function(i){if(e[i]!==void 0)return e[i];switch(i){case"WEBGL_depth_texture":var n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=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":n=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":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return n===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}}}function ci(t,e,i){function n(s){var a=s.target;s=r[a.id],s.index!==null&&e.remove(s.index);for(var h in s.attributes)e.remove(s.attributes[h]);a.removeEventListener("dispose",n),delete r[a.id],(h=o[s.id])&&(e.remove(h),delete o[s.id]),i.memory.geometries--}var r={},o={};return{get:function(s,a){var h=r[a.id];return h||(a.addEventListener("dispose",n),a.isBufferGeometry?h=a:a.isGeometry&&(a._bufferGeometry===void 0&&(a._bufferGeometry=new Rt().setFromObject(s)),h=a._bufferGeometry),r[a.id]=h,i.memory.geometries++,h)},update:function(s){var a=s.index,h=s.attributes;a!==null&&e.update(a,34963);for(var l in h)e.update(h[l],34962);s=s.morphAttributes;for(l in s){a=s[l],h=0;for(var c=a.length;h<c;h++)e.update(a[h],34962)}},getWireframeAttribute:function(s){var a=o[s.id];if(a)return a;a=[];var h=s.index,l=s.attributes;if(h!==null){h=h.array,l=0;for(var c=h.length;l<c;l+=3){var u=h[l+0],d=h[l+1],g=h[l+2];a.push(u,d,d,g,g,u)}}else for(h=l.position.array,l=0,c=h.length/3-1;l<c;l+=3)u=l+0,d=l+1,g=l+2,a.push(u,d,d,g,g,u);return a=new(65535<gi(a)?ie:Gt)(a,1),e.update(a,34963),o[s.id]=a}}}function Oe(t,e,i,n){var r,o,s;this.setMode=function(a){r=a},this.setIndex=function(a){o=a.type,s=a.bytesPerElement},this.render=function(a,h){t.drawElements(r,h,o,a*s),i.update(h,r)},this.renderInstances=function(a,h,l){if(n.isWebGL2)var c=t;else if(c=e.get("ANGLE_instanced_arrays"),c===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}c[n.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](r,l,o,h*s,a.maxInstancedCount),i.update(l,r,a.maxInstancedCount)}}function Si(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(i,n,r){switch(r=r||1,e.calls++,n){case 4:e.triangles+=i/3*r;break;case 5:case 6:e.triangles+=r*(i-2);break;case 1:e.lines+=i/2*r;break;case 3:e.lines+=r*(i-1);break;case 2:e.lines+=r*i;break;case 0:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Tn(t,e){return Math.abs(e[1])-Math.abs(t[1])}function nn(t){var e={},i=new Float32Array(8);return{update:function(n,r,o,s){var a=n.morphTargetInfluences,h=a.length;if(n=e[r.id],n===void 0){n=[];for(var l=0;l<h;l++)n[l]=[l,0];e[r.id]=n}var c=o.morphTargets&&r.morphAttributes.position;for(o=o.morphNormals&&r.morphAttributes.normal,l=0;l<h;l++){var u=n[l];u[1]!==0&&(c&&r.removeAttribute("morphTarget"+l),o&&r.removeAttribute("morphNormal"+l))}for(l=0;l<h;l++)u=n[l],u[0]=l,u[1]=a[l];for(n.sort(Tn),l=0;8>l;l++){if((u=n[l])&&(a=u[0],h=u[1])){c&&r.addAttribute("morphTarget"+l,c[a]),o&&r.addAttribute("morphNormal"+l,o[a]),i[l]=h;continue}i[l]=0}s.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Ci(t,e){var i={};return{update:function(n){var r=e.render.frame,o=n.geometry,s=t.get(n,o);return i[s.id]!==r&&(o.isGeometry&&s.updateFromObject(n),t.update(s),i[s.id]=r),s},dispose:function(){i={}}}}function _(t,e,i,n,r,o,s,a,h,l){t=t!==void 0?t:[],Ct.call(this,t,e!==void 0?e:301,i,n,r,o,s,a,h,l),this.flipY=!1}function D(t,e,i,n){Ct.call(this,null),this.image={data:t,width:e,height:i,depth:n},this.minFilter=this.magFilter=1003,this.flipY=this.generateMipmaps=!1}function B(t,e,i){var n=t[0];if(0>=n||0<n)return t;var r=e*i,o=fa[r];if(o===void 0&&(o=new Float32Array(r),fa[r]=o),e!==0)for(n.toArray(o,0),n=1,r=0;n!==e;++n)r+=i,t[n].toArray(o,r);return o}function U(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function J(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function dt(t,e){var i=ma[e];i===void 0&&(i=new Int32Array(e),ma[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function wt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function pt(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function ae(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y):U(i,e)||(t.uniform2fv(this.addr,e),J(i,e))}function se(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z):e.r!==void 0?(i[0]!==e.r||i[1]!==e.g||i[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b):U(i,e)||(t.uniform3fv(this.addr,e),J(i,e))}function Ut(t,e){var i=this.cache;e.x!==void 0?(i[0]!==e.x||i[1]!==e.y||i[2]!==e.z||i[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w):U(i,e)||(t.uniform4fv(this.addr,e),J(i,e))}function he(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),J(i,e)):U(i,n)||(ya.set(n),t.uniformMatrix2fv(this.addr,!1,ya),J(i,n))}function ze(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),J(i,e)):U(i,n)||(va.set(n),t.uniformMatrix3fv(this.addr,!1,va),J(i,n))}function Xe(t,e){var i=this.cache,n=e.elements;n===void 0?U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),J(i,e)):U(i,n)||(ga.set(n),t.uniformMatrix4fv(this.addr,!1,ga),J(i,n))}function Ce(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||pa,r)}function je(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture3D(e||ch,r)}function gn(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||da,r)}function Wi(t,e){var i=this.cache;U(i,e)||(t.uniform2iv(this.addr,e),J(i,e))}function si(t,e){var i=this.cache;U(i,e)||(t.uniform3iv(this.addr,e),J(i,e))}function Dr(t,e){var i=this.cache;U(i,e)||(t.uniform4iv(this.addr,e),J(i,e))}function Qe(t){switch(t){case 5126:return wt;case 35664:return ae;case 35665:return se;case 35666:return Ut;case 35674:return he;case 35675:return ze;case 35676:return Xe;case 35678:case 36198:return Ce;case 35679:return je;case 35680:return gn;case 5124:case 35670:return pt;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function Ko(t,e){var i=this.cache;U(i,e)||(t.uniform1fv(this.addr,e),J(i,e))}function rn(t,e){var i=this.cache;U(i,e)||(t.uniform1iv(this.addr,e),J(i,e))}function Mo(t,e){var i=this.cache;e=B(e,this.size,2),U(i,e)||(t.uniform2fv(this.addr,e),this.updateCache(e))}function ui(t,e){var i=this.cache;e=B(e,this.size,3),U(i,e)||(t.uniform3fv(this.addr,e),this.updateCache(e))}function zr(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniform4fv(this.addr,e),this.updateCache(e))}function bn(t,e){var i=this.cache;e=B(e,this.size,4),U(i,e)||(t.uniformMatrix2fv(this.addr,!1,e),this.updateCache(e))}function Gi(t,e){var i=this.cache;e=B(e,this.size,9),U(i,e)||(t.uniformMatrix3fv(this.addr,!1,e),this.updateCache(e))}function Kn(t,e){var i=this.cache;e=B(e,this.size,16),U(i,e)||(t.uniformMatrix4fv(this.addr,!1,e),this.updateCache(e))}function ts(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTexture2D(e[t]||pa,o[t])}function To(t,e,i){var n=this.cache,r=e.length,o=dt(i,r);for(U(n,o)===!1&&(t.uniform1iv(this.addr,o),J(n,o)),t=0;t!==r;++t)i.setTextureCube(e[t]||da,o[t])}function Sn(t){switch(t){case 5126:return Ko;case 35664:return Mo;case 35665:return ui;case 35666:return zr;case 35674:return bn;case 35675:return Gi;case 35676:return Kn;case 35678:return ts;case 35680:return To;case 5124:case 35670:return rn;case 35667:case 35671:return Wi;case 35668:case 35672:return si;case 35669:case 35673:return Dr}}function es(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=Qe(e.type)}function tr(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=Sn(e.type)}function Nr(t){this.id=t,this.seq=[],this.map={}}function on(t,e,i){this.seq=[],this.map={},this.renderer=i,i=t.getProgramParameter(e,35718);for(var n=0;n<i;++n){var r=t.getActiveUniform(e,n),o=t.getUniformLocation(e,r.name),s=this,a=r.name,h=a.length;for(bs.lastIndex=0;;){var l=bs.exec(a),c=bs.lastIndex,u=l[1],d=l[3];if(l[2]==="]"&&(u|=0),d===void 0||d==="["&&c+2===h){a=s,r=d===void 0?new es(u,r,o):new tr(u,r,o),a.seq.push(r),a.map[r.id]=r;break}else d=s.map[u],d===void 0&&(d=new Nr(u),u=s,s=d,u.seq.push(s),u.map[s.id]=s),s=d}}}function Br(t){t=t.split(`
|
|
256
256
|
`);for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(`
|
|
257
257
|
`)}function er(t,e,i){var n=t.createShader(e);return t.shaderSource(n,i),t.compileShader(n),t.getShaderParameter(n,35713)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),t.getShaderInfoLog(n)!==""&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===35633?"vertex":"fragment",t.getShaderInfoLog(n),Br(i)),n}function ir(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+t)}}function sn(t,e){return e=ir(e),"vec4 "+t+"( vec4 value ) { return "+e[0]+"ToLinear"+e[1]+"; }"}function is(t,e){return e=ir(e),"vec4 "+t+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function ns(t,e){switch(e){case 1:e="Linear";break;case 2:e="Reinhard";break;case 3:e="Uncharted2";break;case 4:e="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function rs(t,e,i){return t=t||{},[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap&&!e.objectSpaceNormalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(In).join(`
|
|
258
258
|
`)}function On(t){var e=[],i;for(i in t){var n=t[i];n!==!1&&e.push("#define "+i+" "+n)}return e.join(`
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
#define texture2DProjGradEXT textureProjGrad
|
|
283
283
|
#define textureCubeGradEXT textureGrad`].join(`
|
|
284
284
|
`)+`
|
|
285
|
-
`+e),c=e+c,l=er(a,35633,h+l),c=er(a,35632,c),a.attachShader(N,l),a.attachShader(N,c),n.index0AttributeName!==void 0?a.bindAttribLocation(N,0,n.index0AttributeName):o.morphTargets===!0&&a.bindAttribLocation(N,0,"position"),a.linkProgram(N),o=a.getProgramInfoLog(N).trim(),s=a.getShaderInfoLog(l).trim(),u=a.getShaderInfoLog(c).trim(),g=d=!0,a.getProgramParameter(N,35714)===!1?(d=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(N,35715),"gl.getProgramInfoLog",o,s,u)):o!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o):(s===""||u==="")&&(g=!1),g&&(this.diagnostics={runnable:d,material:n,programLog:o,vertexShader:{log:s,prefix:h},fragmentShader:{log:u,prefix:e}}),a.deleteShader(l),a.deleteShader(c);var q;this.getUniforms=function(){return q===void 0&&(q=new on(a,N,t)),q};var V;return this.getAttributes=function(){if(V===void 0){for(var ot={},T=a.getProgramParameter(N,35721),A=0;A<T;A++){var tt=a.getActiveAttrib(N,A).name;ot[tt]=a.getAttribLocation(N,tt)}V=ot}return V},this.destroy=function(){a.deleteProgram(N),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=r.name,this.id=ch++,this.code=i,this.usedTimes=1,this.program=N,this.vertexShader=l,this.fragmentShader=c,this}function R(t,e,i){function n(a,h){if(a)a.isTexture?l=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),l=a.texture.encoding);else var l=3e3;return l===3e3&&h&&(l=3007),l}var r=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},s="precision supportsVertexTextures map mapEncoding matcapEncoding 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".split(" ");this.getParameters=function(a,h,l,c,u,d,g){var x=o[a.type];if(g.isSkinnedMesh){var S=g.skeleton.bones;if(i.floatVertexTextures)S=1024;else{var P=Math.min(Math.floor((i.maxVertexUniforms-20)/4),S.length);P<S.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+S.length+" bones. This GPU supports "+P+"."),S=0):S=P}}else S=0;P=i.precision,a.precision!==null&&(P=i.getMaxPrecision(a.precision),P!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",P,"instead."));var G=t.getRenderTarget();return{shaderID:x,precision:P,supportsVertexTextures:i.vertexTextures,outputEncoding:n(G?G.texture:null,t.gammaOutput),map:!!a.map,mapEncoding:n(a.map,t.gammaInput),matcap:!!a.matcap,matcapEncoding:n(a.matcap,t.gammaInput),envMap:!!a.envMap,envMapMode:a.envMap&&a.envMap.mapping,envMapEncoding:n(a.envMap,t.gammaInput),envMapCubeUV:!!a.envMap&&(a.envMap.mapping===306||a.envMap.mapping===307),lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:n(a.emissiveMap,t.gammaInput),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===1,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,alphaMap:!!a.alphaMap,gradientMap:!!a.gradientMap,combine:a.combine,vertexColors:a.vertexColors,fog:!!c,useFog:a.fog,fogExp:c&&c.isFogExp2,flatShading:a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:a.skinning&&0<S,maxBones:S,useVertexTexture:i.floatVertexTextures,morphTargets:a.morphTargets,morphNormals:a.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numClippingPlanes:u,numClipIntersection:d,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&g.receiveShadow&&0<l.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,alphaTest:a.alphaTest,doubleSided:a.side===2,flipSided:a.side===1,depthPacking:a.depthPacking!==void 0?a.depthPacking:!1}},this.getProgramCode=function(a,h){var l=[];if(h.shaderID?l.push(h.shaderID):(l.push(a.fragmentShader),l.push(a.vertexShader)),a.defines!==void 0)for(var c in a.defines)l.push(c),l.push(a.defines[c]);for(c=0;c<s.length;c++)l.push(h[s[c]]);return l.push(a.onBeforeCompile.toString()),l.push(t.gammaOutput),l.push(t.gammaFactor),l.join()},this.acquireProgram=function(a,h,l,c){for(var u,d=0,g=r.length;d<g;d++){var x=r[d];if(x.code===c){u=x,++u.usedTimes;break}}return u===void 0&&(u=new E(t,e,c,a,h,l,i),r.push(u)),u},this.releaseProgram=function(a){if(--a.usedTimes===0){var h=r.indexOf(a);r[h]=r[r.length-1],r.pop(),a.destroy()}},this.programs=r}function L(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function y(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 W(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function C(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,o,s,a,h){var l=t[e];l===void 0?(l={id:r.id,object:r,geometry:o,material:s,program:s.program,renderOrder:r.renderOrder,z:a,group:h},t[e]=l):(l.id=r.id,l.object=r,l.geometry=o,l.material=s,l.program=s.program,l.renderOrder=r.renderOrder,l.z=a,l.group=h),(s.transparent===!0?n:i).push(l),e++},sort:function(){1<i.length&&i.sort(y),1<n.length&&n.sort(W)}}}function Q(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new C,t[e]=i),i},dispose:function(){t={}}}}function rt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new M,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"SpotLight":i={position:new M,direction:new M,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"PointLight":i={position:new M,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new M,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new M,halfWidth:new M,halfHeight:new M}}return t[e.id]=i}}}function et(){var t=new rt,e={id:uh++,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:[]},i=new M,n=new mt,r=new mt;return{setup:function(o,s,a){var h=0,l=0,c=0,u=0,d=0,g=0,x=0,S=0;a=a.matrixWorldInverse;for(var P=0,G=o.length;P<G;P++){var N=o[P],q=N.color,V=N.intensity,ot=N.distance,T=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)h+=q.r*V,l+=q.g*V,c+=q.b*V;else if(N.isDirectionalLight){var A=t.get(N);A.color.copy(N.color).multiplyScalar(N.intensity),A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.directionalShadowMap[u]=T,e.directionalShadowMatrix[u]=N.shadow.matrix,e.directional[u]=A,u++}else N.isSpotLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(q).multiplyScalar(V),A.distance=ot,A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),A.coneCos=Math.cos(N.angle),A.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.spotShadowMap[g]=T,e.spotShadowMatrix[g]=N.shadow.matrix,e.spot[g]=A,g++):N.isRectAreaLight?(A=t.get(N),A.color.copy(q).multiplyScalar(V),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),r.identity(),n.copy(N.matrixWorld),n.premultiply(a),r.extractRotation(n),A.halfWidth.set(.5*N.width,0,0),A.halfHeight.set(0,.5*N.height,0),A.halfWidth.applyMatrix4(r),A.halfHeight.applyMatrix4(r),e.rectArea[x]=A,x++):N.isPointLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(N.color).multiplyScalar(N.intensity),A.distance=N.distance,A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize,A.shadowCameraNear=q.camera.near,A.shadowCameraFar=q.camera.far),e.pointShadowMap[d]=T,e.pointShadowMatrix[d]=N.shadow.matrix,e.point[d]=A,d++):N.isHemisphereLight&&(A=t.get(N),A.direction.setFromMatrixPosition(N.matrixWorld),A.direction.transformDirection(a),A.direction.normalize(),A.skyColor.copy(N.color).multiplyScalar(V),A.groundColor.copy(N.groundColor).multiplyScalar(V),e.hemi[S]=A,S++)}e.ambient[0]=h,e.ambient[1]=l,e.ambient[2]=c,e.directional.length=u,e.spot.length=g,e.rectArea.length=x,e.point.length=d,e.hemi.length=S,e.hash.stateID=e.id,e.hash.directionalLength=u,e.hash.pointLength=d,e.hash.spotLength=g,e.hash.rectAreaLength=x,e.hash.hemiLength=S,e.hash.shadowsLength=s.length},state:e}}function j(){var t=new et,e=[],i=[];return{init:function(){e.length=0,i.length=0},state:{lightsArray:e,shadowsArray:i,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(n){e.push(n)},pushShadow:function(n){i.push(n)}}}function Mt(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new j;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new j,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function Tt(t){fe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function gt(t){fe.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new M,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function Nt(t,e,i){function n(T,A,tt,vt,ft,at){var Ht=T.geometry,It=u,$t=T.customDepthMaterial;return tt&&(It=d,$t=T.customDistanceMaterial),$t?It=$t:($t=!1,A.morphTargets&&(Ht&&Ht.isBufferGeometry?$t=Ht.morphAttributes&&Ht.morphAttributes.position&&0<Ht.morphAttributes.position.length:Ht&&Ht.isGeometry&&($t=Ht.morphTargets&&0<Ht.morphTargets.length)),T.isSkinnedMesh&&A.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",T),T=T.isSkinnedMesh&&A.skinning,Ht=0,$t&&(Ht|=1),T&&(Ht|=2),It=It[Ht]),t.localClippingEnabled&&A.clipShadows===!0&&A.clippingPlanes.length!==0&&(Ht=It.uuid,$t=A.uuid,T=g[Ht],T===void 0&&(T={},g[Ht]=T),Ht=T[$t],Ht===void 0&&(Ht=It.clone(),T[$t]=Ht),It=Ht),It.visible=A.visible,It.wireframe=A.wireframe,It.side=A.shadowSide!=null?A.shadowSide:x[A.side],It.clipShadows=A.clipShadows,It.clippingPlanes=A.clippingPlanes,It.clipIntersection=A.clipIntersection,It.wireframeLinewidth=A.wireframeLinewidth,It.linewidth=A.linewidth,tt&&It.isMeshDistanceMaterial&&(It.referencePosition.copy(vt),It.nearDistance=ft,It.farDistance=at),It}function r(T,A,tt,vt){if(T.visible!==!1){if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&T.castShadow&&(!T.frustumCulled||o.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(tt.matrixWorldInverse,T.matrixWorld);var ft=e.update(T),at=T.material;if(Array.isArray(at))for(var Ht=ft.groups,It=0,$t=Ht.length;It<$t;It++){var Xt=Ht[It],Qt=at[Xt.materialIndex];Qt&&Qt.visible&&(Qt=n(T,Qt,vt,c,tt.near,tt.far),t.renderBufferDirect(tt,null,ft,Qt,T,Xt))}else at.visible&&(Qt=n(T,at,vt,c,tt.near,tt.far),t.renderBufferDirect(tt,null,ft,Qt,T,null))}for(T=T.children,ft=0,at=T.length;ft<at;ft++)r(T[ft],A,tt,vt)}}var o=new K,s=new mt,a=new $,h=new $(i,i),l=new M,c=new M,u=Array(4),d=Array(4),g={},x={0:1,1:0,2:2},S=[new M(1,0,0),new M(-1,0,0),new M(0,0,1),new M(0,0,-1),new M(0,1,0),new M(0,-1,0)],P=[new M(0,1,0),new M(0,1,0),new M(0,1,0),new M(0,1,0),new M(0,0,1),new M(0,0,-1)],G=[new Y,new Y,new Y,new Y,new Y,new Y];for(i=0;i!==4;++i){var N=(i&1)!==0,q=(i&2)!==0,V=new Tt({depthPacking:3201,morphTargets:N,skinning:q});u[i]=V,N=new gt({morphTargets:N,skinning:q}),d[i]=N}var ot=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(T,A,tt){if(ot.enabled!==!1&&(ot.autoUpdate!==!1||ot.needsUpdate!==!1)&&T.length!==0){var vt=t.state;vt.disable(3042),vt.buffers.color.setClear(1,1,1,1),vt.buffers.depth.setTest(!0),vt.setScissorTest(!1);for(var ft,at=0,Ht=T.length;at<Ht;at++){var It=T[at];ft=It.shadow;var $t=It&&It.isPointLight;if(ft===void 0)console.warn("THREE.WebGLShadowMap:",It,"has no shadow.");else{var Xt=ft.camera;if(a.copy(ft.mapSize),a.min(h),$t){var Qt=a.x,re=a.y;G[0].set(2*Qt,re,Qt,re),G[1].set(0,re,Qt,re),G[2].set(3*Qt,re,Qt,re),G[3].set(Qt,re,Qt,re),G[4].set(3*Qt,0,Qt,re),G[5].set(Qt,0,Qt,re),a.x*=4,a.y*=2}for(ft.map===null&&(ft.map=new lt(a.x,a.y,{minFilter:1003,magFilter:1003,format:1023}),ft.map.texture.name=It.name+".shadowMap",Xt.updateProjectionMatrix()),ft.isSpotLightShadow&&ft.update(It),Qt=ft.map,re=ft.matrix,c.setFromMatrixPosition(It.matrixWorld),Xt.position.copy(c),$t?(ft=6,re.makeTranslation(-c.x,-c.y,-c.z)):(ft=1,l.setFromMatrixPosition(It.target.matrixWorld),Xt.lookAt(l),Xt.updateMatrixWorld(),re.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),re.multiply(Xt.projectionMatrix),re.multiply(Xt.matrixWorldInverse)),t.setRenderTarget(Qt),t.clear(),It=0;It<ft;It++)$t&&(l.copy(Xt.position),l.add(S[It]),Xt.up.copy(P[It]),Xt.lookAt(l),Xt.updateMatrixWorld(),vt.viewport(G[It])),s.multiplyMatrices(Xt.projectionMatrix,Xt.matrixWorldInverse),o.setFromMatrix(s),r(A,tt,Xt,$t)}}ot.needsUpdate=!1}}}function Et(t,e,i,n){function r(nt,ye,Te){var Ze=new Uint8Array(4),Yt=t.createTexture();for(t.bindTexture(nt,Yt),t.texParameteri(nt,10241,9728),t.texParameteri(nt,10240,9728),nt=0;nt<Te;nt++)t.texImage2D(ye+nt,0,6408,1,1,0,6408,5121,Ze);return Yt}function o(nt,ye){G[nt]=1,N[nt]===0&&(t.enableVertexAttribArray(nt),N[nt]=1),q[nt]!==ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](nt,ye),q[nt]=ye)}function s(nt){V[nt]!==!0&&(t.enable(nt),V[nt]=!0)}function a(nt){V[nt]!==!1&&(t.disable(nt),V[nt]=!1)}function h(nt,ye,Te,Ze,Yt,ue,_e,Be){if(nt===0)A&&(a(3042),A=!1);else if(A||(s(3042),A=!0),nt!==5){if(nt!==tt||Be!==Xt){if((vt!==100||Ht!==100)&&(t.blendEquation(32774),Ht=vt=100),Be)switch(nt){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}else switch(nt){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}$t=It=at=ft=null,tt=nt,Xt=Be}}else Yt=Yt||ye,ue=ue||Te,_e=_e||Ze,(ye!==vt||Yt!==Ht)&&(t.blendEquationSeparate(i.convert(ye),i.convert(Yt)),vt=ye,Ht=Yt),(Te!==ft||Ze!==at||ue!==It||_e!==$t)&&(t.blendFuncSeparate(i.convert(Te),i.convert(Ze),i.convert(ue),i.convert(_e)),ft=Te,at=Ze,It=ue,$t=_e),tt=nt,Xt=null}function l(nt){Qt!==nt&&(nt?t.frontFace(2304):t.frontFace(2305),Qt=nt)}function c(nt){nt!==0?(s(2884),nt!==re&&(nt===1?t.cullFace(1029):nt===2?t.cullFace(1028):t.cullFace(1032))):a(2884),re=nt}function u(nt,ye,Te){nt?(s(32823),(Ae!==ye||fi!==Te)&&(t.polygonOffset(ye,Te),Ae=ye,fi=Te)):a(32823)}function d(nt){nt===void 0&&(nt=33984+li-1),pi!==nt&&(t.activeTexture(nt),pi=nt)}var g=new function(){var nt=!1,ye=new Y,Te=null,Ze=new Y(0,0,0,0);return{setMask:function(Yt){Te===Yt||nt||(t.colorMask(Yt,Yt,Yt,Yt),Te=Yt)},setLocked:function(Yt){nt=Yt},setClear:function(Yt,ue,_e,Be,De){De===!0&&(Yt*=Be,ue*=Be,_e*=Be),ye.set(Yt,ue,_e,Be),Ze.equals(ye)===!1&&(t.clearColor(Yt,ue,_e,Be),Ze.copy(ye))},reset:function(){nt=!1,Te=null,Ze.set(-1,0,0,0)}}},x=new function(){var nt=!1,ye=null,Te=null,Ze=null;return{setTest:function(Yt){Yt?s(2929):a(2929)},setMask:function(Yt){ye===Yt||nt||(t.depthMask(Yt),ye=Yt)},setFunc:function(Yt){if(Te!==Yt){if(Yt)switch(Yt){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Te=Yt}},setLocked:function(Yt){nt=Yt},setClear:function(Yt){Ze!==Yt&&(t.clearDepth(Yt),Ze=Yt)},reset:function(){nt=!1,Ze=Te=ye=null}}},S=new function(){var nt=!1,ye=null,Te=null,Ze=null,Yt=null,ue=null,_e=null,Be=null,De=null;return{setTest:function(xt){xt?s(2960):a(2960)},setMask:function(xt){ye===xt||nt||(t.stencilMask(xt),ye=xt)},setFunc:function(xt,xe,ve){(Te!==xt||Ze!==xe||Yt!==ve)&&(t.stencilFunc(xt,xe,ve),Te=xt,Ze=xe,Yt=ve)},setOp:function(xt,xe,ve){(ue!==xt||_e!==xe||Be!==ve)&&(t.stencilOp(xt,xe,ve),ue=xt,_e=xe,Be=ve)},setLocked:function(xt){nt=xt},setClear:function(xt){De!==xt&&(t.clearStencil(xt),De=xt)},reset:function(){nt=!1,De=Be=_e=ue=Yt=Ze=Te=ye=null}}},P=t.getParameter(34921),G=new Uint8Array(P),N=new Uint8Array(P),q=new Uint8Array(P),V={},ot=null,T=null,A=null,tt=null,vt=null,ft=null,at=null,Ht=null,It=null,$t=null,Xt=!1,Qt=null,re=null,me=null,Ae=null,fi=null,li=t.getParameter(35661),Ye=!1;P=0,P=t.getParameter(7938),P.indexOf("WebGL")!==-1?(P=parseFloat(/^WebGL ([0-9])/.exec(P)[1]),Ye=1<=P):P.indexOf("OpenGL ES")!==-1&&(P=parseFloat(/^OpenGL ES ([0-9])/.exec(P)[1]),Ye=2<=P);var pi=null,ti={},Mi=new Y,qt=new Y,ge={};return ge[3553]=r(3553,3553,1),ge[34067]=r(34067,34069,6),g.setClear(0,0,0,1),x.setClear(1),S.setClear(0),s(2929),x.setFunc(3),l(!1),c(1),s(2884),h(0),{buffers:{color:g,depth:x,stencil:S},initAttributes:function(){for(var nt=0,ye=G.length;nt<ye;nt++)G[nt]=0},enableAttribute:function(nt){o(nt,0)},enableAttributeAndDivisor:o,disableUnusedAttributes:function(){for(var nt=0,ye=N.length;nt!==ye;++nt)N[nt]!==G[nt]&&(t.disableVertexAttribArray(nt),N[nt]=0)},enable:s,disable:a,getCompressedTextureFormats:function(){if(ot===null&&(ot=[],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 nt=t.getParameter(34467),ye=0;ye<nt.length;ye++)ot.push(nt[ye]);return ot},useProgram:function(nt){return T!==nt?(t.useProgram(nt),T=nt,!0):!1},setBlending:h,setMaterial:function(nt,ye){nt.side===2?a(2884):s(2884);var Te=nt.side===1;ye&&(Te=!Te),l(Te),nt.blending===1&&nt.transparent===!1?h(0):h(nt.blending,nt.blendEquation,nt.blendSrc,nt.blendDst,nt.blendEquationAlpha,nt.blendSrcAlpha,nt.blendDstAlpha,nt.premultipliedAlpha),x.setFunc(nt.depthFunc),x.setTest(nt.depthTest),x.setMask(nt.depthWrite),g.setMask(nt.colorWrite),u(nt.polygonOffset,nt.polygonOffsetFactor,nt.polygonOffsetUnits)},setFlipSided:l,setCullFace:c,setLineWidth:function(nt){nt!==me&&(Ye&&t.lineWidth(nt),me=nt)},setPolygonOffset:u,setScissorTest:function(nt){nt?s(3089):a(3089)},activeTexture:d,bindTexture:function(nt,ye){pi===null&&d();var Te=ti[pi];Te===void 0&&(Te={type:void 0,texture:void 0},ti[pi]=Te),(Te.type!==nt||Te.texture!==ye)&&(t.bindTexture(nt,ye||ge[nt]),Te.type=nt,Te.texture=ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},scissor:function(nt){Mi.equals(nt)===!1&&(t.scissor(nt.x,nt.y,nt.z,nt.w),Mi.copy(nt))},viewport:function(nt){qt.equals(nt)===!1&&(t.viewport(nt.x,nt.y,nt.z,nt.w),qt.copy(nt))},reset:function(){for(var nt=0;nt<N.length;nt++)N[nt]===1&&(t.disableVertexAttribArray(nt),N[nt]=0);V={},pi=ot=null,ti={},re=Qt=tt=T=null,g.reset(),x.reset(),S.reset()}}}function oe(t,e,i,n,r,o,s){function a(T,A){if(T.width>A||T.height>A){if("data"in T){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+T.width+"x"+T.height+").");return}A/=Math.max(T.width,T.height);var tt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return tt.width=Math.floor(T.width*A),tt.height=Math.floor(T.height*A),tt.getContext("2d").drawImage(T,0,0,T.width,T.height,0,0,tt.width,tt.height),console.warn("THREE.WebGLRenderer: image is too big ("+T.width+"x"+T.height+"). Resized to "+tt.width+"x"+tt.height),tt}return T}function h(T){return Ee.isPowerOfTwo(T.width)&&Ee.isPowerOfTwo(T.height)}function l(T,A){return T.generateMipmaps&&A&&T.minFilter!==1003&&T.minFilter!==1006}function c(T,A,tt,vt){t.generateMipmap(T),n.get(A).__maxMipLevel=Math.log(Math.max(tt,vt))*Math.LOG2E}function u(T,A){if(!r.isWebGL2)return T;if(T===6403){if(A===5126)return 33326;if(A===5131)return 33325;if(A===5121)return 33321}if(T===6407){if(A===5126)return 34837;if(A===5131)return 34843;if(A===5121)return 32849}if(T===6408){if(A===5126)return 34836;if(A===5131)return 34842;if(A===5121)return 32856}return T}function d(T){return T===1003||T===1004||T===1005?9728:9729}function g(T){T=T.target,T.removeEventListener("dispose",g);t:{var A=n.get(T);if(T.image&&A.__image__webglTextureCube)t.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)break t;t.deleteTexture(A.__webglTexture)}n.remove(T)}T.isVideoTexture&&delete V[T.id],s.memory.textures--}function x(T){T=T.target,T.removeEventListener("dispose",x);var A=n.get(T),tt=n.get(T.texture);if(T){if(tt.__webglTexture!==void 0&&t.deleteTexture(tt.__webglTexture),T.depthTexture&&T.depthTexture.dispose(),T.isWebGLRenderTargetCube)for(tt=0;6>tt;tt++)t.deleteFramebuffer(A.__webglFramebuffer[tt]),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer[tt]);else t.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer);n.remove(T.texture),n.remove(T)}s.memory.textures--}function S(T,A){var tt=n.get(T);if(T.isVideoTexture){var vt=T.id,ft=s.render.frame;V[vt]!==ft&&(V[vt]=ft,T.update())}if(0<T.version&&tt.__version!==T.version)if(vt=T.image,vt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(vt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{G(tt,T,A);return}i.activeTexture(33984+A),i.bindTexture(3553,tt.__webglTexture)}function P(T,A,tt){tt?(t.texParameteri(T,10242,o.convert(A.wrapS)),t.texParameteri(T,10243,o.convert(A.wrapT)),t.texParameteri(T,10240,o.convert(A.magFilter)),t.texParameteri(T,10241,o.convert(A.minFilter))):(t.texParameteri(T,10242,33071),t.texParameteri(T,10243,33071),A.wrapS===1001&&A.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(T,10240,d(A.magFilter)),t.texParameteri(T,10241,d(A.minFilter)),A.minFilter!==1003&&A.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(tt=e.get("EXT_texture_filter_anisotropic"))||A.type===1015&&e.get("OES_texture_float_linear")===null||A.type===1016&&(r.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<A.anisotropy||n.get(A).__currentAnisotropy)||(t.texParameterf(T,tt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}function G(T,A,tt){var vt=A.isDataTexture3D?32879:3553;T.__webglInit===void 0&&(T.__webglInit=!0,A.addEventListener("dispose",g),T.__webglTexture=t.createTexture(),s.memory.textures++),i.activeTexture(33984+tt),i.bindTexture(vt,T.__webglTexture),t.pixelStorei(37440,A.flipY),t.pixelStorei(37441,A.premultiplyAlpha),t.pixelStorei(3317,A.unpackAlignment),tt=a(A.image,r.maxTextureSize);var ft=r.isWebGL2?!1:A.wrapS!==1001||A.wrapT!==1001||A.minFilter!==1003&&A.minFilter!==1006;ft&&h(tt)===!1&&(tt instanceof HTMLImageElement||tt instanceof HTMLCanvasElement||tt instanceof ImageBitmap)&&(ot===void 0&&(ot=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ot.width=Ee.floorPowerOfTwo(tt.width),ot.height=Ee.floorPowerOfTwo(tt.height),ot.getContext("2d").drawImage(tt,0,0,ot.width,ot.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+tt.width+"x"+tt.height+"). Resized to "+ot.width+"x"+ot.height),tt=ot),ft=h(tt);var at=o.convert(A.format),Ht=o.convert(A.type),It=u(at,Ht);P(vt,A,ft);var $t=A.mipmaps;if(A.isDepthTexture){if(It=6402,A.type===1015){if(!r.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");It=36012}else r.isWebGL2&&(It=33189);A.format===1026&&It===6402&&A.type!==1012&&A.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=1012,Ht=o.convert(A.type)),A.format===1027&&(It=34041,A.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=1020,Ht=o.convert(A.type))),i.texImage2D(3553,0,It,tt.width,tt.height,0,at,Ht,null)}else if(A.isDataTexture)if(0<$t.length&&ft){for(var Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],i.texImage2D(3553,Xt,It,vt.width,vt.height,0,at,Ht,vt.data);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,tt.width,tt.height,0,at,Ht,tt.data),T.__maxMipLevel=0;else if(A.isCompressedTexture){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],A.format!==1023&&A.format!==1022?-1<i.getCompressedTextureFormats().indexOf(at)?i.compressedTexImage2D(3553,Xt,It,vt.width,vt.height,0,vt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,Xt,It,vt.width,vt.height,0,at,Ht,vt.data);T.__maxMipLevel=$t.length-1}else if(A.isDataTexture3D)i.texImage3D(32879,0,It,tt.width,tt.height,tt.depth,0,at,Ht,tt.data),T.__maxMipLevel=0;else if(0<$t.length&&ft){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],i.texImage2D(3553,Xt,It,at,Ht,vt);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,at,Ht,tt),T.__maxMipLevel=0;l(A,ft)&&c(3553,A,tt.width,tt.height),T.__version=A.version,A.onUpdate&&A.onUpdate(A)}function N(T,A,tt,vt){var ft=o.convert(A.texture.format),at=o.convert(A.texture.type),Ht=u(ft,at);i.texImage2D(vt,0,Ht,A.width,A.height,0,ft,at,null),t.bindFramebuffer(36160,T),t.framebufferTexture2D(36160,tt,vt,n.get(A.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function q(T,A){t.bindRenderbuffer(36161,T),A.depthBuffer&&!A.stencilBuffer?(t.renderbufferStorage(36161,33189,A.width,A.height),t.framebufferRenderbuffer(36160,36096,36161,T)):A.depthBuffer&&A.stencilBuffer?(t.renderbufferStorage(36161,34041,A.width,A.height),t.framebufferRenderbuffer(36160,33306,36161,T)):t.renderbufferStorage(36161,32854,A.width,A.height),t.bindRenderbuffer(36161,null)}var V={},ot;this.setTexture2D=S,this.setTexture3D=function(T,A){var tt=n.get(T);0<T.version&&tt.__version!==T.version?G(tt,T,A):(i.activeTexture(33984+A),i.bindTexture(32879,tt.__webglTexture))},this.setTextureCube=function(T,A){var tt=n.get(T);if(T.image.length===6)if(0<T.version&&tt.__version!==T.version){tt.__image__webglTextureCube||(T.addEventListener("dispose",g),tt.__image__webglTextureCube=t.createTexture(),s.memory.textures++),i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube),t.pixelStorei(37440,T.flipY),A=T&&T.isCompressedTexture;for(var vt=T.image[0]&&T.image[0].isDataTexture,ft=[],at=0;6>at;at++)ft[at]=A||vt?vt?T.image[at].image:T.image[at]:a(T.image[at],r.maxCubemapSize);var Ht=ft[0],It=h(Ht),$t=o.convert(T.format),Xt=o.convert(T.type),Qt=u($t,Xt);for(P(34067,T,It),at=0;6>at;at++)if(A)for(var re,me=ft[at].mipmaps,Ae=0,fi=me.length;Ae<fi;Ae++)re=me[Ae],T.format!==1023&&T.format!==1022?-1<i.getCompressedTextureFormats().indexOf($t)?i.compressedTexImage2D(34069+at,Ae,Qt,re.width,re.height,0,re.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+at,Ae,Qt,re.width,re.height,0,$t,Xt,re.data);else vt?i.texImage2D(34069+at,0,Qt,ft[at].width,ft[at].height,0,$t,Xt,ft[at].data):i.texImage2D(34069+at,0,Qt,$t,Xt,ft[at]);tt.__maxMipLevel=A?me.length-1:0,l(T,It)&&c(34067,T,Ht.width,Ht.height),tt.__version=T.version,T.onUpdate&&T.onUpdate(T)}else i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube)},this.setTextureCubeDynamic=function(T,A){i.activeTexture(33984+A),i.bindTexture(34067,n.get(T).__webglTexture)},this.setupRenderTarget=function(T){var A=n.get(T),tt=n.get(T.texture);T.addEventListener("dispose",x),tt.__webglTexture=t.createTexture(),s.memory.textures++;var vt=T.isWebGLRenderTargetCube===!0,ft=h(T);if(vt){A.__webglFramebuffer=[];for(var at=0;6>at;at++)A.__webglFramebuffer[at]=t.createFramebuffer()}else A.__webglFramebuffer=t.createFramebuffer();if(vt){for(i.bindTexture(34067,tt.__webglTexture),P(34067,T.texture,ft),at=0;6>at;at++)N(A.__webglFramebuffer[at],T,36064,34069+at);l(T.texture,ft)&&c(34067,T.texture,T.width,T.height),i.bindTexture(34067,null)}else i.bindTexture(3553,tt.__webglTexture),P(3553,T.texture,ft),N(A.__webglFramebuffer,T,36064,3553),l(T.texture,ft)&&c(3553,T.texture,T.width,T.height),i.bindTexture(3553,null);if(T.depthBuffer){if(A=n.get(T),tt=T.isWebGLRenderTargetCube===!0,T.depthTexture){if(tt)throw Error("target.depthTexture not supported in Cube render targets");if(T&&T.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,A.__webglFramebuffer),!T.depthTexture||!T.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(T.depthTexture).__webglTexture&&T.depthTexture.image.width===T.width&&T.depthTexture.image.height===T.height||(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),S(T.depthTexture,0),A=n.get(T.depthTexture).__webglTexture,T.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,A,0);else if(T.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,A,0);else throw Error("Unknown depthTexture format")}else if(tt)for(A.__webglDepthbuffer=[],tt=0;6>tt;tt++)t.bindFramebuffer(36160,A.__webglFramebuffer[tt]),A.__webglDepthbuffer[tt]=t.createRenderbuffer(),q(A.__webglDepthbuffer[tt],T);else t.bindFramebuffer(36160,A.__webglFramebuffer),A.__webglDepthbuffer=t.createRenderbuffer(),q(A.__webglDepthbuffer,T);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(T){var A=T.texture,tt=h(T);if(l(A,tt)){tt=T.isWebGLRenderTargetCube?34067:3553;var vt=n.get(A).__webglTexture;i.bindTexture(tt,vt),c(tt,A,T.width,T.height),i.bindTexture(tt,null)}}}function ne(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var r=e.get("OES_texture_half_float");if(r!==null)return r.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null)){if(n===33776)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null)){if(n===35840)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(r=e.get("WEBGL_compressed_texture_etc1"),r!==null))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(r=e.get("WEBGL_compressed_texture_astc"),r!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(r=e.get("EXT_blend_minmax"),r!==null){if(n===103)return r.MIN_EXT;if(n===104)return r.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(r=e.get("WEBGL_depth_texture"),r!==null)return r.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Pe(){b.call(this),this.type="Group"}function Kt(){b.call(this),this.type="Camera",this.matrixWorldInverse=new mt,this.projectionMatrix=new mt,this.projectionMatrixInverse=new mt}function Bt(t,e,i,n){Kt.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function te(t){Bt.call(this),this.cameras=t||[]}function bt(t,e,i){_a.setFromMatrixPosition(e.matrixWorld),xa.setFromMatrixPosition(i.matrixWorld);var n=_a.distanceTo(xa),r=e.projectionMatrix.elements,o=i.projectionMatrix.elements,s=r[14]/(r[10]-1);i=r[14]/(r[10]+1);var a=(r[9]+1)/r[5],h=(r[9]-1)/r[5],l=(r[8]-1)/r[0],c=(o[8]+1)/o[0];r=s*l,o=s*c,c=n/(-l+c),l=c*-l,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(l),t.translateZ(c),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=s+c,s=i+c,t.projectionMatrix.makePerspective(r-l,o+(n-l),a*i/s*e,h*i/s*e,e,s)}function Le(t){function e(){return r!==null&&r.isPresenting===!0}function i(){if(e()){var T=r.getEyeParameters("left"),A=T.renderWidth*c;T=T.renderHeight*c,q=t.getPixelRatio(),N=t.getSize(),t.setDrawingBufferSize(2*A,T,1),ot.start()}else n.enabled&&t.setDrawingBufferSize(N.width,N.height,q),ot.stop()}var n=this,r=null,o=null,s=null,a=[],h=new mt,l=new mt,c=1,u="stage";typeof window<"u"&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var d=new mt,g=new ht,x=new M,S=new Bt;S.bounds=new Y(0,0,.5,1),S.layers.enable(1);var P=new Bt;P.bounds=new Y(.5,0,.5,1),P.layers.enable(2);var G=new te([S,P]);G.layers.enable(1),G.layers.enable(2);var N,q,V=[];this.enabled=!1,this.getController=function(T){var A=a[T];return A===void 0&&(A=new Pe,A.matrixAutoUpdate=!1,A.visible=!1,a[T]=A),A},this.getDevice=function(){return r},this.setDevice=function(T){T!==void 0&&(r=T),ot.setContext(T)},this.setFramebufferScaleFactor=function(T){c=T},this.setFrameOfReferenceType=function(T){u=T},this.setPoseTarget=function(T){T!==void 0&&(s=T)},this.getCamera=function(T){var A=u==="stage"?1.6:0;if(r===null)return T.position.set(0,A,0),T;if(r.depthNear=T.near,r.depthFar=T.far,r.getFrameData(o),u==="stage"){var tt=r.stageParameters;tt?h.fromArray(tt.sittingToStandingTransform):h.makeTranslation(0,A,0)}if(A=o.pose,tt=s!==null?s:T,tt.matrix.copy(h),tt.matrix.decompose(tt.position,tt.quaternion,tt.scale),A.orientation!==null&&(g.fromArray(A.orientation),tt.quaternion.multiply(g)),A.position!==null&&(g.setFromRotationMatrix(h),x.fromArray(A.position),x.applyQuaternion(g),tt.position.add(x)),tt.updateMatrixWorld(),r.isPresenting===!1)return T;S.near=T.near,P.near=T.near,S.far=T.far,P.far=T.far,S.matrixWorldInverse.fromArray(o.leftViewMatrix),P.matrixWorldInverse.fromArray(o.rightViewMatrix),l.getInverse(h),u==="stage"&&(S.matrixWorldInverse.multiply(l),P.matrixWorldInverse.multiply(l)),T=tt.parent,T!==null&&(d.getInverse(T.matrixWorld),S.matrixWorldInverse.multiply(d),P.matrixWorldInverse.multiply(d)),S.matrixWorld.getInverse(S.matrixWorldInverse),P.matrixWorld.getInverse(P.matrixWorldInverse),S.projectionMatrix.fromArray(o.leftProjectionMatrix),P.projectionMatrix.fromArray(o.rightProjectionMatrix),bt(G,S,P),T=r.getLayers(),T.length&&(T=T[0],T.leftBounds!==null&&T.leftBounds.length===4&&S.bounds.fromArray(T.leftBounds),T.rightBounds!==null&&T.rightBounds.length===4&&P.bounds.fromArray(T.rightBounds));t:for(T=0;T<a.length;T++){A=a[T];e:{tt=T;for(var vt=navigator.getGamepads&&navigator.getGamepads(),ft=0,at=0,Ht=vt.length;ft<Ht;ft++){var It=vt[ft];if(It&&(It.id==="Daydream Controller"||It.id==="Gear VR Controller"||It.id==="Oculus Go Controller"||It.id==="OpenVR Gamepad"||It.id.startsWith("Oculus Touch")||It.id.startsWith("Spatial Controller"))){if(at===tt){tt=It;break e}at++}}tt=void 0}if(tt!==void 0&&tt.pose!==void 0){if(tt.pose===null)break t;vt=tt.pose,vt.hasPosition===!1&&A.position.set(.2,-.6,-.05),vt.position!==null&&A.position.fromArray(vt.position),vt.orientation!==null&&A.quaternion.fromArray(vt.orientation),A.matrix.compose(A.position,A.quaternion,A.scale),A.matrix.premultiply(h),A.matrix.decompose(A.position,A.quaternion,A.scale),A.matrixWorldNeedsUpdate=!0,A.visible=!0,vt=tt.id==="Daydream Controller"?0:1,V[T]!==tt.buttons[vt].pressed&&(V[T]=tt.buttons[vt].pressed,V[T]===!0?A.dispatchEvent({type:"selectstart"}):(A.dispatchEvent({type:"selectend"}),A.dispatchEvent({type:"select"})))}else A.visible=!1}return G},this.getStandingMatrix=function(){return h},this.isPresenting=e;var ot=new m;this.setAnimationLoop=function(T){ot.setAnimationLoop(T)},this.submitFrame=function(){e()&&r.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Zt(t){function e(){return a!==null&&l!==null}function i(q){var V=d[g.indexOf(q.inputSource)];V&&V.dispatchEvent({type:q.type})}function n(){t.setFramebuffer(null),N.stop()}function r(q,V){V===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(V.matrixWorld,q.matrix),q.matrixWorldInverse.getInverse(q.matrixWorld)}var o=t.context,s=null,a=null,h=1,l=null,c="stage",u=null,d=[],g=[],x=new Bt;x.layers.enable(1),x.viewport=new Y;var S=new Bt;S.layers.enable(2),S.viewport=new Y;var P=new te([x,S]);P.layers.enable(1),P.layers.enable(2),this.enabled=!1,this.getController=function(q){var V=d[q];return V===void 0&&(V=new Pe,V.matrixAutoUpdate=!1,V.visible=!1,d[q]=V),V},this.getDevice=function(){return s},this.setDevice=function(q){q!==void 0&&(s=q),q instanceof XRDevice&&o.setCompatibleXRDevice(q)},this.setFramebufferScaleFactor=function(q){h=q},this.setFrameOfReferenceType=function(q){c=q},this.setSession=function(q){a=q,a!==null&&(a.addEventListener("select",i),a.addEventListener("selectstart",i),a.addEventListener("selectend",i),a.addEventListener("end",n),a.baseLayer=new XRWebGLLayer(a,o,{framebufferScaleFactor:h}),a.requestFrameOfReference(c).then(function(V){l=V,t.setFramebuffer(a.baseLayer.framebuffer),N.setContext(a),N.start()}),g=a.getInputSources(),a.addEventListener("inputsourceschange",function(){g=a.getInputSources(),console.log(g);for(var V=0;V<d.length;V++)d[V].userData.inputSource=g[V]}))},this.getCamera=function(q){if(e()){var V=q.parent,ot=P.cameras;r(P,V);for(var T=0;T<ot.length;T++)r(ot[T],V);for(q.matrixWorld.copy(P.matrixWorld),q=q.children,T=0,V=q.length;T<V;T++)q[T].updateMatrixWorld(!0);return bt(P,x,S),P}return q},this.isPresenting=e;var G=null,N=new m;N.setAnimationLoop(function(q,V){if(u=V.getDevicePose(l),u!==null)for(var ot=a.baseLayer,T=V.views,A=0;A<T.length;A++){var tt=T[A],vt=ot.getViewport(tt),ft=u.getViewMatrix(tt),at=P.cameras[A];at.matrix.fromArray(ft).getInverse(at.matrix),at.projectionMatrix.fromArray(tt.projectionMatrix),at.viewport.set(vt.x,vt.y,vt.width,vt.height),A===0&&P.matrix.copy(at.matrix)}for(A=0;A<d.length;A++){if(ot=d[A],(T=g[A])&&(T=V.getInputPose(T,l),T!==null)){"targetRay"in T?ot.matrix.elements=T.targetRay.transformMatrix:"pointerMatrix"in T&&(ot.matrix.elements=T.pointerMatrix),ot.matrix.decompose(ot.position,ot.rotation,ot.scale),ot.visible=!0;continue}ot.visible=!1}G&&G(q)}),this.setAnimationLoop=function(q){G=q},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Ft(t){var e;function i(){xe=new en(xt),ve=new ji(xt,xe,t),ve.isWebGL2||(xe.get("WEBGL_depth_texture"),xe.get("OES_texture_float"),xe.get("OES_texture_half_float"),xe.get("OES_texture_half_float_linear"),xe.get("OES_standard_derivatives"),xe.get("OES_element_index_uint"),xe.get("ANGLE_instanced_arrays")),xe.get("OES_texture_float_linear"),dn=new ne(xt,xe,ve),we=new Et(xt,xe,dn,ve),we.scissor(Ye.copy(ye).multiplyScalar(ge)),we.viewport(li.copy(nt).multiplyScalar(ge)),Bi=new Si,mi=new L,Ln=new oe(xt,xe,we,mi,ve,dn,Bi),Jo=new f(xt),Bs=new ci(xt,Jo,Bi),br=new Ci(Bs,Bi),Ea=new nn(xt),Jn=new R(at,xe,ve),Qo=new Q,Or=new Mt,Rn=new Mn(at,we,br,T),Pa=new Cn(xt,xe,Bi,ve),Aa=new Oe(xt,xe,Bi,ve),Bi.programs=Jn.programs,at.context=xt,at.capabilities=ve,at.extensions=xe,at.properties=mi,at.renderLists=Qo,at.state=we,at.info=Bi}function n(I){I.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Ht=!0}function r(){console.log("THREE.WebGLRenderer: Context Restored."),Ht=!1,i()}function o(I){I=I.target,I.removeEventListener("dispose",o),s(I),mi.remove(I)}function s(I){var k=mi.get(I).program;I.program=void 0,k!==void 0&&Jn.releaseProgram(k)}function a(I,k){I.render(function(z){at.renderBufferImmediate(z,k)})}function h(I,k,z){if(I.visible!==!1){if(I.layers.test(k.layers)){if(I.isLight)ft.pushLight(I),I.castShadow&&ft.pushShadow(I);else if(I.isSprite){if(!I.frustumCulled||Ze.intersectsSprite(I)){z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be);var Wt=br.update(I),ee=I.material;vt.push(I,Wt,ee,De.z,null)}}else if(I.isImmediateRenderObject)z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),vt.push(I,null,I.material,De.z,null);else if((I.isMesh||I.isLine||I.isPoints)&&(I.isSkinnedMesh&&I.skeleton.update(),!I.frustumCulled||Ze.intersectsObject(I)))if(z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),Wt=br.update(I),ee=I.material,Array.isArray(ee))for(var ce=Wt.groups,Vt=0,de=ce.length;Vt<de;Vt++){var Ue=ce[Vt],ni=ee[Ue.materialIndex];ni&&ni.visible&&vt.push(I,Wt,ni,De.z,Ue)}else ee.visible&&vt.push(I,Wt,ee,De.z,null)}for(I=I.children,Vt=0,de=I.length;Vt<de;Vt++)h(I[Vt],k,z)}}function l(I,k,z,Wt){for(var ee=0,ce=I.length;ee<ce;ee++){var Vt=I[ee],de=Vt.object,Ue=Vt.geometry,ni=Wt===void 0?Vt.material:Wt;if(Vt=Vt.group,z.isArrayCamera){fi=z;for(var zt=z.cameras,mn=0,Li=zt.length;mn<Li;mn++){var di=zt[mn];if(de.layers.test(di.layers)){if("viewport"in di)we.viewport(li.copy(di.viewport));else{var Ui=di.bounds;we.viewport(li.set(Ui.x*Mi,Ui.y*qt,Ui.z*Mi,Ui.w*qt).multiplyScalar(ge))}ft.setupLights(di),c(de,k,di,Ue,ni,Vt)}}}else fi=null,c(de,k,z,Ue,ni,Vt)}}function c(I,k,z,Wt,ee,ce){if(I.onBeforeRender(at,k,z,Wt,ee,ce),ft=Or.get(k,fi||z),I.modelViewMatrix.multiplyMatrices(z.matrixWorldInverse,I.matrixWorld),I.normalMatrix.getNormalMatrix(I.modelViewMatrix),I.isImmediateRenderObject){we.setMaterial(ee);var Vt=d(z,k.fog,ee,I);re=e=null,me=!1,a(I,Vt)}else at.renderBufferDirect(z,k.fog,Wt,ee,I,ce);I.onAfterRender(at,k,z,Wt,ee,ce),ft=Or.get(k,fi||z)}function u(I,k,z){var Wt=mi.get(I),ee=ft.state.lights,ce=Wt.lightsHash,Vt=ee.state.hash;z=Jn.getParameters(I,ee.state,ft.state.shadowsArray,k,Yt.numPlanes,Yt.numIntersection,z);var de=Jn.getProgramCode(I,z),Ue=Wt.program,ni=!0;if(Ue===void 0)I.addEventListener("dispose",o);else if(Ue.code!==de)s(I);else{if(ce.stateID!==Vt.stateID||ce.directionalLength!==Vt.directionalLength||ce.pointLength!==Vt.pointLength||ce.spotLength!==Vt.spotLength||ce.rectAreaLength!==Vt.rectAreaLength||ce.hemiLength!==Vt.hemiLength||ce.shadowsLength!==Vt.shadowsLength)ce.stateID=Vt.stateID,ce.directionalLength=Vt.directionalLength,ce.pointLength=Vt.pointLength,ce.spotLength=Vt.spotLength,ce.rectAreaLength=Vt.rectAreaLength,ce.hemiLength=Vt.hemiLength,ce.shadowsLength=Vt.shadowsLength;else if(z.shaderID!==void 0)return;ni=!1}if(ni&&(z.shaderID?(de=pn[z.shaderID],Wt.shader={name:I.type,uniforms:_i.clone(de.uniforms),vertexShader:de.vertexShader,fragmentShader:de.fragmentShader}):Wt.shader={name:I.type,uniforms:I.uniforms,vertexShader:I.vertexShader,fragmentShader:I.fragmentShader},I.onBeforeCompile(Wt.shader,at),de=Jn.getProgramCode(I,z),Ue=Jn.acquireProgram(I,Wt.shader,z,de),Wt.program=Ue,I.program=Ue),z=Ue.getAttributes(),I.morphTargets)for(de=I.numSupportedMorphTargets=0;de<at.maxMorphTargets;de++)0<=z["morphTarget"+de]&&I.numSupportedMorphTargets++;if(I.morphNormals)for(de=I.numSupportedMorphNormals=0;de<at.maxMorphNormals;de++)0<=z["morphNormal"+de]&&I.numSupportedMorphNormals++;z=Wt.shader.uniforms,(!I.isShaderMaterial&&!I.isRawShaderMaterial||I.clipping===!0)&&(Wt.numClippingPlanes=Yt.numPlanes,Wt.numIntersection=Yt.numIntersection,z.clippingPlanes=Yt.uniform),Wt.fog=k,ce===void 0&&(Wt.lightsHash=ce={}),ce.stateID=Vt.stateID,ce.directionalLength=Vt.directionalLength,ce.pointLength=Vt.pointLength,ce.spotLength=Vt.spotLength,ce.rectAreaLength=Vt.rectAreaLength,ce.hemiLength=Vt.hemiLength,ce.shadowsLength=Vt.shadowsLength,I.lights&&(z.ambientLightColor.value=ee.state.ambient,z.directionalLights.value=ee.state.directional,z.spotLights.value=ee.state.spot,z.rectAreaLights.value=ee.state.rectArea,z.pointLights.value=ee.state.point,z.hemisphereLights.value=ee.state.hemi,z.directionalShadowMap.value=ee.state.directionalShadowMap,z.directionalShadowMatrix.value=ee.state.directionalShadowMatrix,z.spotShadowMap.value=ee.state.spotShadowMap,z.spotShadowMatrix.value=ee.state.spotShadowMatrix,z.pointShadowMap.value=ee.state.pointShadowMap,z.pointShadowMatrix.value=ee.state.pointShadowMatrix),I=Wt.program.getUniforms(),I=on.seqWithValue(I.seq,z),Wt.uniformsList=I}function d(I,k,z,Wt){ti=0;var ee=mi.get(z),ce=ee.lightsHash,Vt=ft.state.lights.state.hash;ue&&(_e||I!==Ae)&&Yt.setState(z.clippingPlanes,z.clipIntersection,z.clipShadows,I,ee,I===Ae&&z.id===Qt),z.needsUpdate===!1&&(ee.program===void 0||z.fog&&ee.fog!==k?z.needsUpdate=!0:(!z.lights||ce.stateID===Vt.stateID&&ce.directionalLength===Vt.directionalLength&&ce.pointLength===Vt.pointLength&&ce.spotLength===Vt.spotLength&&ce.rectAreaLength===Vt.rectAreaLength&&ce.hemiLength===Vt.hemiLength&&ce.shadowsLength===Vt.shadowsLength)&&(ee.numClippingPlanes===void 0||ee.numClippingPlanes===Yt.numPlanes&&ee.numIntersection===Yt.numIntersection)||(z.needsUpdate=!0)),z.needsUpdate&&(u(z,k,Wt),z.needsUpdate=!1);var de=!1,Ue=!1,ni=!1;ce=ee.program,Vt=ce.getUniforms();var zt=ee.shader.uniforms;if(we.useProgram(ce.program)&&(ni=Ue=de=!0),z.id!==Qt&&(Qt=z.id,Ue=!0),(de||Ae!==I)&&(Vt.setValue(xt,"projectionMatrix",I.projectionMatrix),ve.logarithmicDepthBuffer&&Vt.setValue(xt,"logDepthBufFC",2/(Math.log(I.far+1)/Math.LN2)),Ae!==I&&(Ae=I,ni=Ue=!0),(z.isShaderMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.envMap)&&(de=Vt.map.cameraPosition,de!==void 0&&de.setValue(xt,De.setFromMatrixPosition(I.matrixWorld))),(z.isMeshPhongMaterial||z.isMeshLambertMaterial||z.isMeshBasicMaterial||z.isMeshStandardMaterial||z.isShaderMaterial||z.skinning)&&Vt.setValue(xt,"viewMatrix",I.matrixWorldInverse)),z.skinning&&(Vt.setOptional(xt,Wt,"bindMatrix"),Vt.setOptional(xt,Wt,"bindMatrixInverse"),I=Wt.skeleton))if(de=I.bones,ve.floatVertexTextures){if(I.boneTexture===void 0){de=Math.sqrt(4*de.length),de=Ee.ceilPowerOfTwo(de),de=Math.max(de,4);var mn=new Float32Array(de*de*4);mn.set(I.boneMatrices);var Li=new ut(mn,de,de,1023,1015);Li.needsUpdate=!0,I.boneMatrices=mn,I.boneTexture=Li,I.boneTextureSize=de}Vt.setValue(xt,"boneTexture",I.boneTexture),Vt.setValue(xt,"boneTextureSize",I.boneTextureSize)}else Vt.setOptional(xt,I,"boneMatrices");return Ue&&(Vt.setValue(xt,"toneMappingExposure",at.toneMappingExposure),Vt.setValue(xt,"toneMappingWhitePoint",at.toneMappingWhitePoint),z.lights&&(Ue=ni,zt.ambientLightColor.needsUpdate=Ue,zt.directionalLights.needsUpdate=Ue,zt.pointLights.needsUpdate=Ue,zt.spotLights.needsUpdate=Ue,zt.rectAreaLights.needsUpdate=Ue,zt.hemisphereLights.needsUpdate=Ue),k&&z.fog&&(zt.fogColor.value=k.color,k.isFog?(zt.fogNear.value=k.near,zt.fogFar.value=k.far):k.isFogExp2&&(zt.fogDensity.value=k.density)),z.isMeshBasicMaterial?g(zt,z):z.isMeshLambertMaterial?(g(zt,z),z.emissiveMap&&(zt.emissiveMap.value=z.emissiveMap)):z.isMeshPhongMaterial?(g(zt,z),z.isMeshToonMaterial?(x(zt,z),z.gradientMap&&(zt.gradientMap.value=z.gradientMap)):x(zt,z)):z.isMeshStandardMaterial?(g(zt,z),z.isMeshPhysicalMaterial?(S(zt,z),zt.reflectivity.value=z.reflectivity,zt.clearCoat.value=z.clearCoat,zt.clearCoatRoughness.value=z.clearCoatRoughness):S(zt,z)):z.isMeshMatcapMaterial?(g(zt,z),z.matcap&&(zt.matcap.value=z.matcap),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDepthMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDistanceMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias),zt.referencePosition.value.copy(z.referencePosition),zt.nearDistance.value=z.nearDistance,zt.farDistance.value=z.farDistance):z.isMeshNormalMaterial?(g(zt,z),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isLineBasicMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,z.isLineDashedMaterial&&(zt.dashSize.value=z.dashSize,zt.totalSize.value=z.dashSize+z.gapSize,zt.scale.value=z.scale)):z.isPointsMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.size.value=z.size*ge,zt.scale.value=.5*qt,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isSpriteMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.rotation.value=z.rotation,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isShadowMaterial&&(zt.color.value=z.color,zt.opacity.value=z.opacity),zt.ltc_1!==void 0&&(zt.ltc_1.value=le.LTC_1),zt.ltc_2!==void 0&&(zt.ltc_2.value=le.LTC_2),on.upload(xt,ee.uniformsList,zt,at)),z.isShaderMaterial&&z.uniformsNeedUpdate===!0&&(on.upload(xt,ee.uniformsList,zt,at),z.uniformsNeedUpdate=!1),z.isSpriteMaterial&&Vt.setValue(xt,"center",Wt.center),Vt.setValue(xt,"modelViewMatrix",Wt.modelViewMatrix),Vt.setValue(xt,"normalMatrix",Wt.normalMatrix),Vt.setValue(xt,"modelMatrix",Wt.matrixWorld),ce}function g(I,k){if(I.opacity.value=k.opacity,k.color&&(I.diffuse.value=k.color),k.emissive&&I.emissive.value.copy(k.emissive).multiplyScalar(k.emissiveIntensity),k.map&&(I.map.value=k.map),k.alphaMap&&(I.alphaMap.value=k.alphaMap),k.specularMap&&(I.specularMap.value=k.specularMap),k.envMap&&(I.envMap.value=k.envMap,I.flipEnvMap.value=k.envMap&&k.envMap.isCubeTexture?-1:1,I.reflectivity.value=k.reflectivity,I.refractionRatio.value=k.refractionRatio,I.maxMipLevel.value=mi.get(k.envMap).__maxMipLevel),k.lightMap&&(I.lightMap.value=k.lightMap,I.lightMapIntensity.value=k.lightMapIntensity),k.aoMap&&(I.aoMap.value=k.aoMap,I.aoMapIntensity.value=k.aoMapIntensity),k.map)var z=k.map;else k.specularMap?z=k.specularMap:k.displacementMap?z=k.displacementMap:k.normalMap?z=k.normalMap:k.bumpMap?z=k.bumpMap:k.roughnessMap?z=k.roughnessMap:k.metalnessMap?z=k.metalnessMap:k.alphaMap?z=k.alphaMap:k.emissiveMap&&(z=k.emissiveMap);z!==void 0&&(z.isWebGLRenderTarget&&(z=z.texture),z.matrixAutoUpdate===!0&&z.updateMatrix(),I.uvTransform.value.copy(z.matrix))}function x(I,k){I.specular.value=k.specular,I.shininess.value=Math.max(k.shininess,1e-4),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias)}function S(I,k){I.roughness.value=k.roughness,I.metalness.value=k.metalness,k.roughnessMap&&(I.roughnessMap.value=k.roughnessMap),k.metalnessMap&&(I.metalnessMap.value=k.metalnessMap),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias),k.envMap&&(I.envMapIntensity.value=k.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var P=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),G=t.context!==void 0?t.context:null,N=t.alpha!==void 0?t.alpha:!1,q=t.depth!==void 0?t.depth:!0,V=t.stencil!==void 0?t.stencil:!0,ot=t.antialias!==void 0?t.antialias:!1,T=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,A=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,tt=t.powerPreference!==void 0?t.powerPreference:"default",vt=null,ft=null;this.domElement=P,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var at=this,Ht=!1,It=null,$t=null,Xt=null,Qt=-1,re=e=null,me=!1,Ae=null,fi=null,li=new Y,Ye=new Y,pi=null,ti=0,Mi=P.width,qt=P.height,ge=1,nt=new Y(0,0,Mi,qt),ye=new Y(0,0,Mi,qt),Te=!1,Ze=new K,Yt=new Ii,ue=!1,_e=!1,Be=new mt,De=new M;try{N={alpha:N,depth:q,stencil:V,antialias:ot,premultipliedAlpha:T,preserveDrawingBuffer:A,powerPreference:tt},P.addEventListener("webglcontextlost",n,!1),P.addEventListener("webglcontextrestored",r,!1);var xt=G||P.getContext("webgl",N)||P.getContext("experimental-webgl",N);if(xt===null)throw P.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");xt.getShaderPrecisionFormat===void 0&&(xt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(I){console.error("THREE.WebGLRenderer: "+I.message)}var xe,ve,we,Bi,mi,Ln,Jo,Bs,br,Jn,Qo,Or,Rn,Ea,Pa,Aa,dn;i();var fn=null;typeof navigator<"u"&&(fn="xr"in navigator?new Zt(at):new Le(at)),this.vr=fn;var La=new Nt(at,br,ve.maxTextureSize);this.shadowMap=La,this.getContext=function(){return xt},this.getContextAttributes=function(){return xt.getContextAttributes()},this.forceContextLoss=function(){var I=xe.get("WEBGL_lose_context");I&&I.loseContext()},this.forceContextRestore=function(){var I=xe.get("WEBGL_lose_context");I&&I.restoreContext()},this.getPixelRatio=function(){return ge},this.setPixelRatio=function(I){I!==void 0&&(ge=I,this.setSize(Mi,qt,!1))},this.getSize=function(){return{width:Mi,height:qt}},this.setSize=function(I,k,z){fn.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Mi=I,qt=k,P.width=I*ge,P.height=k*ge,z!==!1&&(P.style.width=I+"px",P.style.height=k+"px"),this.setViewport(0,0,I,k))},this.getDrawingBufferSize=function(){return{width:Mi*ge,height:qt*ge}},this.setDrawingBufferSize=function(I,k,z){Mi=I,qt=k,ge=z,P.width=I*z,P.height=k*z,this.setViewport(0,0,I,k)},this.getCurrentViewport=function(){return li},this.setViewport=function(I,k,z,Wt){nt.set(I,qt-k-Wt,z,Wt),we.viewport(li.copy(nt).multiplyScalar(ge))},this.setScissor=function(I,k,z,Wt){ye.set(I,qt-k-Wt,z,Wt),we.scissor(Ye.copy(ye).multiplyScalar(ge))},this.setScissorTest=function(I){we.setScissorTest(Te=I)},this.getClearColor=function(){return Rn.getClearColor()},this.setClearColor=function(){Rn.setClearColor.apply(Rn,arguments)},this.getClearAlpha=function(){return Rn.getClearAlpha()},this.setClearAlpha=function(){Rn.setClearAlpha.apply(Rn,arguments)},this.clear=function(I,k,z){var Wt=0;(I===void 0||I)&&(Wt|=16384),(k===void 0||k)&&(Wt|=256),(z===void 0||z)&&(Wt|=1024),xt.clear(Wt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){P.removeEventListener("webglcontextlost",n,!1),P.removeEventListener("webglcontextrestored",r,!1),Qo.dispose(),Or.dispose(),mi.dispose(),br.dispose(),fn.dispose(),$o.stop()},this.renderBufferImmediate=function(I,k){we.initAttributes();var z=mi.get(I);I.hasPositions&&!z.position&&(z.position=xt.createBuffer()),I.hasNormals&&!z.normal&&(z.normal=xt.createBuffer()),I.hasUvs&&!z.uv&&(z.uv=xt.createBuffer()),I.hasColors&&!z.color&&(z.color=xt.createBuffer()),k=k.getAttributes(),I.hasPositions&&(xt.bindBuffer(34962,z.position),xt.bufferData(34962,I.positionArray,35048),we.enableAttribute(k.position),xt.vertexAttribPointer(k.position,3,5126,!1,0,0)),I.hasNormals&&(xt.bindBuffer(34962,z.normal),xt.bufferData(34962,I.normalArray,35048),we.enableAttribute(k.normal),xt.vertexAttribPointer(k.normal,3,5126,!1,0,0)),I.hasUvs&&(xt.bindBuffer(34962,z.uv),xt.bufferData(34962,I.uvArray,35048),we.enableAttribute(k.uv),xt.vertexAttribPointer(k.uv,2,5126,!1,0,0)),I.hasColors&&(xt.bindBuffer(34962,z.color),xt.bufferData(34962,I.colorArray,35048),we.enableAttribute(k.color),xt.vertexAttribPointer(k.color,3,5126,!1,0,0)),we.disableUnusedAttributes(),xt.drawArrays(4,0,I.count),I.count=0},this.renderBufferDirect=function(I,k,z,Wt,ee,ce){var Vt=ee.isMesh&&0>ee.normalMatrix.determinant();we.setMaterial(Wt,Vt);var de=d(I,k,Wt,ee),Ue=!1;(e!==z.id||re!==de.id||me!==(Wt.wireframe===!0))&&(e=z.id,re=de.id,me=Wt.wireframe===!0,Ue=!0),ee.morphTargetInfluences&&(Ea.update(ee,z,Wt,de),Ue=!0),Vt=z.index;var ni=z.attributes.position;if(k=1,Wt.wireframe===!0&&(Vt=Bs.getWireframeAttribute(z),k=2),I=Pa,Vt!==null){var zt=Jo.get(Vt);I=Aa,I.setIndex(zt)}if(Ue){if(z&&z.isInstancedBufferGeometry&!ve.isWebGL2&&xe.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{we.initAttributes(),Ue=z.attributes,de=de.getAttributes();var mn=Wt.defaultAttributeValues;for($n in de){var Li=de[$n];if(0<=Li){var di=Ue[$n];if(di!==void 0){var Ui=di.normalized,Ra=di.itemSize,Qn=Jo.get(di);if(Qn!==void 0){var Ca=Qn.buffer,ba=Qn.type;if(Qn=Qn.bytesPerElement,di.isInterleavedBufferAttribute){var Ir=di.data,gh=Ir.stride;di=di.offset,Ir&&Ir.isInstancedInterleavedBuffer?(we.enableAttributeAndDivisor(Li,Ir.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=Ir.meshPerAttribute*Ir.count)):we.enableAttribute(Li),xt.bindBuffer(34962,Ca),xt.vertexAttribPointer(Li,Ra,ba,Ui,gh*Qn,di*Qn)}else di.isInstancedBufferAttribute?(we.enableAttributeAndDivisor(Li,di.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=di.meshPerAttribute*di.count)):we.enableAttribute(Li),xt.bindBuffer(34962,Ca),xt.vertexAttribPointer(Li,Ra,ba,Ui,0,0)}}else if(mn!==void 0&&(Ui=mn[$n],Ui!==void 0))switch(Ui.length){case 2:xt.vertexAttrib2fv(Li,Ui);break;case 3:xt.vertexAttrib3fv(Li,Ui);break;case 4:xt.vertexAttrib4fv(Li,Ui);break;default:xt.vertexAttrib1fv(Li,Ui)}}}we.disableUnusedAttributes()}Vt!==null&&xt.bindBuffer(34963,zt.buffer)}zt=1/0,Vt!==null?zt=Vt.count:ni!==void 0&&(zt=ni.count),Vt=z.drawRange.start*k,ni=ce!==null?ce.start*k:0;var $n=Math.max(Vt,ni);if(ce=Math.max(0,Math.min(zt,Vt+z.drawRange.count*k,ni+(ce!==null?ce.count*k:1/0))-1-$n+1),ce!==0){if(ee.isMesh)if(Wt.wireframe===!0)we.setLineWidth(Wt.wireframeLinewidth*($t===null?ge:1)),I.setMode(1);else switch(ee.drawMode){case 0:I.setMode(4);break;case 1:I.setMode(5);break;case 2:I.setMode(6)}else ee.isLine?(Wt=Wt.linewidth,Wt===void 0&&(Wt=1),we.setLineWidth(Wt*($t===null?ge:1)),ee.isLineSegments?I.setMode(1):ee.isLineLoop?I.setMode(2):I.setMode(3)):ee.isPoints?I.setMode(0):ee.isSprite&&I.setMode(4);z&&z.isInstancedBufferGeometry?0<z.maxInstancedCount&&I.renderInstances(z,$n,ce):I.render($n,ce)}},this.compile=function(I,k){ft=Or.get(I,k),ft.init(),I.traverse(function(z){z.isLight&&(ft.pushLight(z),z.castShadow&&ft.pushShadow(z))}),ft.setupLights(k),I.traverse(function(z){if(z.material)if(Array.isArray(z.material))for(var Wt=0;Wt<z.material.length;Wt++)u(z.material[Wt],I.fog,z);else u(z.material,I.fog,z)})};var Us=null,$o=new m;$o.setAnimationLoop(function(I){fn.isPresenting()||Us&&Us(I)}),typeof window<"u"&&$o.setContext(window),this.setAnimationLoop=function(I){Us=I,fn.setAnimationLoop(I),$o.start()},this.render=function(I,k,z,Wt){if(!k||!k.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Ht){re=e=null,me=!1,Qt=-1,Ae=null,I.autoUpdate===!0&&I.updateMatrixWorld(),k.parent===null&&k.updateMatrixWorld(),fn.enabled&&(k=fn.getCamera(k)),ft=Or.get(I,k),ft.init(),I.onBeforeRender(at,I,k,z),Be.multiplyMatrices(k.projectionMatrix,k.matrixWorldInverse),Ze.setFromMatrix(Be),_e=this.localClippingEnabled,ue=Yt.init(this.clippingPlanes,_e,k),vt=Qo.get(I,k),vt.init(),h(I,k,at.sortObjects),at.sortObjects===!0&&vt.sort(),ue&&Yt.beginShadows(),La.render(ft.state.shadowsArray,I,k),ft.setupLights(k),ue&&Yt.endShadows(),this.info.autoReset&&this.info.reset(),z===void 0&&(z=null),this.setRenderTarget(z),Rn.render(vt,I,k,Wt),Wt=vt.opaque;var ee=vt.transparent;if(I.overrideMaterial){var ce=I.overrideMaterial;Wt.length&&l(Wt,I,k,ce),ee.length&&l(ee,I,k,ce)}else Wt.length&&l(Wt,I,k),ee.length&&l(ee,I,k);z&&Ln.updateRenderTargetMipmap(z),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1),I.onAfterRender(at,I,k),fn.enabled&&fn.submitFrame(),ft=vt=null}},this.allocTextureUnit=function(){var I=ti;return I>=ve.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+I+" texture units while this GPU supports only "+ve.maxTextures),ti+=1,I},this.setTexture2D=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTarget&&(I||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),Ln.setTexture2D(k,z)}}(),this.setTexture3D=function(){return function(I,k){Ln.setTexture3D(I,k)}}(),this.setTexture=function(){var I=!1;return function(k,z){I||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),I=!0),Ln.setTexture2D(k,z)}}(),this.setTextureCube=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTargetCube&&(I||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),k&&k.isCubeTexture||Array.isArray(k.image)&&k.image.length===6?Ln.setTextureCube(k,z):Ln.setTextureCubeDynamic(k,z)}}(),this.setFramebuffer=function(I){It=I},this.getRenderTarget=function(){return $t},this.setRenderTarget=function(I){($t=I)&&mi.get(I).__webglFramebuffer===void 0&&Ln.setupRenderTarget(I);var k=It,z=!1;I?(k=mi.get(I).__webglFramebuffer,I.isWebGLRenderTargetCube&&(k=k[I.activeCubeFace],z=!0),li.copy(I.viewport),Ye.copy(I.scissor),pi=I.scissorTest):(li.copy(nt).multiplyScalar(ge),Ye.copy(ye).multiplyScalar(ge),pi=Te),Xt!==k&&(xt.bindFramebuffer(36160,k),Xt=k),we.viewport(li),we.scissor(Ye),we.setScissorTest(pi),z&&(z=mi.get(I.texture),xt.framebufferTexture2D(36160,36064,34069+I.activeCubeFace,z.__webglTexture,I.activeMipMapLevel))},this.readRenderTargetPixels=function(I,k,z,Wt,ee,ce){if(I&&I.isWebGLRenderTarget){var Vt=mi.get(I).__webglFramebuffer;if(Vt){var de=!1;Vt!==Xt&&(xt.bindFramebuffer(36160,Vt),de=!0);try{var Ue=I.texture,ni=Ue.format,zt=Ue.type;ni!==1023&&dn.convert(ni)!==xt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):zt===1009||dn.convert(zt)===xt.getParameter(35738)||zt===1015&&(ve.isWebGL2||xe.get("OES_texture_float")||xe.get("WEBGL_color_buffer_float"))||zt===1016&&(ve.isWebGL2?xe.get("EXT_color_buffer_float"):xe.get("EXT_color_buffer_half_float"))?xt.checkFramebufferStatus(36160)===36053?0<=k&&k<=I.width-Wt&&0<=z&&z<=I.height-ee&&xt.readPixels(k,z,Wt,ee,dn.convert(ni),dn.convert(zt),ce):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{de&&xt.bindFramebuffer(36160,Xt)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(I,k,z){var Wt=k.image.width,ee=k.image.height,ce=dn.convert(k.format);this.setTexture2D(k,0),xt.copyTexImage2D(3553,z||0,ce,I.x,I.y,Wt,ee,0)},this.copyTextureToTexture=function(I,k,z,Wt){var ee=k.image.width,ce=k.image.height,Vt=dn.convert(z.format),de=dn.convert(z.type);this.setTexture2D(z,0),k.isDataTexture?xt.texSubImage2D(3553,Wt||0,I.x,I.y,ee,ce,Vt,de,k.image.data):xt.texSubImage2D(3553,Wt||0,I.x,I.y,Vt,de,k.image)}}function Jt(t,e){this.name="",this.color=new H(t),this.density=e!==void 0?e:25e-5}function yi(t,e,i){this.name="",this.color=new H(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function qi(){b.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ge(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function He(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function We(t){fe.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function ei(t){if(b.call(this),this.type="Sprite",Cr===void 0){Cr=new Rt;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new Ge(e,5),Cr.setIndex([0,1,2,0,2,3]),Cr.addAttribute("position",new He(e,3,0,!1)),Cr.addAttribute("uv",new He(e,2,3,!1))}this.geometry=Cr,this.material=t!==void 0?t:new We,this.center=new $(.5,.5)}function ii(){b.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ai(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new mt)}function hi(){b.call(this),this.type="Bone"}function ke(t,e){Ke.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new mt,this.bindMatrixInverse=new mt,t=this.initBones(),t=new ai(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ne(t){fe.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function qe(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),b.call(this),this.type="Line",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new Ne({color:16777215*Math.random()})}function Re(t,e){qe.call(this,t,e),this.type="LineSegments"}function an(t,e){qe.call(this,t,e),this.type="LineLoop"}function xi(t){fe.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function nr(t,e){b.call(this),this.type="Points",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new xi({color:16777215*Math.random()})}function os(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.generateMipmaps=!1}function rr(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ur(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.needsUpdate=!0}function Fr(t,e,i,n,r,o,s,a,h,l){if(l=l!==void 0?l:1026,l!==1026&&l!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&l===1026&&(i=1012),i===void 0&&l===1027&&(i=1020),Ct.call(this,null,n,r,o,s,a,l,i,h),this.image={width:t,height:e},this.magFilter=s!==void 0?s:1003,this.minFilter=a!==void 0?a:1003,this.generateMipmaps=this.flipY=!1}function or(t){Rt.call(this),this.type="WireframeGeometry";var e=[],i,n,r,o=[0,0],s={},a=["a","b","c"];if(t&&t.isGeometry){var h=t.faces,l=0;for(n=h.length;l<n;l++){var c=h[l];for(i=0;3>i;i++){var u=c[a[i]],d=c[a[(i+1)%3]];o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]})}}for(u in s)l=s[u],a=t.vertices[l.index1],e.push(a.x,a.y,a.z),a=t.vertices[l.index2],e.push(a.x,a.y,a.z)}else if(t&&t.isBufferGeometry)if(a=new M,t.index!==null){h=t.attributes.position,c=t.index;var g=t.groups;for(g.length===0&&(g=[{start:0,count:c.count,materialIndex:0}]),t=0,r=g.length;t<r;++t)for(l=g[t],i=l.start,n=l.count,l=i,n=i+n;l<n;l+=3)for(i=0;3>i;i++)u=c.getX(l+i),d=c.getX(l+(i+1)%3),o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]});for(u in s)l=s[u],a.fromBufferAttribute(h,l.index1),e.push(a.x,a.y,a.z),a.fromBufferAttribute(h,l.index2),e.push(a.x,a.y,a.z)}else for(h=t.attributes.position,l=0,n=h.count/3;l<n;l++)for(i=0;3>i;i++)s=3*l+i,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z),s=3*l+(i+1)%3,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z);this.addAttribute("position",new ct(e,3))}function Gr(t,e,i){F.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new sr(t,e,i)),this.mergeVertices()}function sr(t,e,i){Rt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],r=[],o=[],s=[],a=new M,h=new M,l=new M,c=new M,u=new M,d,g;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var x=e+1;for(d=0;d<=i;d++){var S=d/i;for(g=0;g<=e;g++){var P=g/e;t(P,S,h),r.push(h.x,h.y,h.z),0<=P-1e-5?(t(P-1e-5,S,l),c.subVectors(h,l)):(t(P+1e-5,S,l),c.subVectors(l,h)),0<=S-1e-5?(t(P,S-1e-5,l),u.subVectors(h,l)):(t(P,S+1e-5,l),u.subVectors(l,h)),a.crossVectors(c,u).normalize(),o.push(a.x,a.y,a.z),s.push(P,S)}}for(d=0;d<i;d++)for(g=0;g<e;g++)t=d*x+g+1,a=(d+1)*x+g+1,h=(d+1)*x+g,n.push(d*x+g,t,h),n.push(t,a,h);this.setIndex(n),this.addAttribute("position",new ct(r,3)),this.addAttribute("normal",new ct(o,3)),this.addAttribute("uv",new ct(s,2))}function Hr(t,e,i,n){F.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new Di(t,e,i,n)),this.mergeVertices()}function Di(t,e,i,n){function r(l){a.push(l.x,l.y,l.z)}function o(l,c){l*=3,c.x=t[l+0],c.y=t[l+1],c.z=t[l+2]}function s(l,c,u,d){0>d&&l.x===1&&(h[c]=l.x-1),u.x===0&&u.z===0&&(h[c]=d/2/Math.PI+.5)}Rt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var a=[],h=[];(function(l){for(var c=new M,u=new M,d=new M,g=0;g<e.length;g+=3){o(e[g+0],c),o(e[g+1],u),o(e[g+2],d);var x,S,P=c,G=u,N=d,q=Math.pow(2,l),V=[];for(S=0;S<=q;S++){V[S]=[];var ot=P.clone().lerp(N,S/q),T=G.clone().lerp(N,S/q),A=q-S;for(x=0;x<=A;x++)V[S][x]=x===0&&S===q?ot:ot.clone().lerp(T,x/A)}for(S=0;S<q;S++)for(x=0;x<2*(q-S)-1;x++)P=Math.floor(x/2),x%2===0?(r(V[S][P+1]),r(V[S+1][P]),r(V[S][P])):(r(V[S][P+1]),r(V[S+1][P+1]),r(V[S+1][P]))}})(n),function(l){for(var c=new M,u=0;u<a.length;u+=3)c.x=a[u+0],c.y=a[u+1],c.z=a[u+2],c.normalize().multiplyScalar(l),a[u+0]=c.x,a[u+1]=c.y,a[u+2]=c.z}(i),function(){for(var l=new M,c=0;c<a.length;c+=3)l.x=a[c+0],l.y=a[c+1],l.z=a[c+2],h.push(Math.atan2(l.z,-l.x)/2/Math.PI+.5,1-(Math.atan2(-l.y,Math.sqrt(l.x*l.x+l.z*l.z))/Math.PI+.5));l=new M,c=new M;for(var u=new M,d=new M,g=new $,x=new $,S=new $,P=0,G=0;P<a.length;P+=9,G+=6){l.set(a[P+0],a[P+1],a[P+2]),c.set(a[P+3],a[P+4],a[P+5]),u.set(a[P+6],a[P+7],a[P+8]),g.set(h[G+0],h[G+1]),x.set(h[G+2],h[G+3]),S.set(h[G+4],h[G+5]),d.copy(l).add(c).add(u).divideScalar(3);var N=Math.atan2(d.z,-d.x);s(g,G+0,l,N),s(x,G+2,c,N),s(S,G+4,u,N)}for(l=0;l<h.length;l+=6)c=h[l+0],u=h[l+2],d=h[l+4],g=Math.min(c,u,d),.9<Math.max(c,u,d)&&.1>g&&(.2>c&&(h[l+0]+=1),.2>u&&(h[l+2]+=1),.2>d&&(h[l+4]+=1))}(),this.addAttribute("position",new ct(a,3)),this.addAttribute("normal",new ct(a.slice(),3)),this.addAttribute("uv",new ct(h,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function kr(t,e){F.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ar(t,e)),this.mergeVertices()}function ar(t,e){Di.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 Vr(t,e){F.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Dn(t,e)),this.mergeVertices()}function Dn(t,e){Di.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 jr(t,e){F.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new hr(t,e)),this.mergeVertices()}function hr(t,e){var i=(1+Math.sqrt(5))/2;Di.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[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 Wr(t,e){F.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lr(t,e)),this.mergeVertices()}function lr(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;Di.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[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 Xr(t,e,i,n,r,o){F.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},o!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new cr(t,e,i,n,r),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function cr(t,e,i,n,r){function o(G){c=t.getPointAt(G/e,c);var N=s.normals[G];for(G=s.binormals[G],d=0;d<=n;d++){var q=d/n*Math.PI*2,V=Math.sin(q);q=-Math.cos(q),h.x=q*N.x+V*G.x,h.y=q*N.y+V*G.y,h.z=q*N.z+V*G.z,h.normalize(),x.push(h.x,h.y,h.z),a.x=c.x+i*h.x,a.y=c.y+i*h.y,a.z=c.z+i*h.z,g.push(a.x,a.y,a.z)}}Rt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;var a=new M,h=new M,l=new $,c=new M,u,d,g=[],x=[],S=[],P=[];for(u=0;u<e;u++)o(u);for(o(r===!1?e:0),u=0;u<=e;u++)for(d=0;d<=n;d++)l.x=u/e,l.y=d/n,S.push(l.x,l.y);(function(){for(d=1;d<=e;d++)for(u=1;u<=n;u++){var G=(n+1)*d+(u-1),N=(n+1)*d+u,q=(n+1)*(d-1)+u;P.push((n+1)*(d-1)+(u-1),G,q),P.push(G,N,q)}})(),this.setIndex(P),this.addAttribute("position",new ct(g,3)),this.addAttribute("normal",new ct(x,3)),this.addAttribute("uv",new ct(S,2))}function qr(t,e,i,n,r,o,s){F.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},s!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ur(t,e,i,n,r,o)),this.mergeVertices()}function ur(t,e,i,n,r,o){function s(T,A,tt,vt,ft){var at=Math.sin(T);A=tt/A*T,tt=Math.cos(A),ft.x=vt*(2+tt)*.5*Math.cos(T),ft.y=vt*(2+tt)*at*.5,ft.z=vt*Math.sin(A)*.5}Rt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,o=o||3;var a=[],h=[],l=[],c=[],u,d=new M,g=new M,x=new M,S=new M,P=new M,G=new M,N=new M;for(u=0;u<=i;++u){var q=u/i*r*Math.PI*2;for(s(q,r,o,t,x),s(q+.01,r,o,t,S),G.subVectors(S,x),N.addVectors(S,x),P.crossVectors(G,N),N.crossVectors(P,G),P.normalize(),N.normalize(),q=0;q<=n;++q){var V=q/n*Math.PI*2,ot=-e*Math.cos(V);V=e*Math.sin(V),d.x=x.x+(ot*N.x+V*P.x),d.y=x.y+(ot*N.y+V*P.y),d.z=x.z+(ot*N.z+V*P.z),h.push(d.x,d.y,d.z),g.subVectors(d,x).normalize(),l.push(g.x,g.y,g.z),c.push(u/i),c.push(q/n)}}for(q=1;q<=i;q++)for(u=1;u<=n;u++)t=(n+1)*q+(u-1),e=(n+1)*q+u,r=(n+1)*(q-1)+u,a.push((n+1)*(q-1)+(u-1),t,r),a.push(t,e,r);this.setIndex(a),this.addAttribute("position",new ct(h,3)),this.addAttribute("normal",new ct(l,3)),this.addAttribute("uv",new ct(c,2))}function Yr(t,e,i,n,r){F.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new pr(t,e,i,n,r)),this.mergeVertices()}function pr(t,e,i,n,r){Rt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var o=[],s=[],a=[],h=[],l=new M,c=new M,u=new M,d,g;for(d=0;d<=i;d++)for(g=0;g<=n;g++){var x=g/n*r,S=d/i*Math.PI*2;c.x=(t+e*Math.cos(S))*Math.cos(x),c.y=(t+e*Math.cos(S))*Math.sin(x),c.z=e*Math.sin(S),s.push(c.x,c.y,c.z),l.x=t*Math.cos(x),l.y=t*Math.sin(x),u.subVectors(c,l).normalize(),a.push(u.x,u.y,u.z),h.push(g/n),h.push(d/i)}for(d=1;d<=i;d++)for(g=1;g<=n;g++)t=(n+1)*(d-1)+g-1,e=(n+1)*(d-1)+g,r=(n+1)*d+g,o.push((n+1)*d+g-1,t,r),o.push(t,e,r);this.setIndex(o),this.addAttribute("position",new ct(s,3)),this.addAttribute("normal",new ct(a,3)),this.addAttribute("uv",new ct(h,2))}function Vs(t,e,i,n,r){for(var o,s=0,a=e,h=i-n;a<i;a+=n)s+=(t[h]-t[a])*(t[a+1]+t[h+1]),h=a;if(r===0<s)for(r=e;r<i;r+=n)o=Xs(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=Xs(r,t[r],t[r+1],o);return o&&zn(o,o.next)&&($r(o),o=o.next),o}function Zr(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!zn(t,t.next)&&bi(t.prev,t,t.next)!==0)t=t.next;else{if($r(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Jr(t,e,i,n,r,o,s){if(t){if(!s&&o){var a=t,h=a;do h.z===null&&(h.z=ss(h.x,h.y,n,r,o)),h.prevZ=h.prev,h=h.nextZ=h.next;while(h!==a);h.prevZ.nextZ=null,h.prevZ=null,a=h;var l,c,u,d,g=1;do{h=a;var x=a=null;for(c=0;h;){c++;var S=h;for(l=u=0;l<g&&(u++,S=S.nextZ,S);l++);for(d=g;0<u||0<d&&S;)u!==0&&(d===0||!S||h.z<=S.z)?(l=h,h=h.nextZ,u--):(l=S,S=S.nextZ,d--),x?x.nextZ=l:a=l,l.prevZ=x,x=l;h=S}x.nextZ=null,g*=2}while(1<c)}for(a=t;t.prev!==t.next;){if(h=t.prev,S=t.next,o)t:{x=t,d=n;var P=r,G=o;if(c=x.prev,u=x,g=x.next,0<=bi(c,u,g))x=!1;else{var N=c.x>u.x?c.x>g.x?c.x:g.x:u.x>g.x?u.x:g.x,q=c.y>u.y?c.y>g.y?c.y:g.y:u.y>g.y?u.y:g.y;for(l=ss(c.x<u.x?c.x<g.x?c.x:g.x:u.x<g.x?u.x:g.x,c.y<u.y?c.y<g.y?c.y:g.y:u.y<g.y?u.y:g.y,d,P,G),d=ss(N,q,d,P,G),P=x.nextZ;P&&P.z<=d;){if(P!==x.prev&&P!==x.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){x=!1;break t}P=P.nextZ}for(P=x.prevZ;P&&P.z>=l;){if(P!==x.prev&&P!==x.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){x=!1;break t}P=P.prevZ}x=!0}}else t:if(x=t,c=x.prev,u=x,g=x.next,0<=bi(c,u,g))x=!1;else{for(l=x.next.next;l!==x.prev;){if(Po(c.x,c.y,u.x,u.y,g.x,g.y,l.x,l.y)&&0<=bi(l.prev,l,l.next)){x=!1;break t}l=l.next}x=!0}if(x)e.push(h.i/i),e.push(t.i/i),e.push(S.i/i),$r(t),a=t=S.next;else if(t=S,t===a){if(!s)Jr(Zr(t),e,i,n,r,o,1);else if(s===1){s=e,a=i,h=t;do S=h.prev,x=h.next.next,!zn(S,x)&&js(S,h,h.next,x)&&Qr(S,x)&&Qr(x,S)&&(s.push(S.i/a),s.push(h.i/a),s.push(x.i/a),$r(h),$r(h.next),h=t=x),h=h.next;while(h!==t);t=h,Jr(t,e,i,n,r,o,2)}else if(s===2)t:{s=t;do{for(a=s.next.next;a!==s.prev;){if(h=s.i!==a.i){if(h=s,S=a,x=h.next.i!==S.i&&h.prev.i!==S.i){e:{x=h;do{if(x.i!==h.i&&x.next.i!==h.i&&x.i!==S.i&&x.next.i!==S.i&&js(x,x.next,h,S)){x=!0;break e}x=x.next}while(x!==h);x=!1}x=!x}if(x=x&&Qr(h,S)&&Qr(S,h)){x=h,c=!1,u=(h.x+S.x)/2,S=(h.y+S.y)/2;do x.y>S!=x.next.y>S&&x.next.y!==x.y&&u<(x.next.x-x.x)*(S-x.y)/(x.next.y-x.y)+x.x&&(c=!c),x=x.next;while(x!==h);x=c}h=x}if(h){t=Ws(s,a),s=Zr(s,s.next),t=Zr(t,t.next),Jr(s,e,i,n,r,o),Jr(t,e,i,n,r,o);break t}a=a.next}s=s.next}while(s!==t)}break}}}}function $a(t,e){return t.x-e.x}function Ka(t,e){var i=e,n=t.x,r=t.y,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>o){if(o=s,s===n){if(r===i.y)return i;if(r===i.next.y)return i.next}var a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!a)return null;if(n===o)return a.prev;e=a,s=a.x;var h=a.y,l=1/0;for(i=a.next;i!==e;){if(n>=i.x&&i.x>=s&&n!==i.x&&Po(r<h?n:o,r,s,h,r<h?o:n,r,i.x,i.y)){var c=Math.abs(r-i.y)/(n-i.x);(c<l||c===l&&i.x>a.x)&&Qr(i,t)&&(a=i,l=c)}i=i.next}return a}function ss(t,e,i,n,r){return t=32767*(t-i)*r,e=32767*(e-n)*r,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function th(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Po(t,e,i,n,r,o,s,a){return 0<=(r-s)*(e-a)-(t-s)*(o-a)&&0<=(t-s)*(n-a)-(i-s)*(e-a)&&0<=(i-s)*(o-a)-(r-s)*(n-a)}function bi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function zn(t,e){return t.x===e.x&&t.y===e.y}function js(t,e,i,n){return zn(t,e)&&zn(i,n)||zn(t,n)&&zn(i,e)?!0:0<bi(t,e,i)!=0<bi(t,e,n)&&0<bi(i,n,t)!=0<bi(i,n,e)}function Qr(t,e){return 0>bi(t.prev,t,t.next)?0<=bi(t,e,t.next)&&0<=bi(t,t.prev,e):0>bi(t,e,t.prev)||0>bi(t,t.next,e)}function Ws(t,e){var i=new as(t.i,t.x,t.y),n=new as(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Xs(t,e,i,n){return t=new as(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function $r(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 as(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function qs(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Ys(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Nn(t,e){F.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new hn(t,e)),this.mergeVertices()}function hn(t,e){function i(h){function l(ue,_e,Be){return _e||console.error("THREE.ExtrudeGeometry: vec does not exist"),_e.clone().multiplyScalar(Be).add(ue)}function c(ue,_e,Be){var De=ue.x-_e.x,xt=ue.y-_e.y,xe=Be.x-ue.x,ve=Be.y-ue.y,we=De*De+xt*xt;if(Math.abs(De*ve-xt*xe)>Number.EPSILON){var Bi=Math.sqrt(we),mi=Math.sqrt(xe*xe+ve*ve);if(we=_e.x-xt/Bi,_e=_e.y+De/Bi,ve=((Be.x-ve/mi-we)*ve-(Be.y+xe/mi-_e)*xe)/(De*ve-xt*xe),xe=we+De*ve-ue.x,De=_e+xt*ve-ue.y,xt=xe*xe+De*De,2>=xt)return new $(xe,De);xt=Math.sqrt(xt/2)}else ue=!1,De>Number.EPSILON?xe>Number.EPSILON&&(ue=!0):De<-Number.EPSILON?xe<-Number.EPSILON&&(ue=!0):Math.sign(xt)===Math.sign(ve)&&(ue=!0),ue?(xe=-xt,xt=Math.sqrt(we)):(xe=De,De=xt,xt=Math.sqrt(we/2));return new $(xe/xt,De/xt)}function u(ue,_e){for(qt=ue.length;0<=--qt;){var Be=qt,De=qt-1;0>De&&(De=ue.length-1);var xt,xe=N+2*A;for(xt=0;xt<xe;xt++){var ve=pi*xt,we=pi*(xt+1),Bi=_e+De+ve,mi=_e+De+we;we=_e+Be+we,x(_e+Be+ve),x(Bi),x(we),x(Bi),x(mi),x(we),ve=r.length/3,ve=vt.generateSideWallUV(n,r,ve-6,ve-3,ve-2,ve-1),S(ve[0]),S(ve[1]),S(ve[3]),S(ve[1]),S(ve[2]),S(ve[3])}}}function d(ue,_e,Be){P.push(ue),P.push(_e),P.push(Be)}function g(ue,_e,Be){x(ue),x(_e),x(Be),ue=r.length/3,ue=vt.generateTopUV(n,r,ue-3,ue-2,ue-1),S(ue[0]),S(ue[1]),S(ue[2])}function x(ue){r.push(P[3*ue]),r.push(P[3*ue+1]),r.push(P[3*ue+2])}function S(ue){o.push(ue.x),o.push(ue.y)}var P=[],G=e.curveSegments!==void 0?e.curveSegments:12,N=e.steps!==void 0?e.steps:1,q=e.depth!==void 0?e.depth:100,V=e.bevelEnabled!==void 0?e.bevelEnabled:!0,ot=e.bevelThickness!==void 0?e.bevelThickness:6,T=e.bevelSize!==void 0?e.bevelSize:ot-2,A=e.bevelSegments!==void 0?e.bevelSegments:3,tt=e.extrudePath,vt=e.UVGenerator!==void 0?e.UVGenerator:dh;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),q=e.amount);var ft=!1;if(tt){var at=tt.getSpacedPoints(N);ft=!0,V=!1;var Ht=tt.computeFrenetFrames(N,!1),It=new M,$t=new M,Xt=new M}V||(T=ot=A=0);var Qt;G=h.extractPoints(G),h=G.shape;var re=G.holes;if(!wn.isClockWise(h)){h=h.reverse();var me=0;for(Qt=re.length;me<Qt;me++){var Ae=re[me];wn.isClockWise(Ae)&&(re[me]=Ae.reverse())}}var fi=wn.triangulateShape(h,re),li=h;for(me=0,Qt=re.length;me<Qt;me++)Ae=re[me],h=h.concat(Ae);var Ye,pi=h.length,ti,Mi=fi.length;G=[];var qt=0,ge=li.length,nt=ge-1;for(Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),G[qt]=c(li[qt],li[nt],li[Ye]);tt=[];var ye=G.concat();for(me=0,Qt=re.length;me<Qt;me++){Ae=re[me];var Te=[];for(qt=0,ge=Ae.length,nt=ge-1,Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),Te[qt]=c(Ae[qt],Ae[nt],Ae[Ye]);tt.push(Te),ye=ye.concat(Te)}for(nt=0;nt<A;nt++){ge=nt/A;var Ze=ot*Math.cos(ge*Math.PI/2);for(Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++){var Yt=l(li[qt],G[qt],Ye);d(Yt.x,Yt.y,-Ze)}for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),d(Yt.x,Yt.y,-Ze)}for(Ye=T,qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[0]).multiplyScalar(Yt.x),It.copy(Ht.binormals[0]).multiplyScalar(Yt.y),Xt.copy(at[0]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,0);for(ge=1;ge<=N;ge++)for(qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[ge]).multiplyScalar(Yt.x),It.copy(Ht.binormals[ge]).multiplyScalar(Yt.y),Xt.copy(at[ge]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,q/N*ge);for(nt=A-1;0<=nt;nt--){for(ge=nt/A,Ze=ot*Math.cos(ge*Math.PI/2),Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++)Yt=l(li[qt],G[qt],Ye),d(Yt.x,Yt.y,q+Ze);for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),ft?d(Yt.x,Yt.y+at[N-1].y,at[N-1].x+Ze):d(Yt.x,Yt.y,q+Ze)}(function(){var ue=r.length/3;if(V){var _e=0*pi;for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2]+_e,ti[1]+_e,ti[0]+_e);for(_e=pi*(N+2*A),qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+_e,ti[1]+_e,ti[2]+_e)}else{for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2],ti[1],ti[0]);for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+pi*N,ti[1]+pi*N,ti[2]+pi*N)}n.addGroup(ue,r.length/3-ue,0)})(),function(){var ue=r.length/3,_e=0;for(u(li,_e),_e+=li.length,me=0,Qt=re.length;me<Qt;me++)Ae=re[me],u(Ae,_e),_e+=Ae.length;n.addGroup(ue,r.length/3-ue,1)}()}Rt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,r=[],o=[],s=0,a=t.length;s<a;s++)i(t[s]);this.addAttribute("position",new ct(r,3)),this.addAttribute("uv",new ct(o,2)),this.computeVertexNormals()}function Zs(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function Kr(t,e){F.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new dr(t,e)),this.mergeVertices()}function dr(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new F;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),hn.call(this,t,e),this.type="TextBufferGeometry"}function to(t,e,i,n,r,o,s){F.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Bn(t,e,i,n,r,o,s)),this.mergeVertices()}function Bn(t,e,i,n,r,o,s){Rt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,r=r!==void 0?r:2*Math.PI,o=o!==void 0?o:0,s=s!==void 0?s:Math.PI;var a=o+s,h,l,c=0,u=[],d=new M,g=new M,x=[],S=[],P=[],G=[];for(l=0;l<=i;l++){var N=[],q=l/i;for(h=0;h<=e;h++){var V=h/e;d.x=-t*Math.cos(n+V*r)*Math.sin(o+q*s),d.y=t*Math.cos(o+q*s),d.z=t*Math.sin(n+V*r)*Math.sin(o+q*s),S.push(d.x,d.y,d.z),g.set(d.x,d.y,d.z).normalize(),P.push(g.x,g.y,g.z),G.push(V,1-q),N.push(c++)}u.push(N)}for(l=0;l<i;l++)for(h=0;h<e;h++)t=u[l][h+1],n=u[l][h],r=u[l+1][h],s=u[l+1][h+1],(l!==0||0<o)&&x.push(t,n,s),(l!==i-1||a<Math.PI)&&x.push(n,r,s);this.setIndex(x),this.addAttribute("position",new ct(S,3)),this.addAttribute("normal",new ct(P,3)),this.addAttribute("uv",new ct(G,2))}function eo(t,e,i,n,r,o){F.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},this.fromBufferGeometry(new fr(t,e,i,n,r,o)),this.mergeVertices()}function fr(t,e,i,n,r,o){Rt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},t=t||.5,e=e||1,r=r!==void 0?r:0,o=o!==void 0?o:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var s=[],a=[],h=[],l=[],c=t,u=(e-t)/n,d=new M,g=new $,x,S;for(x=0;x<=n;x++){for(S=0;S<=i;S++)t=r+S/i*o,d.x=c*Math.cos(t),d.y=c*Math.sin(t),a.push(d.x,d.y,d.z),h.push(0,0,1),g.x=(d.x/e+1)/2,g.y=(d.y/e+1)/2,l.push(g.x,g.y);c+=u}for(x=0;x<n;x++)for(e=x*(i+1),S=0;S<i;S++)t=S+e,r=t+i+1,o=t+i+2,c=t+1,s.push(t,r,c),s.push(r,o,c);this.setIndex(s),this.addAttribute("position",new ct(a,3)),this.addAttribute("normal",new ct(h,3)),this.addAttribute("uv",new ct(l,2))}function io(t,e,i,n){F.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new mr(t,e,i,n)),this.mergeVertices()}function mr(t,e,i,n){Rt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=Ee.clamp(n,0,2*Math.PI);var r=[],o=[],s=[],a=1/e,h=new M,l=new $,c;for(c=0;c<=e;c++){var u=i+c*a*n,d=Math.sin(u),g=Math.cos(u);for(u=0;u<=t.length-1;u++)h.x=t[u].x*d,h.y=t[u].y,h.z=t[u].x*g,o.push(h.x,h.y,h.z),l.x=c/e,l.y=u/(t.length-1),s.push(l.x,l.y)}for(c=0;c<e;c++)for(u=0;u<t.length-1;u++)i=u+c*t.length,a=i+t.length,h=i+t.length+1,l=i+1,r.push(i,a,l),r.push(a,h,l);if(this.setIndex(r),this.addAttribute("position",new ct(o,3)),this.addAttribute("uv",new ct(s,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,r=new M,o=new M,s=new M,i=e*t.length*3,u=c=0;c<t.length;c++,u+=3)r.x=n[u+0],r.y=n[u+1],r.z=n[u+2],o.x=n[i+u+0],o.y=n[i+u+1],o.z=n[i+u+2],s.addVectors(r,o).normalize(),n[u+0]=n[i+u+0]=s.x,n[u+1]=n[i+u+1]=s.y,n[u+2]=n[i+u+2]=s.z}function Un(t,e){F.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Fn(t,e)),this.mergeVertices()}function Fn(t,e){function i(c){var u,d=r.length/3;c=c.extractPoints(e);var g=c.shape,x=c.holes;if(wn.isClockWise(g)===!1)for(g=g.reverse(),c=0,u=x.length;c<u;c++){var S=x[c];wn.isClockWise(S)===!0&&(x[c]=S.reverse())}var P=wn.triangulateShape(g,x);for(c=0,u=x.length;c<u;c++)S=x[c],g=g.concat(S);for(c=0,u=g.length;c<u;c++)S=g[c],r.push(S.x,S.y,0),o.push(0,0,1),s.push(S.x,S.y);for(c=0,u=P.length;c<u;c++)g=P[c],n.push(g[0]+d,g[1]+d,g[2]+d),h+=3}Rt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],o=[],s=[],a=0,h=0;if(Array.isArray(t)===!1)i(t);else for(var l=0;l<t.length;l++)i(t[l]),this.addGroup(a,h,l),a+=h,h=0;this.setIndex(n),this.addAttribute("position",new ct(r,3)),this.addAttribute("normal",new ct(o,3)),this.addAttribute("uv",new ct(s,2))}function Js(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function gr(t,e){Rt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(Ee.DEG2RAD*(e!==void 0?e:1));var n=[0,0],r={},o=["a","b","c"];if(t.isBufferGeometry){var s=new F;s.fromBufferGeometry(t)}else s=t.clone();s.mergeVertices(),s.computeFaceNormals(),t=s.vertices,s=s.faces;for(var a=0,h=s.length;a<h;a++)for(var l=s[a],c=0;3>c;c++){var u=l[o[c]],d=l[o[(c+1)%3]];n[0]=Math.min(u,d),n[1]=Math.max(u,d),u=n[0]+","+n[1],r[u]===void 0?r[u]={index1:n[0],index2:n[1],face1:a,face2:void 0}:r[u].face2=a}for(u in r)n=r[u],(n.face2===void 0||s[n.face1].normal.dot(s[n.face2].normal)<=e)&&(o=t[n.index1],i.push(o.x,o.y,o.z),o=t[n.index2],i.push(o.x,o.y,o.z));this.addAttribute("position",new ct(i,3))}function Gn(t,e,i,n,r,o,s,a){F.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a},this.fromBufferGeometry(new vn(t,e,i,n,r,o,s,a)),this.mergeVertices()}function vn(t,e,i,n,r,o,s,a){function h(N){var q,V=new $,ot=new M,T=0,A=N===!0?t:e,tt=N===!0?1:-1,vt=x;for(q=1;q<=n;q++)u.push(0,P*tt,0),d.push(0,tt,0),g.push(.5,.5),x++;var ft=x;for(q=0;q<=n;q++){var at=q/n*a+s,Ht=Math.cos(at);at=Math.sin(at),ot.x=A*at,ot.y=P*tt,ot.z=A*Ht,u.push(ot.x,ot.y,ot.z),d.push(0,tt,0),V.x=.5*Ht+.5,V.y=.5*at*tt+.5,g.push(V.x,V.y),x++}for(q=0;q<n;q++)V=vt+q,ot=ft+q,N===!0?c.push(ot,ot+1,V):c.push(ot+1,ot,V),T+=3;l.addGroup(G,T,N===!0?1:2),G+=T}Rt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a};var l=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,o=o!==void 0?o:!1,s=s!==void 0?s:0,a=a!==void 0?a:2*Math.PI;var c=[],u=[],d=[],g=[],x=0,S=[],P=i/2,G=0;(function(){var N,q,V=new M,ot=new M,T=0,A=(e-t)/i;for(q=0;q<=r;q++){var tt=[],vt=q/r,ft=vt*(e-t)+t;for(N=0;N<=n;N++){var at=N/n,Ht=at*a+s,It=Math.sin(Ht);Ht=Math.cos(Ht),ot.x=ft*It,ot.y=-vt*i+P,ot.z=ft*Ht,u.push(ot.x,ot.y,ot.z),V.set(It,A,Ht).normalize(),d.push(V.x,V.y,V.z),g.push(at,1-vt),tt.push(x++)}S.push(tt)}for(N=0;N<n;N++)for(q=0;q<r;q++)V=S[q+1][N],ot=S[q+1][N+1],A=S[q][N+1],c.push(S[q][N],V,A),c.push(V,ot,A),T+=6;l.addGroup(G,T,0),G+=T})(),o===!1&&(0<t&&h(!0),0<e&&h(!1)),this.setIndex(c),this.addAttribute("position",new ct(u,3)),this.addAttribute("normal",new ct(d,3)),this.addAttribute("uv",new ct(g,2))}function no(t,e,i,n,r,o,s){Gn.call(this,0,t,e,i,n,r,o,s),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function ro(t,e,i,n,r,o,s){vn.call(this,0,t,e,i,n,r,o,s),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function oo(t,e,i,n){F.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new vr(t,e,i,n)),this.mergeVertices()}function vr(t,e,i,n){Rt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=e!==void 0?Math.max(3,e):8,i=i!==void 0?i:0,n=n!==void 0?n:2*Math.PI;var r=[],o=[],s=[],a=[],h,l=new M,c=new $;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);var u=0;for(h=3;u<=e;u++,h+=3){var d=i+u/e*n;l.x=t*Math.cos(d),l.y=t*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[h]/t+1)/2,c.y=(o[h+1]/t+1)/2,a.push(c.x,c.y)}for(h=1;h<=e;h++)r.push(h,h+1,0);this.setIndex(r),this.addAttribute("position",new ct(o,3)),this.addAttribute("normal",new ct(s,3)),this.addAttribute("uv",new ct(a,2))}function Hn(t){fe.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function yr(t){Je.call(this,t),this.type="RawShaderMaterial"}function ln(t){fe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function kn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Yi(t){fe.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Vn(t){Yi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function jn(t){fe.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function Wn(t){fe.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Xn(t){if(fe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new H(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function qn(t){Ne.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Hi(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ao(t,e,i,n){Hi.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function so(t,e,i,n){Hi.call(this,t,e,i,n)}function Lo(t,e,i,n){Hi.call(this,t,e,i,n)}function wi(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ai.convertArray(e,this.TimeBufferType),this.values=Ai.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Ro(t,e,i){wi.call(this,t,e,i)}function Co(t,e,i,n){wi.call(this,t,e,i,n)}function _r(t,e,i,n){wi.call(this,t,e,i,n)}function bo(t,e,i,n){Hi.call(this,t,e,i,n)}function ao(t,e,i,n){wi.call(this,t,e,i,n)}function Oo(t,e,i,n){wi.call(this,t,e,i,n)}function xr(t,e,i,n){wi.call(this,t,e,i,n)}function ki(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=Ee.generateUUID(),0>this.duration&&this.resetDuration()}function eh(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return _r;case"vector":case"vector2":case"vector3":case"vector4":return xr;case"color":return Co;case"quaternion":return ao;case"bool":case"boolean":return Ro;case"string":return Oo}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function ih(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=eh(t.type);if(t.times===void 0){var i=[],n=[];Ai.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function hs(t,e,i){var n=this,r=!1,o=0,s=0,a=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(h){s++,r===!1&&n.onStart!==void 0&&n.onStart(h,o,s),r=!0},this.itemEnd=function(h){o++,n.onProgress!==void 0&&n.onProgress(h,o,s),o===s&&(r=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(h){n.onError!==void 0&&n.onError(h)},this.resolveURL=function(h){return a?a(h):h},this.setURLModifier=function(h){return a=h,this}}function Xi(t){this.manager=t!==void 0?t:Oi}function Qs(t){this.manager=t!==void 0?t:Oi}function $s(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ls(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ho(t){this.manager=t!==void 0?t:Oi}function cs(t){this.manager=t!==void 0?t:Oi}function Io(t){this.manager=t!==void 0?t:Oi}function pe(){this.type="Curve",this.arcLengthDivisions=200}function Vi(t,e,i,n,r,o,s,a){pe.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=s||!1,this.aRotation=a||0}function wr(t,e,i,n,r,o){Vi.call(this,t,e,i,i,n,r,o),this.type="ArcCurve"}function us(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(r,o,s,a,h){r=h*(s-r),a=h*(a-o),t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},initNonuniformCatmullRom:function(r,o,s,a,h,l,c){r=((o-r)/h-(s-r)/(h+l)+(s-o)/l)*l,a=((s-o)/l-(a-o)/(l+c)+(a-s)/c)*l,t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},calc:function(r){var o=r*r;return t+e*r+i*o+n*o*r}}}function Ei(t,e,i,n){pe.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Ks(t,e,i,n,r){e=.5*(n-e),r=.5*(r-i);var o=t*t;return(2*i-2*n+e+r)*t*o+(-3*i+3*n-2*e-r)*o+e*t+i}function lo(t,e,i,n){var r=1-t;return r*r*e+2*(1-t)*t*i+t*t*n}function co(t,e,i,n,r){var o=1-t,s=1-t;return o*o*o*e+3*s*s*t*i+3*(1-t)*t*t*n+t*t*t*r}function Zi(t,e,i,n){pe.call(this),this.type="CubicBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $,this.v3=n||new $}function cn(t,e,i,n){pe.call(this),this.type="CubicBezierCurve3",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M,this.v3=n||new M}function zi(t,e){pe.call(this),this.type="LineCurve",this.v1=t||new $,this.v2=e||new $}function Ji(t,e){pe.call(this),this.type="LineCurve3",this.v1=t||new M,this.v2=e||new M}function Qi(t,e,i){pe.call(this),this.type="QuadraticBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $}function un(t,e,i){pe.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M}function $i(t){pe.call(this),this.type="SplineCurve",this.points=t||[]}function yn(){pe.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ki(t){yn.call(this),this.type="Path",this.currentPoint=new $,t&&this.setFromPoints(t)}function Pn(t){Ki.call(this,t),this.uuid=Ee.generateUUID(),this.type="Shape",this.holes=[]}function ri(t,e){b.call(this),this.type="Light",this.color=new H(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function Do(t,e,i){ri.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(b.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function Yn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new $(512,512),this.map=null,this.matrix=new mt}function zo(){Yn.call(this,new Bt(50,1,.5,500))}function No(t,e,i,n,r,o){ri.call(this,t,e),this.type="SpotLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(s){this.intensity=s/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=r!==void 0?r:0,this.decay=o!==void 0?o:1,this.shadow=new zo}function Bo(t,e,i,n){ri.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(r){this.intensity=r/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Yn(new Bt(90,1,.5,500))}function uo(t,e,i,n,r,o){Kt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=r!==void 0?r:.1,this.far=o!==void 0?o:2e3,this.updateProjectionMatrix()}function Uo(){Yn.call(this,new uo(-5,5,5,-5,.5,500))}function Fo(t,e){ri.call(this,t,e),this.type="DirectionalLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,this.shadow=new Uo}function Go(t,e){ri.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Ho(t,e,i,n){ri.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ko(t){this.manager=t!==void 0?t:Oi,this.textures={}}function ps(t){this.manager=t!==void 0?t:Oi}function Mr(){}function Vo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Oi,this.withCredentials=!1}function ds(t){this.manager=t!==void 0?t:Oi,this.resourcePath=""}function fs(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Oi,this.options=void 0}function ms(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function gs(t){this.type="Font",this.data=t}function ta(t){this.manager=t!==void 0?t:Oi}function vs(t){this.manager=t!==void 0?t:Oi}function ea(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function po(t,e,i,n){b.call(this),this.type="CubeCamera";var r=new Bt(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new M(1,0,0)),this.add(r);var o=new Bt(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new M(-1,0,0)),this.add(o);var s=new Bt(90,1,t,e);s.up.set(0,0,1),s.lookAt(new M(0,1,0)),this.add(s);var a=new Bt(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new M(0,-1,0)),this.add(a);var h=new Bt(90,1,t,e);h.up.set(0,-1,0),h.lookAt(new M(0,0,1)),this.add(h);var l=new Bt(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new M(0,0,-1)),this.add(l),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new St(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(c,u){this.parent===null&&this.updateMatrixWorld();var d=this.renderTarget,g=d.texture.generateMipmaps;d.texture.generateMipmaps=!1,d.activeCubeFace=0,c.render(u,r,d),d.activeCubeFace=1,c.render(u,o,d),d.activeCubeFace=2,c.render(u,s,d),d.activeCubeFace=3,c.render(u,a,d),d.activeCubeFace=4,c.render(u,h,d),d.texture.generateMipmaps=g,d.activeCubeFace=5,c.render(u,l,d),c.setRenderTarget(null)},this.clear=function(c,u,d,g){for(var x=this.renderTarget,S=0;6>S;S++)x.activeCubeFace=S,c.setRenderTarget(x),c.clear(u,d,g);c.setRenderTarget(null)}}function ys(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function _s(){b.call(this),this.type="AudioListener",this.context=zs.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Tr(t){b.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function xs(t){Tr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ws(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Ms(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function ia(t,e,i){i=i||Pi.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Pi(t,e,i){this.path=e,this.parsedPath=i||Pi.parseTrackName(e),this.node=Pi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function na(){this.uuid=Ee.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function ra(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},r=0;r!==e;++r){var o=t[r].createInterpolant(null);i[r]=o,o.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ts(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function jo(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Ss(){Rt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Es(t,e,i){Ge.call(this,t,e),this.meshPerAttribute=i||1}function Ps(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Z.call(this,t,e,i),this.meshPerAttribute=n||1}function oa(t,e,i,n){this.ray=new Ri(t,e),this.near=i||0,this.far=n||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 sa(t,e){return t.distance-e.distance}function As(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var r=t.length;n<r;n++)As(t[n],e,i,!0)}}function aa(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function ha(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Ls(t,e){this.min=t!==void 0?t:new $(1/0,1/0),this.max=e!==void 0?e:new $(-1/0,-1/0)}function Rs(t,e){this.start=t!==void 0?t:new M,this.end=e!==void 0?e:new M}function fo(t){b.call(this),this.material=t,this.render=function(){}}function mo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Rt,e=new ct(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Sr(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Rt,e=[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];for(var i=0,n=1;32>i;i++,n++){var r=i/32*Math.PI*2,o=n/32*Math.PI*2;e.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}t.addAttribute("position",new ct(e,3)),e=new Ne({fog:!1}),this.cone=new Re(t,e),this.add(this.cone),this.update()}function la(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,la(t.children[i]));return e}function Er(t){for(var e=la(t),i=new Rt,n=[],r=[],o=new H(0,0,1),s=new H(0,1,0),a=0;a<e.length;a++){var h=e[a];h.parent&&h.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}i.addAttribute("position",new ct(n,3)),i.addAttribute("color",new ct(r,3)),n=new Ne({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),Re.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Bn(e,4,2),e=new Ve({wireframe:!0,fog:!1}),Ke.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ar(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ne({fog:!1}),e=new Rt,e.addAttribute("position",new Z(new Float32Array(15),3)),this.line=new qe(e,t),this.add(this.line),this.update()}function Lr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new Dn(e),t.rotateY(.5*Math.PI),this.material=new Ve({wireframe:!0,fog:!1}),this.color===void 0&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new Z(e,3)),this.add(new Ke(t,this.material)),this.update()}function go(t,e,i,n){t=t||10,e=e||10,i=new H(i!==void 0?i:4473924),n=new H(n!==void 0?n:8947848);var r=e/2,o=t/e,s=t/2;t=[];for(var a=[],h=0,l=0,c=-s;h<=e;h++,c+=o){t.push(-s,0,c,s,0,c),t.push(c,0,-s,c,0,s);var u=h===r?i:n;u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3}e=new Rt,e.addAttribute("position",new ct(t,3)),e.addAttribute("color",new ct(a,3)),i=new Ne({vertexColors:2}),Re.call(this,e,i)}function Wo(t,e,i,n,r,o){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(r!==void 0?r:4473924),o=new H(o!==void 0?o:8947848);var s=[],a=[],h;for(h=0;h<=e;h++){var l=h/e*2*Math.PI,c=Math.sin(l)*t;l=Math.cos(l)*t,s.push(0,0,0),s.push(c,0,l);var u=h&1?r:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(h=0;h<=i;h++){u=h&1?r:o;var d=t-t/i*h;for(e=0;e<n;e++)l=e/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b),l=(e+1)/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b)}t=new Rt,t.addAttribute("position",new ct(s,3)),t.addAttribute("color",new ct(a,3)),s=new Ne({vertexColors:2}),Re.call(this,t,s)}function vo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Rt,e=new ct(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Rr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Rt,t.addAttribute("position",new ct([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ne({fog:!1}),this.lightPlane=new qe(t,e),this.add(this.lightPlane),t=new Rt,t.addAttribute("position",new ct([0,0,0,0,0,1],3)),this.targetLine=new qe(t,e),this.add(this.targetLine),this.update()}function yo(t){function e(g,x,S){i(g,S),i(x,S)}function i(g,x){o.push(0,0,0),s.push(x.r,x.g,x.b),a[g]===void 0&&(a[g]=[]),a[g].push(o.length/3-1)}var n=new Rt,r=new Ne({color:16777215,vertexColors:1}),o=[],s=[],a={},h=new H(16755200),l=new H(16711680),c=new H(43775),u=new H(16777215),d=new H(3355443);e("n1","n2",h),e("n2","n4",h),e("n4","n3",h),e("n3","n1",h),e("f1","f2",h),e("f2","f4",h),e("f4","f3",h),e("f3","f1",h),e("n1","f1",h),e("n2","f2",h),e("n3","f3",h),e("n4","f4",h),e("p","n1",l),e("p","n2",l),e("p","n3",l),e("p","n4",l),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",u),e("p","c",d),e("cn1","cn2",d),e("cn3","cn4",d),e("cf1","cf2",d),e("cf3","cf4",d),n.addAttribute("position",new ct(o,3)),n.addAttribute("color",new ct(s,3)),Re.call(this,n,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function _n(t,e){this.object=t,e===void 0&&(e=16776960),t=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]);var i=new Float32Array(24),n=new Rt;n.setIndex(new Z(t,1)),n.addAttribute("position",new Z(i,3)),Re.call(this,n,new Ne({color:e})),this.matrixAutoUpdate=!1,this.update()}function _o(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=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]);var i=new Rt;i.setIndex(new Z(e,1)),i.addAttribute("position",new ct([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)),Re.call(this,i,new Ne({color:t})),this.geometry.computeBoundingSphere()}function xo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Rt,e.addAttribute("position",new ct([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)),e.computeBoundingSphere(),qe.call(this,e,new Ne({color:t})),e=new Rt,e.addAttribute("position",new ct([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new Ke(e,new Ve({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function xn(t,e,i,n,r,o){b.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),r===void 0&&(r=.2*i),o===void 0&&(o=.2*r),Zo===void 0&&(Zo=new Rt,Zo.addAttribute("position",new ct([0,0,0,0,1,0],3)),Ns=new vn(0,.5,1,5,1),Ns.translate(0,-.5,0)),this.position.copy(e),this.line=new qe(Zo,new Ne({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ke(Ns,new Ve({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,o)}function wo(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new Rt,t.addAttribute("position",new ct(e,3)),t.addAttribute("color",new ct([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new Ne({vertexColors:2}),Re.call(this,t,e)}function ca(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom",this.closed=!0}function ua(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Cs(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}(),Object.assign(Ot.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var Ee={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[r&63|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[o&255]+t[o>>8&255]+t[o>>16&255]+t[o>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*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*Ee.DEG2RAD},radToDeg:function(t){return t*Ee.RAD2DEG},isPowerOfTwo:function(t){return(t&t-1)===0&&t!==0},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))}};Object.defineProperties($.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($.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.y=this.x=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 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 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 e!==void 0?(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 e!==void 0?(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,i=this.y;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[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 $,e=new $;return function(i,n){return t.set(i,i),e.set(n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?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 0>t&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return t=this.y-t.y,e*e+t*t},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,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&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 i=Math.cos(e);e=Math.sin(e);var n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*e+t.x,this.y=n*e+r*i+t.y,this}}),Object.assign(mt.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,o,s,a,h,l,c,u,d,g,x,S){var P=this.elements;return P[0]=t,P[4]=e,P[8]=i,P[12]=n,P[1]=r,P[5]=o,P[9]=s,P[13]=a,P[2]=h,P[6]=l,P[10]=c,P[14]=u,P[3]=d,P[7]=g,P[11]=x,P[15]=S,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 mt().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t=new M;return function(e){var i=this.elements,n=e.elements,r=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*r,i[1]=n[1]*r,i[2]=n[2]*r,i[3]=0,i[4]=n[4]*o,i[5]=n[5]*o,i[6]=n[6]*o,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[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,i=t.x,n=t.y,r=t.z,o=Math.cos(i);i=Math.sin(i);var s=Math.cos(n);n=Math.sin(n);var a=Math.cos(r);if(r=Math.sin(r),t.order==="XYZ"){t=o*a;var h=o*r,l=i*a,c=i*r;e[0]=s*a,e[4]=-s*r,e[8]=n,e[1]=h+l*n,e[5]=t-c*n,e[9]=-i*s,e[2]=c-t*n,e[6]=l+h*n,e[10]=o*s}else t.order==="YXZ"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t+c*i,e[4]=l*i-h,e[8]=o*n,e[1]=o*r,e[5]=o*a,e[9]=-i,e[2]=h*i-l,e[6]=c+t*i,e[10]=o*s):t.order==="ZXY"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t-c*i,e[4]=-o*r,e[8]=l+h*i,e[1]=h+l*i,e[5]=o*a,e[9]=c-t*i,e[2]=-o*n,e[6]=i,e[10]=o*s):t.order==="ZYX"?(t=o*a,h=o*r,l=i*a,c=i*r,e[0]=s*a,e[4]=l*n-h,e[8]=t*n+c,e[1]=s*r,e[5]=c*n+t,e[9]=h*n-l,e[2]=-n,e[6]=i*s,e[10]=o*s):t.order==="YZX"?(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=c-t*r,e[8]=l*r+h,e[1]=r,e[5]=o*a,e[9]=-i*a,e[2]=-n*a,e[6]=h*r+l,e[10]=t-c*r):t.order==="XZY"&&(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=-r,e[8]=n*a,e[1]=t*r+c,e[5]=o*a,e[9]=h*r-l,e[2]=l*r-h,e[6]=i*a,e[10]=c*r+t);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 M(0,0,0),e=new M(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new M,e=new M,i=new M;return function(n,r,o){var s=this.elements;return i.subVectors(n,r),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(o,i),t.lengthSq()===0&&(Math.abs(o.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(o,i)),t.normalize(),e.crossVectors(i,t),s[0]=t.x,s[4]=e.x,s[8]=i.x,s[1]=t.y,s[5]=e.y,s[9]=i.y,s[2]=t.z,s[6]=e.z,s[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(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 i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[4],o=i[8],s=i[12],a=i[1],h=i[5],l=i[9],c=i[13],u=i[2],d=i[6],g=i[10],x=i[14],S=i[3],P=i[7],G=i[11];i=i[15];var N=n[0],q=n[4],V=n[8],ot=n[12],T=n[1],A=n[5],tt=n[9],vt=n[13],ft=n[2],at=n[6],Ht=n[10],It=n[14],$t=n[3],Xt=n[7],Qt=n[11];return n=n[15],e[0]=t*N+r*T+o*ft+s*$t,e[4]=t*q+r*A+o*at+s*Xt,e[8]=t*V+r*tt+o*Ht+s*Qt,e[12]=t*ot+r*vt+o*It+s*n,e[1]=a*N+h*T+l*ft+c*$t,e[5]=a*q+h*A+l*at+c*Xt,e[9]=a*V+h*tt+l*Ht+c*Qt,e[13]=a*ot+h*vt+l*It+c*n,e[2]=u*N+d*T+g*ft+x*$t,e[6]=u*q+d*A+g*at+x*Xt,e[10]=u*V+d*tt+g*Ht+x*Qt,e[14]=u*ot+d*vt+g*It+x*n,e[3]=S*N+P*T+G*ft+i*$t,e[7]=S*q+P*A+G*at+i*Xt,e[11]=S*V+P*tt+G*Ht+i*Qt,e[15]=S*ot+P*vt+G*It+i*n,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 M;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],o=t[1],s=t[5],a=t[9],h=t[13],l=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-n*h*c-r*s*u+i*h*u+n*s*d-i*a*d)+t[7]*(+e*a*d-e*h*u+r*o*u-n*o*d+n*h*l-r*a*l)+t[11]*(+e*h*c-e*s*d-r*o*c+i*o*d+r*s*l-i*h*l)+t[15]*(-n*s*l-e*a*c+e*s*u+n*o*c-i*o*u+i*a*l)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var r=n[1],o=n[2],s=n[3],a=n[4],h=n[5],l=n[6],c=n[7],u=n[8],d=n[9],g=n[10],x=n[11],S=n[12],P=n[13],G=n[14];n=n[15];var N=d*G*c-P*g*c+P*l*x-h*G*x-d*l*n+h*g*n,q=S*g*c-u*G*c-S*l*x+a*G*x+u*l*n-a*g*n,V=u*P*c-S*d*c+S*h*x-a*P*x-u*h*n+a*d*n,ot=S*d*l-u*P*l-S*h*g+a*P*g+u*h*G-a*d*G,T=t*N+r*q+o*V+s*ot;if(T===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/T,i[0]=N*e,i[1]=(P*g*s-d*G*s-P*o*x+r*G*x+d*o*n-r*g*n)*e,i[2]=(h*G*s-P*l*s+P*o*c-r*G*c-h*o*n+r*l*n)*e,i[3]=(d*l*s-h*g*s-d*o*c+r*g*c+h*o*x-r*l*x)*e,i[4]=q*e,i[5]=(u*G*s-S*g*s+S*o*x-t*G*x-u*o*n+t*g*n)*e,i[6]=(S*l*s-a*G*s-S*o*c+t*G*c+a*o*n-t*l*n)*e,i[7]=(a*g*s-u*l*s+u*o*c-t*g*c-a*o*x+t*l*x)*e,i[8]=V*e,i[9]=(S*d*s-u*P*s-S*r*x+t*P*x+u*r*n-t*d*n)*e,i[10]=(a*P*s-S*h*s+S*r*c-t*P*c-a*r*n+t*h*n)*e,i[11]=(u*h*s-a*d*s-u*r*c+t*d*c+a*r*x-t*h*x)*e,i[12]=ot*e,i[13]=(u*P*o-S*d*o+S*r*g-t*P*g-u*r*G+t*d*G)*e,i[14]=(S*h*o-a*P*o-S*r*l+t*P*l+a*r*G-t*h*G)*e,i[15]=(a*d*o-u*h*o+u*r*l-t*d*l-a*r*g+t*h*g)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,r=t.x,o=t.y;t=t.z;var s=n*r,a=n*o;return this.set(s*r+i,s*o-e*t,s*t+e*o,0,s*o+e*t,a*o+i,a*t-e*r,0,s*t-e*o,a*t+e*r,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,o=e._y,s=e._z,a=e._w,h=r+r,l=o+o,c=s+s;e=r*h;var u=r*l;r*=c;var d=o*l;o*=c,s*=c,h*=a,l*=a,a*=c,c=i.x;var g=i.y;return i=i.z,n[0]=(1-(d+s))*c,n[1]=(u+a)*c,n[2]=(r-l)*c,n[3]=0,n[4]=(u-a)*g,n[5]=(1-(e+s))*g,n[6]=(o+h)*g,n[7]=0,n[8]=(r+l)*i,n[9]=(o-h)*i,n[10]=(1-(e+d))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new M,e=new mt;return function(i,n,r){var o=this.elements,s=t.set(o[0],o[1],o[2]).length(),a=t.set(o[4],o[5],o[6]).length(),h=t.set(o[8],o[9],o[10]).length();0>this.determinant()&&(s=-s),i.x=o[12],i.y=o[13],i.z=o[14],e.copy(this),i=1/s,o=1/a;var l=1/h;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=o,e.elements[5]*=o,e.elements[6]*=o,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,n.setFromRotationMatrix(e),r.x=s,r.y=a,r.z=h,this}}(),makePerspective:function(t,e,i,n,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var s=this.elements;return s[0]=2*r/(e-t),s[4]=0,s[8]=(e+t)/(e-t),s[12]=0,s[1]=0,s[5]=2*r/(i-n),s[9]=(i+n)/(i-n),s[13]=0,s[2]=0,s[6]=0,s[10]=-(o+r)/(o-r),s[14]=-2*o*r/(o-r),s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makeOrthographic:function(t,e,i,n,r,o){var s=this.elements,a=1/(e-t),h=1/(i-n),l=1/(o-r);return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-((e+t)*a),s[1]=0,s[5]=2*h,s[9]=0,s[13]=-((i+n)*h),s[2]=0,s[6]=0,s[10]=-2*l,s[14]=-((o+r)*l),s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(ht,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,o,s){var a=i[n+0],h=i[n+1],l=i[n+2];i=i[n+3],n=r[o+0];var c=r[o+1],u=r[o+2];if(r=r[o+3],i!==r||a!==n||h!==c||l!==u){o=1-s;var d=a*n+h*c+l*u+i*r,g=0<=d?1:-1,x=1-d*d;x>Number.EPSILON&&(x=Math.sqrt(x),d=Math.atan2(x,d*g),o=Math.sin(o*d)/x,s=Math.sin(s*d)/x),g*=s,a=a*o+n*g,h=h*o+c*g,l=l*o+u*g,i=i*o+r*g,o===1-s&&(s=1/Math.sqrt(a*a+h*h+l*l+i*i),a*=s,h*=s,l*=s,i*=s)}t[e]=a,t[e+1]=h,t[e+2]=l,t[e+3]=i}}),Object.defineProperties(ht.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(ht.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,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 Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z;t=t.order;var o=Math.cos,s=Math.sin,a=o(i/2),h=o(n/2);return o=o(r/2),i=s(i/2),n=s(n/2),r=s(r/2),t==="XYZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="YXZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="ZXY"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="ZYX"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="YZX"?(this._x=i*h*o+a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o-i*n*r):t==="XZY"&&(this._x=i*h*o-a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o+i*n*r),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],r=e[1],o=e[5],s=e[9],a=e[2],h=e[6];e=e[10];var l=i+o+e;return 0<l?(i=.5/Math.sqrt(l+1),this._w=.25/i,this._x=(h-s)*i,this._y=(n-a)*i,this._z=(r-t)*i):i>o&&i>e?(i=2*Math.sqrt(1+i-o-e),this._w=(h-s)/i,this._x=.25*i,this._y=(t+r)/i,this._z=(n+a)/i):o>e?(i=2*Math.sqrt(1+o-i-e),this._w=(n-a)/i,this._x=(t+r)/i,this._y=.25*i,this._z=(s+h)/i):(i=2*Math.sqrt(1+e-i-o),this._w=(r-t)/i,this._x=(n+a)/i,this._y=(s+h)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new M,e;return function(i,n){return t===void 0&&(t=new M),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs(Ee.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),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 t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(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 i=t._x,n=t._y,r=t._z;t=t._w;var o=e._x,s=e._y,a=e._z;return e=e._w,this._x=i*e+t*o+n*a-r*s,this._y=n*e+t*s+r*o-i*a,this._z=r*e+t*a+i*s-n*o,this._w=t*e-i*o-n*s-r*a,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,r=this._z,o=this._w,s=o*t._w+i*t._x+n*t._y+r*t._z;if(0>s?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),1<=s)return this._w=o,this._x=i,this._y=n,this._z=r,this;if(t=1-s*s,t<=Number.EPSILON)return s=1-e,this._w=s*o+e*this._w,this._x=s*i+e*this._x,this._y=s*n+e*this._y,this._z=s*r+e*this._z,this.normalize();t=Math.sqrt(t);var a=Math.atan2(t,s);return s=Math.sin((1-e)*a)/t,e=Math.sin(e*a)/t,this._w=o*s+this._w*e,this._x=i*s+this._x*e,this._y=n*s+this._y*e,this._z=r*s+this._z*e,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 e===void 0&&(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 t===void 0&&(t=[]),e===void 0&&(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(M.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.z=this.y=this.x=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 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 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 e!==void 0?(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 e!==void 0?(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 e!==void 0?(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 ht;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 ht;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,o=t.y,s=t.z;t=t.w;var a=t*e+o*n-s*i,h=t*i+s*e-r*n,l=t*n+r*i-o*e;return e=-r*e-o*i-s*n,this.x=a*t+e*-r+h*-s-l*-o,this.y=h*t+e*-o+l*-r-a*-s,this.z=l*t+e*-s+a*-o-h*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new mt;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,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 M,e=new M;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?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,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(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 i=t.x,n=t.y;t=t.z;var r=e.x,o=e.y;return e=e.z,this.x=n*e-t*o,this.y=t*r-i*e,this.z=i*o-n*r,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new M;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new M;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos(Ee.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},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,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=i,this.z=t,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 e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&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(yt.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,o,s,a,h){var l=this.elements;return l[0]=t,l[1]=n,l[2]=s,l[3]=e,l[4]=r,l[5]=a,l[6]=i,l[7]=o,l[8]=h,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;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new M;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,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 i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[3],o=i[6],s=i[1],a=i[4],h=i[7],l=i[2],c=i[5];i=i[8];var u=n[0],d=n[3],g=n[6],x=n[1],S=n[4],P=n[7],G=n[2],N=n[5];return n=n[8],e[0]=t*u+r*x+o*G,e[3]=t*d+r*S+o*N,e[6]=t*g+r*P+o*n,e[1]=s*u+a*x+h*G,e[4]=s*d+a*S+h*N,e[7]=s*g+a*P+h*n,e[2]=l*u+c*x+i*G,e[5]=l*d+c*S+i*N,e[8]=l*g+c*P+i*n,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],i=t[1],n=t[2],r=t[3],o=t[4],s=t[5],a=t[6],h=t[7];return t=t[8],e*o*t-e*s*h-i*r*t+i*s*a+n*r*h-n*o*a},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],l=i[6],c=i[7];i=i[8];var u=i*a-h*c,d=h*l-i*s,g=c*s-a*l,x=n*u+r*d+o*g;if(x===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/x,t[0]=u*e,t[1]=(o*c-i*r)*e,t[2]=(h*r-o*a)*e,t[3]=d*e,t[4]=(i*n-o*l)*e,t[5]=(o*s-h*n)*e,t[6]=g*e,t[7]=(r*l-c*n)*e,t[8]=(a*n-r*s)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(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,i,n,r,o,s){var a=Math.cos(r);r=Math.sin(r),this.set(i*a,i*r,-i*(a*o+r*s)+o+t,-n*r,n*a,-n*(-r*o+a*s)+s+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],r=i[3],o=i[6],s=i[1],a=i[4],h=i[7];return i[0]=e*n+t*s,i[3]=e*r+t*a,i[6]=e*o+t*h,i[1]=-t*n+e*s,i[4]=-t*r+e*a,i[7]=-t*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var An={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},nh=0;Ct.DEFAULT_IMAGE=void 0,Ct.DEFAULT_MAPPING=300,Ct.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Ct,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=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];var i={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(this.image!==void 0){var n=this.image;if(n.uuid===void 0&&(n.uuid=Ee.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var r=[],o=0,s=n.length;o<s;o++)r.push(An.getDataURL(n[o]));else r=An.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:r}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Ct.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Y.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=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 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 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=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(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 e!==void 0?(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,i=this.y,n=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,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 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],r=t[1],o=t[5],s=t[9],a=t[2],h=t[6],l=t[10];return .01>Math.abs(i-r)&&.01>Math.abs(n-a)&&.01>Math.abs(s-h)?.1>Math.abs(i+r)&&.1>Math.abs(n+a)&&.1>Math.abs(s+h)&&.1>Math.abs(e+o+l-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,o=(o+1)/2,l=(l+1)/2,i=(i+r)/4,n=(n+a)/4,s=(s+h)/4,e>o&&e>l?.01>e?(h=0,i=a=.707106781):(h=Math.sqrt(e),a=i/h,i=n/h):o>l?.01>o?(h=.707106781,a=0,i=.707106781):(a=Math.sqrt(o),h=i/a,i=s/a):.01>l?(a=h=.707106781,i=0):(i=Math.sqrt(l),h=n/i,a=s/i),this.set(h,a,i,t),this):(t=Math.sqrt((h-s)*(h-s)+(n-a)*(n-a)+(r-i)*(r-i)),.001>Math.abs(t)&&(t=1),this.x=(h-s)/t,this.y=(n-a)/t,this.z=(r-i)/t,this.w=Math.acos((e+o+l-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(i,n){return t===void 0&&(t=new Y,e=new Y),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?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,i){return this.subVectors(e,t).multiplyScalar(i).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 e===void 0&&(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 t===void 0&&(t=[]),e===void 0&&(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,i){return i!==void 0&&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}}),lt.prototype=Object.assign(Object.create(Ot.prototype),{constructor:lt,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"})}}),St.prototype=Object.create(lt.prototype),St.prototype.constructor=St,St.prototype.isWebGLRenderTargetCube=!0,ut.prototype=Object.create(Ct.prototype),ut.prototype.constructor=ut,ut.prototype.isDataTexture=!0,Object.assign(At.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,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.length;a<h;a+=3){var l=t[a],c=t[a+1],u=t[a+2];l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.count;a<h;a++){var l=t.getX(a),c=t.getY(a),u=t.getZ(a);l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new M;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),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 t===void 0&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new M),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new M),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(){function t(o){var s=o.geometry;if(s!==void 0){if(s.isGeometry)for(s=s.vertices,i=0,n=s.length;i<n;i++)r.copy(s[i]),r.applyMatrix4(o.matrixWorld),e.expandByPoint(r);else if(s.isBufferGeometry&&(s=s.attributes.position,s!==void 0))for(i=0,n=s.count;i<n;i++)r.fromBufferAttribute(s,i).applyMatrix4(o.matrixWorld),e.expandByPoint(r)}}var e,i,n,r=new M;return function(o){return e=this,o.updateMatrixWorld(!0),o.traverse(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||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 e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new M),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 M;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,i=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,i=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant},intersectsTriangle:function(){function t(u){var d,g=0;for(d=u.length-3;g<=d;g+=3){a.fromArray(u,g);var x=l.x*Math.abs(a.x)+l.y*Math.abs(a.y)+l.z*Math.abs(a.z),S=e.dot(a),P=i.dot(a),G=n.dot(a);if(Math.max(-Math.max(S,P,G),Math.min(S,P,G))>x)return!1}return!0}var e=new M,i=new M,n=new M,r=new M,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M;return function(u){return this.isEmpty()||(this.getCenter(h),l.subVectors(this.max,h),e.subVectors(u.a,h),i.subVectors(u.b,h),n.subVectors(u.c,h),r.subVectors(i,e),o.subVectors(n,i),s.subVectors(e,n),u=[0,-r.z,r.y,0,-o.z,o.y,0,-s.z,s.y,r.z,0,-r.x,o.z,0,-o.x,s.z,0,-s.x,-r.y,r.x,0,-o.y,o.x,0,-s.y,s.x,0],!t(u))||(u=[1,0,0,0,1,0,0,0,1],!t(u))?!1:(c.crossVectors(r,o),u=[c.x,c.y,c.z],t(u))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new M),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new M;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new M;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Dt),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 M,new M,new M,new M,new M,new M,new M,new M];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(Dt.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new At;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var r=i=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));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 0>=this.radius},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 i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new M),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return t===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new At),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),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(_t.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new M,e=new M;return function(i,n,r){return n=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),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 e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new M),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new M;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new M);var n=e.delta(t),r=this.normal.dot(n);if(r===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(r=-(e.start.dot(this.normal)+this.constant)/r,!(0>r||1<r))return i.copy(n).multiplyScalar(r).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new M),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new M,e=new yt;return function(i,n){return n=n||e.getNormalMatrix(i),i=this.coplanarPoint(t).applyMatrix4(i),n=this.normal.applyMatrix3(n).normalize(),this.constant=-i.dot(n),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(K.prototype,{set:function(t,e,i,n,r,o){var s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(o),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],h=i[6],l=i[7],c=i[8],u=i[9],d=i[10],g=i[11],x=i[12],S=i[13],P=i[14];return i=i[15],e[0].setComponents(o-t,l-s,g-c,i-x).normalize(),e[1].setComponents(o+t,l+s,g+c,i+x).normalize(),e[2].setComponents(o+n,l+a,g+u,i+S).normalize(),e[3].setComponents(o-n,l-a,g-u,i-S).normalize(),e[4].setComponents(o-r,l-h,g-d,i-P).normalize(),e[5].setComponents(o+r,l+h,g+d,i+P).normalize(),this},intersectsObject:function(){var t=new Dt;return function(e){var i=e.geometry;return i.boundingSphere===null&&i.computeBoundingSphere(),t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new Dt;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new M;return function(e){for(var i=this.planes,n=0;6>n;n++){var r=i[n];if(t.x=0<r.normal.x?e.max.x:e.min.x,t.y=0<r.normal.y?e.max.y:e.min.y,t.z=0<r.normal.z?e.max.z:e.min.z,0>r.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var Ie={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
285
|
+
`+e),c=e+c,l=er(a,35633,h+l),c=er(a,35632,c),a.attachShader(N,l),a.attachShader(N,c),n.index0AttributeName!==void 0?a.bindAttribLocation(N,0,n.index0AttributeName):o.morphTargets===!0&&a.bindAttribLocation(N,0,"position"),a.linkProgram(N),o=a.getProgramInfoLog(N).trim(),s=a.getShaderInfoLog(l).trim(),u=a.getShaderInfoLog(c).trim(),g=d=!0,a.getProgramParameter(N,35714)===!1?(d=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(N,35715),"gl.getProgramInfoLog",o,s,u)):o!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o):(s===""||u==="")&&(g=!1),g&&(this.diagnostics={runnable:d,material:n,programLog:o,vertexShader:{log:s,prefix:h},fragmentShader:{log:u,prefix:e}}),a.deleteShader(l),a.deleteShader(c);var q;this.getUniforms=function(){return q===void 0&&(q=new on(a,N,t)),q};var V;return this.getAttributes=function(){if(V===void 0){for(var ot={},T=a.getProgramParameter(N,35721),A=0;A<T;A++){var tt=a.getActiveAttrib(N,A).name;ot[tt]=a.getAttribLocation(N,tt)}V=ot}return V},this.destroy=function(){a.deleteProgram(N),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=r.name,this.id=uh++,this.code=i,this.usedTimes=1,this.program=N,this.vertexShader=l,this.fragmentShader=c,this}function R(t,e,i){function n(a,h){if(a)a.isTexture?l=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),l=a.texture.encoding);else var l=3e3;return l===3e3&&h&&(l=3007),l}var r=[],o={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},s="precision supportsVertexTextures map mapEncoding matcapEncoding 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".split(" ");this.getParameters=function(a,h,l,c,u,d,g){var x=o[a.type];if(g.isSkinnedMesh){var S=g.skeleton.bones;if(i.floatVertexTextures)S=1024;else{var P=Math.min(Math.floor((i.maxVertexUniforms-20)/4),S.length);P<S.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+S.length+" bones. This GPU supports "+P+"."),S=0):S=P}}else S=0;P=i.precision,a.precision!==null&&(P=i.getMaxPrecision(a.precision),P!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",P,"instead."));var G=t.getRenderTarget();return{shaderID:x,precision:P,supportsVertexTextures:i.vertexTextures,outputEncoding:n(G?G.texture:null,t.gammaOutput),map:!!a.map,mapEncoding:n(a.map,t.gammaInput),matcap:!!a.matcap,matcapEncoding:n(a.matcap,t.gammaInput),envMap:!!a.envMap,envMapMode:a.envMap&&a.envMap.mapping,envMapEncoding:n(a.envMap,t.gammaInput),envMapCubeUV:!!a.envMap&&(a.envMap.mapping===306||a.envMap.mapping===307),lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:n(a.emissiveMap,t.gammaInput),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===1,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,alphaMap:!!a.alphaMap,gradientMap:!!a.gradientMap,combine:a.combine,vertexColors:a.vertexColors,fog:!!c,useFog:a.fog,fogExp:c&&c.isFogExp2,flatShading:a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:a.skinning&&0<S,maxBones:S,useVertexTexture:i.floatVertexTextures,morphTargets:a.morphTargets,morphNormals:a.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:h.directional.length,numPointLights:h.point.length,numSpotLights:h.spot.length,numRectAreaLights:h.rectArea.length,numHemiLights:h.hemi.length,numClippingPlanes:u,numClipIntersection:d,dithering:a.dithering,shadowMapEnabled:t.shadowMap.enabled&&g.receiveShadow&&0<l.length,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,alphaTest:a.alphaTest,doubleSided:a.side===2,flipSided:a.side===1,depthPacking:a.depthPacking!==void 0?a.depthPacking:!1}},this.getProgramCode=function(a,h){var l=[];if(h.shaderID?l.push(h.shaderID):(l.push(a.fragmentShader),l.push(a.vertexShader)),a.defines!==void 0)for(var c in a.defines)l.push(c),l.push(a.defines[c]);for(c=0;c<s.length;c++)l.push(h[s[c]]);return l.push(a.onBeforeCompile.toString()),l.push(t.gammaOutput),l.push(t.gammaFactor),l.join()},this.acquireProgram=function(a,h,l,c){for(var u,d=0,g=r.length;d<g;d++){var x=r[d];if(x.code===c){u=x,++u.usedTimes;break}}return u===void 0&&(u=new E(t,e,c,a,h,l,i),r.push(u)),u},this.releaseProgram=function(a){if(--a.usedTimes===0){var h=r.indexOf(a);r[h]=r[r.length-1],r.pop(),a.destroy()}},this.programs=r}function L(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return i===void 0&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function y(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 W(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function C(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,o,s,a,h){var l=t[e];l===void 0?(l={id:r.id,object:r,geometry:o,material:s,program:s.program,renderOrder:r.renderOrder,z:a,group:h},t[e]=l):(l.id=r.id,l.object=r,l.geometry=o,l.material=s,l.program=s.program,l.renderOrder=r.renderOrder,l.z=a,l.group=h),(s.transparent===!0?n:i).push(l),e++},sort:function(){1<i.length&&i.sort(y),1<n.length&&n.sort(W)}}}function Q(){var t={};return{get:function(e,i){return e=e.id+","+i.id,i=t[e],i===void 0&&(i=new C,t[e]=i),i},dispose:function(){t={}}}}function rt(){var t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];switch(e.type){case"DirectionalLight":var i={direction:new M,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"SpotLight":i={position:new M,direction:new M,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $};break;case"PointLight":i={position:new M,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new $,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new M,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new M,halfWidth:new M,halfHeight:new M}}return t[e.id]=i}}}function et(){var t=new rt,e={id:ph++,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:[]},i=new M,n=new mt,r=new mt;return{setup:function(o,s,a){var h=0,l=0,c=0,u=0,d=0,g=0,x=0,S=0;a=a.matrixWorldInverse;for(var P=0,G=o.length;P<G;P++){var N=o[P],q=N.color,V=N.intensity,ot=N.distance,T=N.shadow&&N.shadow.map?N.shadow.map.texture:null;if(N.isAmbientLight)h+=q.r*V,l+=q.g*V,c+=q.b*V;else if(N.isDirectionalLight){var A=t.get(N);A.color.copy(N.color).multiplyScalar(N.intensity),A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.directionalShadowMap[u]=T,e.directionalShadowMatrix[u]=N.shadow.matrix,e.directional[u]=A,u++}else N.isSpotLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(q).multiplyScalar(V),A.distance=ot,A.direction.setFromMatrixPosition(N.matrixWorld),i.setFromMatrixPosition(N.target.matrixWorld),A.direction.sub(i),A.direction.transformDirection(a),A.coneCos=Math.cos(N.angle),A.penumbraCos=Math.cos(N.angle*(1-N.penumbra)),A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize),e.spotShadowMap[g]=T,e.spotShadowMatrix[g]=N.shadow.matrix,e.spot[g]=A,g++):N.isRectAreaLight?(A=t.get(N),A.color.copy(q).multiplyScalar(V),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),r.identity(),n.copy(N.matrixWorld),n.premultiply(a),r.extractRotation(n),A.halfWidth.set(.5*N.width,0,0),A.halfHeight.set(0,.5*N.height,0),A.halfWidth.applyMatrix4(r),A.halfHeight.applyMatrix4(r),e.rectArea[x]=A,x++):N.isPointLight?(A=t.get(N),A.position.setFromMatrixPosition(N.matrixWorld),A.position.applyMatrix4(a),A.color.copy(N.color).multiplyScalar(N.intensity),A.distance=N.distance,A.decay=N.decay,(A.shadow=N.castShadow)&&(q=N.shadow,A.shadowBias=q.bias,A.shadowRadius=q.radius,A.shadowMapSize=q.mapSize,A.shadowCameraNear=q.camera.near,A.shadowCameraFar=q.camera.far),e.pointShadowMap[d]=T,e.pointShadowMatrix[d]=N.shadow.matrix,e.point[d]=A,d++):N.isHemisphereLight&&(A=t.get(N),A.direction.setFromMatrixPosition(N.matrixWorld),A.direction.transformDirection(a),A.direction.normalize(),A.skyColor.copy(N.color).multiplyScalar(V),A.groundColor.copy(N.groundColor).multiplyScalar(V),e.hemi[S]=A,S++)}e.ambient[0]=h,e.ambient[1]=l,e.ambient[2]=c,e.directional.length=u,e.spot.length=g,e.rectArea.length=x,e.point.length=d,e.hemi.length=S,e.hash.stateID=e.id,e.hash.directionalLength=u,e.hash.pointLength=d,e.hash.spotLength=g,e.hash.rectAreaLength=x,e.hash.hemiLength=S,e.hash.shadowsLength=s.length},state:e}}function j(){var t=new et,e=[],i=[];return{init:function(){e.length=0,i.length=0},state:{lightsArray:e,shadowsArray:i,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(n){e.push(n)},pushShadow:function(n){i.push(n)}}}function Mt(){var t={};return{get:function(e,i){if(t[e.id]===void 0){var n=new j;t[e.id]={},t[e.id][i.id]=n}else t[e.id][i.id]===void 0?(n=new j,t[e.id][i.id]=n):n=t[e.id][i.id];return n},dispose:function(){t={}}}}function Tt(t){fe.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.setValues(t)}function gt(t){fe.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new M,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=this.skinning=!1,this.displacementMap=this.alphaMap=this.map=null,this.displacementScale=1,this.displacementBias=0,this.lights=this.fog=!1,this.setValues(t)}function Nt(t,e,i){function n(T,A,tt,vt,ft,at){var Ht=T.geometry,It=u,$t=T.customDepthMaterial;return tt&&(It=d,$t=T.customDistanceMaterial),$t?It=$t:($t=!1,A.morphTargets&&(Ht&&Ht.isBufferGeometry?$t=Ht.morphAttributes&&Ht.morphAttributes.position&&0<Ht.morphAttributes.position.length:Ht&&Ht.isGeometry&&($t=Ht.morphTargets&&0<Ht.morphTargets.length)),T.isSkinnedMesh&&A.skinning===!1&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",T),T=T.isSkinnedMesh&&A.skinning,Ht=0,$t&&(Ht|=1),T&&(Ht|=2),It=It[Ht]),t.localClippingEnabled&&A.clipShadows===!0&&A.clippingPlanes.length!==0&&(Ht=It.uuid,$t=A.uuid,T=g[Ht],T===void 0&&(T={},g[Ht]=T),Ht=T[$t],Ht===void 0&&(Ht=It.clone(),T[$t]=Ht),It=Ht),It.visible=A.visible,It.wireframe=A.wireframe,It.side=A.shadowSide!=null?A.shadowSide:x[A.side],It.clipShadows=A.clipShadows,It.clippingPlanes=A.clippingPlanes,It.clipIntersection=A.clipIntersection,It.wireframeLinewidth=A.wireframeLinewidth,It.linewidth=A.linewidth,tt&&It.isMeshDistanceMaterial&&(It.referencePosition.copy(vt),It.nearDistance=ft,It.farDistance=at),It}function r(T,A,tt,vt){if(T.visible!==!1){if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&T.castShadow&&(!T.frustumCulled||o.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(tt.matrixWorldInverse,T.matrixWorld);var ft=e.update(T),at=T.material;if(Array.isArray(at))for(var Ht=ft.groups,It=0,$t=Ht.length;It<$t;It++){var Xt=Ht[It],Qt=at[Xt.materialIndex];Qt&&Qt.visible&&(Qt=n(T,Qt,vt,c,tt.near,tt.far),t.renderBufferDirect(tt,null,ft,Qt,T,Xt))}else at.visible&&(Qt=n(T,at,vt,c,tt.near,tt.far),t.renderBufferDirect(tt,null,ft,Qt,T,null))}for(T=T.children,ft=0,at=T.length;ft<at;ft++)r(T[ft],A,tt,vt)}}var o=new K,s=new mt,a=new $,h=new $(i,i),l=new M,c=new M,u=Array(4),d=Array(4),g={},x={0:1,1:0,2:2},S=[new M(1,0,0),new M(-1,0,0),new M(0,0,1),new M(0,0,-1),new M(0,1,0),new M(0,-1,0)],P=[new M(0,1,0),new M(0,1,0),new M(0,1,0),new M(0,1,0),new M(0,0,1),new M(0,0,-1)],G=[new Y,new Y,new Y,new Y,new Y,new Y];for(i=0;i!==4;++i){var N=(i&1)!==0,q=(i&2)!==0,V=new Tt({depthPacking:3201,morphTargets:N,skinning:q});u[i]=V,N=new gt({morphTargets:N,skinning:q}),d[i]=N}var ot=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(T,A,tt){if(ot.enabled!==!1&&(ot.autoUpdate!==!1||ot.needsUpdate!==!1)&&T.length!==0){var vt=t.state;vt.disable(3042),vt.buffers.color.setClear(1,1,1,1),vt.buffers.depth.setTest(!0),vt.setScissorTest(!1);for(var ft,at=0,Ht=T.length;at<Ht;at++){var It=T[at];ft=It.shadow;var $t=It&&It.isPointLight;if(ft===void 0)console.warn("THREE.WebGLShadowMap:",It,"has no shadow.");else{var Xt=ft.camera;if(a.copy(ft.mapSize),a.min(h),$t){var Qt=a.x,re=a.y;G[0].set(2*Qt,re,Qt,re),G[1].set(0,re,Qt,re),G[2].set(3*Qt,re,Qt,re),G[3].set(Qt,re,Qt,re),G[4].set(3*Qt,0,Qt,re),G[5].set(Qt,0,Qt,re),a.x*=4,a.y*=2}for(ft.map===null&&(ft.map=new lt(a.x,a.y,{minFilter:1003,magFilter:1003,format:1023}),ft.map.texture.name=It.name+".shadowMap",Xt.updateProjectionMatrix()),ft.isSpotLightShadow&&ft.update(It),Qt=ft.map,re=ft.matrix,c.setFromMatrixPosition(It.matrixWorld),Xt.position.copy(c),$t?(ft=6,re.makeTranslation(-c.x,-c.y,-c.z)):(ft=1,l.setFromMatrixPosition(It.target.matrixWorld),Xt.lookAt(l),Xt.updateMatrixWorld(),re.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),re.multiply(Xt.projectionMatrix),re.multiply(Xt.matrixWorldInverse)),t.setRenderTarget(Qt),t.clear(),It=0;It<ft;It++)$t&&(l.copy(Xt.position),l.add(S[It]),Xt.up.copy(P[It]),Xt.lookAt(l),Xt.updateMatrixWorld(),vt.viewport(G[It])),s.multiplyMatrices(Xt.projectionMatrix,Xt.matrixWorldInverse),o.setFromMatrix(s),r(A,tt,Xt,$t)}}ot.needsUpdate=!1}}}function Et(t,e,i,n){function r(nt,ye,Te){var Ze=new Uint8Array(4),Yt=t.createTexture();for(t.bindTexture(nt,Yt),t.texParameteri(nt,10241,9728),t.texParameteri(nt,10240,9728),nt=0;nt<Te;nt++)t.texImage2D(ye+nt,0,6408,1,1,0,6408,5121,Ze);return Yt}function o(nt,ye){G[nt]=1,N[nt]===0&&(t.enableVertexAttribArray(nt),N[nt]=1),q[nt]!==ye&&((n.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](nt,ye),q[nt]=ye)}function s(nt){V[nt]!==!0&&(t.enable(nt),V[nt]=!0)}function a(nt){V[nt]!==!1&&(t.disable(nt),V[nt]=!1)}function h(nt,ye,Te,Ze,Yt,ue,_e,Be){if(nt===0)A&&(a(3042),A=!1);else if(A||(s(3042),A=!0),nt!==5){if(nt!==tt||Be!==Xt){if((vt!==100||Ht!==100)&&(t.blendEquation(32774),Ht=vt=100),Be)switch(nt){case 1:t.blendFuncSeparate(1,771,1,771);break;case 2:t.blendFunc(1,1);break;case 3:t.blendFuncSeparate(0,0,769,771);break;case 4:t.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}else switch(nt){case 1:t.blendFuncSeparate(770,771,1,771);break;case 2:t.blendFunc(770,1);break;case 3:t.blendFunc(0,769);break;case 4:t.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",nt)}$t=It=at=ft=null,tt=nt,Xt=Be}}else Yt=Yt||ye,ue=ue||Te,_e=_e||Ze,(ye!==vt||Yt!==Ht)&&(t.blendEquationSeparate(i.convert(ye),i.convert(Yt)),vt=ye,Ht=Yt),(Te!==ft||Ze!==at||ue!==It||_e!==$t)&&(t.blendFuncSeparate(i.convert(Te),i.convert(Ze),i.convert(ue),i.convert(_e)),ft=Te,at=Ze,It=ue,$t=_e),tt=nt,Xt=null}function l(nt){Qt!==nt&&(nt?t.frontFace(2304):t.frontFace(2305),Qt=nt)}function c(nt){nt!==0?(s(2884),nt!==re&&(nt===1?t.cullFace(1029):nt===2?t.cullFace(1028):t.cullFace(1032))):a(2884),re=nt}function u(nt,ye,Te){nt?(s(32823),(Ae!==ye||fi!==Te)&&(t.polygonOffset(ye,Te),Ae=ye,fi=Te)):a(32823)}function d(nt){nt===void 0&&(nt=33984+li-1),pi!==nt&&(t.activeTexture(nt),pi=nt)}var g=new function(){var nt=!1,ye=new Y,Te=null,Ze=new Y(0,0,0,0);return{setMask:function(Yt){Te===Yt||nt||(t.colorMask(Yt,Yt,Yt,Yt),Te=Yt)},setLocked:function(Yt){nt=Yt},setClear:function(Yt,ue,_e,Be,De){De===!0&&(Yt*=Be,ue*=Be,_e*=Be),ye.set(Yt,ue,_e,Be),Ze.equals(ye)===!1&&(t.clearColor(Yt,ue,_e,Be),Ze.copy(ye))},reset:function(){nt=!1,Te=null,Ze.set(-1,0,0,0)}}},x=new function(){var nt=!1,ye=null,Te=null,Ze=null;return{setTest:function(Yt){Yt?s(2929):a(2929)},setMask:function(Yt){ye===Yt||nt||(t.depthMask(Yt),ye=Yt)},setFunc:function(Yt){if(Te!==Yt){if(Yt)switch(Yt){case 0:t.depthFunc(512);break;case 1:t.depthFunc(519);break;case 2:t.depthFunc(513);break;case 3:t.depthFunc(515);break;case 4:t.depthFunc(514);break;case 5:t.depthFunc(518);break;case 6:t.depthFunc(516);break;case 7:t.depthFunc(517);break;default:t.depthFunc(515)}else t.depthFunc(515);Te=Yt}},setLocked:function(Yt){nt=Yt},setClear:function(Yt){Ze!==Yt&&(t.clearDepth(Yt),Ze=Yt)},reset:function(){nt=!1,Ze=Te=ye=null}}},S=new function(){var nt=!1,ye=null,Te=null,Ze=null,Yt=null,ue=null,_e=null,Be=null,De=null;return{setTest:function(xt){xt?s(2960):a(2960)},setMask:function(xt){ye===xt||nt||(t.stencilMask(xt),ye=xt)},setFunc:function(xt,xe,ve){(Te!==xt||Ze!==xe||Yt!==ve)&&(t.stencilFunc(xt,xe,ve),Te=xt,Ze=xe,Yt=ve)},setOp:function(xt,xe,ve){(ue!==xt||_e!==xe||Be!==ve)&&(t.stencilOp(xt,xe,ve),ue=xt,_e=xe,Be=ve)},setLocked:function(xt){nt=xt},setClear:function(xt){De!==xt&&(t.clearStencil(xt),De=xt)},reset:function(){nt=!1,De=Be=_e=ue=Yt=Ze=Te=ye=null}}},P=t.getParameter(34921),G=new Uint8Array(P),N=new Uint8Array(P),q=new Uint8Array(P),V={},ot=null,T=null,A=null,tt=null,vt=null,ft=null,at=null,Ht=null,It=null,$t=null,Xt=!1,Qt=null,re=null,me=null,Ae=null,fi=null,li=t.getParameter(35661),Ye=!1;P=0,P=t.getParameter(7938),P.indexOf("WebGL")!==-1?(P=parseFloat(/^WebGL ([0-9])/.exec(P)[1]),Ye=1<=P):P.indexOf("OpenGL ES")!==-1&&(P=parseFloat(/^OpenGL ES ([0-9])/.exec(P)[1]),Ye=2<=P);var pi=null,ti={},Mi=new Y,qt=new Y,ge={};return ge[3553]=r(3553,3553,1),ge[34067]=r(34067,34069,6),g.setClear(0,0,0,1),x.setClear(1),S.setClear(0),s(2929),x.setFunc(3),l(!1),c(1),s(2884),h(0),{buffers:{color:g,depth:x,stencil:S},initAttributes:function(){for(var nt=0,ye=G.length;nt<ye;nt++)G[nt]=0},enableAttribute:function(nt){o(nt,0)},enableAttributeAndDivisor:o,disableUnusedAttributes:function(){for(var nt=0,ye=N.length;nt!==ye;++nt)N[nt]!==G[nt]&&(t.disableVertexAttribArray(nt),N[nt]=0)},enable:s,disable:a,getCompressedTextureFormats:function(){if(ot===null&&(ot=[],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 nt=t.getParameter(34467),ye=0;ye<nt.length;ye++)ot.push(nt[ye]);return ot},useProgram:function(nt){return T!==nt?(t.useProgram(nt),T=nt,!0):!1},setBlending:h,setMaterial:function(nt,ye){nt.side===2?a(2884):s(2884);var Te=nt.side===1;ye&&(Te=!Te),l(Te),nt.blending===1&&nt.transparent===!1?h(0):h(nt.blending,nt.blendEquation,nt.blendSrc,nt.blendDst,nt.blendEquationAlpha,nt.blendSrcAlpha,nt.blendDstAlpha,nt.premultipliedAlpha),x.setFunc(nt.depthFunc),x.setTest(nt.depthTest),x.setMask(nt.depthWrite),g.setMask(nt.colorWrite),u(nt.polygonOffset,nt.polygonOffsetFactor,nt.polygonOffsetUnits)},setFlipSided:l,setCullFace:c,setLineWidth:function(nt){nt!==me&&(Ye&&t.lineWidth(nt),me=nt)},setPolygonOffset:u,setScissorTest:function(nt){nt?s(3089):a(3089)},activeTexture:d,bindTexture:function(nt,ye){pi===null&&d();var Te=ti[pi];Te===void 0&&(Te={type:void 0,texture:void 0},ti[pi]=Te),(Te.type!==nt||Te.texture!==ye)&&(t.bindTexture(nt,ye||ge[nt]),Te.type=nt,Te.texture=ye)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(nt){console.error("THREE.WebGLState:",nt)}},scissor:function(nt){Mi.equals(nt)===!1&&(t.scissor(nt.x,nt.y,nt.z,nt.w),Mi.copy(nt))},viewport:function(nt){qt.equals(nt)===!1&&(t.viewport(nt.x,nt.y,nt.z,nt.w),qt.copy(nt))},reset:function(){for(var nt=0;nt<N.length;nt++)N[nt]===1&&(t.disableVertexAttribArray(nt),N[nt]=0);V={},pi=ot=null,ti={},re=Qt=tt=T=null,g.reset(),x.reset(),S.reset()}}}function oe(t,e,i,n,r,o,s){function a(T,A){if(T.width>A||T.height>A){if("data"in T){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+T.width+"x"+T.height+").");return}A/=Math.max(T.width,T.height);var tt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return tt.width=Math.floor(T.width*A),tt.height=Math.floor(T.height*A),tt.getContext("2d").drawImage(T,0,0,T.width,T.height,0,0,tt.width,tt.height),console.warn("THREE.WebGLRenderer: image is too big ("+T.width+"x"+T.height+"). Resized to "+tt.width+"x"+tt.height),tt}return T}function h(T){return Se.isPowerOfTwo(T.width)&&Se.isPowerOfTwo(T.height)}function l(T,A){return T.generateMipmaps&&A&&T.minFilter!==1003&&T.minFilter!==1006}function c(T,A,tt,vt){t.generateMipmap(T),n.get(A).__maxMipLevel=Math.log(Math.max(tt,vt))*Math.LOG2E}function u(T,A){if(!r.isWebGL2)return T;if(T===6403){if(A===5126)return 33326;if(A===5131)return 33325;if(A===5121)return 33321}if(T===6407){if(A===5126)return 34837;if(A===5131)return 34843;if(A===5121)return 32849}if(T===6408){if(A===5126)return 34836;if(A===5131)return 34842;if(A===5121)return 32856}return T}function d(T){return T===1003||T===1004||T===1005?9728:9729}function g(T){T=T.target,T.removeEventListener("dispose",g);t:{var A=n.get(T);if(T.image&&A.__image__webglTextureCube)t.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)break t;t.deleteTexture(A.__webglTexture)}n.remove(T)}T.isVideoTexture&&delete V[T.id],s.memory.textures--}function x(T){T=T.target,T.removeEventListener("dispose",x);var A=n.get(T),tt=n.get(T.texture);if(T){if(tt.__webglTexture!==void 0&&t.deleteTexture(tt.__webglTexture),T.depthTexture&&T.depthTexture.dispose(),T.isWebGLRenderTargetCube)for(tt=0;6>tt;tt++)t.deleteFramebuffer(A.__webglFramebuffer[tt]),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer[tt]);else t.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&t.deleteRenderbuffer(A.__webglDepthbuffer);n.remove(T.texture),n.remove(T)}s.memory.textures--}function S(T,A){var tt=n.get(T);if(T.isVideoTexture){var vt=T.id,ft=s.render.frame;V[vt]!==ft&&(V[vt]=ft,T.update())}if(0<T.version&&tt.__version!==T.version)if(vt=T.image,vt===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(vt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{G(tt,T,A);return}i.activeTexture(33984+A),i.bindTexture(3553,tt.__webglTexture)}function P(T,A,tt){tt?(t.texParameteri(T,10242,o.convert(A.wrapS)),t.texParameteri(T,10243,o.convert(A.wrapT)),t.texParameteri(T,10240,o.convert(A.magFilter)),t.texParameteri(T,10241,o.convert(A.minFilter))):(t.texParameteri(T,10242,33071),t.texParameteri(T,10243,33071),A.wrapS===1001&&A.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(T,10240,d(A.magFilter)),t.texParameteri(T,10241,d(A.minFilter)),A.minFilter!==1003&&A.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!(tt=e.get("EXT_texture_filter_anisotropic"))||A.type===1015&&e.get("OES_texture_float_linear")===null||A.type===1016&&(r.isWebGL2||e.get("OES_texture_half_float_linear"))===null||!(1<A.anisotropy||n.get(A).__currentAnisotropy)||(t.texParameterf(T,tt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}function G(T,A,tt){var vt=A.isDataTexture3D?32879:3553;T.__webglInit===void 0&&(T.__webglInit=!0,A.addEventListener("dispose",g),T.__webglTexture=t.createTexture(),s.memory.textures++),i.activeTexture(33984+tt),i.bindTexture(vt,T.__webglTexture),t.pixelStorei(37440,A.flipY),t.pixelStorei(37441,A.premultiplyAlpha),t.pixelStorei(3317,A.unpackAlignment),tt=a(A.image,r.maxTextureSize);var ft=r.isWebGL2?!1:A.wrapS!==1001||A.wrapT!==1001||A.minFilter!==1003&&A.minFilter!==1006;ft&&h(tt)===!1&&(tt instanceof HTMLImageElement||tt instanceof HTMLCanvasElement||tt instanceof ImageBitmap)&&(ot===void 0&&(ot=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),ot.width=Se.floorPowerOfTwo(tt.width),ot.height=Se.floorPowerOfTwo(tt.height),ot.getContext("2d").drawImage(tt,0,0,ot.width,ot.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+tt.width+"x"+tt.height+"). Resized to "+ot.width+"x"+ot.height),tt=ot),ft=h(tt);var at=o.convert(A.format),Ht=o.convert(A.type),It=u(at,Ht);P(vt,A,ft);var $t=A.mipmaps;if(A.isDepthTexture){if(It=6402,A.type===1015){if(!r.isWebGL2)throw Error("Float Depth Texture only supported in WebGL2.0");It=36012}else r.isWebGL2&&(It=33189);A.format===1026&&It===6402&&A.type!==1012&&A.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=1012,Ht=o.convert(A.type)),A.format===1027&&(It=34041,A.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=1020,Ht=o.convert(A.type))),i.texImage2D(3553,0,It,tt.width,tt.height,0,at,Ht,null)}else if(A.isDataTexture)if(0<$t.length&&ft){for(var Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],i.texImage2D(3553,Xt,It,vt.width,vt.height,0,at,Ht,vt.data);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,tt.width,tt.height,0,at,Ht,tt.data),T.__maxMipLevel=0;else if(A.isCompressedTexture){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],A.format!==1023&&A.format!==1022?-1<i.getCompressedTextureFormats().indexOf(at)?i.compressedTexImage2D(3553,Xt,It,vt.width,vt.height,0,vt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(3553,Xt,It,vt.width,vt.height,0,at,Ht,vt.data);T.__maxMipLevel=$t.length-1}else if(A.isDataTexture3D)i.texImage3D(32879,0,It,tt.width,tt.height,tt.depth,0,at,Ht,tt.data),T.__maxMipLevel=0;else if(0<$t.length&&ft){for(Xt=0,Qt=$t.length;Xt<Qt;Xt++)vt=$t[Xt],i.texImage2D(3553,Xt,It,at,Ht,vt);A.generateMipmaps=!1,T.__maxMipLevel=$t.length-1}else i.texImage2D(3553,0,It,at,Ht,tt),T.__maxMipLevel=0;l(A,ft)&&c(3553,A,tt.width,tt.height),T.__version=A.version,A.onUpdate&&A.onUpdate(A)}function N(T,A,tt,vt){var ft=o.convert(A.texture.format),at=o.convert(A.texture.type),Ht=u(ft,at);i.texImage2D(vt,0,Ht,A.width,A.height,0,ft,at,null),t.bindFramebuffer(36160,T),t.framebufferTexture2D(36160,tt,vt,n.get(A.texture).__webglTexture,0),t.bindFramebuffer(36160,null)}function q(T,A){t.bindRenderbuffer(36161,T),A.depthBuffer&&!A.stencilBuffer?(t.renderbufferStorage(36161,33189,A.width,A.height),t.framebufferRenderbuffer(36160,36096,36161,T)):A.depthBuffer&&A.stencilBuffer?(t.renderbufferStorage(36161,34041,A.width,A.height),t.framebufferRenderbuffer(36160,33306,36161,T)):t.renderbufferStorage(36161,32854,A.width,A.height),t.bindRenderbuffer(36161,null)}var V={},ot;this.setTexture2D=S,this.setTexture3D=function(T,A){var tt=n.get(T);0<T.version&&tt.__version!==T.version?G(tt,T,A):(i.activeTexture(33984+A),i.bindTexture(32879,tt.__webglTexture))},this.setTextureCube=function(T,A){var tt=n.get(T);if(T.image.length===6)if(0<T.version&&tt.__version!==T.version){tt.__image__webglTextureCube||(T.addEventListener("dispose",g),tt.__image__webglTextureCube=t.createTexture(),s.memory.textures++),i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube),t.pixelStorei(37440,T.flipY),A=T&&T.isCompressedTexture;for(var vt=T.image[0]&&T.image[0].isDataTexture,ft=[],at=0;6>at;at++)ft[at]=A||vt?vt?T.image[at].image:T.image[at]:a(T.image[at],r.maxCubemapSize);var Ht=ft[0],It=h(Ht),$t=o.convert(T.format),Xt=o.convert(T.type),Qt=u($t,Xt);for(P(34067,T,It),at=0;6>at;at++)if(A)for(var re,me=ft[at].mipmaps,Ae=0,fi=me.length;Ae<fi;Ae++)re=me[Ae],T.format!==1023&&T.format!==1022?-1<i.getCompressedTextureFormats().indexOf($t)?i.compressedTexImage2D(34069+at,Ae,Qt,re.width,re.height,0,re.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(34069+at,Ae,Qt,re.width,re.height,0,$t,Xt,re.data);else vt?i.texImage2D(34069+at,0,Qt,ft[at].width,ft[at].height,0,$t,Xt,ft[at].data):i.texImage2D(34069+at,0,Qt,$t,Xt,ft[at]);tt.__maxMipLevel=A?me.length-1:0,l(T,It)&&c(34067,T,Ht.width,Ht.height),tt.__version=T.version,T.onUpdate&&T.onUpdate(T)}else i.activeTexture(33984+A),i.bindTexture(34067,tt.__image__webglTextureCube)},this.setTextureCubeDynamic=function(T,A){i.activeTexture(33984+A),i.bindTexture(34067,n.get(T).__webglTexture)},this.setupRenderTarget=function(T){var A=n.get(T),tt=n.get(T.texture);T.addEventListener("dispose",x),tt.__webglTexture=t.createTexture(),s.memory.textures++;var vt=T.isWebGLRenderTargetCube===!0,ft=h(T);if(vt){A.__webglFramebuffer=[];for(var at=0;6>at;at++)A.__webglFramebuffer[at]=t.createFramebuffer()}else A.__webglFramebuffer=t.createFramebuffer();if(vt){for(i.bindTexture(34067,tt.__webglTexture),P(34067,T.texture,ft),at=0;6>at;at++)N(A.__webglFramebuffer[at],T,36064,34069+at);l(T.texture,ft)&&c(34067,T.texture,T.width,T.height),i.bindTexture(34067,null)}else i.bindTexture(3553,tt.__webglTexture),P(3553,T.texture,ft),N(A.__webglFramebuffer,T,36064,3553),l(T.texture,ft)&&c(3553,T.texture,T.width,T.height),i.bindTexture(3553,null);if(T.depthBuffer){if(A=n.get(T),tt=T.isWebGLRenderTargetCube===!0,T.depthTexture){if(tt)throw Error("target.depthTexture not supported in Cube render targets");if(T&&T.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,A.__webglFramebuffer),!T.depthTexture||!T.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");if(n.get(T.depthTexture).__webglTexture&&T.depthTexture.image.width===T.width&&T.depthTexture.image.height===T.height||(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),S(T.depthTexture,0),A=n.get(T.depthTexture).__webglTexture,T.depthTexture.format===1026)t.framebufferTexture2D(36160,36096,3553,A,0);else if(T.depthTexture.format===1027)t.framebufferTexture2D(36160,33306,3553,A,0);else throw Error("Unknown depthTexture format")}else if(tt)for(A.__webglDepthbuffer=[],tt=0;6>tt;tt++)t.bindFramebuffer(36160,A.__webglFramebuffer[tt]),A.__webglDepthbuffer[tt]=t.createRenderbuffer(),q(A.__webglDepthbuffer[tt],T);else t.bindFramebuffer(36160,A.__webglFramebuffer),A.__webglDepthbuffer=t.createRenderbuffer(),q(A.__webglDepthbuffer,T);t.bindFramebuffer(36160,null)}},this.updateRenderTargetMipmap=function(T){var A=T.texture,tt=h(T);if(l(A,tt)){tt=T.isWebGLRenderTargetCube?34067:3553;var vt=n.get(A).__webglTexture;i.bindTexture(tt,vt),c(tt,A,T.width,T.height),i.bindTexture(tt,null)}}}function ne(t,e,i){return{convert:function(n){if(n===1e3)return 10497;if(n===1001)return 33071;if(n===1002)return 33648;if(n===1003)return 9728;if(n===1004)return 9984;if(n===1005)return 9986;if(n===1006)return 9729;if(n===1007)return 9985;if(n===1008)return 9987;if(n===1009)return 5121;if(n===1017)return 32819;if(n===1018)return 32820;if(n===1019)return 33635;if(n===1010)return 5120;if(n===1011)return 5122;if(n===1012)return 5123;if(n===1013)return 5124;if(n===1014)return 5125;if(n===1015)return 5126;if(n===1016){if(i.isWebGL2)return 5131;var r=e.get("OES_texture_half_float");if(r!==null)return r.HALF_FLOAT_OES}if(n===1021)return 6406;if(n===1022)return 6407;if(n===1023)return 6408;if(n===1024)return 6409;if(n===1025)return 6410;if(n===1026)return 6402;if(n===1027)return 34041;if(n===1028)return 6403;if(n===100)return 32774;if(n===101)return 32778;if(n===102)return 32779;if(n===200)return 0;if(n===201)return 1;if(n===202)return 768;if(n===203)return 769;if(n===204)return 770;if(n===205)return 771;if(n===206)return 772;if(n===207)return 773;if(n===208)return 774;if(n===209)return 775;if(n===210)return 776;if((n===33776||n===33777||n===33778||n===33779)&&(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null)){if(n===33776)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===35840||n===35841||n===35842||n===35843)&&(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null)){if(n===35840)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===36196&&(r=e.get("WEBGL_compressed_texture_etc1"),r!==null))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)&&(r=e.get("WEBGL_compressed_texture_astc"),r!==null))return n;if(n===103||n===104){if(i.isWebGL2){if(n===103)return 32775;if(n===104)return 32776}if(r=e.get("EXT_blend_minmax"),r!==null){if(n===103)return r.MIN_EXT;if(n===104)return r.MAX_EXT}}if(n===1020){if(i.isWebGL2)return 34042;if(r=e.get("WEBGL_depth_texture"),r!==null)return r.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Pe(){b.call(this),this.type="Group"}function Kt(){b.call(this),this.type="Camera",this.matrixWorldInverse=new mt,this.projectionMatrix=new mt,this.projectionMatrixInverse=new mt}function Bt(t,e,i,n){Kt.call(this),this.type="PerspectiveCamera",this.fov=t!==void 0?t:50,this.zoom=1,this.near=i!==void 0?i:.1,this.far=n!==void 0?n:2e3,this.focus=10,this.aspect=e!==void 0?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function te(t){Bt.call(this),this.cameras=t||[]}function bt(t,e,i){_a.setFromMatrixPosition(e.matrixWorld),xa.setFromMatrixPosition(i.matrixWorld);var n=_a.distanceTo(xa),r=e.projectionMatrix.elements,o=i.projectionMatrix.elements,s=r[14]/(r[10]-1);i=r[14]/(r[10]+1);var a=(r[9]+1)/r[5],h=(r[9]-1)/r[5],l=(r[8]-1)/r[0],c=(o[8]+1)/o[0];r=s*l,o=s*c,c=n/(-l+c),l=c*-l,e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(l),t.translateZ(c),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.getInverse(t.matrixWorld),e=s+c,s=i+c,t.projectionMatrix.makePerspective(r-l,o+(n-l),a*i/s*e,h*i/s*e,e,s)}function Le(t){function e(){return r!==null&&r.isPresenting===!0}function i(){if(e()){var T=r.getEyeParameters("left"),A=T.renderWidth*c;T=T.renderHeight*c,q=t.getPixelRatio(),N=t.getSize(),t.setDrawingBufferSize(2*A,T,1),ot.start()}else n.enabled&&t.setDrawingBufferSize(N.width,N.height,q),ot.stop()}var n=this,r=null,o=null,s=null,a=[],h=new mt,l=new mt,c=1,u="stage";typeof window<"u"&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",i,!1));var d=new mt,g=new ht,x=new M,S=new Bt;S.bounds=new Y(0,0,.5,1),S.layers.enable(1);var P=new Bt;P.bounds=new Y(.5,0,.5,1),P.layers.enable(2);var G=new te([S,P]);G.layers.enable(1),G.layers.enable(2);var N,q,V=[];this.enabled=!1,this.getController=function(T){var A=a[T];return A===void 0&&(A=new Pe,A.matrixAutoUpdate=!1,A.visible=!1,a[T]=A),A},this.getDevice=function(){return r},this.setDevice=function(T){T!==void 0&&(r=T),ot.setContext(T)},this.setFramebufferScaleFactor=function(T){c=T},this.setFrameOfReferenceType=function(T){u=T},this.setPoseTarget=function(T){T!==void 0&&(s=T)},this.getCamera=function(T){var A=u==="stage"?1.6:0;if(r===null)return T.position.set(0,A,0),T;if(r.depthNear=T.near,r.depthFar=T.far,r.getFrameData(o),u==="stage"){var tt=r.stageParameters;tt?h.fromArray(tt.sittingToStandingTransform):h.makeTranslation(0,A,0)}if(A=o.pose,tt=s!==null?s:T,tt.matrix.copy(h),tt.matrix.decompose(tt.position,tt.quaternion,tt.scale),A.orientation!==null&&(g.fromArray(A.orientation),tt.quaternion.multiply(g)),A.position!==null&&(g.setFromRotationMatrix(h),x.fromArray(A.position),x.applyQuaternion(g),tt.position.add(x)),tt.updateMatrixWorld(),r.isPresenting===!1)return T;S.near=T.near,P.near=T.near,S.far=T.far,P.far=T.far,S.matrixWorldInverse.fromArray(o.leftViewMatrix),P.matrixWorldInverse.fromArray(o.rightViewMatrix),l.getInverse(h),u==="stage"&&(S.matrixWorldInverse.multiply(l),P.matrixWorldInverse.multiply(l)),T=tt.parent,T!==null&&(d.getInverse(T.matrixWorld),S.matrixWorldInverse.multiply(d),P.matrixWorldInverse.multiply(d)),S.matrixWorld.getInverse(S.matrixWorldInverse),P.matrixWorld.getInverse(P.matrixWorldInverse),S.projectionMatrix.fromArray(o.leftProjectionMatrix),P.projectionMatrix.fromArray(o.rightProjectionMatrix),bt(G,S,P),T=r.getLayers(),T.length&&(T=T[0],T.leftBounds!==null&&T.leftBounds.length===4&&S.bounds.fromArray(T.leftBounds),T.rightBounds!==null&&T.rightBounds.length===4&&P.bounds.fromArray(T.rightBounds));t:for(T=0;T<a.length;T++){A=a[T];e:{tt=T;for(var vt=navigator.getGamepads&&navigator.getGamepads(),ft=0,at=0,Ht=vt.length;ft<Ht;ft++){var It=vt[ft];if(It&&(It.id==="Daydream Controller"||It.id==="Gear VR Controller"||It.id==="Oculus Go Controller"||It.id==="OpenVR Gamepad"||It.id.startsWith("Oculus Touch")||It.id.startsWith("Spatial Controller"))){if(at===tt){tt=It;break e}at++}}tt=void 0}if(tt!==void 0&&tt.pose!==void 0){if(tt.pose===null)break t;vt=tt.pose,vt.hasPosition===!1&&A.position.set(.2,-.6,-.05),vt.position!==null&&A.position.fromArray(vt.position),vt.orientation!==null&&A.quaternion.fromArray(vt.orientation),A.matrix.compose(A.position,A.quaternion,A.scale),A.matrix.premultiply(h),A.matrix.decompose(A.position,A.quaternion,A.scale),A.matrixWorldNeedsUpdate=!0,A.visible=!0,vt=tt.id==="Daydream Controller"?0:1,V[T]!==tt.buttons[vt].pressed&&(V[T]=tt.buttons[vt].pressed,V[T]===!0?A.dispatchEvent({type:"selectstart"}):(A.dispatchEvent({type:"selectend"}),A.dispatchEvent({type:"select"})))}else A.visible=!1}return G},this.getStandingMatrix=function(){return h},this.isPresenting=e;var ot=new m;this.setAnimationLoop=function(T){ot.setAnimationLoop(T)},this.submitFrame=function(){e()&&r.submitFrame()},this.dispose=function(){typeof window<"u"&&window.removeEventListener("vrdisplaypresentchange",i)}}function Zt(t){function e(){return a!==null&&l!==null}function i(q){var V=d[g.indexOf(q.inputSource)];V&&V.dispatchEvent({type:q.type})}function n(){t.setFramebuffer(null),N.stop()}function r(q,V){V===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(V.matrixWorld,q.matrix),q.matrixWorldInverse.getInverse(q.matrixWorld)}var o=t.context,s=null,a=null,h=1,l=null,c="stage",u=null,d=[],g=[],x=new Bt;x.layers.enable(1),x.viewport=new Y;var S=new Bt;S.layers.enable(2),S.viewport=new Y;var P=new te([x,S]);P.layers.enable(1),P.layers.enable(2),this.enabled=!1,this.getController=function(q){var V=d[q];return V===void 0&&(V=new Pe,V.matrixAutoUpdate=!1,V.visible=!1,d[q]=V),V},this.getDevice=function(){return s},this.setDevice=function(q){q!==void 0&&(s=q),q instanceof XRDevice&&o.setCompatibleXRDevice(q)},this.setFramebufferScaleFactor=function(q){h=q},this.setFrameOfReferenceType=function(q){c=q},this.setSession=function(q){a=q,a!==null&&(a.addEventListener("select",i),a.addEventListener("selectstart",i),a.addEventListener("selectend",i),a.addEventListener("end",n),a.baseLayer=new XRWebGLLayer(a,o,{framebufferScaleFactor:h}),a.requestFrameOfReference(c).then(function(V){l=V,t.setFramebuffer(a.baseLayer.framebuffer),N.setContext(a),N.start()}),g=a.getInputSources(),a.addEventListener("inputsourceschange",function(){g=a.getInputSources(),console.log(g);for(var V=0;V<d.length;V++)d[V].userData.inputSource=g[V]}))},this.getCamera=function(q){if(e()){var V=q.parent,ot=P.cameras;r(P,V);for(var T=0;T<ot.length;T++)r(ot[T],V);for(q.matrixWorld.copy(P.matrixWorld),q=q.children,T=0,V=q.length;T<V;T++)q[T].updateMatrixWorld(!0);return bt(P,x,S),P}return q},this.isPresenting=e;var G=null,N=new m;N.setAnimationLoop(function(q,V){if(u=V.getDevicePose(l),u!==null)for(var ot=a.baseLayer,T=V.views,A=0;A<T.length;A++){var tt=T[A],vt=ot.getViewport(tt),ft=u.getViewMatrix(tt),at=P.cameras[A];at.matrix.fromArray(ft).getInverse(at.matrix),at.projectionMatrix.fromArray(tt.projectionMatrix),at.viewport.set(vt.x,vt.y,vt.width,vt.height),A===0&&P.matrix.copy(at.matrix)}for(A=0;A<d.length;A++){if(ot=d[A],(T=g[A])&&(T=V.getInputPose(T,l),T!==null)){"targetRay"in T?ot.matrix.elements=T.targetRay.transformMatrix:"pointerMatrix"in T&&(ot.matrix.elements=T.pointerMatrix),ot.matrix.decompose(ot.position,ot.rotation,ot.scale),ot.visible=!0;continue}ot.visible=!1}G&&G(q)}),this.setAnimationLoop=function(q){G=q},this.dispose=function(){},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Ft(t){var e;function i(){xe=new en(xt),ve=new ji(xt,xe,t),ve.isWebGL2||(xe.get("WEBGL_depth_texture"),xe.get("OES_texture_float"),xe.get("OES_texture_half_float"),xe.get("OES_texture_half_float_linear"),xe.get("OES_standard_derivatives"),xe.get("OES_element_index_uint"),xe.get("ANGLE_instanced_arrays")),xe.get("OES_texture_float_linear"),dn=new ne(xt,xe,ve),we=new Et(xt,xe,dn,ve),we.scissor(Ye.copy(ye).multiplyScalar(ge)),we.viewport(li.copy(nt).multiplyScalar(ge)),Bi=new Si,mi=new L,Ln=new oe(xt,xe,we,mi,ve,dn,Bi),Jo=new f(xt),Bs=new ci(xt,Jo,Bi),br=new Ci(Bs,Bi),Ea=new nn(xt),Jn=new R(at,xe,ve),Qo=new Q,Or=new Mt,Rn=new Mn(at,we,br,T),Pa=new Cn(xt,xe,Bi,ve),Aa=new Oe(xt,xe,Bi,ve),Bi.programs=Jn.programs,at.context=xt,at.capabilities=ve,at.extensions=xe,at.properties=mi,at.renderLists=Qo,at.state=we,at.info=Bi}function n(I){I.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Ht=!0}function r(){console.log("THREE.WebGLRenderer: Context Restored."),Ht=!1,i()}function o(I){I=I.target,I.removeEventListener("dispose",o),s(I),mi.remove(I)}function s(I){var k=mi.get(I).program;I.program=void 0,k!==void 0&&Jn.releaseProgram(k)}function a(I,k){I.render(function(z){at.renderBufferImmediate(z,k)})}function h(I,k,z){if(I.visible!==!1){if(I.layers.test(k.layers)){if(I.isLight)ft.pushLight(I),I.castShadow&&ft.pushShadow(I);else if(I.isSprite){if(!I.frustumCulled||Ze.intersectsSprite(I)){z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be);var Wt=br.update(I),ee=I.material;vt.push(I,Wt,ee,De.z,null)}}else if(I.isImmediateRenderObject)z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),vt.push(I,null,I.material,De.z,null);else if((I.isMesh||I.isLine||I.isPoints)&&(I.isSkinnedMesh&&I.skeleton.update(),!I.frustumCulled||Ze.intersectsObject(I)))if(z&&De.setFromMatrixPosition(I.matrixWorld).applyMatrix4(Be),Wt=br.update(I),ee=I.material,Array.isArray(ee))for(var ce=Wt.groups,Vt=0,de=ce.length;Vt<de;Vt++){var Ue=ce[Vt],ni=ee[Ue.materialIndex];ni&&ni.visible&&vt.push(I,Wt,ni,De.z,Ue)}else ee.visible&&vt.push(I,Wt,ee,De.z,null)}for(I=I.children,Vt=0,de=I.length;Vt<de;Vt++)h(I[Vt],k,z)}}function l(I,k,z,Wt){for(var ee=0,ce=I.length;ee<ce;ee++){var Vt=I[ee],de=Vt.object,Ue=Vt.geometry,ni=Wt===void 0?Vt.material:Wt;if(Vt=Vt.group,z.isArrayCamera){fi=z;for(var zt=z.cameras,mn=0,Li=zt.length;mn<Li;mn++){var di=zt[mn];if(de.layers.test(di.layers)){if("viewport"in di)we.viewport(li.copy(di.viewport));else{var Ui=di.bounds;we.viewport(li.set(Ui.x*Mi,Ui.y*qt,Ui.z*Mi,Ui.w*qt).multiplyScalar(ge))}ft.setupLights(di),c(de,k,di,Ue,ni,Vt)}}}else fi=null,c(de,k,z,Ue,ni,Vt)}}function c(I,k,z,Wt,ee,ce){if(I.onBeforeRender(at,k,z,Wt,ee,ce),ft=Or.get(k,fi||z),I.modelViewMatrix.multiplyMatrices(z.matrixWorldInverse,I.matrixWorld),I.normalMatrix.getNormalMatrix(I.modelViewMatrix),I.isImmediateRenderObject){we.setMaterial(ee);var Vt=d(z,k.fog,ee,I);re=e=null,me=!1,a(I,Vt)}else at.renderBufferDirect(z,k.fog,Wt,ee,I,ce);I.onAfterRender(at,k,z,Wt,ee,ce),ft=Or.get(k,fi||z)}function u(I,k,z){var Wt=mi.get(I),ee=ft.state.lights,ce=Wt.lightsHash,Vt=ee.state.hash;z=Jn.getParameters(I,ee.state,ft.state.shadowsArray,k,Yt.numPlanes,Yt.numIntersection,z);var de=Jn.getProgramCode(I,z),Ue=Wt.program,ni=!0;if(Ue===void 0)I.addEventListener("dispose",o);else if(Ue.code!==de)s(I);else{if(ce.stateID!==Vt.stateID||ce.directionalLength!==Vt.directionalLength||ce.pointLength!==Vt.pointLength||ce.spotLength!==Vt.spotLength||ce.rectAreaLength!==Vt.rectAreaLength||ce.hemiLength!==Vt.hemiLength||ce.shadowsLength!==Vt.shadowsLength)ce.stateID=Vt.stateID,ce.directionalLength=Vt.directionalLength,ce.pointLength=Vt.pointLength,ce.spotLength=Vt.spotLength,ce.rectAreaLength=Vt.rectAreaLength,ce.hemiLength=Vt.hemiLength,ce.shadowsLength=Vt.shadowsLength;else if(z.shaderID!==void 0)return;ni=!1}if(ni&&(z.shaderID?(de=pn[z.shaderID],Wt.shader={name:I.type,uniforms:_i.clone(de.uniforms),vertexShader:de.vertexShader,fragmentShader:de.fragmentShader}):Wt.shader={name:I.type,uniforms:I.uniforms,vertexShader:I.vertexShader,fragmentShader:I.fragmentShader},I.onBeforeCompile(Wt.shader,at),de=Jn.getProgramCode(I,z),Ue=Jn.acquireProgram(I,Wt.shader,z,de),Wt.program=Ue,I.program=Ue),z=Ue.getAttributes(),I.morphTargets)for(de=I.numSupportedMorphTargets=0;de<at.maxMorphTargets;de++)0<=z["morphTarget"+de]&&I.numSupportedMorphTargets++;if(I.morphNormals)for(de=I.numSupportedMorphNormals=0;de<at.maxMorphNormals;de++)0<=z["morphNormal"+de]&&I.numSupportedMorphNormals++;z=Wt.shader.uniforms,(!I.isShaderMaterial&&!I.isRawShaderMaterial||I.clipping===!0)&&(Wt.numClippingPlanes=Yt.numPlanes,Wt.numIntersection=Yt.numIntersection,z.clippingPlanes=Yt.uniform),Wt.fog=k,ce===void 0&&(Wt.lightsHash=ce={}),ce.stateID=Vt.stateID,ce.directionalLength=Vt.directionalLength,ce.pointLength=Vt.pointLength,ce.spotLength=Vt.spotLength,ce.rectAreaLength=Vt.rectAreaLength,ce.hemiLength=Vt.hemiLength,ce.shadowsLength=Vt.shadowsLength,I.lights&&(z.ambientLightColor.value=ee.state.ambient,z.directionalLights.value=ee.state.directional,z.spotLights.value=ee.state.spot,z.rectAreaLights.value=ee.state.rectArea,z.pointLights.value=ee.state.point,z.hemisphereLights.value=ee.state.hemi,z.directionalShadowMap.value=ee.state.directionalShadowMap,z.directionalShadowMatrix.value=ee.state.directionalShadowMatrix,z.spotShadowMap.value=ee.state.spotShadowMap,z.spotShadowMatrix.value=ee.state.spotShadowMatrix,z.pointShadowMap.value=ee.state.pointShadowMap,z.pointShadowMatrix.value=ee.state.pointShadowMatrix),I=Wt.program.getUniforms(),I=on.seqWithValue(I.seq,z),Wt.uniformsList=I}function d(I,k,z,Wt){ti=0;var ee=mi.get(z),ce=ee.lightsHash,Vt=ft.state.lights.state.hash;ue&&(_e||I!==Ae)&&Yt.setState(z.clippingPlanes,z.clipIntersection,z.clipShadows,I,ee,I===Ae&&z.id===Qt),z.needsUpdate===!1&&(ee.program===void 0||z.fog&&ee.fog!==k?z.needsUpdate=!0:(!z.lights||ce.stateID===Vt.stateID&&ce.directionalLength===Vt.directionalLength&&ce.pointLength===Vt.pointLength&&ce.spotLength===Vt.spotLength&&ce.rectAreaLength===Vt.rectAreaLength&&ce.hemiLength===Vt.hemiLength&&ce.shadowsLength===Vt.shadowsLength)&&(ee.numClippingPlanes===void 0||ee.numClippingPlanes===Yt.numPlanes&&ee.numIntersection===Yt.numIntersection)||(z.needsUpdate=!0)),z.needsUpdate&&(u(z,k,Wt),z.needsUpdate=!1);var de=!1,Ue=!1,ni=!1;ce=ee.program,Vt=ce.getUniforms();var zt=ee.shader.uniforms;if(we.useProgram(ce.program)&&(ni=Ue=de=!0),z.id!==Qt&&(Qt=z.id,Ue=!0),(de||Ae!==I)&&(Vt.setValue(xt,"projectionMatrix",I.projectionMatrix),ve.logarithmicDepthBuffer&&Vt.setValue(xt,"logDepthBufFC",2/(Math.log(I.far+1)/Math.LN2)),Ae!==I&&(Ae=I,ni=Ue=!0),(z.isShaderMaterial||z.isMeshPhongMaterial||z.isMeshStandardMaterial||z.envMap)&&(de=Vt.map.cameraPosition,de!==void 0&&de.setValue(xt,De.setFromMatrixPosition(I.matrixWorld))),(z.isMeshPhongMaterial||z.isMeshLambertMaterial||z.isMeshBasicMaterial||z.isMeshStandardMaterial||z.isShaderMaterial||z.skinning)&&Vt.setValue(xt,"viewMatrix",I.matrixWorldInverse)),z.skinning&&(Vt.setOptional(xt,Wt,"bindMatrix"),Vt.setOptional(xt,Wt,"bindMatrixInverse"),I=Wt.skeleton))if(de=I.bones,ve.floatVertexTextures){if(I.boneTexture===void 0){de=Math.sqrt(4*de.length),de=Se.ceilPowerOfTwo(de),de=Math.max(de,4);var mn=new Float32Array(de*de*4);mn.set(I.boneMatrices);var Li=new ut(mn,de,de,1023,1015);Li.needsUpdate=!0,I.boneMatrices=mn,I.boneTexture=Li,I.boneTextureSize=de}Vt.setValue(xt,"boneTexture",I.boneTexture),Vt.setValue(xt,"boneTextureSize",I.boneTextureSize)}else Vt.setOptional(xt,I,"boneMatrices");return Ue&&(Vt.setValue(xt,"toneMappingExposure",at.toneMappingExposure),Vt.setValue(xt,"toneMappingWhitePoint",at.toneMappingWhitePoint),z.lights&&(Ue=ni,zt.ambientLightColor.needsUpdate=Ue,zt.directionalLights.needsUpdate=Ue,zt.pointLights.needsUpdate=Ue,zt.spotLights.needsUpdate=Ue,zt.rectAreaLights.needsUpdate=Ue,zt.hemisphereLights.needsUpdate=Ue),k&&z.fog&&(zt.fogColor.value=k.color,k.isFog?(zt.fogNear.value=k.near,zt.fogFar.value=k.far):k.isFogExp2&&(zt.fogDensity.value=k.density)),z.isMeshBasicMaterial?g(zt,z):z.isMeshLambertMaterial?(g(zt,z),z.emissiveMap&&(zt.emissiveMap.value=z.emissiveMap)):z.isMeshPhongMaterial?(g(zt,z),z.isMeshToonMaterial?(x(zt,z),z.gradientMap&&(zt.gradientMap.value=z.gradientMap)):x(zt,z)):z.isMeshStandardMaterial?(g(zt,z),z.isMeshPhysicalMaterial?(S(zt,z),zt.reflectivity.value=z.reflectivity,zt.clearCoat.value=z.clearCoat,zt.clearCoatRoughness.value=z.clearCoatRoughness):S(zt,z)):z.isMeshMatcapMaterial?(g(zt,z),z.matcap&&(zt.matcap.value=z.matcap),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDepthMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isMeshDistanceMaterial?(g(zt,z),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias),zt.referencePosition.value.copy(z.referencePosition),zt.nearDistance.value=z.nearDistance,zt.farDistance.value=z.farDistance):z.isMeshNormalMaterial?(g(zt,z),z.bumpMap&&(zt.bumpMap.value=z.bumpMap,zt.bumpScale.value=z.bumpScale,z.side===1&&(zt.bumpScale.value*=-1)),z.normalMap&&(zt.normalMap.value=z.normalMap,zt.normalScale.value.copy(z.normalScale),z.side===1&&zt.normalScale.value.negate()),z.displacementMap&&(zt.displacementMap.value=z.displacementMap,zt.displacementScale.value=z.displacementScale,zt.displacementBias.value=z.displacementBias)):z.isLineBasicMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,z.isLineDashedMaterial&&(zt.dashSize.value=z.dashSize,zt.totalSize.value=z.dashSize+z.gapSize,zt.scale.value=z.scale)):z.isPointsMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.size.value=z.size*ge,zt.scale.value=.5*qt,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isSpriteMaterial?(zt.diffuse.value=z.color,zt.opacity.value=z.opacity,zt.rotation.value=z.rotation,zt.map.value=z.map,z.map!==null&&(z.map.matrixAutoUpdate===!0&&z.map.updateMatrix(),zt.uvTransform.value.copy(z.map.matrix))):z.isShadowMaterial&&(zt.color.value=z.color,zt.opacity.value=z.opacity),zt.ltc_1!==void 0&&(zt.ltc_1.value=le.LTC_1),zt.ltc_2!==void 0&&(zt.ltc_2.value=le.LTC_2),on.upload(xt,ee.uniformsList,zt,at)),z.isShaderMaterial&&z.uniformsNeedUpdate===!0&&(on.upload(xt,ee.uniformsList,zt,at),z.uniformsNeedUpdate=!1),z.isSpriteMaterial&&Vt.setValue(xt,"center",Wt.center),Vt.setValue(xt,"modelViewMatrix",Wt.modelViewMatrix),Vt.setValue(xt,"normalMatrix",Wt.normalMatrix),Vt.setValue(xt,"modelMatrix",Wt.matrixWorld),ce}function g(I,k){if(I.opacity.value=k.opacity,k.color&&(I.diffuse.value=k.color),k.emissive&&I.emissive.value.copy(k.emissive).multiplyScalar(k.emissiveIntensity),k.map&&(I.map.value=k.map),k.alphaMap&&(I.alphaMap.value=k.alphaMap),k.specularMap&&(I.specularMap.value=k.specularMap),k.envMap&&(I.envMap.value=k.envMap,I.flipEnvMap.value=k.envMap&&k.envMap.isCubeTexture?-1:1,I.reflectivity.value=k.reflectivity,I.refractionRatio.value=k.refractionRatio,I.maxMipLevel.value=mi.get(k.envMap).__maxMipLevel),k.lightMap&&(I.lightMap.value=k.lightMap,I.lightMapIntensity.value=k.lightMapIntensity),k.aoMap&&(I.aoMap.value=k.aoMap,I.aoMapIntensity.value=k.aoMapIntensity),k.map)var z=k.map;else k.specularMap?z=k.specularMap:k.displacementMap?z=k.displacementMap:k.normalMap?z=k.normalMap:k.bumpMap?z=k.bumpMap:k.roughnessMap?z=k.roughnessMap:k.metalnessMap?z=k.metalnessMap:k.alphaMap?z=k.alphaMap:k.emissiveMap&&(z=k.emissiveMap);z!==void 0&&(z.isWebGLRenderTarget&&(z=z.texture),z.matrixAutoUpdate===!0&&z.updateMatrix(),I.uvTransform.value.copy(z.matrix))}function x(I,k){I.specular.value=k.specular,I.shininess.value=Math.max(k.shininess,1e-4),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias)}function S(I,k){I.roughness.value=k.roughness,I.metalness.value=k.metalness,k.roughnessMap&&(I.roughnessMap.value=k.roughnessMap),k.metalnessMap&&(I.metalnessMap.value=k.metalnessMap),k.emissiveMap&&(I.emissiveMap.value=k.emissiveMap),k.bumpMap&&(I.bumpMap.value=k.bumpMap,I.bumpScale.value=k.bumpScale,k.side===1&&(I.bumpScale.value*=-1)),k.normalMap&&(I.normalMap.value=k.normalMap,I.normalScale.value.copy(k.normalScale),k.side===1&&I.normalScale.value.negate()),k.displacementMap&&(I.displacementMap.value=k.displacementMap,I.displacementScale.value=k.displacementScale,I.displacementBias.value=k.displacementBias),k.envMap&&(I.envMapIntensity.value=k.envMapIntensity)}console.log("THREE.WebGLRenderer","98"),t=t||{};var P=t.canvas!==void 0?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),G=t.context!==void 0?t.context:null,N=t.alpha!==void 0?t.alpha:!1,q=t.depth!==void 0?t.depth:!0,V=t.stencil!==void 0?t.stencil:!0,ot=t.antialias!==void 0?t.antialias:!1,T=t.premultipliedAlpha!==void 0?t.premultipliedAlpha:!0,A=t.preserveDrawingBuffer!==void 0?t.preserveDrawingBuffer:!1,tt=t.powerPreference!==void 0?t.powerPreference:"default",vt=null,ft=null;this.domElement=P,this.context=null,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1,this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var at=this,Ht=!1,It=null,$t=null,Xt=null,Qt=-1,re=e=null,me=!1,Ae=null,fi=null,li=new Y,Ye=new Y,pi=null,ti=0,Mi=P.width,qt=P.height,ge=1,nt=new Y(0,0,Mi,qt),ye=new Y(0,0,Mi,qt),Te=!1,Ze=new K,Yt=new Ii,ue=!1,_e=!1,Be=new mt,De=new M;try{N={alpha:N,depth:q,stencil:V,antialias:ot,premultipliedAlpha:T,preserveDrawingBuffer:A,powerPreference:tt},P.addEventListener("webglcontextlost",n,!1),P.addEventListener("webglcontextrestored",r,!1);var xt=G||P.getContext("webgl",N)||P.getContext("experimental-webgl",N);if(xt===null)throw P.getContext("webgl")!==null?Error("Error creating WebGL context with your selected attributes."):Error("Error creating WebGL context.");xt.getShaderPrecisionFormat===void 0&&(xt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(I){console.error("THREE.WebGLRenderer: "+I.message)}var xe,ve,we,Bi,mi,Ln,Jo,Bs,br,Jn,Qo,Or,Rn,Ea,Pa,Aa,dn;i();var fn=null;typeof navigator<"u"&&(fn="xr"in navigator?new Zt(at):new Le(at)),this.vr=fn;var La=new Nt(at,br,ve.maxTextureSize);this.shadowMap=La,this.getContext=function(){return xt},this.getContextAttributes=function(){return xt.getContextAttributes()},this.forceContextLoss=function(){var I=xe.get("WEBGL_lose_context");I&&I.loseContext()},this.forceContextRestore=function(){var I=xe.get("WEBGL_lose_context");I&&I.restoreContext()},this.getPixelRatio=function(){return ge},this.setPixelRatio=function(I){I!==void 0&&(ge=I,this.setSize(Mi,qt,!1))},this.getSize=function(){return{width:Mi,height:qt}},this.setSize=function(I,k,z){fn.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Mi=I,qt=k,P.width=I*ge,P.height=k*ge,z!==!1&&(P.style.width=I+"px",P.style.height=k+"px"),this.setViewport(0,0,I,k))},this.getDrawingBufferSize=function(){return{width:Mi*ge,height:qt*ge}},this.setDrawingBufferSize=function(I,k,z){Mi=I,qt=k,ge=z,P.width=I*z,P.height=k*z,this.setViewport(0,0,I,k)},this.getCurrentViewport=function(){return li},this.setViewport=function(I,k,z,Wt){nt.set(I,qt-k-Wt,z,Wt),we.viewport(li.copy(nt).multiplyScalar(ge))},this.setScissor=function(I,k,z,Wt){ye.set(I,qt-k-Wt,z,Wt),we.scissor(Ye.copy(ye).multiplyScalar(ge))},this.setScissorTest=function(I){we.setScissorTest(Te=I)},this.getClearColor=function(){return Rn.getClearColor()},this.setClearColor=function(){Rn.setClearColor.apply(Rn,arguments)},this.getClearAlpha=function(){return Rn.getClearAlpha()},this.setClearAlpha=function(){Rn.setClearAlpha.apply(Rn,arguments)},this.clear=function(I,k,z){var Wt=0;(I===void 0||I)&&(Wt|=16384),(k===void 0||k)&&(Wt|=256),(z===void 0||z)&&(Wt|=1024),xt.clear(Wt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){P.removeEventListener("webglcontextlost",n,!1),P.removeEventListener("webglcontextrestored",r,!1),Qo.dispose(),Or.dispose(),mi.dispose(),br.dispose(),fn.dispose(),$o.stop()},this.renderBufferImmediate=function(I,k){we.initAttributes();var z=mi.get(I);I.hasPositions&&!z.position&&(z.position=xt.createBuffer()),I.hasNormals&&!z.normal&&(z.normal=xt.createBuffer()),I.hasUvs&&!z.uv&&(z.uv=xt.createBuffer()),I.hasColors&&!z.color&&(z.color=xt.createBuffer()),k=k.getAttributes(),I.hasPositions&&(xt.bindBuffer(34962,z.position),xt.bufferData(34962,I.positionArray,35048),we.enableAttribute(k.position),xt.vertexAttribPointer(k.position,3,5126,!1,0,0)),I.hasNormals&&(xt.bindBuffer(34962,z.normal),xt.bufferData(34962,I.normalArray,35048),we.enableAttribute(k.normal),xt.vertexAttribPointer(k.normal,3,5126,!1,0,0)),I.hasUvs&&(xt.bindBuffer(34962,z.uv),xt.bufferData(34962,I.uvArray,35048),we.enableAttribute(k.uv),xt.vertexAttribPointer(k.uv,2,5126,!1,0,0)),I.hasColors&&(xt.bindBuffer(34962,z.color),xt.bufferData(34962,I.colorArray,35048),we.enableAttribute(k.color),xt.vertexAttribPointer(k.color,3,5126,!1,0,0)),we.disableUnusedAttributes(),xt.drawArrays(4,0,I.count),I.count=0},this.renderBufferDirect=function(I,k,z,Wt,ee,ce){var Vt=ee.isMesh&&0>ee.normalMatrix.determinant();we.setMaterial(Wt,Vt);var de=d(I,k,Wt,ee),Ue=!1;(e!==z.id||re!==de.id||me!==(Wt.wireframe===!0))&&(e=z.id,re=de.id,me=Wt.wireframe===!0,Ue=!0),ee.morphTargetInfluences&&(Ea.update(ee,z,Wt,de),Ue=!0),Vt=z.index;var ni=z.attributes.position;if(k=1,Wt.wireframe===!0&&(Vt=Bs.getWireframeAttribute(z),k=2),I=Pa,Vt!==null){var zt=Jo.get(Vt);I=Aa,I.setIndex(zt)}if(Ue){if(z&&z.isInstancedBufferGeometry&!ve.isWebGL2&&xe.get("ANGLE_instanced_arrays")===null)console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{we.initAttributes(),Ue=z.attributes,de=de.getAttributes();var mn=Wt.defaultAttributeValues;for($n in de){var Li=de[$n];if(0<=Li){var di=Ue[$n];if(di!==void 0){var Ui=di.normalized,Ra=di.itemSize,Qn=Jo.get(di);if(Qn!==void 0){var Ca=Qn.buffer,ba=Qn.type;if(Qn=Qn.bytesPerElement,di.isInterleavedBufferAttribute){var Ir=di.data,vh=Ir.stride;di=di.offset,Ir&&Ir.isInstancedInterleavedBuffer?(we.enableAttributeAndDivisor(Li,Ir.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=Ir.meshPerAttribute*Ir.count)):we.enableAttribute(Li),xt.bindBuffer(34962,Ca),xt.vertexAttribPointer(Li,Ra,ba,Ui,vh*Qn,di*Qn)}else di.isInstancedBufferAttribute?(we.enableAttributeAndDivisor(Li,di.meshPerAttribute),z.maxInstancedCount===void 0&&(z.maxInstancedCount=di.meshPerAttribute*di.count)):we.enableAttribute(Li),xt.bindBuffer(34962,Ca),xt.vertexAttribPointer(Li,Ra,ba,Ui,0,0)}}else if(mn!==void 0&&(Ui=mn[$n],Ui!==void 0))switch(Ui.length){case 2:xt.vertexAttrib2fv(Li,Ui);break;case 3:xt.vertexAttrib3fv(Li,Ui);break;case 4:xt.vertexAttrib4fv(Li,Ui);break;default:xt.vertexAttrib1fv(Li,Ui)}}}we.disableUnusedAttributes()}Vt!==null&&xt.bindBuffer(34963,zt.buffer)}zt=1/0,Vt!==null?zt=Vt.count:ni!==void 0&&(zt=ni.count),Vt=z.drawRange.start*k,ni=ce!==null?ce.start*k:0;var $n=Math.max(Vt,ni);if(ce=Math.max(0,Math.min(zt,Vt+z.drawRange.count*k,ni+(ce!==null?ce.count*k:1/0))-1-$n+1),ce!==0){if(ee.isMesh)if(Wt.wireframe===!0)we.setLineWidth(Wt.wireframeLinewidth*($t===null?ge:1)),I.setMode(1);else switch(ee.drawMode){case 0:I.setMode(4);break;case 1:I.setMode(5);break;case 2:I.setMode(6)}else ee.isLine?(Wt=Wt.linewidth,Wt===void 0&&(Wt=1),we.setLineWidth(Wt*($t===null?ge:1)),ee.isLineSegments?I.setMode(1):ee.isLineLoop?I.setMode(2):I.setMode(3)):ee.isPoints?I.setMode(0):ee.isSprite&&I.setMode(4);z&&z.isInstancedBufferGeometry?0<z.maxInstancedCount&&I.renderInstances(z,$n,ce):I.render($n,ce)}},this.compile=function(I,k){ft=Or.get(I,k),ft.init(),I.traverse(function(z){z.isLight&&(ft.pushLight(z),z.castShadow&&ft.pushShadow(z))}),ft.setupLights(k),I.traverse(function(z){if(z.material)if(Array.isArray(z.material))for(var Wt=0;Wt<z.material.length;Wt++)u(z.material[Wt],I.fog,z);else u(z.material,I.fog,z)})};var Us=null,$o=new m;$o.setAnimationLoop(function(I){fn.isPresenting()||Us&&Us(I)}),typeof window<"u"&&$o.setContext(window),this.setAnimationLoop=function(I){Us=I,fn.setAnimationLoop(I),$o.start()},this.render=function(I,k,z,Wt){if(!k||!k.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else if(!Ht){re=e=null,me=!1,Qt=-1,Ae=null,I.autoUpdate===!0&&I.updateMatrixWorld(),k.parent===null&&k.updateMatrixWorld(),fn.enabled&&(k=fn.getCamera(k)),ft=Or.get(I,k),ft.init(),I.onBeforeRender(at,I,k,z),Be.multiplyMatrices(k.projectionMatrix,k.matrixWorldInverse),Ze.setFromMatrix(Be),_e=this.localClippingEnabled,ue=Yt.init(this.clippingPlanes,_e,k),vt=Qo.get(I,k),vt.init(),h(I,k,at.sortObjects),at.sortObjects===!0&&vt.sort(),ue&&Yt.beginShadows(),La.render(ft.state.shadowsArray,I,k),ft.setupLights(k),ue&&Yt.endShadows(),this.info.autoReset&&this.info.reset(),z===void 0&&(z=null),this.setRenderTarget(z),Rn.render(vt,I,k,Wt),Wt=vt.opaque;var ee=vt.transparent;if(I.overrideMaterial){var ce=I.overrideMaterial;Wt.length&&l(Wt,I,k,ce),ee.length&&l(ee,I,k,ce)}else Wt.length&&l(Wt,I,k),ee.length&&l(ee,I,k);z&&Ln.updateRenderTargetMipmap(z),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1),I.onAfterRender(at,I,k),fn.enabled&&fn.submitFrame(),ft=vt=null}},this.allocTextureUnit=function(){var I=ti;return I>=ve.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+I+" texture units while this GPU supports only "+ve.maxTextures),ti+=1,I},this.setTexture2D=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTarget&&(I||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),Ln.setTexture2D(k,z)}}(),this.setTexture3D=function(){return function(I,k){Ln.setTexture3D(I,k)}}(),this.setTexture=function(){var I=!1;return function(k,z){I||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),I=!0),Ln.setTexture2D(k,z)}}(),this.setTextureCube=function(){var I=!1;return function(k,z){k&&k.isWebGLRenderTargetCube&&(I||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),I=!0),k=k.texture),k&&k.isCubeTexture||Array.isArray(k.image)&&k.image.length===6?Ln.setTextureCube(k,z):Ln.setTextureCubeDynamic(k,z)}}(),this.setFramebuffer=function(I){It=I},this.getRenderTarget=function(){return $t},this.setRenderTarget=function(I){($t=I)&&mi.get(I).__webglFramebuffer===void 0&&Ln.setupRenderTarget(I);var k=It,z=!1;I?(k=mi.get(I).__webglFramebuffer,I.isWebGLRenderTargetCube&&(k=k[I.activeCubeFace],z=!0),li.copy(I.viewport),Ye.copy(I.scissor),pi=I.scissorTest):(li.copy(nt).multiplyScalar(ge),Ye.copy(ye).multiplyScalar(ge),pi=Te),Xt!==k&&(xt.bindFramebuffer(36160,k),Xt=k),we.viewport(li),we.scissor(Ye),we.setScissorTest(pi),z&&(z=mi.get(I.texture),xt.framebufferTexture2D(36160,36064,34069+I.activeCubeFace,z.__webglTexture,I.activeMipMapLevel))},this.readRenderTargetPixels=function(I,k,z,Wt,ee,ce){if(I&&I.isWebGLRenderTarget){var Vt=mi.get(I).__webglFramebuffer;if(Vt){var de=!1;Vt!==Xt&&(xt.bindFramebuffer(36160,Vt),de=!0);try{var Ue=I.texture,ni=Ue.format,zt=Ue.type;ni!==1023&&dn.convert(ni)!==xt.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):zt===1009||dn.convert(zt)===xt.getParameter(35738)||zt===1015&&(ve.isWebGL2||xe.get("OES_texture_float")||xe.get("WEBGL_color_buffer_float"))||zt===1016&&(ve.isWebGL2?xe.get("EXT_color_buffer_float"):xe.get("EXT_color_buffer_half_float"))?xt.checkFramebufferStatus(36160)===36053?0<=k&&k<=I.width-Wt&&0<=z&&z<=I.height-ee&&xt.readPixels(k,z,Wt,ee,dn.convert(ni),dn.convert(zt),ce):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{de&&xt.bindFramebuffer(36160,Xt)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(I,k,z){var Wt=k.image.width,ee=k.image.height,ce=dn.convert(k.format);this.setTexture2D(k,0),xt.copyTexImage2D(3553,z||0,ce,I.x,I.y,Wt,ee,0)},this.copyTextureToTexture=function(I,k,z,Wt){var ee=k.image.width,ce=k.image.height,Vt=dn.convert(z.format),de=dn.convert(z.type);this.setTexture2D(z,0),k.isDataTexture?xt.texSubImage2D(3553,Wt||0,I.x,I.y,ee,ce,Vt,de,k.image.data):xt.texSubImage2D(3553,Wt||0,I.x,I.y,Vt,de,k.image)}}function Jt(t,e){this.name="",this.color=new H(t),this.density=e!==void 0?e:25e-5}function yi(t,e,i){this.name="",this.color=new H(t),this.near=e!==void 0?e:1,this.far=i!==void 0?i:1e3}function qi(){b.call(this),this.type="Scene",this.overrideMaterial=this.fog=this.background=null,this.autoUpdate=!0}function Ge(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function He(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=n===!0}function We(t){fe.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(t)}function ei(t){if(b.call(this),this.type="Sprite",Cr===void 0){Cr=new Rt;var e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);e=new Ge(e,5),Cr.setIndex([0,1,2,0,2,3]),Cr.addAttribute("position",new He(e,3,0,!1)),Cr.addAttribute("uv",new He(e,2,3,!1))}this.geometry=Cr,this.material=t!==void 0?t:new We,this.center=new $(.5,.5)}function ii(){b.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ai(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new mt)}function hi(){b.call(this),this.type="Bone"}function ke(t,e){Ke.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new mt,this.bindMatrixInverse=new mt,t=this.initBones(),t=new ai(t),this.bind(t,this.matrixWorld),this.normalizeSkinWeights()}function Ne(t){fe.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.lights=!1,this.setValues(t)}function qe(t,e,i){i===1&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),b.call(this),this.type="Line",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new Ne({color:16777215*Math.random()})}function Re(t,e){qe.call(this,t,e),this.type="LineSegments"}function an(t,e){qe.call(this,t,e),this.type="LineLoop"}function xi(t){fe.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=this.morphTargets=!1,this.setValues(t)}function nr(t,e){b.call(this),this.type="Points",this.geometry=t!==void 0?t:new Rt,this.material=e!==void 0?e:new xi({color:16777215*Math.random()})}function os(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.generateMipmaps=!1}function rr(t,e,i,n,r,o,s,a,h,l,c,u){Ct.call(this,null,o,s,a,h,l,n,r,c,u),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1}function Ur(t,e,i,n,r,o,s,a,h){Ct.call(this,t,e,i,n,r,o,s,a,h),this.needsUpdate=!0}function Fr(t,e,i,n,r,o,s,a,h,l){if(l=l!==void 0?l:1026,l!==1026&&l!==1027)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&l===1026&&(i=1012),i===void 0&&l===1027&&(i=1020),Ct.call(this,null,n,r,o,s,a,l,i,h),this.image={width:t,height:e},this.magFilter=s!==void 0?s:1003,this.minFilter=a!==void 0?a:1003,this.generateMipmaps=this.flipY=!1}function or(t){Rt.call(this),this.type="WireframeGeometry";var e=[],i,n,r,o=[0,0],s={},a=["a","b","c"];if(t&&t.isGeometry){var h=t.faces,l=0;for(n=h.length;l<n;l++){var c=h[l];for(i=0;3>i;i++){var u=c[a[i]],d=c[a[(i+1)%3]];o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]})}}for(u in s)l=s[u],a=t.vertices[l.index1],e.push(a.x,a.y,a.z),a=t.vertices[l.index2],e.push(a.x,a.y,a.z)}else if(t&&t.isBufferGeometry)if(a=new M,t.index!==null){h=t.attributes.position,c=t.index;var g=t.groups;for(g.length===0&&(g=[{start:0,count:c.count,materialIndex:0}]),t=0,r=g.length;t<r;++t)for(l=g[t],i=l.start,n=l.count,l=i,n=i+n;l<n;l+=3)for(i=0;3>i;i++)u=c.getX(l+i),d=c.getX(l+(i+1)%3),o[0]=Math.min(u,d),o[1]=Math.max(u,d),u=o[0]+","+o[1],s[u]===void 0&&(s[u]={index1:o[0],index2:o[1]});for(u in s)l=s[u],a.fromBufferAttribute(h,l.index1),e.push(a.x,a.y,a.z),a.fromBufferAttribute(h,l.index2),e.push(a.x,a.y,a.z)}else for(h=t.attributes.position,l=0,n=h.count/3;l<n;l++)for(i=0;3>i;i++)s=3*l+i,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z),s=3*l+(i+1)%3,a.fromBufferAttribute(h,s),e.push(a.x,a.y,a.z);this.addAttribute("position",new ct(e,3))}function Gr(t,e,i){F.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new sr(t,e,i)),this.mergeVertices()}function sr(t,e,i){Rt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n=[],r=[],o=[],s=[],a=new M,h=new M,l=new M,c=new M,u=new M,d,g;3>t.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var x=e+1;for(d=0;d<=i;d++){var S=d/i;for(g=0;g<=e;g++){var P=g/e;t(P,S,h),r.push(h.x,h.y,h.z),0<=P-1e-5?(t(P-1e-5,S,l),c.subVectors(h,l)):(t(P+1e-5,S,l),c.subVectors(l,h)),0<=S-1e-5?(t(P,S-1e-5,l),u.subVectors(h,l)):(t(P,S+1e-5,l),u.subVectors(l,h)),a.crossVectors(c,u).normalize(),o.push(a.x,a.y,a.z),s.push(P,S)}}for(d=0;d<i;d++)for(g=0;g<e;g++)t=d*x+g+1,a=(d+1)*x+g+1,h=(d+1)*x+g,n.push(d*x+g,t,h),n.push(t,a,h);this.setIndex(n),this.addAttribute("position",new ct(r,3)),this.addAttribute("normal",new ct(o,3)),this.addAttribute("uv",new ct(s,2))}function Hr(t,e,i,n){F.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new Di(t,e,i,n)),this.mergeVertices()}function Di(t,e,i,n){function r(l){a.push(l.x,l.y,l.z)}function o(l,c){l*=3,c.x=t[l+0],c.y=t[l+1],c.z=t[l+2]}function s(l,c,u,d){0>d&&l.x===1&&(h[c]=l.x-1),u.x===0&&u.z===0&&(h[c]=d/2/Math.PI+.5)}Rt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;var a=[],h=[];(function(l){for(var c=new M,u=new M,d=new M,g=0;g<e.length;g+=3){o(e[g+0],c),o(e[g+1],u),o(e[g+2],d);var x,S,P=c,G=u,N=d,q=Math.pow(2,l),V=[];for(S=0;S<=q;S++){V[S]=[];var ot=P.clone().lerp(N,S/q),T=G.clone().lerp(N,S/q),A=q-S;for(x=0;x<=A;x++)V[S][x]=x===0&&S===q?ot:ot.clone().lerp(T,x/A)}for(S=0;S<q;S++)for(x=0;x<2*(q-S)-1;x++)P=Math.floor(x/2),x%2===0?(r(V[S][P+1]),r(V[S+1][P]),r(V[S][P])):(r(V[S][P+1]),r(V[S+1][P+1]),r(V[S+1][P]))}})(n),function(l){for(var c=new M,u=0;u<a.length;u+=3)c.x=a[u+0],c.y=a[u+1],c.z=a[u+2],c.normalize().multiplyScalar(l),a[u+0]=c.x,a[u+1]=c.y,a[u+2]=c.z}(i),function(){for(var l=new M,c=0;c<a.length;c+=3)l.x=a[c+0],l.y=a[c+1],l.z=a[c+2],h.push(Math.atan2(l.z,-l.x)/2/Math.PI+.5,1-(Math.atan2(-l.y,Math.sqrt(l.x*l.x+l.z*l.z))/Math.PI+.5));l=new M,c=new M;for(var u=new M,d=new M,g=new $,x=new $,S=new $,P=0,G=0;P<a.length;P+=9,G+=6){l.set(a[P+0],a[P+1],a[P+2]),c.set(a[P+3],a[P+4],a[P+5]),u.set(a[P+6],a[P+7],a[P+8]),g.set(h[G+0],h[G+1]),x.set(h[G+2],h[G+3]),S.set(h[G+4],h[G+5]),d.copy(l).add(c).add(u).divideScalar(3);var N=Math.atan2(d.z,-d.x);s(g,G+0,l,N),s(x,G+2,c,N),s(S,G+4,u,N)}for(l=0;l<h.length;l+=6)c=h[l+0],u=h[l+2],d=h[l+4],g=Math.min(c,u,d),.9<Math.max(c,u,d)&&.1>g&&(.2>c&&(h[l+0]+=1),.2>u&&(h[l+2]+=1),.2>d&&(h[l+4]+=1))}(),this.addAttribute("position",new ct(a,3)),this.addAttribute("normal",new ct(a.slice(),3)),this.addAttribute("uv",new ct(h,2)),n===0?this.computeVertexNormals():this.normalizeNormals()}function kr(t,e){F.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new ar(t,e)),this.mergeVertices()}function ar(t,e){Di.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 Vr(t,e){F.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Dn(t,e)),this.mergeVertices()}function Dn(t,e){Di.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 jr(t,e){F.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new hr(t,e)),this.mergeVertices()}function hr(t,e){var i=(1+Math.sqrt(5))/2;Di.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[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 Wr(t,e){F.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new lr(t,e)),this.mergeVertices()}function lr(t,e){var i=(1+Math.sqrt(5))/2,n=1/i;Di.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[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 Xr(t,e,i,n,r,o){F.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},o!==void 0&&console.warn("THREE.TubeGeometry: taper has been removed."),t=new cr(t,e,i,n,r),this.tangents=t.tangents,this.normals=t.normals,this.binormals=t.binormals,this.fromBufferGeometry(t),this.mergeVertices()}function cr(t,e,i,n,r){function o(G){c=t.getPointAt(G/e,c);var N=s.normals[G];for(G=s.binormals[G],d=0;d<=n;d++){var q=d/n*Math.PI*2,V=Math.sin(q);q=-Math.cos(q),h.x=q*N.x+V*G.x,h.y=q*N.y+V*G.y,h.z=q*N.z+V*G.z,h.normalize(),x.push(h.x,h.y,h.z),a.x=c.x+i*h.x,a.y=c.y+i*h.y,a.z=c.z+i*h.z,g.push(a.x,a.y,a.z)}}Rt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;var a=new M,h=new M,l=new $,c=new M,u,d,g=[],x=[],S=[],P=[];for(u=0;u<e;u++)o(u);for(o(r===!1?e:0),u=0;u<=e;u++)for(d=0;d<=n;d++)l.x=u/e,l.y=d/n,S.push(l.x,l.y);(function(){for(d=1;d<=e;d++)for(u=1;u<=n;u++){var G=(n+1)*d+(u-1),N=(n+1)*d+u,q=(n+1)*(d-1)+u;P.push((n+1)*(d-1)+(u-1),G,q),P.push(G,N,q)}})(),this.setIndex(P),this.addAttribute("position",new ct(g,3)),this.addAttribute("normal",new ct(x,3)),this.addAttribute("uv",new ct(S,2))}function qr(t,e,i,n,r,o,s){F.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},s!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ur(t,e,i,n,r,o)),this.mergeVertices()}function ur(t,e,i,n,r,o){function s(T,A,tt,vt,ft){var at=Math.sin(T);A=tt/A*T,tt=Math.cos(A),ft.x=vt*(2+tt)*.5*Math.cos(T),ft.y=vt*(2+tt)*at*.5,ft.z=vt*Math.sin(A)*.5}Rt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:o},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,o=o||3;var a=[],h=[],l=[],c=[],u,d=new M,g=new M,x=new M,S=new M,P=new M,G=new M,N=new M;for(u=0;u<=i;++u){var q=u/i*r*Math.PI*2;for(s(q,r,o,t,x),s(q+.01,r,o,t,S),G.subVectors(S,x),N.addVectors(S,x),P.crossVectors(G,N),N.crossVectors(P,G),P.normalize(),N.normalize(),q=0;q<=n;++q){var V=q/n*Math.PI*2,ot=-e*Math.cos(V);V=e*Math.sin(V),d.x=x.x+(ot*N.x+V*P.x),d.y=x.y+(ot*N.y+V*P.y),d.z=x.z+(ot*N.z+V*P.z),h.push(d.x,d.y,d.z),g.subVectors(d,x).normalize(),l.push(g.x,g.y,g.z),c.push(u/i),c.push(q/n)}}for(q=1;q<=i;q++)for(u=1;u<=n;u++)t=(n+1)*q+(u-1),e=(n+1)*q+u,r=(n+1)*(q-1)+u,a.push((n+1)*(q-1)+(u-1),t,r),a.push(t,e,r);this.setIndex(a),this.addAttribute("position",new ct(h,3)),this.addAttribute("normal",new ct(l,3)),this.addAttribute("uv",new ct(c,2))}function Yr(t,e,i,n,r){F.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new pr(t,e,i,n,r)),this.mergeVertices()}function pr(t,e,i,n,r){Rt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var o=[],s=[],a=[],h=[],l=new M,c=new M,u=new M,d,g;for(d=0;d<=i;d++)for(g=0;g<=n;g++){var x=g/n*r,S=d/i*Math.PI*2;c.x=(t+e*Math.cos(S))*Math.cos(x),c.y=(t+e*Math.cos(S))*Math.sin(x),c.z=e*Math.sin(S),s.push(c.x,c.y,c.z),l.x=t*Math.cos(x),l.y=t*Math.sin(x),u.subVectors(c,l).normalize(),a.push(u.x,u.y,u.z),h.push(g/n),h.push(d/i)}for(d=1;d<=i;d++)for(g=1;g<=n;g++)t=(n+1)*(d-1)+g-1,e=(n+1)*(d-1)+g,r=(n+1)*d+g,o.push((n+1)*d+g-1,t,r),o.push(t,e,r);this.setIndex(o),this.addAttribute("position",new ct(s,3)),this.addAttribute("normal",new ct(a,3)),this.addAttribute("uv",new ct(h,2))}function Vs(t,e,i,n,r){for(var o,s=0,a=e,h=i-n;a<i;a+=n)s+=(t[h]-t[a])*(t[a+1]+t[h+1]),h=a;if(r===0<s)for(r=e;r<i;r+=n)o=Xs(r,t[r],t[r+1],o);else for(r=i-n;r>=e;r-=n)o=Xs(r,t[r],t[r+1],o);return o&&zn(o,o.next)&&($r(o),o=o.next),o}function Zr(t,e){if(!t)return t;e||(e=t);do{var i=!1;if(t.steiner||!zn(t,t.next)&&bi(t.prev,t,t.next)!==0)t=t.next;else{if($r(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Jr(t,e,i,n,r,o,s){if(t){if(!s&&o){var a=t,h=a;do h.z===null&&(h.z=ss(h.x,h.y,n,r,o)),h.prevZ=h.prev,h=h.nextZ=h.next;while(h!==a);h.prevZ.nextZ=null,h.prevZ=null,a=h;var l,c,u,d,g=1;do{h=a;var x=a=null;for(c=0;h;){c++;var S=h;for(l=u=0;l<g&&(u++,S=S.nextZ,S);l++);for(d=g;0<u||0<d&&S;)u!==0&&(d===0||!S||h.z<=S.z)?(l=h,h=h.nextZ,u--):(l=S,S=S.nextZ,d--),x?x.nextZ=l:a=l,l.prevZ=x,x=l;h=S}x.nextZ=null,g*=2}while(1<c)}for(a=t;t.prev!==t.next;){if(h=t.prev,S=t.next,o)t:{x=t,d=n;var P=r,G=o;if(c=x.prev,u=x,g=x.next,0<=bi(c,u,g))x=!1;else{var N=c.x>u.x?c.x>g.x?c.x:g.x:u.x>g.x?u.x:g.x,q=c.y>u.y?c.y>g.y?c.y:g.y:u.y>g.y?u.y:g.y;for(l=ss(c.x<u.x?c.x<g.x?c.x:g.x:u.x<g.x?u.x:g.x,c.y<u.y?c.y<g.y?c.y:g.y:u.y<g.y?u.y:g.y,d,P,G),d=ss(N,q,d,P,G),P=x.nextZ;P&&P.z<=d;){if(P!==x.prev&&P!==x.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){x=!1;break t}P=P.nextZ}for(P=x.prevZ;P&&P.z>=l;){if(P!==x.prev&&P!==x.next&&Po(c.x,c.y,u.x,u.y,g.x,g.y,P.x,P.y)&&0<=bi(P.prev,P,P.next)){x=!1;break t}P=P.prevZ}x=!0}}else t:if(x=t,c=x.prev,u=x,g=x.next,0<=bi(c,u,g))x=!1;else{for(l=x.next.next;l!==x.prev;){if(Po(c.x,c.y,u.x,u.y,g.x,g.y,l.x,l.y)&&0<=bi(l.prev,l,l.next)){x=!1;break t}l=l.next}x=!0}if(x)e.push(h.i/i),e.push(t.i/i),e.push(S.i/i),$r(t),a=t=S.next;else if(t=S,t===a){if(!s)Jr(Zr(t),e,i,n,r,o,1);else if(s===1){s=e,a=i,h=t;do S=h.prev,x=h.next.next,!zn(S,x)&&js(S,h,h.next,x)&&Qr(S,x)&&Qr(x,S)&&(s.push(S.i/a),s.push(h.i/a),s.push(x.i/a),$r(h),$r(h.next),h=t=x),h=h.next;while(h!==t);t=h,Jr(t,e,i,n,r,o,2)}else if(s===2)t:{s=t;do{for(a=s.next.next;a!==s.prev;){if(h=s.i!==a.i){if(h=s,S=a,x=h.next.i!==S.i&&h.prev.i!==S.i){e:{x=h;do{if(x.i!==h.i&&x.next.i!==h.i&&x.i!==S.i&&x.next.i!==S.i&&js(x,x.next,h,S)){x=!0;break e}x=x.next}while(x!==h);x=!1}x=!x}if(x=x&&Qr(h,S)&&Qr(S,h)){x=h,c=!1,u=(h.x+S.x)/2,S=(h.y+S.y)/2;do x.y>S!=x.next.y>S&&x.next.y!==x.y&&u<(x.next.x-x.x)*(S-x.y)/(x.next.y-x.y)+x.x&&(c=!c),x=x.next;while(x!==h);x=c}h=x}if(h){t=Ws(s,a),s=Zr(s,s.next),t=Zr(t,t.next),Jr(s,e,i,n,r,o),Jr(t,e,i,n,r,o);break t}a=a.next}s=s.next}while(s!==t)}break}}}}function Ka(t,e){return t.x-e.x}function th(t,e){var i=e,n=t.x,r=t.y,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var s=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>o){if(o=s,s===n){if(r===i.y)return i;if(r===i.next.y)return i.next}var a=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!a)return null;if(n===o)return a.prev;e=a,s=a.x;var h=a.y,l=1/0;for(i=a.next;i!==e;){if(n>=i.x&&i.x>=s&&n!==i.x&&Po(r<h?n:o,r,s,h,r<h?o:n,r,i.x,i.y)){var c=Math.abs(r-i.y)/(n-i.x);(c<l||c===l&&i.x>a.x)&&Qr(i,t)&&(a=i,l=c)}i=i.next}return a}function ss(t,e,i,n,r){return t=32767*(t-i)*r,e=32767*(e-n)*r,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,(t|t<<1)&1431655765|((e|e<<1)&1431655765)<<1}function eh(t){var e=t,i=t;do e.x<i.x&&(i=e),e=e.next;while(e!==t);return i}function Po(t,e,i,n,r,o,s,a){return 0<=(r-s)*(e-a)-(t-s)*(o-a)&&0<=(t-s)*(n-a)-(i-s)*(e-a)&&0<=(i-s)*(o-a)-(r-s)*(n-a)}function bi(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function zn(t,e){return t.x===e.x&&t.y===e.y}function js(t,e,i,n){return zn(t,e)&&zn(i,n)||zn(t,n)&&zn(i,e)?!0:0<bi(t,e,i)!=0<bi(t,e,n)&&0<bi(i,n,t)!=0<bi(i,n,e)}function Qr(t,e){return 0>bi(t.prev,t,t.next)?0<=bi(t,e,t.next)&&0<=bi(t,t.prev,e):0>bi(t,e,t.prev)||0>bi(t,t.next,e)}function Ws(t,e){var i=new as(t.i,t.x,t.y),n=new as(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,o.next=n,n.prev=o,n}function Xs(t,e,i,n){return t=new as(t,e,i),n?(t.next=n.next,t.prev=n,n.next.prev=t,n.next=t):(t.prev=t,t.next=t),t}function $r(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 as(t,e,i){this.i=t,this.x=e,this.y=i,this.nextZ=this.prevZ=this.z=this.next=this.prev=null,this.steiner=!1}function qs(t){var e=t.length;2<e&&t[e-1].equals(t[0])&&t.pop()}function Ys(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Nn(t,e){F.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new hn(t,e)),this.mergeVertices()}function hn(t,e){function i(h){function l(ue,_e,Be){return _e||console.error("THREE.ExtrudeGeometry: vec does not exist"),_e.clone().multiplyScalar(Be).add(ue)}function c(ue,_e,Be){var De=ue.x-_e.x,xt=ue.y-_e.y,xe=Be.x-ue.x,ve=Be.y-ue.y,we=De*De+xt*xt;if(Math.abs(De*ve-xt*xe)>Number.EPSILON){var Bi=Math.sqrt(we),mi=Math.sqrt(xe*xe+ve*ve);if(we=_e.x-xt/Bi,_e=_e.y+De/Bi,ve=((Be.x-ve/mi-we)*ve-(Be.y+xe/mi-_e)*xe)/(De*ve-xt*xe),xe=we+De*ve-ue.x,De=_e+xt*ve-ue.y,xt=xe*xe+De*De,2>=xt)return new $(xe,De);xt=Math.sqrt(xt/2)}else ue=!1,De>Number.EPSILON?xe>Number.EPSILON&&(ue=!0):De<-Number.EPSILON?xe<-Number.EPSILON&&(ue=!0):Math.sign(xt)===Math.sign(ve)&&(ue=!0),ue?(xe=-xt,xt=Math.sqrt(we)):(xe=De,De=xt,xt=Math.sqrt(we/2));return new $(xe/xt,De/xt)}function u(ue,_e){for(qt=ue.length;0<=--qt;){var Be=qt,De=qt-1;0>De&&(De=ue.length-1);var xt,xe=N+2*A;for(xt=0;xt<xe;xt++){var ve=pi*xt,we=pi*(xt+1),Bi=_e+De+ve,mi=_e+De+we;we=_e+Be+we,x(_e+Be+ve),x(Bi),x(we),x(Bi),x(mi),x(we),ve=r.length/3,ve=vt.generateSideWallUV(n,r,ve-6,ve-3,ve-2,ve-1),S(ve[0]),S(ve[1]),S(ve[3]),S(ve[1]),S(ve[2]),S(ve[3])}}}function d(ue,_e,Be){P.push(ue),P.push(_e),P.push(Be)}function g(ue,_e,Be){x(ue),x(_e),x(Be),ue=r.length/3,ue=vt.generateTopUV(n,r,ue-3,ue-2,ue-1),S(ue[0]),S(ue[1]),S(ue[2])}function x(ue){r.push(P[3*ue]),r.push(P[3*ue+1]),r.push(P[3*ue+2])}function S(ue){o.push(ue.x),o.push(ue.y)}var P=[],G=e.curveSegments!==void 0?e.curveSegments:12,N=e.steps!==void 0?e.steps:1,q=e.depth!==void 0?e.depth:100,V=e.bevelEnabled!==void 0?e.bevelEnabled:!0,ot=e.bevelThickness!==void 0?e.bevelThickness:6,T=e.bevelSize!==void 0?e.bevelSize:ot-2,A=e.bevelSegments!==void 0?e.bevelSegments:3,tt=e.extrudePath,vt=e.UVGenerator!==void 0?e.UVGenerator:fh;e.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),q=e.amount);var ft=!1;if(tt){var at=tt.getSpacedPoints(N);ft=!0,V=!1;var Ht=tt.computeFrenetFrames(N,!1),It=new M,$t=new M,Xt=new M}V||(T=ot=A=0);var Qt;G=h.extractPoints(G),h=G.shape;var re=G.holes;if(!wn.isClockWise(h)){h=h.reverse();var me=0;for(Qt=re.length;me<Qt;me++){var Ae=re[me];wn.isClockWise(Ae)&&(re[me]=Ae.reverse())}}var fi=wn.triangulateShape(h,re),li=h;for(me=0,Qt=re.length;me<Qt;me++)Ae=re[me],h=h.concat(Ae);var Ye,pi=h.length,ti,Mi=fi.length;G=[];var qt=0,ge=li.length,nt=ge-1;for(Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),G[qt]=c(li[qt],li[nt],li[Ye]);tt=[];var ye=G.concat();for(me=0,Qt=re.length;me<Qt;me++){Ae=re[me];var Te=[];for(qt=0,ge=Ae.length,nt=ge-1,Ye=qt+1;qt<ge;qt++,nt++,Ye++)nt===ge&&(nt=0),Ye===ge&&(Ye=0),Te[qt]=c(Ae[qt],Ae[nt],Ae[Ye]);tt.push(Te),ye=ye.concat(Te)}for(nt=0;nt<A;nt++){ge=nt/A;var Ze=ot*Math.cos(ge*Math.PI/2);for(Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++){var Yt=l(li[qt],G[qt],Ye);d(Yt.x,Yt.y,-Ze)}for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),d(Yt.x,Yt.y,-Ze)}for(Ye=T,qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[0]).multiplyScalar(Yt.x),It.copy(Ht.binormals[0]).multiplyScalar(Yt.y),Xt.copy(at[0]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,0);for(ge=1;ge<=N;ge++)for(qt=0;qt<pi;qt++)Yt=V?l(h[qt],ye[qt],Ye):h[qt],ft?($t.copy(Ht.normals[ge]).multiplyScalar(Yt.x),It.copy(Ht.binormals[ge]).multiplyScalar(Yt.y),Xt.copy(at[ge]).add($t).add(It),d(Xt.x,Xt.y,Xt.z)):d(Yt.x,Yt.y,q/N*ge);for(nt=A-1;0<=nt;nt--){for(ge=nt/A,Ze=ot*Math.cos(ge*Math.PI/2),Ye=T*Math.sin(ge*Math.PI/2),qt=0,ge=li.length;qt<ge;qt++)Yt=l(li[qt],G[qt],Ye),d(Yt.x,Yt.y,q+Ze);for(me=0,Qt=re.length;me<Qt;me++)for(Ae=re[me],Te=tt[me],qt=0,ge=Ae.length;qt<ge;qt++)Yt=l(Ae[qt],Te[qt],Ye),ft?d(Yt.x,Yt.y+at[N-1].y,at[N-1].x+Ze):d(Yt.x,Yt.y,q+Ze)}(function(){var ue=r.length/3;if(V){var _e=0*pi;for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2]+_e,ti[1]+_e,ti[0]+_e);for(_e=pi*(N+2*A),qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+_e,ti[1]+_e,ti[2]+_e)}else{for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[2],ti[1],ti[0]);for(qt=0;qt<Mi;qt++)ti=fi[qt],g(ti[0]+pi*N,ti[1]+pi*N,ti[2]+pi*N)}n.addGroup(ue,r.length/3-ue,0)})(),function(){var ue=r.length/3,_e=0;for(u(li,_e),_e+=li.length,me=0,Qt=re.length;me<Qt;me++)Ae=re[me],u(Ae,_e),_e+=Ae.length;n.addGroup(ue,r.length/3-ue,1)}()}Rt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var n=this,r=[],o=[],s=0,a=t.length;s<a;s++)i(t[s]);this.addAttribute("position",new ct(r,3)),this.addAttribute("uv",new ct(o,2)),this.computeVertexNormals()}function Zs(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++)i.shapes.push(t[n].uuid);else i.shapes.push(t.uuid);return e.extrudePath!==void 0&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function Kr(t,e){F.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new dr(t,e)),this.mergeVertices()}function dr(t,e){e=e||{};var i=e.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new F;t=i.generateShapes(t,e.size),e.depth=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),hn.call(this,t,e),this.type="TextBufferGeometry"}function to(t,e,i,n,r,o,s){F.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new Bn(t,e,i,n,r,o,s)),this.mergeVertices()}function Bn(t,e,i,n,r,o,s){Rt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=n!==void 0?n:0,r=r!==void 0?r:2*Math.PI,o=o!==void 0?o:0,s=s!==void 0?s:Math.PI;var a=o+s,h,l,c=0,u=[],d=new M,g=new M,x=[],S=[],P=[],G=[];for(l=0;l<=i;l++){var N=[],q=l/i;for(h=0;h<=e;h++){var V=h/e;d.x=-t*Math.cos(n+V*r)*Math.sin(o+q*s),d.y=t*Math.cos(o+q*s),d.z=t*Math.sin(n+V*r)*Math.sin(o+q*s),S.push(d.x,d.y,d.z),g.set(d.x,d.y,d.z).normalize(),P.push(g.x,g.y,g.z),G.push(V,1-q),N.push(c++)}u.push(N)}for(l=0;l<i;l++)for(h=0;h<e;h++)t=u[l][h+1],n=u[l][h],r=u[l+1][h],s=u[l+1][h+1],(l!==0||0<o)&&x.push(t,n,s),(l!==i-1||a<Math.PI)&&x.push(n,r,s);this.setIndex(x),this.addAttribute("position",new ct(S,3)),this.addAttribute("normal",new ct(P,3)),this.addAttribute("uv",new ct(G,2))}function eo(t,e,i,n,r,o){F.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},this.fromBufferGeometry(new fr(t,e,i,n,r,o)),this.mergeVertices()}function fr(t,e,i,n,r,o){Rt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},t=t||.5,e=e||1,r=r!==void 0?r:0,o=o!==void 0?o:2*Math.PI,i=i!==void 0?Math.max(3,i):8,n=n!==void 0?Math.max(1,n):1;var s=[],a=[],h=[],l=[],c=t,u=(e-t)/n,d=new M,g=new $,x,S;for(x=0;x<=n;x++){for(S=0;S<=i;S++)t=r+S/i*o,d.x=c*Math.cos(t),d.y=c*Math.sin(t),a.push(d.x,d.y,d.z),h.push(0,0,1),g.x=(d.x/e+1)/2,g.y=(d.y/e+1)/2,l.push(g.x,g.y);c+=u}for(x=0;x<n;x++)for(e=x*(i+1),S=0;S<i;S++)t=S+e,r=t+i+1,o=t+i+2,c=t+1,s.push(t,r,c),s.push(r,o,c);this.setIndex(s),this.addAttribute("position",new ct(a,3)),this.addAttribute("normal",new ct(h,3)),this.addAttribute("uv",new ct(l,2))}function io(t,e,i,n){F.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new mr(t,e,i,n)),this.mergeVertices()}function mr(t,e,i,n){Rt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=Se.clamp(n,0,2*Math.PI);var r=[],o=[],s=[],a=1/e,h=new M,l=new $,c;for(c=0;c<=e;c++){var u=i+c*a*n,d=Math.sin(u),g=Math.cos(u);for(u=0;u<=t.length-1;u++)h.x=t[u].x*d,h.y=t[u].y,h.z=t[u].x*g,o.push(h.x,h.y,h.z),l.x=c/e,l.y=u/(t.length-1),s.push(l.x,l.y)}for(c=0;c<e;c++)for(u=0;u<t.length-1;u++)i=u+c*t.length,a=i+t.length,h=i+t.length+1,l=i+1,r.push(i,a,l),r.push(a,h,l);if(this.setIndex(r),this.addAttribute("position",new ct(o,3)),this.addAttribute("uv",new ct(s,2)),this.computeVertexNormals(),n===2*Math.PI)for(n=this.attributes.normal.array,r=new M,o=new M,s=new M,i=e*t.length*3,u=c=0;c<t.length;c++,u+=3)r.x=n[u+0],r.y=n[u+1],r.z=n[u+2],o.x=n[i+u+0],o.y=n[i+u+1],o.z=n[i+u+2],s.addVectors(r,o).normalize(),n[u+0]=n[i+u+0]=s.x,n[u+1]=n[i+u+1]=s.y,n[u+2]=n[i+u+2]=s.z}function Un(t,e){F.call(this),this.type="ShapeGeometry",typeof e=="object"&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new Fn(t,e)),this.mergeVertices()}function Fn(t,e){function i(c){var u,d=r.length/3;c=c.extractPoints(e);var g=c.shape,x=c.holes;if(wn.isClockWise(g)===!1)for(g=g.reverse(),c=0,u=x.length;c<u;c++){var S=x[c];wn.isClockWise(S)===!0&&(x[c]=S.reverse())}var P=wn.triangulateShape(g,x);for(c=0,u=x.length;c<u;c++)S=x[c],g=g.concat(S);for(c=0,u=g.length;c<u;c++)S=g[c],r.push(S.x,S.y,0),o.push(0,0,1),s.push(S.x,S.y);for(c=0,u=P.length;c<u;c++)g=P[c],n.push(g[0]+d,g[1]+d,g[2]+d),h+=3}Rt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var n=[],r=[],o=[],s=[],a=0,h=0;if(Array.isArray(t)===!1)i(t);else for(var l=0;l<t.length;l++)i(t[l]),this.addGroup(a,h,l),a+=h,h=0;this.setIndex(n),this.addAttribute("position",new ct(r,3)),this.addAttribute("normal",new ct(o,3)),this.addAttribute("uv",new ct(s,2))}function Js(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++)e.shapes.push(t[i].uuid);else e.shapes.push(t.uuid);return e}function gr(t,e){Rt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e};var i=[];e=Math.cos(Se.DEG2RAD*(e!==void 0?e:1));var n=[0,0],r={},o=["a","b","c"];if(t.isBufferGeometry){var s=new F;s.fromBufferGeometry(t)}else s=t.clone();s.mergeVertices(),s.computeFaceNormals(),t=s.vertices,s=s.faces;for(var a=0,h=s.length;a<h;a++)for(var l=s[a],c=0;3>c;c++){var u=l[o[c]],d=l[o[(c+1)%3]];n[0]=Math.min(u,d),n[1]=Math.max(u,d),u=n[0]+","+n[1],r[u]===void 0?r[u]={index1:n[0],index2:n[1],face1:a,face2:void 0}:r[u].face2=a}for(u in r)n=r[u],(n.face2===void 0||s[n.face1].normal.dot(s[n.face2].normal)<=e)&&(o=t[n.index1],i.push(o.x,o.y,o.z),o=t[n.index2],i.push(o.x,o.y,o.z));this.addAttribute("position",new ct(i,3))}function Gn(t,e,i,n,r,o,s,a){F.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a},this.fromBufferGeometry(new vn(t,e,i,n,r,o,s,a)),this.mergeVertices()}function vn(t,e,i,n,r,o,s,a){function h(N){var q,V=new $,ot=new M,T=0,A=N===!0?t:e,tt=N===!0?1:-1,vt=x;for(q=1;q<=n;q++)u.push(0,P*tt,0),d.push(0,tt,0),g.push(.5,.5),x++;var ft=x;for(q=0;q<=n;q++){var at=q/n*a+s,Ht=Math.cos(at);at=Math.sin(at),ot.x=A*at,ot.y=P*tt,ot.z=A*Ht,u.push(ot.x,ot.y,ot.z),d.push(0,tt,0),V.x=.5*Ht+.5,V.y=.5*at*tt+.5,g.push(V.x,V.y),x++}for(q=0;q<n;q++)V=vt+q,ot=ft+q,N===!0?c.push(ot,ot+1,V):c.push(ot+1,ot,V),T+=3;l.addGroup(G,T,N===!0?1:2),G+=T}Rt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o,thetaStart:s,thetaLength:a};var l=this;t=t!==void 0?t:1,e=e!==void 0?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,o=o!==void 0?o:!1,s=s!==void 0?s:0,a=a!==void 0?a:2*Math.PI;var c=[],u=[],d=[],g=[],x=0,S=[],P=i/2,G=0;(function(){var N,q,V=new M,ot=new M,T=0,A=(e-t)/i;for(q=0;q<=r;q++){var tt=[],vt=q/r,ft=vt*(e-t)+t;for(N=0;N<=n;N++){var at=N/n,Ht=at*a+s,It=Math.sin(Ht);Ht=Math.cos(Ht),ot.x=ft*It,ot.y=-vt*i+P,ot.z=ft*Ht,u.push(ot.x,ot.y,ot.z),V.set(It,A,Ht).normalize(),d.push(V.x,V.y,V.z),g.push(at,1-vt),tt.push(x++)}S.push(tt)}for(N=0;N<n;N++)for(q=0;q<r;q++)V=S[q+1][N],ot=S[q+1][N+1],A=S[q][N+1],c.push(S[q][N],V,A),c.push(V,ot,A),T+=6;l.addGroup(G,T,0),G+=T})(),o===!1&&(0<t&&h(!0),0<e&&h(!1)),this.setIndex(c),this.addAttribute("position",new ct(u,3)),this.addAttribute("normal",new ct(d,3)),this.addAttribute("uv",new ct(g,2))}function no(t,e,i,n,r,o,s){Gn.call(this,0,t,e,i,n,r,o,s),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function ro(t,e,i,n,r,o,s){vn.call(this,0,t,e,i,n,r,o,s),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:s}}function oo(t,e,i,n){F.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new vr(t,e,i,n)),this.mergeVertices()}function vr(t,e,i,n){Rt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=e!==void 0?Math.max(3,e):8,i=i!==void 0?i:0,n=n!==void 0?n:2*Math.PI;var r=[],o=[],s=[],a=[],h,l=new M,c=new $;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);var u=0;for(h=3;u<=e;u++,h+=3){var d=i+u/e*n;l.x=t*Math.cos(d),l.y=t*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[h]/t+1)/2,c.y=(o[h+1]/t+1)/2,a.push(c.x,c.y)}for(h=1;h<=e;h++)r.push(h,h+1,0);this.setIndex(r),this.addAttribute("position",new ct(o,3)),this.addAttribute("normal",new ct(s,3)),this.addAttribute("uv",new ct(a,2))}function Hn(t){fe.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function yr(t){Je.call(this,t),this.type="RawShaderMaterial"}function ln(t){fe.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.metalness=this.roughness=.5,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function kn(t){ln.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoatRoughness=this.clearCoat=0,this.setValues(t)}function Yi(t){fe.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.bumpMap=this.emissiveMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.envMap=this.alphaMap=this.specularMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Vn(t){Yi.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function jn(t){fe.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.morphNormals=this.morphTargets=this.skinning=this.lights=this.fog=!1,this.setValues(t)}function Wn(t){fe.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.lightMap=this.map=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)}function Xn(t){if(fe.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new H(16777215),this.bumpMap=this.map=this.matcap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new $(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.lights=this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t),this.matcap===null){t=document.createElement("canvas"),t.width=1,t.height=1;var e=t.getContext("2d");e.fillStyle="#fff",e.fillRect(0,0,1,1),this.matcap=new THREE.CanvasTexture(t)}}function qn(t){Ne.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}function Hi(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=n!==void 0?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function Ao(t,e,i,n){Hi.call(this,t,e,i,n),this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function so(t,e,i,n){Hi.call(this,t,e,i,n)}function Lo(t,e,i,n){Hi.call(this,t,e,i,n)}function wi(t,e,i,n){if(t===void 0)throw Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Ai.convertArray(e,this.TimeBufferType),this.values=Ai.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}function Ro(t,e,i){wi.call(this,t,e,i)}function Co(t,e,i,n){wi.call(this,t,e,i,n)}function _r(t,e,i,n){wi.call(this,t,e,i,n)}function bo(t,e,i,n){Hi.call(this,t,e,i,n)}function ao(t,e,i,n){wi.call(this,t,e,i,n)}function Oo(t,e,i,n){wi.call(this,t,e,i,n)}function xr(t,e,i,n){wi.call(this,t,e,i,n)}function ki(t,e,i){this.name=t,this.tracks=i,this.duration=e!==void 0?e:-1,this.uuid=Se.generateUUID(),0>this.duration&&this.resetDuration()}function ih(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return _r;case"vector":case"vector2":case"vector3":case"vector4":return xr;case"color":return Co;case"quaternion":return ao;case"bool":case"boolean":return Ro;case"string":return Oo}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function nh(t){if(t.type===void 0)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=ih(t.type);if(t.times===void 0){var i=[],n=[];Ai.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}function hs(t,e,i){var n=this,r=!1,o=0,s=0,a=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(h){s++,r===!1&&n.onStart!==void 0&&n.onStart(h,o,s),r=!0},this.itemEnd=function(h){o++,n.onProgress!==void 0&&n.onProgress(h,o,s),o===s&&(r=!1,n.onLoad!==void 0)&&n.onLoad()},this.itemError=function(h){n.onError!==void 0&&n.onError(h)},this.resolveURL=function(h){return a?a(h):h},this.setURLModifier=function(h){return a=h,this}}function Xi(t){this.manager=t!==void 0?t:Oi}function Qs(t){this.manager=t!==void 0?t:Oi}function $s(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ls(t){this.manager=t!==void 0?t:Oi,this._parser=null}function ho(t){this.manager=t!==void 0?t:Oi}function cs(t){this.manager=t!==void 0?t:Oi}function Io(t){this.manager=t!==void 0?t:Oi}function pe(){this.type="Curve",this.arcLengthDivisions=200}function Vi(t,e,i,n,r,o,s,a){pe.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=s||!1,this.aRotation=a||0}function wr(t,e,i,n,r,o){Vi.call(this,t,e,i,i,n,r,o),this.type="ArcCurve"}function us(){var t=0,e=0,i=0,n=0;return{initCatmullRom:function(r,o,s,a,h){r=h*(s-r),a=h*(a-o),t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},initNonuniformCatmullRom:function(r,o,s,a,h,l,c){r=((o-r)/h-(s-r)/(h+l)+(s-o)/l)*l,a=((s-o)/l-(a-o)/(l+c)+(a-s)/c)*l,t=o,e=r,i=-3*o+3*s-2*r-a,n=2*o-2*s+r+a},calc:function(r){var o=r*r;return t+e*r+i*o+n*o*r}}}function Ei(t,e,i,n){pe.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function Ks(t,e,i,n,r){e=.5*(n-e),r=.5*(r-i);var o=t*t;return(2*i-2*n+e+r)*t*o+(-3*i+3*n-2*e-r)*o+e*t+i}function lo(t,e,i,n){var r=1-t;return r*r*e+2*(1-t)*t*i+t*t*n}function co(t,e,i,n,r){var o=1-t,s=1-t;return o*o*o*e+3*s*s*t*i+3*(1-t)*t*t*n+t*t*t*r}function Zi(t,e,i,n){pe.call(this),this.type="CubicBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $,this.v3=n||new $}function cn(t,e,i,n){pe.call(this),this.type="CubicBezierCurve3",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M,this.v3=n||new M}function zi(t,e){pe.call(this),this.type="LineCurve",this.v1=t||new $,this.v2=e||new $}function Ji(t,e){pe.call(this),this.type="LineCurve3",this.v1=t||new M,this.v2=e||new M}function Qi(t,e,i){pe.call(this),this.type="QuadraticBezierCurve",this.v0=t||new $,this.v1=e||new $,this.v2=i||new $}function un(t,e,i){pe.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new M,this.v1=e||new M,this.v2=i||new M}function $i(t){pe.call(this),this.type="SplineCurve",this.points=t||[]}function yn(){pe.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Ki(t){yn.call(this),this.type="Path",this.currentPoint=new $,t&&this.setFromPoints(t)}function Pn(t){Ki.call(this,t),this.uuid=Se.generateUUID(),this.type="Shape",this.holes=[]}function ri(t,e){b.call(this),this.type="Light",this.color=new H(t),this.intensity=e!==void 0?e:1,this.receiveShadow=void 0}function Do(t,e,i){ri.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(b.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function Yn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new $(512,512),this.map=null,this.matrix=new mt}function zo(){Yn.call(this,new Bt(50,1,.5,500))}function No(t,e,i,n,r,o){ri.call(this,t,e),this.type="SpotLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(s){this.intensity=s/Math.PI}}),this.distance=i!==void 0?i:0,this.angle=n!==void 0?n:Math.PI/3,this.penumbra=r!==void 0?r:0,this.decay=o!==void 0?o:1,this.shadow=new zo}function Bo(t,e,i,n){ri.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(r){this.intensity=r/(4*Math.PI)}}),this.distance=i!==void 0?i:0,this.decay=n!==void 0?n:1,this.shadow=new Yn(new Bt(90,1,.5,500))}function uo(t,e,i,n,r,o){Kt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t!==void 0?t:-1,this.right=e!==void 0?e:1,this.top=i!==void 0?i:1,this.bottom=n!==void 0?n:-1,this.near=r!==void 0?r:.1,this.far=o!==void 0?o:2e3,this.updateProjectionMatrix()}function Uo(){Yn.call(this,new uo(-5,5,5,-5,.5,500))}function Fo(t,e){ri.call(this,t,e),this.type="DirectionalLight",this.position.copy(b.DefaultUp),this.updateMatrix(),this.target=new b,this.shadow=new Uo}function Go(t,e){ri.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function Ho(t,e,i,n){ri.call(this,t,e),this.type="RectAreaLight",this.width=i!==void 0?i:10,this.height=n!==void 0?n:10}function ko(t){this.manager=t!==void 0?t:Oi,this.textures={}}function ps(t){this.manager=t!==void 0?t:Oi}function Mr(){}function Vo(t){typeof t=="boolean"&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=t!==void 0?t:Oi,this.withCredentials=!1}function ds(t){this.manager=t!==void 0?t:Oi,this.resourcePath=""}function fs(t){typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=t!==void 0?t:Oi,this.options=void 0}function ms(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function gs(t){this.type="Font",this.data=t}function ta(t){this.manager=t!==void 0?t:Oi}function vs(t){this.manager=t!==void 0?t:Oi}function ea(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Bt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Bt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function po(t,e,i,n){b.call(this),this.type="CubeCamera";var r=new Bt(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new M(1,0,0)),this.add(r);var o=new Bt(90,1,t,e);o.up.set(0,-1,0),o.lookAt(new M(-1,0,0)),this.add(o);var s=new Bt(90,1,t,e);s.up.set(0,0,1),s.lookAt(new M(0,1,0)),this.add(s);var a=new Bt(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new M(0,-1,0)),this.add(a);var h=new Bt(90,1,t,e);h.up.set(0,-1,0),h.lookAt(new M(0,0,1)),this.add(h);var l=new Bt(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new M(0,0,-1)),this.add(l),n=n||{format:1022,magFilter:1006,minFilter:1006},this.renderTarget=new St(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(c,u){this.parent===null&&this.updateMatrixWorld();var d=this.renderTarget,g=d.texture.generateMipmaps;d.texture.generateMipmaps=!1,d.activeCubeFace=0,c.render(u,r,d),d.activeCubeFace=1,c.render(u,o,d),d.activeCubeFace=2,c.render(u,s,d),d.activeCubeFace=3,c.render(u,a,d),d.activeCubeFace=4,c.render(u,h,d),d.texture.generateMipmaps=g,d.activeCubeFace=5,c.render(u,l,d),c.setRenderTarget(null)},this.clear=function(c,u,d,g){for(var x=this.renderTarget,S=0;6>S;S++)x.activeCubeFace=S,c.setRenderTarget(x),c.clear(u,d,g);c.setRenderTarget(null)}}function ys(t){this.autoStart=t!==void 0?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1}function _s(){b.call(this),this.type="AudioListener",this.context=zs.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0}function Tr(t){b.call(this),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.offset=this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function xs(t){Tr.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ws(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e!==void 0?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Ms(t,e,i){switch(this.binding=t,this.valueSize=i,t=Float64Array,e){case"quaternion":e=this._slerp;break;case"string":case"bool":t=Array,e=this._select;break;default:e=this._lerp}this.buffer=new t(4*i),this._mixBufferRegion=e,this.referenceCount=this.useCount=this.cumulativeWeight=0}function ia(t,e,i){i=i||Pi.parseTrackName(e),this._targetGroup=t,this._bindings=t.subscribe_(e,i)}function Pi(t,e,i){this.path=e,this.parsedPath=i||Pi.parseTrackName(e),this.node=Pi.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function na(){this.uuid=Se.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}function ra(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null,t=e.tracks,e=t.length,i=Array(e);for(var n={endingStart:2400,endingEnd:2400},r=0;r!==e;++r){var o=t[r].createInterpolant(null);i[r]=o,o.settings=n}this._interpolantSettings=n,this._interpolants=i,this._propertyBindings=Array(e),this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ts(t){this._root=t,this._initMemoryManager(),this.time=this._accuIndex=0,this.timeScale=1}function jo(t,e){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=e),this.value=t}function Ss(){Rt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Es(t,e,i){Ge.call(this,t,e),this.meshPerAttribute=i||1}function Ps(t,e,i,n){typeof i=="number"&&(n=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),Z.call(this,t,e,i),this.meshPerAttribute=n||1}function oa(t,e,i,n){this.ray=new Ri(t,e),this.near=i||0,this.far=n||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 sa(t,e){return t.distance-e.distance}function As(t,e,i,n){if(t.visible!==!1&&(t.raycast(e,i),n===!0)){t=t.children,n=0;for(var r=t.length;n<r;n++)As(t[n],e,i,!0)}}function aa(t,e,i){return this.radius=t!==void 0?t:1,this.phi=e!==void 0?e:0,this.theta=i!==void 0?i:0,this}function ha(t,e,i){return this.radius=t!==void 0?t:1,this.theta=e!==void 0?e:0,this.y=i!==void 0?i:0,this}function Ls(t,e){this.min=t!==void 0?t:new $(1/0,1/0),this.max=e!==void 0?e:new $(-1/0,-1/0)}function Rs(t,e){this.start=t!==void 0?t:new M,this.end=e!==void 0?e:new M}function fo(t){b.call(this),this.material=t,this.render=function(){}}function mo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16711680,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=3*i.faces.length:i&&i.isBufferGeometry&&(e=i.attributes.normal.count),i=new Rt,e=new ct(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Sr(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Rt,e=[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];for(var i=0,n=1;32>i;i++,n++){var r=i/32*Math.PI*2,o=n/32*Math.PI*2;e.push(Math.cos(r),Math.sin(r),1,Math.cos(o),Math.sin(o),1)}t.addAttribute("position",new ct(e,3)),e=new Ne({fog:!1}),this.cone=new Re(t,e),this.add(this.cone),this.update()}function la(t){var e=[];t&&t.isBone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,la(t.children[i]));return e}function Er(t){for(var e=la(t),i=new Rt,n=[],r=[],o=new H(0,0,1),s=new H(0,1,0),a=0;a<e.length;a++){var h=e[a];h.parent&&h.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(o.r,o.g,o.b),r.push(s.r,s.g,s.b))}i.addAttribute("position",new ct(n,3)),i.addAttribute("color",new ct(r,3)),n=new Ne({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0}),Re.call(this,i,n),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function Pr(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i,t=new Bn(e,4,2),e=new Ve({wireframe:!0,fog:!1}),Ke.call(this,t,e),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ar(t,e){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,t=new Ne({fog:!1}),e=new Rt,e.addAttribute("position",new Z(new Float32Array(15),3)),this.line=new qe(e,t),this.add(this.line),this.update()}function Lr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,t=new Dn(e),t.rotateY(.5*Math.PI),this.material=new Ve({wireframe:!0,fog:!1}),this.color===void 0&&(this.material.vertexColors=2),e=t.getAttribute("position"),e=new Float32Array(3*e.count),t.addAttribute("color",new Z(e,3)),this.add(new Ke(t,this.material)),this.update()}function go(t,e,i,n){t=t||10,e=e||10,i=new H(i!==void 0?i:4473924),n=new H(n!==void 0?n:8947848);var r=e/2,o=t/e,s=t/2;t=[];for(var a=[],h=0,l=0,c=-s;h<=e;h++,c+=o){t.push(-s,0,c,s,0,c),t.push(c,0,-s,c,0,s);var u=h===r?i:n;u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3,u.toArray(a,l),l+=3}e=new Rt,e.addAttribute("position",new ct(t,3)),e.addAttribute("color",new ct(a,3)),i=new Ne({vertexColors:2}),Re.call(this,e,i)}function Wo(t,e,i,n,r,o){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(r!==void 0?r:4473924),o=new H(o!==void 0?o:8947848);var s=[],a=[],h;for(h=0;h<=e;h++){var l=h/e*2*Math.PI,c=Math.sin(l)*t;l=Math.cos(l)*t,s.push(0,0,0),s.push(c,0,l);var u=h&1?r:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(h=0;h<=i;h++){u=h&1?r:o;var d=t-t/i*h;for(e=0;e<n;e++)l=e/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b),l=(e+1)/n*2*Math.PI,c=Math.sin(l)*d,l=Math.cos(l)*d,s.push(c,0,l),a.push(u.r,u.g,u.b)}t=new Rt,t.addAttribute("position",new ct(s,3)),t.addAttribute("color",new ct(a,3)),s=new Ne({vertexColors:2}),Re.call(this,t,s)}function vo(t,e,i,n){this.object=t,this.size=e!==void 0?e:1,t=i!==void 0?i:16776960,n=n!==void 0?n:1,e=0,(i=this.object.geometry)&&i.isGeometry?e=i.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead."),i=new Rt,e=new ct(6*e,3),i.addAttribute("position",e),Re.call(this,i,new Ne({color:t,linewidth:n})),this.matrixAutoUpdate=!1,this.update()}function Rr(t,e,i){b.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,e===void 0&&(e=1),t=new Rt,t.addAttribute("position",new ct([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3)),e=new Ne({fog:!1}),this.lightPlane=new qe(t,e),this.add(this.lightPlane),t=new Rt,t.addAttribute("position",new ct([0,0,0,0,0,1],3)),this.targetLine=new qe(t,e),this.add(this.targetLine),this.update()}function yo(t){function e(g,x,S){i(g,S),i(x,S)}function i(g,x){o.push(0,0,0),s.push(x.r,x.g,x.b),a[g]===void 0&&(a[g]=[]),a[g].push(o.length/3-1)}var n=new Rt,r=new Ne({color:16777215,vertexColors:1}),o=[],s=[],a={},h=new H(16755200),l=new H(16711680),c=new H(43775),u=new H(16777215),d=new H(3355443);e("n1","n2",h),e("n2","n4",h),e("n4","n3",h),e("n3","n1",h),e("f1","f2",h),e("f2","f4",h),e("f4","f3",h),e("f3","f1",h),e("n1","f1",h),e("n2","f2",h),e("n3","f3",h),e("n4","f4",h),e("p","n1",l),e("p","n2",l),e("p","n3",l),e("p","n4",l),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",u),e("p","c",d),e("cn1","cn2",d),e("cn3","cn4",d),e("cf1","cf2",d),e("cf3","cf4",d),n.addAttribute("position",new ct(o,3)),n.addAttribute("color",new ct(s,3)),Re.call(this,n,r),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function _n(t,e){this.object=t,e===void 0&&(e=16776960),t=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]);var i=new Float32Array(24),n=new Rt;n.setIndex(new Z(t,1)),n.addAttribute("position",new Z(i,3)),Re.call(this,n,new Ne({color:e})),this.matrixAutoUpdate=!1,this.update()}function _o(t,e){this.type="Box3Helper",this.box=t,t=e!==void 0?e:16776960,e=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]);var i=new Rt;i.setIndex(new Z(e,1)),i.addAttribute("position",new ct([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)),Re.call(this,i,new Ne({color:t})),this.geometry.computeBoundingSphere()}function xo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=e===void 0?1:e,t=i!==void 0?i:16776960,e=new Rt,e.addAttribute("position",new ct([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)),e.computeBoundingSphere(),qe.call(this,e,new Ne({color:t})),e=new Rt,e.addAttribute("position",new ct([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),e.computeBoundingSphere(),this.add(new Ke(e,new Ve({color:t,opacity:.2,transparent:!0,depthWrite:!1})))}function xn(t,e,i,n,r,o){b.call(this),t===void 0&&(t=new THREE.Vector3(0,0,1)),e===void 0&&(e=new THREE.Vector3(0,0,0)),i===void 0&&(i=1),n===void 0&&(n=16776960),r===void 0&&(r=.2*i),o===void 0&&(o=.2*r),Zo===void 0&&(Zo=new Rt,Zo.addAttribute("position",new ct([0,0,0,0,1,0],3)),Ns=new vn(0,.5,1,5,1),Ns.translate(0,-.5,0)),this.position.copy(e),this.line=new qe(Zo,new Ne({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ke(Ns,new Ve({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,o)}function wo(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t];t=new Rt,t.addAttribute("position",new ct(e,3)),t.addAttribute("color",new ct([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),e=new Ne({vertexColors:2}),Re.call(this,t,e)}function ca(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom",this.closed=!0}function ua(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Cs(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52)),Number.isInteger===void 0&&(Number.isInteger=function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}),Math.sign===void 0&&(Math.sign=function(t){return 0>t?-1:0<t?1:+t}),!("name"in Function.prototype)&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),Object.assign===void 0&&function(){Object.assign=function(t){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!=null)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}(),Object.assign(Ot.prototype,{addEventListener:function(t,e){this._listeners===void 0&&(this._listeners={});var i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)},hasEventListener:function(t,e){if(this._listeners===void 0)return!1;var i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1},removeEventListener:function(t,e){this._listeners!==void 0&&(t=this._listeners[t],t!==void 0&&(e=t.indexOf(e),e!==-1&&t.splice(e,1)))},dispatchEvent:function(t){if(this._listeners!==void 0){var e=this._listeners[t.type];if(e!==void 0){t.target=this,e=e.slice(0);for(var i=0,n=e.length;i<n;i++)e[i].call(this,t)}}}});var Se={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;256>e;e++)t[e]=(16>e?"0":"")+e.toString(16);return function(){var i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return(t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[r&63|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[o&255]+t[o>>8&255]+t[o>>16&255]+t[o>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e),t*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*Se.DEG2RAD},radToDeg:function(t){return t*Se.RAD2DEG},isPowerOfTwo:function(t){return(t&t-1)===0&&t!==0},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))}};Object.defineProperties($.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($.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.y=this.x=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 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 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 e!==void 0?(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 e!==void 0?(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,i=this.y;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6],this.y=t[1]*e+t[4]*i+t[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 $,e=new $;return function(i,n){return t.set(i,i),e.set(n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?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 0>t&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return t=this.y-t.y,e*e+t*t},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,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&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 i=Math.cos(e);e=Math.sin(e);var n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*e+t.x,this.y=n*e+r*i+t.y,this}}),Object.assign(mt.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,o,s,a,h,l,c,u,d,g,x,S){var P=this.elements;return P[0]=t,P[4]=e,P[8]=i,P[12]=n,P[1]=r,P[5]=o,P[9]=s,P[13]=a,P[2]=h,P[6]=l,P[10]=c,P[14]=u,P[3]=d,P[7]=g,P[11]=x,P[15]=S,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 mt().fromArray(this.elements)},copy:function(t){var e=this.elements;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:function(){var t=new M;return function(e){var i=this.elements,n=e.elements,r=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length();return e=1/t.setFromMatrixColumn(e,2).length(),i[0]=n[0]*r,i[1]=n[1]*r,i[2]=n[2]*r,i[3]=0,i[4]=n[4]*o,i[5]=n[5]*o,i[6]=n[6]*o,i[7]=0,i[8]=n[8]*e,i[9]=n[9]*e,i[10]=n[10]*e,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[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,i=t.x,n=t.y,r=t.z,o=Math.cos(i);i=Math.sin(i);var s=Math.cos(n);n=Math.sin(n);var a=Math.cos(r);if(r=Math.sin(r),t.order==="XYZ"){t=o*a;var h=o*r,l=i*a,c=i*r;e[0]=s*a,e[4]=-s*r,e[8]=n,e[1]=h+l*n,e[5]=t-c*n,e[9]=-i*s,e[2]=c-t*n,e[6]=l+h*n,e[10]=o*s}else t.order==="YXZ"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t+c*i,e[4]=l*i-h,e[8]=o*n,e[1]=o*r,e[5]=o*a,e[9]=-i,e[2]=h*i-l,e[6]=c+t*i,e[10]=o*s):t.order==="ZXY"?(t=s*a,h=s*r,l=n*a,c=n*r,e[0]=t-c*i,e[4]=-o*r,e[8]=l+h*i,e[1]=h+l*i,e[5]=o*a,e[9]=c-t*i,e[2]=-o*n,e[6]=i,e[10]=o*s):t.order==="ZYX"?(t=o*a,h=o*r,l=i*a,c=i*r,e[0]=s*a,e[4]=l*n-h,e[8]=t*n+c,e[1]=s*r,e[5]=c*n+t,e[9]=h*n-l,e[2]=-n,e[6]=i*s,e[10]=o*s):t.order==="YZX"?(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=c-t*r,e[8]=l*r+h,e[1]=r,e[5]=o*a,e[9]=-i*a,e[2]=-n*a,e[6]=h*r+l,e[10]=t-c*r):t.order==="XZY"&&(t=o*s,h=o*n,l=i*s,c=i*n,e[0]=s*a,e[4]=-r,e[8]=n*a,e[1]=t*r+c,e[5]=o*a,e[9]=h*r-l,e[2]=l*r-h,e[6]=i*a,e[10]=c*r+t);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 M(0,0,0),e=new M(1,1,1);return function(i){return this.compose(t,i,e)}}(),lookAt:function(){var t=new M,e=new M,i=new M;return function(n,r,o){var s=this.elements;return i.subVectors(n,r),i.lengthSq()===0&&(i.z=1),i.normalize(),t.crossVectors(o,i),t.lengthSq()===0&&(Math.abs(o.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),t.crossVectors(o,i)),t.normalize(),e.crossVectors(i,t),s[0]=t.x,s[4]=e.x,s[8]=i.x,s[1]=t.y,s[5]=e.y,s[9]=i.y,s[2]=t.z,s[6]=e.z,s[10]=i.z,this}}(),multiply:function(t,e){return e!==void 0?(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 i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[4],o=i[8],s=i[12],a=i[1],h=i[5],l=i[9],c=i[13],u=i[2],d=i[6],g=i[10],x=i[14],S=i[3],P=i[7],G=i[11];i=i[15];var N=n[0],q=n[4],V=n[8],ot=n[12],T=n[1],A=n[5],tt=n[9],vt=n[13],ft=n[2],at=n[6],Ht=n[10],It=n[14],$t=n[3],Xt=n[7],Qt=n[11];return n=n[15],e[0]=t*N+r*T+o*ft+s*$t,e[4]=t*q+r*A+o*at+s*Xt,e[8]=t*V+r*tt+o*Ht+s*Qt,e[12]=t*ot+r*vt+o*It+s*n,e[1]=a*N+h*T+l*ft+c*$t,e[5]=a*q+h*A+l*at+c*Xt,e[9]=a*V+h*tt+l*Ht+c*Qt,e[13]=a*ot+h*vt+l*It+c*n,e[2]=u*N+d*T+g*ft+x*$t,e[6]=u*q+d*A+g*at+x*Xt,e[10]=u*V+d*tt+g*Ht+x*Qt,e[14]=u*ot+d*vt+g*It+x*n,e[3]=S*N+P*T+G*ft+i*$t,e[7]=S*q+P*A+G*at+i*Xt,e[11]=S*V+P*tt+G*Ht+i*Qt,e[15]=S*ot+P*vt+G*It+i*n,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 M;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],o=t[1],s=t[5],a=t[9],h=t[13],l=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-n*h*c-r*s*u+i*h*u+n*s*d-i*a*d)+t[7]*(+e*a*d-e*h*u+r*o*u-n*o*d+n*h*l-r*a*l)+t[11]*(+e*h*c-e*s*d-r*o*c+i*o*d+r*s*l-i*h*l)+t[15]*(-n*s*l-e*a*c+e*s*u+n*o*c-i*o*u+i*a*l)},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements;t=n[0];var r=n[1],o=n[2],s=n[3],a=n[4],h=n[5],l=n[6],c=n[7],u=n[8],d=n[9],g=n[10],x=n[11],S=n[12],P=n[13],G=n[14];n=n[15];var N=d*G*c-P*g*c+P*l*x-h*G*x-d*l*n+h*g*n,q=S*g*c-u*G*c-S*l*x+a*G*x+u*l*n-a*g*n,V=u*P*c-S*d*c+S*h*x-a*P*x-u*h*n+a*d*n,ot=S*d*l-u*P*l-S*h*g+a*P*g+u*h*G-a*d*G,T=t*N+r*q+o*V+s*ot;if(T===0){if(e===!0)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/T,i[0]=N*e,i[1]=(P*g*s-d*G*s-P*o*x+r*G*x+d*o*n-r*g*n)*e,i[2]=(h*G*s-P*l*s+P*o*c-r*G*c-h*o*n+r*l*n)*e,i[3]=(d*l*s-h*g*s-d*o*c+r*g*c+h*o*x-r*l*x)*e,i[4]=q*e,i[5]=(u*G*s-S*g*s+S*o*x-t*G*x-u*o*n+t*g*n)*e,i[6]=(S*l*s-a*G*s-S*o*c+t*G*c+a*o*n-t*l*n)*e,i[7]=(a*g*s-u*l*s+u*o*c-t*g*c-a*o*x+t*l*x)*e,i[8]=V*e,i[9]=(S*d*s-u*P*s-S*r*x+t*P*x+u*r*n-t*d*n)*e,i[10]=(a*P*s-S*h*s+S*r*c-t*P*c-a*r*n+t*h*n)*e,i[11]=(u*h*s-a*d*s-u*r*c+t*d*c+a*r*x-t*h*x)*e,i[12]=ot*e,i[13]=(u*P*o-S*d*o+S*r*g-t*P*g-u*r*G+t*d*G)*e,i[14]=(S*h*o-a*P*o-S*r*l+t*P*l+a*r*G-t*h*G)*e,i[15]=(a*d*o-u*h*o+u*r*l-t*d*l-a*r*g+t*h*g)*e,this},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e);e=Math.sin(e);var n=1-i,r=t.x,o=t.y;t=t.z;var s=n*r,a=n*o;return this.set(s*r+i,s*o-e*t,s*t+e*o,0,s*o+e*t,a*o+i,a*t-e*r,0,s*t-e*o,a*t+e*r,n*t*t+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,o=e._y,s=e._z,a=e._w,h=r+r,l=o+o,c=s+s;e=r*h;var u=r*l;r*=c;var d=o*l;o*=c,s*=c,h*=a,l*=a,a*=c,c=i.x;var g=i.y;return i=i.z,n[0]=(1-(d+s))*c,n[1]=(u+a)*c,n[2]=(r-l)*c,n[3]=0,n[4]=(u-a)*g,n[5]=(1-(e+s))*g,n[6]=(o+h)*g,n[7]=0,n[8]=(r+l)*i,n[9]=(o-h)*i,n[10]=(1-(e+d))*i,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:function(){var t=new M,e=new mt;return function(i,n,r){var o=this.elements,s=t.set(o[0],o[1],o[2]).length(),a=t.set(o[4],o[5],o[6]).length(),h=t.set(o[8],o[9],o[10]).length();0>this.determinant()&&(s=-s),i.x=o[12],i.y=o[13],i.z=o[14],e.copy(this),i=1/s,o=1/a;var l=1/h;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=o,e.elements[5]*=o,e.elements[6]*=o,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,n.setFromRotationMatrix(e),r.x=s,r.y=a,r.z=h,this}}(),makePerspective:function(t,e,i,n,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var s=this.elements;return s[0]=2*r/(e-t),s[4]=0,s[8]=(e+t)/(e-t),s[12]=0,s[1]=0,s[5]=2*r/(i-n),s[9]=(i+n)/(i-n),s[13]=0,s[2]=0,s[6]=0,s[10]=-(o+r)/(o-r),s[14]=-2*o*r/(o-r),s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makeOrthographic:function(t,e,i,n,r,o){var s=this.elements,a=1/(e-t),h=1/(i-n),l=1/(o-r);return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-((e+t)*a),s[1]=0,s[5]=2*h,s[9]=0,s[13]=-((i+n)*h),s[2]=0,s[6]=0,s[10]=-2*l,s[14]=-((o+r)*l),s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;16>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;16>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(ht,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,o,s){var a=i[n+0],h=i[n+1],l=i[n+2];i=i[n+3],n=r[o+0];var c=r[o+1],u=r[o+2];if(r=r[o+3],i!==r||a!==n||h!==c||l!==u){o=1-s;var d=a*n+h*c+l*u+i*r,g=0<=d?1:-1,x=1-d*d;x>Number.EPSILON&&(x=Math.sqrt(x),d=Math.atan2(x,d*g),o=Math.sin(o*d)/x,s=Math.sin(s*d)/x),g*=s,a=a*o+n*g,h=h*o+c*g,l=l*o+u*g,i=i*o+r*g,o===1-s&&(s=1/Math.sqrt(a*a+h*h+l*l+i*i),a*=s,h*=s,l*=s,i*=s)}t[e]=a,t[e+1]=h,t[e+2]=l,t[e+3]=i}}),Object.defineProperties(ht.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(ht.prototype,{isQuaternion:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,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 Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z;t=t.order;var o=Math.cos,s=Math.sin,a=o(i/2),h=o(n/2);return o=o(r/2),i=s(i/2),n=s(n/2),r=s(r/2),t==="XYZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="YXZ"?(this._x=i*h*o+a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="ZXY"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o-i*n*r):t==="ZYX"?(this._x=i*h*o-a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o+i*n*r):t==="YZX"?(this._x=i*h*o+a*n*r,this._y=a*n*o+i*h*r,this._z=a*h*r-i*n*o,this._w=a*h*o-i*n*r):t==="XZY"&&(this._x=i*h*o-a*n*r,this._y=a*n*o-i*h*r,this._z=a*h*r+i*n*o,this._w=a*h*o+i*n*r),e!==!1&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){e/=2;var i=Math.sin(e);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],r=e[1],o=e[5],s=e[9],a=e[2],h=e[6];e=e[10];var l=i+o+e;return 0<l?(i=.5/Math.sqrt(l+1),this._w=.25/i,this._x=(h-s)*i,this._y=(n-a)*i,this._z=(r-t)*i):i>o&&i>e?(i=2*Math.sqrt(1+i-o-e),this._w=(h-s)/i,this._x=.25*i,this._y=(t+r)/i,this._z=(n+a)/i):o>e?(i=2*Math.sqrt(1+o-i-e),this._w=(n-a)/i,this._x=(t+r)/i,this._y=.25*i,this._z=(s+h)/i):(i=2*Math.sqrt(1+e-i-o),this._w=(r-t)/i,this._x=(n+a)/i,this._y=(s+h)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t=new M,e;return function(i,n){return t===void 0&&(t=new M),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),angleTo:function(t){return 2*Math.acos(Math.abs(Se.clamp(this.dot(t),-1,1)))},rotateTowards:function(t,e){var i=this.angleTo(t);return i===0?this:(this.slerp(t,Math.min(1,e/i)),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 t===0?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return e!==void 0?(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 i=t._x,n=t._y,r=t._z;t=t._w;var o=e._x,s=e._y,a=e._z;return e=e._w,this._x=i*e+t*o+n*a-r*s,this._y=n*e+t*s+r*o-i*a,this._z=r*e+t*a+i*s-n*o,this._w=t*e-i*o-n*s-r*a,this.onChangeCallback(),this},slerp:function(t,e){if(e===0)return this;if(e===1)return this.copy(t);var i=this._x,n=this._y,r=this._z,o=this._w,s=o*t._w+i*t._x+n*t._y+r*t._z;if(0>s?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),1<=s)return this._w=o,this._x=i,this._y=n,this._z=r,this;if(t=1-s*s,t<=Number.EPSILON)return s=1-e,this._w=s*o+e*this._w,this._x=s*i+e*this._x,this._y=s*n+e*this._y,this._z=s*r+e*this._z,this.normalize();t=Math.sqrt(t);var a=Math.atan2(t,s);return s=Math.sin((1-e)*a)/t,e=Math.sin(e*a)/t,this._w=o*s+this._w*e,this._x=i*s+this._x*e,this._y=n*s+this._y*e,this._z=r*s+this._z*e,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 e===void 0&&(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 t===void 0&&(t=[]),e===void 0&&(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(M.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.z=this.y=this.x=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 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 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 e!==void 0?(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 e!==void 0?(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 e!==void 0?(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 ht;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 ht;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,o=t.y,s=t.z;t=t.w;var a=t*e+o*n-s*i,h=t*i+s*e-r*n,l=t*n+r*i-o*e;return e=-r*e-o*i-s*n,this.x=a*t+e*-r+h*-s-l*-o,this.y=h*t+e*-o+l*-r-a*-s,this.z=l*t+e*-s+a*-o-h*-r,this},project:function(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)},unproject:function(){var t=new mt;return function(e){return this.applyMatrix4(t.getInverse(e.projectionMatrix)).applyMatrix4(e.matrixWorld)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,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 M,e=new M;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?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,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return e!==void 0?(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 i=t.x,n=t.y;t=t.z;var r=e.x,o=e.y;return e=e.z,this.x=n*e-t*o,this.y=t*r-i*e,this.z=i*o-n*r,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new M;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new M;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq()),Math.acos(Se.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},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,i){var n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this},setFromCylindrical:function(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)},setFromCylindricalCoords:function(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this},setFromMatrixPosition:function(t){return t=t.elements,this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length();return t=this.setFromMatrixColumn(t,2).length(),this.x=e,this.y=i,this.z=t,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 e===void 0&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return i!==void 0&&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(yt.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,o,s,a,h){var l=this.elements;return l[0]=t,l[1]=n,l[2]=s,l[3]=e,l[4]=r,l[5]=a,l[6]=i,l[7]=o,l[8]=h,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;return t=t.elements,e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},setFromMatrix4:function(t){return t=t.elements,this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var t=new M;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,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 i=t.elements,n=e.elements;e=this.elements,t=i[0];var r=i[3],o=i[6],s=i[1],a=i[4],h=i[7],l=i[2],c=i[5];i=i[8];var u=n[0],d=n[3],g=n[6],x=n[1],S=n[4],P=n[7],G=n[2],N=n[5];return n=n[8],e[0]=t*u+r*x+o*G,e[3]=t*d+r*S+o*N,e[6]=t*g+r*P+o*n,e[1]=s*u+a*x+h*G,e[4]=s*d+a*S+h*N,e[7]=s*g+a*P+h*n,e[2]=l*u+c*x+i*G,e[5]=l*d+c*S+i*N,e[8]=l*g+c*P+i*n,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],i=t[1],n=t[2],r=t[3],o=t[4],s=t[5],a=t[6],h=t[7];return t=t[8],e*o*t-e*s*h-i*r*t+i*s*a+n*r*h-n*o*a},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements;t=this.elements;var n=i[0],r=i[1],o=i[2],s=i[3],a=i[4],h=i[5],l=i[6],c=i[7];i=i[8];var u=i*a-h*c,d=h*l-i*s,g=c*s-a*l,x=n*u+r*d+o*g;if(x===0){if(e===!0)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");return console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"),this.identity()}return e=1/x,t[0]=u*e,t[1]=(o*c-i*r)*e,t[2]=(h*r-o*a)*e,t[3]=d*e,t[4]=(i*n-o*l)*e,t[5]=(o*s-h*n)*e,t[6]=g*e,t[7]=(r*l-c*n)*e,t[8]=(a*n-r*s)*e,this},transpose:function(){var t=this.elements,e=t[1];return t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(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,i,n,r,o,s){var a=Math.cos(r);r=Math.sin(r),this.set(i*a,i*r,-i*(a*o+r*s)+o+t,-n*r,n*a,-n*(-r*o+a*s)+s+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t);t=Math.sin(t);var i=this.elements,n=i[0],r=i[3],o=i[6],s=i[1],a=i[4],h=i[7];return i[0]=e*n+t*s,i[3]=e*r+t*a,i[6]=e*o+t*h,i[1]=-t*n+e*s,i[4]=-t*r+e*a,i[7]=-t*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){var e=this.elements;t=t.elements;for(var i=0;9>i;i++)if(e[i]!==t[i])return!1;return!0},fromArray:function(t,e){e===void 0&&(e=0);for(var i=0;9>i;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){t===void 0&&(t=[]),e===void 0&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var An={getDataURL:function(t){if(typeof HTMLCanvasElement>"u")return t.src;if(t instanceof HTMLCanvasElement)var e=t;else{e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return 2048<e.width||2048<e.height?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}},rh=0;Ct.DEFAULT_IMAGE=void 0,Ct.DEFAULT_MAPPING=300,Ct.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Ct,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=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];var i={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(this.image!==void 0){var n=this.image;if(n.uuid===void 0&&(n.uuid=Se.generateUUID()),!e&&t.images[n.uuid]===void 0){if(Array.isArray(n))for(var r=[],o=0,s=n.length;o<s;o++)r.push(An.getDataURL(n[o]));else r=An.getDataURL(n);t.images[n.uuid]={uuid:n.uuid,url:r}}i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),0>t.x||1<t.x)switch(this.wrapS){case 1e3:t.x-=Math.floor(t.x);break;case 1001:t.x=0>t.x?0:1;break;case 1002:t.x=Math.abs(Math.floor(t.x)%2)===1?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(0>t.y||1<t.y)switch(this.wrapT){case 1e3:t.y-=Math.floor(t.y);break;case 1001:t.y=0>t.y?0:1;break;case 1002:t.y=Math.abs(Math.floor(t.y)%2)===1?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}}),Object.defineProperty(Ct.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Y.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.w=this.z=this.y=this.x=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 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 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=t.w!==void 0?t.w:1,this},add:function(t,e){return e!==void 0?(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 e!==void 0?(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,i=this.y,n=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,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 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){t=t.elements;var e=t[0],i=t[4],n=t[8],r=t[1],o=t[5],s=t[9],a=t[2],h=t[6],l=t[10];return .01>Math.abs(i-r)&&.01>Math.abs(n-a)&&.01>Math.abs(s-h)?.1>Math.abs(i+r)&&.1>Math.abs(n+a)&&.1>Math.abs(s+h)&&.1>Math.abs(e+o+l-3)?(this.set(1,0,0,0),this):(t=Math.PI,e=(e+1)/2,o=(o+1)/2,l=(l+1)/2,i=(i+r)/4,n=(n+a)/4,s=(s+h)/4,e>o&&e>l?.01>e?(h=0,i=a=.707106781):(h=Math.sqrt(e),a=i/h,i=n/h):o>l?.01>o?(h=.707106781,a=0,i=.707106781):(a=Math.sqrt(o),h=i/a,i=s/a):.01>l?(a=h=.707106781,i=0):(i=Math.sqrt(l),h=n/i,a=s/i),this.set(h,a,i,t),this):(t=Math.sqrt((h-s)*(h-s)+(n-a)*(n-a)+(r-i)*(r-i)),.001>Math.abs(t)&&(t=1),this.x=(h-s)/t,this.y=(n-a)/t,this.z=(r-i)/t,this.w=Math.acos((e+o+l-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(i,n){return t===void 0&&(t=new Y,e=new Y),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},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=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?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,i){return this.subVectors(e,t).multiplyScalar(i).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 e===void 0&&(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 t===void 0&&(t=[]),e===void 0&&(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,i){return i!==void 0&&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}}),lt.prototype=Object.assign(Object.create(Ot.prototype),{constructor:lt,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"})}}),St.prototype=Object.create(lt.prototype),St.prototype.constructor=St,St.prototype.isWebGLRenderTargetCube=!0,ut.prototype=Object.create(Ct.prototype),ut.prototype.constructor=ut,ut.prototype.isDataTexture=!0,Object.assign(At.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,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.length;a<h;a+=3){var l=t[a],c=t[a+1],u=t[a+2];l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,o=-1/0,s=-1/0,a=0,h=t.count;a<h;a++){var l=t.getX(a),c=t.getY(a),u=t.getZ(a);l<e&&(e=l),c<i&&(i=c),u<n&&(n=u),l>r&&(r=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(e,i,n),this.max.set(r,o,s),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new M;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),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 t===void 0&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new M),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new M),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(){function t(o){var s=o.geometry;if(s!==void 0){if(s.isGeometry)for(s=s.vertices,i=0,n=s.length;i<n;i++)r.copy(s[i]),r.applyMatrix4(o.matrixWorld),e.expandByPoint(r);else if(s.isBufferGeometry&&(s=s.attributes.position,s!==void 0))for(i=0,n=s.count;i<n;i++)r.fromBufferAttribute(s,i).applyMatrix4(o.matrixWorld),e.expandByPoint(r)}}var e,i,n,r=new M;return function(o){return e=this,o.updateMatrixWorld(!0),o.traverse(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||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 e===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new M),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 M;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){if(0<t.normal.x)var e=t.normal.x*this.min.x,i=t.normal.x*this.max.x;else e=t.normal.x*this.max.x,i=t.normal.x*this.min.x;return 0<t.normal.y?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),0<t.normal.z?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant},intersectsTriangle:function(){function t(u){var d,g=0;for(d=u.length-3;g<=d;g+=3){a.fromArray(u,g);var x=l.x*Math.abs(a.x)+l.y*Math.abs(a.y)+l.z*Math.abs(a.z),S=e.dot(a),P=i.dot(a),G=n.dot(a);if(Math.max(-Math.max(S,P,G),Math.min(S,P,G))>x)return!1}return!0}var e=new M,i=new M,n=new M,r=new M,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M;return function(u){return this.isEmpty()||(this.getCenter(h),l.subVectors(this.max,h),e.subVectors(u.a,h),i.subVectors(u.b,h),n.subVectors(u.c,h),r.subVectors(i,e),o.subVectors(n,i),s.subVectors(e,n),u=[0,-r.z,r.y,0,-o.z,o.y,0,-s.z,s.y,r.z,0,-r.x,o.z,0,-o.x,s.z,0,-s.x,-r.y,r.x,0,-o.y,o.x,0,-s.y,s.x,0],!t(u))||(u=[1,0,0,0,1,0,0,0,1],!t(u))?!1:(c.crossVectors(r,o),u=[c.x,c.y,c.z],t(u))}}(),clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new M),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new M;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new M;return function(e){return e===void 0&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new Dt),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 M,new M,new M,new M,new M,new M,new M,new M];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(Dt.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new At;return function(e,i){var n=this.center;i!==void 0?n.copy(i):t.setFromPoints(e).getCenter(n);for(var r=i=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));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 0>=this.radius},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 i=this.center.distanceToSquared(t);return e===void 0&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new M),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return t===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new At),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),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(_t.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new M,e=new M;return function(i,n,r){return n=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),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 e===void 0&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new M),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new M;return function(e,i){i===void 0&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new M);var n=e.delta(t),r=this.normal.dot(n);if(r===0){if(this.distanceToPoint(e.start)===0)return i.copy(e.start)}else if(r=-(e.start.dot(this.normal)+this.constant)/r,!(0>r||1<r))return i.copy(n).multiplyScalar(r).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&0<t||0>t&&0<e},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return t===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new M),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new M,e=new yt;return function(i,n){return n=n||e.getNormalMatrix(i),i=this.coplanarPoint(t).applyMatrix4(i),n=this.normal.applyMatrix3(n).normalize(),this.constant=-i.dot(n),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(K.prototype,{set:function(t,e,i,n,r,o){var s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(o),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],h=i[6],l=i[7],c=i[8],u=i[9],d=i[10],g=i[11],x=i[12],S=i[13],P=i[14];return i=i[15],e[0].setComponents(o-t,l-s,g-c,i-x).normalize(),e[1].setComponents(o+t,l+s,g+c,i+x).normalize(),e[2].setComponents(o+n,l+a,g+u,i+S).normalize(),e[3].setComponents(o-n,l-a,g-u,i-S).normalize(),e[4].setComponents(o-r,l-h,g-d,i-P).normalize(),e[5].setComponents(o+r,l+h,g+d,i+P).normalize(),this},intersectsObject:function(){var t=new Dt;return function(e){var i=e.geometry;return i.boundingSphere===null&&i.computeBoundingSphere(),t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new Dt;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new M;return function(e){for(var i=this.planes,n=0;6>n;n++){var r=i[n];if(t.x=0<r.normal.x?e.max.x:e.min.x,t.y=0<r.normal.y?e.max.y:e.min.y,t.z=0<r.normal.z?e.max.z:e.min.z,0>r.distanceToPoint(t))return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}});var Ie={alphamap_fragment:`#ifdef USE_ALPHAMAP
|
|
286
286
|
diffuseColor.a *= texture2D( alphaMap, vUv ).g;
|
|
287
287
|
#endif
|
|
288
288
|
`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP
|
|
@@ -2567,7 +2567,7 @@ void main() {
|
|
|
2567
2567
|
#include <clipping_planes_vertex>
|
|
2568
2568
|
#include <fog_vertex>
|
|
2569
2569
|
}
|
|
2570
|
-
`},_i={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),r;for(r in n)e[r]=n[r]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}}return e}},rh={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};Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=Ee.euclideanModulo(e,1),i=Ee.clamp(i,0,1),n=Ee.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(s){s!==void 0&&1>parseFloat(s)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var r=parseInt(i[2],10)/100,o=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,r,o)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=rh[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),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 e===void 0&&(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){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.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(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.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){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,r=Math.max(e,i,n),o=Math.min(e,i,n),s,a=(o+r)/2;if(o===r)o=s=0;else{var h=r-o;switch(o=.5>=a?h/(r+o):h/(2-r-o),r){case e:s=(i-n)/h+(i<n?6:0);break;case i:s=(n-e)/h+2;break;case n:s=(e-i)/h+4}s/=6}return t.h=s,t.s=o,t.l=a,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,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(i,n){this.getHSL(t),i.getHSL(e),i=Ee.lerp(t.h,e.h,n);var r=Ee.lerp(t.s,e.s,n);return n=Ee.lerp(t.l,e.l,n),this.setHSL(i,r,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var le={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new yt},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 $(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 H(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 H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new yt}},sprite:{diffuse:{value:new H(15658734)},opacity:{value:1},center:{value:new $(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new yt}}},pn={basic:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.fog]),vertexShader:Ie.meshbasic_vert,fragmentShader:Ie.meshbasic_frag},lambert:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.fog,le.lights,{emissive:{value:new H(0)}}]),vertexShader:Ie.meshlambert_vert,fragmentShader:Ie.meshlambert_frag},phong:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.gradientmap,le.fog,le.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:Ie.meshphong_vert,fragmentShader:Ie.meshphong_frag},standard:{uniforms:_i.merge([le.common,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.roughnessmap,le.metalnessmap,le.fog,le.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},matcap:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,le.fog,{matcap:{value:null}}]),vertexShader:Ie.meshmatcap_vert,fragmentShader:Ie.meshmatcap_frag},points:{uniforms:_i.merge([le.points,le.fog]),vertexShader:Ie.points_vert,fragmentShader:Ie.points_frag},dashed:{uniforms:_i.merge([le.common,le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ie.linedashed_vert,fragmentShader:Ie.linedashed_frag},depth:{uniforms:_i.merge([le.common,le.displacementmap]),vertexShader:Ie.depth_vert,fragmentShader:Ie.depth_frag},normal:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,{opacity:{value:1}}]),vertexShader:Ie.normal_vert,fragmentShader:Ie.normal_frag},sprite:{uniforms:_i.merge([le.sprite,le.fog]),vertexShader:Ie.sprite_vert,fragmentShader:Ie.sprite_frag},background:{uniforms:{uvTransform:{value:new yt},t2D:{value:null}},vertexShader:Ie.background_vert,fragmentShader:Ie.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ie.cube_vert,fragmentShader:Ie.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ie.equirect_vert,fragmentShader:Ie.equirect_frag},distanceRGBA:{uniforms:_i.merge([le.common,le.displacementmap,{referencePosition:{value:new M},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ie.distanceRGBA_vert,fragmentShader:Ie.distanceRGBA_frag},shadow:{uniforms:_i.merge([le.lights,le.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:Ie.shadow_vert,fragmentShader:Ie.shadow_frag}};pn.physical={uniforms:_i.merge([pn.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},Object.assign(O.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,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),w.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),w.DefaultOrder="XYZ",Object.defineProperties(w.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(w.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||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,i){var n=Ee.clamp,r=t.elements;t=r[0];var o=r[4],s=r[8],a=r[1],h=r[5],l=r[9],c=r[2],u=r[6];return r=r[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-l,r),this._z=Math.atan2(-o,t)):(this._x=Math.atan2(u,h),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(s,r),this._z=Math.atan2(a,h)):(this._y=Math.atan2(-c,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-c,r),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(a,t))):e==="ZYX"?(this._y=Math.asin(-n(c,-1,1)),.99999>Math.abs(c)?(this._x=Math.atan2(u,r),this._z=Math.atan2(a,t)):(this._x=0,this._z=Math.atan2(-o,h))):e==="YZX"?(this._z=Math.asin(n(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-c,t)):(this._x=0,this._y=Math.atan2(s,r))):e==="XZY"?(this._z=Math.asin(-n(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(u,h),this._y=Math.atan2(s,t)):(this._x=Math.atan2(-l,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new mt;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new ht;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],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(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 M(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(X.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=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(this.mask&t.mask)!==0}});var oh=0;b.DefaultUp=new M(0,1,0),b.DefaultMatrixAutoUpdate=!0,b.prototype=Object.assign(Object.create(Ot.prototype),{constructor:b,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 ht;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new ht;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new M(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new M(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new M(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new M;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new M(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new M(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new M(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new mt;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new ht,e=new mt,i=new M,n=new M;return function(r,o,s){r.isVector3?i.copy(r):i.set(r,o,s),r=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),r&&(e.extractRotation(r.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){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?(t.parent!==null&&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(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,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 i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new M),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new M,e=new M;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new ht),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new M,e=new ht;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new M),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new M),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,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(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)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(c,u){return c[u.uuid]===void 0&&(c[u.uuid]=u.toJSON(t)),u.uuid}function i(c){var u=[],d;for(d in c){var g=c[d];delete g.metadata,u.push(g)}return u}var n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){o.geometry=e(t.geometries,this.geometry);var s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0)if(s=s.shapes,Array.isArray(s))for(var a=0,h=s.length;a<h;a++)e(t.shapes,s[a]);else e(t.shapes,s)}if(this.material!==void 0)if(Array.isArray(this.material)){for(s=[],a=0,h=this.material.length;a<h;a++)s.push(e(t.materials,this.material[a]));o.material=s}else o.material=e(t.materials,this.material);if(0<this.children.length)for(o.children=[],a=0;a<this.children.length;a++)o.children.push(this.children[a].toJSON(t).object);if(n){n=i(t.geometries),a=i(t.materials),h=i(t.textures);var l=i(t.images);s=i(t.shapes),0<n.length&&(r.geometries=n),0<a.length&&(r.materials=a),0<h.length&&(r.textures=h),0<l.length&&(r.images=l),0<s.length&&(r.shapes=s)}return r.object=o,r},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(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)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var sh=0;F.prototype=Object.assign(Object.create(Ot.prototype),{constructor:F,isGeometry:!0,applyMatrix:function(t){for(var e=new yt().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;r<o;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new mt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new mt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new mt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new mt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new mt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(x,S,P,G){var N=a===void 0?[]:[i.colors[x].clone(),i.colors[S].clone(),i.colors[P].clone()],q=s===void 0?[]:[new M().fromArray(s,3*x),new M().fromArray(s,3*S),new M().fromArray(s,3*P)];G=new O(x,S,P,q,N,G),i.faces.push(G),h!==void 0&&i.faceVertexUvs[0].push([new $().fromArray(h,2*x),new $().fromArray(h,2*S),new $().fromArray(h,2*P)]),l!==void 0&&i.faceVertexUvs[1].push([new $().fromArray(l,2*x),new $().fromArray(l,2*S),new $().fromArray(l,2*P)])}var i=this,n=t.index!==null?t.index.array:void 0,r=t.attributes,o=r.position.array,s=r.normal!==void 0?r.normal.array:void 0,a=r.color!==void 0?r.color.array:void 0,h=r.uv!==void 0?r.uv.array:void 0,l=r.uv2!==void 0?r.uv2.array:void 0;l!==void 0&&(this.faceVertexUvs[1]=[]);for(var c=r=0;r<o.length;r+=3,c+=2)i.vertices.push(new M().fromArray(o,r)),a!==void 0&&i.colors.push(new H().fromArray(a,r));var u=t.groups;if(0<u.length)for(r=0;r<u.length;r++){o=u[r];var d=o.start,g=o.count;for(c=d,d+=g;c<d;c+=3)n!==void 0?e(n[c],n[c+1],n[c+2],o.materialIndex):e(c,c+1,c+2,o.materialIndex)}else if(n!==void 0)for(r=0;r<n.length;r+=3)e(n[r],n[r+1],n[r+2]);else for(r=0;r<o.length/3;r+=3)e(r,r+1,r+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new M;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;e=e===0?1:1/e;var i=new mt;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new M,e=new M,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b];t.subVectors(this.vertices[r.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new M;if(t){var r=new M,o=new M;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var s=this.vertices[e.a],a=this.vertices[e.b],h=this.vertices[e.c];r.subVectors(h,a),o.subVectors(s,a),r.cross(o),i[e.a].add(r),i[e.b].add(r),i[e.c].add(r)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],s=e.vertexNormals,s.length===3?(s[0].copy(i[e.a]),s[1].copy(i[e.b]),s[2].copy(i[e.c])):(s[0]=i[e.a].clone(),s[1]=i[e.b].clone(),s[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var r=0;for(t=n.vertexNormals.length;r<t;r++)n.__originalVertexNormals[r]?n.__originalVertexNormals[r].copy(n.vertexNormals[r]):n.__originalVertexNormals[r]=n.vertexNormals[r].clone()}var o=new F;for(o.faces=this.faces,r=0,t=this.morphTargets.length;r<t;r++){if(!this.morphNormals[r]){this.morphNormals[r]={},this.morphNormals[r].faceNormals=[],this.morphNormals[r].vertexNormals=[],n=this.morphNormals[r].faceNormals;var s=this.morphNormals[r].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var a=new M,h={a:new M,b:new M,c:new M};n.push(a),s.push(h)}}for(s=this.morphNormals[r],o.vertices=this.morphTargets[r].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],a=s.faceNormals[i],h=s.vertexNormals[i],a.copy(n.normal),h.a.copy(n.vertexNormals[0]),h.b.copy(n.vertexNormals[1]),h.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new At),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new Dt),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,h=t.faces,l=this.faceVertexUvs[0],c=t.faceVertexUvs[0],u=this.colors,d=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new yt().getNormalMatrix(e)),t=0;for(var g=s.length;t<g;t++){var x=s[t].clone();e!==void 0&&x.applyMatrix4(e),o.push(x)}for(t=0,g=d.length;t<g;t++)u.push(d[t].clone());for(t=0,g=h.length;t<g;t++){s=h[t];var S=s.vertexNormals;for(d=s.vertexColors,u=new O(s.a+r,s.b+r,s.c+r),u.normal.copy(s.normal),n!==void 0&&u.normal.applyMatrix3(n).normalize(),e=0,o=S.length;e<o;e++)x=S[e].clone(),n!==void 0&&x.applyMatrix3(n).normalize(),u.vertexNormals.push(x);for(u.color.copy(s.color),e=0,o=d.length;e<o;e++)x=d[e],u.vertexColors.push(x.clone());u.materialIndex=s.materialIndex+i,a.push(u)}for(t=0,g=c.length;t<g;t++)if(i=c[t],n=[],i!==void 0){for(e=0,o=i.length;e<o;e++)n.push(i[e].clone());l.push(n)}}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=[],i=[],n=Math.pow(10,4),r,o=0;for(r=this.vertices.length;o<r;o++){var s=this.vertices[o];s=Math.round(s.x*n)+"_"+Math.round(s.y*n)+"_"+Math.round(s.z*n),t[s]===void 0?(t[s]=o,e.push(this.vertices[o]),i[o]=e.length-1):i[o]=i[t[s]]}for(t=[],o=0,r=this.faces.length;o<r;o++)for(n=this.faces[o],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],s=0;3>s;s++)if(n[s]===n[(s+1)%3]){t.push(o);break}for(o=t.length-1;0<=o;o--)for(n=t[o],this.faces.splice(n,1),i=0,r=this.faceVertexUvs.length;i<r;i++)this.faceVertexUvs[i].splice(n,1);return o=this.vertices.length-e.length,this.vertices=e,o},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new M(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(h,l){return h.materialIndex-l.materialIndex});var n=this.faceVertexUvs[0],r=this.faceVertexUvs[1],o,s;for(n&&n.length===e&&(o=[]),r&&r.length===e&&(s=[]),i=0;i<e;i++){var a=t[i]._id;o&&o.push(n[a]),s&&s.push(r[a])}o&&(this.faceVertexUvs[0]=o),s&&(this.faceVertexUvs[1]=s)},toJSON:function(){function t(ot,T,A){return A?ot|1<<T:ot&~(1<<T)}function e(ot){var T=ot.x.toString()+ot.y.toString()+ot.z.toString();return l[T]!==void 0||(l[T]=h.length/3,h.push(ot.x,ot.y,ot.z)),l[T]}function i(ot){var T=ot.r.toString()+ot.g.toString()+ot.b.toString();return u[T]!==void 0||(u[T]=c.length,c.push(ot.getHex())),u[T]}function n(ot){var T=ot.x.toString()+ot.y.toString();return g[T]!==void 0||(g[T]=d.length/2,d.push(ot.x,ot.y)),g[T]}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.parameters!==void 0){var o=this.parameters,s;for(s in o)o[s]!==void 0&&(r[s]=o[s]);return r}for(o=[],s=0;s<this.vertices.length;s++){var a=this.vertices[s];o.push(a.x,a.y,a.z)}a=[];var h=[],l={},c=[],u={},d=[],g={};for(s=0;s<this.faces.length;s++){var x=this.faces[s],S=this.faceVertexUvs[0][s]!==void 0,P=0<x.normal.length(),G=0<x.vertexNormals.length,N=x.color.r!==1||x.color.g!==1||x.color.b!==1,q=0<x.vertexColors.length,V=0;V=t(V,0,0),V=t(V,1,!0),V=t(V,2,!1),V=t(V,3,S),V=t(V,4,P),V=t(V,5,G),V=t(V,6,N),V=t(V,7,q),a.push(V),a.push(x.a,x.b,x.c),a.push(x.materialIndex),S&&(S=this.faceVertexUvs[0][s],a.push(n(S[0]),n(S[1]),n(S[2]))),P&&a.push(e(x.normal)),G&&(P=x.vertexNormals,a.push(e(P[0]),e(P[1]),e(P[2]))),N&&a.push(i(x.color)),q&&(x=x.vertexColors,a.push(i(x[0]),i(x[1]),i(x[2])))}return r.data={},r.data.vertices=o,r.data.normals=h,0<c.length&&(r.data.colors=c),0<d.length&&(r.data.uvs=[d]),r.data.faces=a,r},clone:function(){return new F().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var r=t.vertices,o=0;for(e=r.length;o<e;o++)this.vertices.push(r[o].clone());for(r=t.colors,o=0,e=r.length;o<e;o++)this.colors.push(r[o].clone());for(r=t.faces,o=0,e=r.length;o<e;o++)this.faces.push(r[o].clone());for(o=0,e=t.faceVertexUvs.length;o<e;o++){var s=t.faceVertexUvs[o];for(this.faceVertexUvs[o]===void 0&&(this.faceVertexUvs[o]=[]),r=0,i=s.length;r<i;r++){var a=s[r],h=[],l=0;for(n=a.length;l<n;l++)h.push(a[l].clone());this.faceVertexUvs[o].push(h)}}for(l=t.morphTargets,o=0,e=l.length;o<e;o++){if(n={},n.name=l[o].name,l[o].vertices!==void 0)for(n.vertices=[],r=0,i=l[o].vertices.length;r<i;r++)n.vertices.push(l[o].vertices[r].clone());if(l[o].normals!==void 0)for(n.normals=[],r=0,i=l[o].normals.length;r<i;r++)n.normals.push(l[o].normals[r].clone());this.morphTargets.push(n)}for(l=t.morphNormals,o=0,e=l.length;o<e;o++){if(n={},l[o].vertexNormals!==void 0)for(n.vertexNormals=[],r=0,i=l[o].vertexNormals.length;r<i;r++)s=l[o].vertexNormals[r],a={},a.a=s.a.clone(),a.b=s.b.clone(),a.c=s.c.clone(),n.vertexNormals.push(a);if(l[o].faceNormals!==void 0)for(n.faceNormals=[],r=0,i=l[o].faceNormals.length;r<i;r++)n.faceNormals.push(l[o].faceNormals[r].clone());this.morphNormals.push(n)}for(r=t.skinWeights,o=0,e=r.length;o<e;o++)this.skinWeights.push(r[o].clone());for(r=t.skinIndices,o=0,e=r.length;o<e;o++)this.skinIndices.push(r[o].clone());for(r=t.lineDistances,o=0,e=r.length;o<e;o++)this.lineDistances.push(r[o]);return o=t.boundingBox,o!==null&&(this.boundingBox=o.clone()),o=t.boundingSphere,o!==null&&(this.boundingSphere=o.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(Z.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Z.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=t!==void 0?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,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),o=new H),e[i++]=o.r,e[i++]=o.g,e[i++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),o=new $),e[i++]=o.x,e[i++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),o=new M),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),o=new Y),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z,e[i++]=o.w}return this},set:function(t,e){return e===void 0&&(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,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),st.prototype=Object.create(Z.prototype),st.prototype.constructor=st,it.prototype=Object.create(Z.prototype),it.prototype.constructor=it,Pt.prototype=Object.create(Z.prototype),Pt.prototype.constructor=Pt,Lt.prototype=Object.create(Z.prototype),Lt.prototype.constructor=Lt,Gt.prototype=Object.create(Z.prototype),Gt.prototype.constructor=Gt,jt.prototype=Object.create(Z.prototype),jt.prototype.constructor=jt,ie.prototype=Object.create(Z.prototype),ie.prototype.constructor=ie,ct.prototype=Object.create(Z.prototype),ct.prototype.constructor=ct,kt.prototype=Object.create(Z.prototype),kt.prototype.constructor=kt,Object.assign(Me.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var r=t[n];if(r.materialIndex!==i){i=r.materialIndex,o!==void 0&&(o.count=3*n-o.start,e.push(o));var o={start:3*n,materialIndex:i}}}o!==void 0&&(o.count=3*n-o.start,e.push(o)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,r=n[0]&&0<n[0].length,o=n[1]&&0<n[1].length,s=t.morphTargets,a=s.length;if(0<a){for(var h=[],l=0;l<a;l++)h[l]={name:s[l].name,data:[]};this.morphTargets.position=h}var c=t.morphNormals,u=c.length;if(0<u){var d=[];for(l=0;l<u;l++)d[l]={name:c[l].name,data:[]};this.morphTargets.normal=d}var g=t.skinIndices,x=t.skinWeights,S=g.length===i.length,P=x.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l<e.length;l++){var G=e[l];this.vertices.push(i[G.a],i[G.b],i[G.c]);var N=G.vertexNormals;for(N.length===3?this.normals.push(N[0],N[1],N[2]):(N=G.normal,this.normals.push(N,N,N)),N=G.vertexColors,N.length===3?this.colors.push(N[0],N[1],N[2]):(N=G.color,this.colors.push(N,N,N)),r===!0&&(N=n[0][l],N!==void 0?this.uvs.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new $,new $,new $))),o===!0&&(N=n[1][l],N!==void 0?this.uvs2.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new $,new $,new $))),N=0;N<a;N++){var q=s[N].vertices;h[N].data.push(q[G.a],q[G.b],q[G.c])}for(N=0;N<u;N++)q=c[N].vertexNormals[l],d[N].data.push(q.a,q.b,q.c);S&&this.skinIndices.push(g[G.a],g[G.b],g[G.c]),P&&this.skinWeights.push(x[G.a],x[G.b],x[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 ah=1;Rt.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Rt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<gi(t)?ie:Gt)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(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 Z(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i: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;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new yt().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new mt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new mt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new mt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new mt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new mt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new M;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){t=new ct(3*e.vertices.length,3);var i=new ct(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new ct(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new ct(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new Me().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new Z(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new Z(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new Z(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new Z(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new Z(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],r=0,o=n.length;r<o;r++){var s=n[r],a=new ct(3*s.data.length,3);a.name=s.name,e.push(a.copyVector3sArray(s.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new ct(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new ct(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new At);var t=this.attributes.position;t!==void 0?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 At,e=new M;return function(){this.boundingSphere===null&&(this.boundingSphere=new Dt);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,o=0,s=i.count;o<s;o++)e.x=i.getX(o),e.y=i.getY(o),e.z=i.getZ(o),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new Z(new Float32Array(i.length),3));else for(var n=e.normal.array,r=0,o=n.length;r<o;r++)n[r]=0;n=e.normal.array;var s=new M,a=new M,h=new M,l=new M,c=new M;if(t){var u=t.array;for(r=0,o=t.count;r<o;r+=3){t=3*u[r+0];var d=3*u[r+1],g=3*u[r+2];s.fromArray(i,t),a.fromArray(i,d),h.fromArray(i,g),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[t]+=l.x,n[t+1]+=l.y,n[t+2]+=l.z,n[d]+=l.x,n[d+1]+=l.y,n[d+2]+=l.z,n[g]+=l.x,n[g+1]+=l.y,n[g+2]+=l.z}}else for(r=0,o=i.length;r<o;r+=9)s.fromArray(i,r),a.fromArray(i,r+3),h.fromArray(i,r+6),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[r]=l.x,n[r+1]=l.y,n[r+2]=l.z,n[r+3]=l.x,n[r+4]=l.y,n[r+5]=l.z,n[r+6]=l.x,n[r+7]=l.y,n[r+8]=l.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var r=i[n].array,o=t.attributes[n],s=o.array,a=0;for(o=o.itemSize*e;a<s.length;a++,o++)r[o]=s[a]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new M;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Rt,e=this.index.array,i=this.attributes,n;for(n in i){var r=i[n],o=r.array,s=r.itemSize,a=new o.constructor(e.length*s),h=0;r=0;for(var l=e.length;r<l;r++)for(var c=e[r]*s,u=0;u<s;u++)a[h++]=o[c++];t.addAttribute(n,new Z(a,s))}for(e=this.groups,r=0,l=e.length;r<l;r++)i=e[r],t.addGroup(i.start,i.count,i.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),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(r in i){var n=i[r];e=Array.prototype.slice.call(n.array),t.data.attributes[r]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var r=this.groups;return 0<r.length&&(t.data.groups=JSON.parse(JSON.stringify(r))),r=this.boundingSphere,r!==null&&(t.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),t},clone:function(){return new Rt().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(s in i)this.addAttribute(s,i[s].clone());var n=t.morphAttributes;for(s in n){var r=[],o=n[s];for(i=0,e=o.length;i<e;i++)r.push(o[i].clone());this.morphAttributes[s]=r}var s=t.groups;for(i=0,e=s.length;i<e;i++)n=s[i],this.addGroup(n.start,n.count,n.materialIndex);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Fe.prototype=Object.create(F.prototype),Fe.prototype.constructor=Fe,vi.prototype=Object.create(Rt.prototype),vi.prototype.constructor=vi,Ti.prototype=Object.create(F.prototype),Ti.prototype.constructor=Ti,oi.prototype=Object.create(Rt.prototype),oi.prototype.constructor=oi;var hh=0;fe.prototype=Object.assign(Object.create(Ot.prototype),{constructor:fe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(r){var o=[],s;for(s in r){var a=r[s];delete a.metadata,o.push(a)}return o}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(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.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),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.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Je.prototype=Object.create(fe.prototype),Je.prototype.constructor=Je,Je.prototype.isShaderMaterial=!0,Je.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_i.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},Je.prototype.toJSON=function(t){var e=fe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(Ri.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 e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new M),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 M;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new M),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new M;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new M,e=new M,i=new M;return function(n,r,o,s){t.copy(n).add(r).multiplyScalar(.5),e.copy(r).sub(n).normalize(),i.copy(this.origin).sub(t);var a=.5*n.distanceTo(r),h=-this.direction.dot(e),l=i.dot(this.direction),c=-i.dot(e),u=i.lengthSq(),d=Math.abs(1-h*h);if(0<d){n=h*c-l,r=h*l-c;var g=a*d;0<=n?r>=-g?r<=g?(a=1/d,n*=a,r*=a,h=n*(n+h*r+2*l)+r*(h*n+r+2*c)+u):(r=a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):(r=-a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):r<=-g?(n=Math.max(0,-(-h*a+l)),r=0<n?-a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u):r<=g?(n=0,r=Math.min(Math.max(-a,-c),a),h=r*(r+2*c)+u):(n=Math.max(0,-(h*a+l)),r=0<n?a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u)}else r=0<h?-a:a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u;return o&&o.copy(this.direction).multiplyScalar(n).add(this.origin),s&&s.copy(e).multiplyScalar(r).add(t),h}}(),intersectSphere:function(){var t=new M;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n;return e=e.radius*e.radius,r>e?null:(e=Math.sqrt(e-r),r=n-e,n+=e,0>r&&0>n?null:0>r?this.at(n,i):this.at(r,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,r=1/this.direction.z,o=this.origin;if(0<=i){var s=(t.min.x-o.x)*i;i*=t.max.x-o.x}else s=(t.max.x-o.x)*i,i*=t.min.x-o.x;if(0<=n){var a=(t.min.y-o.y)*n;n*=t.max.y-o.y}else a=(t.max.y-o.y)*n,n*=t.min.y-o.y;return s>n||a>i||((a>s||s!==s)&&(s=a),(n<i||i!==i)&&(i=n),0<=r?(a=(t.min.z-o.z)*r,t=(t.max.z-o.z)*r):(a=(t.max.z-o.z)*r,t=(t.min.z-o.z)*r),s>t||a>i)?null:((a>s||s!==s)&&(s=a),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=s?s:i,e))},intersectsBox:function(){var t=new M;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new M,e=new M,i=new M,n=new M;return function(r,o,s,a,h){if(e.subVectors(o,r),i.subVectors(s,r),n.crossVectors(e,i),o=this.direction.dot(n),0<o){if(a)return null;a=1}else if(0>o)a=-1,o=-o;else return null;return t.subVectors(this.origin,r),r=a*this.direction.dot(i.crossVectors(t,i)),0>r||(s=a*this.direction.dot(e.cross(t)),0>s||r+s>o)?null:(r=-a*t.dot(n),0>r?null:this.at(r/o,h))}}(),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(be,{getNormal:function(){var t=new M;return function(e,i,n,r){return r===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new M),r.subVectors(n,i),t.subVectors(e,i),r.cross(t),e=r.lengthSq(),0<e?r.multiplyScalar(1/Math.sqrt(e)):r.set(0,0,0)}}(),getBarycoord:function(){var t=new M,e=new M,i=new M;return function(n,r,o,s,a){t.subVectors(s,r),e.subVectors(o,r),i.subVectors(n,r),n=t.dot(t),r=t.dot(e),o=t.dot(i);var h=e.dot(e);s=e.dot(i);var l=n*h-r*r;return a===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),a=new M),l===0?a.set(-2,-1,-1):(l=1/l,h=(h*o-r*s)*l,n=(n*s-r*o)*l,a.set(1-h-n,n,h))}}(),containsPoint:function(){var t=new M;return function(e,i,n,r){return be.getBarycoord(e,i,n,r,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new M;return function(e,i,n,r,o,s,a,h){return this.getBarycoord(e,i,n,r,t),h.set(0,0),h.addScaledVector(o,t.x),h.addScaledVector(s,t.y),h.addScaledVector(a,t.z),h}}()}),Object.assign(be.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),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 M,e=new M;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new M),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return be.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new M),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return be.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return be.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,r){return be.getUV(t,this.a,this.b,this.c,e,i,n,r)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new M,e=new M,i=new M,n=new M,r=new M,o=new M;return function(s,a){a===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new M);var h=this.a,l=this.b,c=this.c;t.subVectors(l,h),e.subVectors(c,h),n.subVectors(s,h);var u=t.dot(n),d=e.dot(n);if(0>=u&&0>=d)return a.copy(h);r.subVectors(s,l);var g=t.dot(r),x=e.dot(r);if(0<=g&&x<=g)return a.copy(l);var S=u*x-g*d;if(0>=S&&0<=u&&0>=g)return l=u/(u-g),a.copy(h).addScaledVector(t,l);o.subVectors(s,c),s=t.dot(o);var P=e.dot(o);return 0<=P&&s<=P?a.copy(c):(u=s*d-u*P,0>=u&&0<=d&&0>=P?(S=d/(d-P),a.copy(h).addScaledVector(e,S)):(d=g*P-s*x,0>=d&&0<=x-g&&0<=s-P?(i.subVectors(c,l),S=(x-g)/(x-g+(s-P)),a.copy(l).addScaledVector(i,S)):(c=1/(d+u+S),l=u*c,S*=c,a.copy(h).addScaledVector(t,l).addScaledVector(e,S))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ve.prototype=Object.create(fe.prototype),Ve.prototype.constructor=Ve,Ve.prototype.isMeshBasicMaterial=!0,Ve.prototype.copy=function(t){return fe.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},Ke.prototype=Object.assign(Object.create(b.prototype),{constructor:Ke,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return b.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(P,G,N,q,V,ot,T,A){return(G.side===1?q.intersectTriangle(T,ot,V,!0,A):q.intersectTriangle(V,ot,T,G.side!==2,A))===null?null:(S.copy(A),S.applyMatrix4(P.matrixWorld),G=N.ray.origin.distanceTo(S),G<N.near||G>N.far?null:{distance:G,point:S.clone(),object:P})}function e(P,G,N,q,V,ot,T,A,tt){return o.fromBufferAttribute(V,T),s.fromBufferAttribute(V,A),a.fromBufferAttribute(V,tt),(P=t(P,G,N,q,o,s,a,x))&&(ot&&(u.fromBufferAttribute(ot,T),d.fromBufferAttribute(ot,A),g.fromBufferAttribute(ot,tt),P.uv=be.getUV(x,o,s,a,u,d,g,new $)),ot=new O(T,A,tt),be.getNormal(o,s,a,ot.normal),P.face=ot),P}var i=new mt,n=new Ri,r=new Dt,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M,u=new $,d=new $,g=new $,x=new M,S=new M;return function(P,G){var N=this.geometry,q=this.material,V=this.matrixWorld;if(q!==void 0&&(N.boundingSphere===null&&N.computeBoundingSphere(),r.copy(N.boundingSphere),r.applyMatrix4(V),P.ray.intersectsSphere(r)!==!1&&(i.getInverse(V),n.copy(P.ray).applyMatrix4(i),N.boundingBox===null||n.intersectsBox(N.boundingBox)!==!1))){if(N.isBufferGeometry){var ot=N.index,T=N.attributes.position,A=N.attributes.uv,tt=N.groups;N=N.drawRange;var vt;if(ot!==null)if(Array.isArray(q)){var ft=0;for(vt=tt.length;ft<vt;ft++){var at=tt[ft],Ht=q[at.materialIndex];V=Math.max(at.start,N.start);var It=Math.min(at.start+at.count,N.start+N.count);for(at=V;at<It;at+=3){V=ot.getX(at);var $t=ot.getX(at+1),Xt=ot.getX(at+2);(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(at/3),G.push(V))}}}else for(V=Math.max(0,N.start),It=Math.min(ot.count,N.start+N.count),ft=V,vt=It;ft<vt;ft+=3)V=ot.getX(ft),$t=ot.getX(ft+1),Xt=ot.getX(ft+2),(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V));else if(T!==void 0)if(Array.isArray(q))for(ft=0,vt=tt.length;ft<vt;ft++)for(at=tt[ft],Ht=q[at.materialIndex],V=Math.max(at.start,N.start),It=Math.min(at.start+at.count,N.start+N.count),at=V;at<It;at+=3)V=at,$t=at+1,Xt=at+2,(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(at/3),G.push(V));else for(V=Math.max(0,N.start),It=Math.min(T.count,N.start+N.count),ft=V,vt=It;ft<vt;ft+=3)V=ft,$t=ft+1,Xt=ft+2,(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V))}else if(N.isGeometry){for(T=Array.isArray(q),A=N.vertices,tt=N.faces,V=N.faceVertexUvs[0],0<V.length&&(ot=V),at=0,It=tt.length;at<It;at++)if($t=tt[at],V=T?q[$t.materialIndex]:q,V!==void 0){if(ft=A[$t.a],vt=A[$t.b],Ht=A[$t.c],V.morphTargets===!0){Xt=N.morphTargets;var Qt=this.morphTargetInfluences;o.set(0,0,0),s.set(0,0,0),a.set(0,0,0);for(var re=0,me=Xt.length;re<me;re++){var Ae=Qt[re];if(Ae!==0){var fi=Xt[re].vertices;o.addScaledVector(h.subVectors(fi[$t.a],ft),Ae),s.addScaledVector(l.subVectors(fi[$t.b],vt),Ae),a.addScaledVector(c.subVectors(fi[$t.c],Ht),Ae)}}o.add(ft),s.add(vt),a.add(Ht),ft=o,vt=s,Ht=a}(V=t(this,V,P,n,ft,vt,Ht,x))&&(ot&&ot[at]&&(Xt=ot[at],u.copy(Xt[0]),d.copy(Xt[1]),g.copy(Xt[2]),V.uv=be.getUV(x,ft,vt,Ht,u,d,g,new $)),V.face=$t,V.faceIndex=at,G.push(V))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_.prototype=Object.create(Ct.prototype),_.prototype.constructor=_,_.prototype.isCubeTexture=!0,Object.defineProperty(_.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),D.prototype=Object.create(Ct.prototype),D.prototype.constructor=D,D.prototype.isDataTexture3D=!0;var pa=new Ct,lh=new D,da=new _,fa=[],ma=[],ga=new Float32Array(16),va=new Float32Array(9),ya=new Float32Array(4);tr.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),J(e,t)},Nr.prototype.setValue=function(t,e,i){for(var n=this.seq,r=0,o=n.length;r!==o;++r){var s=n[r];s.setValue(t,e[s.id],i)}};var bs=/([\w\d_]+)(\])?(\[|\.)?/g;on.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},on.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},on.upload=function(t,e,i,n){for(var r=0,o=e.length;r!==o;++r){var s=e[r],a=i[s.id];a.needsUpdate!==!1&&s.setValue(t,a.value,n)}},on.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var o=t[n];o.id in e&&i.push(o)}return i};var ch=0,uh=0;Tt.prototype=Object.create(fe.prototype),Tt.prototype.constructor=Tt,Tt.prototype.isMeshDepthMaterial=!0,Tt.prototype.copy=function(t){return fe.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},gt.prototype=Object.create(fe.prototype),gt.prototype.constructor=gt,gt.prototype.isMeshDistanceMaterial=!0,gt.prototype.copy=function(t){return fe.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},Pe.prototype=Object.assign(Object.create(b.prototype),{constructor:Pe,isGroup:!0}),Kt.prototype=Object.assign(Object.create(b.prototype),{constructor:Kt,isCamera:!0,copy:function(t,e){return b.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){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new M),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){b.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),Bt.prototype=Object.assign(Object.create(Kt.prototype),{constructor:Bt,isPerspectiveCamera:!0,copy:function(t,e){return Kt.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=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*Ee.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ee.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ee.RAD2DEG*Math.atan(Math.tan(.5*Ee.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,i,n,r,o){this.aspect=t/e,this.view===null&&(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=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ee.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){var s=o.fullWidth,a=o.fullHeight;r+=o.offsetX*n/s,e-=o.offsetY*i/a,n*=o.width/s,i*=o.height/a}o=this.filmOffset,o!==0&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),te.prototype=Object.assign(Object.create(Bt.prototype),{constructor:te,isArrayCamera:!0});var _a=new M,xa=new M;Jt.prototype.isFogExp2=!0,Jt.prototype.clone=function(){return new Jt(this.color,this.density)},Jt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},yi.prototype.isFog=!0,yi.prototype.clone=function(){return new yi(this.color,this.near,this.far)},yi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},qi.prototype=Object.assign(Object.create(b.prototype),{constructor:qi,copy:function(t,e){return b.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=b.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Ge.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Ge.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=t!==void 0?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,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(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(He.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(He.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,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),We.prototype=Object.create(fe.prototype),We.prototype.constructor=We,We.prototype.isSpriteMaterial=!0,We.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Cr;ei.prototype=Object.assign(Object.create(b.prototype),{constructor:ei,isSprite:!0,raycast:function(){function t(g,x,S,P,G,N){r.subVectors(g,S).addScalar(.5).multiply(P),G!==void 0?(o.x=N*r.x-G*r.y,o.y=G*r.x+N*r.y):o.copy(r),g.copy(x),g.x+=o.x,g.y+=o.y,g.applyMatrix4(s)}var e=new M,i=new M,n=new M,r=new $,o=new $,s=new mt,a=new M,h=new M,l=new M,c=new $,u=new $,d=new $;return function(g,x){i.setFromMatrixScale(this.matrixWorld),s.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var S=this.material.rotation;if(S!==0)var P=Math.cos(S),G=Math.sin(S);S=this.center,t(a.set(-.5,-.5,0),n,S,i,G,P),t(h.set(.5,-.5,0),n,S,i,G,P),t(l.set(.5,.5,0),n,S,i,G,P),c.set(0,0),u.set(1,0),d.set(1,1);var N=g.ray.intersectTriangle(a,h,l,!1,e);N===null&&(t(h.set(-.5,.5,0),n,S,i,G,P),u.set(0,1),N=g.ray.intersectTriangle(a,l,h,!1,e),N===null)||(G=g.ray.origin.distanceTo(e),G<g.near||G>g.far||x.push({distance:G,point:e.clone(),uv:be.getUV(e,a,h,l,c,u,d,new $),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return b.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ii.prototype=Object.assign(Object.create(b.prototype),{constructor:ii,copy:function(t){b.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new M;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new M,e=new M;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var r=1,o=n.length;r<o&&i>=n[r].distance;r++)n[r-1].object.visible=!1,n[r].object.visible=!0;for(;r<o;r++)n[r].object.visible=!1}}}(),toJSON:function(t){t=b.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var r=e[i];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}),Object.assign(ai.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new mt;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(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 mt,e=new mt;return function(){for(var i=this.bones,n=this.boneInverses,r=this.boneMatrices,o=this.boneTexture,s=0,a=i.length;s<a;s++)t.multiplyMatrices(i[s]?i[s].matrixWorld:e,n[s]),t.toArray(r,16*s);o!==void 0&&(o.needsUpdate=!0)}}(),clone:function(){return new ai(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),hi.prototype=Object.assign(Object.create(b.prototype),{constructor:hi,isBone:!0}),ke.prototype=Object.assign(Object.create(Ke.prototype),{constructor:ke,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],r=new hi;t.push(r),r.name=n.name,r.position.fromArray(n.pos),r.quaternion.fromArray(n.rotq),n.scl!==void 0&&r.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(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;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new Y;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Ke.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?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)}}),Ne.prototype=Object.create(fe.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isLineBasicMaterial=!0,Ne.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},qe.prototype=Object.assign(Object.create(b.prototype),{constructor:qe,isLine:!0,computeLineDistances:function(){var t=new M,e=new M;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[0],o=1,s=n.count;o<s;o++)t.fromBufferAttribute(n,o-1),e.fromBufferAttribute(n,o),r[o]=r[o-1],r[o]+=t.distanceTo(e);i.addAttribute("lineDistance",new ct(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,r[0]=0,o=1,s=n.length;o<s;o++)r[o]=r[o-1],r[o]+=n[o-1].distanceTo(n[o]);return this}}(),raycast:function(){var t=new mt,e=new Ri,i=new Dt;return function(n,r){var o=n.linePrecision,s=this.geometry,a=this.matrixWorld;if(s.boundingSphere===null&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(a),i.radius+=o,n.ray.intersectsSphere(i)!==!1){t.getInverse(a),e.copy(n.ray).applyMatrix4(t),o/=(this.scale.x+this.scale.y+this.scale.z)/3,o*=o;var h=new M,l=new M;a=new M;var c=new M,u=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var d=s.index,g=s.attributes.position.array;if(d!==null){d=d.array,s=0;for(var x=d.length-1;s<x;s+=u){var S=d[s+1];h.fromArray(g,3*d[s]),l.fromArray(g,3*S),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}else for(s=0,x=g.length/3-1;s<x;s+=u)h.fromArray(g,3*s),l.fromArray(g,3*s+3),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}else if(s.isGeometry)for(h=s.vertices,l=h.length,s=0;s<l-1;s+=u)S=e.distanceSqToSegment(h[s],h[s+1],c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return b.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),Re.prototype=Object.assign(Object.create(qe.prototype),{constructor:Re,isLineSegments:!0,computeLineDistances:function(){var t=new M,e=new M;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[],o=0,s=n.count;o<s;o+=2)t.fromBufferAttribute(n,o),e.fromBufferAttribute(n,o+1),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);i.addAttribute("lineDistance",new ct(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,o=0,s=n.length;o<s;o+=2)t.copy(n[o]),e.copy(n[o+1]),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);return this}}()}),an.prototype=Object.assign(Object.create(qe.prototype),{constructor:an,isLineLoop:!0}),xi.prototype=Object.create(fe.prototype),xi.prototype.constructor=xi,xi.prototype.isPointsMaterial=!0,xi.prototype.copy=function(t){return fe.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},nr.prototype=Object.assign(Object.create(b.prototype),{constructor:nr,isPoints:!0,raycast:function(){var t=new mt,e=new Ri,i=new Dt;return function(n,r){function o(P,G){var N=e.distanceSqToPoint(P);N<c&&(e.closestPointToPoint(P,u),u.applyMatrix4(h),P=n.ray.origin.distanceTo(u),P<n.near||P>n.far||r.push({distance:P,distanceToRay:Math.sqrt(N),point:u.clone(),index:G,face:null,object:s}))}var s=this,a=this.geometry,h=this.matrixWorld,l=n.params.Points.threshold;if(a.boundingSphere===null&&a.computeBoundingSphere(),i.copy(a.boundingSphere),i.applyMatrix4(h),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3;var c=l*l;l=new M;var u=new M;if(a.isBufferGeometry){var d=a.index;if(a=a.attributes.position.array,d!==null){var g=d.array;d=0;for(var x=g.length;d<x;d++){var S=g[d];l.fromArray(a,3*S),o(l,S)}}else for(d=0,g=a.length/3;d<g;d++)l.fromArray(a,3*d),o(l,d)}else for(l=a.vertices,d=0,g=l.length;d<g;d++)o(l[d],d)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),os.prototype=Object.assign(Object.create(Ct.prototype),{constructor:os,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),rr.prototype=Object.create(Ct.prototype),rr.prototype.constructor=rr,rr.prototype.isCompressedTexture=!0,Ur.prototype=Object.create(Ct.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCanvasTexture=!0,Fr.prototype=Object.create(Ct.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isDepthTexture=!0,or.prototype=Object.create(Rt.prototype),or.prototype.constructor=or,Gr.prototype=Object.create(F.prototype),Gr.prototype.constructor=Gr,sr.prototype=Object.create(Rt.prototype),sr.prototype.constructor=sr,Hr.prototype=Object.create(F.prototype),Hr.prototype.constructor=Hr,Di.prototype=Object.create(Rt.prototype),Di.prototype.constructor=Di,kr.prototype=Object.create(F.prototype),kr.prototype.constructor=kr,ar.prototype=Object.create(Di.prototype),ar.prototype.constructor=ar,Vr.prototype=Object.create(F.prototype),Vr.prototype.constructor=Vr,Dn.prototype=Object.create(Di.prototype),Dn.prototype.constructor=Dn,jr.prototype=Object.create(F.prototype),jr.prototype.constructor=jr,hr.prototype=Object.create(Di.prototype),hr.prototype.constructor=hr,Wr.prototype=Object.create(F.prototype),Wr.prototype.constructor=Wr,lr.prototype=Object.create(Di.prototype),lr.prototype.constructor=lr,Xr.prototype=Object.create(F.prototype),Xr.prototype.constructor=Xr,cr.prototype=Object.create(Rt.prototype),cr.prototype.constructor=cr,qr.prototype=Object.create(F.prototype),qr.prototype.constructor=qr,ur.prototype=Object.create(Rt.prototype),ur.prototype.constructor=ur,Yr.prototype=Object.create(F.prototype),Yr.prototype.constructor=Yr,pr.prototype=Object.create(Rt.prototype),pr.prototype.constructor=pr;var ph={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,r=n?e[0]*i:t.length,o=Vs(t,0,r,i,!0),s=[];if(!o)return s;var a;if(n){var h=i;n=[];var l,c=0;for(l=e.length;c<l;c++){var u=e[c]*h,d=c<l-1?e[c+1]*h:t.length;u=Vs(t,u,d,h,!1),u===u.next&&(u.steiner=!0),n.push(th(u))}for(n.sort($a),c=0;c<n.length;c++)e=n[c],h=o,(h=Ka(e,h))&&(e=Ws(h,e),Zr(e,e.next)),o=Zr(o,o.next)}if(t.length>80*i){var g=a=t[0],x=n=t[1];for(h=i;h<r;h+=i)c=t[h],e=t[h+1],c<g&&(g=c),e<x&&(x=e),c>a&&(a=c),e>n&&(n=e);a=Math.max(a-g,n-x),a=a!==0?1/a:0}return Jr(o,s,i,g,x,a),s}},wn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return .5*i},isClockWise:function(t){return 0>wn.area(t)},triangulateShape:function(t,e){var i=[],n=[],r=[];qs(t),Ys(i,t);var o=t.length;for(e.forEach(qs),t=0;t<e.length;t++)n.push(o),o+=e[t].length,Ys(i,e[t]);for(e=ph.triangulate(i,n),t=0;t<e.length;t+=3)r.push(e.slice(t,t+3));return r}};Nn.prototype=Object.create(F.prototype),Nn.prototype.constructor=Nn,Nn.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)},hn.prototype=Object.create(Rt.prototype),hn.prototype.constructor=hn,hn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)};var dh={generateTopUV:function(t,e,i,n,r){t=e[3*n],n=e[3*n+1];var o=e[3*r];return r=e[3*r+1],[new $(e[3*i],e[3*i+1]),new $(t,n),new $(o,r)]},generateSideWallUV:function(t,e,i,n,r,o){t=e[3*i];var s=e[3*i+1];i=e[3*i+2];var a=e[3*n],h=e[3*n+1];n=e[3*n+2];var l=e[3*r],c=e[3*r+1];r=e[3*r+2];var u=e[3*o],d=e[3*o+1];return e=e[3*o+2],.01>Math.abs(s-h)?[new $(t,1-i),new $(a,1-n),new $(l,1-r),new $(u,1-e)]:[new $(s,1-i),new $(h,1-n),new $(c,1-r),new $(d,1-e)]}};Kr.prototype=Object.create(F.prototype),Kr.prototype.constructor=Kr,dr.prototype=Object.create(hn.prototype),dr.prototype.constructor=dr,to.prototype=Object.create(F.prototype),to.prototype.constructor=to,Bn.prototype=Object.create(Rt.prototype),Bn.prototype.constructor=Bn,eo.prototype=Object.create(F.prototype),eo.prototype.constructor=eo,fr.prototype=Object.create(Rt.prototype),fr.prototype.constructor=fr,io.prototype=Object.create(F.prototype),io.prototype.constructor=io,mr.prototype=Object.create(Rt.prototype),mr.prototype.constructor=mr,Un.prototype=Object.create(F.prototype),Un.prototype.constructor=Un,Un.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},Fn.prototype=Object.create(Rt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},gr.prototype=Object.create(Rt.prototype),gr.prototype.constructor=gr,Gn.prototype=Object.create(F.prototype),Gn.prototype.constructor=Gn,vn.prototype=Object.create(Rt.prototype),vn.prototype.constructor=vn,no.prototype=Object.create(Gn.prototype),no.prototype.constructor=no,ro.prototype=Object.create(vn.prototype),ro.prototype.constructor=ro,oo.prototype=Object.create(F.prototype),oo.prototype.constructor=oo,vr.prototype=Object.create(Rt.prototype),vr.prototype.constructor=vr;var Ni=Object.freeze({WireframeGeometry:or,ParametricGeometry:Gr,ParametricBufferGeometry:sr,TetrahedronGeometry:kr,TetrahedronBufferGeometry:ar,OctahedronGeometry:Vr,OctahedronBufferGeometry:Dn,IcosahedronGeometry:jr,IcosahedronBufferGeometry:hr,DodecahedronGeometry:Wr,DodecahedronBufferGeometry:lr,PolyhedronGeometry:Hr,PolyhedronBufferGeometry:Di,TubeGeometry:Xr,TubeBufferGeometry:cr,TorusKnotGeometry:qr,TorusKnotBufferGeometry:ur,TorusGeometry:Yr,TorusBufferGeometry:pr,TextGeometry:Kr,TextBufferGeometry:dr,SphereGeometry:to,SphereBufferGeometry:Bn,RingGeometry:eo,RingBufferGeometry:fr,PlaneGeometry:Ti,PlaneBufferGeometry:oi,LatheGeometry:io,LatheBufferGeometry:mr,ShapeGeometry:Un,ShapeBufferGeometry:Fn,ExtrudeGeometry:Nn,ExtrudeBufferGeometry:hn,EdgesGeometry:gr,ConeGeometry:no,ConeBufferGeometry:ro,CylinderGeometry:Gn,CylinderBufferGeometry:vn,CircleGeometry:oo,CircleBufferGeometry:vr,BoxGeometry:Fe,BoxBufferGeometry:vi});Hn.prototype=Object.create(fe.prototype),Hn.prototype.constructor=Hn,Hn.prototype.isShadowMaterial=!0,Hn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this},yr.prototype=Object.create(Je.prototype),yr.prototype.constructor=yr,yr.prototype.isRawShaderMaterial=!0,ln.prototype=Object.create(fe.prototype),ln.prototype.constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return fe.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},kn.prototype=Object.create(ln.prototype),kn.prototype.constructor=kn,kn.prototype.isMeshPhysicalMaterial=!0,kn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Yi.prototype=Object.create(fe.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isMeshPhongMaterial=!0,Yi.prototype.copy=function(t){return fe.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},Vn.prototype=Object.create(Yi.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isMeshToonMaterial=!0,Vn.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},jn.prototype=Object.create(fe.prototype),jn.prototype.constructor=jn,jn.prototype.isMeshNormalMaterial=!0,jn.prototype.copy=function(t){return fe.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},Wn.prototype=Object.create(fe.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isMeshLambertMaterial=!0,Wn.prototype.copy=function(t){return fe.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},Xn.prototype=Object.create(fe.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isMeshMatcapMaterial=!0,Xn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,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.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},qn.prototype=Object.create(Ne.prototype),qn.prototype.constructor=qn,qn.prototype.isLineDashedMaterial=!0,qn.prototype.copy=function(t){return Ne.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var fh=Object.freeze({ShadowMaterial:Hn,SpriteMaterial:We,RawShaderMaterial:yr,ShaderMaterial:Je,PointsMaterial:xi,MeshPhysicalMaterial:kn,MeshStandardMaterial:ln,MeshPhongMaterial:Yi,MeshToonMaterial:Vn,MeshNormalMaterial:jn,MeshLambertMaterial:Wn,MeshDepthMaterial:Tt,MeshDistanceMaterial:gt,MeshBasicMaterial:Ve,MeshMatcapMaterial:Xn,LineDashedMaterial:qn,LineBasicMaterial:Ne,Material:fe}),Ai={arraySlice:function(t,e,i){return Ai.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?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,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(r,o){return t[r]-t[o]}),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),o=0,s=0;s!==n;++o)for(var a=i[o]*e,h=0;h!==e;++h)r[s++]=t[a+h];return r},flattenJSON:function(t,e,i,n){for(var r=1,o=t[0];o!==void 0&&o[n]===void 0;)o=t[r++];if(o!==void 0){var s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),i.push.apply(i,s)),o=t[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(i,i.length)),o=t[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),i.push(s)),o=t[r++];while(o!==void 0)}}};Object.assign(Hi.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var o=i+2;;){if(n===void 0){if(t<r)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=r)break t;for(o=e[1],t<o&&(i=2,r=o),o=i-2;;){if(r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,r=e[--i-1],t>=r)break e}n=i,i=0}for(;i<n;)r=i+n>>>1,t<e[r]?n=r:i=r+1;if(n=e[i],r=e[i-1],r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var r=0;r!==n;++r)e[r]=i[t+r];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Hi.prototype,{beforeStart_:Hi.prototype.copySampleValue_,afterEnd_:Hi.prototype.copySampleValue_}),Ao.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Ao,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,o=t+1,s=n[r],a=n[o];if(s===void 0)switch(this.getSettings_().endingStart){case 2401:r=t,s=2*e-i;break;case 2402:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=i}if(a===void 0)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*i-e;break;case 2402:o=1,a=i+n[1]-n[0];break;default:o=t-1,a=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-s),this._weightNext=t/(a-i),this._offsetPrev=r*n,this._offsetNext=o*n},interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s,h=this._offsetPrev,l=this._offsetNext,c=this._weightPrev,u=this._weightNext,d=(i-e)/(n-e);for(i=d*d,n=i*d,e=-c*n+2*c*i-c*d,c=(1+c)*n+(-1.5-2*c)*i+(-.5+c)*d+1,d=(-1-u)*n+(1.5+u)*i+.5*d,u=u*n-u*i,i=0;i!==s;++i)r[i]=e*o[h+i]+c*o[a+i]+d*o[t+i]+u*o[l+i];return r}}),so.prototype=Object.assign(Object.create(Hi.prototype),{constructor:so,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s;for(e=(i-e)/(n-e),i=1-e,n=0;n!==s;++n)r[n]=o[a+n]*i+o[t+n]*e;return r}}),Lo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Lo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(wi,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Ai.convertArray(t.times,Array),values:Ai.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(wi.prototype,{constructor:wi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Lo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new so(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ao(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,o=n-1;r!==n&&i[r]<t;)++r;for(;o!==-1&&i[o]>e;)--o;return++o,(r!==0||o!==n)&&(r>=o&&(o=Math.max(o,1),r=o-1),t=this.getValueSize(),this.times=Ai.arraySlice(i,r,o),this.values=Ai.arraySlice(this.values,r*t,o*t)),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 i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var r=null,o=0;o!==n;o++){var s=i[o];if(typeof s=="number"&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(r!==null&&r>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,r),t=!1;break}r=s}if(e!==void 0&&Ai.isTypedArray(e)){for(o=0,i=e.length;o!==i;++o)if(n=e[o],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,r=1,o=t.length-1,s=1;s<o;++s){var a=!1,h=t[s];if(h!==t[s+1]&&(s!==1||h!==h[0]))if(n)a=!0;else{var l=s*i,c=l-i,u=l+i;for(h=0;h!==i;++h){var d=e[l+h];if(d!==e[c+h]||d!==e[u+h]){a=!0;break}}}if(a){if(s!==r)for(t[r]=t[s],a=s*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}}if(0<o){for(t[r]=t[o],a=o*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}return r!==t.length&&(this.times=Ai.arraySlice(t,0,r),this.values=Ai.arraySlice(e,0,r*i)),this}}),Ro.prototype=Object.assign(Object.create(wi.prototype),{constructor:Ro,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Co.prototype=Object.assign(Object.create(wi.prototype),{constructor:Co,ValueTypeName:"color"}),_r.prototype=Object.assign(Object.create(wi.prototype),{constructor:_r,ValueTypeName:"number"}),bo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:bo,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;for(t*=s,e=(i-e)/(n-e),i=t+s;t!==i;t+=4)ht.slerpFlat(r,0,o,t-s,o,t,e);return r}}),ao.prototype=Object.assign(Object.create(wi.prototype),{constructor:ao,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new bo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Oo.prototype=Object.assign(Object.create(wi.prototype),{constructor:Oo,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xr.prototype=Object.assign(Object.create(wi.prototype),{constructor:xr,ValueTypeName:"vector"}),Object.assign(ki,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,o=i.length;r!==o;++r)e.push(ih(i[r]).scale(n));return new ki(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,r=i.length;n!==r;++n)e.push(wi.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,o=[],s=0;s<r;s++){var a=[],h=[];a.push((s+r-1)%r,s,(s+1)%r),h.push(0,1,0);var l=Ai.getKeyframeOrder(a);a=Ai.sortedArray(a,1,l),h=Ai.sortedArray(h,1,l),n||a[0]!==0||(a.push(r),h.push(h[0])),o.push(new _r(".morphTargetInfluences["+e[s].name+"]",a,h).scale(1/i))}return new ki(t,-1,o)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,o=0,s=t.length;o<s;o++){var a=t[o],h=a.name.match(r);if(h&&1<h.length){var l=h[1];(h=n[l])||(n[l]=h=[]),h.push(a)}}t=[];for(l in n)t.push(ki.CreateFromMorphTargetSequence(l,n[l],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(S,P,G,N,q){if(G.length!==0){var V=[],ot=[];Ai.flattenJSON(G,V,ot,N),V.length!==0&&q.push(new S(P,V,ot))}},n=[],r=t.name||"default",o=t.length||-1,s=t.fps||30;t=t.hierarchy||[];for(var a=0;a<t.length;a++){var h=t[a].keys;if(h&&h.length!==0)if(h[0].morphTargets){o={};for(var l=0;l<h.length;l++)if(h[l].morphTargets)for(var c=0;c<h[l].morphTargets.length;c++)o[h[l].morphTargets[c]]=-1;for(var u in o){var d=[],g=[];for(c=0;c!==h[l].morphTargets.length;++c){var x=h[l];d.push(x.time),g.push(x.morphTarget===u?1:0)}n.push(new _r(".morphTargetInfluence["+u+"]",d,g))}o=o.length*(s||1)}else l=".bones["+e[a].name+"]",i(xr,l+".position",h,"pos",n),i(ao,l+".quaternion",h,"rot",n),i(xr,l+".scale",h,"scl",n)}return n.length===0?null:new ki(r,o,n)}}),Object.assign(ki.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.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}});var Zn={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Oi=new hs,tn={};Object.assign(Xi.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;if(tn[t]!==void 0)tn[t].push({onLoad:e,onProgress:i,onError:n});else{var s=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){i=s[1];var a=!!s[2];s=s[3],s=decodeURIComponent(s),a&&(s=atob(s));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":var l=new Uint8Array(s.length);for(a=0;a<s.length;a++)l[a]=s.charCodeAt(a);var c=h==="blob"?new Blob([l.buffer],{type:i}):l.buffer;break;case"document":c=new DOMParser().parseFromString(s,i);break;case"json":c=JSON.parse(s);break;default:c=s}setTimeout(function(){e&&e(c),r.manager.itemEnd(t)},0)}catch(d){setTimeout(function(){n&&n(d),r.manager.itemError(t),r.manager.itemEnd(t)},0)}}else{tn[t]=[],tn[t].push({onLoad:e,onProgress:i,onError:n});var u=new XMLHttpRequest;u.open("GET",t,!0),u.addEventListener("load",function(d){var g=this.response;Zn.add(t,g);var x=tn[t];if(delete tn[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var S=0,P=x.length;S<P;S++){var G=x[S];G.onLoad&&G.onLoad(g)}}else{for(S=0,P=x.length;S<P;S++)G=x[S],G.onError&&G.onError(d);r.manager.itemError(t)}r.manager.itemEnd(t)},!1),u.addEventListener("progress",function(d){for(var g=tn[t],x=0,S=g.length;x<S;x++){var P=g[x];P.onProgress&&P.onProgress(d)}},!1),u.addEventListener("error",function(d){var g=tn[t];delete tn[t];for(var x=0,S=g.length;x<S;x++){var P=g[x];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),u.addEventListener("abort",function(d){var g=tn[t];delete tn[t];for(var x=0,S=g.length;x<S;x++){var P=g[x];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),this.responseType!==void 0&&(u.responseType=this.responseType),this.withCredentials!==void 0&&(u.withCredentials=this.withCredentials),u.overrideMimeType&&u.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(a in this.requestHeader)u.setRequestHeader(a,this.requestHeader[a]);u.send(null)}return r.manager.itemStart(t),u}},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(Qs.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=ki.parse(t[n]);i.push(r)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign($s.prototype,{load:function(t,e,i,n){function r(d){h.load(t[d],function(g){g=o._parser(g,!0),s[d]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},l+=1,l===6&&(g.mipmapCount===1&&(a.minFilter=1006),a.format=g.format,a.needsUpdate=!0,e&&e(a))},i,n)}var o=this,s=[],a=new rr;a.image=s;var h=new Xi(this.manager);if(h.setPath(this.path),h.setResponseType("arraybuffer"),Array.isArray(t))for(var l=0,c=0,u=t.length;c<u;++c)r(c);else h.load(t,function(d){if(d=o._parser(d,!0),d.isCubemap)for(var g=d.mipmaps.length/d.mipmapCount,x=0;x<g;x++){s[x]={mipmaps:[]};for(var S=0;S<d.mipmapCount;S++)s[x].mipmaps.push(d.mipmaps[x*d.mipmapCount+S]),s[x].format=d.format,s[x].width=d.width,s[x].height=d.height}else a.image.width=d.width,a.image.height=d.height,a.mipmaps=d.mipmaps;d.mipmapCount===1&&(a.minFilter=1006),a.format=d.format,a.needsUpdate=!0,e&&e(a)},i,n);return a},setPath:function(t){return this.path=t,this}}),Object.assign(ls.prototype,{load:function(t,e,i,n){var r=this,o=new ut,s=new Xi(this.manager);return s.setResponseType("arraybuffer"),s.setPath(this.path),s.load(t,function(a){(a=r._parser(a))&&(a.image!==void 0?o.image=a.image:a.data!==void 0&&(o.image.width=a.width,o.image.height=a.height,o.image.data=a.data),o.wrapS=a.wrapS!==void 0?a.wrapS:1001,o.wrapT=a.wrapT!==void 0?a.wrapT:1001,o.magFilter=a.magFilter!==void 0?a.magFilter:1006,o.minFilter=a.minFilter!==void 0?a.minFilter:1008,o.anisotropy=a.anisotropy!==void 0?a.anisotropy:1,a.format!==void 0&&(o.format=a.format),a.type!==void 0&&(o.type=a.type),a.mipmaps!==void 0&&(o.mipmaps=a.mipmaps),a.mipmapCount===1&&(o.minFilter=1006),o.needsUpdate=!0,e&&e(o,a))},i,n),o},setPath:function(t){return this.path=t,this}}),Object.assign(ho.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),Zn.add(t,this),e&&e(this),s.manager.itemEnd(t)}function o(l){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),n&&n(l),s.manager.itemError(t),s.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,a=Zn.get(t);if(a!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(a),s.manager.itemEnd(t)},0),a;var h=document.createElementNS("http://www.w3.org/1999/xhtml","img");return h.addEventListener("load",r,!1),h.addEventListener("error",o,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),s.manager.itemStart(t),h.src=t,h},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(cs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(h){s.load(t[h],function(l){o.images[h]=l,a++,a===6&&(o.needsUpdate=!0,e&&e(o))},void 0,n)}var o=new _,s=new ho(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);var a=0;for(i=0;i<t.length;++i)r(i);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Io.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=new Ct,o=new ho(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(s){r.image=s,s=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,r.format=s?1022:1023,r.needsUpdate=!0,e!==void 0&&e(r)},i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(pe.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,r=0;for(e.push(0),n=1;n<=t;n++){var o=this.getPoint(n/t);r+=o.distanceTo(i),e.push(r),i=o}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var r=0,o=n-1,s;r<=o;)if(t=Math.floor(r+(o-r)/2),s=i[t]-e,0>s)r=t+1;else if(0<s)o=t-1;else{o=t;break}return t=o,i[t]===e?t/(n-1):(r=i[t],(t+(e-r)/(i[t+1]-r))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new M,n=[],r=[],o=[],s=new M,a=new mt,h;for(h=0;h<=t;h++){var l=h/t;n[h]=this.getTangentAt(l),n[h].normalize()}r[0]=new M,o[0]=new M,h=Number.MAX_VALUE,l=Math.abs(n[0].x);var c=Math.abs(n[0].y),u=Math.abs(n[0].z);for(l<=h&&(h=l,i.set(1,0,0)),c<=h&&(h=c,i.set(0,1,0)),u<=h&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],s),o[0].crossVectors(n[0],r[0]),h=1;h<=t;h++)r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),s.crossVectors(n[h-1],n[h]),s.length()>Number.EPSILON&&(s.normalize(),i=Math.acos(Ee.clamp(n[h-1].dot(n[h]),-1,1)),r[h].applyMatrix4(a.makeRotationAxis(s,i))),o[h].crossVectors(n[h],r[h]);if(e===!0)for(i=Math.acos(Ee.clamp(r[0].dot(r[t]),-1,1)),i/=t,0<n[0].dot(s.crossVectors(r[0],r[t]))&&(i=-i),h=1;h<=t;h++)r[h].applyMatrix4(a.makeRotationAxis(n[h],i*h)),o[h].crossVectors(n[h],r[h]);return{tangents:n,normals:r,binormals:o}},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}}),Vi.prototype=Object.create(pe.prototype),Vi.prototype.constructor=Vi,Vi.prototype.isEllipseCurve=!0,Vi.prototype.getPoint=function(t,e){e=e||new $;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this.aClockwise!==!0||r||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),r=t-this.aX,o-=this.aY,t=r*i-o*n+this.aX,o=r*n+o*i+this.aY),e.set(t,o)},Vi.prototype.copy=function(t){return pe.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},Vi.prototype.toJSON=function(){var t=pe.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},Vi.prototype.fromJSON=function(t){return pe.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},wr.prototype=Object.create(Vi.prototype),wr.prototype.constructor=wr,wr.prototype.isArcCurve=!0;var Xo=new M,Os=new us,Is=new us,Ds=new us;Ei.prototype=Object.create(pe.prototype),Ei.prototype.constructor=Ei,Ei.prototype.isCatmullRomCurve3=!0,Ei.prototype.getPoint=function(t,e){e=e||new M;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var r=Math.floor(t);if(t-=r,this.closed?r+=0<r?0:(Math.floor(Math.abs(r)/n)+1)*n:t===0&&r===n-1&&(r=n-2,t=1),this.closed||0<r)var o=i[(r-1)%n];else Xo.subVectors(i[0],i[1]).add(i[0]),o=Xo;var s=i[r%n],a=i[(r+1)%n];if(this.closed||r+2<n?i=i[(r+2)%n]:(Xo.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=Xo),this.curveType==="centripetal"||this.curveType==="chordal"){var h=this.curveType==="chordal"?.5:.25;n=Math.pow(o.distanceToSquared(s),h),r=Math.pow(s.distanceToSquared(a),h),h=Math.pow(a.distanceToSquared(i),h),1e-4>r&&(r=1),1e-4>n&&(n=r),1e-4>h&&(h=r),Os.initNonuniformCatmullRom(o.x,s.x,a.x,i.x,n,r,h),Is.initNonuniformCatmullRom(o.y,s.y,a.y,i.y,n,r,h),Ds.initNonuniformCatmullRom(o.z,s.z,a.z,i.z,n,r,h)}else this.curveType==="catmullrom"&&(Os.initCatmullRom(o.x,s.x,a.x,i.x,this.tension),Is.initCatmullRom(o.y,s.y,a.y,i.y,this.tension),Ds.initCatmullRom(o.z,s.z,a.z,i.z,this.tension));return e.set(Os.calc(t),Is.calc(t),Ds.calc(t)),e},Ei.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ei.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ei.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new M().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zi.prototype=Object.create(pe.prototype),Zi.prototype.constructor=Zi,Zi.prototype.isCubicBezierCurve=!0,Zi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y)),e},Zi.prototype.copy=function(t){return pe.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},Zi.prototype.toJSON=function(){var t=pe.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},Zi.prototype.fromJSON=function(t){return pe.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},cn.prototype=Object.create(pe.prototype),cn.prototype.constructor=cn,cn.prototype.isCubicBezierCurve3=!0,cn.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y),co(t,i.z,n.z,r.z,o.z)),e},cn.prototype.copy=function(t){return pe.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},cn.prototype.toJSON=function(){var t=pe.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},cn.prototype.fromJSON=function(t){return pe.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},zi.prototype=Object.create(pe.prototype),zi.prototype.constructor=zi,zi.prototype.isLineCurve=!0,zi.prototype.getPoint=function(t,e){return e=e||new $,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zi.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},zi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ji.prototype=Object.create(pe.prototype),Ji.prototype.constructor=Ji,Ji.prototype.isLineCurve3=!0,Ji.prototype.getPoint=function(t,e){return e=e||new M,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ji.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ji.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ji.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ji.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qi.prototype=Object.create(pe.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isQuadraticBezierCurve=!0,Qi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y)),e},Qi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},un.prototype=Object.create(pe.prototype),un.prototype.constructor=un,un.prototype.isQuadraticBezierCurve3=!0,un.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y),lo(t,i.z,n.z,r.z)),e},un.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},un.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},un.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$i.prototype=Object.create(pe.prototype),$i.prototype.constructor=$i,$i.prototype.isSplineCurve=!0,$i.prototype.getPoint=function(t,e){e=e||new $;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var r=i[t===0?t:t-1],o=i[t],s=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Ks(n,r.x,o.x,s.x,i.x),Ks(n,r.y,o.y,s.y,i.y)),e},$i.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},$i.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},$i.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new $().fromArray(n))}return this};var wa=Object.freeze({ArcCurve:wr,CatmullRomCurve3:Ei,CubicBezierCurve:Zi,CubicBezierCurve3:cn,EllipseCurve:Vi,LineCurve:zi,LineCurve3:Ji,QuadraticBezierCurve:Qi,QuadraticBezierCurve3:un,SplineCurve:$i});yn.prototype=Object.assign(Object.create(pe.prototype),{constructor:yn,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 zi(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}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,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,r=this.curves;n<r.length;n++){var o=r[n];o=o.getPoints(o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t);for(var s=0;s<o.length;s++){var a=o[s];i&&i.equals(a)||(e.push(a),i=a)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){pe.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=pe.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){pe.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new wa[n.type]().fromJSON(n))}return this}}),Ki.prototype=Object.assign(Object.create(yn.prototype),{constructor:Ki,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new zi(this.currentPoint.clone(),new $(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Qi(this.currentPoint.clone(),new $(t,e),new $(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,o){t=new Zi(this.currentPoint.clone(),new $(t,e),new $(i,n),new $(r,o)),this.curves.push(t),this.currentPoint.set(r,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new $i(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,o){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o)},absarc:function(t,e,i,n,r,o){this.absellipse(t,e,i,i,n,r,o)},ellipse:function(t,e,i,n,r,o,s,a){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o,s,a)},absellipse:function(t,e,i,n,r,o,s,a){t=new Vi(t,e,i,n,r,o,s,a),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return yn.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=yn.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return yn.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Pn.prototype=Object.assign(Object.create(Ki.prototype),{constructor:Pn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Ki.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Ki.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Ki.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new Ki().fromJSON(n))}return this}}),ri.prototype=Object.assign(Object.create(b.prototype),{constructor:ri,isLight:!0,copy:function(t){return b.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),Do.prototype=Object.assign(Object.create(ri.prototype),{constructor:Do,isHemisphereLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Yn.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 this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),zo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:zo,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*Ee.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),No.prototype=Object.assign(Object.create(ri.prototype),{constructor:No,isSpotLight:!0,copy:function(t){return ri.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}}),Bo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Bo,isPointLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),uo.prototype=Object.assign(Object.create(Kt.prototype),{constructor:uo,isOrthographicCamera:!0,copy:function(t,e){return Kt.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=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,o){this.view===null&&(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=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(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),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var o=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,r+=this.view.offsetX/i*o,i=r+this.view.width/i*o,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(r,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),Uo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Uo}),Fo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Fo,isDirectionalLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Go.prototype=Object.assign(Object.create(ri.prototype),{constructor:Go,isAmbientLight:!0}),Ho.prototype=Object.assign(Object.create(ri.prototype),{constructor:Ho,isRectAreaLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=ri.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ko.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){function e(s){return i[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),i[s]}var i=this.textures,n=new fh[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var r in t.uniforms){var o=t.uniforms[r];switch(n.uniforms[r]={},o.type){case"t":n.uniforms[r].value=e(o.value);break;case"c":n.uniforms[r].value=new H().setHex(o.value);break;case"v2":n.uniforms[r].value=new $().fromArray(o.value);break;case"v3":n.uniforms[r].value=new M().fromArray(o.value);break;case"v4":n.uniforms[r].value=new Y().fromArray(o.value);break;case"m4":n.uniforms[r].value=new mt().fromArray(o.value);break;default:n.uniforms[r].value=o.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(r=t.normalScale,Array.isArray(r)===!1&&(r=[r,r]),n.normalScale=new $().fromArray(r)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ps.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){var e=new Rt,i=t.data.index;i!==void 0&&(i=new Ma[i.type](i.array),e.setIndex(new Z(i,1)));var n=t.data.attributes;for(o in n){var r=n[o];i=new Ma[r.type](r.array),e.addAttribute(o,new Z(i,r.itemSize,r.normalized))}var o=t.data.groups||t.data.drawcalls||t.data.offsets;if(o!==void 0)for(i=0,n=o.length;i!==n;++i)r=o[i],e.addGroup(r.start,r.count,r.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(o=new M,t.center!==void 0&&o.fromArray(t.center),e.boundingSphere=new Dt(o,t.radius)),e},setPath:function(t){return this.path=t,this}});var Ma={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Mr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i+1];if(e[i].test(t))return r}return null}},Object.assign(Mr.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new H,i=new Io,n=new ko;return function(r,o,s){function a(d,g,x,S,P){d=o+d;var G=Mr.Handlers.get(d);return G!==null?d=G.load(d):(i.setCrossOrigin(s),d=i.load(d)),g!==void 0&&(d.repeat.fromArray(g),g[0]!==1&&(d.wrapS=1e3),g[1]!==1&&(d.wrapT=1e3)),x!==void 0&&d.offset.fromArray(x),S!==void 0&&(S[0]==="repeat"&&(d.wrapS=1e3),S[0]==="mirror"&&(d.wrapS=1002),S[1]==="repeat"&&(d.wrapT=1e3),S[1]==="mirror"&&(d.wrapT=1002)),P!==void 0&&(d.anisotropy=P),g=Ee.generateUUID(),h[g]=d,g}var h={},l={uuid:Ee.generateUUID(),type:"MeshLambertMaterial"},c;for(c in r){var u=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":l.name=u;break;case"blending":l.blending=t[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":l.color=e.fromArray(u).getHex();break;case"colorSpecular":l.specular=e.fromArray(u).getHex();break;case"colorEmissive":l.emissive=e.fromArray(u).getHex();break;case"specularCoef":l.shininess=u;break;case"shading":u.toLowerCase()==="basic"&&(l.type="MeshBasicMaterial"),u.toLowerCase()==="phong"&&(l.type="MeshPhongMaterial"),u.toLowerCase()==="standard"&&(l.type="MeshStandardMaterial");break;case"mapDiffuse":l.map=a(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":l.emissiveMap=a(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":l.lightMap=a(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":l.aoMap=a(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":l.bumpMap=a(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":l.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":l.normalMap=a(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":l.normalScale=u;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":l.specularMap=a(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":l.metalnessMap=a(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":l.roughnessMap=a(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":l.alphaMap=a(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":l.side=1;break;case"doubleSided":l.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),l.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":l[c]=u;break;case"vertexColors":u===!0&&(l.vertexColors=2),u==="face"&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,u)}}return l.type==="MeshBasicMaterial"&&delete l.emissive,l.type!=="MeshPhongMaterial"&&delete l.specular,1>l.opacity&&(l.transparent=!0),n.setTextures(h),n.parse(l)}}()}),Object.assign(Vo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path,s=new Xi(this.manager);s.setPath(this.path),s.setWithCredentials(this.withCredentials),s.load(t,function(a){a=JSON.parse(a);var h=a.metadata;if(h!==void 0&&(h=h.type,h!==void 0&&h.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}a=r.parse(a,o),e(a.geometry,a.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new F,n=t,r,o,s,a=n.faces,h=n.vertices,l=n.normals,c=n.colors,u=n.scale,d=0;if(n.uvs!==void 0){for(r=0;r<n.uvs.length;r++)n.uvs[r].length&&d++;for(r=0;r<d;r++)i.faceVertexUvs[r]=[]}var g=0;for(s=h.length;g<s;)r=new M,r.x=h[g++]*u,r.y=h[g++]*u,r.z=h[g++]*u,i.vertices.push(r);for(g=0,s=a.length;g<s;){h=a[g++];var x=h&1,S=h&2;r=h&8;var P=h&16,G=h&32;if(u=h&64,h&=128,x){x=new O,x.a=a[g],x.b=a[g+1],x.c=a[g+3];var N=new O;if(N.a=a[g+1],N.b=a[g+2],N.c=a[g+3],g+=4,S&&(S=a[g++],x.materialIndex=S,N.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++){var q=n.uvs[r];for(i.faceVertexUvs[r][S]=[],i.faceVertexUvs[r][S+1]=[],o=0;4>o;o++){var V=a[g++],ot=q[2*V];V=q[2*V+1],ot=new $(ot,V),o!==2&&i.faceVertexUvs[r][S].push(ot),o!==0&&i.faceVertexUvs[r][S+1].push(ot)}}if(P&&(P=3*a[g++],x.normal.set(l[P++],l[P++],l[P]),N.normal.copy(x.normal)),G)for(r=0;4>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),r!==2&&x.vertexNormals.push(G),r!==0&&N.vertexNormals.push(G);if(u&&(u=a[g++],u=c[u],x.color.setHex(u),N.color.setHex(u)),h)for(r=0;4>r;r++)u=a[g++],u=c[u],r!==2&&x.vertexColors.push(new H(u)),r!==0&&N.vertexColors.push(new H(u));i.faces.push(x),i.faces.push(N)}else{if(x=new O,x.a=a[g++],x.b=a[g++],x.c=a[g++],S&&(S=a[g++],x.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++)for(q=n.uvs[r],i.faceVertexUvs[r][S]=[],o=0;3>o;o++)V=a[g++],ot=q[2*V],V=q[2*V+1],ot=new $(ot,V),i.faceVertexUvs[r][S].push(ot);if(P&&(P=3*a[g++],x.normal.set(l[P++],l[P++],l[P])),G)for(r=0;3>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),x.vertexNormals.push(G);if(u&&(u=a[g++],x.color.setHex(c[u])),h)for(r=0;3>r;r++)u=a[g++],x.vertexColors.push(new H(c[u]));i.faces.push(x)}}if(n=t,g=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(s=0,a=n.skinWeights.length;s<a;s+=g)i.skinWeights.push(new Y(n.skinWeights[s],1<g?n.skinWeights[s+1]:0,2<g?n.skinWeights[s+2]:0,3<g?n.skinWeights[s+3]:0));if(n.skinIndices)for(s=0,a=n.skinIndices.length;s<a;s+=g)i.skinIndices.push(new Y(n.skinIndices[s],1<g?n.skinIndices[s+1]:0,2<g?n.skinIndices[s+2]:0,3<g?n.skinIndices[s+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),s=t,a=s.scale,s.morphTargets!==void 0)for(n=0,g=s.morphTargets.length;n<g;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=s.morphTargets[n].name,i.morphTargets[n].vertices=[],l=i.morphTargets[n].vertices,c=s.morphTargets[n].vertices,d=0,h=c.length;d<h;d+=3)u=new M,u.x=c[d]*a,u.y=c[d+1]*a,u.z=c[d+2]*a,l.push(u);if(s.morphColors!==void 0&&0<s.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),a=i.faces,s=s.morphColors[0].colors,n=0,g=a.length;n<g;n++)a[n].color.fromArray(s,3*n);for(s=t,n=[],g=[],s.animation!==void 0&&g.push(s.animation),s.animations!==void 0&&(s.animations.length?g=g.concat(s.animations):g.push(s.animations)),s=0;s<g.length;s++)(a=ki.parseAnimation(g[s],i.bones))&&n.push(a);return i.morphTargets&&(g=ki.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(g)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Mr.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ds.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||o,o=new Xi(r.manager),o.setPath(this.path),o.load(t,function(s){var a=null;try{a=JSON.parse(s)}catch(h){n!==void 0&&n(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}s=a.metadata,s===void 0||s.type===void 0||s.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):r.parse(a,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(r)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var r=this.parseObject(t.object,i,n);return t.animations&&(r.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(r),r},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var r=new Pn().fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Vo,r=new ps,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.type){case"PlaneGeometry":case"PlaneBufferGeometry":var h=new Ni[a.type](a.width,a.height,a.widthSegments,a.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":h=new Ni[a.type](a.width,a.height,a.depth,a.widthSegments,a.heightSegments,a.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":h=new Ni[a.type](a.radius,a.segments,a.thetaStart,a.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":h=new Ni[a.type](a.radiusTop,a.radiusBottom,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":h=new Ni[a.type](a.radius,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":h=new Ni[a.type](a.radius,a.widthSegments,a.heightSegments,a.phiStart,a.phiLength,a.thetaStart,a.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":h=new Ni[a.type](a.radius,a.detail);break;case"RingGeometry":case"RingBufferGeometry":h=new Ni[a.type](a.innerRadius,a.outerRadius,a.thetaSegments,a.phiSegments,a.thetaStart,a.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.radialSegments,a.tubularSegments,a.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.tubularSegments,a.radialSegments,a.p,a.q);break;case"LatheGeometry":case"LatheBufferGeometry":h=new Ni[a.type](a.points,a.segments,a.phiStart,a.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":h=new Ni[a.type](a.vertices,a.indices,a.radius,a.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":h=[];for(var l=0,c=a.shapes.length;l<c;l++){var u=e[a.shapes[l]];h.push(u)}h=new Ni[a.type](h,a.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,c=a.shapes.length;l<c;l++)u=e[a.shapes[l]],h.push(u);l=a.options.extrudePath,l!==void 0&&(a.options.extrudePath=new wa[l.type]().fromJSON(l)),h=new Ni[a.type](h,a.options);break;case"BufferGeometry":h=r.parse(a);break;case"Geometry":h=n.parse(a,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+a.type+'"');continue}h.uuid=a.uuid,a.name!==void 0&&(h.name=a.name),h.isBufferGeometry===!0&&a.userData!==void 0&&(h.userData=a.userData),i[a.uuid]=h}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var r=new ko;r.setTextures(e),e=0;for(var o=t.length;e<o;e++){var s=t[e];if(s.type==="MultiMaterial"){for(var a=[],h=0;h<s.materials.length;h++){var l=s.materials[h];i[l.uuid]===void 0&&(i[l.uuid]=r.parse(l)),a.push(i[l.uuid])}n[s.uuid]=a}else n[s.uuid]=r.parse(s),i[s.uuid]=n[s.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=ki.parse(n);n.uuid!==void 0&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){function i(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}var n=this,r={};if(t!==void 0&&0<t.length){e=new hs(e);var o=new ho(e);o.setCrossOrigin(this.crossOrigin),e=0;for(var s=t.length;e<s;e++){var a=t[e],h=a.url;if(Array.isArray(h)){r[a.uuid]=[];for(var l=0,c=h.length;l<c;l++){var u=h[l];u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:n.resourcePath+u,r[a.uuid].push(i(u))}}else u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a.url)?a.url:n.resourcePath+a.url,r[a.uuid]=i(u)}}return r},parseTextures:function(t,e){function i(h,l){return typeof h=="number"?h:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",h),l[h])}var n={};if(t!==void 0)for(var r=0,o=t.length;r<o;r++){var s=t[r];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),e[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var a=Array.isArray(e[s.image])?new _(e[s.image]):new Ct(e[s.image]);a.needsUpdate=!0,a.uuid=s.uuid,s.name!==void 0&&(a.name=s.name),s.mapping!==void 0&&(a.mapping=i(s.mapping,mh)),s.offset!==void 0&&a.offset.fromArray(s.offset),s.repeat!==void 0&&a.repeat.fromArray(s.repeat),s.center!==void 0&&a.center.fromArray(s.center),s.rotation!==void 0&&(a.rotation=s.rotation),s.wrap!==void 0&&(a.wrapS=i(s.wrap[0],Ta),a.wrapT=i(s.wrap[1],Ta)),s.format!==void 0&&(a.format=s.format),s.minFilter!==void 0&&(a.minFilter=i(s.minFilter,Sa)),s.magFilter!==void 0&&(a.magFilter=i(s.magFilter,Sa)),s.anisotropy!==void 0&&(a.anisotropy=s.anisotropy),s.flipY!==void 0&&(a.flipY=s.flipY),n[s.uuid]=a}return n},parseObject:function(t,e,i){function n(l){return e[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",l),e[l]}function r(l){if(l!==void 0){if(Array.isArray(l)){for(var c=[],u=0,d=l.length;u<d;u++){var g=l[u];i[g]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",g),c.push(i[g])}return c}return i[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",l),i[l]}}switch(t.type){case"Scene":var o=new qi;t.background!==void 0&&Number.isInteger(t.background)&&(o.background=new H(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?o.fog=new yi(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(o.fog=new Jt(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":o=new Bt(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(o.focus=t.focus),t.zoom!==void 0&&(o.zoom=t.zoom),t.filmGauge!==void 0&&(o.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(o.filmOffset=t.filmOffset),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"OrthographicCamera":o=new uo(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(o.zoom=t.zoom),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"AmbientLight":o=new Go(t.color,t.intensity);break;case"DirectionalLight":o=new Fo(t.color,t.intensity);break;case"PointLight":o=new Bo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":o=new Ho(t.color,t.intensity,t.width,t.height);break;case"SpotLight":o=new No(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":o=new Do(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":o=n(t.geometry);var s=r(t.material);o=o.bones&&0<o.bones.length?new ke(o,s):new Ke(o,s);break;case"LOD":o=new ii;break;case"Line":o=new qe(n(t.geometry),r(t.material),t.mode);break;case"LineLoop":o=new an(n(t.geometry),r(t.material));break;case"LineSegments":o=new Re(n(t.geometry),r(t.material));break;case"PointCloud":case"Points":o=new nr(n(t.geometry),r(t.material));break;case"Sprite":o=new ei(r(t.material));break;case"Group":o=new Pe;break;default:o=new b}if(o.uuid=t.uuid,t.name!==void 0&&(o.name=t.name),t.matrix!==void 0?(o.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=t.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(t.position!==void 0&&o.position.fromArray(t.position),t.rotation!==void 0&&o.rotation.fromArray(t.rotation),t.quaternion!==void 0&&o.quaternion.fromArray(t.quaternion),t.scale!==void 0&&o.scale.fromArray(t.scale)),t.castShadow!==void 0&&(o.castShadow=t.castShadow),t.receiveShadow!==void 0&&(o.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(o.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(o.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(o.visible=t.visible),t.frustumCulled!==void 0&&(o.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(o.renderOrder=t.renderOrder),t.userData!==void 0&&(o.userData=t.userData),t.layers!==void 0&&(o.layers.mask=t.layers),t.children!==void 0){s=t.children;for(var a=0;a<s.length;a++)o.add(this.parseObject(s[a],e,i))}if(t.type==="LOD")for(t=t.levels,s=0;s<t.length;s++){a=t[s];var h=o.getObjectByProperty("uuid",a.object);h!==void 0&&o.addLevel(h,a.distance)}return o}});var mh={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ta={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Sa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};fs.prototype={constructor:fs,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;fetch(t).then(function(s){return s.blob()}).then(function(s){return createImageBitmap(s,r.options)}).then(function(s){Zn.add(t,s),e&&e(s),r.manager.itemEnd(t)}).catch(function(s){n&&n(s),r.manager.itemError(t),r.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(ms.prototype,{moveTo:function(t,e){this.currentPath=new Ki,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,o){this.currentPath.bezierCurveTo(t,e,i,n,r,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(P){for(var G=[],N=0,q=P.length;N<q;N++){var V=P[N],ot=new Pn;ot.curves=V.curves,G.push(ot)}return G}function n(P,G){for(var N=G.length,q=!1,V=N-1,ot=0;ot<N;V=ot++){var T=G[V],A=G[ot],tt=A.x-T.x,vt=A.y-T.y;if(Math.abs(vt)>Number.EPSILON){if(0>vt&&(T=G[ot],tt=-tt,A=G[V],vt=-vt),!(P.y<T.y||P.y>A.y))if(P.y===T.y){if(P.x===T.x)return!0}else{if(V=vt*(P.x-T.x)-tt*(P.y-T.y),V===0)return!0;0>V||(q=!q)}}else if(P.y===T.y&&(A.x<=P.x&&P.x<=T.x||T.x<=P.x&&P.x<=A.x))return!0}return q}var r=wn.isClockWise,o=this.subPaths;if(o.length===0)return[];if(e===!0)return i(o);if(e=[],o.length===1){var s=o[0],a=new Pn;return a.curves=s.curves,e.push(a),e}var h=!r(o[0].getPoints());h=t?!h:h,a=[];var l=[],c=[],u=0;l[u]=void 0,c[u]=[];for(var d=0,g=o.length;d<g;d++){s=o[d];var x=s.getPoints(),S=r(x);(S=t?!S:S)?(!h&&l[u]&&u++,l[u]={s:new Pn,p:x},l[u].s.curves=s.curves,h&&u++,c[u]=[]):c[u].push({h:s,p:x[0]})}if(!l[0])return i(o);if(1<l.length){for(d=!1,t=[],r=0,o=l.length;r<o;r++)a[r]=[];for(r=0,o=l.length;r<o;r++)for(s=c[r],S=0;S<s.length;S++){for(h=s[S],u=!0,x=0;x<l.length;x++)n(h.p,l[x].p)&&(r!==x&&t.push({froms:r,tos:x,hole:S}),u?(u=!1,a[x].push(h)):d=!0);u&&a[r].push(h)}0<t.length&&(d||(c=a))}for(d=0,r=l.length;d<r;d++)for(a=l[d].s,e.push(a),t=c[d],o=0,s=t.length;o<s;o++)a.holes.push(t[o].h);return e}}),Object.assign(gs.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var r=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var o=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var s=0,a=0,h=0;h<r.length;h++){var l=r[h];if(l===`
|
|
2571
|
-
`)s=0,a-=o;else{var c=n,u=s,d=a;if(l=e.glyphs[l]||e.glyphs["?"]){var g=new ms;if(l.o)for(var x=l._cachedOutline||(l._cachedOutline=l.o.split(" ")),S=0,P=x.length;S<P;)switch(x[S++]){case"m":var G=x[S++]*c+u,N=x[S++]*c+d;g.moveTo(G,N);break;case"l":G=x[S++]*c+u,N=x[S++]*c+d,g.lineTo(G,N);break;case"q":var q=x[S++]*c+u,V=x[S++]*c+d,ot=x[S++]*c+u,T=x[S++]*c+d;g.quadraticCurveTo(ot,T,q,V);break;case"b":q=x[S++]*c+u,V=x[S++]*c+d,ot=x[S++]*c+u,T=x[S++]*c+d,G=x[S++]*c+u,N=x[S++]*c+d,g.bezierCurveTo(ot,T,G,N,q,V)}c={offsetX:l.ha*c,path:g}}else c=void 0;s+=c.offsetX,t.push(c.path)}}for(e=0,r=t.length;e<r;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(ta.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(this.manager);o.setPath(this.path),o.load(t,function(s){try{var a=JSON.parse(s)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),a=JSON.parse(s.substring(65,s.length-2))}s=r.parse(a),e&&e(s)},i,n)},parse:function(t){return new gs(t)},setPath:function(t){return this.path=t,this}});var Yo,zs={getContext:function(){return Yo===void 0&&(Yo=new(window.AudioContext||window.webkitAudioContext)),Yo},setContext:function(t){Yo=t}};Object.assign(vs.prototype,{load:function(t,e,i,n){var r=new Xi(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(t,function(o){o=o.slice(0),zs.getContext().decodeAudioData(o,function(s){e(s)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(ea.prototype,{update:function(){var t,e,i,n,r,o,s,a,h=new mt,l=new mt;return function(c){if(t!==this||e!==c.focus||i!==c.fov||n!==c.aspect*this.aspect||r!==c.near||o!==c.far||s!==c.zoom||a!==this.eyeSep){t=this,e=c.focus,i=c.fov,n=c.aspect*this.aspect,r=c.near,o=c.far,s=c.zoom;var u=c.projectionMatrix.clone();a=this.eyeSep/2;var d=a*r/e,g=r*Math.tan(Ee.DEG2RAD*i*.5)/s;l.elements[12]=-a,h.elements[12]=a;var x=-g*n+d,S=g*n+d;u.elements[0]=2*r/(S-x),u.elements[8]=(S+x)/(S-x),this.cameraL.projectionMatrix.copy(u),x=-g*n-d,S=g*n-d,u.elements[0]=2*r/(S-x),u.elements[8]=(S+x)/(S-x),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(l),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(h)}}()}),po.prototype=Object.create(b.prototype),po.prototype.constructor=po,Object.assign(ys.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!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=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),_s.prototype=Object.assign(Object.create(b.prototype),{constructor:_s,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(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 this.filter!==null?(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 M,e=new ht,i=new M,n=new M,r=new ys;return function(o){b.prototype.updateMatrixWorld.call(this,o),o=this.context.listener;var s=this.up;if(this.timeDelta=r.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),o.positionX){var a=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(t.x,a),o.positionY.linearRampToValueAtTime(t.y,a),o.positionZ.linearRampToValueAtTime(t.z,a),o.forwardX.linearRampToValueAtTime(n.x,a),o.forwardY.linearRampToValueAtTime(n.y,a),o.forwardZ.linearRampToValueAtTime(n.z,a),o.upX.linearRampToValueAtTime(s.x,a),o.upY.linearRampToValueAtTime(s.y,a),o.upZ.linearRampToValueAtTime(s.z,a)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z,s.x,s.y,s.z)}}()}),Tr.prototype=Object.assign(Object.create(b.prototype),{constructor:Tr,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(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{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()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){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(0<this.filters.length){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=[]),this.isPlaying===!0?(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(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),xs.prototype=Object.assign(Object.create(Tr.prototype),{constructor:xs,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,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new M,e=new ht,i=new M,n=new M;return function(r){if(b.prototype.updateMatrixWorld.call(this,r),r=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),r.positionX){var o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(t.x,o),r.positionY.linearRampToValueAtTime(t.y,o),r.positionZ.linearRampToValueAtTime(t.z,o),r.orientationX.linearRampToValueAtTime(n.x,o),r.orientationY.linearRampToValueAtTime(n.y,o),r.orientationZ.linearRampToValueAtTime(n.z,o)}else r.setPosition(t.x,t.y,t.z),r.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ws.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(Ms.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var r=this.cumulativeWeight;if(r===0){for(r=0;r!==n;++r)i[t+r]=i[r];r=e}else r+=e,this._mixBufferRegion(i,t,0,e/r,n);this.cumulativeWeight=r},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var o=e+e;n!==o;++n)if(i[n]!==i[n+e]){r.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,r){if(.5<=n)for(n=0;n!==r;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){ht.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var o=1-n,s=0;s!==r;++s){var a=e+s;t[a]=t[a]*o+t[i+s]*n}}}),Object.assign(ia.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(Pi,{Composite:ia,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new Pi.Composite(t,e,i):new Pi(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+e+t+i+n+"$"),o=["material","materials","bones"];return function(s){var a=r.exec(s);if(!a)throw Error("PropertyBinding: Cannot parse trackName: "+s);a={nodeName:a[2],objectName:a[3],objectIndex:a[4],propertyName:a[5],propertyIndex:a[6]};var h=a.nodeName&&a.nodeName.lastIndexOf(".");if(h!==void 0&&h!==-1){var l=a.nodeName.substring(h+1);o.indexOf(l)!==-1&&(a.nodeName=a.nodeName.substring(0,h),a.objectName=l)}if(a.propertyName===null||a.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+s);return a}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(r){for(var o=0;o<r.length;o++){var s=r[o];if(s.name===e||s.uuid===e||(s=n(s.children)))return s}return null};if(t=n(t.children))return t}return null}}),Object.assign(Pi.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 i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},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 i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=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,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(this.node=t=Pi.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var o=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===o){o=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}if(o=t[n],o===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,r!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===r){r=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===r){r=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else o.fromArray!==void 0&&o.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(i=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Pi.prototype,{_getValue_unbound:Pi.prototype.getValue,_setValue_unbound:Pi.prototype.setValue}),Object.assign(na.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length,h=void 0,l=0,c=arguments.length;l!==c;++l){var u=arguments[l],d=u.uuid,g=n[d];if(g===void 0){g=e++,n[d]=g,t.push(u),d=0;for(var x=a;d!==x;++d)s[d].push(new Pi(u,r[d],o[d]))}else if(g<i){h=t[g];var S=--i;for(x=t[S],n[x.uuid]=g,t[g]=x,n[d]=S,t[S]=u,d=0,x=a;d!==x;++d){var P=s[d],G=P[g];P[g]=P[S],G===void 0&&(G=new Pi(u,r[d],o[d])),P[S]=G}}else t[g]!==h&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,o=0,s=arguments.length;o!==s;++o){var a=arguments[o],h=a.uuid,l=i[h];if(l!==void 0&&l>=e){var c=e++,u=t[c];for(i[u.uuid]=l,t[l]=u,i[h]=c,t[c]=a,a=0,h=r;a!==h;++a){u=n[a];var d=u[l];u[l]=u[c],u[c]=d}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,o=r.length,s=0,a=arguments.length;s!==a;++s){var h=arguments[s].uuid,l=n[h];if(l!==void 0)if(delete n[h],l<i){h=--i;var c=t[h],u=--e,d=t[u];for(n[c.uuid]=l,t[l]=c,n[d.uuid]=h,t[h]=d,t.pop(),c=0,d=o;c!==d;++c){var g=r[c],x=g[u];g[l]=g[h],g[h]=x,g.pop()}}else for(u=--e,d=t[u],n[d.uuid]=l,t[l]=d,t.pop(),c=0,d=o;c!==d;++c)g=r[c],g[l]=g[u],g.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(n!==void 0)return r[n];var o=this._paths,s=this._parsedPaths,a=this._objects,h=this.nCachedObjects_,l=Array(a.length);for(n=r.length,i[t]=n,o.push(t),s.push(e),r.push(l),i=h,n=a.length;i!==n;++i)l[i]=new Pi(a[i],t,e);return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];e[t[s]]=i,o[i]=a,o.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}),Object.assign(ra.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&&this.timeScale!==0&&this._startTime===null&&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,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,r=i/n;t.warp(1,n/i,e),this.warp(r,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(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,i){var n=this._mixer,r=n.time,o=this._timeScaleInterpolant,s=this.timeScale;return o===null&&(this._timeScaleInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,n[1]=r+i,o[0]=t/s,o[1]=e/s,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(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,i,n){if(this.enabled){var r=this._startTime;if(r!==null){if(e=(t-r)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,r=this._propertyBindings;for(var o=0,s=e.length;o!==s;++o)e[o].evaluate(i),r[o].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,r=this._loopCount,o=n===2202;if(t===0)return r===-1?e:o&&(r&1)===1?i-e:e;if(n===2200)t:{if(r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(r===-1&&(0<=t?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,r+=Math.abs(n);var s=this.repetitions-r;0>=s?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(s===1?(t=0>t,this._setEndings(t,!t,o)):this._setEndings(!1,!1,o),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(o&&(r&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,o=this._weightInterpolant;return o===null&&(this._weightInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,o[0]=e,n[1]=r+t,o[1]=i,this}}),Ts.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Ts,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,o=t._propertyBindings;t=t._interpolants;var s=i.uuid,a=this._bindingsByRootAndName,h=a[s];for(h===void 0&&(h={},a[s]=h),a=0;a!==r;++a){var l=n[a],c=l.name,u=h[c];if(u===void 0){if(u=o[a],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}u=new Ms(Pi.create(i,c,e&&e._propertyBindings[a].binding.parsedPath),l.ValueTypeName,l.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c)}o[a]=u,t[a].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}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){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,o=r[e];o===void 0?(o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=o):(e=o.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),o.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var r=n.knownActions,o=r[r.length-1],s=t._byClipCacheIndex;o._byClipCacheIndex=s,r[s]=o,r.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],r.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],o=this._bindings;r===void 0&&(r={},n[e]=r),r[i]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var r=this._bindingsByRootAndName,o=r[n],s=e[e.length-1];t=t._cacheIndex,s._cacheIndex=t,e[t]=s,e.pop(),delete o[i];t:{for(var a in o)break t;delete r[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new so(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?ki.findByName(i,t):t,t=i!==null?i.uuid:t;var r=this._actionsByClip[t],o=null;if(r!==void 0){if(o=r.actionByRoot[n],o!==void 0)return o;o=r.knownActions[0],i===null&&(i=o._clip)}return i===null?null:(e=new ra(this,i,e),this._bindAction(e,o),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?ki.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),o=this._accuIndex^=1,s=0;s!==i;++s)e[s]._update(n,t,r,o);for(t=this._bindings,e=this._nActiveBindings,s=0;s!==e;++s)t[s].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var r=0,o=n.length;r!==o;++r){var s=n[r];this._deactivateAction(s);var a=s._cacheIndex,h=e[e.length-1];s._cacheIndex=null,s._byClipCacheIndex=null,h._cacheIndex=a,e[a]=h,e.pop(),this._removeInactiveBindingsForAction(s)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var r in n)t=n[r],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),jo.prototype.clone=function(){return new jo(this.value.clone===void 0?this.value:this.value.clone())},Ss.prototype=Object.assign(Object.create(Rt.prototype),{constructor:Ss,isInstancedBufferGeometry:!0,copy:function(t){return Rt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Es.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Es,isInstancedInterleavedBuffer:!0,copy:function(t){return Ge.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Ps.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ps,isInstancedBufferAttribute:!0,copy:function(t){return Z.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(oa.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,i){return i=i||[],As(t,this,i,e),i.sort(sa),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=t.length;n<r;n++)As(t[n],this,i,e);return i.sort(sa),i}}),Object.assign(aa.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,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,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(Ee.clamp(e/this.radius,-1,1))),this}}),Object.assign(ha.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,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,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Ls.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new $;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),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 t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new $),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new $),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 e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new $),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 e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new $),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new $;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(Rs.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 t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new M),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new M),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 e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new M),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new M,e=new M;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=Ee.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new M),this.delta(i).multiplyScalar(t).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)}}),fo.prototype=Object.create(b.prototype),fo.prototype.constructor=fo,fo.prototype.isImmediateRenderObject=!0,mo.prototype=Object.create(Re.prototype),mo.prototype.constructor=mo,mo.prototype.update=function(){var t=new M,e=new M,i=new yt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry;if(s&&s.isGeometry)for(var a=s.vertices,h=s.faces,l=s=0,c=h.length;l<c;l++)for(var u=h[l],d=0,g=u.vertexNormals.length;d<g;d++){var x=u.vertexNormals[d];t.copy(a[u[n[d]]]).applyMatrix4(r),e.copy(x).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1}else if(s&&s.isBufferGeometry)for(n=s.attributes.position,a=s.attributes.normal,d=s=0,g=n.count;d<g;d++)t.set(n.getX(d),n.getY(d),n.getZ(d)).applyMatrix4(r),e.set(a.getX(d),a.getY(d),a.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1;o.needsUpdate=!0}}(),Sr.prototype=Object.create(b.prototype),Sr.prototype.constructor=Sr,Sr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sr.prototype.update=function(){var t=new M,e=new M;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Er.prototype=Object.create(Re.prototype),Er.prototype.constructor=Er,Er.prototype.updateMatrixWorld=function(){var t=new M,e=new mt,i=new mt;return function(n){var r=this.bones,o=this.geometry,s=o.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var a=0,h=0;a<r.length;a++){var l=r[a];l.parent&&l.parent.isBone&&(e.multiplyMatrices(i,l.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h,t.x,t.y,t.z),e.multiplyMatrices(i,l.parent.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h+1,t.x,t.y,t.z),h+=2)}o.getAttribute("position").needsUpdate=!0,b.prototype.updateMatrixWorld.call(this,n)}}(),Pr.prototype=Object.create(Ke.prototype),Pr.prototype.constructor=Pr,Pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ar.prototype=Object.create(b.prototype),Ar.prototype.constructor=Ar,Ar.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ar.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Lr.prototype=Object.create(b.prototype),Lr.prototype.constructor=Lr,Lr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Lr.prototype.update=function(){var t=new M,e=new H,i=new H;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var o=0,s=r.count;o<s;o++){var a=o<s/2?e:i;r.setXYZ(o,a.r,a.g,a.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),go.prototype=Object.create(Re.prototype),go.prototype.constructor=go,Wo.prototype=Object.create(Re.prototype),Wo.prototype.constructor=Wo,vo.prototype=Object.create(Re.prototype),vo.prototype.constructor=vo,vo.prototype.update=function(){var t=new M,e=new M,i=new yt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,r=this.geometry.attributes.position,o=this.object.geometry,s=o.vertices;o=o.faces;for(var a=0,h=0,l=o.length;h<l;h++){var c=o[h],u=c.normal;t.copy(s[c.a]).add(s[c.b]).add(s[c.c]).divideScalar(3).applyMatrix4(n),e.copy(u).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(a,t.x,t.y,t.z),a+=1,r.setXYZ(a,e.x,e.y,e.z),a+=1}r.needsUpdate=!0}}(),Rr.prototype=Object.create(b.prototype),Rr.prototype.constructor=Rr,Rr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Rr.prototype.update=function(){var t=new M,e=new M,i=new M;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.color!==void 0?(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(i),this.targetLine.scale.z=i.length()}}(),yo.prototype=Object.create(Re.prototype),yo.prototype.constructor=yo,yo.prototype.update=function(){function t(o,s,a,h){if(n.set(s,a,h).unproject(r),o=i[o],o!==void 0)for(s=e.getAttribute("position"),a=0,h=o.length;a<h;a++)s.setXYZ(o[a],n.x,n.y,n.z)}var e,i,n=new M,r=new Kt;return function(){e=this.geometry,i=this.pointMap,r.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),_n.prototype=Object.create(Re.prototype),_n.prototype.constructor=_n,_n.prototype.update=function(){var t=new At;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=e.x,r[4]=i.y,r[5]=i.z,r[6]=e.x,r[7]=e.y,r[8]=i.z,r[9]=i.x,r[10]=e.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=e.z,r[15]=e.x,r[16]=i.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=i.x,r[22]=e.y,r[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),_n.prototype.setFromObject=function(t){return this.object=t,this.update(),this},_n.prototype.copy=function(t){return Re.prototype.copy.call(this,t),this.object=t.object,this},_n.prototype.clone=function(){return new this.constructor().copy(this)},_o.prototype=Object.create(Re.prototype),_o.prototype.constructor=_o,_o.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),b.prototype.updateMatrixWorld.call(this,t))},xo.prototype=Object.create(qe.prototype),xo.prototype.constructor=xo,xo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),b.prototype.updateMatrixWorld.call(this,t)};var Zo,Ns;xn.prototype=Object.create(b.prototype),xn.prototype.constructor=xn,xn.prototype.setDirection=function(){var t=new M,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),xn.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},xn.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},xn.prototype.copy=function(t){return b.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},xn.prototype.clone=function(){return new this.constructor().copy(this)},wo.prototype=Object.create(Re.prototype),wo.prototype.constructor=wo,pe.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(pe.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(yn.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new F,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new M(r.x,r.y,r.z||0))}return e}}),Object.assign(Ki.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),ca.prototype=Object.create(Ei.prototype),ua.prototype=Object.create(Ei.prototype),Cs.prototype=Object.create(Ei.prototype),Object.assign(Cs.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.")}}),go.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Er.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Mr.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qo.extractUrlBase(t)}}),Object.assign(Vo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ds.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Ls.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(At.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)}}),Rs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Ee,{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()."),Ee.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ee.ceilPowerOfTwo(t)}}),Object.assign(yt.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(mt.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 t===void 0&&(t=new M),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,i,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,o)}}),_t.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},ht.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(Ri.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(be.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(be,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),be.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),be.getNormal(t,e,i,n)}}),Object.assign(Pn.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 Nn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Un(this,t)}}),Object.assign($.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},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(M.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,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},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(Y.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(F.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(b.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(b.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(ii.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(ai.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(pe.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}}),Bt.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ri.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(Z.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(Rt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&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(Rt.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(hn.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(jo.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(fe.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new H}},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===1}}}),Object.defineProperties(Yi.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(Je.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(Ft.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},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(Ft.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(Nt.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(lt.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(Le.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Tr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vs().load(t,function(i){e.setBuffer(i)}),this},ws.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},po.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},An.crossOrigin=void 0,An.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Io;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new cs;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},An.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},p.WebGLRenderTargetCube=St,p.WebGLRenderTarget=lt,p.WebGLRenderer=Ft,p.ShaderLib=pn,p.UniformsLib=le,p.UniformsUtils=_i,p.ShaderChunk=Ie,p.FogExp2=Jt,p.Fog=yi,p.Scene=qi,p.Sprite=ei,p.LOD=ii,p.SkinnedMesh=ke,p.Skeleton=ai,p.Bone=hi,p.Mesh=Ke,p.LineSegments=Re,p.LineLoop=an,p.Line=qe,p.Points=nr,p.Group=Pe,p.VideoTexture=os,p.DataTexture=ut,p.DataTexture3D=D,p.CompressedTexture=rr,p.CubeTexture=_,p.CanvasTexture=Ur,p.DepthTexture=Fr,p.Texture=Ct,p.AnimationLoader=Qs,p.CompressedTextureLoader=$s,p.DataTextureLoader=ls,p.CubeTextureLoader=cs,p.TextureLoader=Io,p.ObjectLoader=ds,p.MaterialLoader=ko,p.BufferGeometryLoader=ps,p.DefaultLoadingManager=Oi,p.LoadingManager=hs,p.JSONLoader=Vo,p.ImageLoader=ho,p.ImageBitmapLoader=fs,p.FontLoader=ta,p.FileLoader=Xi,p.Loader=Mr,p.LoaderUtils=qo,p.Cache=Zn,p.AudioLoader=vs,p.SpotLightShadow=zo,p.SpotLight=No,p.PointLight=Bo,p.RectAreaLight=Ho,p.HemisphereLight=Do,p.DirectionalLightShadow=Uo,p.DirectionalLight=Fo,p.AmbientLight=Go,p.LightShadow=Yn,p.Light=ri,p.StereoCamera=ea,p.PerspectiveCamera=Bt,p.OrthographicCamera=uo,p.CubeCamera=po,p.ArrayCamera=te,p.Camera=Kt,p.AudioListener=_s,p.PositionalAudio=xs,p.AudioContext=zs,p.AudioAnalyser=ws,p.Audio=Tr,p.VectorKeyframeTrack=xr,p.StringKeyframeTrack=Oo,p.QuaternionKeyframeTrack=ao,p.NumberKeyframeTrack=_r,p.ColorKeyframeTrack=Co,p.BooleanKeyframeTrack=Ro,p.PropertyMixer=Ms,p.PropertyBinding=Pi,p.KeyframeTrack=wi,p.AnimationUtils=Ai,p.AnimationObjectGroup=na,p.AnimationMixer=Ts,p.AnimationClip=ki,p.Uniform=jo,p.InstancedBufferGeometry=Ss,p.BufferGeometry=Rt,p.Geometry=F,p.InterleavedBufferAttribute=He,p.InstancedInterleavedBuffer=Es,p.InterleavedBuffer=Ge,p.InstancedBufferAttribute=Ps,p.Face3=O,p.Object3D=b,p.Raycaster=oa,p.Layers=X,p.EventDispatcher=Ot,p.Clock=ys,p.QuaternionLinearInterpolant=bo,p.LinearInterpolant=so,p.DiscreteInterpolant=Lo,p.CubicInterpolant=Ao,p.Interpolant=Hi,p.Triangle=be,p.Math=Ee,p.Spherical=aa,p.Cylindrical=ha,p.Plane=_t,p.Frustum=K,p.Sphere=Dt,p.Ray=Ri,p.Matrix4=mt,p.Matrix3=yt,p.Box3=At,p.Box2=Ls,p.Line3=Rs,p.Euler=w,p.Vector4=Y,p.Vector3=M,p.Vector2=$,p.Quaternion=ht,p.Color=H,p.ImmediateRenderObject=fo,p.VertexNormalsHelper=mo,p.SpotLightHelper=Sr,p.SkeletonHelper=Er,p.PointLightHelper=Pr,p.RectAreaLightHelper=Ar,p.HemisphereLightHelper=Lr,p.GridHelper=go,p.PolarGridHelper=Wo,p.FaceNormalsHelper=vo,p.DirectionalLightHelper=Rr,p.CameraHelper=yo,p.BoxHelper=_n,p.Box3Helper=_o,p.PlaneHelper=xo,p.ArrowHelper=xn,p.AxesHelper=wo,p.Shape=Pn,p.Path=Ki,p.ShapePath=ms,p.Font=gs,p.CurvePath=yn,p.Curve=pe,p.ImageUtils=An,p.ShapeUtils=wn,p.WebGLUtils=ne,p.WireframeGeometry=or,p.ParametricGeometry=Gr,p.ParametricBufferGeometry=sr,p.TetrahedronGeometry=kr,p.TetrahedronBufferGeometry=ar,p.OctahedronGeometry=Vr,p.OctahedronBufferGeometry=Dn,p.IcosahedronGeometry=jr,p.IcosahedronBufferGeometry=hr,p.DodecahedronGeometry=Wr,p.DodecahedronBufferGeometry=lr,p.PolyhedronGeometry=Hr,p.PolyhedronBufferGeometry=Di,p.TubeGeometry=Xr,p.TubeBufferGeometry=cr,p.TorusKnotGeometry=qr,p.TorusKnotBufferGeometry=ur,p.TorusGeometry=Yr,p.TorusBufferGeometry=pr,p.TextGeometry=Kr,p.TextBufferGeometry=dr,p.SphereGeometry=to,p.SphereBufferGeometry=Bn,p.RingGeometry=eo,p.RingBufferGeometry=fr,p.PlaneGeometry=Ti,p.PlaneBufferGeometry=oi,p.LatheGeometry=io,p.LatheBufferGeometry=mr,p.ShapeGeometry=Un,p.ShapeBufferGeometry=Fn,p.ExtrudeGeometry=Nn,p.ExtrudeBufferGeometry=hn,p.EdgesGeometry=gr,p.ConeGeometry=no,p.ConeBufferGeometry=ro,p.CylinderGeometry=Gn,p.CylinderBufferGeometry=vn,p.CircleGeometry=oo,p.CircleBufferGeometry=vr,p.BoxGeometry=Fe,p.BoxBufferGeometry=vi,p.ShadowMaterial=Hn,p.SpriteMaterial=We,p.RawShaderMaterial=yr,p.ShaderMaterial=Je,p.PointsMaterial=xi,p.MeshPhysicalMaterial=kn,p.MeshStandardMaterial=ln,p.MeshPhongMaterial=Yi,p.MeshToonMaterial=Vn,p.MeshNormalMaterial=jn,p.MeshLambertMaterial=Wn,p.MeshDepthMaterial=Tt,p.MeshDistanceMaterial=gt,p.MeshBasicMaterial=Ve,p.MeshMatcapMaterial=Xn,p.LineDashedMaterial=qn,p.LineBasicMaterial=Ne,p.Material=fe,p.Float64BufferAttribute=kt,p.Float32BufferAttribute=ct,p.Uint32BufferAttribute=ie,p.Int32BufferAttribute=jt,p.Uint16BufferAttribute=Gt,p.Int16BufferAttribute=Lt,p.Uint8ClampedBufferAttribute=Pt,p.Uint8BufferAttribute=it,p.Int8BufferAttribute=st,p.BufferAttribute=Z,p.ArcCurve=wr,p.CatmullRomCurve3=Ei,p.CubicBezierCurve=Zi,p.CubicBezierCurve3=cn,p.EllipseCurve=Vi,p.LineCurve=zi,p.LineCurve3=Ji,p.QuadraticBezierCurve=Qi,p.QuadraticBezierCurve3=un,p.SplineCurve=$i,p.REVISION="98",p.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},p.CullFaceNone=0,p.CullFaceBack=1,p.CullFaceFront=2,p.CullFaceFrontBack=3,p.FrontFaceDirectionCW=0,p.FrontFaceDirectionCCW=1,p.BasicShadowMap=0,p.PCFShadowMap=1,p.PCFSoftShadowMap=2,p.FrontSide=0,p.BackSide=1,p.DoubleSide=2,p.FlatShading=1,p.SmoothShading=2,p.NoColors=0,p.FaceColors=1,p.VertexColors=2,p.NoBlending=0,p.NormalBlending=1,p.AdditiveBlending=2,p.SubtractiveBlending=3,p.MultiplyBlending=4,p.CustomBlending=5,p.AddEquation=100,p.SubtractEquation=101,p.ReverseSubtractEquation=102,p.MinEquation=103,p.MaxEquation=104,p.ZeroFactor=200,p.OneFactor=201,p.SrcColorFactor=202,p.OneMinusSrcColorFactor=203,p.SrcAlphaFactor=204,p.OneMinusSrcAlphaFactor=205,p.DstAlphaFactor=206,p.OneMinusDstAlphaFactor=207,p.DstColorFactor=208,p.OneMinusDstColorFactor=209,p.SrcAlphaSaturateFactor=210,p.NeverDepth=0,p.AlwaysDepth=1,p.LessDepth=2,p.LessEqualDepth=3,p.EqualDepth=4,p.GreaterEqualDepth=5,p.GreaterDepth=6,p.NotEqualDepth=7,p.MultiplyOperation=0,p.MixOperation=1,p.AddOperation=2,p.NoToneMapping=0,p.LinearToneMapping=1,p.ReinhardToneMapping=2,p.Uncharted2ToneMapping=3,p.CineonToneMapping=4,p.UVMapping=300,p.CubeReflectionMapping=301,p.CubeRefractionMapping=302,p.EquirectangularReflectionMapping=303,p.EquirectangularRefractionMapping=304,p.SphericalReflectionMapping=305,p.CubeUVReflectionMapping=306,p.CubeUVRefractionMapping=307,p.RepeatWrapping=1e3,p.ClampToEdgeWrapping=1001,p.MirroredRepeatWrapping=1002,p.NearestFilter=1003,p.NearestMipMapNearestFilter=1004,p.NearestMipMapLinearFilter=1005,p.LinearFilter=1006,p.LinearMipMapNearestFilter=1007,p.LinearMipMapLinearFilter=1008,p.UnsignedByteType=1009,p.ByteType=1010,p.ShortType=1011,p.UnsignedShortType=1012,p.IntType=1013,p.UnsignedIntType=1014,p.FloatType=1015,p.HalfFloatType=1016,p.UnsignedShort4444Type=1017,p.UnsignedShort5551Type=1018,p.UnsignedShort565Type=1019,p.UnsignedInt248Type=1020,p.AlphaFormat=1021,p.RGBFormat=1022,p.RGBAFormat=1023,p.LuminanceFormat=1024,p.LuminanceAlphaFormat=1025,p.RGBEFormat=1023,p.DepthFormat=1026,p.DepthStencilFormat=1027,p.RedFormat=1028,p.RGB_S3TC_DXT1_Format=33776,p.RGBA_S3TC_DXT1_Format=33777,p.RGBA_S3TC_DXT3_Format=33778,p.RGBA_S3TC_DXT5_Format=33779,p.RGB_PVRTC_4BPPV1_Format=35840,p.RGB_PVRTC_2BPPV1_Format=35841,p.RGBA_PVRTC_4BPPV1_Format=35842,p.RGBA_PVRTC_2BPPV1_Format=35843,p.RGB_ETC1_Format=36196,p.RGBA_ASTC_4x4_Format=37808,p.RGBA_ASTC_5x4_Format=37809,p.RGBA_ASTC_5x5_Format=37810,p.RGBA_ASTC_6x5_Format=37811,p.RGBA_ASTC_6x6_Format=37812,p.RGBA_ASTC_8x5_Format=37813,p.RGBA_ASTC_8x6_Format=37814,p.RGBA_ASTC_8x8_Format=37815,p.RGBA_ASTC_10x5_Format=37816,p.RGBA_ASTC_10x6_Format=37817,p.RGBA_ASTC_10x8_Format=37818,p.RGBA_ASTC_10x10_Format=37819,p.RGBA_ASTC_12x10_Format=37820,p.RGBA_ASTC_12x12_Format=37821,p.LoopOnce=2200,p.LoopRepeat=2201,p.LoopPingPong=2202,p.InterpolateDiscrete=2300,p.InterpolateLinear=2301,p.InterpolateSmooth=2302,p.ZeroCurvatureEnding=2400,p.ZeroSlopeEnding=2401,p.WrapAroundEnding=2402,p.TrianglesDrawMode=0,p.TriangleStripDrawMode=1,p.TriangleFanDrawMode=2,p.LinearEncoding=3e3,p.sRGBEncoding=3001,p.GammaEncoding=3007,p.RGBEEncoding=3002,p.LogLuvEncoding=3003,p.RGBM7Encoding=3004,p.RGBM16Encoding=3005,p.RGBDEncoding=3006,p.BasicDepthPacking=3200,p.RGBADepthPacking=3201,p.TangentSpaceNormalMap=0,p.ObjectSpaceNormalMap=1,p.CubeGeometry=Fe,p.Face4=function(t,e,i,n,r,o,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new O(t,e,i,r,o,s)},p.LineStrip=0,p.LinePieces=1,p.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},p.MultiMaterial=function(t){return t===void 0&&(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},p.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new nr(t,e)},p.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ei(t)},p.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new nr(t,e)},p.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new M(t,e,i)},p.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Z(t,e).setDynamic(!0)},p.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new st(t,e)},p.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new it(t,e)},p.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Pt(t,e)},p.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Lt(t,e)},p.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gt(t,e)},p.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jt(t,e)},p.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new ie(t,e)},p.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ct(t,e)},p.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new kt(t,e)},p.ClosedSplineCurve3=ca,p.SplineCurve3=ua,p.Spline=Cs,p.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new wo(t)},p.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new _n(t,e)},p.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Re(new gr(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Re(new or(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Xi(t)},p.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ls(t)},p.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},p.Projector=function(){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().")}},p.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},p.SceneUtils={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")}},p.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(p,"__esModule",{value:!0})}),THREE.Sky=function(){var p=THREE.Sky.SkyShader,Ot=new THREE.ShaderMaterial({fragmentShader:p.fragmentShader,vertexShader:p.vertexShader,uniforms:THREE.UniformsUtils.clone(p.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),Ot)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
|
|
2570
|
+
`},_i={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),r;for(r in n)e[r]=n[r]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}}return e}},oh={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};Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=Se.euclideanModulo(e,1),i=Se.clamp(i,0,1),n=Se.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(s){s!==void 0&&1>parseFloat(s)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var r=parseInt(i[2],10)/100,o=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,r,o)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=oh[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),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 e===void 0&&(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){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.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(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.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){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,r=Math.max(e,i,n),o=Math.min(e,i,n),s,a=(o+r)/2;if(o===r)o=s=0;else{var h=r-o;switch(o=.5>=a?h/(r+o):h/(2-r-o),r){case e:s=(i-n)/h+(i<n?6:0);break;case i:s=(n-e)/h+2;break;case n:s=(e-i)/h+4}s/=6}return t.h=s,t.s=o,t.l=a,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,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(i,n){this.getHSL(t),i.getHSL(e),i=Se.lerp(t.h,e.h,n);var r=Se.lerp(t.s,e.s,n);return n=Se.lerp(t.l,e.l,n),this.setHSL(i,r,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var le={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new yt},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 $(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 H(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 H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new yt}},sprite:{diffuse:{value:new H(15658734)},opacity:{value:1},center:{value:new $(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new yt}}},pn={basic:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.fog]),vertexShader:Ie.meshbasic_vert,fragmentShader:Ie.meshbasic_frag},lambert:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.fog,le.lights,{emissive:{value:new H(0)}}]),vertexShader:Ie.meshlambert_vert,fragmentShader:Ie.meshlambert_frag},phong:{uniforms:_i.merge([le.common,le.specularmap,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.gradientmap,le.fog,le.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:Ie.meshphong_vert,fragmentShader:Ie.meshphong_frag},standard:{uniforms:_i.merge([le.common,le.envmap,le.aomap,le.lightmap,le.emissivemap,le.bumpmap,le.normalmap,le.displacementmap,le.roughnessmap,le.metalnessmap,le.fog,le.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},matcap:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,le.fog,{matcap:{value:null}}]),vertexShader:Ie.meshmatcap_vert,fragmentShader:Ie.meshmatcap_frag},points:{uniforms:_i.merge([le.points,le.fog]),vertexShader:Ie.points_vert,fragmentShader:Ie.points_frag},dashed:{uniforms:_i.merge([le.common,le.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ie.linedashed_vert,fragmentShader:Ie.linedashed_frag},depth:{uniforms:_i.merge([le.common,le.displacementmap]),vertexShader:Ie.depth_vert,fragmentShader:Ie.depth_frag},normal:{uniforms:_i.merge([le.common,le.bumpmap,le.normalmap,le.displacementmap,{opacity:{value:1}}]),vertexShader:Ie.normal_vert,fragmentShader:Ie.normal_frag},sprite:{uniforms:_i.merge([le.sprite,le.fog]),vertexShader:Ie.sprite_vert,fragmentShader:Ie.sprite_frag},background:{uniforms:{uvTransform:{value:new yt},t2D:{value:null}},vertexShader:Ie.background_vert,fragmentShader:Ie.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ie.cube_vert,fragmentShader:Ie.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ie.equirect_vert,fragmentShader:Ie.equirect_frag},distanceRGBA:{uniforms:_i.merge([le.common,le.displacementmap,{referencePosition:{value:new M},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ie.distanceRGBA_vert,fragmentShader:Ie.distanceRGBA_frag},shadow:{uniforms:_i.merge([le.lights,le.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:Ie.shadow_vert,fragmentShader:Ie.shadow_frag}};pn.physical={uniforms:_i.merge([pn.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Ie.meshphysical_vert,fragmentShader:Ie.meshphysical_frag},Object.assign(O.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,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),w.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),w.DefaultOrder="XYZ",Object.defineProperties(w.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(w.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||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,i){var n=Se.clamp,r=t.elements;t=r[0];var o=r[4],s=r[8],a=r[1],h=r[5],l=r[9],c=r[2],u=r[6];return r=r[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-l,r),this._z=Math.atan2(-o,t)):(this._x=Math.atan2(u,h),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._y=Math.atan2(s,r),this._z=Math.atan2(a,h)):(this._y=Math.atan2(-c,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-c,r),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(a,t))):e==="ZYX"?(this._y=Math.asin(-n(c,-1,1)),.99999>Math.abs(c)?(this._x=Math.atan2(u,r),this._z=Math.atan2(a,t)):(this._x=0,this._z=Math.atan2(-o,h))):e==="YZX"?(this._z=Math.asin(n(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-c,t)):(this._x=0,this._y=Math.atan2(s,r))):e==="XZY"?(this._z=Math.asin(-n(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(u,h),this._y=Math.atan2(s,t)):(this._x=Math.atan2(-l,r),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new mt;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new ht;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],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(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 M(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(X.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=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(this.mask&t.mask)!==0}});var sh=0;b.DefaultUp=new M(0,1,0),b.DefaultMatrixAutoUpdate=!0,b.prototype=Object.assign(Object.create(Ot.prototype),{constructor:b,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 ht;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new ht;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new M(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new M(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new M(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new M;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new M(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new M(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new M(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new mt;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new ht,e=new mt,i=new M,n=new M;return function(r,o,s){r.isVector3?i.copy(r):i.set(r,o,s),r=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),r&&(e.extractRotation(r.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){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?(t.parent!==null&&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(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,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 i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new M),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new M,e=new M;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new ht),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new M,e=new ht;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new M),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new M),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,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(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)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(c,u){return c[u.uuid]===void 0&&(c[u.uuid]=u.toJSON(t)),u.uuid}function i(c){var u=[],d;for(d in c){var g=c[d];delete g.metadata,u.push(g)}return u}var n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},r.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){o.geometry=e(t.geometries,this.geometry);var s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0)if(s=s.shapes,Array.isArray(s))for(var a=0,h=s.length;a<h;a++)e(t.shapes,s[a]);else e(t.shapes,s)}if(this.material!==void 0)if(Array.isArray(this.material)){for(s=[],a=0,h=this.material.length;a<h;a++)s.push(e(t.materials,this.material[a]));o.material=s}else o.material=e(t.materials,this.material);if(0<this.children.length)for(o.children=[],a=0;a<this.children.length;a++)o.children.push(this.children[a].toJSON(t).object);if(n){n=i(t.geometries),a=i(t.materials),h=i(t.textures);var l=i(t.images);s=i(t.shapes),0<n.length&&(r.geometries=n),0<a.length&&(r.materials=a),0<h.length&&(r.textures=h),0<l.length&&(r.images=l),0<s.length&&(r.shapes=s)}return r.object=o,r},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(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)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var ah=0;F.prototype=Object.assign(Object.create(Ot.prototype),{constructor:F,isGeometry:!0,applyMatrix:function(t){for(var e=new yt().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;r<o;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new mt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new mt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new mt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new mt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new mt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(x,S,P,G){var N=a===void 0?[]:[i.colors[x].clone(),i.colors[S].clone(),i.colors[P].clone()],q=s===void 0?[]:[new M().fromArray(s,3*x),new M().fromArray(s,3*S),new M().fromArray(s,3*P)];G=new O(x,S,P,q,N,G),i.faces.push(G),h!==void 0&&i.faceVertexUvs[0].push([new $().fromArray(h,2*x),new $().fromArray(h,2*S),new $().fromArray(h,2*P)]),l!==void 0&&i.faceVertexUvs[1].push([new $().fromArray(l,2*x),new $().fromArray(l,2*S),new $().fromArray(l,2*P)])}var i=this,n=t.index!==null?t.index.array:void 0,r=t.attributes,o=r.position.array,s=r.normal!==void 0?r.normal.array:void 0,a=r.color!==void 0?r.color.array:void 0,h=r.uv!==void 0?r.uv.array:void 0,l=r.uv2!==void 0?r.uv2.array:void 0;l!==void 0&&(this.faceVertexUvs[1]=[]);for(var c=r=0;r<o.length;r+=3,c+=2)i.vertices.push(new M().fromArray(o,r)),a!==void 0&&i.colors.push(new H().fromArray(a,r));var u=t.groups;if(0<u.length)for(r=0;r<u.length;r++){o=u[r];var d=o.start,g=o.count;for(c=d,d+=g;c<d;c+=3)n!==void 0?e(n[c],n[c+1],n[c+2],o.materialIndex):e(c,c+1,c+2,o.materialIndex)}else if(n!==void 0)for(r=0;r<n.length;r+=3)e(n[r],n[r+1],n[r+2]);else for(r=0;r<o.length/3;r+=3)e(r,r+1,r+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new M;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;e=e===0?1:1/e;var i=new mt;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new M,e=new M,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b];t.subVectors(this.vertices[r.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new M;if(t){var r=new M,o=new M;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var s=this.vertices[e.a],a=this.vertices[e.b],h=this.vertices[e.c];r.subVectors(h,a),o.subVectors(s,a),r.cross(o),i[e.a].add(r),i[e.b].add(r),i[e.c].add(r)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],s=e.vertexNormals,s.length===3?(s[0].copy(i[e.a]),s[1].copy(i[e.b]),s[2].copy(i[e.c])):(s[0]=i[e.a].clone(),s[1]=i[e.b].clone(),s[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var r=0;for(t=n.vertexNormals.length;r<t;r++)n.__originalVertexNormals[r]?n.__originalVertexNormals[r].copy(n.vertexNormals[r]):n.__originalVertexNormals[r]=n.vertexNormals[r].clone()}var o=new F;for(o.faces=this.faces,r=0,t=this.morphTargets.length;r<t;r++){if(!this.morphNormals[r]){this.morphNormals[r]={},this.morphNormals[r].faceNormals=[],this.morphNormals[r].vertexNormals=[],n=this.morphNormals[r].faceNormals;var s=this.morphNormals[r].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var a=new M,h={a:new M,b:new M,c:new M};n.push(a),s.push(h)}}for(s=this.morphNormals[r],o.vertices=this.morphTargets[r].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],a=s.faceNormals[i],h=s.vertexNormals[i],a.copy(n.normal),h.a.copy(n.vertexNormals[0]),h.b.copy(n.vertexNormals[1]),h.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new At),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new Dt),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,h=t.faces,l=this.faceVertexUvs[0],c=t.faceVertexUvs[0],u=this.colors,d=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new yt().getNormalMatrix(e)),t=0;for(var g=s.length;t<g;t++){var x=s[t].clone();e!==void 0&&x.applyMatrix4(e),o.push(x)}for(t=0,g=d.length;t<g;t++)u.push(d[t].clone());for(t=0,g=h.length;t<g;t++){s=h[t];var S=s.vertexNormals;for(d=s.vertexColors,u=new O(s.a+r,s.b+r,s.c+r),u.normal.copy(s.normal),n!==void 0&&u.normal.applyMatrix3(n).normalize(),e=0,o=S.length;e<o;e++)x=S[e].clone(),n!==void 0&&x.applyMatrix3(n).normalize(),u.vertexNormals.push(x);for(u.color.copy(s.color),e=0,o=d.length;e<o;e++)x=d[e],u.vertexColors.push(x.clone());u.materialIndex=s.materialIndex+i,a.push(u)}for(t=0,g=c.length;t<g;t++)if(i=c[t],n=[],i!==void 0){for(e=0,o=i.length;e<o;e++)n.push(i[e].clone());l.push(n)}}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=[],i=[],n=Math.pow(10,4),r,o=0;for(r=this.vertices.length;o<r;o++){var s=this.vertices[o];s=Math.round(s.x*n)+"_"+Math.round(s.y*n)+"_"+Math.round(s.z*n),t[s]===void 0?(t[s]=o,e.push(this.vertices[o]),i[o]=e.length-1):i[o]=i[t[s]]}for(t=[],o=0,r=this.faces.length;o<r;o++)for(n=this.faces[o],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],s=0;3>s;s++)if(n[s]===n[(s+1)%3]){t.push(o);break}for(o=t.length-1;0<=o;o--)for(n=t[o],this.faces.splice(n,1),i=0,r=this.faceVertexUvs.length;i<r;i++)this.faceVertexUvs[i].splice(n,1);return o=this.vertices.length-e.length,this.vertices=e,o},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new M(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(h,l){return h.materialIndex-l.materialIndex});var n=this.faceVertexUvs[0],r=this.faceVertexUvs[1],o,s;for(n&&n.length===e&&(o=[]),r&&r.length===e&&(s=[]),i=0;i<e;i++){var a=t[i]._id;o&&o.push(n[a]),s&&s.push(r[a])}o&&(this.faceVertexUvs[0]=o),s&&(this.faceVertexUvs[1]=s)},toJSON:function(){function t(ot,T,A){return A?ot|1<<T:ot&~(1<<T)}function e(ot){var T=ot.x.toString()+ot.y.toString()+ot.z.toString();return l[T]!==void 0||(l[T]=h.length/3,h.push(ot.x,ot.y,ot.z)),l[T]}function i(ot){var T=ot.r.toString()+ot.g.toString()+ot.b.toString();return u[T]!==void 0||(u[T]=c.length,c.push(ot.getHex())),u[T]}function n(ot){var T=ot.x.toString()+ot.y.toString();return g[T]!==void 0||(g[T]=d.length/2,d.push(ot.x,ot.y)),g[T]}var r={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.parameters!==void 0){var o=this.parameters,s;for(s in o)o[s]!==void 0&&(r[s]=o[s]);return r}for(o=[],s=0;s<this.vertices.length;s++){var a=this.vertices[s];o.push(a.x,a.y,a.z)}a=[];var h=[],l={},c=[],u={},d=[],g={};for(s=0;s<this.faces.length;s++){var x=this.faces[s],S=this.faceVertexUvs[0][s]!==void 0,P=0<x.normal.length(),G=0<x.vertexNormals.length,N=x.color.r!==1||x.color.g!==1||x.color.b!==1,q=0<x.vertexColors.length,V=0;V=t(V,0,0),V=t(V,1,!0),V=t(V,2,!1),V=t(V,3,S),V=t(V,4,P),V=t(V,5,G),V=t(V,6,N),V=t(V,7,q),a.push(V),a.push(x.a,x.b,x.c),a.push(x.materialIndex),S&&(S=this.faceVertexUvs[0][s],a.push(n(S[0]),n(S[1]),n(S[2]))),P&&a.push(e(x.normal)),G&&(P=x.vertexNormals,a.push(e(P[0]),e(P[1]),e(P[2]))),N&&a.push(i(x.color)),q&&(x=x.vertexColors,a.push(i(x[0]),i(x[1]),i(x[2])))}return r.data={},r.data.vertices=o,r.data.normals=h,0<c.length&&(r.data.colors=c),0<d.length&&(r.data.uvs=[d]),r.data.faces=a,r},clone:function(){return new F().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var r=t.vertices,o=0;for(e=r.length;o<e;o++)this.vertices.push(r[o].clone());for(r=t.colors,o=0,e=r.length;o<e;o++)this.colors.push(r[o].clone());for(r=t.faces,o=0,e=r.length;o<e;o++)this.faces.push(r[o].clone());for(o=0,e=t.faceVertexUvs.length;o<e;o++){var s=t.faceVertexUvs[o];for(this.faceVertexUvs[o]===void 0&&(this.faceVertexUvs[o]=[]),r=0,i=s.length;r<i;r++){var a=s[r],h=[],l=0;for(n=a.length;l<n;l++)h.push(a[l].clone());this.faceVertexUvs[o].push(h)}}for(l=t.morphTargets,o=0,e=l.length;o<e;o++){if(n={},n.name=l[o].name,l[o].vertices!==void 0)for(n.vertices=[],r=0,i=l[o].vertices.length;r<i;r++)n.vertices.push(l[o].vertices[r].clone());if(l[o].normals!==void 0)for(n.normals=[],r=0,i=l[o].normals.length;r<i;r++)n.normals.push(l[o].normals[r].clone());this.morphTargets.push(n)}for(l=t.morphNormals,o=0,e=l.length;o<e;o++){if(n={},l[o].vertexNormals!==void 0)for(n.vertexNormals=[],r=0,i=l[o].vertexNormals.length;r<i;r++)s=l[o].vertexNormals[r],a={},a.a=s.a.clone(),a.b=s.b.clone(),a.c=s.c.clone(),n.vertexNormals.push(a);if(l[o].faceNormals!==void 0)for(n.faceNormals=[],r=0,i=l[o].faceNormals.length;r<i;r++)n.faceNormals.push(l[o].faceNormals[r].clone());this.morphNormals.push(n)}for(r=t.skinWeights,o=0,e=r.length;o<e;o++)this.skinWeights.push(r[o].clone());for(r=t.skinIndices,o=0,e=r.length;o<e;o++)this.skinIndices.push(r[o].clone());for(r=t.lineDistances,o=0,e=r.length;o<e;o++)this.lineDistances.push(r[o]);return o=t.boundingBox,o!==null&&(this.boundingBox=o.clone()),o=t.boundingSphere,o!==null&&(this.boundingSphere=o.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(Z.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Z.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=t!==void 0?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,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),o=new H),e[i++]=o.r,e[i++]=o.g,e[i++]=o.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),o=new $),e[i++]=o.x,e[i++]=o.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),o=new M),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var o=t[n];o===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),o=new Y),e[i++]=o.x,e[i++]=o.y,e[i++]=o.z,e[i++]=o.w}return this},set:function(t,e){return e===void 0&&(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,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),st.prototype=Object.create(Z.prototype),st.prototype.constructor=st,it.prototype=Object.create(Z.prototype),it.prototype.constructor=it,Pt.prototype=Object.create(Z.prototype),Pt.prototype.constructor=Pt,Lt.prototype=Object.create(Z.prototype),Lt.prototype.constructor=Lt,Gt.prototype=Object.create(Z.prototype),Gt.prototype.constructor=Gt,jt.prototype=Object.create(Z.prototype),jt.prototype.constructor=jt,ie.prototype=Object.create(Z.prototype),ie.prototype.constructor=ie,ct.prototype=Object.create(Z.prototype),ct.prototype.constructor=ct,kt.prototype=Object.create(Z.prototype),kt.prototype.constructor=kt,Object.assign(Me.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var r=t[n];if(r.materialIndex!==i){i=r.materialIndex,o!==void 0&&(o.count=3*n-o.start,e.push(o));var o={start:3*n,materialIndex:i}}}o!==void 0&&(o.count=3*n-o.start,e.push(o)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,r=n[0]&&0<n[0].length,o=n[1]&&0<n[1].length,s=t.morphTargets,a=s.length;if(0<a){for(var h=[],l=0;l<a;l++)h[l]={name:s[l].name,data:[]};this.morphTargets.position=h}var c=t.morphNormals,u=c.length;if(0<u){var d=[];for(l=0;l<u;l++)d[l]={name:c[l].name,data:[]};this.morphTargets.normal=d}var g=t.skinIndices,x=t.skinWeights,S=g.length===i.length,P=x.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),l=0;l<e.length;l++){var G=e[l];this.vertices.push(i[G.a],i[G.b],i[G.c]);var N=G.vertexNormals;for(N.length===3?this.normals.push(N[0],N[1],N[2]):(N=G.normal,this.normals.push(N,N,N)),N=G.vertexColors,N.length===3?this.colors.push(N[0],N[1],N[2]):(N=G.color,this.colors.push(N,N,N)),r===!0&&(N=n[0][l],N!==void 0?this.uvs.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new $,new $,new $))),o===!0&&(N=n[1][l],N!==void 0?this.uvs2.push(N[0],N[1],N[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new $,new $,new $))),N=0;N<a;N++){var q=s[N].vertices;h[N].data.push(q[G.a],q[G.b],q[G.c])}for(N=0;N<u;N++)q=c[N].vertexNormals[l],d[N].data.push(q.a,q.b,q.c);S&&this.skinIndices.push(g[G.a],g[G.b],g[G.c]),P&&this.skinWeights.push(x[G.a],x[G.b],x[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 hh=1;Rt.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Rt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<gi(t)?ie:Gt)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(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 Z(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i: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;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new yt().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new mt;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new mt;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new mt;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new mt;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new mt;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new b;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new M;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){t=new ct(3*e.vertices.length,3);var i=new ct(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new ct(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new ct(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new Me().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new Z(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new Z(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new Z(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new Z(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new Z(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],r=0,o=n.length;r<o;r++){var s=n[r],a=new ct(3*s.data.length,3);a.name=s.name,e.push(a.copyVector3sArray(s.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new ct(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new ct(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new At);var t=this.attributes.position;t!==void 0?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 At,e=new M;return function(){this.boundingSphere===null&&(this.boundingSphere=new Dt);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,o=0,s=i.count;o<s;o++)e.x=i.getX(o),e.y=i.getY(o),e.z=i.getZ(o),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new Z(new Float32Array(i.length),3));else for(var n=e.normal.array,r=0,o=n.length;r<o;r++)n[r]=0;n=e.normal.array;var s=new M,a=new M,h=new M,l=new M,c=new M;if(t){var u=t.array;for(r=0,o=t.count;r<o;r+=3){t=3*u[r+0];var d=3*u[r+1],g=3*u[r+2];s.fromArray(i,t),a.fromArray(i,d),h.fromArray(i,g),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[t]+=l.x,n[t+1]+=l.y,n[t+2]+=l.z,n[d]+=l.x,n[d+1]+=l.y,n[d+2]+=l.z,n[g]+=l.x,n[g+1]+=l.y,n[g+2]+=l.z}}else for(r=0,o=i.length;r<o;r+=9)s.fromArray(i,r),a.fromArray(i,r+3),h.fromArray(i,r+6),l.subVectors(h,a),c.subVectors(s,a),l.cross(c),n[r]=l.x,n[r+1]=l.y,n[r+2]=l.z,n[r+3]=l.x,n[r+4]=l.y,n[r+5]=l.z,n[r+6]=l.x,n[r+7]=l.y,n[r+8]=l.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var r=i[n].array,o=t.attributes[n],s=o.array,a=0;for(o=o.itemSize*e;a<s.length;a++,o++)r[o]=s[a]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new M;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Rt,e=this.index.array,i=this.attributes,n;for(n in i){var r=i[n],o=r.array,s=r.itemSize,a=new o.constructor(e.length*s),h=0;r=0;for(var l=e.length;r<l;r++)for(var c=e[r]*s,u=0;u<s;u++)a[h++]=o[c++];t.addAttribute(n,new Z(a,s))}for(e=this.groups,r=0,l=e.length;r<l;r++)i=e[r],t.addGroup(i.start,i.count,i.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),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(r in e)e[r]!==void 0&&(t[r]=e[r]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(r in i){var n=i[r];e=Array.prototype.slice.call(n.array),t.data.attributes[r]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var r=this.groups;return 0<r.length&&(t.data.groups=JSON.parse(JSON.stringify(r))),r=this.boundingSphere,r!==null&&(t.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),t},clone:function(){return new Rt().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(s in i)this.addAttribute(s,i[s].clone());var n=t.morphAttributes;for(s in n){var r=[],o=n[s];for(i=0,e=o.length;i<e;i++)r.push(o[i].clone());this.morphAttributes[s]=r}var s=t.groups;for(i=0,e=s.length;i<e;i++)n=s[i],this.addGroup(n.start,n.count,n.materialIndex);return s=t.boundingBox,s!==null&&(this.boundingBox=s.clone()),s=t.boundingSphere,s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Fe.prototype=Object.create(F.prototype),Fe.prototype.constructor=Fe,vi.prototype=Object.create(Rt.prototype),vi.prototype.constructor=vi,Ti.prototype=Object.create(F.prototype),Ti.prototype.constructor=Ti,oi.prototype=Object.create(Rt.prototype),oi.prototype.constructor=oi;var lh=0;fe.prototype=Object.assign(Object.create(Ot.prototype),{constructor:fe,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(r){var o=[],s;for(s in r){var a=r[s];delete a.metadata,o.push(a)}return o}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(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.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),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.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Je.prototype=Object.create(fe.prototype),Je.prototype.constructor=Je,Je.prototype.isShaderMaterial=!0,Je.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=_i.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},Je.prototype.toJSON=function(t){var e=fe.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(Ri.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 e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new M),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 M;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new M),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new M;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new M,e=new M,i=new M;return function(n,r,o,s){t.copy(n).add(r).multiplyScalar(.5),e.copy(r).sub(n).normalize(),i.copy(this.origin).sub(t);var a=.5*n.distanceTo(r),h=-this.direction.dot(e),l=i.dot(this.direction),c=-i.dot(e),u=i.lengthSq(),d=Math.abs(1-h*h);if(0<d){n=h*c-l,r=h*l-c;var g=a*d;0<=n?r>=-g?r<=g?(a=1/d,n*=a,r*=a,h=n*(n+h*r+2*l)+r*(h*n+r+2*c)+u):(r=a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):(r=-a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u):r<=-g?(n=Math.max(0,-(-h*a+l)),r=0<n?-a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u):r<=g?(n=0,r=Math.min(Math.max(-a,-c),a),h=r*(r+2*c)+u):(n=Math.max(0,-(h*a+l)),r=0<n?a:Math.min(Math.max(-a,-c),a),h=-n*n+r*(r+2*c)+u)}else r=0<h?-a:a,n=Math.max(0,-(h*r+l)),h=-n*n+r*(r+2*c)+u;return o&&o.copy(this.direction).multiplyScalar(n).add(this.origin),s&&s.copy(e).multiplyScalar(r).add(t),h}}(),intersectSphere:function(){var t=new M;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n;return e=e.radius*e.radius,r>e?null:(e=Math.sqrt(e-r),r=n-e,n+=e,0>r&&0>n?null:0>r?this.at(n,i):this.at(r,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,r=1/this.direction.z,o=this.origin;if(0<=i){var s=(t.min.x-o.x)*i;i*=t.max.x-o.x}else s=(t.max.x-o.x)*i,i*=t.min.x-o.x;if(0<=n){var a=(t.min.y-o.y)*n;n*=t.max.y-o.y}else a=(t.max.y-o.y)*n,n*=t.min.y-o.y;return s>n||a>i||((a>s||s!==s)&&(s=a),(n<i||i!==i)&&(i=n),0<=r?(a=(t.min.z-o.z)*r,t=(t.max.z-o.z)*r):(a=(t.max.z-o.z)*r,t=(t.min.z-o.z)*r),s>t||a>i)?null:((a>s||s!==s)&&(s=a),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=s?s:i,e))},intersectsBox:function(){var t=new M;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new M,e=new M,i=new M,n=new M;return function(r,o,s,a,h){if(e.subVectors(o,r),i.subVectors(s,r),n.crossVectors(e,i),o=this.direction.dot(n),0<o){if(a)return null;a=1}else if(0>o)a=-1,o=-o;else return null;return t.subVectors(this.origin,r),r=a*this.direction.dot(i.crossVectors(t,i)),0>r||(s=a*this.direction.dot(e.cross(t)),0>s||r+s>o)?null:(r=-a*t.dot(n),0>r?null:this.at(r/o,h))}}(),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(be,{getNormal:function(){var t=new M;return function(e,i,n,r){return r===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new M),r.subVectors(n,i),t.subVectors(e,i),r.cross(t),e=r.lengthSq(),0<e?r.multiplyScalar(1/Math.sqrt(e)):r.set(0,0,0)}}(),getBarycoord:function(){var t=new M,e=new M,i=new M;return function(n,r,o,s,a){t.subVectors(s,r),e.subVectors(o,r),i.subVectors(n,r),n=t.dot(t),r=t.dot(e),o=t.dot(i);var h=e.dot(e);s=e.dot(i);var l=n*h-r*r;return a===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),a=new M),l===0?a.set(-2,-1,-1):(l=1/l,h=(h*o-r*s)*l,n=(n*s-r*o)*l,a.set(1-h-n,n,h))}}(),containsPoint:function(){var t=new M;return function(e,i,n,r){return be.getBarycoord(e,i,n,r,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new M;return function(e,i,n,r,o,s,a,h){return this.getBarycoord(e,i,n,r,t),h.set(0,0),h.addScaledVector(o,t.x),h.addScaledVector(s,t.y),h.addScaledVector(a,t.z),h}}()}),Object.assign(be.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),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 M,e=new M;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new M),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return be.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new M),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return be.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return be.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,r){return be.getUV(t,this.a,this.b,this.c,e,i,n,r)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new M,e=new M,i=new M,n=new M,r=new M,o=new M;return function(s,a){a===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new M);var h=this.a,l=this.b,c=this.c;t.subVectors(l,h),e.subVectors(c,h),n.subVectors(s,h);var u=t.dot(n),d=e.dot(n);if(0>=u&&0>=d)return a.copy(h);r.subVectors(s,l);var g=t.dot(r),x=e.dot(r);if(0<=g&&x<=g)return a.copy(l);var S=u*x-g*d;if(0>=S&&0<=u&&0>=g)return l=u/(u-g),a.copy(h).addScaledVector(t,l);o.subVectors(s,c),s=t.dot(o);var P=e.dot(o);return 0<=P&&s<=P?a.copy(c):(u=s*d-u*P,0>=u&&0<=d&&0>=P?(S=d/(d-P),a.copy(h).addScaledVector(e,S)):(d=g*P-s*x,0>=d&&0<=x-g&&0<=s-P?(i.subVectors(c,l),S=(x-g)/(x-g+(s-P)),a.copy(l).addScaledVector(i,S)):(c=1/(d+u+S),l=u*c,S*=c,a.copy(h).addScaledVector(t,l).addScaledVector(e,S))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ve.prototype=Object.create(fe.prototype),Ve.prototype.constructor=Ve,Ve.prototype.isMeshBasicMaterial=!0,Ve.prototype.copy=function(t){return fe.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},Ke.prototype=Object.assign(Object.create(b.prototype),{constructor:Ke,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return b.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(P,G,N,q,V,ot,T,A){return(G.side===1?q.intersectTriangle(T,ot,V,!0,A):q.intersectTriangle(V,ot,T,G.side!==2,A))===null?null:(S.copy(A),S.applyMatrix4(P.matrixWorld),G=N.ray.origin.distanceTo(S),G<N.near||G>N.far?null:{distance:G,point:S.clone(),object:P})}function e(P,G,N,q,V,ot,T,A,tt){return o.fromBufferAttribute(V,T),s.fromBufferAttribute(V,A),a.fromBufferAttribute(V,tt),(P=t(P,G,N,q,o,s,a,x))&&(ot&&(u.fromBufferAttribute(ot,T),d.fromBufferAttribute(ot,A),g.fromBufferAttribute(ot,tt),P.uv=be.getUV(x,o,s,a,u,d,g,new $)),ot=new O(T,A,tt),be.getNormal(o,s,a,ot.normal),P.face=ot),P}var i=new mt,n=new Ri,r=new Dt,o=new M,s=new M,a=new M,h=new M,l=new M,c=new M,u=new $,d=new $,g=new $,x=new M,S=new M;return function(P,G){var N=this.geometry,q=this.material,V=this.matrixWorld;if(q!==void 0&&(N.boundingSphere===null&&N.computeBoundingSphere(),r.copy(N.boundingSphere),r.applyMatrix4(V),P.ray.intersectsSphere(r)!==!1&&(i.getInverse(V),n.copy(P.ray).applyMatrix4(i),N.boundingBox===null||n.intersectsBox(N.boundingBox)!==!1))){if(N.isBufferGeometry){var ot=N.index,T=N.attributes.position,A=N.attributes.uv,tt=N.groups;N=N.drawRange;var vt;if(ot!==null)if(Array.isArray(q)){var ft=0;for(vt=tt.length;ft<vt;ft++){var at=tt[ft],Ht=q[at.materialIndex];V=Math.max(at.start,N.start);var It=Math.min(at.start+at.count,N.start+N.count);for(at=V;at<It;at+=3){V=ot.getX(at);var $t=ot.getX(at+1),Xt=ot.getX(at+2);(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(at/3),G.push(V))}}}else for(V=Math.max(0,N.start),It=Math.min(ot.count,N.start+N.count),ft=V,vt=It;ft<vt;ft+=3)V=ot.getX(ft),$t=ot.getX(ft+1),Xt=ot.getX(ft+2),(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V));else if(T!==void 0)if(Array.isArray(q))for(ft=0,vt=tt.length;ft<vt;ft++)for(at=tt[ft],Ht=q[at.materialIndex],V=Math.max(at.start,N.start),It=Math.min(at.start+at.count,N.start+N.count),at=V;at<It;at+=3)V=at,$t=at+1,Xt=at+2,(V=e(this,Ht,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(at/3),G.push(V));else for(V=Math.max(0,N.start),It=Math.min(T.count,N.start+N.count),ft=V,vt=It;ft<vt;ft+=3)V=ft,$t=ft+1,Xt=ft+2,(V=e(this,q,P,n,T,A,V,$t,Xt))&&(V.faceIndex=Math.floor(ft/3),G.push(V))}else if(N.isGeometry){for(T=Array.isArray(q),A=N.vertices,tt=N.faces,V=N.faceVertexUvs[0],0<V.length&&(ot=V),at=0,It=tt.length;at<It;at++)if($t=tt[at],V=T?q[$t.materialIndex]:q,V!==void 0){if(ft=A[$t.a],vt=A[$t.b],Ht=A[$t.c],V.morphTargets===!0){Xt=N.morphTargets;var Qt=this.morphTargetInfluences;o.set(0,0,0),s.set(0,0,0),a.set(0,0,0);for(var re=0,me=Xt.length;re<me;re++){var Ae=Qt[re];if(Ae!==0){var fi=Xt[re].vertices;o.addScaledVector(h.subVectors(fi[$t.a],ft),Ae),s.addScaledVector(l.subVectors(fi[$t.b],vt),Ae),a.addScaledVector(c.subVectors(fi[$t.c],Ht),Ae)}}o.add(ft),s.add(vt),a.add(Ht),ft=o,vt=s,Ht=a}(V=t(this,V,P,n,ft,vt,Ht,x))&&(ot&&ot[at]&&(Xt=ot[at],u.copy(Xt[0]),d.copy(Xt[1]),g.copy(Xt[2]),V.uv=be.getUV(x,ft,vt,Ht,u,d,g,new $)),V.face=$t,V.faceIndex=at,G.push(V))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),_.prototype=Object.create(Ct.prototype),_.prototype.constructor=_,_.prototype.isCubeTexture=!0,Object.defineProperty(_.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),D.prototype=Object.create(Ct.prototype),D.prototype.constructor=D,D.prototype.isDataTexture3D=!0;var pa=new Ct,ch=new D,da=new _,fa=[],ma=[],ga=new Float32Array(16),va=new Float32Array(9),ya=new Float32Array(4);tr.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),J(e,t)},Nr.prototype.setValue=function(t,e,i){for(var n=this.seq,r=0,o=n.length;r!==o;++r){var s=n[r];s.setValue(t,e[s.id],i)}};var bs=/([\w\d_]+)(\])?(\[|\.)?/g;on.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},on.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},on.upload=function(t,e,i,n){for(var r=0,o=e.length;r!==o;++r){var s=e[r],a=i[s.id];a.needsUpdate!==!1&&s.setValue(t,a.value,n)}},on.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var o=t[n];o.id in e&&i.push(o)}return i};var uh=0,ph=0;Tt.prototype=Object.create(fe.prototype),Tt.prototype.constructor=Tt,Tt.prototype.isMeshDepthMaterial=!0,Tt.prototype.copy=function(t){return fe.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},gt.prototype=Object.create(fe.prototype),gt.prototype.constructor=gt,gt.prototype.isMeshDistanceMaterial=!0,gt.prototype.copy=function(t){return fe.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},Pe.prototype=Object.assign(Object.create(b.prototype),{constructor:Pe,isGroup:!0}),Kt.prototype=Object.assign(Object.create(b.prototype),{constructor:Kt,isCamera:!0,copy:function(t,e){return b.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){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new M),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){b.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),Bt.prototype=Object.assign(Object.create(Kt.prototype),{constructor:Bt,isPerspectiveCamera:!0,copy:function(t,e){return Kt.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=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*Se.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Se.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Se.RAD2DEG*Math.atan(Math.tan(.5*Se.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,i,n,r,o){this.aspect=t/e,this.view===null&&(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=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Se.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){var s=o.fullWidth,a=o.fullHeight;r+=o.offsetX*n/s,e-=o.offsetY*i/a,n*=o.width/s,i*=o.height/a}o=this.filmOffset,o!==0&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),te.prototype=Object.assign(Object.create(Bt.prototype),{constructor:te,isArrayCamera:!0});var _a=new M,xa=new M;Jt.prototype.isFogExp2=!0,Jt.prototype.clone=function(){return new Jt(this.color,this.density)},Jt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},yi.prototype.isFog=!0,yi.prototype.clone=function(){return new yi(this.color,this.near,this.far)},yi.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},qi.prototype=Object.assign(Object.create(b.prototype),{constructor:qi,copy:function(t,e){return b.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=b.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(Ge.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(Ge.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=t!==void 0?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,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(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(He.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(He.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,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),We.prototype=Object.create(fe.prototype),We.prototype.constructor=We,We.prototype.isSpriteMaterial=!0,We.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Cr;ei.prototype=Object.assign(Object.create(b.prototype),{constructor:ei,isSprite:!0,raycast:function(){function t(g,x,S,P,G,N){r.subVectors(g,S).addScalar(.5).multiply(P),G!==void 0?(o.x=N*r.x-G*r.y,o.y=G*r.x+N*r.y):o.copy(r),g.copy(x),g.x+=o.x,g.y+=o.y,g.applyMatrix4(s)}var e=new M,i=new M,n=new M,r=new $,o=new $,s=new mt,a=new M,h=new M,l=new M,c=new $,u=new $,d=new $;return function(g,x){i.setFromMatrixScale(this.matrixWorld),s.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var S=this.material.rotation;if(S!==0)var P=Math.cos(S),G=Math.sin(S);S=this.center,t(a.set(-.5,-.5,0),n,S,i,G,P),t(h.set(.5,-.5,0),n,S,i,G,P),t(l.set(.5,.5,0),n,S,i,G,P),c.set(0,0),u.set(1,0),d.set(1,1);var N=g.ray.intersectTriangle(a,h,l,!1,e);N===null&&(t(h.set(-.5,.5,0),n,S,i,G,P),u.set(0,1),N=g.ray.intersectTriangle(a,l,h,!1,e),N===null)||(G=g.ray.origin.distanceTo(e),G<g.near||G>g.far||x.push({distance:G,point:e.clone(),uv:be.getUV(e,a,h,l,c,u,d,new $),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return b.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),ii.prototype=Object.assign(Object.create(b.prototype),{constructor:ii,copy:function(t){b.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new M;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new M,e=new M;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var r=1,o=n.length;r<o&&i>=n[r].distance;r++)n[r-1].object.visible=!1,n[r].object.visible=!0;for(;r<o;r++)n[r].object.visible=!1}}}(),toJSON:function(t){t=b.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var r=e[i];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}),Object.assign(ai.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new mt;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(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 mt,e=new mt;return function(){for(var i=this.bones,n=this.boneInverses,r=this.boneMatrices,o=this.boneTexture,s=0,a=i.length;s<a;s++)t.multiplyMatrices(i[s]?i[s].matrixWorld:e,n[s]),t.toArray(r,16*s);o!==void 0&&(o.needsUpdate=!0)}}(),clone:function(){return new ai(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),hi.prototype=Object.assign(Object.create(b.prototype),{constructor:hi,isBone:!0}),ke.prototype=Object.assign(Object.create(Ke.prototype),{constructor:ke,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],r=new hi;t.push(r),r.name=n.name,r.position.fromArray(n.pos),r.quaternion.fromArray(n.rotq),n.scl!==void 0&&r.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(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;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new Y;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){Ke.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?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)}}),Ne.prototype=Object.create(fe.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isLineBasicMaterial=!0,Ne.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},qe.prototype=Object.assign(Object.create(b.prototype),{constructor:qe,isLine:!0,computeLineDistances:function(){var t=new M,e=new M;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[0],o=1,s=n.count;o<s;o++)t.fromBufferAttribute(n,o-1),e.fromBufferAttribute(n,o),r[o]=r[o-1],r[o]+=t.distanceTo(e);i.addAttribute("lineDistance",new ct(r,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,r[0]=0,o=1,s=n.length;o<s;o++)r[o]=r[o-1],r[o]+=n[o-1].distanceTo(n[o]);return this}}(),raycast:function(){var t=new mt,e=new Ri,i=new Dt;return function(n,r){var o=n.linePrecision,s=this.geometry,a=this.matrixWorld;if(s.boundingSphere===null&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(a),i.radius+=o,n.ray.intersectsSphere(i)!==!1){t.getInverse(a),e.copy(n.ray).applyMatrix4(t),o/=(this.scale.x+this.scale.y+this.scale.z)/3,o*=o;var h=new M,l=new M;a=new M;var c=new M,u=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var d=s.index,g=s.attributes.position.array;if(d!==null){d=d.array,s=0;for(var x=d.length-1;s<x;s+=u){var S=d[s+1];h.fromArray(g,3*d[s]),l.fromArray(g,3*S),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}else for(s=0,x=g.length/3-1;s<x;s+=u)h.fromArray(g,3*s),l.fromArray(g,3*s+3),S=e.distanceSqToSegment(h,l,c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}else if(s.isGeometry)for(h=s.vertices,l=h.length,s=0;s<l-1;s+=u)S=e.distanceSqToSegment(h[s],h[s+1],c,a),S>o||(c.applyMatrix4(this.matrixWorld),S=n.ray.origin.distanceTo(c),S<n.near||S>n.far||r.push({distance:S,point:a.clone().applyMatrix4(this.matrixWorld),index:s,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return b.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),Re.prototype=Object.assign(Object.create(qe.prototype),{constructor:Re,isLineSegments:!0,computeLineDistances:function(){var t=new M,e=new M;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,r=[],o=0,s=n.count;o<s;o+=2)t.fromBufferAttribute(n,o),e.fromBufferAttribute(n,o+1),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);i.addAttribute("lineDistance",new ct(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,r=i.lineDistances,o=0,s=n.length;o<s;o+=2)t.copy(n[o]),e.copy(n[o+1]),r[o]=o===0?0:r[o-1],r[o+1]=r[o]+t.distanceTo(e);return this}}()}),an.prototype=Object.assign(Object.create(qe.prototype),{constructor:an,isLineLoop:!0}),xi.prototype=Object.create(fe.prototype),xi.prototype.constructor=xi,xi.prototype.isPointsMaterial=!0,xi.prototype.copy=function(t){return fe.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},nr.prototype=Object.assign(Object.create(b.prototype),{constructor:nr,isPoints:!0,raycast:function(){var t=new mt,e=new Ri,i=new Dt;return function(n,r){function o(P,G){var N=e.distanceSqToPoint(P);N<c&&(e.closestPointToPoint(P,u),u.applyMatrix4(h),P=n.ray.origin.distanceTo(u),P<n.near||P>n.far||r.push({distance:P,distanceToRay:Math.sqrt(N),point:u.clone(),index:G,face:null,object:s}))}var s=this,a=this.geometry,h=this.matrixWorld,l=n.params.Points.threshold;if(a.boundingSphere===null&&a.computeBoundingSphere(),i.copy(a.boundingSphere),i.applyMatrix4(h),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(h),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3;var c=l*l;l=new M;var u=new M;if(a.isBufferGeometry){var d=a.index;if(a=a.attributes.position.array,d!==null){var g=d.array;d=0;for(var x=g.length;d<x;d++){var S=g[d];l.fromArray(a,3*S),o(l,S)}}else for(d=0,g=a.length/3;d<g;d++)l.fromArray(a,3*d),o(l,d)}else for(l=a.vertices,d=0,g=l.length;d<g;d++)o(l[d],d)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),os.prototype=Object.assign(Object.create(Ct.prototype),{constructor:os,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),rr.prototype=Object.create(Ct.prototype),rr.prototype.constructor=rr,rr.prototype.isCompressedTexture=!0,Ur.prototype=Object.create(Ct.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCanvasTexture=!0,Fr.prototype=Object.create(Ct.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isDepthTexture=!0,or.prototype=Object.create(Rt.prototype),or.prototype.constructor=or,Gr.prototype=Object.create(F.prototype),Gr.prototype.constructor=Gr,sr.prototype=Object.create(Rt.prototype),sr.prototype.constructor=sr,Hr.prototype=Object.create(F.prototype),Hr.prototype.constructor=Hr,Di.prototype=Object.create(Rt.prototype),Di.prototype.constructor=Di,kr.prototype=Object.create(F.prototype),kr.prototype.constructor=kr,ar.prototype=Object.create(Di.prototype),ar.prototype.constructor=ar,Vr.prototype=Object.create(F.prototype),Vr.prototype.constructor=Vr,Dn.prototype=Object.create(Di.prototype),Dn.prototype.constructor=Dn,jr.prototype=Object.create(F.prototype),jr.prototype.constructor=jr,hr.prototype=Object.create(Di.prototype),hr.prototype.constructor=hr,Wr.prototype=Object.create(F.prototype),Wr.prototype.constructor=Wr,lr.prototype=Object.create(Di.prototype),lr.prototype.constructor=lr,Xr.prototype=Object.create(F.prototype),Xr.prototype.constructor=Xr,cr.prototype=Object.create(Rt.prototype),cr.prototype.constructor=cr,qr.prototype=Object.create(F.prototype),qr.prototype.constructor=qr,ur.prototype=Object.create(Rt.prototype),ur.prototype.constructor=ur,Yr.prototype=Object.create(F.prototype),Yr.prototype.constructor=Yr,pr.prototype=Object.create(Rt.prototype),pr.prototype.constructor=pr;var dh={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,r=n?e[0]*i:t.length,o=Vs(t,0,r,i,!0),s=[];if(!o)return s;var a;if(n){var h=i;n=[];var l,c=0;for(l=e.length;c<l;c++){var u=e[c]*h,d=c<l-1?e[c+1]*h:t.length;u=Vs(t,u,d,h,!1),u===u.next&&(u.steiner=!0),n.push(eh(u))}for(n.sort(Ka),c=0;c<n.length;c++)e=n[c],h=o,(h=th(e,h))&&(e=Ws(h,e),Zr(e,e.next)),o=Zr(o,o.next)}if(t.length>80*i){var g=a=t[0],x=n=t[1];for(h=i;h<r;h+=i)c=t[h],e=t[h+1],c<g&&(g=c),e<x&&(x=e),c>a&&(a=c),e>n&&(n=e);a=Math.max(a-g,n-x),a=a!==0?1/a:0}return Jr(o,s,i,g,x,a),s}},wn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return .5*i},isClockWise:function(t){return 0>wn.area(t)},triangulateShape:function(t,e){var i=[],n=[],r=[];qs(t),Ys(i,t);var o=t.length;for(e.forEach(qs),t=0;t<e.length;t++)n.push(o),o+=e[t].length,Ys(i,e[t]);for(e=dh.triangulate(i,n),t=0;t<e.length;t+=3)r.push(e.slice(t,t+3));return r}};Nn.prototype=Object.create(F.prototype),Nn.prototype.constructor=Nn,Nn.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)},hn.prototype=Object.create(Rt.prototype),hn.prototype.constructor=hn,hn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Zs(this.parameters.shapes,this.parameters.options,t)};var fh={generateTopUV:function(t,e,i,n,r){t=e[3*n],n=e[3*n+1];var o=e[3*r];return r=e[3*r+1],[new $(e[3*i],e[3*i+1]),new $(t,n),new $(o,r)]},generateSideWallUV:function(t,e,i,n,r,o){t=e[3*i];var s=e[3*i+1];i=e[3*i+2];var a=e[3*n],h=e[3*n+1];n=e[3*n+2];var l=e[3*r],c=e[3*r+1];r=e[3*r+2];var u=e[3*o],d=e[3*o+1];return e=e[3*o+2],.01>Math.abs(s-h)?[new $(t,1-i),new $(a,1-n),new $(l,1-r),new $(u,1-e)]:[new $(s,1-i),new $(h,1-n),new $(c,1-r),new $(d,1-e)]}};Kr.prototype=Object.create(F.prototype),Kr.prototype.constructor=Kr,dr.prototype=Object.create(hn.prototype),dr.prototype.constructor=dr,to.prototype=Object.create(F.prototype),to.prototype.constructor=to,Bn.prototype=Object.create(Rt.prototype),Bn.prototype.constructor=Bn,eo.prototype=Object.create(F.prototype),eo.prototype.constructor=eo,fr.prototype=Object.create(Rt.prototype),fr.prototype.constructor=fr,io.prototype=Object.create(F.prototype),io.prototype.constructor=io,mr.prototype=Object.create(Rt.prototype),mr.prototype.constructor=mr,Un.prototype=Object.create(F.prototype),Un.prototype.constructor=Un,Un.prototype.toJSON=function(){var t=F.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},Fn.prototype=Object.create(Rt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.toJSON=function(){var t=Rt.prototype.toJSON.call(this);return Js(this.parameters.shapes,t)},gr.prototype=Object.create(Rt.prototype),gr.prototype.constructor=gr,Gn.prototype=Object.create(F.prototype),Gn.prototype.constructor=Gn,vn.prototype=Object.create(Rt.prototype),vn.prototype.constructor=vn,no.prototype=Object.create(Gn.prototype),no.prototype.constructor=no,ro.prototype=Object.create(vn.prototype),ro.prototype.constructor=ro,oo.prototype=Object.create(F.prototype),oo.prototype.constructor=oo,vr.prototype=Object.create(Rt.prototype),vr.prototype.constructor=vr;var Ni=Object.freeze({WireframeGeometry:or,ParametricGeometry:Gr,ParametricBufferGeometry:sr,TetrahedronGeometry:kr,TetrahedronBufferGeometry:ar,OctahedronGeometry:Vr,OctahedronBufferGeometry:Dn,IcosahedronGeometry:jr,IcosahedronBufferGeometry:hr,DodecahedronGeometry:Wr,DodecahedronBufferGeometry:lr,PolyhedronGeometry:Hr,PolyhedronBufferGeometry:Di,TubeGeometry:Xr,TubeBufferGeometry:cr,TorusKnotGeometry:qr,TorusKnotBufferGeometry:ur,TorusGeometry:Yr,TorusBufferGeometry:pr,TextGeometry:Kr,TextBufferGeometry:dr,SphereGeometry:to,SphereBufferGeometry:Bn,RingGeometry:eo,RingBufferGeometry:fr,PlaneGeometry:Ti,PlaneBufferGeometry:oi,LatheGeometry:io,LatheBufferGeometry:mr,ShapeGeometry:Un,ShapeBufferGeometry:Fn,ExtrudeGeometry:Nn,ExtrudeBufferGeometry:hn,EdgesGeometry:gr,ConeGeometry:no,ConeBufferGeometry:ro,CylinderGeometry:Gn,CylinderBufferGeometry:vn,CircleGeometry:oo,CircleBufferGeometry:vr,BoxGeometry:Fe,BoxBufferGeometry:vi});Hn.prototype=Object.create(fe.prototype),Hn.prototype.constructor=Hn,Hn.prototype.isShadowMaterial=!0,Hn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.color.copy(t.color),this},yr.prototype=Object.create(Je.prototype),yr.prototype.constructor=yr,yr.prototype.isRawShaderMaterial=!0,ln.prototype=Object.create(fe.prototype),ln.prototype.constructor=ln,ln.prototype.isMeshStandardMaterial=!0,ln.prototype.copy=function(t){return fe.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},kn.prototype=Object.create(ln.prototype),kn.prototype.constructor=kn,kn.prototype.isMeshPhysicalMaterial=!0,kn.prototype.copy=function(t){return ln.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Yi.prototype=Object.create(fe.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isMeshPhongMaterial=!0,Yi.prototype.copy=function(t){return fe.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},Vn.prototype=Object.create(Yi.prototype),Vn.prototype.constructor=Vn,Vn.prototype.isMeshToonMaterial=!0,Vn.prototype.copy=function(t){return Yi.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},jn.prototype=Object.create(fe.prototype),jn.prototype.constructor=jn,jn.prototype.isMeshNormalMaterial=!0,jn.prototype.copy=function(t){return fe.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},Wn.prototype=Object.create(fe.prototype),Wn.prototype.constructor=Wn,Wn.prototype.isMeshLambertMaterial=!0,Wn.prototype.copy=function(t){return fe.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},Xn.prototype=Object.create(fe.prototype),Xn.prototype.constructor=Xn,Xn.prototype.isMeshMatcapMaterial=!0,Xn.prototype.copy=function(t){return fe.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,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.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},qn.prototype=Object.create(Ne.prototype),qn.prototype.constructor=qn,qn.prototype.isLineDashedMaterial=!0,qn.prototype.copy=function(t){return Ne.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var mh=Object.freeze({ShadowMaterial:Hn,SpriteMaterial:We,RawShaderMaterial:yr,ShaderMaterial:Je,PointsMaterial:xi,MeshPhysicalMaterial:kn,MeshStandardMaterial:ln,MeshPhongMaterial:Yi,MeshToonMaterial:Vn,MeshNormalMaterial:jn,MeshLambertMaterial:Wn,MeshDepthMaterial:Tt,MeshDistanceMaterial:gt,MeshBasicMaterial:Ve,MeshMatcapMaterial:Xn,LineDashedMaterial:qn,LineBasicMaterial:Ne,Material:fe}),Ai={arraySlice:function(t,e,i){return Ai.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?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,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(r,o){return t[r]-t[o]}),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),o=0,s=0;s!==n;++o)for(var a=i[o]*e,h=0;h!==e;++h)r[s++]=t[a+h];return r},flattenJSON:function(t,e,i,n){for(var r=1,o=t[0];o!==void 0&&o[n]===void 0;)o=t[r++];if(o!==void 0){var s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),i.push.apply(i,s)),o=t[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(i,i.length)),o=t[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),i.push(s)),o=t[r++];while(o!==void 0)}}};Object.assign(Hi.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var o=i+2;;){if(n===void 0){if(t<r)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=r)break t;for(o=e[1],t<o&&(i=2,r=o),o=i-2;;){if(r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,r=e[--i-1],t>=r)break e}n=i,i=0}for(;i<n;)r=i+n>>>1,t<e[r]?n=r:i=r+1;if(n=e[i],r=e[i-1],r===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var r=0;r!==n;++r)e[r]=i[t+r];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Hi.prototype,{beforeStart_:Hi.prototype.copySampleValue_,afterEnd_:Hi.prototype.copySampleValue_}),Ao.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Ao,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,o=t+1,s=n[r],a=n[o];if(s===void 0)switch(this.getSettings_().endingStart){case 2401:r=t,s=2*e-i;break;case 2402:r=n.length-2,s=e+n[r]-n[r+1];break;default:r=t,s=i}if(a===void 0)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*i-e;break;case 2402:o=1,a=i+n[1]-n[0];break;default:o=t-1,a=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-s),this._weightNext=t/(a-i),this._offsetPrev=r*n,this._offsetNext=o*n},interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s,h=this._offsetPrev,l=this._offsetNext,c=this._weightPrev,u=this._weightNext,d=(i-e)/(n-e);for(i=d*d,n=i*d,e=-c*n+2*c*i-c*d,c=(1+c)*n+(-1.5-2*c)*i+(-.5+c)*d+1,d=(-1-u)*n+(1.5+u)*i+.5*d,u=u*n-u*i,i=0;i!==s;++i)r[i]=e*o[h+i]+c*o[a+i]+d*o[t+i]+u*o[l+i];return r}}),so.prototype=Object.assign(Object.create(Hi.prototype),{constructor:so,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;t*=s;var a=t-s;for(e=(i-e)/(n-e),i=1-e,n=0;n!==s;++n)r[n]=o[a+n]*i+o[t+n]*e;return r}}),Lo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:Lo,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(wi,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Ai.convertArray(t.times,Array),values:Ai.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(wi.prototype,{constructor:wi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Lo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new so(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Ao(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,o=n-1;r!==n&&i[r]<t;)++r;for(;o!==-1&&i[o]>e;)--o;return++o,(r!==0||o!==n)&&(r>=o&&(o=Math.max(o,1),r=o-1),t=this.getValueSize(),this.times=Ai.arraySlice(i,r,o),this.values=Ai.arraySlice(this.values,r*t,o*t)),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 i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var r=null,o=0;o!==n;o++){var s=i[o];if(typeof s=="number"&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(r!==null&&r>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,r),t=!1;break}r=s}if(e!==void 0&&Ai.isTypedArray(e)){for(o=0,i=e.length;o!==i;++o)if(n=e[o],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,r=1,o=t.length-1,s=1;s<o;++s){var a=!1,h=t[s];if(h!==t[s+1]&&(s!==1||h!==h[0]))if(n)a=!0;else{var l=s*i,c=l-i,u=l+i;for(h=0;h!==i;++h){var d=e[l+h];if(d!==e[c+h]||d!==e[u+h]){a=!0;break}}}if(a){if(s!==r)for(t[r]=t[s],a=s*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}}if(0<o){for(t[r]=t[o],a=o*i,l=r*i,h=0;h!==i;++h)e[l+h]=e[a+h];++r}return r!==t.length&&(this.times=Ai.arraySlice(t,0,r),this.values=Ai.arraySlice(e,0,r*i)),this}}),Ro.prototype=Object.assign(Object.create(wi.prototype),{constructor:Ro,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Co.prototype=Object.assign(Object.create(wi.prototype),{constructor:Co,ValueTypeName:"color"}),_r.prototype=Object.assign(Object.create(wi.prototype),{constructor:_r,ValueTypeName:"number"}),bo.prototype=Object.assign(Object.create(Hi.prototype),{constructor:bo,interpolate_:function(t,e,i,n){var r=this.resultBuffer,o=this.sampleValues,s=this.valueSize;for(t*=s,e=(i-e)/(n-e),i=t+s;t!==i;t+=4)ht.slerpFlat(r,0,o,t-s,o,t,e);return r}}),ao.prototype=Object.assign(Object.create(wi.prototype),{constructor:ao,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new bo(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Oo.prototype=Object.assign(Object.create(wi.prototype),{constructor:Oo,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),xr.prototype=Object.assign(Object.create(wi.prototype),{constructor:xr,ValueTypeName:"vector"}),Object.assign(ki,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,o=i.length;r!==o;++r)e.push(nh(i[r]).scale(n));return new ki(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,r=i.length;n!==r;++n)e.push(wi.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,o=[],s=0;s<r;s++){var a=[],h=[];a.push((s+r-1)%r,s,(s+1)%r),h.push(0,1,0);var l=Ai.getKeyframeOrder(a);a=Ai.sortedArray(a,1,l),h=Ai.sortedArray(h,1,l),n||a[0]!==0||(a.push(r),h.push(h[0])),o.push(new _r(".morphTargetInfluences["+e[s].name+"]",a,h).scale(1/i))}return new ki(t,-1,o)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,o=0,s=t.length;o<s;o++){var a=t[o],h=a.name.match(r);if(h&&1<h.length){var l=h[1];(h=n[l])||(n[l]=h=[]),h.push(a)}}t=[];for(l in n)t.push(ki.CreateFromMorphTargetSequence(l,n[l],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(S,P,G,N,q){if(G.length!==0){var V=[],ot=[];Ai.flattenJSON(G,V,ot,N),V.length!==0&&q.push(new S(P,V,ot))}},n=[],r=t.name||"default",o=t.length||-1,s=t.fps||30;t=t.hierarchy||[];for(var a=0;a<t.length;a++){var h=t[a].keys;if(h&&h.length!==0)if(h[0].morphTargets){o={};for(var l=0;l<h.length;l++)if(h[l].morphTargets)for(var c=0;c<h[l].morphTargets.length;c++)o[h[l].morphTargets[c]]=-1;for(var u in o){var d=[],g=[];for(c=0;c!==h[l].morphTargets.length;++c){var x=h[l];d.push(x.time),g.push(x.morphTarget===u?1:0)}n.push(new _r(".morphTargetInfluence["+u+"]",d,g))}o=o.length*(s||1)}else l=".bones["+e[a].name+"]",i(xr,l+".position",h,"pos",n),i(ao,l+".quaternion",h,"rot",n),i(xr,l+".scale",h,"scl",n)}return n.length===0?null:new ki(r,o,n)}}),Object.assign(ki.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.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}});var Zn={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Oi=new hs,tn={};Object.assign(Xi.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;if(tn[t]!==void 0)tn[t].push({onLoad:e,onProgress:i,onError:n});else{var s=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){i=s[1];var a=!!s[2];s=s[3],s=decodeURIComponent(s),a&&(s=atob(s));try{var h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":var l=new Uint8Array(s.length);for(a=0;a<s.length;a++)l[a]=s.charCodeAt(a);var c=h==="blob"?new Blob([l.buffer],{type:i}):l.buffer;break;case"document":c=new DOMParser().parseFromString(s,i);break;case"json":c=JSON.parse(s);break;default:c=s}setTimeout(function(){e&&e(c),r.manager.itemEnd(t)},0)}catch(d){setTimeout(function(){n&&n(d),r.manager.itemError(t),r.manager.itemEnd(t)},0)}}else{tn[t]=[],tn[t].push({onLoad:e,onProgress:i,onError:n});var u=new XMLHttpRequest;u.open("GET",t,!0),u.addEventListener("load",function(d){var g=this.response;Zn.add(t,g);var x=tn[t];if(delete tn[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var S=0,P=x.length;S<P;S++){var G=x[S];G.onLoad&&G.onLoad(g)}}else{for(S=0,P=x.length;S<P;S++)G=x[S],G.onError&&G.onError(d);r.manager.itemError(t)}r.manager.itemEnd(t)},!1),u.addEventListener("progress",function(d){for(var g=tn[t],x=0,S=g.length;x<S;x++){var P=g[x];P.onProgress&&P.onProgress(d)}},!1),u.addEventListener("error",function(d){var g=tn[t];delete tn[t];for(var x=0,S=g.length;x<S;x++){var P=g[x];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),u.addEventListener("abort",function(d){var g=tn[t];delete tn[t];for(var x=0,S=g.length;x<S;x++){var P=g[x];P.onError&&P.onError(d)}r.manager.itemError(t),r.manager.itemEnd(t)},!1),this.responseType!==void 0&&(u.responseType=this.responseType),this.withCredentials!==void 0&&(u.withCredentials=this.withCredentials),u.overrideMimeType&&u.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(a in this.requestHeader)u.setRequestHeader(a,this.requestHeader[a]);u.send(null)}return r.manager.itemStart(t),u}},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(Qs.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var r=ki.parse(t[n]);i.push(r)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign($s.prototype,{load:function(t,e,i,n){function r(d){h.load(t[d],function(g){g=o._parser(g,!0),s[d]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},l+=1,l===6&&(g.mipmapCount===1&&(a.minFilter=1006),a.format=g.format,a.needsUpdate=!0,e&&e(a))},i,n)}var o=this,s=[],a=new rr;a.image=s;var h=new Xi(this.manager);if(h.setPath(this.path),h.setResponseType("arraybuffer"),Array.isArray(t))for(var l=0,c=0,u=t.length;c<u;++c)r(c);else h.load(t,function(d){if(d=o._parser(d,!0),d.isCubemap)for(var g=d.mipmaps.length/d.mipmapCount,x=0;x<g;x++){s[x]={mipmaps:[]};for(var S=0;S<d.mipmapCount;S++)s[x].mipmaps.push(d.mipmaps[x*d.mipmapCount+S]),s[x].format=d.format,s[x].width=d.width,s[x].height=d.height}else a.image.width=d.width,a.image.height=d.height,a.mipmaps=d.mipmaps;d.mipmapCount===1&&(a.minFilter=1006),a.format=d.format,a.needsUpdate=!0,e&&e(a)},i,n);return a},setPath:function(t){return this.path=t,this}}),Object.assign(ls.prototype,{load:function(t,e,i,n){var r=this,o=new ut,s=new Xi(this.manager);return s.setResponseType("arraybuffer"),s.setPath(this.path),s.load(t,function(a){(a=r._parser(a))&&(a.image!==void 0?o.image=a.image:a.data!==void 0&&(o.image.width=a.width,o.image.height=a.height,o.image.data=a.data),o.wrapS=a.wrapS!==void 0?a.wrapS:1001,o.wrapT=a.wrapT!==void 0?a.wrapT:1001,o.magFilter=a.magFilter!==void 0?a.magFilter:1006,o.minFilter=a.minFilter!==void 0?a.minFilter:1008,o.anisotropy=a.anisotropy!==void 0?a.anisotropy:1,a.format!==void 0&&(o.format=a.format),a.type!==void 0&&(o.type=a.type),a.mipmaps!==void 0&&(o.mipmaps=a.mipmaps),a.mipmapCount===1&&(o.minFilter=1006),o.needsUpdate=!0,e&&e(o,a))},i,n),o},setPath:function(t){return this.path=t,this}}),Object.assign(ho.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),Zn.add(t,this),e&&e(this),s.manager.itemEnd(t)}function o(l){h.removeEventListener("load",r,!1),h.removeEventListener("error",o,!1),n&&n(l),s.manager.itemError(t),s.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,a=Zn.get(t);if(a!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(a),s.manager.itemEnd(t)},0),a;var h=document.createElementNS("http://www.w3.org/1999/xhtml","img");return h.addEventListener("load",r,!1),h.addEventListener("error",o,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),s.manager.itemStart(t),h.src=t,h},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(cs.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function r(h){s.load(t[h],function(l){o.images[h]=l,a++,a===6&&(o.needsUpdate=!0,e&&e(o))},void 0,n)}var o=new _,s=new ho(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);var a=0;for(i=0;i<t.length;++i)r(i);return o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Io.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=new Ct,o=new ho(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,function(s){r.image=s,s=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,r.format=s?1022:1023,r.needsUpdate=!0,e!==void 0&&e(r)},i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(pe.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,r=0;for(e.push(0),n=1;n<=t;n++){var o=this.getPoint(n/t);r+=o.distanceTo(i),e.push(r),i=o}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var r=0,o=n-1,s;r<=o;)if(t=Math.floor(r+(o-r)/2),s=i[t]-e,0>s)r=t+1;else if(0<s)o=t-1;else{o=t;break}return t=o,i[t]===e?t/(n-1):(r=i[t],(t+(e-r)/(i[t+1]-r))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new M,n=[],r=[],o=[],s=new M,a=new mt,h;for(h=0;h<=t;h++){var l=h/t;n[h]=this.getTangentAt(l),n[h].normalize()}r[0]=new M,o[0]=new M,h=Number.MAX_VALUE,l=Math.abs(n[0].x);var c=Math.abs(n[0].y),u=Math.abs(n[0].z);for(l<=h&&(h=l,i.set(1,0,0)),c<=h&&(h=c,i.set(0,1,0)),u<=h&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],s),o[0].crossVectors(n[0],r[0]),h=1;h<=t;h++)r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),s.crossVectors(n[h-1],n[h]),s.length()>Number.EPSILON&&(s.normalize(),i=Math.acos(Se.clamp(n[h-1].dot(n[h]),-1,1)),r[h].applyMatrix4(a.makeRotationAxis(s,i))),o[h].crossVectors(n[h],r[h]);if(e===!0)for(i=Math.acos(Se.clamp(r[0].dot(r[t]),-1,1)),i/=t,0<n[0].dot(s.crossVectors(r[0],r[t]))&&(i=-i),h=1;h<=t;h++)r[h].applyMatrix4(a.makeRotationAxis(n[h],i*h)),o[h].crossVectors(n[h],r[h]);return{tangents:n,normals:r,binormals:o}},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}}),Vi.prototype=Object.create(pe.prototype),Vi.prototype.constructor=Vi,Vi.prototype.isEllipseCurve=!0,Vi.prototype.getPoint=function(t,e){e=e||new $;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this.aClockwise!==!0||r||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var o=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),r=t-this.aX,o-=this.aY,t=r*i-o*n+this.aX,o=r*n+o*i+this.aY),e.set(t,o)},Vi.prototype.copy=function(t){return pe.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},Vi.prototype.toJSON=function(){var t=pe.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},Vi.prototype.fromJSON=function(t){return pe.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},wr.prototype=Object.create(Vi.prototype),wr.prototype.constructor=wr,wr.prototype.isArcCurve=!0;var Xo=new M,Os=new us,Is=new us,Ds=new us;Ei.prototype=Object.create(pe.prototype),Ei.prototype.constructor=Ei,Ei.prototype.isCatmullRomCurve3=!0,Ei.prototype.getPoint=function(t,e){e=e||new M;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var r=Math.floor(t);if(t-=r,this.closed?r+=0<r?0:(Math.floor(Math.abs(r)/n)+1)*n:t===0&&r===n-1&&(r=n-2,t=1),this.closed||0<r)var o=i[(r-1)%n];else Xo.subVectors(i[0],i[1]).add(i[0]),o=Xo;var s=i[r%n],a=i[(r+1)%n];if(this.closed||r+2<n?i=i[(r+2)%n]:(Xo.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=Xo),this.curveType==="centripetal"||this.curveType==="chordal"){var h=this.curveType==="chordal"?.5:.25;n=Math.pow(o.distanceToSquared(s),h),r=Math.pow(s.distanceToSquared(a),h),h=Math.pow(a.distanceToSquared(i),h),1e-4>r&&(r=1),1e-4>n&&(n=r),1e-4>h&&(h=r),Os.initNonuniformCatmullRom(o.x,s.x,a.x,i.x,n,r,h),Is.initNonuniformCatmullRom(o.y,s.y,a.y,i.y,n,r,h),Ds.initNonuniformCatmullRom(o.z,s.z,a.z,i.z,n,r,h)}else this.curveType==="catmullrom"&&(Os.initCatmullRom(o.x,s.x,a.x,i.x,this.tension),Is.initCatmullRom(o.y,s.y,a.y,i.y,this.tension),Ds.initCatmullRom(o.z,s.z,a.z,i.z,this.tension));return e.set(Os.calc(t),Is.calc(t),Ds.calc(t)),e},Ei.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ei.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ei.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new M().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Zi.prototype=Object.create(pe.prototype),Zi.prototype.constructor=Zi,Zi.prototype.isCubicBezierCurve=!0,Zi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y)),e},Zi.prototype.copy=function(t){return pe.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},Zi.prototype.toJSON=function(){var t=pe.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},Zi.prototype.fromJSON=function(t){return pe.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},cn.prototype=Object.create(pe.prototype),cn.prototype.constructor=cn,cn.prototype.isCubicBezierCurve3=!0,cn.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2,o=this.v3;return e.set(co(t,i.x,n.x,r.x,o.x),co(t,i.y,n.y,r.y,o.y),co(t,i.z,n.z,r.z,o.z)),e},cn.prototype.copy=function(t){return pe.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},cn.prototype.toJSON=function(){var t=pe.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},cn.prototype.fromJSON=function(t){return pe.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},zi.prototype=Object.create(pe.prototype),zi.prototype.constructor=zi,zi.prototype.isLineCurve=!0,zi.prototype.getPoint=function(t,e){return e=e||new $,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zi.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zi.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},zi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Ji.prototype=Object.create(pe.prototype),Ji.prototype.constructor=Ji,Ji.prototype.isLineCurve3=!0,Ji.prototype.getPoint=function(t,e){return e=e||new M,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},Ji.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Ji.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Ji.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Ji.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Qi.prototype=Object.create(pe.prototype),Qi.prototype.constructor=Qi,Qi.prototype.isQuadraticBezierCurve=!0,Qi.prototype.getPoint=function(t,e){e=e||new $;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y)),e},Qi.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Qi.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Qi.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},un.prototype=Object.create(pe.prototype),un.prototype.constructor=un,un.prototype.isQuadraticBezierCurve3=!0,un.prototype.getPoint=function(t,e){e=e||new M;var i=this.v0,n=this.v1,r=this.v2;return e.set(lo(t,i.x,n.x,r.x),lo(t,i.y,n.y,r.y),lo(t,i.z,n.z,r.z)),e},un.prototype.copy=function(t){return pe.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},un.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},un.prototype.fromJSON=function(t){return pe.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},$i.prototype=Object.create(pe.prototype),$i.prototype.constructor=$i,$i.prototype.isSplineCurve=!0,$i.prototype.getPoint=function(t,e){e=e||new $;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var r=i[t===0?t:t-1],o=i[t],s=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Ks(n,r.x,o.x,s.x,i.x),Ks(n,r.y,o.y,s.y,i.y)),e},$i.prototype.copy=function(t){pe.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},$i.prototype.toJSON=function(){var t=pe.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},$i.prototype.fromJSON=function(t){pe.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new $().fromArray(n))}return this};var wa=Object.freeze({ArcCurve:wr,CatmullRomCurve3:Ei,CubicBezierCurve:Zi,CubicBezierCurve3:cn,EllipseCurve:Vi,LineCurve:zi,LineCurve3:Ji,QuadraticBezierCurve:Qi,QuadraticBezierCurve3:un,SplineCurve:$i});yn.prototype=Object.assign(Object.create(pe.prototype),{constructor:yn,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 zi(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}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,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,r=this.curves;n<r.length;n++){var o=r[n];o=o.getPoints(o&&o.isEllipseCurve?2*t:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?t*o.points.length:t);for(var s=0;s<o.length;s++){var a=o[s];i&&i.equals(a)||(e.push(a),i=a)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){pe.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=pe.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){pe.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new wa[n.type]().fromJSON(n))}return this}}),Ki.prototype=Object.assign(Object.create(yn.prototype),{constructor:Ki,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new zi(this.currentPoint.clone(),new $(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new Qi(this.currentPoint.clone(),new $(t,e),new $(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,o){t=new Zi(this.currentPoint.clone(),new $(t,e),new $(i,n),new $(r,o)),this.curves.push(t),this.currentPoint.set(r,o)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new $i(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,o){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o)},absarc:function(t,e,i,n,r,o){this.absellipse(t,e,i,i,n,r,o)},ellipse:function(t,e,i,n,r,o,s,a){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,r,o,s,a)},absellipse:function(t,e,i,n,r,o,s,a){t=new Vi(t,e,i,n,r,o,s,a),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return yn.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=yn.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return yn.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Pn.prototype=Object.assign(Object.create(Ki.prototype),{constructor:Pn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Ki.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=Ki.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){Ki.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new Ki().fromJSON(n))}return this}}),ri.prototype=Object.assign(Object.create(b.prototype),{constructor:ri,isLight:!0,copy:function(t){return b.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),Do.prototype=Object.assign(Object.create(ri.prototype),{constructor:Do,isHemisphereLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Yn.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 this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),zo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:zo,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*Se.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),No.prototype=Object.assign(Object.create(ri.prototype),{constructor:No,isSpotLight:!0,copy:function(t){return ri.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}}),Bo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Bo,isPointLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),uo.prototype=Object.assign(Object.create(Kt.prototype),{constructor:uo,isOrthographicCamera:!0,copy:function(t,e){return Kt.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=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,o){this.view===null&&(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=i,this.view.offsetY=n,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(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),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var o=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,r+=this.view.offsetX/i*o,i=r+this.view.width/i*o,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(r,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=b.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),Uo.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Uo}),Fo.prototype=Object.assign(Object.create(ri.prototype),{constructor:Fo,isDirectionalLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Go.prototype=Object.assign(Object.create(ri.prototype),{constructor:Go,isAmbientLight:!0}),Ho.prototype=Object.assign(Object.create(ri.prototype),{constructor:Ho,isRectAreaLight:!0,copy:function(t){return ri.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=ri.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(ko.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){function e(s){return i[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),i[s]}var i=this.textures,n=new mh[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var r in t.uniforms){var o=t.uniforms[r];switch(n.uniforms[r]={},o.type){case"t":n.uniforms[r].value=e(o.value);break;case"c":n.uniforms[r].value=new H().setHex(o.value);break;case"v2":n.uniforms[r].value=new $().fromArray(o.value);break;case"v3":n.uniforms[r].value=new M().fromArray(o.value);break;case"v4":n.uniforms[r].value=new Y().fromArray(o.value);break;case"m4":n.uniforms[r].value=new mt().fromArray(o.value);break;default:n.uniforms[r].value=o.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(r=t.normalScale,Array.isArray(r)===!1&&(r=[r,r]),n.normalScale=new $().fromArray(r)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var qo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(ps.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(r.manager);o.setPath(r.path),o.load(t,function(s){e(r.parse(JSON.parse(s)))},i,n)},parse:function(t){var e=new Rt,i=t.data.index;i!==void 0&&(i=new Ma[i.type](i.array),e.setIndex(new Z(i,1)));var n=t.data.attributes;for(o in n){var r=n[o];i=new Ma[r.type](r.array),e.addAttribute(o,new Z(i,r.itemSize,r.normalized))}var o=t.data.groups||t.data.drawcalls||t.data.offsets;if(o!==void 0)for(i=0,n=o.length;i!==n;++i)r=o[i],e.addGroup(r.start,r.count,r.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(o=new M,t.center!==void 0&&o.fromArray(t.center),e.boundingSphere=new Dt(o,t.radius)),e},setPath:function(t){return this.path=t,this}});var Ma={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Mr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i+1];if(e[i].test(t))return r}return null}},Object.assign(Mr.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new H,i=new Io,n=new ko;return function(r,o,s){function a(d,g,x,S,P){d=o+d;var G=Mr.Handlers.get(d);return G!==null?d=G.load(d):(i.setCrossOrigin(s),d=i.load(d)),g!==void 0&&(d.repeat.fromArray(g),g[0]!==1&&(d.wrapS=1e3),g[1]!==1&&(d.wrapT=1e3)),x!==void 0&&d.offset.fromArray(x),S!==void 0&&(S[0]==="repeat"&&(d.wrapS=1e3),S[0]==="mirror"&&(d.wrapS=1002),S[1]==="repeat"&&(d.wrapT=1e3),S[1]==="mirror"&&(d.wrapT=1002)),P!==void 0&&(d.anisotropy=P),g=Se.generateUUID(),h[g]=d,g}var h={},l={uuid:Se.generateUUID(),type:"MeshLambertMaterial"},c;for(c in r){var u=r[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":l.name=u;break;case"blending":l.blending=t[u];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":l.color=e.fromArray(u).getHex();break;case"colorSpecular":l.specular=e.fromArray(u).getHex();break;case"colorEmissive":l.emissive=e.fromArray(u).getHex();break;case"specularCoef":l.shininess=u;break;case"shading":u.toLowerCase()==="basic"&&(l.type="MeshBasicMaterial"),u.toLowerCase()==="phong"&&(l.type="MeshPhongMaterial"),u.toLowerCase()==="standard"&&(l.type="MeshStandardMaterial");break;case"mapDiffuse":l.map=a(u,r.mapDiffuseRepeat,r.mapDiffuseOffset,r.mapDiffuseWrap,r.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":l.emissiveMap=a(u,r.mapEmissiveRepeat,r.mapEmissiveOffset,r.mapEmissiveWrap,r.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":l.lightMap=a(u,r.mapLightRepeat,r.mapLightOffset,r.mapLightWrap,r.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":l.aoMap=a(u,r.mapAORepeat,r.mapAOOffset,r.mapAOWrap,r.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":l.bumpMap=a(u,r.mapBumpRepeat,r.mapBumpOffset,r.mapBumpWrap,r.mapBumpAnisotropy);break;case"mapBumpScale":l.bumpScale=u;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":l.normalMap=a(u,r.mapNormalRepeat,r.mapNormalOffset,r.mapNormalWrap,r.mapNormalAnisotropy);break;case"mapNormalFactor":l.normalScale=u;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":l.specularMap=a(u,r.mapSpecularRepeat,r.mapSpecularOffset,r.mapSpecularWrap,r.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":l.metalnessMap=a(u,r.mapMetalnessRepeat,r.mapMetalnessOffset,r.mapMetalnessWrap,r.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":l.roughnessMap=a(u,r.mapRoughnessRepeat,r.mapRoughnessOffset,r.mapRoughnessWrap,r.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":l.alphaMap=a(u,r.mapAlphaRepeat,r.mapAlphaOffset,r.mapAlphaWrap,r.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":l.side=1;break;case"doubleSided":l.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),l.opacity=u;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":l[c]=u;break;case"vertexColors":u===!0&&(l.vertexColors=2),u==="face"&&(l.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,u)}}return l.type==="MeshBasicMaterial"&&delete l.emissive,l.type!=="MeshPhongMaterial"&&delete l.specular,1>l.opacity&&(l.transparent=!0),n.setTextures(h),n.parse(l)}}()}),Object.assign(Vo.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path,s=new Xi(this.manager);s.setPath(this.path),s.setWithCredentials(this.withCredentials),s.load(t,function(a){a=JSON.parse(a);var h=a.metadata;if(h!==void 0&&(h=h.type,h!==void 0&&h.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}a=r.parse(a,o),e(a.geometry,a.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new F,n=t,r,o,s,a=n.faces,h=n.vertices,l=n.normals,c=n.colors,u=n.scale,d=0;if(n.uvs!==void 0){for(r=0;r<n.uvs.length;r++)n.uvs[r].length&&d++;for(r=0;r<d;r++)i.faceVertexUvs[r]=[]}var g=0;for(s=h.length;g<s;)r=new M,r.x=h[g++]*u,r.y=h[g++]*u,r.z=h[g++]*u,i.vertices.push(r);for(g=0,s=a.length;g<s;){h=a[g++];var x=h&1,S=h&2;r=h&8;var P=h&16,G=h&32;if(u=h&64,h&=128,x){x=new O,x.a=a[g],x.b=a[g+1],x.c=a[g+3];var N=new O;if(N.a=a[g+1],N.b=a[g+2],N.c=a[g+3],g+=4,S&&(S=a[g++],x.materialIndex=S,N.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++){var q=n.uvs[r];for(i.faceVertexUvs[r][S]=[],i.faceVertexUvs[r][S+1]=[],o=0;4>o;o++){var V=a[g++],ot=q[2*V];V=q[2*V+1],ot=new $(ot,V),o!==2&&i.faceVertexUvs[r][S].push(ot),o!==0&&i.faceVertexUvs[r][S+1].push(ot)}}if(P&&(P=3*a[g++],x.normal.set(l[P++],l[P++],l[P]),N.normal.copy(x.normal)),G)for(r=0;4>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),r!==2&&x.vertexNormals.push(G),r!==0&&N.vertexNormals.push(G);if(u&&(u=a[g++],u=c[u],x.color.setHex(u),N.color.setHex(u)),h)for(r=0;4>r;r++)u=a[g++],u=c[u],r!==2&&x.vertexColors.push(new H(u)),r!==0&&N.vertexColors.push(new H(u));i.faces.push(x),i.faces.push(N)}else{if(x=new O,x.a=a[g++],x.b=a[g++],x.c=a[g++],S&&(S=a[g++],x.materialIndex=S),S=i.faces.length,r)for(r=0;r<d;r++)for(q=n.uvs[r],i.faceVertexUvs[r][S]=[],o=0;3>o;o++)V=a[g++],ot=q[2*V],V=q[2*V+1],ot=new $(ot,V),i.faceVertexUvs[r][S].push(ot);if(P&&(P=3*a[g++],x.normal.set(l[P++],l[P++],l[P])),G)for(r=0;3>r;r++)P=3*a[g++],G=new M(l[P++],l[P++],l[P]),x.vertexNormals.push(G);if(u&&(u=a[g++],x.color.setHex(c[u])),h)for(r=0;3>r;r++)u=a[g++],x.vertexColors.push(new H(c[u]));i.faces.push(x)}}if(n=t,g=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(s=0,a=n.skinWeights.length;s<a;s+=g)i.skinWeights.push(new Y(n.skinWeights[s],1<g?n.skinWeights[s+1]:0,2<g?n.skinWeights[s+2]:0,3<g?n.skinWeights[s+3]:0));if(n.skinIndices)for(s=0,a=n.skinIndices.length;s<a;s+=g)i.skinIndices.push(new Y(n.skinIndices[s],1<g?n.skinIndices[s+1]:0,2<g?n.skinIndices[s+2]:0,3<g?n.skinIndices[s+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),s=t,a=s.scale,s.morphTargets!==void 0)for(n=0,g=s.morphTargets.length;n<g;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=s.morphTargets[n].name,i.morphTargets[n].vertices=[],l=i.morphTargets[n].vertices,c=s.morphTargets[n].vertices,d=0,h=c.length;d<h;d+=3)u=new M,u.x=c[d]*a,u.y=c[d+1]*a,u.z=c[d+2]*a,l.push(u);if(s.morphColors!==void 0&&0<s.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),a=i.faces,s=s.morphColors[0].colors,n=0,g=a.length;n<g;n++)a[n].color.fromArray(s,3*n);for(s=t,n=[],g=[],s.animation!==void 0&&g.push(s.animation),s.animations!==void 0&&(s.animations.length?g=g.concat(s.animations):g.push(s.animations)),s=0;s<g.length;s++)(a=ki.parseAnimation(g[s],i.bones))&&n.push(a);return i.morphTargets&&(g=ki.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(g)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Mr.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ds.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var r=this,o=this.path===void 0?qo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||o,o=new Xi(r.manager),o.setPath(this.path),o.load(t,function(s){var a=null;try{a=JSON.parse(s)}catch(h){n!==void 0&&n(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}s=a.metadata,s===void 0||s.type===void 0||s.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):r.parse(a,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(r)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var r=this.parseObject(t.object,i,n);return t.animations&&(r.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(r),r},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var r=new Pn().fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Vo,r=new ps,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.type){case"PlaneGeometry":case"PlaneBufferGeometry":var h=new Ni[a.type](a.width,a.height,a.widthSegments,a.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":h=new Ni[a.type](a.width,a.height,a.depth,a.widthSegments,a.heightSegments,a.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":h=new Ni[a.type](a.radius,a.segments,a.thetaStart,a.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":h=new Ni[a.type](a.radiusTop,a.radiusBottom,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":h=new Ni[a.type](a.radius,a.height,a.radialSegments,a.heightSegments,a.openEnded,a.thetaStart,a.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":h=new Ni[a.type](a.radius,a.widthSegments,a.heightSegments,a.phiStart,a.phiLength,a.thetaStart,a.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":h=new Ni[a.type](a.radius,a.detail);break;case"RingGeometry":case"RingBufferGeometry":h=new Ni[a.type](a.innerRadius,a.outerRadius,a.thetaSegments,a.phiSegments,a.thetaStart,a.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.radialSegments,a.tubularSegments,a.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":h=new Ni[a.type](a.radius,a.tube,a.tubularSegments,a.radialSegments,a.p,a.q);break;case"LatheGeometry":case"LatheBufferGeometry":h=new Ni[a.type](a.points,a.segments,a.phiStart,a.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":h=new Ni[a.type](a.vertices,a.indices,a.radius,a.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":h=[];for(var l=0,c=a.shapes.length;l<c;l++){var u=e[a.shapes[l]];h.push(u)}h=new Ni[a.type](h,a.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,c=a.shapes.length;l<c;l++)u=e[a.shapes[l]],h.push(u);l=a.options.extrudePath,l!==void 0&&(a.options.extrudePath=new wa[l.type]().fromJSON(l)),h=new Ni[a.type](h,a.options);break;case"BufferGeometry":h=r.parse(a);break;case"Geometry":h=n.parse(a,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+a.type+'"');continue}h.uuid=a.uuid,a.name!==void 0&&(h.name=a.name),h.isBufferGeometry===!0&&a.userData!==void 0&&(h.userData=a.userData),i[a.uuid]=h}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var r=new ko;r.setTextures(e),e=0;for(var o=t.length;e<o;e++){var s=t[e];if(s.type==="MultiMaterial"){for(var a=[],h=0;h<s.materials.length;h++){var l=s.materials[h];i[l.uuid]===void 0&&(i[l.uuid]=r.parse(l)),a.push(i[l.uuid])}n[s.uuid]=a}else n[s.uuid]=r.parse(s),i[s.uuid]=n[s.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=ki.parse(n);n.uuid!==void 0&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){function i(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}var n=this,r={};if(t!==void 0&&0<t.length){e=new hs(e);var o=new ho(e);o.setCrossOrigin(this.crossOrigin),e=0;for(var s=t.length;e<s;e++){var a=t[e],h=a.url;if(Array.isArray(h)){r[a.uuid]=[];for(var l=0,c=h.length;l<c;l++){var u=h[l];u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:n.resourcePath+u,r[a.uuid].push(i(u))}}else u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a.url)?a.url:n.resourcePath+a.url,r[a.uuid]=i(u)}}return r},parseTextures:function(t,e){function i(h,l){return typeof h=="number"?h:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",h),l[h])}var n={};if(t!==void 0)for(var r=0,o=t.length;r<o;r++){var s=t[r];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),e[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var a=Array.isArray(e[s.image])?new _(e[s.image]):new Ct(e[s.image]);a.needsUpdate=!0,a.uuid=s.uuid,s.name!==void 0&&(a.name=s.name),s.mapping!==void 0&&(a.mapping=i(s.mapping,gh)),s.offset!==void 0&&a.offset.fromArray(s.offset),s.repeat!==void 0&&a.repeat.fromArray(s.repeat),s.center!==void 0&&a.center.fromArray(s.center),s.rotation!==void 0&&(a.rotation=s.rotation),s.wrap!==void 0&&(a.wrapS=i(s.wrap[0],Ta),a.wrapT=i(s.wrap[1],Ta)),s.format!==void 0&&(a.format=s.format),s.minFilter!==void 0&&(a.minFilter=i(s.minFilter,Sa)),s.magFilter!==void 0&&(a.magFilter=i(s.magFilter,Sa)),s.anisotropy!==void 0&&(a.anisotropy=s.anisotropy),s.flipY!==void 0&&(a.flipY=s.flipY),n[s.uuid]=a}return n},parseObject:function(t,e,i){function n(l){return e[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",l),e[l]}function r(l){if(l!==void 0){if(Array.isArray(l)){for(var c=[],u=0,d=l.length;u<d;u++){var g=l[u];i[g]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",g),c.push(i[g])}return c}return i[l]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",l),i[l]}}switch(t.type){case"Scene":var o=new qi;t.background!==void 0&&Number.isInteger(t.background)&&(o.background=new H(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?o.fog=new yi(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(o.fog=new Jt(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":o=new Bt(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(o.focus=t.focus),t.zoom!==void 0&&(o.zoom=t.zoom),t.filmGauge!==void 0&&(o.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(o.filmOffset=t.filmOffset),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"OrthographicCamera":o=new uo(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(o.zoom=t.zoom),t.view!==void 0&&(o.view=Object.assign({},t.view));break;case"AmbientLight":o=new Go(t.color,t.intensity);break;case"DirectionalLight":o=new Fo(t.color,t.intensity);break;case"PointLight":o=new Bo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":o=new Ho(t.color,t.intensity,t.width,t.height);break;case"SpotLight":o=new No(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":o=new Do(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":o=n(t.geometry);var s=r(t.material);o=o.bones&&0<o.bones.length?new ke(o,s):new Ke(o,s);break;case"LOD":o=new ii;break;case"Line":o=new qe(n(t.geometry),r(t.material),t.mode);break;case"LineLoop":o=new an(n(t.geometry),r(t.material));break;case"LineSegments":o=new Re(n(t.geometry),r(t.material));break;case"PointCloud":case"Points":o=new nr(n(t.geometry),r(t.material));break;case"Sprite":o=new ei(r(t.material));break;case"Group":o=new Pe;break;default:o=new b}if(o.uuid=t.uuid,t.name!==void 0&&(o.name=t.name),t.matrix!==void 0?(o.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=t.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(t.position!==void 0&&o.position.fromArray(t.position),t.rotation!==void 0&&o.rotation.fromArray(t.rotation),t.quaternion!==void 0&&o.quaternion.fromArray(t.quaternion),t.scale!==void 0&&o.scale.fromArray(t.scale)),t.castShadow!==void 0&&(o.castShadow=t.castShadow),t.receiveShadow!==void 0&&(o.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(o.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(o.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(o.visible=t.visible),t.frustumCulled!==void 0&&(o.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(o.renderOrder=t.renderOrder),t.userData!==void 0&&(o.userData=t.userData),t.layers!==void 0&&(o.layers.mask=t.layers),t.children!==void 0){s=t.children;for(var a=0;a<s.length;a++)o.add(this.parseObject(s[a],e,i))}if(t.type==="LOD")for(t=t.levels,s=0;s<t.length;s++){a=t[s];var h=o.getObjectByProperty("uuid",a.object);h!==void 0&&o.addLevel(h,a.distance)}return o}});var gh={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ta={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Sa={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};fs.prototype={constructor:fs,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,o=Zn.get(t);if(o!==void 0)return r.manager.itemStart(t),setTimeout(function(){e&&e(o),r.manager.itemEnd(t)},0),o;fetch(t).then(function(s){return s.blob()}).then(function(s){return createImageBitmap(s,r.options)}).then(function(s){Zn.add(t,s),e&&e(s),r.manager.itemEnd(t)}).catch(function(s){n&&n(s),r.manager.itemError(t),r.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(ms.prototype,{moveTo:function(t,e){this.currentPath=new Ki,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,o){this.currentPath.bezierCurveTo(t,e,i,n,r,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(P){for(var G=[],N=0,q=P.length;N<q;N++){var V=P[N],ot=new Pn;ot.curves=V.curves,G.push(ot)}return G}function n(P,G){for(var N=G.length,q=!1,V=N-1,ot=0;ot<N;V=ot++){var T=G[V],A=G[ot],tt=A.x-T.x,vt=A.y-T.y;if(Math.abs(vt)>Number.EPSILON){if(0>vt&&(T=G[ot],tt=-tt,A=G[V],vt=-vt),!(P.y<T.y||P.y>A.y))if(P.y===T.y){if(P.x===T.x)return!0}else{if(V=vt*(P.x-T.x)-tt*(P.y-T.y),V===0)return!0;0>V||(q=!q)}}else if(P.y===T.y&&(A.x<=P.x&&P.x<=T.x||T.x<=P.x&&P.x<=A.x))return!0}return q}var r=wn.isClockWise,o=this.subPaths;if(o.length===0)return[];if(e===!0)return i(o);if(e=[],o.length===1){var s=o[0],a=new Pn;return a.curves=s.curves,e.push(a),e}var h=!r(o[0].getPoints());h=t?!h:h,a=[];var l=[],c=[],u=0;l[u]=void 0,c[u]=[];for(var d=0,g=o.length;d<g;d++){s=o[d];var x=s.getPoints(),S=r(x);(S=t?!S:S)?(!h&&l[u]&&u++,l[u]={s:new Pn,p:x},l[u].s.curves=s.curves,h&&u++,c[u]=[]):c[u].push({h:s,p:x[0]})}if(!l[0])return i(o);if(1<l.length){for(d=!1,t=[],r=0,o=l.length;r<o;r++)a[r]=[];for(r=0,o=l.length;r<o;r++)for(s=c[r],S=0;S<s.length;S++){for(h=s[S],u=!0,x=0;x<l.length;x++)n(h.p,l[x].p)&&(r!==x&&t.push({froms:r,tos:x,hole:S}),u?(u=!1,a[x].push(h)):d=!0);u&&a[r].push(h)}0<t.length&&(d||(c=a))}for(d=0,r=l.length;d<r;d++)for(a=l[d].s,e.push(a),t=c[d],o=0,s=t.length;o<s;o++)a.holes.push(t[o].h);return e}}),Object.assign(gs.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var r=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var o=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var s=0,a=0,h=0;h<r.length;h++){var l=r[h];if(l===`
|
|
2571
|
+
`)s=0,a-=o;else{var c=n,u=s,d=a;if(l=e.glyphs[l]||e.glyphs["?"]){var g=new ms;if(l.o)for(var x=l._cachedOutline||(l._cachedOutline=l.o.split(" ")),S=0,P=x.length;S<P;)switch(x[S++]){case"m":var G=x[S++]*c+u,N=x[S++]*c+d;g.moveTo(G,N);break;case"l":G=x[S++]*c+u,N=x[S++]*c+d,g.lineTo(G,N);break;case"q":var q=x[S++]*c+u,V=x[S++]*c+d,ot=x[S++]*c+u,T=x[S++]*c+d;g.quadraticCurveTo(ot,T,q,V);break;case"b":q=x[S++]*c+u,V=x[S++]*c+d,ot=x[S++]*c+u,T=x[S++]*c+d,G=x[S++]*c+u,N=x[S++]*c+d,g.bezierCurveTo(ot,T,G,N,q,V)}c={offsetX:l.ha*c,path:g}}else c=void 0;s+=c.offsetX,t.push(c.path)}}for(e=0,r=t.length;e<r;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(ta.prototype,{load:function(t,e,i,n){var r=this,o=new Xi(this.manager);o.setPath(this.path),o.load(t,function(s){try{var a=JSON.parse(s)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),a=JSON.parse(s.substring(65,s.length-2))}s=r.parse(a),e&&e(s)},i,n)},parse:function(t){return new gs(t)},setPath:function(t){return this.path=t,this}});var Yo,zs={getContext:function(){return Yo===void 0&&(Yo=new(window.AudioContext||window.webkitAudioContext)),Yo},setContext:function(t){Yo=t}};Object.assign(vs.prototype,{load:function(t,e,i,n){var r=new Xi(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.load(t,function(o){o=o.slice(0),zs.getContext().decodeAudioData(o,function(s){e(s)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(ea.prototype,{update:function(){var t,e,i,n,r,o,s,a,h=new mt,l=new mt;return function(c){if(t!==this||e!==c.focus||i!==c.fov||n!==c.aspect*this.aspect||r!==c.near||o!==c.far||s!==c.zoom||a!==this.eyeSep){t=this,e=c.focus,i=c.fov,n=c.aspect*this.aspect,r=c.near,o=c.far,s=c.zoom;var u=c.projectionMatrix.clone();a=this.eyeSep/2;var d=a*r/e,g=r*Math.tan(Se.DEG2RAD*i*.5)/s;l.elements[12]=-a,h.elements[12]=a;var x=-g*n+d,S=g*n+d;u.elements[0]=2*r/(S-x),u.elements[8]=(S+x)/(S-x),this.cameraL.projectionMatrix.copy(u),x=-g*n-d,S=g*n-d,u.elements[0]=2*r/(S-x),u.elements[8]=(S+x)/(S-x),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(c.matrixWorld).multiply(l),this.cameraR.matrixWorld.copy(c.matrixWorld).multiply(h)}}()}),po.prototype=Object.create(b.prototype),po.prototype.constructor=po,Object.assign(ys.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!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=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),_s.prototype=Object.assign(Object.create(b.prototype),{constructor:_s,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(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 this.filter!==null?(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 M,e=new ht,i=new M,n=new M,r=new ys;return function(o){b.prototype.updateMatrixWorld.call(this,o),o=this.context.listener;var s=this.up;if(this.timeDelta=r.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),o.positionX){var a=this.context.currentTime+this.timeDelta;o.positionX.linearRampToValueAtTime(t.x,a),o.positionY.linearRampToValueAtTime(t.y,a),o.positionZ.linearRampToValueAtTime(t.z,a),o.forwardX.linearRampToValueAtTime(n.x,a),o.forwardY.linearRampToValueAtTime(n.y,a),o.forwardZ.linearRampToValueAtTime(n.z,a),o.upX.linearRampToValueAtTime(s.x,a),o.upY.linearRampToValueAtTime(s.y,a),o.upZ.linearRampToValueAtTime(s.z,a)}else o.setPosition(t.x,t.y,t.z),o.setOrientation(n.x,n.y,n.z,s.x,s.y,s.z)}}()}),Tr.prototype=Object.assign(Object.create(b.prototype),{constructor:Tr,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(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{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()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){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(0<this.filters.length){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=[]),this.isPlaying===!0?(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(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),xs.prototype=Object.assign(Object.create(Tr.prototype),{constructor:xs,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,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new M,e=new ht,i=new M,n=new M;return function(r){if(b.prototype.updateMatrixWorld.call(this,r),r=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),r.positionX){var o=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(t.x,o),r.positionY.linearRampToValueAtTime(t.y,o),r.positionZ.linearRampToValueAtTime(t.z,o),r.orientationX.linearRampToValueAtTime(n.x,o),r.orientationY.linearRampToValueAtTime(n.y,o),r.orientationZ.linearRampToValueAtTime(n.z,o)}else r.setPosition(t.x,t.y,t.z),r.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(ws.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(Ms.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var r=this.cumulativeWeight;if(r===0){for(r=0;r!==n;++r)i[t+r]=i[r];r=e}else r+=e,this._mixBufferRegion(i,t,0,e/r,n);this.cumulativeWeight=r},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,r=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var o=e+e;n!==o;++n)if(i[n]!==i[n+e]){r.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,r){if(.5<=n)for(n=0;n!==r;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){ht.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var o=1-n,s=0;s!==r;++s){var a=e+s;t[a]=t[a]*o+t[i+s]*n}}}),Object.assign(ia.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(Pi,{Composite:ia,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new Pi.Composite(t,e,i):new Pi(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),r=new RegExp("^"+e+t+i+n+"$"),o=["material","materials","bones"];return function(s){var a=r.exec(s);if(!a)throw Error("PropertyBinding: Cannot parse trackName: "+s);a={nodeName:a[2],objectName:a[3],objectIndex:a[4],propertyName:a[5],propertyIndex:a[6]};var h=a.nodeName&&a.nodeName.lastIndexOf(".");if(h!==void 0&&h!==-1){var l=a.nodeName.substring(h+1);o.indexOf(l)!==-1&&(a.nodeName=a.nodeName.substring(0,h),a.objectName=l)}if(a.propertyName===null||a.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+s);return a}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(r){for(var o=0;o<r.length;o++){var s=r[o];if(s.name===e||s.uuid===e||(s=n(s.children)))return s}return null};if(t=n(t.children))return t}return null}}),Object.assign(Pi.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 i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},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 i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=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,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(this.node=t=Pi.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var o=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===o){o=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}if(o=t[n],o===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,r!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===r){r=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===r){r=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else o.fromArray!==void 0&&o.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(i=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Pi.prototype,{_getValue_unbound:Pi.prototype.getValue,_setValue_unbound:Pi.prototype.setValue}),Object.assign(na.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length,h=void 0,l=0,c=arguments.length;l!==c;++l){var u=arguments[l],d=u.uuid,g=n[d];if(g===void 0){g=e++,n[d]=g,t.push(u),d=0;for(var x=a;d!==x;++d)s[d].push(new Pi(u,r[d],o[d]))}else if(g<i){h=t[g];var S=--i;for(x=t[S],n[x.uuid]=g,t[g]=x,n[d]=S,t[S]=u,d=0,x=a;d!==x;++d){var P=s[d],G=P[g];P[g]=P[S],G===void 0&&(G=new Pi(u,r[d],o[d])),P[S]=G}}else t[g]!==h&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,o=0,s=arguments.length;o!==s;++o){var a=arguments[o],h=a.uuid,l=i[h];if(l!==void 0&&l>=e){var c=e++,u=t[c];for(i[u.uuid]=l,t[l]=u,i[h]=c,t[c]=a,a=0,h=r;a!==h;++a){u=n[a];var d=u[l];u[l]=u[c],u[c]=d}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,o=r.length,s=0,a=arguments.length;s!==a;++s){var h=arguments[s].uuid,l=n[h];if(l!==void 0)if(delete n[h],l<i){h=--i;var c=t[h],u=--e,d=t[u];for(n[c.uuid]=l,t[l]=c,n[d.uuid]=h,t[h]=d,t.pop(),c=0,d=o;c!==d;++c){var g=r[c],x=g[u];g[l]=g[h],g[h]=x,g.pop()}}else for(u=--e,d=t[u],n[d.uuid]=l,t[l]=d,t.pop(),c=0,d=o;c!==d;++c)g=r[c],g[l]=g[u],g.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(n!==void 0)return r[n];var o=this._paths,s=this._parsedPaths,a=this._objects,h=this.nCachedObjects_,l=Array(a.length);for(n=r.length,i[t]=n,o.push(t),s.push(e),r.push(l),i=h,n=a.length;i!==n;++i)l[i]=new Pi(a[i],t,e);return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,r=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];e[t[s]]=i,o[i]=a,o.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}),Object.assign(ra.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&&this.timeScale!==0&&this._startTime===null&&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,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,r=i/n;t.warp(1,n/i,e),this.warp(r,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(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,i){var n=this._mixer,r=n.time,o=this._timeScaleInterpolant,s=this.timeScale;return o===null&&(this._timeScaleInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,n[1]=r+i,o[0]=t/s,o[1]=e/s,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(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,i,n){if(this.enabled){var r=this._startTime;if(r!==null){if(e=(t-r)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,r=this._propertyBindings;for(var o=0,s=e.length;o!==s;++o)e[o].evaluate(i),r[o].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,r=this._loopCount,o=n===2202;if(t===0)return r===-1?e:o&&(r&1)===1?i-e:e;if(n===2200)t:{if(r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(r===-1&&(0<=t?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,r+=Math.abs(n);var s=this.repetitions-r;0>=s?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(s===1?(t=0>t,this._setEndings(t,!t,o)):this._setEndings(!1,!1,o),this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(o&&(r&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,o=this._weightInterpolant;return o===null&&(this._weightInterpolant=o=n._lendControlInterpolant()),n=o.parameterPositions,o=o.sampleValues,n[0]=r,o[0]=e,n[1]=r+t,o[1]=i,this}}),Ts.prototype=Object.assign(Object.create(Ot.prototype),{constructor:Ts,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,o=t._propertyBindings;t=t._interpolants;var s=i.uuid,a=this._bindingsByRootAndName,h=a[s];for(h===void 0&&(h={},a[s]=h),a=0;a!==r;++a){var l=n[a],c=l.name,u=h[c];if(u===void 0){if(u=o[a],u!==void 0){u._cacheIndex===null&&(++u.referenceCount,this._addInactiveBinding(u,s,c));continue}u=new Ms(Pi.create(i,c,e&&e._propertyBindings[a].binding.parsedPath),l.ValueTypeName,l.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,c)}o[a]=u,t[a].resultBuffer=u.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}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){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,o=r[e];o===void 0?(o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=o):(e=o.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),o.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var r=n.knownActions,o=r[r.length-1],s=t._byClipCacheIndex;o._byClipCacheIndex=s,r[s]=o,r.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],r.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],o=this._bindings;r===void 0&&(r={},n[e]=r),r[i]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var r=this._bindingsByRootAndName,o=r[n],s=e[e.length-1];t=t._cacheIndex,s._cacheIndex=t,e[t]=s,e.pop(),delete o[i];t:{for(var a in o)break t;delete r[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new so(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?ki.findByName(i,t):t,t=i!==null?i.uuid:t;var r=this._actionsByClip[t],o=null;if(r!==void 0){if(o=r.actionByRoot[n],o!==void 0)return o;o=r.knownActions[0],i===null&&(i=o._clip)}return i===null?null:(e=new ra(this,i,e),this._bindAction(e,o),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?ki.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,r=this._nActiveBindings=this._nActiveActions=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),o=this._accuIndex^=1,s=0;s!==i;++s)e[s]._update(n,t,r,o);for(t=this._bindings,e=this._nActiveBindings,s=0;s!==e;++s)t[s].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var r=0,o=n.length;r!==o;++r){var s=n[r];this._deactivateAction(s);var a=s._cacheIndex,h=e[e.length-1];s._cacheIndex=null,s._byClipCacheIndex=null,h._cacheIndex=a,e[a]=h,e.pop(),this._removeInactiveBindingsForAction(s)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var r in n)t=n[r],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),jo.prototype.clone=function(){return new jo(this.value.clone===void 0?this.value:this.value.clone())},Ss.prototype=Object.assign(Object.create(Rt.prototype),{constructor:Ss,isInstancedBufferGeometry:!0,copy:function(t){return Rt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Es.prototype=Object.assign(Object.create(Ge.prototype),{constructor:Es,isInstancedInterleavedBuffer:!0,copy:function(t){return Ge.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Ps.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ps,isInstancedBufferAttribute:!0,copy:function(t){return Z.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(oa.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,i){return i=i||[],As(t,this,i,e),i.sort(sa),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,r=t.length;n<r;n++)As(t[n],this,i,e);return i.sort(sa),i}}),Object.assign(aa.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,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,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(Se.clamp(e/this.radius,-1,1))),this}}),Object.assign(ha.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,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,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(Ls.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new $;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),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 t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new $),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new $),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 e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new $),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 e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new $),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new $;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(Rs.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 t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new M),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new M),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 e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new M),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new M,e=new M;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=Se.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new M),this.delta(i).multiplyScalar(t).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)}}),fo.prototype=Object.create(b.prototype),fo.prototype.constructor=fo,fo.prototype.isImmediateRenderObject=!0,mo.prototype=Object.create(Re.prototype),mo.prototype.constructor=mo,mo.prototype.update=function(){var t=new M,e=new M,i=new yt;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry;if(s&&s.isGeometry)for(var a=s.vertices,h=s.faces,l=s=0,c=h.length;l<c;l++)for(var u=h[l],d=0,g=u.vertexNormals.length;d<g;d++){var x=u.vertexNormals[d];t.copy(a[u[n[d]]]).applyMatrix4(r),e.copy(x).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1}else if(s&&s.isBufferGeometry)for(n=s.attributes.position,a=s.attributes.normal,d=s=0,g=n.count;d<g;d++)t.set(n.getX(d),n.getY(d),n.getZ(d)).applyMatrix4(r),e.set(a.getX(d),a.getY(d),a.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),o.setXYZ(s,t.x,t.y,t.z),s+=1,o.setXYZ(s,e.x,e.y,e.z),s+=1;o.needsUpdate=!0}}(),Sr.prototype=Object.create(b.prototype),Sr.prototype.constructor=Sr,Sr.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sr.prototype.update=function(){var t=new M,e=new M;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Er.prototype=Object.create(Re.prototype),Er.prototype.constructor=Er,Er.prototype.updateMatrixWorld=function(){var t=new M,e=new mt,i=new mt;return function(n){var r=this.bones,o=this.geometry,s=o.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var a=0,h=0;a<r.length;a++){var l=r[a];l.parent&&l.parent.isBone&&(e.multiplyMatrices(i,l.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h,t.x,t.y,t.z),e.multiplyMatrices(i,l.parent.matrixWorld),t.setFromMatrixPosition(e),s.setXYZ(h+1,t.x,t.y,t.z),h+=2)}o.getAttribute("position").needsUpdate=!0,b.prototype.updateMatrixWorld.call(this,n)}}(),Pr.prototype=Object.create(Ke.prototype),Pr.prototype.constructor=Pr,Pr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Pr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Ar.prototype=Object.create(b.prototype),Ar.prototype.constructor=Ar,Ar.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ar.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Lr.prototype=Object.create(b.prototype),Lr.prototype.constructor=Lr,Lr.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Lr.prototype.update=function(){var t=new M,e=new H,i=new H;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var o=0,s=r.count;o<s;o++){var a=o<s/2?e:i;r.setXYZ(o,a.r,a.g,a.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),go.prototype=Object.create(Re.prototype),go.prototype.constructor=go,Wo.prototype=Object.create(Re.prototype),Wo.prototype.constructor=Wo,vo.prototype=Object.create(Re.prototype),vo.prototype.constructor=vo,vo.prototype.update=function(){var t=new M,e=new M,i=new yt;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,r=this.geometry.attributes.position,o=this.object.geometry,s=o.vertices;o=o.faces;for(var a=0,h=0,l=o.length;h<l;h++){var c=o[h],u=c.normal;t.copy(s[c.a]).add(s[c.b]).add(s[c.c]).divideScalar(3).applyMatrix4(n),e.copy(u).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(a,t.x,t.y,t.z),a+=1,r.setXYZ(a,e.x,e.y,e.z),a+=1}r.needsUpdate=!0}}(),Rr.prototype=Object.create(b.prototype),Rr.prototype.constructor=Rr,Rr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Rr.prototype.update=function(){var t=new M,e=new M,i=new M;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.color!==void 0?(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(i),this.targetLine.scale.z=i.length()}}(),yo.prototype=Object.create(Re.prototype),yo.prototype.constructor=yo,yo.prototype.update=function(){function t(o,s,a,h){if(n.set(s,a,h).unproject(r),o=i[o],o!==void 0)for(s=e.getAttribute("position"),a=0,h=o.length;a<h;a++)s.setXYZ(o[a],n.x,n.y,n.z)}var e,i,n=new M,r=new Kt;return function(){e=this.geometry,i=this.pointMap,r.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),_n.prototype=Object.create(Re.prototype),_n.prototype.constructor=_n,_n.prototype.update=function(){var t=new At;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=e.x,r[4]=i.y,r[5]=i.z,r[6]=e.x,r[7]=e.y,r[8]=i.z,r[9]=i.x,r[10]=e.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=e.z,r[15]=e.x,r[16]=i.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=i.x,r[22]=e.y,r[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),_n.prototype.setFromObject=function(t){return this.object=t,this.update(),this},_n.prototype.copy=function(t){return Re.prototype.copy.call(this,t),this.object=t.object,this},_n.prototype.clone=function(){return new this.constructor().copy(this)},_o.prototype=Object.create(Re.prototype),_o.prototype.constructor=_o,_o.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),b.prototype.updateMatrixWorld.call(this,t))},xo.prototype=Object.create(qe.prototype),xo.prototype.constructor=xo,xo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),b.prototype.updateMatrixWorld.call(this,t)};var Zo,Ns;xn.prototype=Object.create(b.prototype),xn.prototype.constructor=xn,xn.prototype.setDirection=function(){var t=new M,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),xn.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},xn.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},xn.prototype.copy=function(t){return b.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},xn.prototype.clone=function(){return new this.constructor().copy(this)},wo.prototype=Object.create(Re.prototype),wo.prototype.constructor=wo,pe.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(pe.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(yn.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new F,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new M(r.x,r.y,r.z||0))}return e}}),Object.assign(Ki.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),ca.prototype=Object.create(Ei.prototype),ua.prototype=Object.create(Ei.prototype),Cs.prototype=Object.create(Ei.prototype),Object.assign(Cs.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.")}}),go.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Er.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Mr.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qo.extractUrlBase(t)}}),Object.assign(Vo.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ds.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(Ls.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(At.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)}}),Rs.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(Se,{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()."),Se.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Se.ceilPowerOfTwo(t)}}),Object.assign(yt.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(mt.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 t===void 0&&(t=new M),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,i,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,o)}}),_t.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},ht.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(Ri.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(be.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(be,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),be.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),be.getNormal(t,e,i,n)}}),Object.assign(Pn.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 Nn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Un(this,t)}}),Object.assign($.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},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(M.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,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},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(Y.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(F.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(b.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(b.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(ii.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(ai.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(pe.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}}),Bt.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(ri.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(Z.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(Rt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&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(Rt.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(hn.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(jo.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(fe.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new H}},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===1}}}),Object.defineProperties(Yi.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(Je.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(Ft.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},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(Ft.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(Nt.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(lt.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(Le.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),Tr.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vs().load(t,function(i){e.setBuffer(i)}),this},ws.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},po.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},An.crossOrigin=void 0,An.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var r=new Io;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var r=new cs;return r.setCrossOrigin(this.crossOrigin),t=r.load(t,i,void 0,n),e&&(t.mapping=e),t},An.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},An.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},p.WebGLRenderTargetCube=St,p.WebGLRenderTarget=lt,p.WebGLRenderer=Ft,p.ShaderLib=pn,p.UniformsLib=le,p.UniformsUtils=_i,p.ShaderChunk=Ie,p.FogExp2=Jt,p.Fog=yi,p.Scene=qi,p.Sprite=ei,p.LOD=ii,p.SkinnedMesh=ke,p.Skeleton=ai,p.Bone=hi,p.Mesh=Ke,p.LineSegments=Re,p.LineLoop=an,p.Line=qe,p.Points=nr,p.Group=Pe,p.VideoTexture=os,p.DataTexture=ut,p.DataTexture3D=D,p.CompressedTexture=rr,p.CubeTexture=_,p.CanvasTexture=Ur,p.DepthTexture=Fr,p.Texture=Ct,p.AnimationLoader=Qs,p.CompressedTextureLoader=$s,p.DataTextureLoader=ls,p.CubeTextureLoader=cs,p.TextureLoader=Io,p.ObjectLoader=ds,p.MaterialLoader=ko,p.BufferGeometryLoader=ps,p.DefaultLoadingManager=Oi,p.LoadingManager=hs,p.JSONLoader=Vo,p.ImageLoader=ho,p.ImageBitmapLoader=fs,p.FontLoader=ta,p.FileLoader=Xi,p.Loader=Mr,p.LoaderUtils=qo,p.Cache=Zn,p.AudioLoader=vs,p.SpotLightShadow=zo,p.SpotLight=No,p.PointLight=Bo,p.RectAreaLight=Ho,p.HemisphereLight=Do,p.DirectionalLightShadow=Uo,p.DirectionalLight=Fo,p.AmbientLight=Go,p.LightShadow=Yn,p.Light=ri,p.StereoCamera=ea,p.PerspectiveCamera=Bt,p.OrthographicCamera=uo,p.CubeCamera=po,p.ArrayCamera=te,p.Camera=Kt,p.AudioListener=_s,p.PositionalAudio=xs,p.AudioContext=zs,p.AudioAnalyser=ws,p.Audio=Tr,p.VectorKeyframeTrack=xr,p.StringKeyframeTrack=Oo,p.QuaternionKeyframeTrack=ao,p.NumberKeyframeTrack=_r,p.ColorKeyframeTrack=Co,p.BooleanKeyframeTrack=Ro,p.PropertyMixer=Ms,p.PropertyBinding=Pi,p.KeyframeTrack=wi,p.AnimationUtils=Ai,p.AnimationObjectGroup=na,p.AnimationMixer=Ts,p.AnimationClip=ki,p.Uniform=jo,p.InstancedBufferGeometry=Ss,p.BufferGeometry=Rt,p.Geometry=F,p.InterleavedBufferAttribute=He,p.InstancedInterleavedBuffer=Es,p.InterleavedBuffer=Ge,p.InstancedBufferAttribute=Ps,p.Face3=O,p.Object3D=b,p.Raycaster=oa,p.Layers=X,p.EventDispatcher=Ot,p.Clock=ys,p.QuaternionLinearInterpolant=bo,p.LinearInterpolant=so,p.DiscreteInterpolant=Lo,p.CubicInterpolant=Ao,p.Interpolant=Hi,p.Triangle=be,p.Math=Se,p.Spherical=aa,p.Cylindrical=ha,p.Plane=_t,p.Frustum=K,p.Sphere=Dt,p.Ray=Ri,p.Matrix4=mt,p.Matrix3=yt,p.Box3=At,p.Box2=Ls,p.Line3=Rs,p.Euler=w,p.Vector4=Y,p.Vector3=M,p.Vector2=$,p.Quaternion=ht,p.Color=H,p.ImmediateRenderObject=fo,p.VertexNormalsHelper=mo,p.SpotLightHelper=Sr,p.SkeletonHelper=Er,p.PointLightHelper=Pr,p.RectAreaLightHelper=Ar,p.HemisphereLightHelper=Lr,p.GridHelper=go,p.PolarGridHelper=Wo,p.FaceNormalsHelper=vo,p.DirectionalLightHelper=Rr,p.CameraHelper=yo,p.BoxHelper=_n,p.Box3Helper=_o,p.PlaneHelper=xo,p.ArrowHelper=xn,p.AxesHelper=wo,p.Shape=Pn,p.Path=Ki,p.ShapePath=ms,p.Font=gs,p.CurvePath=yn,p.Curve=pe,p.ImageUtils=An,p.ShapeUtils=wn,p.WebGLUtils=ne,p.WireframeGeometry=or,p.ParametricGeometry=Gr,p.ParametricBufferGeometry=sr,p.TetrahedronGeometry=kr,p.TetrahedronBufferGeometry=ar,p.OctahedronGeometry=Vr,p.OctahedronBufferGeometry=Dn,p.IcosahedronGeometry=jr,p.IcosahedronBufferGeometry=hr,p.DodecahedronGeometry=Wr,p.DodecahedronBufferGeometry=lr,p.PolyhedronGeometry=Hr,p.PolyhedronBufferGeometry=Di,p.TubeGeometry=Xr,p.TubeBufferGeometry=cr,p.TorusKnotGeometry=qr,p.TorusKnotBufferGeometry=ur,p.TorusGeometry=Yr,p.TorusBufferGeometry=pr,p.TextGeometry=Kr,p.TextBufferGeometry=dr,p.SphereGeometry=to,p.SphereBufferGeometry=Bn,p.RingGeometry=eo,p.RingBufferGeometry=fr,p.PlaneGeometry=Ti,p.PlaneBufferGeometry=oi,p.LatheGeometry=io,p.LatheBufferGeometry=mr,p.ShapeGeometry=Un,p.ShapeBufferGeometry=Fn,p.ExtrudeGeometry=Nn,p.ExtrudeBufferGeometry=hn,p.EdgesGeometry=gr,p.ConeGeometry=no,p.ConeBufferGeometry=ro,p.CylinderGeometry=Gn,p.CylinderBufferGeometry=vn,p.CircleGeometry=oo,p.CircleBufferGeometry=vr,p.BoxGeometry=Fe,p.BoxBufferGeometry=vi,p.ShadowMaterial=Hn,p.SpriteMaterial=We,p.RawShaderMaterial=yr,p.ShaderMaterial=Je,p.PointsMaterial=xi,p.MeshPhysicalMaterial=kn,p.MeshStandardMaterial=ln,p.MeshPhongMaterial=Yi,p.MeshToonMaterial=Vn,p.MeshNormalMaterial=jn,p.MeshLambertMaterial=Wn,p.MeshDepthMaterial=Tt,p.MeshDistanceMaterial=gt,p.MeshBasicMaterial=Ve,p.MeshMatcapMaterial=Xn,p.LineDashedMaterial=qn,p.LineBasicMaterial=Ne,p.Material=fe,p.Float64BufferAttribute=kt,p.Float32BufferAttribute=ct,p.Uint32BufferAttribute=ie,p.Int32BufferAttribute=jt,p.Uint16BufferAttribute=Gt,p.Int16BufferAttribute=Lt,p.Uint8ClampedBufferAttribute=Pt,p.Uint8BufferAttribute=it,p.Int8BufferAttribute=st,p.BufferAttribute=Z,p.ArcCurve=wr,p.CatmullRomCurve3=Ei,p.CubicBezierCurve=Zi,p.CubicBezierCurve3=cn,p.EllipseCurve=Vi,p.LineCurve=zi,p.LineCurve3=Ji,p.QuadraticBezierCurve=Qi,p.QuadraticBezierCurve3=un,p.SplineCurve=$i,p.REVISION="98",p.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},p.CullFaceNone=0,p.CullFaceBack=1,p.CullFaceFront=2,p.CullFaceFrontBack=3,p.FrontFaceDirectionCW=0,p.FrontFaceDirectionCCW=1,p.BasicShadowMap=0,p.PCFShadowMap=1,p.PCFSoftShadowMap=2,p.FrontSide=0,p.BackSide=1,p.DoubleSide=2,p.FlatShading=1,p.SmoothShading=2,p.NoColors=0,p.FaceColors=1,p.VertexColors=2,p.NoBlending=0,p.NormalBlending=1,p.AdditiveBlending=2,p.SubtractiveBlending=3,p.MultiplyBlending=4,p.CustomBlending=5,p.AddEquation=100,p.SubtractEquation=101,p.ReverseSubtractEquation=102,p.MinEquation=103,p.MaxEquation=104,p.ZeroFactor=200,p.OneFactor=201,p.SrcColorFactor=202,p.OneMinusSrcColorFactor=203,p.SrcAlphaFactor=204,p.OneMinusSrcAlphaFactor=205,p.DstAlphaFactor=206,p.OneMinusDstAlphaFactor=207,p.DstColorFactor=208,p.OneMinusDstColorFactor=209,p.SrcAlphaSaturateFactor=210,p.NeverDepth=0,p.AlwaysDepth=1,p.LessDepth=2,p.LessEqualDepth=3,p.EqualDepth=4,p.GreaterEqualDepth=5,p.GreaterDepth=6,p.NotEqualDepth=7,p.MultiplyOperation=0,p.MixOperation=1,p.AddOperation=2,p.NoToneMapping=0,p.LinearToneMapping=1,p.ReinhardToneMapping=2,p.Uncharted2ToneMapping=3,p.CineonToneMapping=4,p.UVMapping=300,p.CubeReflectionMapping=301,p.CubeRefractionMapping=302,p.EquirectangularReflectionMapping=303,p.EquirectangularRefractionMapping=304,p.SphericalReflectionMapping=305,p.CubeUVReflectionMapping=306,p.CubeUVRefractionMapping=307,p.RepeatWrapping=1e3,p.ClampToEdgeWrapping=1001,p.MirroredRepeatWrapping=1002,p.NearestFilter=1003,p.NearestMipMapNearestFilter=1004,p.NearestMipMapLinearFilter=1005,p.LinearFilter=1006,p.LinearMipMapNearestFilter=1007,p.LinearMipMapLinearFilter=1008,p.UnsignedByteType=1009,p.ByteType=1010,p.ShortType=1011,p.UnsignedShortType=1012,p.IntType=1013,p.UnsignedIntType=1014,p.FloatType=1015,p.HalfFloatType=1016,p.UnsignedShort4444Type=1017,p.UnsignedShort5551Type=1018,p.UnsignedShort565Type=1019,p.UnsignedInt248Type=1020,p.AlphaFormat=1021,p.RGBFormat=1022,p.RGBAFormat=1023,p.LuminanceFormat=1024,p.LuminanceAlphaFormat=1025,p.RGBEFormat=1023,p.DepthFormat=1026,p.DepthStencilFormat=1027,p.RedFormat=1028,p.RGB_S3TC_DXT1_Format=33776,p.RGBA_S3TC_DXT1_Format=33777,p.RGBA_S3TC_DXT3_Format=33778,p.RGBA_S3TC_DXT5_Format=33779,p.RGB_PVRTC_4BPPV1_Format=35840,p.RGB_PVRTC_2BPPV1_Format=35841,p.RGBA_PVRTC_4BPPV1_Format=35842,p.RGBA_PVRTC_2BPPV1_Format=35843,p.RGB_ETC1_Format=36196,p.RGBA_ASTC_4x4_Format=37808,p.RGBA_ASTC_5x4_Format=37809,p.RGBA_ASTC_5x5_Format=37810,p.RGBA_ASTC_6x5_Format=37811,p.RGBA_ASTC_6x6_Format=37812,p.RGBA_ASTC_8x5_Format=37813,p.RGBA_ASTC_8x6_Format=37814,p.RGBA_ASTC_8x8_Format=37815,p.RGBA_ASTC_10x5_Format=37816,p.RGBA_ASTC_10x6_Format=37817,p.RGBA_ASTC_10x8_Format=37818,p.RGBA_ASTC_10x10_Format=37819,p.RGBA_ASTC_12x10_Format=37820,p.RGBA_ASTC_12x12_Format=37821,p.LoopOnce=2200,p.LoopRepeat=2201,p.LoopPingPong=2202,p.InterpolateDiscrete=2300,p.InterpolateLinear=2301,p.InterpolateSmooth=2302,p.ZeroCurvatureEnding=2400,p.ZeroSlopeEnding=2401,p.WrapAroundEnding=2402,p.TrianglesDrawMode=0,p.TriangleStripDrawMode=1,p.TriangleFanDrawMode=2,p.LinearEncoding=3e3,p.sRGBEncoding=3001,p.GammaEncoding=3007,p.RGBEEncoding=3002,p.LogLuvEncoding=3003,p.RGBM7Encoding=3004,p.RGBM16Encoding=3005,p.RGBDEncoding=3006,p.BasicDepthPacking=3200,p.RGBADepthPacking=3201,p.TangentSpaceNormalMap=0,p.ObjectSpaceNormalMap=1,p.CubeGeometry=Fe,p.Face4=function(t,e,i,n,r,o,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new O(t,e,i,r,o,s)},p.LineStrip=0,p.LinePieces=1,p.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},p.MultiMaterial=function(t){return t===void 0&&(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},p.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new nr(t,e)},p.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ei(t)},p.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new nr(t,e)},p.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new xi(t)},p.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new M(t,e,i)},p.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new Z(t,e).setDynamic(!0)},p.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new st(t,e)},p.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new it(t,e)},p.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Pt(t,e)},p.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Lt(t,e)},p.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Gt(t,e)},p.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new jt(t,e)},p.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new ie(t,e)},p.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ct(t,e)},p.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new kt(t,e)},p.ClosedSplineCurve3=ca,p.SplineCurve3=ua,p.Spline=Cs,p.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new wo(t)},p.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new _n(t,e)},p.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Re(new gr(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Re(new or(t.geometry),new Ne({color:e!==void 0?e:16777215}))},p.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Xi(t)},p.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ls(t)},p.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},p.Projector=function(){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().")}},p.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},p.SceneUtils={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")}},p.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(p,"__esModule",{value:!0})}),THREE.Sky=function(){var p=THREE.Sky.SkyShader,Ot=new THREE.ShaderMaterial({fragmentShader:p.fragmentShader,vertexShader:p.vertexShader,uniforms:THREE.UniformsUtils.clone(p.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),Ot)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
|
|
2572
2572
|
`),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","const vec3 cameraPos = vec3( 0.0, 1.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {"," return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {"," float g2 = pow( g, 2.0 );"," float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );"," return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {"," return ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {"," float zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );"," float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );"," float sR = rayleighZenithLength * inverse;"," float sM = mieZenithLength * inverse;"," vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );"," float cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );"," float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );"," vec3 betaRTheta = vBetaR * rPhase;"," float mPhase = hgPhase( cosTheta, mieDirectionalG );"," vec3 betaMTheta = vBetaM * mPhase;"," vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );"," Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );"," vec3 direction = normalize( vWorldPosition - cameraPos );"," float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join(`
|
|
2573
|
-
`)},function(p){typeof module>"u"?window.charming=p:module.exports=p}(function(p,Ot){Ot=Ot||{};var $=Ot.tagName||"span",mt=Ot.classPrefix!=null?Ot.classPrefix:"char",ht=1,M=function(yt){for(var Ct=yt.parentNode,Y=yt.nodeValue,lt=Y.length,St=-1;++St<lt;){var ut=document.createElement($);mt&&(ut.className=mt+ht,ht++),ut.appendChild(document.createTextNode(Y[St])),Ct.insertBefore(ut,yt)}Ct.removeChild(yt)};return function yt(Ct){for(var Y=[].slice.call(Ct.childNodes),lt=Y.length,St=-1;++St<lt;)yt(Y[St]);Ct.nodeType===Node.TEXT_NODE&&M(Ct)}(p),p});const
|
|
2573
|
+
`)},function(p){typeof module>"u"?window.charming=p:module.exports=p}(function(p,Ot){Ot=Ot||{};var $=Ot.tagName||"span",mt=Ot.classPrefix!=null?Ot.classPrefix:"char",ht=1,M=function(yt){for(var Ct=yt.parentNode,Y=yt.nodeValue,lt=Y.length,St=-1;++St<lt;){var ut=document.createElement($);mt&&(ut.className=mt+ht,ht++),ut.appendChild(document.createTextNode(Y[St])),Ct.insertBefore(ut,yt)}Ct.removeChild(yt)};return function yt(Ct){for(var Y=[].slice.call(Ct.childNodes),lt=Y.length,St=-1;++St<lt;)yt(Y[St]);Ct.nodeType===Node.TEXT_NODE&&M(Ct)}(p),p});const Qa=[Fs,ks],$a={continuation:null,mapModali:null,install(p){if(Qa.forEach((yt,Ct)=>{p.component(yt.name,yt)}),this.continuation){p.config.globalProperties.$continuation=this.continuation;return}let Ot=Ee.createApp(Gs),$=document.createElement("div"),mt=document.body;if(mt.appendChild($),this.loading=Ot.mount($),p.config.globalProperties.$loading=this.loading,window.$continuation=this.loading,this.mapModali){p.config.globalProperties.$mapModali=this.mapModali;return}let ht=Ee.createApp(Hs),M=document.createElement("div");mt.appendChild(M),this.mapModali=ht.mount(M),p.config.globalProperties.$mapModali=this.mapModali,window.$mapModali=this.mapModali}};Fi.BimBackgroundPlate=ks,Fi.BimCutscenes=Gs,Fi.Button=Fs,Fi.MapModali=Hs,Fi.default=$a,Object.defineProperties(Fi,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|