@widelab-development/pirxey-webflow-dev 0.0.16 → 0.0.17
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/dist/blog.css +1 -1
- package/dist/blog.js +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +14 -14
- package/dist/prx-site.css +1 -1
- package/dist/prx-site.js +5 -5
- package/package.json +1 -1
package/dist/prx-site.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var Rh=()=>{let r=()=>{requestAnimationFrame(()=>{document.querySelectorAll(".client-list_wrapper").forEach(t=>{let e=t.querySelector(".client-list_wrap");if(!e)return;let n=Array.from(e.children),i=e.scrollWidth;i&&(n.forEach(s=>{let o=s.cloneNode(!0);o.style.width=`${s.offsetWidth}px`,e.appendChild(o)}),e.style.width=`${i*2}px`)})})};document.readyState==="complete"?r():window.addEventListener("load",r,{once:!0})};var Ph=()=>{let r=document.querySelectorAll("[data-contact-popup-toggler]"),t=document.querySelector("[data-contact-popup]");var e=0;if(!r||!t)return;let n=t.querySelector("[data-contact-popup-close]");if(!n)return;let i=t.querySelector(".contact-popup_box");if(!i)return;let s=(o,a)=>{let l=document.createElement("script"),c=document.getElementsByTagName("script")[0];l.async=1,l.onload=l.onreadystatechange=(u,h)=>{(h||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,h||a&&a())},l.src=o,c.parentNode.insertBefore(l,c)};r.forEach(o=>{o.addEventListener("click",a=>{a.preventDefault,e?(t.classList.add("-open"),document.body.classList.add("-popup-open")):s("https://embed.typeform.com/next/embed.js",()=>{e=1,t.classList.add("-open"),document.body.classList.add("-popup-open")})})}),n.addEventListener("click",o=>{o.preventDefault,t.classList.remove("-open"),document.body.classList.remove("-popup-open")}),t.addEventListener("click",o=>{i.contains(o.target)||(t.classList.remove("-open"),document.body.classList.remove("-popup-open"))}),new URL(document.location).searchParams.has("invicible")&&setTimeout(()=>{s("https://embed.typeform.com/next/embed.js",()=>{e=1,setTimeout(()=>{t.classList.add("-open"),document.body.classList.add("-popup-open")},200)})},2e3)};function _i(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function zh(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var Sn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},jr={duration:.5,overwrite:!1,delay:0},nc,Ke,Me,Un=1e8,ge=1/Un,Xl=Math.PI*2,Wm=Xl/4,Xm=0,kh=Math.sqrt,qm=Math.cos,Ym=Math.sin,Ue=function(t){return typeof t=="string"},Ae=function(t){return typeof t=="function"},vi=function(t){return typeof t=="number"},Qo=function(t){return typeof t>"u"},li=function(t){return typeof t=="object"},Mn=function(t){return t!==!1},ic=function(){return typeof window<"u"},Go=function(t){return Ae(t)||Ue(t)},Vh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Qe=Array.isArray,ql=/(?:-?\.?\d|\.)+/gi,rc=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,xr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Bl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,sc=/[+-]=-?[.\d]+/,Hh=/[^,'"\[\]\s]+/gi,Zm=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,we,oi,Yl,oc,Dn={},Yo={},Gh,Wh=function(t){return(Yo=_r(t,Dn))&&je},jo=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},eo=function(t,e){return!e&&console.warn(t)},Xh=function(t,e){return t&&(Dn[t]=e)&&Yo&&(Yo[t]=e)||Dn},no=function(){return 0},Jm={suppressEvents:!0,isStart:!0,kill:!1},Wo={suppressEvents:!0,kill:!1},$m={suppressEvents:!0},ac={},ki=[],Zl={},qh,vn={},zl={},Ih=30,Xo=[],lc="",cc=function(t){var e=t[0],n,i;if(li(e)||Ae(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=Xo.length;i--&&!Xo[i].targetTest(e););n=Xo[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new fc(t[i],n)))||t.splice(i,1);return t},Vi=function(t){return t._gsap||cc(On(t))[0]._gsap},uc=function(t,e,n){return(n=t[e])&&Ae(n)?t[e]():Qo(n)&&t.getAttribute&&t.getAttribute(e)||n},ln=function(t,e){return(t=t.split(",")).forEach(e)||t},De=function(t){return Math.round(t*1e5)/1e5||0},Ve=function(t){return Math.round(t*1e7)/1e7||0},vr=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),n==="+"?t+i:n==="-"?t-i:n==="*"?t*i:t/i},Km=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},Zo=function(){var t=ki.length,e=ki.slice(0),n,i;for(Zl={},ki.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},Yh=function(t,e,n,i){ki.length&&!Ke&&Zo(),t.render(e,n,i||Ke&&e<0&&(t._initted||t._startAt)),ki.length&&!Ke&&Zo()},Zh=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(Hh).length<2?e:Ue(t)?t.trim():t},Jh=function(t){return t},Bn=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Qm=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},_r=function(t,e){for(var n in e)t[n]=e[n];return t},Lh=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=li(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},Jo=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Qs=function(t){var e=t.parent||we,n=t.keyframes?Qm(Qe(t.keyframes)):Bn;if(Mn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},jm=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},$h=function(t,e,n,i,s){n===void 0&&(n="_first"),i===void 0&&(i="_last");var o=t[i],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=o,e.parent=e._dp=t,e},ta=function(t,e,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var s=e._prev,o=e._next;s?s._next=o:t[n]===e&&(t[n]=o),o?o._prev=s:t[i]===e&&(t[i]=s),e._next=e._prev=e.parent=null},Hi=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},pr=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},tg=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Jl=function(t,e,n,i){return t._startAt&&(Ke?t._startAt.revert(Wo):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},eg=function r(t){return!t||t._ts&&r(t.parent)},Fh=function(t){return t._repeat?ts(t._tTime,t=t.duration()+t._rDelay)*t:0},ts=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},$o=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},ea=function(t){return t._end=Ve(t._start+(t._tDur/Math.abs(t._ts||t._rts||ge)||0))},na=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Ve(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),ea(t),n._dirty||pr(n,t)),t},Kh=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=$o(t.rawTime(),e),(!e._dur||so(0,e.totalDuration(),n)-e._tTime>ge)&&e.render(n,!0)),pr(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-ge}},ai=function(t,e,n,i){return e.parent&&Hi(e),e._start=Ve((vi(n)?n:n||t!==we?Nn(t,n,e):t._time)+e._delay),e._end=Ve(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),$h(t,e,"_first","_last",t._sort?"_start":0),$l(e)||(t._recent=e),i||Kh(t,e),t._ts<0&&na(t,t._tTime),t},Qh=function(t,e){return(Dn.ScrollTrigger||jo("scrollTrigger",e))&&Dn.ScrollTrigger.create(e,t)},jh=function(t,e,n,i,s){if(mc(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!Ke&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&qh!==yn.frame)return ki.push(t),t._lazy=[s,i],1},ng=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},$l=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},ig=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&ng(t)&&!(!t._initted&&$l(t))||(t._ts<0||t._dp._ts<0)&&!$l(t))?0:1,a=t._rDelay,l=0,c,u,h;if(a&&t._repeat&&(l=so(0,t._tDur,e),u=ts(l,a),t._yoyo&&u&1&&(o=1-o),u!==ts(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||Ke||i||t._zTime===ge||!e&&t._zTime){if(!t._initted&&jh(t,e,i,n,l))return;for(h=t._zTime,t._zTime=e||(n?ge:0),n||(n=e&&!h),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,c=t._pt;c;)c.r(o,c.d),c=c._next;e<0&&Jl(t,e,n,!0),t._onUpdate&&!n&&An(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&An(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&Hi(t,1),!n&&!Ke&&(An(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},rg=function(t,e,n){var i;if(n>e)for(i=t._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<e)return i;i=i._prev}},es=function(t,e,n,i){var s=t._repeat,o=Ve(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Ve(o*(s+1)+t._rDelay*s):o,a>0&&!i&&na(t,t._tTime=t._tDur*a),t.parent&&ea(t),n||pr(t.parent,t),t},Nh=function(t){return t instanceof qe?pr(t):es(t,t._dur)},sg={_start:0,endTime:no,totalDuration:no},Nn=function r(t,e,n){var i=t.labels,s=t._recent||sg,o=t.duration()>=Un?s.endTime(!1):t._dur,a,l,c;return Ue(e)&&(isNaN(e)||e in i)?(l=e.charAt(0),c=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(c?(a<0?s:n).totalDuration()/100:1)):a<0?(e in i||(i[e]=o),i[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),c&&n&&(l=l/100*(Qe(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},js=function(t,e,n){var i=vi(e[1]),s=(i?2:1)+(t<2?0:1),o=e[s],a,l;if(i&&(o.duration=e[1]),o.parent=n,t){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Mn(l.vars.inherit)&&l.parent;o.immediateRender=Mn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Re(e[0],o,e[s+1])},Gi=function(t,e){return t||t===0?e(t):e},so=function(t,e,n){return n<t?t:n>e?e:n},Ye=function(t,e){return!Ue(t)||!(e=Zm.exec(t))?"":e[1]},og=function(t,e,n){return Gi(n,function(i){return so(t,e,i)})},Kl=[].slice,tf=function(t,e){return t&&li(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&li(t[0]))&&!t.nodeType&&t!==oi},ag=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return Ue(i)&&!e||tf(i,1)?(s=n).push.apply(s,On(i)):n.push(i)})||n},On=function(t,e,n){return Me&&!e&&Me.selector?Me.selector(t):Ue(t)&&!n&&(Yl||!ns())?Kl.call((e||oc).querySelectorAll(t),0):Qe(t)?ag(t,n):tf(t)?Kl.call(t,0):t?[t]:[]},Ql=function(t){return t=On(t)[0]||eo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return On(e,n.querySelectorAll?n:n===t?eo("Invalid scope")||oc.createElement("div"):t)}},ef=function(t){return t.sort(function(){return .5-Math.random()})},nf=function(t){if(Ae(t))return t;var e=li(t)?t:{each:t},n=mr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,u=i,h=i;return Ue(i)?u=h={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(u=i[0],h=i[1]),function(f,d,_){var g=(_||e).length,p=o[g],m,S,v,M,D,T,E,R,y;if(!p){if(y=e.grid==="auto"?0:(e.grid||[1,Un])[1],!y){for(E=-Un;E<(E=_[y++].getBoundingClientRect().left)&&y<g;);y<g&&y--}for(p=o[g]=[],m=l?Math.min(y,g)*u-.5:i%y,S=y===Un?0:l?g*h/y-.5:i/y|0,E=0,R=Un,T=0;T<g;T++)v=T%y-m,M=S-(T/y|0),p[T]=D=c?Math.abs(c==="y"?M:v):kh(v*v+M*M),D>E&&(E=D),D<R&&(R=D);i==="random"&&ef(p),p.max=E-R,p.min=R,p.v=g=(parseFloat(e.amount)||parseFloat(e.each)*(y>g?g-1:c?c==="y"?g/y:y:Math.max(y,g/y))||0)*(i==="edges"?-1:1),p.b=g<0?s-g:s,p.u=Ye(e.amount||e.each)||0,n=n&&g<0?ff(n):n}return g=(p[f]-p.min)/p.max||0,Ve(p.b+(n?n(g):g)*p.v)+p.u}},jl=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Ve(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(vi(n)?0:Ye(n))}},rf=function(t,e){var n=Qe(t),i,s;return!n&&li(t)&&(i=n=t.radius||Un,t.values?(t=On(t.values),(s=!vi(t[0]))&&(i*=i)):t=jl(t.increment)),Gi(e,n?Ae(t)?function(o){return s=t(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=Un,u=0,h=t.length,f,d;h--;)s?(f=t[h].x-a,d=t[h].y-l,f=f*f+d*d):f=Math.abs(t[h]-a),f<c&&(c=f,u=h);return u=!i||c<=i?t[u]:o,s||u===o||vi(o)?u:u+Ye(o)}:jl(t))},sf=function(t,e,n,i){return Gi(Qe(t)?!e:n===!0?!!(n=0):!i,function(){return Qe(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+n*.99))/n)*n*i)/i})},lg=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return e.reduce(function(s,o){return o(s)},i)}},cg=function(t,e){return function(n){return t(parseFloat(n))+(e||Ye(n))}},ug=function(t,e,n){return af(t,e,0,1,n)},of=function(t,e,n){return Gi(n,function(i){return t[~~e(i)]})},hg=function r(t,e,n){var i=e-t;return Qe(t)?of(t,r(0,t.length),e):Gi(n,function(s){return(i+(s-t)%i)%i+t})},fg=function r(t,e,n){var i=e-t,s=i*2;return Qe(t)?of(t,r(0,t.length-1),e):Gi(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},is=function(t){for(var e=0,n="",i,s,o,a;~(i=t.indexOf("random(",e));)o=t.indexOf(")",i),a=t.charAt(i+7)==="[",s=t.substr(i+7,o-i-7).match(a?Hh:ql),n+=t.substr(e,i-e)+sf(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},af=function(t,e,n,i,s){var o=e-t,a=i-n;return Gi(s,function(l){return n+((l-t)/o*a||0)})},dg=function r(t,e,n,i){var s=isNaN(t+e)?0:function(d){return(1-d)*t+d*e};if(!s){var o=Ue(t),a={},l,c,u,h,f;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(Qe(t)&&!Qe(e)){for(u=[],h=t.length,f=h-2,c=1;c<h;c++)u.push(r(t[c-1],t[c]));h--,s=function(_){_*=h;var g=Math.min(f,~~_);return u[g](_-g)},n=e}else i||(t=_r(Qe(t)?[]:{},t));if(!u){for(l in e)dc.call(a,t,l,"get",e[l]);s=function(_){return xc(_,a)||(o?t.p:t)}}}return Gi(n,s)},Uh=function(t,e,n){var i=t.labels,s=Un,o,a,l;for(o in i)a=i[o]-e,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},An=function(t,e,n){var i=t.vars,s=i[e],o=Me,a=t._ctx,l,c,u;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&ki.length&&Zo(),a&&(Me=a),u=l?s.apply(c,l):s.call(c),Me=o,u},$s=function(t){return Hi(t),t.scrollTrigger&&t.scrollTrigger.kill(!!Ke),t.progress()<1&&An(t,"onInterrupt"),t},Qr,lf=[],cf=function(t){if(t)if(t=!t.name&&t.default||t,ic()||t.headless){var e=t.name,n=Ae(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:no,render:xc,add:dc,kill:Cg,modifier:Dg,rawVars:0},o={targetTest:0,get:0,getSetter:ia,aliases:{},register:0};if(ns(),t!==i){if(vn[e])return;Bn(i,Bn(Jo(t,s),o)),_r(i.prototype,_r(s,Jo(t,o))),vn[i.prop=e]=i,t.targetTest&&(Xo.push(i),ac[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Xh(e,i),t.register&&t.register(je,i,cn)}else lf.push(t)},de=255,Ks={aqua:[0,de,de],lime:[0,de,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,de],navy:[0,0,128],white:[de,de,de],olive:[128,128,0],yellow:[de,de,0],orange:[de,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[de,0,0],pink:[de,192,203],cyan:[0,de,de],transparent:[de,de,de,0]},kl=function(t,e,n){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(n-e)*t*6:t<.5?n:t*3<2?e+(n-e)*(2/3-t)*6:e)*de+.5|0},uf=function(t,e,n){var i=t?vi(t)?[t>>16,t>>8&de,t&de]:0:Ks.black,s,o,a,l,c,u,h,f,d,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Ks[t])i=Ks[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&de,i&de,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&de,t&de]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(ql),!e)l=+i[0]%360/360,c=+i[1]/100,u=+i[2]/100,o=u<=.5?u*(c+1):u+c-u*c,s=u*2-o,i.length>3&&(i[3]*=1),i[0]=kl(l+1/3,s,o),i[1]=kl(l,s,o),i[2]=kl(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(rc),n&&i.length<4&&(i[3]=1),i}else i=t.match(ql)||Ks.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/de,o=i[1]/de,a=i[2]/de,h=Math.max(s,o,a),f=Math.min(s,o,a),u=(h+f)/2,h===f?l=c=0:(d=h-f,c=u>.5?d/(2-h-f):d/(h+f),l=h===s?(o-a)/d+(o<a?6:0):h===o?(a-s)/d+2:(s-o)/d+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(u*100+.5)),n&&i.length<4&&(i[3]=1),i},hf=function(t){var e=[],n=[],i=-1;return t.split(xi).forEach(function(s){var o=s.match(xr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},Oh=function(t,e,n){var i="",s=(t+i).match(xi),o=e?"hsla(":"rgba(",a=0,l,c,u,h;if(!s)return t;if(s=s.map(function(f){return(f=uf(f,e,1))&&o+(e?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(u=hf(t),l=n.c,l.join(i)!==u.c.join(i)))for(c=t.replace(xi,"1").split(xr),h=c.length-1;a<h;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:n).shift());if(!c)for(c=t.split(xi),h=c.length-1;a<h;a++)i+=c[a]+s[a];return i+c[h]},xi=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Ks)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),pg=/hsl[a]?\(/,hc=function(t){var e=t.join(" "),n;if(xi.lastIndex=0,xi.test(e))return n=pg.test(e),t[1]=Oh(t[1],n),t[0]=Oh(t[0],n,hf(t[1])),!0},io,yn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,u,h,f,d,_=function g(p){var m=r()-i,S=p===!0,v,M,D,T;if((m>t||m<0)&&(n+=m-e),i+=m,D=i-n,v=D-o,(v>0||S)&&(T=++h.frame,f=D-h.time*1e3,h.time=D=D/1e3,o+=v+(v>=s?4:s-v),M=1),S||(l=c(g)),M)for(d=0;d<a.length;d++)a[d](D,f,T,p)};return h={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(p){return f/(1e3/(p||60))},wake:function(){Gh&&(!Yl&&ic()&&(oi=Yl=window,oc=oi.document||{},Dn.gsap=je,(oi.gsapVersions||(oi.gsapVersions=[])).push(je.version),Wh(Yo||oi.GreenSockGlobals||!oi.gsap&&oi||{}),lf.forEach(cf)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),c=u||function(p){return setTimeout(p,o-h.time*1e3+1|0)},io=1,_(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),io=0,c=no},lagSmoothing:function(p,m){t=p||1/0,e=Math.min(m||33,t)},fps:function(p){s=1e3/(p||240),o=h.time*1e3+s},add:function(p,m,S){var v=m?function(M,D,T,E){p(M,D,T,E),h.remove(v)}:p;return h.remove(p),a[S?"unshift":"push"](v),ns(),v},remove:function(p,m){~(m=a.indexOf(p))&&a.splice(m,1)&&d>=m&&d--},_listeners:a},h}(),ns=function(){return!io&&yn.wake()},ee={},mg=/^[\d.\-M][\d.\-,\s]/,gg=/["']/g,_g=function(t){for(var e={},n=t.substr(1,t.length-3).split(":"),i=n[0],s=1,o=n.length,a,l,c;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),e[i]=isNaN(c)?c.replace(gg,"").trim():+c,i=l.substr(a+1).trim();return e},xg=function(t){var e=t.indexOf("(")+1,n=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<n?t.indexOf(")",n+1):n)},vg=function(t){var e=(t+"").split("("),n=ee[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[_g(e[1])]:xg(t).split(",").map(Zh)):ee._CE&&mg.test(t)?ee._CE("",t):n},ff=function(t){return function(e){return 1-t(1-e)}},df=function r(t,e){for(var n=t._first,i;n;)n instanceof qe?r(n,e):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==e&&(n.timeline?r(n.timeline,e):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=e)),n=n._next},mr=function(t,e){return t&&(Ae(t)?t:ee[t]||vg(t))||e},yr=function(t,e,n,i){n===void 0&&(n=function(l){return 1-e(1-l)}),i===void 0&&(i=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:n,easeInOut:i},o;return ln(t,function(a){ee[a]=Dn[a]=s,ee[o=a.toLowerCase()]=n;for(var l in s)ee[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=ee[a+"."+l]=s[l]}),s},pf=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},Vl=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/Xl*(Math.asin(1/i)||0),a=function(u){return u===1?1:i*Math.pow(2,-10*u)*Ym((u-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:pf(a);return s=Xl/s,l.config=function(c,u){return r(t,c,u)},l},Hl=function r(t,e){e===void 0&&(e=1.70158);var n=function(o){return o?--o*o*((e+1)*o+e)+1:0},i=t==="out"?n:t==="in"?function(s){return 1-n(1-s)}:pf(n);return i.config=function(s){return r(t,s)},i};ln("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;yr(r+",Power"+(e-1),t?function(n){return Math.pow(n,e)}:function(n){return n},function(n){return 1-Math.pow(1-n,e)},function(n){return n<.5?Math.pow(n*2,e)/2:1-Math.pow((1-n)*2,e)/2})});ee.Linear.easeNone=ee.none=ee.Linear.easeIn;yr("Elastic",Vl("in"),Vl("out"),Vl());(function(r,t){var e=1/t,n=2*e,i=2.5*e,s=function(a){return a<e?r*a*a:a<n?r*Math.pow(a-1.5/t,2)+.75:a<i?r*(a-=2.25/t)*a+.9375:r*Math.pow(a-2.625/t,2)+.984375};yr("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);yr("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});yr("Circ",function(r){return-(kh(1-r*r)-1)});yr("Sine",function(r){return r===1?1:-qm(r*Wm)+1});yr("Back",Hl("in"),Hl("out"),Hl());ee.SteppedEase=ee.steps=Dn.SteppedEase={config:function(t,e){t===void 0&&(t=1);var n=1/t,i=t+(e?0:1),s=e?1:0,o=1-ge;return function(a){return((i*so(0,o,a)|0)+s)*n}}};jr.ease=ee["quad.out"];ln("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return lc+=r+","+r+"Params,"});var fc=function(t,e){this.id=Xm++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:uc,this.set=e?e.getSetter:ia},ro=function(){function r(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,es(this,+e.duration,1,1),this.data=e.data,Me&&(this._ctx=Me,Me.data.push(this)),io||yn.wake()}var t=r.prototype;return t.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},t.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},t.totalDuration=function(n){return arguments.length?(this._dirty=0,es(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(ns(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(na(this,n),!s._dp||s.parent||Kh(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&ai(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===ge||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Yh(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+Fh(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},t.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+Fh(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(n,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,i):this._repeat?ts(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-ge?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?$o(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-ge?0:this._rts,this.totalTime(so(-Math.abs(this._delay),this._tDur,s),i!==!1),ea(this),tg(this)},t.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ns(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==ge&&(this._tTime-=ge)))),this):this._ps},t.startTime=function(n){if(arguments.length){this._start=n;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&ai(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Mn(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?$o(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=$m);var i=Ke;return Ke=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),Ke=i,this},t.globalTime=function(n){for(var i=this,s=arguments.length?n:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},t.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Nh(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,Nh(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},t.seek=function(n,i){return this.totalTime(Nn(this,n),Mn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Mn(i))},t.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},t.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-ge:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-ge,this},t.isActive=function(){var n=this.parent||this._dp,i=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=i&&s<this.endTime(!0)-ge)},t.eventCallback=function(n,i,s){var o=this.vars;return arguments.length>1?(i?(o[n]=i,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=i)):delete o[n],this):o[n]},t.then=function(n){var i=this;return new Promise(function(s){var o=Ae(n)?n:Jh,a=function(){var c=i.then;i.then=null,Ae(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},t.kill=function(){$s(this)},r}();Bn(ro.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-ge,_prom:0,_ps:!1,_rts:1});var qe=function(r){zh(t,r);function t(n,i){var s;return n===void 0&&(n={}),s=r.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Mn(n.sortChildren),we&&ai(n.parent||we,_i(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&Qh(_i(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return js(0,arguments,this),this},e.from=function(i,s,o){return js(1,arguments,this),this},e.fromTo=function(i,s,o,a){return js(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Qs(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Re(i,s,Nn(this,o),1),this},e.call=function(i,s,o){return ai(this,Re.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new Re(i,o,Nn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,u){return o.runBackwards=1,Qs(o).immediateRender=Mn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,u)},e.staggerFromTo=function(i,s,o,a,l,c,u,h){return a.startAt=o,Qs(a).immediateRender=Mn(a.immediateRender),this.staggerTo(i,s,a,l,c,u,h)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=i<=0?0:Ve(i),h=this._zTime<0!=i<0&&(this._initted||!c),f,d,_,g,p,m,S,v,M,D,T,E;if(this!==we&&u>l&&i>=0&&(u=l),u!==this._tTime||o||h){if(a!==this._time&&c&&(u+=this._time-a,i+=this._time-a),f=u,M=this._start,v=this._ts,m=!v,h&&(c||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(T=this._yoyo,p=c+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(p*100+i,s,o);if(f=Ve(u%p),u===l?(g=this._repeat,f=c):(g=~~(u/p),g&&g===u/p&&(f=c,g--),f>c&&(f=c)),D=ts(this._tTime,p),!a&&this._tTime&&D!==g&&this._tTime-D*p-this._dur<=0&&(D=g),T&&g&1&&(f=c-f,E=1),g!==D&&!this._lock){var R=T&&D&1,y=R===(T&&g&1);if(g<D&&(R=!R),a=R?0:u%c?c:u,this._lock=1,this.render(a||(E?0:Ve(g*p)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&An(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),a&&a!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,y&&(this._lock=2,a=R?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;df(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=rg(this,Ve(a),Ve(f)),S&&(u-=f-(f=S._start))),this._tTime=u,this._time=f,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&f&&!s&&!g&&(An(this,"onStart"),this._tTime!==u))return this;if(f>=a&&i>=0)for(d=this._first;d;){if(_=d._next,(d._act||f>=d._start)&&d._ts&&S!==d){if(d.parent!==this)return this.render(i,s,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,s,o),f!==this._time||!this._ts&&!m){S=0,_&&(u+=this._zTime=-ge);break}}d=_}else{d=this._last;for(var x=i<0?i:f;d;){if(_=d._prev,(d._act||x<=d._end)&&d._ts&&S!==d){if(d.parent!==this)return this.render(i,s,o);if(d.render(d._ts>0?(x-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(x-d._start)*d._ts,s,o||Ke&&(d._initted||d._startAt)),f!==this._time||!this._ts&&!m){S=0,_&&(u+=this._zTime=x?-ge:ge);break}}d=_}}if(S&&!s&&(this.pause(),S.render(f>=a?0:-ge)._zTime=f>=a?1:-1,this._ts))return this._start=M,ea(this),this.render(i,s,o);this._onUpdate&&!s&&An(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(M===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&Hi(this,1),!s&&!(i<0&&!a)&&(u||a||!l)&&(An(this,u===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(vi(s)||(s=Nn(this,s,i)),!(i instanceof ro)){if(Qe(i))return i.forEach(function(a){return o.add(a,s)}),this;if(Ue(i))return this.addLabel(i,s);if(Ae(i))i=Re.delayedCall(0,i);else return this}return this!==i?ai(this,i,s):this},e.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-Un);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Re?s&&l.push(c):(o&&l.push(c),i&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},e.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},e.remove=function(i){return Ue(i)?this.removeLabel(i):Ae(i)?this.killTweensOf(i):(ta(this,i),i===this._recent&&(this._recent=this._last),pr(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ve(yn.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),r.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},e.addLabel=function(i,s){return this.labels[i]=Nn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Re.delayedCall(0,s||no,o);return a.data="isPause",this._hasPause=1,ai(this,a,Nn(this,i))},e.removePause=function(i){var s=this._first;for(i=Nn(this,i);s;)s._start===i&&s.data==="isPause"&&Hi(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)zi!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=On(i),l=this._first,c=vi(s),u;l;)l instanceof Re?Km(l._targets,a)&&(c?(!zi||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Nn(o,i),l=s,c=l.startAt,u=l.onStart,h=l.onStartParams,f=l.immediateRender,d,_=Re.to(o,Bn({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||ge,onStart:function(){if(o.pause(),!d){var p=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==p&&es(_,p,0,1).render(_._time,!0,!0),d=1}u&&u.apply(_,h||[])}},s));return f?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,Bn({startAt:{time:Nn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),Uh(this,Nn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),Uh(this,Nn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+ge)},e.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=i);return pr(this)},e.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return r.prototype.invalidate.call(this,i)},e.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),pr(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=Un,c,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(h=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,ai(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(s-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;es(o,o===we&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(we._ts&&(Yh(we,$o(i,we)),qh=yn.frame),yn.frame>=Ih){Ih+=Sn.autoSleep||120;var s=we._first;if((!s||!s._ts)&&Sn.autoSleep&&yn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||yn.sleep()}}},t}(ro);Bn(qe.prototype,{_lock:0,_hasPause:0,_forcing:0});var yg=function(t,e,n,i,s,o,a){var l=new cn(this._pt,t,e,0,1,_c,null,s),c=0,u=0,h,f,d,_,g,p,m,S;for(l.b=n,l.e=i,n+="",i+="",(m=~i.indexOf("random("))&&(i=is(i)),o&&(S=[n,i],o(S,t,e),n=S[0],i=S[1]),f=n.match(Bl)||[];h=Bl.exec(i);)_=h[0],g=i.substring(c,h.index),d?d=(d+1)%5:g.substr(-5)==="rgba("&&(d=1),_!==f[u++]&&(p=parseFloat(f[u-1])||0,l._pt={_next:l._pt,p:g||u===1?g:",",s:p,c:_.charAt(1)==="="?vr(p,_)-p:parseFloat(_)-p,m:d&&d<4?Math.round:0},c=Bl.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(sc.test(i)||m)&&(l.e=0),this._pt=l,l},dc=function(t,e,n,i,s,o,a,l,c,u){Ae(i)&&(i=i(s||0,t,o));var h=t[e],f=n!=="get"?n:Ae(h)?c?t[e.indexOf("set")||!Ae(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():h,d=Ae(h)?c?Eg:_f:gc,_;if(Ue(i)&&(~i.indexOf("random(")&&(i=is(i)),i.charAt(1)==="="&&(_=vr(f,i)+(Ye(f)||0),(_||_===0)&&(i=_))),!u||f!==i||tc)return!isNaN(f*i)&&i!==""?(_=new cn(this._pt,t,e,+f||0,i-(f||0),typeof h=="boolean"?Ag:xf,0,d),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!h&&!(e in t)&&jo(e,i),yg.call(this,t,e,f,i,d,l||Sn.stringFilter,c))},Mg=function(t,e,n,i,s){if(Ae(t)&&(t=to(t,s,e,n,i)),!li(t)||t.style&&t.nodeType||Qe(t)||Vh(t))return Ue(t)?to(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=to(t[a],s,e,n,i);return o},pc=function(t,e,n,i,s,o){var a,l,c,u;if(vn[t]&&(a=new vn[t]).init(s,a.rawVars?e[t]:Mg(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new cn(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==Qr))for(c=n._ptLookup[n._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},zi,tc,mc=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,u=i.runBackwards,h=i.yoyoEase,f=i.keyframes,d=i.autoRevert,_=t._dur,g=t._startAt,p=t._targets,m=t.parent,S=m&&m.data==="nested"?m.vars.targets:p,v=t._overwrite==="auto"&&!nc,M=t.timeline,D,T,E,R,y,x,L,F,P,B,X,G,J;if(M&&(!f||!s)&&(s="none"),t._ease=mr(s,jr.ease),t._yEase=h?ff(mr(h===!0?s:h,jr.ease)):0,h&&t._yoyo&&!t._repeat&&(h=t._yEase,t._yEase=t._ease,t._ease=h),t._from=!M&&!!i.runBackwards,!M||f&&!i.stagger){if(F=p[0]?Vi(p[0]).harness:0,G=F&&i[F.prop],D=Jo(i,ac),g&&(g._zTime<0&&g.progress(1),e<0&&u&&a&&!d?g.render(-1,!0):g.revert(u&&_?Wo:Jm),g._lazy=0),o){if(Hi(t._startAt=Re.set(p,Bn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!g&&Mn(l),startAt:null,delay:0,onUpdate:c&&function(){return An(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Ke||!a&&!d)&&t._startAt.revert(Wo),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(u&&_&&!g){if(e&&(a=!1),E=Bn({overwrite:!1,data:"isFromStart",lazy:a&&!g&&Mn(l),immediateRender:a,stagger:0,parent:m},D),G&&(E[F.prop]=G),Hi(t._startAt=Re.set(p,E)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Ke?t._startAt.revert(Wo):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,ge,ge);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Mn(l)||l&&!_,T=0;T<p.length;T++){if(y=p[T],L=y._gsap||cc(p)[T]._gsap,t._ptLookup[T]=B={},Zl[L.id]&&ki.length&&Zo(),X=S===p?T:S.indexOf(y),F&&(P=new F).init(y,G||D,t,X,S)!==!1&&(t._pt=R=new cn(t._pt,y,P.name,0,1,P.render,P,0,P.priority),P._props.forEach(function(U){B[U]=R}),P.priority&&(x=1)),!F||G)for(E in D)vn[E]&&(P=pc(E,D,t,X,y,S))?P.priority&&(x=1):B[E]=R=dc.call(t,y,E,"get",D[E],X,S,0,i.stringFilter);t._op&&t._op[T]&&t.kill(y,t._op[T]),v&&t._pt&&(zi=t,we.killTweensOf(y,B,t.globalTime(e)),J=!t.parent,zi=0),t._pt&&l&&(Zl[L.id]=1)}x&&vc(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!J,f&&e<=0&&M.render(Un,!0,!0)},Sg=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],u,h,f,d;if(!c)for(c=t._ptCache[e]=[],f=t._ptLookup,d=t._targets.length;d--;){if(u=f[d][e],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return tc=1,t.vars[e]="+=0",mc(t,a),tc=0,l?eo(e+" not eligible for reset"):1;c.push(u)}for(d=c.length;d--;)h=c[d],u=h._pt||h,u.s=(i||i===0)&&!s?i:u.s+(i||0)+o*u.c,u.c=n-u.s,h.e&&(h.e=De(n)+Ye(h.e)),h.b&&(h.b=u.s+Ye(h.b))},bg=function(t,e){var n=t[0]?Vi(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=_r({},e);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},wg=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(Qe(e))a=n[t]||(n[t]=[]),e.forEach(function(l,c){return a.push({t:c/(e.length-1)*100,v:l,e:s})});else for(o in e)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},to=function(t,e,n,i,s){return Ae(t)?t.call(e,n,i,s):Ue(t)&&~t.indexOf("random(")?is(t):t},mf=lc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",gf={};ln(mf+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return gf[r]=1});var Re=function(r){zh(t,r);function t(n,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=r.call(this,o?i:Qs(i))||this;var l=a.vars,c=l.duration,u=l.delay,h=l.immediateRender,f=l.stagger,d=l.overwrite,_=l.keyframes,g=l.defaults,p=l.scrollTrigger,m=l.yoyoEase,S=i.parent||we,v=(Qe(n)||Vh(n)?vi(n[0]):"length"in i)?[n]:On(n),M,D,T,E,R,y,x,L;if(a._targets=v.length?cc(v):eo("GSAP target "+n+" not found. https://gsap.com",!Sn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,_||f||Go(c)||Go(u)){if(i=a.vars,M=a.timeline=new qe({data:"nested",defaults:g||{},targets:S&&S.data==="nested"?S.vars.targets:v}),M.kill(),M.parent=M._dp=_i(a),M._start=0,f||Go(c)||Go(u)){if(E=v.length,x=f&&nf(f),li(f))for(R in f)~mf.indexOf(R)&&(L||(L={}),L[R]=f[R]);for(D=0;D<E;D++)T=Jo(i,gf),T.stagger=0,m&&(T.yoyoEase=m),L&&_r(T,L),y=v[D],T.duration=+to(c,_i(a),D,y,v),T.delay=(+to(u,_i(a),D,y,v)||0)-a._delay,!f&&E===1&&T.delay&&(a._delay=u=T.delay,a._start+=u,T.delay=0),M.to(y,T,x?x(D,y,v):0),M._ease=ee.none;M.duration()?c=u=0:a.timeline=0}else if(_){Qs(Bn(M.vars.defaults,{ease:"none"})),M._ease=mr(_.ease||i.ease||"none");var F=0,P,B,X;if(Qe(_))_.forEach(function(G){return M.to(v,G,">")}),M.duration();else{T={};for(R in _)R==="ease"||R==="easeEach"||wg(R,_[R],T,_.easeEach);for(R in T)for(P=T[R].sort(function(G,J){return G.t-J.t}),F=0,D=0;D<P.length;D++)B=P[D],X={ease:B.e,duration:(B.t-(D?P[D-1].t:0))/100*c},X[R]=B.v,M.to(v,X,F),F+=X.duration;M.duration()<c&&M.to({},{duration:c-M.duration()})}}c||a.duration(c=M.duration())}else a.timeline=0;return d===!0&&!nc&&(zi=_i(a),we.killTweensOf(v),zi=0),ai(S,_i(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(h||!c&&!_&&a._start===Ve(S._time)&&Mn(h)&&eg(_i(a))&&S.data!=="nested")&&(a._tTime=-ge,a.render(Math.max(0,-u)||0)),p&&Qh(_i(a),p),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,u=i<0,h=i>l-ge&&!u?l:i<ge?0:i,f,d,_,g,p,m,S,v,M;if(!c)ig(this,i,s,o);else if(h!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u){if(f=h,v=this.timeline,this._repeat){if(g=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(g*100+i,s,o);if(f=Ve(h%g),h===l?(_=this._repeat,f=c):(_=~~(h/g),_&&_===Ve(h/g)&&(f=c,_--),f>c&&(f=c)),m=this._yoyo&&_&1,m&&(M=this._yEase,f=c-f),p=ts(this._tTime,g),f===a&&!o&&this._initted&&_===p)return this._tTime=h,this;_!==p&&(v&&this._yEase&&df(v,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==g&&this._initted&&(this._lock=o=1,this.render(Ve(g*_),!0).invalidate()._lock=0))}if(!this._initted){if(jh(this,u?i:f,o,s,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==p))return this;if(c!==this._dur)return this.render(i,s,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=S=(M||this._ease)(f/c),this._from&&(this.ratio=S=1-S),f&&!a&&!s&&!_&&(An(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(S,d.d),d=d._next;v&&v.render(i<0?i:v._dur*v._ease(f/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(u&&Jl(this,i,s,o),An(this,"onUpdate")),this._repeat&&_!==p&&this.vars.onRepeat&&!s&&this.parent&&An(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&Jl(this,i,!0,!0),(i||!c)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Hi(this,1),!s&&!(u&&!a)&&(h||a||m)&&(An(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),r.prototype.invalidate.call(this,i)},e.resetTo=function(i,s,o,a,l){io||yn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||mc(this,c),u=this._ease(c/this._dur),Sg(this,i,s,o,a,u,c,l)?this.resetTo(i,s,o,a,1):(na(this,0),this.parent||$h(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?$s(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,zi&&zi.vars.overwrite!==!0)._first||$s(this),this.parent&&o!==this.timeline.totalDuration()&&es(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?On(i):a,c=this._ptLookup,u=this._pt,h,f,d,_,g,p,m;if((!s||s==="all")&&jm(a,l))return s==="all"&&(this._pt=0),$s(this);for(h=this._op=this._op||[],s!=="all"&&(Ue(s)&&(g={},ln(s,function(S){return g[S]=1}),s=g),s=bg(a,s)),m=a.length;m--;)if(~l.indexOf(a[m])){f=c[m],s==="all"?(h[m]=s,_=f,d={}):(d=h[m]=h[m]||{},_=s);for(g in _)p=f&&f[g],p&&((!("kill"in p.d)||p.d.kill(g)===!0)&&ta(this,p,"_pt"),delete f[g]),d!=="all"&&(d[g]=1)}return this._initted&&!this._pt&&u&&$s(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return js(1,arguments)},t.delayedCall=function(i,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(i,s,o){return js(2,arguments)},t.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(i,s)},t.killTweensOf=function(i,s,o){return we.killTweensOf(i,s,o)},t}(ro);Bn(Re.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ln("staggerTo,staggerFrom,staggerFromTo",function(r){Re[r]=function(){var t=new qe,e=Kl.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var gc=function(t,e,n){return t[e]=n},_f=function(t,e,n){return t[e](n)},Eg=function(t,e,n,i){return t[e](i.fp,n)},Tg=function(t,e,n){return t.setAttribute(e,n)},ia=function(t,e){return Ae(t[e])?_f:Qo(t[e])&&t.setAttribute?Tg:gc},xf=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},Ag=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},_c=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(t===1&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round((n.s+n.c*t)*1e4)/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},xc=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Dg=function(t,e,n,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(t,e,n),s=o},Cg=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?ta(this,e,"_pt"):e.dep||(n=1),e=i;return!n},Rg=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},vc=function(t){for(var e=t._pt,n,i,s,o;e;){for(n=e._next,i=s;i&&i.pr>e.pr;)i=i._next;(e._prev=i?i._prev:o)?e._prev._next=e:s=e,(e._next=i)?i._prev=e:o=e,e=n}t._pt=s},cn=function(){function r(e,n,i,s,o,a,l,c,u){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||xf,this.d=l||this,this.set=c||gc,this.pr=u||0,this._next=e,e&&(e._prev=this)}var t=r.prototype;return t.modifier=function(n,i,s){this.mSet=this.mSet||this.set,this.set=Rg,this.m=n,this.mt=s,this.tween=i},r}();ln(lc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return ac[r]=1});Dn.TweenMax=Dn.TweenLite=Re;Dn.TimelineLite=Dn.TimelineMax=qe;we=new qe({sortChildren:!1,defaults:jr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Sn.stringFilter=hc;var gr=[],qo={},Pg=[],Bh=0,Ig=0,Gl=function(t){return(qo[t]||Pg).map(function(e){return e()})},ec=function(){var t=Date.now(),e=[];t-Bh>2&&(Gl("matchMediaInit"),gr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=oi.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),Gl("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),Bh=t,Gl("matchMedia"))},vf=function(){function r(e,n){this.selector=n&&Ql(n),this.data=[],this._r=[],this.isReverted=!1,this.id=Ig++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Ae(n)&&(s=i,i=n,n=Ae);var o=this,a=function(){var c=Me,u=o.selector,h;return c&&c!==o&&c.data.push(o),s&&(o.selector=Ql(s)),Me=o,h=i.apply(o,arguments),Ae(h)&&o._r.push(h),Me=c,o.selector=u,o.isReverted=!1,h};return o.last=a,n===Ae?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Me;Me=null,n(this),Me=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Re&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(n,i){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(n)}),l=s.data.length;l--;)c=s.data[l],c instanceof qe?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Re)&&c.revert&&c.revert(n);s._r.forEach(function(u){return u(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=gr.length;o--;)gr[o].id===this.id&&gr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),Lg=function(){function r(e){this.contexts=[],this.scope=e,Me&&Me.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){li(n)||(n={matches:n});var o=new vf(0,s||this.scope),a=o.conditions={},l,c,u;Me&&!o.selector&&(o.selector=Me.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?u=1:(l=oi.matchMedia(n[c]),l&&(gr.indexOf(o)<0&&gr.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(ec):l.addEventListener("change",ec)));return u&&i(o,function(h){return o.add(null,h)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),Ko={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(i){return cf(i)})},timeline:function(t){return new qe(t)},getTweensOf:function(t,e){return we.getTweensOf(t,e)},getProperty:function(t,e,n,i){Ue(t)&&(t=On(t)[0]);var s=Vi(t||{}).get,o=n?Jh:Zh;return n==="native"&&(n=""),t&&(e?o((vn[e]&&vn[e].get||s)(t,e,n,i)):function(a,l,c){return o((vn[a]&&vn[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=On(t),t.length>1){var i=t.map(function(u){return je.quickSetter(u,e,n)}),s=i.length;return function(u){for(var h=s;h--;)i[h](u)}}t=t[0]||{};var o=vn[e],a=Vi(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(u){var h=new o;Qr._pt=0,h.init(t,n?u+n:u,Qr,0,[t]),h.render(1,h),Qr._pt&&xc(1,Qr)}:a.set(t,l);return o?c:function(u){return c(t,l,n?u+n:u,a,1)}},quickTo:function(t,e,n){var i,s=je.to(t,_r((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,u){return s.resetTo(e,l,c,u)};return o.tween=s,o},isTweening:function(t){return we.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=mr(t.ease,jr.ease)),Lh(jr,t||{})},config:function(t){return Lh(Sn,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,s=t.defaults,o=t.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!vn[a]&&!Dn[a]&&eo(e+" effect requires "+a+" plugin.")}),zl[e]=function(a,l,c){return n(On(a),Bn(l||{},s),c)},o&&(qe.prototype[e]=function(a,l,c){return this.add(zl[e](a,li(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){ee[t]=mr(e)},parseEase:function(t,e){return arguments.length?mr(t,e):ee},getById:function(t){return we.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new qe(t),i,s;for(n.smoothChildTiming=Mn(t.smoothChildTiming),we.remove(n),n._dp=0,n._time=n._tTime=we._time,i=we._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Re&&i.vars.onComplete===i._targets[0]))&&ai(n,i,i._start-i._delay),i=s;return ai(we,n,0),n},context:function(t,e){return t?new vf(t,e):Me},matchMedia:function(t){return new Lg(t)},matchMediaRefresh:function(){return gr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||ec()},addEventListener:function(t,e){var n=qo[t]||(qo[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=qo[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:hg,wrapYoyo:fg,distribute:nf,random:sf,snap:rf,normalize:ug,getUnit:Ye,clamp:og,splitColor:uf,toArray:On,selector:Ql,mapRange:af,pipe:lg,unitize:cg,interpolate:dg,shuffle:ef},install:Wh,effects:zl,ticker:yn,updateRoot:qe.updateRoot,plugins:vn,globalTimeline:we,core:{PropTween:cn,globals:Xh,Tween:Re,Timeline:qe,Animation:ro,getCache:Vi,_removeLinkedListItem:ta,reverting:function(){return Ke},context:function(t){return t&&Me&&(Me.data.push(t),t._ctx=Me),Me},suppressOverwrites:function(t){return nc=t}}};ln("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return Ko[r]=Re[r]});yn.add(qe.updateRoot);Qr=Ko.to({},{duration:0});var Fg=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Ng=function(t,e){var n=t._targets,i,s,o;for(i in e)for(s=n.length;s--;)o=t._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=Fg(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},Wl=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(Ue(s)&&(l={},ln(s,function(u){return l[u]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}Ng(a,s)}}}},je=Ko.registerPlugin({name:"attr",init:function(t,e,n,i,s){var o,a,l;this.tween=n;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)Ke?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},Wl("roundProps",jl),Wl("modifiers"),Wl("snap",rf))||Ko;Re.version=qe.version=je.version="3.12.5";Gh=1;ic()&&ns();var Ug=ee.Power0,Og=ee.Power1,Bg=ee.Power2,zg=ee.Power3,kg=ee.Power4,Vg=ee.Linear,Hg=ee.Quad,Gg=ee.Cubic,Wg=ee.Quart,Xg=ee.Quint,qg=ee.Strong,Yg=ee.Elastic,Zg=ee.Back,Jg=ee.SteppedEase,$g=ee.Bounce,Kg=ee.Sine,Qg=ee.Expo,jg=ee.Circ;var yf,Wi,ss,Tc,wr,t_,Mf,Ac,e_=function(){return typeof window<"u"},Mi={},br=180/Math.PI,os=Math.PI/180,rs=Math.atan2,Sf=1e8,Dc=/([A-Z])/g,n_=/(left|right|width|margin|padding|x)/i,i_=/[\s,\(]\S/,ci={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Sc=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},r_=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},s_=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},o_=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Cf=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Rf=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},a_=function(t,e,n){return t.style[e]=n},l_=function(t,e,n){return t.style.setProperty(e,n)},c_=function(t,e,n){return t._gsap[e]=n},u_=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},h_=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},f_=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Ee="transform",bn=Ee+"Origin",d_=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in Mi&&s){if(this.tfm=this.tfm||{},t!=="transform")t=ci[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=yi(i,a)}):this.tfm[t]=o.x?o[t]:yi(i,t),t===bn&&(this.tfm.zOrigin=o.zOrigin);else return ci.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Ee)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(bn,e,"")),t=Ee}(s||e)&&this.props.push(t,e,s[t])},Pf=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},p_=function(){var t=this.props,e=this.target,n=e.style,i=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?n[t[s]]=t[s+2]:n.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(Dc,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=Ac(),(!s||!s.isStart)&&!n[Ee]&&(Pf(n),i.zOrigin&&n[bn]&&(n[bn]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},If=function(t,e){var n={target:t,props:[],revert:p_,save:d_};return t._gsap||je.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},Lf,bc=function(t,e){var n=Wi.createElementNS?Wi.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Wi.createElement(t);return n&&n.style?n:Wi.createElement(t)},ui=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Dc,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,as(e)||e,1)||""},bf="O,Moz,ms,Ms,Webkit".split(","),as=function(t,e,n){var i=e||wr,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(bf[o]+t in s););return o<0?null:(o===3?"ms":o>=0?bf[o]:"")+t},wc=function(){e_()&&window.document&&(yf=window,Wi=yf.document,ss=Wi.documentElement,wr=bc("div")||{style:{}},t_=bc("div"),Ee=as(Ee),bn=Ee+"Origin",wr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Lf=!!as("perspective"),Ac=je.core.reverting,Tc=1)},yc=function r(t){var e=bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,i=this.nextSibling,s=this.style.cssText,o;if(ss.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(i?n.insertBefore(this,i):n.appendChild(this)),ss.removeChild(e),this.style.cssText=s,o},wf=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},Ff=function(t){var e;try{e=t.getBBox()}catch{e=yc.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===yc||(e=yc.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+wf(t,["x","cx","x1"])||0,y:+wf(t,["y","cy","y1"])||0,width:0,height:0}:e},Nf=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&Ff(t))},Er=function(t,e){if(e){var n=t.style,i;e in Mi&&e!==bn&&(e=Ee),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(Dc,"-$1").toLowerCase())):n.removeAttribute(e)}},Xi=function(t,e,n,i,s,o){var a=new cn(t._pt,e,n,0,1,o?Rf:Cf);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},Ef={deg:1,rad:1,turn:1},m_={grid:1,flex:1},qi=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=wr.style,l=n_.test(e),c=t.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),h=100,f=i==="px",d=i==="%",_,g,p,m;if(i===o||!s||Ef[i]||Ef[o])return s;if(o!=="px"&&!f&&(s=r(t,e,n,"px")),m=t.getCTM&&Nf(t),(d||o==="%")&&(Mi[e]||~e.indexOf("adius")))return _=m?t.getBBox()[l?"width":"height"]:t[u],De(d?s/_*h:s/100*_);if(a[l?"width":"height"]=h+(f?o:i),g=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,m&&(g=(t.ownerSVGElement||{}).parentNode),(!g||g===Wi||!g.appendChild)&&(g=Wi.body),p=g._gsap,p&&d&&p.width&&l&&p.time===yn.time&&!p.uncache)return De(s/p.width*h);if(d&&(e==="height"||e==="width")){var S=t.style[e];t.style[e]=h+i,_=t[u],S?t.style[e]=S:Er(t,e)}else(d||o==="%")&&!m_[ui(g,"display")]&&(a.position=ui(t,"position")),g===t&&(a.position="static"),g.appendChild(wr),_=wr[u],g.removeChild(wr),a.position="absolute";return l&&d&&(p=Vi(g),p.time=yn.time,p.width=g[u]),De(f?_*s/h:_&&s?h/_*s:0)},yi=function(t,e,n,i){var s;return Tc||wc(),e in ci&&e!=="transform"&&(e=ci[e],~e.indexOf(",")&&(e=e.split(",")[0])),Mi[e]&&e!=="transform"?(s=lo(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:sa(ui(t,bn))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=ra[e]&&ra[e](t,e,n)||ui(t,e)||uc(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?qi(t,e,s,n)+n:s},g_=function(t,e,n,i){if(!n||n==="none"){var s=as(e,t,1),o=s&&ui(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=ui(t,"borderTopColor"))}var a=new cn(this._pt,t.style,e,0,1,_c),l=0,c=0,u,h,f,d,_,g,p,m,S,v,M,D;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(g=t.style[e],t.style[e]=i,i=ui(t,e)||i,g?t.style[e]=g:Er(t,e)),u=[n,i],hc(u),n=u[0],i=u[1],f=n.match(xr)||[],D=i.match(xr)||[],D.length){for(;h=xr.exec(i);)p=h[0],S=i.substring(l,h.index),_?_=(_+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(_=1),p!==(g=f[c++]||"")&&(d=parseFloat(g)||0,M=g.substr((d+"").length),p.charAt(1)==="="&&(p=vr(d,p)+M),m=parseFloat(p),v=p.substr((m+"").length),l=xr.lastIndex-v.length,v||(v=v||Sn.units[e]||M,l===i.length&&(i+=v,a.e+=v)),M!==v&&(d=qi(t,e,g,v)||0),a._pt={_next:a._pt,p:S||c===1?S:",",s:d,c:m-d,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?Rf:Cf;return sc.test(i)&&(a.e=0),this._pt=a,a},Tf={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},__=function(t){var e=t.split(" "),n=e[0],i=e[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(t=n,n=i,i=t),e[0]=Tf[n]||n,e[1]=Tf[i]||i,e.join(" ")},x_=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n=e.t,i=n.style,s=e.u,o=n._gsap,a,l,c;if(s==="all"||s===!0)i.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],Mi[a]&&(l=1,a=a==="transformOrigin"?bn:Ee),Er(n,a);l&&(Er(n,Ee),o&&(o.svg&&n.removeAttribute("transform"),lo(n,1),o.uncache=1,Pf(i)))}},ra={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new cn(t._pt,e,n,0,0,x_);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},ao=[1,0,0,1,0,0],Uf={},Of=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Af=function(t){var e=ui(t,Ee);return Of(e)?ao:e.substr(7).match(rc).map(De)},Cc=function(t,e){var n=t._gsap||Vi(t),i=t.style,s=Af(t),o,a,l,c;return n.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?ao:s):(s===ao&&!t.offsetParent&&t!==ss&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,ss.appendChild(t)),s=Af(t),l?i.display=l:Er(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):ss.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Ec=function(t,e,n,i,s,o){var a=t._gsap,l=s||Cc(t,!0),c=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=l[0],_=l[1],g=l[2],p=l[3],m=l[4],S=l[5],v=e.split(" "),M=parseFloat(v[0])||0,D=parseFloat(v[1])||0,T,E,R,y;n?l!==ao&&(E=d*p-_*g)&&(R=M*(p/E)+D*(-g/E)+(g*S-p*m)/E,y=M*(-_/E)+D*(d/E)-(d*S-_*m)/E,M=R,D=y):(T=Ff(t),M=T.x+(~v[0].indexOf("%")?M/100*T.width:M),D=T.y+(~(v[1]||v[0]).indexOf("%")?D/100*T.height:D)),i||i!==!1&&a.smooth?(m=M-c,S=D-u,a.xOffset=h+(m*d+S*g)-m,a.yOffset=f+(m*_+S*p)-S):a.xOffset=a.yOffset=0,a.xOrigin=M,a.yOrigin=D,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[bn]="0px 0px",o&&(Xi(o,a,"xOrigin",c,M),Xi(o,a,"yOrigin",u,D),Xi(o,a,"xOffset",h,a.xOffset),Xi(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",M+" "+D)},lo=function(t,e){var n=t._gsap||new fc(t);if("x"in n&&!e&&!n.uncache)return n;var i=t.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(t),c=ui(t,bn)||"0",u,h,f,d,_,g,p,m,S,v,M,D,T,E,R,y,x,L,F,P,B,X,G,J,U,I,A,it,vt,Wt,q,Q;return u=h=f=g=p=m=S=v=M=0,d=_=1,n.svg=!!(t.getCTM&&Nf(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Ee]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Ee]!=="none"?l[Ee]:"")),i.scale=i.rotate=i.translate="none"),E=Cc(t,n.svg),n.svg&&(n.uncache?(U=t.getBBox(),c=n.xOrigin-U.x+"px "+(n.yOrigin-U.y)+"px",J=""):J=!e&&t.getAttribute("data-svg-origin"),Ec(t,J||c,!!J||n.originIsAbsolute,n.smooth!==!1,E)),D=n.xOrigin||0,T=n.yOrigin||0,E!==ao&&(L=E[0],F=E[1],P=E[2],B=E[3],u=X=E[4],h=G=E[5],E.length===6?(d=Math.sqrt(L*L+F*F),_=Math.sqrt(B*B+P*P),g=L||F?rs(F,L)*br:0,S=P||B?rs(P,B)*br+g:0,S&&(_*=Math.abs(Math.cos(S*os))),n.svg&&(u-=D-(D*L+T*P),h-=T-(D*F+T*B))):(Q=E[6],Wt=E[7],A=E[8],it=E[9],vt=E[10],q=E[11],u=E[12],h=E[13],f=E[14],R=rs(Q,vt),p=R*br,R&&(y=Math.cos(-R),x=Math.sin(-R),J=X*y+A*x,U=G*y+it*x,I=Q*y+vt*x,A=X*-x+A*y,it=G*-x+it*y,vt=Q*-x+vt*y,q=Wt*-x+q*y,X=J,G=U,Q=I),R=rs(-P,vt),m=R*br,R&&(y=Math.cos(-R),x=Math.sin(-R),J=L*y-A*x,U=F*y-it*x,I=P*y-vt*x,q=B*x+q*y,L=J,F=U,P=I),R=rs(F,L),g=R*br,R&&(y=Math.cos(R),x=Math.sin(R),J=L*y+F*x,U=X*y+G*x,F=F*y-L*x,G=G*y-X*x,L=J,X=U),p&&Math.abs(p)+Math.abs(g)>359.9&&(p=g=0,m=180-m),d=De(Math.sqrt(L*L+F*F+P*P)),_=De(Math.sqrt(G*G+Q*Q)),R=rs(X,G),S=Math.abs(R)>2e-4?R*br:0,M=q?1/(q<0?-q:q):0),n.svg&&(J=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Of(ui(t,Ee)),J&&t.setAttribute("transform",J))),Math.abs(S)>90&&Math.abs(S)<270&&(s?(d*=-1,S+=g<=0?180:-180,g+=g<=0?180:-180):(_*=-1,S+=S<=0?180:-180)),e=e||n.uncache,n.x=u-((n.xPercent=u&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-u)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-h)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=f+o,n.scaleX=De(d),n.scaleY=De(_),n.rotation=De(g)+a,n.rotationX=De(p)+a,n.rotationY=De(m)+a,n.skewX=S+a,n.skewY=v+a,n.transformPerspective=M+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[bn]=sa(c)),n.xOffset=n.yOffset=0,n.force3D=Sn.force3D,n.renderTransform=n.svg?y_:Lf?Bf:v_,n.uncache=0,n},sa=function(t){return(t=t.split(" "))[0]+" "+t[1]},Mc=function(t,e,n){var i=Ye(e);return De(parseFloat(e)+parseFloat(qi(t,"x",n+"px",i)))+i},v_=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Bf(t,e)},Mr="0deg",oo="0px",Sr=") ",Bf=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,c=n.rotation,u=n.rotationY,h=n.rotationX,f=n.skewX,d=n.skewY,_=n.scaleX,g=n.scaleY,p=n.transformPerspective,m=n.force3D,S=n.target,v=n.zOrigin,M="",D=m==="auto"&&t&&t!==1||m===!0;if(v&&(h!==Mr||u!==Mr)){var T=parseFloat(u)*os,E=Math.sin(T),R=Math.cos(T),y;T=parseFloat(h)*os,y=Math.cos(T),o=Mc(S,o,E*y*-v),a=Mc(S,a,-Math.sin(T)*-v),l=Mc(S,l,R*y*-v+v)}p!==oo&&(M+="perspective("+p+Sr),(i||s)&&(M+="translate("+i+"%, "+s+"%) "),(D||o!==oo||a!==oo||l!==oo)&&(M+=l!==oo||D?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Sr),c!==Mr&&(M+="rotate("+c+Sr),u!==Mr&&(M+="rotateY("+u+Sr),h!==Mr&&(M+="rotateX("+h+Sr),(f!==Mr||d!==Mr)&&(M+="skew("+f+", "+d+Sr),(_!==1||g!==1)&&(M+="scale("+_+", "+g+Sr),S.style[Ee]=M||"translate(0, 0)"},y_=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,c=n.skewX,u=n.skewY,h=n.scaleX,f=n.scaleY,d=n.target,_=n.xOrigin,g=n.yOrigin,p=n.xOffset,m=n.yOffset,S=n.forceCSS,v=parseFloat(o),M=parseFloat(a),D,T,E,R,y;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=os,c*=os,D=Math.cos(l)*h,T=Math.sin(l)*h,E=Math.sin(l-c)*-f,R=Math.cos(l-c)*f,c&&(u*=os,y=Math.tan(c-u),y=Math.sqrt(1+y*y),E*=y,R*=y,u&&(y=Math.tan(u),y=Math.sqrt(1+y*y),D*=y,T*=y)),D=De(D),T=De(T),E=De(E),R=De(R)):(D=h,R=f,T=E=0),(v&&!~(o+"").indexOf("px")||M&&!~(a+"").indexOf("px"))&&(v=qi(d,"x",o,"px"),M=qi(d,"y",a,"px")),(_||g||p||m)&&(v=De(v+_-(_*D+g*E)+p),M=De(M+g-(_*T+g*R)+m)),(i||s)&&(y=d.getBBox(),v=De(v+i/100*y.width),M=De(M+s/100*y.height)),y="matrix("+D+","+T+","+E+","+R+","+v+","+M+")",d.setAttribute("transform",y),S&&(d.style[Ee]=y)},M_=function(t,e,n,i,s){var o=360,a=Ue(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?br:1),c=l-i,u=i+c+"deg",h,f;return a&&(h=s.split("_")[1],h==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),h==="cw"&&c<0?c=(c+o*Sf)%o-~~(c/o)*o:h==="ccw"&&c>0&&(c=(c-o*Sf)%o-~~(c/o)*o)),t._pt=f=new cn(t._pt,e,n,i,c,r_),f.e=u,f.u="deg",t._props.push(n),f},Df=function(t,e){for(var n in e)t[n]=e[n];return t},S_=function(t,e,n){var i=Df({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,u,h,f,d,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Ee]=e,a=lo(n,1),Er(n,Ee),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Ee],o[Ee]=e,a=lo(n,1),o[Ee]=c);for(l in Mi)c=i[l],u=a[l],c!==u&&s.indexOf(l)<0&&(d=Ye(c),_=Ye(u),h=d!==_?qi(n,l,c,_):parseFloat(c),f=parseFloat(u),t._pt=new cn(t._pt,a,l,h,f-h,Sc),t._pt.u=_||0,t._props.push(l));Df(a,i)};ln("padding,margin,Width,Radius",function(r,t){var e="Top",n="Right",i="Bottom",s="Left",o=(t<3?[e,n,i,s]:[e+s,e+n,i+n,i+s]).map(function(a){return t<2?r+a:"border"+a+r});ra[t>1?"border"+r:r]=function(a,l,c,u,h){var f,d;if(arguments.length<4)return f=o.map(function(_){return yi(a,_,c)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(u+"").split(" "),d={},o.forEach(function(_,g){return d[_]=f[g]=f[g]||f[(g-1)/2|0]}),a.init(l,d,h)}});var Rc={name:"css",register:wc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,s){var o=this._props,a=t.style,l=n.vars.startAt,c,u,h,f,d,_,g,p,m,S,v,M,D,T,E,R;Tc||wc(),this.styles=this.styles||If(t),R=this.styles.props,this.tween=n;for(g in e)if(g!=="autoRound"&&(u=e[g],!(vn[g]&&pc(g,e,n,i,t,s)))){if(d=typeof u,_=ra[g],d==="function"&&(u=u.call(n,i,t,s),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=is(u)),_)_(this,t,g,u,n)&&(E=1);else if(g.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(g)+"").trim(),u+="",xi.lastIndex=0,xi.test(c)||(p=Ye(c),m=Ye(u)),m?p!==m&&(c=qi(t,g,c,m)+m):p&&(u+=p),this.add(a,"setProperty",c,u,i,s,0,0,g),o.push(g),R.push(g,0,a[g]);else if(d!=="undefined"){if(l&&g in l?(c=typeof l[g]=="function"?l[g].call(n,i,t,s):l[g],Ue(c)&&~c.indexOf("random(")&&(c=is(c)),Ye(c+"")||c==="auto"||(c+=Sn.units[g]||Ye(yi(t,g))||""),(c+"").charAt(1)==="="&&(c=yi(t,g))):c=yi(t,g),f=parseFloat(c),S=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),S&&(u=u.substr(2)),h=parseFloat(u),g in ci&&(g==="autoAlpha"&&(f===1&&yi(t,"visibility")==="hidden"&&h&&(f=0),R.push("visibility",0,a.visibility),Xi(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),g!=="scale"&&g!=="transform"&&(g=ci[g],~g.indexOf(",")&&(g=g.split(",")[0]))),v=g in Mi,v){if(this.styles.save(g),M||(D=t._gsap,D.renderTransform&&!e.parseTransform||lo(t,e.parseTransform),T=e.smoothOrigin!==!1&&D.smooth,M=this._pt=new cn(this._pt,a,Ee,0,1,D.renderTransform,D,0,-1),M.dep=1),g==="scale")this._pt=new cn(this._pt,D,"scaleY",D.scaleY,(S?vr(D.scaleY,S+h):h)-D.scaleY||0,Sc),this._pt.u=0,o.push("scaleY",g),g+="X";else if(g==="transformOrigin"){R.push(bn,0,a[bn]),u=__(u),D.svg?Ec(t,u,0,T,0,this):(m=parseFloat(u.split(" ")[2])||0,m!==D.zOrigin&&Xi(this,D,"zOrigin",D.zOrigin,m),Xi(this,a,g,sa(c),sa(u)));continue}else if(g==="svgOrigin"){Ec(t,u,1,T,0,this);continue}else if(g in Uf){M_(this,D,g,f,S?vr(f,S+u):u);continue}else if(g==="smoothOrigin"){Xi(this,D,"smooth",D.smooth,u);continue}else if(g==="force3D"){D[g]=u;continue}else if(g==="transform"){S_(this,u,t);continue}}else g in a||(g=as(g)||g);if(v||(h||h===0)&&(f||f===0)&&!i_.test(u)&&g in a)p=(c+"").substr((f+"").length),h||(h=0),m=Ye(u)||(g in Sn.units?Sn.units[g]:p),p!==m&&(f=qi(t,g,c,m)),this._pt=new cn(this._pt,v?D:a,g,f,(S?vr(f,S+h):h)-f,!v&&(m==="px"||g==="zIndex")&&e.autoRound!==!1?o_:Sc),this._pt.u=m||0,p!==m&&m!=="%"&&(this._pt.b=c,this._pt.r=s_);else if(g in a)g_.call(this,t,g,c,S?S+u:u);else if(g in t)this.add(t,g,c||t[g],S?S+u:u,i,s);else if(g!=="parseTransform"){jo(g,u);continue}v||(g in a?R.push(g,0,a[g]):R.push(g,1,c||t[g])),o.push(g)}}E&&vc(this)},render:function(t,e){if(e.tween._time||!Ac())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:yi,aliases:ci,getSetter:function(t,e,n){var i=ci[e];return i&&i.indexOf(",")<0&&(e=i),e in Mi&&e!==bn&&(t._gsap.x||yi(t,"x"))?n&&Mf===n?e==="scale"?u_:c_:(Mf=n||{})&&(e==="scale"?h_:f_):t.style&&!Qo(t.style[e])?a_:~e.indexOf("-")?l_:ia(t,e)},core:{_removeProperty:Er,_getMatrix:Cc}};je.utils.checkPrefix=as;je.core.getStyleSaver=If;(function(r,t,e,n){var i=ln(r+","+t+","+e,function(s){Mi[s]=1});ln(t,function(s){Sn.units[s]="deg",Uf[s]=1}),ci[i[13]]=r+","+t,ln(n,function(s){var o=s.split(":");ci[o[1]]=i[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ln("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Sn.units[r]="px"});je.registerPlugin(Rc);var he=je.registerPlugin(Rc)||je,Db=he.core.Tween;var zf=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||he.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){he.to(r,{y:"-100dvh",duration:.75})}},"<")};function kf(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function b_(r,t,e){return t&&kf(r.prototype,t),e&&kf(r,e),r}var Ze,la,w_,Cn,Yi,Zi,cs,Hf,Tr,uo,Gf,Si,Jn,Wf,Xf=function(){return Ze||typeof window<"u"&&(Ze=window.gsap)&&Ze.registerPlugin&&Ze},qf=1,ls=[],Kt=[],$n=[],ho=Date.now,Pc=function(t,e){return e},E_=function(){var t=uo.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,Kt),i.push.apply(i,$n),Kt=n,$n=i,Pc=function(o,a){return e[o](a)}},wi=function(t,e){return~$n.indexOf(t)&&$n[$n.indexOf(t)+1][e]},fo=function(t){return!!~Gf.indexOf(t)},hn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},un=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},oa="scrollLeft",aa="scrollTop",Ic=function(){return Si&&Si.isPressed||Kt.cache++},ca=function(t,e){var n=function i(s){if(s||s===0){qf&&(Cn.history.scrollRestoration="manual");var o=Si&&Si.isPressed;s=i.v=Math.round(s)||(Si&&Si.iOS?1:0),t(s),i.cacheID=Kt.cache,o&&Pc("ss",s)}else(e||Kt.cache!==i.cacheID||Pc("ref"))&&(i.cacheID=Kt.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},tn={s:oa,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:ca(function(r){return arguments.length?Cn.scrollTo(r,Le.sc()):Cn.pageXOffset||Yi[oa]||Zi[oa]||cs[oa]||0})},Le={s:aa,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:tn,sc:ca(function(r){return arguments.length?Cn.scrollTo(tn.sc(),r):Cn.pageYOffset||Yi[aa]||Zi[aa]||cs[aa]||0})},fn=function(t,e){return(e&&e._ctx&&e._ctx.selector||Ze.utils.toArray)(t)[0]||(typeof t=="string"&&Ze.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},bi=function(t,e){var n=e.s,i=e.sc;fo(t)&&(t=Yi.scrollingElement||Zi);var s=Kt.indexOf(t),o=i===Le.sc?1:2;!~s&&(s=Kt.push(t)-1),Kt[s+o]||hn(t,"scroll",Ic);var a=Kt[s+o],l=a||(Kt[s+o]=ca(wi(t,n),!0)||(fo(t)?i:ca(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=Ze.getProperty(t,"scrollBehavior")==="smooth"),l},ua=function(t,e,n){var i=t,s=t,o=ho(),a=o,l=e||50,c=Math.max(500,l*3),u=function(_,g){var p=ho();g||p-o>l?(s=i,i=_,a=o,o=p):n?i+=_:i=s+(_-s)/(p-a)*(o-a)},h=function(){s=i=n?0:i,a=o=0},f=function(_){var g=a,p=s,m=ho();return(_||_===0)&&_!==i&&u(_),o===a||m-a>c?0:(i+(n?p:-p))/((n?m:o)-g)*1e3};return{update:u,reset:h,getVelocity:f}},co=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},Vf=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},Yf=function(){uo=Ze.core.globals().ScrollTrigger,uo&&uo.core&&E_()},Zf=function(t){return Ze=t||Xf(),!la&&Ze&&typeof document<"u"&&document.body&&(Cn=window,Yi=document,Zi=Yi.documentElement,cs=Yi.body,Gf=[Cn,Yi,Zi,cs],w_=Ze.utils.clamp,Wf=Ze.core.context||function(){},Tr="onpointerenter"in cs?"pointer":"mouse",Hf=Ce.isTouch=Cn.matchMedia&&Cn.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Cn||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Jn=Ce.eventTypes=("ontouchstart"in Zi?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Zi?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return qf=0},500),Yf(),la=1),la};tn.op=Le;Kt.cache=0;var Ce=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){la||Zf(Ze)||console.warn("Please gsap.registerPlugin(Observer)"),uo||Yf();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,u=n.preventDefault,h=n.onStop,f=n.onStopDelay,d=n.ignore,_=n.wheelSpeed,g=n.event,p=n.onDragStart,m=n.onDragEnd,S=n.onDrag,v=n.onPress,M=n.onRelease,D=n.onRight,T=n.onLeft,E=n.onUp,R=n.onDown,y=n.onChangeX,x=n.onChangeY,L=n.onChange,F=n.onToggleX,P=n.onToggleY,B=n.onHover,X=n.onHoverEnd,G=n.onMove,J=n.ignoreCheck,U=n.isNormalizer,I=n.onGestureStart,A=n.onGestureEnd,it=n.onWheel,vt=n.onEnable,Wt=n.onDisable,q=n.onClick,Q=n.scrollSpeed,ct=n.capture,tt=n.allowClicks,It=n.lockAxis,Rt=n.onLockAxis;this.target=a=fn(a)||Zi,this.vars=n,d&&(d=Ze.utils.toArray(d)),i=i||1e-9,s=s||0,_=_||1,Q=Q||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(Cn.getComputedStyle(cs).lineHeight)||22);var z,Xt,bt,wt,_t,Ft,Pt,k=this,jt=0,C=0,b=n.passive||!u,Y=bi(a,tn),j=bi(a,Le),et=Y(),nt=j(),mt=~o.indexOf("touch")&&!~o.indexOf("pointer")&&Jn[0]==="pointerdown",lt=fo(a),rt=a.ownerDocument||Yi,Lt=[0,0,0],st=[0,0,0],St=0,Jt=function(){return St=ho()},gt=function(yt,ie){return(k.event=yt)&&d&&~d.indexOf(yt.target)||ie&&mt&&yt.pointerType!=="touch"||J&&J(yt,ie)},xt=function(){k._vx.reset(),k._vy.reset(),Xt.pause(),h&&h(k)},Nt=function(){var yt=k.deltaX=Vf(Lt),ie=k.deltaY=Vf(st),ht=Math.abs(yt)>=i,kt=Math.abs(ie)>=i;L&&(ht||kt)&&L(k,yt,ie,Lt,st),ht&&(D&&k.deltaX>0&&D(k),T&&k.deltaX<0&&T(k),y&&y(k),F&&k.deltaX<0!=jt<0&&F(k),jt=k.deltaX,Lt[0]=Lt[1]=Lt[2]=0),kt&&(R&&k.deltaY>0&&R(k),E&&k.deltaY<0&&E(k),x&&x(k),P&&k.deltaY<0!=C<0&&P(k),C=k.deltaY,st[0]=st[1]=st[2]=0),(wt||bt)&&(G&&G(k),bt&&(S(k),bt=!1),wt=!1),Ft&&!(Ft=!1)&&Rt&&Rt(k),_t&&(it(k),_t=!1),z=0},Gt=function(yt,ie,ht){Lt[ht]+=yt,st[ht]+=ie,k._vx.update(yt),k._vy.update(ie),c?z||(z=requestAnimationFrame(Nt)):Nt()},ue=function(yt,ie){It&&!Pt&&(k.axis=Pt=Math.abs(yt)>Math.abs(ie)?"x":"y",Ft=!0),Pt!=="y"&&(Lt[2]+=yt,k._vx.update(yt,!0)),Pt!=="x"&&(st[2]+=ie,k._vy.update(ie,!0)),c?z||(z=requestAnimationFrame(Nt)):Nt()},Ut=function(yt){if(!gt(yt,1)){yt=co(yt,u);var ie=yt.clientX,ht=yt.clientY,kt=ie-k.x,At=ht-k.y,zt=k.isDragging;k.x=ie,k.y=ht,(zt||Math.abs(k.startX-ie)>=s||Math.abs(k.startY-ht)>=s)&&(S&&(bt=!0),zt||(k.isDragging=!0),ue(kt,At),zt||p&&p(k))}},N=k.onPress=function(Ct){gt(Ct,1)||Ct&&Ct.button||(k.axis=Pt=null,Xt.pause(),k.isPressed=!0,Ct=co(Ct),jt=C=0,k.startX=k.x=Ct.clientX,k.startY=k.y=Ct.clientY,k._vx.reset(),k._vy.reset(),hn(U?a:rt,Jn[1],Ut,b,!0),k.deltaX=k.deltaY=0,v&&v(k))},$=k.onRelease=function(Ct){if(!gt(Ct,1)){un(U?a:rt,Jn[1],Ut,!0);var yt=!isNaN(k.y-k.startY),ie=k.isDragging,ht=ie&&(Math.abs(k.x-k.startX)>3||Math.abs(k.y-k.startY)>3),kt=co(Ct);!ht&&yt&&(k._vx.reset(),k._vy.reset(),u&&tt&&Ze.delayedCall(.08,function(){if(ho()-St>300&&!Ct.defaultPrevented){if(Ct.target.click)Ct.target.click();else if(rt.createEvent){var At=rt.createEvent("MouseEvents");At.initMouseEvent("click",!0,!0,Cn,1,kt.screenX,kt.screenY,kt.clientX,kt.clientY,!1,!1,!1,!1,0,null),Ct.target.dispatchEvent(At)}}})),k.isDragging=k.isGesturing=k.isPressed=!1,h&&ie&&!U&&Xt.restart(!0),m&&ie&&m(k),M&&M(k,ht)}},K=function(yt){return yt.touches&&yt.touches.length>1&&(k.isGesturing=!0)&&I(yt,k.isDragging)},at=function(){return(k.isGesturing=!1)||A(k)},ut=function(yt){if(!gt(yt)){var ie=Y(),ht=j();Gt((ie-et)*Q,(ht-nt)*Q,1),et=ie,nt=ht,h&&Xt.restart(!0)}},Vt=function(yt){if(!gt(yt)){yt=co(yt,u),it&&(_t=!0);var ie=(yt.deltaMode===1?l:yt.deltaMode===2?Cn.innerHeight:1)*_;Gt(yt.deltaX*ie,yt.deltaY*ie,0),h&&!U&&Xt.restart(!0)}},se=function(yt){if(!gt(yt)){var ie=yt.clientX,ht=yt.clientY,kt=ie-k.x,At=ht-k.y;k.x=ie,k.y=ht,wt=!0,h&&Xt.restart(!0),(kt||At)&&ue(kt,At)}},ce=function(yt){k.event=yt,B(k)},pe=function(yt){k.event=yt,X(k)},te=function(yt){return gt(yt)||co(yt,u)&&q(k)};Xt=k._dc=Ze.delayedCall(f||.25,xt).pause(),k.deltaX=k.deltaY=0,k._vx=ua(0,50,!0),k._vy=ua(0,50,!0),k.scrollX=Y,k.scrollY=j,k.isDragging=k.isGesturing=k.isPressed=!1,Wf(this),k.enable=function(Ct){return k.isEnabled||(hn(lt?rt:a,"scroll",Ic),o.indexOf("scroll")>=0&&hn(lt?rt:a,"scroll",ut,b,ct),o.indexOf("wheel")>=0&&hn(a,"wheel",Vt,b,ct),(o.indexOf("touch")>=0&&Hf||o.indexOf("pointer")>=0)&&(hn(a,Jn[0],N,b,ct),hn(rt,Jn[2],$),hn(rt,Jn[3],$),tt&&hn(a,"click",Jt,!0,!0),q&&hn(a,"click",te),I&&hn(rt,"gesturestart",K),A&&hn(rt,"gestureend",at),B&&hn(a,Tr+"enter",ce),X&&hn(a,Tr+"leave",pe),G&&hn(a,Tr+"move",se)),k.isEnabled=!0,Ct&&Ct.type&&N(Ct),vt&&vt(k)),k},k.disable=function(){k.isEnabled&&(ls.filter(function(Ct){return Ct!==k&&fo(Ct.target)}).length||un(lt?rt:a,"scroll",Ic),k.isPressed&&(k._vx.reset(),k._vy.reset(),un(U?a:rt,Jn[1],Ut,!0)),un(lt?rt:a,"scroll",ut,ct),un(a,"wheel",Vt,ct),un(a,Jn[0],N,ct),un(rt,Jn[2],$),un(rt,Jn[3],$),un(a,"click",Jt,!0),un(a,"click",te),un(rt,"gesturestart",K),un(rt,"gestureend",at),un(a,Tr+"enter",ce),un(a,Tr+"leave",pe),un(a,Tr+"move",se),k.isEnabled=k.isPressed=k.isDragging=!1,Wt&&Wt(k))},k.kill=k.revert=function(){k.disable();var Ct=ls.indexOf(k);Ct>=0&&ls.splice(Ct,1),Si===k&&(Si=0)},ls.push(k),U&&fo(a)&&(Si=k),k.enable(g)},b_(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Ce.version="3.12.5";Ce.create=function(r){return new Ce(r)};Ce.register=Zf;Ce.getAll=function(){return ls.slice()};Ce.getById=function(r){return ls.filter(function(t){return t.vars.id===r})[0]};Xf()&&Ze.registerPlugin(Ce);var Mt,fs,ne,Te,Kn,_e,fd,Ta,To,yo,mo,ha,en,Ra,kc,pn,Jf,$f,ds,dd,Lc,pd,dn,Vc,md,gd,Ji,Hc,Yc,ps,Zc,Aa,Gc,Fc,fa=1,nn=Date.now,Nc=nn(),Vn=0,go=0,Kf=function(t,e,n){var i=Pn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},Qf=function(t,e){return e&&(!Pn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},T_=function r(){return go&&requestAnimationFrame(r)},jf=function(){return Ra=1},td=function(){return Ra=0},hi=function(t){return t},_o=function(t){return Math.round(t*1e5)/1e5||0},_d=function(){return typeof window<"u"},xd=function(){return Mt||_d()&&(Mt=window.gsap)&&Mt.registerPlugin&&Mt},Ir=function(t){return!!~fd.indexOf(t)},vd=function(t){return(t==="Height"?Zc:ne["inner"+t])||Kn["client"+t]||_e["client"+t]},yd=function(t){return wi(t,"getBoundingClientRect")||(Ir(t)?function(){return Ea.width=ne.innerWidth,Ea.height=Zc,Ea}:function(){return Ei(t)})},A_=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=wi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?vd(s):t["client"+s])||0}},D_=function(t,e){return!e||~$n.indexOf(t)?yd(t):function(){return Ea}},fi=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=wi(t,n))?o()-yd(t)()[s]:Ir(t)?(Kn[n]||_e[n])-vd(i):t[n]-t["offset"+i])},da=function(t,e){for(var n=0;n<ds.length;n+=3)(!e||~e.indexOf(ds[n+1]))&&t(ds[n],ds[n+1],ds[n+2])},Pn=function(t){return typeof t=="string"},gn=function(t){return typeof t=="function"},xo=function(t){return typeof t=="number"},Ar=function(t){return typeof t=="object"},po=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},Uc=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t)}):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},us=Math.abs,Md="left",Sd="top",Jc="right",$c="bottom",Cr="width",Rr="height",Mo="Right",So="Left",bo="Top",wo="Bottom",Fe="padding",zn="margin",gs="Width",Kc="Height",Oe="px",kn=function(t){return ne.getComputedStyle(t)},C_=function(t){var e=kn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},ed=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Ei=function(t,e){var n=e&&kn(t)[kc]!=="matrix(1, 0, 0, 1, 0, 0)"&&Mt.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return n&&n.progress(0).kill(),i},Da=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},bd=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},R_=function(t){return function(e){return Mt.utils.snap(bd(t),e)}},Qc=function(t){var e=Mt.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort(function(i,s){return i-s});return n?function(i,s,o){o===void 0&&(o=.001);var a;if(!s)return e(i);if(s>0){for(i-=o,a=0;a<n.length;a++)if(n[a]>=i)return n[a];return n[a-1]}else for(a=n.length,i+=o;a--;)if(n[a]<=i)return n[a];return n[0]}:function(i,s,o){o===void 0&&(o=.001);var a=e(i);return!s||Math.abs(a-i)<o||a-i<0==s<0?a:e(s<0?i-t:i+t)}},P_=function(t){return function(e,n){return Qc(bd(t))(e,n.direction)}},pa=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},Ge=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},He=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},ma=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},nd={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ga={toggleActions:"play",anticipatePin:0},Ca={top:0,left:0,center:.5,bottom:1,right:1},Ma=function(t,e){if(Pn(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=e/100),t=t.substr(0,n-1)),t=i+(t in Ca?Ca[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},_a=function(t,e,n,i,s,o,a,l){var c=s.startColor,u=s.endColor,h=s.fontSize,f=s.indent,d=s.fontWeight,_=Te.createElement("div"),g=Ir(n)||wi(n,"pinType")==="fixed",p=t.indexOf("scroller")!==-1,m=g?_e:n,S=t.indexOf("start")!==-1,v=S?c:u,M="border-color:"+v+";font-size:"+h+";color:"+v+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return M+="position:"+((p||l)&&g?"fixed;":"absolute;"),(p||l||!g)&&(M+=(i===Le?Jc:$c)+":"+(o+parseFloat(f))+"px;"),a&&(M+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=S,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=M,_.innerText=e||e===0?t+"-"+e:t,m.children[0]?m.insertBefore(_,m.children[0]):m.appendChild(_),_._offset=_["offset"+i.op.d2],Sa(_,0,i,S),_},Sa=function(t,e,n,i){var s={display:"block"},o=n[i?"os2":"p2"],a=n[i?"p2":"os2"];t._isFlipped=i,s[n.a+"Percent"]=i?-100:0,s[n.a]=i?"1px":0,s["border"+o+gs]=1,s["border"+a+gs]=0,s[n.p]=e+"px",Mt.set(t,s)},Qt=[],Wc={},Ao,id=function(){return nn()-Vn>34&&(Ao||(Ao=requestAnimationFrame(Ti)))},hs=function(){(!dn||!dn.isPressed||dn.startX>_e.clientWidth)&&(Kt.cache++,dn?Ao||(Ao=requestAnimationFrame(Ti)):Ti(),Vn||Fr("scrollStart"),Vn=nn())},Oc=function(){gd=ne.innerWidth,md=ne.innerHeight},vo=function(){Kt.cache++,!en&&!pd&&!Te.fullscreenElement&&!Te.webkitFullscreenElement&&(!Vc||gd!==ne.innerWidth||Math.abs(ne.innerHeight-md)>ne.innerHeight*.25)&&Ta.restart(!0)},Lr={},I_=[],wd=function r(){return He(Ht,"scrollEnd",r)||Dr(!0)},Fr=function(t){return Lr[t]&&Lr[t].map(function(e){return e()})||I_},Rn=[],Ed=function(t){for(var e=0;e<Rn.length;e+=5)(!t||Rn[e+4]&&Rn[e+4].query===t)&&(Rn[e].style.cssText=Rn[e+1],Rn[e].getBBox&&Rn[e].setAttribute("transform",Rn[e+2]||""),Rn[e+3].uncache=1)},jc=function(t,e){var n;for(pn=0;pn<Qt.length;pn++)n=Qt[pn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Aa=!0,e&&Ed(e),e||Fr("revert")},Td=function(t,e){Kt.cache++,(e||!mn)&&Kt.forEach(function(n){return gn(n)&&n.cacheID++&&(n.rec=0)}),Pn(t)&&(ne.history.scrollRestoration=Yc=t)},mn,Pr=0,rd,L_=function(){if(rd!==Pr){var t=rd=Pr;requestAnimationFrame(function(){return t===Pr&&Dr(!0)})}},Ad=function(){_e.appendChild(ps),Zc=!dn&&ps.offsetHeight||ne.innerHeight,_e.removeChild(ps)},sd=function(t){return To(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},Dr=function(t,e){if(Vn&&!t&&!Aa){Ge(Ht,"scrollEnd",wd);return}Ad(),mn=Ht.isRefreshing=!0,Kt.forEach(function(i){return gn(i)&&++i.cacheID&&(i.rec=i())});var n=Fr("refreshInit");dd&&Ht.sort(),e||jc(),Kt.forEach(function(i){gn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),Qt.slice(0).forEach(function(i){return i.refresh()}),Aa=!1,Qt.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",o=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-o),i.refresh()}}),Gc=1,sd(!0),Qt.forEach(function(i){var s=fi(i.scroller,i._dir),o=i.vars.end==="max"||i._endClamp&&i.end>s,a=i._startClamp&&i.start>=s;(o||a)&&i.setPositions(a?s-1:i.start,o?Math.max(a?s:i.start+1,s):i.end,!0)}),sd(!1),Gc=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),Kt.forEach(function(i){gn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Td(Yc,1),Ta.pause(),Pr++,mn=2,Ti(2),Qt.forEach(function(i){return gn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),mn=Ht.isRefreshing=!1,Fr("refresh")},Xc=0,ba=1,Eo,Ti=function(t){if(t===2||!mn&&!Aa){Ht.isUpdating=!0,Eo&&Eo.update(0);var e=Qt.length,n=nn(),i=n-Nc>=50,s=e&&Qt[0].scroll();if(ba=Xc>s?-1:1,mn||(Xc=s),i&&(Vn&&!Ra&&n-Vn>200&&(Vn=0,Fr("scrollEnd")),mo=Nc,Nc=n),ba<0){for(pn=e;pn-- >0;)Qt[pn]&&Qt[pn].update(0,i);ba=1}else for(pn=0;pn<e;pn++)Qt[pn]&&Qt[pn].update(0,i);Ht.isUpdating=!1}Ao=0},qc=[Md,Sd,$c,Jc,zn+wo,zn+Mo,zn+bo,zn+So,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],wa=qc.concat([Cr,Rr,"boxSizing","max"+gs,"max"+Kc,"position",zn,Fe,Fe+bo,Fe+Mo,Fe+wo,Fe+So]),F_=function(t,e,n){ms(n);var i=t._gsap;if(i.spacerIsNative)ms(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},Bc=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=qc.length,o=e.style,a=t.style,l;s--;)l=qc[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[$c]=a[Jc]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[Cr]=Da(t,tn)+Oe,o[Rr]=Da(t,Le)+Oe,o[Fe]=a[zn]=a[Sd]=a[Md]="0",ms(i),a[Cr]=a["max"+gs]=n[Cr],a[Rr]=a["max"+Kc]=n[Rr],a[Fe]=n[Fe],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},N_=/([A-Z])/g,ms=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||Mt.core.getCache(t.t)).uncache=1;i<n;i+=2)o=t[i+1],s=t[i],o?e[s]=o:e[s]&&e.removeProperty(s.replace(N_,"-$1").toLowerCase())}},xa=function(t){for(var e=wa.length,n=t.style,i=[],s=0;s<e;s++)i.push(wa[s],n[wa[s]]);return i.t=t,i},U_=function(t,e,n){for(var i=[],s=t.length,o=n?8:0,a;o<s;o+=2)a=t[o],i.push(a,a in e?e[a]:t[o+1]);return i.t=t.t,i},Ea={left:0,top:0},od=function(t,e,n,i,s,o,a,l,c,u,h,f,d,_){gn(t)&&(t=t(l)),Pn(t)&&t.substr(0,3)==="max"&&(t=f+(t.charAt(4)==="="?Ma("0"+t.substr(3),n):0));var g=d?d.time():0,p,m,S;if(d&&d.seek(0),isNaN(t)||(t=+t),xo(t))d&&(t=Mt.utils.mapRange(d.scrollTrigger.start,d.scrollTrigger.end,0,f,t)),a&&Sa(a,n,i,!0);else{gn(e)&&(e=e(l));var v=(t||"0").split(" "),M,D,T,E;S=fn(e,l)||_e,M=Ei(S)||{},(!M||!M.left&&!M.top)&&kn(S).display==="none"&&(E=S.style.display,S.style.display="block",M=Ei(S),E?S.style.display=E:S.style.removeProperty("display")),D=Ma(v[0],M[i.d]),T=Ma(v[1]||"0",n),t=M[i.p]-c[i.p]-u+D+s-T,a&&Sa(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var R=t+n,y=o._isStart;p="scroll"+i.d2,Sa(o,R,i,y&&R>20||!y&&(h?Math.max(_e[p],Kn[p]):o.parentNode[p])<=R+1),h&&(c=Ei(a),h&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+Oe))}return d&&S&&(p=Ei(S),d.seek(f),m=Ei(S),d._caScrollDist=p[i.p]-m[i.p],t=t/d._caScrollDist*f),d&&d.seek(g),d?t:Math.round(t)},O_=/(webkit|moz|length|cssText|inset)/i,ad=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===_e){t._stOrig=s.cssText,a=kn(t);for(o in a)!+o&&!O_.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=n,s.left=i}else s.cssText=t._stOrig;Mt.core.getCache(t).uncache=1,e.appendChild(t)}},Dd=function(t,e,n){var i=e,s=i;return function(o){var a=Math.round(t());return a!==i&&a!==s&&Math.abs(a-i)>3&&Math.abs(a-s)>3&&(o=a,n&&n()),s=i,i=o,o}},va=function(t,e,n){var i={};i[e.p]="+="+n,Mt.set(t,i)},ld=function(t,e){var n=bi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,u,h){var f=o.tween,d=l.onComplete,_={};c=c||n();var g=Dd(n,c,function(){f.kill(),o.tween=0});return h=u&&h||0,u=u||a-c,f&&f.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return g(c+u*f.ratio+h*f.ratio*f.ratio)},l.onUpdate=function(){Kt.cache++,o.tween&&Ti()},l.onComplete=function(){o.tween=0,d&&d.call(f)},f=o.tween=Mt.to(t,l),f};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},Ge(t,"wheel",n.wheelHandler),Ht.isTouch&&Ge(t,"touchmove",n.wheelHandler),s},Ht=function(){function r(e,n){fs||r.register(Mt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Hc(this),this.init(e,n)}var t=r.prototype;return t.init=function(n,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!go){this.update=this.refresh=this.kill=hi;return}n=ed(Pn(n)||xo(n)||n.nodeType?{trigger:n}:n,ga);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,u=s.onRefresh,h=s.scrub,f=s.trigger,d=s.pin,_=s.pinSpacing,g=s.invalidateOnRefresh,p=s.anticipatePin,m=s.onScrubComplete,S=s.onSnapComplete,v=s.once,M=s.snap,D=s.pinReparent,T=s.pinSpacer,E=s.containerAnimation,R=s.fastScrollEnd,y=s.preventOverlaps,x=n.horizontal||n.containerAnimation&&n.horizontal!==!1?tn:Le,L=!h&&h!==0,F=fn(n.scroller||ne),P=Mt.core.getCache(F),B=Ir(F),X=("pinType"in n?n.pinType:wi(F,"pinType")||B&&"fixed")==="fixed",G=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],J=L&&n.toggleActions.split(" "),U="markers"in n?n.markers:ga.markers,I=B?0:parseFloat(kn(F)["border"+x.p2+gs])||0,A=this,it=n.onRefreshInit&&function(){return n.onRefreshInit(A)},vt=A_(F,B,x),Wt=D_(F,B),q=0,Q=0,ct=0,tt=bi(F,x),It,Rt,z,Xt,bt,wt,_t,Ft,Pt,k,jt,C,b,Y,j,et,nt,mt,lt,rt,Lt,st,St,Jt,gt,xt,Nt,Gt,ue,Ut,N,$,K,at,ut,Vt,se,ce,pe;if(A._startClamp=A._endClamp=!1,A._dir=x,p*=45,A.scroller=F,A.scroll=E?E.time.bind(E):tt,Xt=tt(),A.vars=n,i=i||n.animation,"refreshPriority"in n&&(dd=1,n.refreshPriority===-9999&&(Eo=A)),P.tweenScroll=P.tweenScroll||{top:ld(F,Le),left:ld(F,tn)},A.tweenTo=It=P.tweenScroll[x.p],A.scrubDuration=function(ht){K=xo(ht)&&ht,K?$?$.duration(ht):$=Mt.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:K,paused:!0,onComplete:function(){return m&&m(A)}}):($&&$.progress(1).kill(),$=0)},i&&(i.vars.lazy=!1,i._initted&&!A.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),A.animation=i.pause(),i.scrollTrigger=A,A.scrubDuration(h),Ut=0,l||(l=i.vars.id)),M&&((!Ar(M)||M.push)&&(M={snapTo:M}),"scrollBehavior"in _e.style&&Mt.set(B?[_e,Kn]:F,{scrollBehavior:"auto"}),Kt.forEach(function(ht){return gn(ht)&&ht.target===(B?Te.scrollingElement||Kn:F)&&(ht.smooth=!1)}),z=gn(M.snapTo)?M.snapTo:M.snapTo==="labels"?R_(i):M.snapTo==="labelsDirectional"?P_(i):M.directional!==!1?function(ht,kt){return Qc(M.snapTo)(ht,nn()-Q<500?0:kt.direction)}:Mt.utils.snap(M.snapTo),at=M.duration||{min:.1,max:2},at=Ar(at)?yo(at.min,at.max):yo(at,at),ut=Mt.delayedCall(M.delay||K/2||.1,function(){var ht=tt(),kt=nn()-Q<500,At=It.tween;if((kt||Math.abs(A.getVelocity())<10)&&!At&&!Ra&&q!==ht){var zt=(ht-wt)/Y,be=i&&!L?i.totalProgress():zt,$t=kt?0:(be-N)/(nn()-mo)*1e3||0,ve=Mt.utils.clamp(-zt,1-zt,us($t/2)*$t/.185),ke=zt+(M.inertia===!1?0:ve),ye,me,w=M,O=w.onStart,V=w.onInterrupt,H=w.onComplete;if(ye=z(ke,A),xo(ye)||(ye=ke),me=Math.round(wt+ye*Y),ht<=_t&&ht>=wt&&me!==ht){if(At&&!At._initted&&At.data<=us(me-ht))return;M.inertia===!1&&(ve=ye-zt),It(me,{duration:at(us(Math.max(us(ke-be),us(ye-be))*.185/$t/.05||0)),ease:M.ease||"power3",data:us(me-ht),onInterrupt:function(){return ut.restart(!0)&&V&&V(A)},onComplete:function(){A.update(),q=tt(),i&&($?$.resetTo("totalProgress",ye,i._tTime/i._tDur):i.progress(ye)),Ut=N=i&&!L?i.totalProgress():A.progress,S&&S(A),H&&H(A)}},ht,ve*Y,me-ht-ve*Y),O&&O(A,It.tween)}}else A.isActive&&q!==ht&&ut.restart(!0)}).pause()),l&&(Wc[l]=A),f=A.trigger=fn(f||d!==!0&&d),pe=f&&f._gsap&&f._gsap.stRevert,pe&&(pe=pe(A)),d=d===!0?f:fn(d),Pn(a)&&(a={targets:f,className:a}),d&&(_===!1||_===zn||(_=!_&&d.parentNode&&d.parentNode.style&&kn(d.parentNode).display==="flex"?!1:Fe),A.pin=d,Rt=Mt.core.getCache(d),Rt.spacer?j=Rt.pinState:(T&&(T=fn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),Rt.spacerIsNative=!!T,T&&(Rt.spacerState=xa(T))),Rt.spacer=mt=T||Te.createElement("div"),mt.classList.add("pin-spacer"),l&&mt.classList.add("pin-spacer-"+l),Rt.pinState=j=xa(d)),n.force3D!==!1&&Mt.set(d,{force3D:!0}),A.spacer=mt=Rt.spacer,ue=kn(d),Jt=ue[_+x.os2],rt=Mt.getProperty(d),Lt=Mt.quickSetter(d,x.a,Oe),Bc(d,mt,ue),nt=xa(d)),U){C=Ar(U)?ed(U,nd):nd,k=_a("scroller-start",l,F,x,C,0),jt=_a("scroller-end",l,F,x,C,0,k),lt=k["offset"+x.op.d2];var te=fn(wi(F,"content")||F);Ft=this.markerStart=_a("start",l,te,x,C,lt,0,E),Pt=this.markerEnd=_a("end",l,te,x,C,lt,0,E),E&&(ce=Mt.quickSetter([Ft,Pt],x.a,Oe)),!X&&!($n.length&&wi(F,"fixedMarkers")===!0)&&(C_(B?_e:F),Mt.set([k,jt],{force3D:!0}),xt=Mt.quickSetter(k,x.a,Oe),Gt=Mt.quickSetter(jt,x.a,Oe))}if(E){var Ct=E.vars.onUpdate,yt=E.vars.onUpdateParams;E.eventCallback("onUpdate",function(){A.update(0,0,1),Ct&&Ct.apply(E,yt||[])})}if(A.previous=function(){return Qt[Qt.indexOf(A)-1]},A.next=function(){return Qt[Qt.indexOf(A)+1]},A.revert=function(ht,kt){if(!kt)return A.kill(!0);var At=ht!==!1||!A.enabled,zt=en;At!==A.isReverted&&(At&&(Vt=Math.max(tt(),A.scroll.rec||0),ct=A.progress,se=i&&i.progress()),Ft&&[Ft,Pt,k,jt].forEach(function(be){return be.style.display=At?"none":"block"}),At&&(en=A,A.update(At)),d&&(!D||!A.isActive)&&(At?F_(d,mt,j):Bc(d,mt,kn(d),gt)),At||A.update(At),en=zt,A.isReverted=At)},A.refresh=function(ht,kt,At,zt){if(!((en||!A.enabled)&&!kt)){if(d&&ht&&Vn){Ge(r,"scrollEnd",wd);return}!mn&&it&&it(A),en=A,It.tween&&!At&&(It.tween.kill(),It.tween=0),$&&$.pause(),g&&i&&i.revert({kill:!1}).invalidate(),A.isReverted||A.revert(!0,!0),A._subPinOffset=!1;var be=vt(),$t=Wt(),ve=E?E.duration():fi(F,x),ke=Y<=.01,ye=0,me=zt||0,w=Ar(At)?At.end:n.end,O=n.endTrigger||f,V=Ar(At)?At.start:n.start||(n.start===0||!f?0:d?"0 0":"0 100%"),H=A.pinnedContainer=n.pinnedContainer&&fn(n.pinnedContainer,A),W=f&&Math.max(0,Qt.indexOf(A))||0,ot=W,ft,pt,Dt,Bt,Tt,Et,ae,Ie,Je,an,qt,Ot,si;for(U&&Ar(At)&&(Ot=Mt.getProperty(k,x.p),si=Mt.getProperty(jt,x.p));ot--;)Et=Qt[ot],Et.end||Et.refresh(0,1)||(en=A),ae=Et.pin,ae&&(ae===f||ae===d||ae===H)&&!Et.isReverted&&(an||(an=[]),an.unshift(Et),Et.revert(!0,!0)),Et!==Qt[ot]&&(W--,ot--);for(gn(V)&&(V=V(A)),V=Kf(V,"start",A),wt=od(V,f,be,x,tt(),Ft,k,A,$t,I,X,ve,E,A._startClamp&&"_startClamp")||(d?-.001:0),gn(w)&&(w=w(A)),Pn(w)&&!w.indexOf("+=")&&(~w.indexOf(" ")?w=(Pn(V)?V.split(" ")[0]:"")+w:(ye=Ma(w.substr(2),be),w=Pn(V)?V:(E?Mt.utils.mapRange(0,E.duration(),E.scrollTrigger.start,E.scrollTrigger.end,wt):wt)+ye,O=f)),w=Kf(w,"end",A),_t=Math.max(wt,od(w||(O?"100% 0":ve),O,be,x,tt()+ye,Pt,jt,A,$t,I,X,ve,E,A._endClamp&&"_endClamp"))||-.001,ye=0,ot=W;ot--;)Et=Qt[ot],ae=Et.pin,ae&&Et.start-Et._pinPush<=wt&&!E&&Et.end>0&&(ft=Et.end-(A._startClamp?Math.max(0,Et.start):Et.start),(ae===f&&Et.start-Et._pinPush<wt||ae===H)&&isNaN(V)&&(ye+=ft*(1-Et.progress)),ae===d&&(me+=ft));if(wt+=ye,_t+=ye,A._startClamp&&(A._startClamp+=ye),A._endClamp&&!mn&&(A._endClamp=_t||-.001,_t=Math.min(_t,fi(F,x))),Y=_t-wt||(wt-=.01)&&.001,ke&&(ct=Mt.utils.clamp(0,1,Mt.utils.normalize(wt,_t,Vt))),A._pinPush=me,Ft&&ye&&(ft={},ft[x.a]="+="+ye,H&&(ft[x.p]="-="+tt()),Mt.set([Ft,Pt],ft)),d&&!(Gc&&A.end>=fi(F,x)))ft=kn(d),Bt=x===Le,Dt=tt(),st=parseFloat(rt(x.a))+me,!ve&&_t>1&&(qt=(B?Te.scrollingElement||Kn:F).style,qt={style:qt,value:qt["overflow"+x.a.toUpperCase()]},B&&kn(_e)["overflow"+x.a.toUpperCase()]!=="scroll"&&(qt.style["overflow"+x.a.toUpperCase()]="scroll")),Bc(d,mt,ft),nt=xa(d),pt=Ei(d,!0),Ie=X&&bi(F,Bt?tn:Le)(),_?(gt=[_+x.os2,Y+me+Oe],gt.t=mt,ot=_===Fe?Da(d,x)+Y+me:0,ot&&(gt.push(x.d,ot+Oe),mt.style.flexBasis!=="auto"&&(mt.style.flexBasis=ot+Oe)),ms(gt),H&&Qt.forEach(function(le){le.pin===H&&le.vars.pinSpacing!==!1&&(le._subPinOffset=!0)}),X&&tt(Vt)):(ot=Da(d,x),ot&&mt.style.flexBasis!=="auto"&&(mt.style.flexBasis=ot+Oe)),X&&(Tt={top:pt.top+(Bt?Dt-wt:Ie)+Oe,left:pt.left+(Bt?Ie:Dt-wt)+Oe,boxSizing:"border-box",position:"fixed"},Tt[Cr]=Tt["max"+gs]=Math.ceil(pt.width)+Oe,Tt[Rr]=Tt["max"+Kc]=Math.ceil(pt.height)+Oe,Tt[zn]=Tt[zn+bo]=Tt[zn+Mo]=Tt[zn+wo]=Tt[zn+So]="0",Tt[Fe]=ft[Fe],Tt[Fe+bo]=ft[Fe+bo],Tt[Fe+Mo]=ft[Fe+Mo],Tt[Fe+wo]=ft[Fe+wo],Tt[Fe+So]=ft[Fe+So],et=U_(j,Tt,D),mn&&tt(0)),i?(Je=i._initted,Lc(1),i.render(i.duration(),!0,!0),St=rt(x.a)-st+Y+me,Nt=Math.abs(Y-St)>1,X&&Nt&&et.splice(et.length-2,2),i.render(0,!0,!0),Je||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),Lc(0)):St=Y,qt&&(qt.value?qt.style["overflow"+x.a.toUpperCase()]=qt.value:qt.style.removeProperty("overflow-"+x.a));else if(f&&tt()&&!E)for(pt=f.parentNode;pt&&pt!==_e;)pt._pinOffset&&(wt-=pt._pinOffset,_t-=pt._pinOffset),pt=pt.parentNode;an&&an.forEach(function(le){return le.revert(!1,!0)}),A.start=wt,A.end=_t,Xt=bt=mn?Vt:tt(),!E&&!mn&&(Xt<Vt&&tt(Vt),A.scroll.rec=0),A.revert(!1,!0),Q=nn(),ut&&(q=-1,ut.restart(!0)),en=0,i&&L&&(i._initted||se)&&i.progress()!==se&&i.progress(se||0,!0).render(i.time(),!0,!0),(ke||ct!==A.progress||E||g)&&(i&&!L&&i.totalProgress(E&&wt<-.001&&!ct?Mt.utils.normalize(wt,_t,0):ct,!0),A.progress=ke||(Xt-wt)/Y===ct?0:ct),d&&_&&(mt._pinOffset=Math.round(A.progress*St)),$&&$.invalidate(),isNaN(Ot)||(Ot-=Mt.getProperty(k,x.p),si-=Mt.getProperty(jt,x.p),va(k,x,Ot),va(Ft,x,Ot-(zt||0)),va(jt,x,si),va(Pt,x,si-(zt||0))),ke&&!mn&&A.update(),u&&!mn&&!b&&(b=!0,u(A),b=!1)}},A.getVelocity=function(){return(tt()-bt)/(nn()-mo)*1e3||0},A.endAnimation=function(){po(A.callbackAnimation),i&&($?$.progress(1):i.paused()?L||po(i,A.direction<0,1):po(i,i.reversed()))},A.labelToScroll=function(ht){return i&&i.labels&&(wt||A.refresh()||wt)+i.labels[ht]/i.duration()*Y||0},A.getTrailing=function(ht){var kt=Qt.indexOf(A),At=A.direction>0?Qt.slice(0,kt).reverse():Qt.slice(kt+1);return(Pn(ht)?At.filter(function(zt){return zt.vars.preventOverlaps===ht}):At).filter(function(zt){return A.direction>0?zt.end<=wt:zt.start>=_t})},A.update=function(ht,kt,At){if(!(E&&!At&&!ht)){var zt=mn===!0?Vt:A.scroll(),be=ht?0:(zt-wt)/Y,$t=be<0?0:be>1?1:be||0,ve=A.progress,ke,ye,me,w,O,V,H,W;if(kt&&(bt=Xt,Xt=E?tt():zt,M&&(N=Ut,Ut=i&&!L?i.totalProgress():$t)),p&&d&&!en&&!fa&&Vn&&(!$t&&wt<zt+(zt-bt)/(nn()-mo)*p?$t=1e-4:$t===1&&_t>zt+(zt-bt)/(nn()-mo)*p&&($t=.9999)),$t!==ve&&A.enabled){if(ke=A.isActive=!!$t&&$t<1,ye=!!ve&&ve<1,V=ke!==ye,O=V||!!$t!=!!ve,A.direction=$t>ve?1:-1,A.progress=$t,O&&!en&&(me=$t&&!ve?0:$t===1?1:ve===1?2:3,L&&(w=!V&&J[me+1]!=="none"&&J[me+1]||J[me],W=i&&(w==="complete"||w==="reset"||w in i))),y&&(V||W)&&(W||h||!i)&&(gn(y)?y(A):A.getTrailing(y).forEach(function(Dt){return Dt.endAnimation()})),L||($&&!en&&!fa?($._dp._time-$._start!==$._time&&$.render($._dp._time-$._start),$.resetTo?$.resetTo("totalProgress",$t,i._tTime/i._tDur):($.vars.totalProgress=$t,$.invalidate().restart())):i&&i.totalProgress($t,!!(en&&(Q||ht)))),d){if(ht&&_&&(mt.style[_+x.os2]=Jt),!X)Lt(_o(st+St*$t));else if(O){if(H=!ht&&$t>ve&&_t+1>zt&&zt+1>=fi(F,x),D)if(!ht&&(ke||H)){var ot=Ei(d,!0),ft=zt-wt;ad(d,_e,ot.top+(x===Le?ft:0)+Oe,ot.left+(x===Le?0:ft)+Oe)}else ad(d,mt);ms(ke||H?et:nt),Nt&&$t<1&&ke||Lt(st+($t===1&&!H?St:0))}}M&&!It.tween&&!en&&!fa&&ut.restart(!0),a&&(V||v&&$t&&($t<1||!Fc))&&To(a.targets).forEach(function(Dt){return Dt.classList[ke||v?"add":"remove"](a.className)}),o&&!L&&!ht&&o(A),O&&!en?(L&&(W&&(w==="complete"?i.pause().totalProgress(1):w==="reset"?i.restart(!0).pause():w==="restart"?i.restart(!0):i[w]()),o&&o(A)),(V||!Fc)&&(c&&V&&Uc(A,c),G[me]&&Uc(A,G[me]),v&&($t===1?A.kill(!1,1):G[me]=0),V||(me=$t===1?1:3,G[me]&&Uc(A,G[me]))),R&&!ke&&Math.abs(A.getVelocity())>(xo(R)?R:2500)&&(po(A.callbackAnimation),$?$.progress(1):po(i,w==="reverse"?1:!$t,1))):L&&o&&!en&&o(A)}if(Gt){var pt=E?zt/E.duration()*(E._caScrollDist||0):zt;xt(pt+(k._isFlipped?1:0)),Gt(pt)}ce&&ce(-zt/E.duration()*(E._caScrollDist||0))}},A.enable=function(ht,kt){A.enabled||(A.enabled=!0,Ge(F,"resize",vo),B||Ge(F,"scroll",hs),it&&Ge(r,"refreshInit",it),ht!==!1&&(A.progress=ct=0,Xt=bt=q=tt()),kt!==!1&&A.refresh())},A.getTween=function(ht){return ht&&It?It.tween:$},A.setPositions=function(ht,kt,At,zt){if(E){var be=E.scrollTrigger,$t=E.duration(),ve=be.end-be.start;ht=be.start+ve*ht/$t,kt=be.start+ve*kt/$t}A.refresh(!1,!1,{start:Qf(ht,At&&!!A._startClamp),end:Qf(kt,At&&!!A._endClamp)},zt),A.update()},A.adjustPinSpacing=function(ht){if(gt&&ht){var kt=gt.indexOf(x.d)+1;gt[kt]=parseFloat(gt[kt])+ht+Oe,gt[1]=parseFloat(gt[1])+ht+Oe,ms(gt)}},A.disable=function(ht,kt){if(A.enabled&&(ht!==!1&&A.revert(!0,!0),A.enabled=A.isActive=!1,kt||$&&$.pause(),Vt=0,Rt&&(Rt.uncache=1),it&&He(r,"refreshInit",it),ut&&(ut.pause(),It.tween&&It.tween.kill()&&(It.tween=0)),!B)){for(var At=Qt.length;At--;)if(Qt[At].scroller===F&&Qt[At]!==A)return;He(F,"resize",vo),B||He(F,"scroll",hs)}},A.kill=function(ht,kt){A.disable(ht,kt),$&&!kt&&$.kill(),l&&delete Wc[l];var At=Qt.indexOf(A);At>=0&&Qt.splice(At,1),At===pn&&ba>0&&pn--,At=0,Qt.forEach(function(zt){return zt.scroller===A.scroller&&(At=1)}),At||mn||(A.scroll.rec=0),i&&(i.scrollTrigger=null,ht&&i.revert({kill:!1}),kt||i.kill()),Ft&&[Ft,Pt,k,jt].forEach(function(zt){return zt.parentNode&&zt.parentNode.removeChild(zt)}),Eo===A&&(Eo=0),d&&(Rt&&(Rt.uncache=1),At=0,Qt.forEach(function(zt){return zt.pin===d&&At++}),At||(Rt.spacer=0)),n.onKill&&n.onKill(A)},Qt.push(A),A.enable(!1,!1),pe&&pe(A),i&&i.add&&!Y){var ie=A.update;A.update=function(){A.update=ie,wt||_t||A.refresh()},Mt.delayedCall(.01,A.update),Y=.01,wt=_t=0}else A.refresh();d&&L_()},r.register=function(n){return fs||(Mt=n||xd(),_d()&&window.document&&r.enable(),fs=go),fs},r.defaults=function(n){if(n)for(var i in n)ga[i]=n[i];return ga},r.disable=function(n,i){go=0,Qt.forEach(function(o){return o[i?"kill":"disable"](n)}),He(ne,"wheel",hs),He(Te,"scroll",hs),clearInterval(ha),He(Te,"touchcancel",hi),He(_e,"touchstart",hi),pa(He,Te,"pointerdown,touchstart,mousedown",jf),pa(He,Te,"pointerup,touchend,mouseup",td),Ta.kill(),da(He);for(var s=0;s<Kt.length;s+=3)ma(He,Kt[s],Kt[s+1]),ma(He,Kt[s],Kt[s+2])},r.enable=function(){if(ne=window,Te=document,Kn=Te.documentElement,_e=Te.body,Mt&&(To=Mt.utils.toArray,yo=Mt.utils.clamp,Hc=Mt.core.context||hi,Lc=Mt.core.suppressOverwrites||hi,Yc=ne.history.scrollRestoration||"auto",Xc=ne.pageYOffset,Mt.core.globals("ScrollTrigger",r),_e)){go=1,ps=document.createElement("div"),ps.style.height="100vh",ps.style.position="absolute",Ad(),T_(),Ce.register(Mt),r.isTouch=Ce.isTouch,Ji=Ce.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Vc=Ce.isTouch===1,Ge(ne,"wheel",hs),fd=[ne,Te,Kn,_e],Mt.matchMedia?(r.matchMedia=function(l){var c=Mt.matchMedia(),u;for(u in l)c.add(u,l[u]);return c},Mt.addEventListener("matchMediaInit",function(){return jc()}),Mt.addEventListener("matchMediaRevert",function(){return Ed()}),Mt.addEventListener("matchMedia",function(){Dr(0,1),Fr("matchMedia")}),Mt.matchMedia("(orientation: portrait)",function(){return Oc(),Oc})):console.warn("Requires GSAP 3.11.0 or later"),Oc(),Ge(Te,"scroll",hs);var n=_e.style,i=n.borderTopStyle,s=Mt.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=Ei(_e),Le.m=Math.round(o.top+Le.sc())||0,tn.m=Math.round(o.left+tn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),ha=setInterval(id,250),Mt.delayedCall(.5,function(){return fa=0}),Ge(Te,"touchcancel",hi),Ge(_e,"touchstart",hi),pa(Ge,Te,"pointerdown,touchstart,mousedown",jf),pa(Ge,Te,"pointerup,touchend,mouseup",td),kc=Mt.utils.checkPrefix("transform"),wa.push(kc),fs=nn(),Ta=Mt.delayedCall(.2,Dr).pause(),ds=[Te,"visibilitychange",function(){var l=ne.innerWidth,c=ne.innerHeight;Te.hidden?(Jf=l,$f=c):(Jf!==l||$f!==c)&&vo()},Te,"DOMContentLoaded",Dr,ne,"load",Dr,ne,"resize",vo],da(Ge),Qt.forEach(function(l){return l.enable(0,1)}),a=0;a<Kt.length;a+=3)ma(He,Kt[a],Kt[a+1]),ma(He,Kt[a],Kt[a+2])}},r.config=function(n){"limitCallbacks"in n&&(Fc=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(ha)||(ha=i)&&setInterval(id,i),"ignoreMobileResize"in n&&(Vc=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(da(He)||da(Ge,n.autoRefreshEvents||"none"),pd=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=fn(n),o=Kt.indexOf(s),a=Ir(s);~o&&Kt.splice(o,a?6:2),i&&(a?$n.unshift(ne,i,_e,i,Kn,i):$n.unshift(s,i))},r.clearMatchMedia=function(n){Qt.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(Pn(n)?fn(n):n).getBoundingClientRect(),a=o[s?Cr:Rr]*i||0;return s?o.right-a>0&&o.left+a<ne.innerWidth:o.bottom-a>0&&o.top+a<ne.innerHeight},r.positionInViewport=function(n,i,s){Pn(n)&&(n=fn(n));var o=n.getBoundingClientRect(),a=o[s?Cr:Rr],l=i==null?a/2:i in Ca?Ca[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/ne.innerWidth:(o.top+l)/ne.innerHeight},r.killAll=function(n){if(Qt.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=Lr.killAll||[];Lr={},i.forEach(function(s){return s()})}},r}();Ht.version="3.12.5";Ht.saveStyles=function(r){return r?To(r).forEach(function(t){if(t&&t.style){var e=Rn.indexOf(t);e>=0&&Rn.splice(e,5),Rn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Mt.core.getCache(t),Hc())}}):Rn};Ht.revert=function(r,t){return jc(!r,t)};Ht.create=function(r,t){return new Ht(r,t)};Ht.refresh=function(r){return r?vo():(fs||Ht.register())&&Dr(!0)};Ht.update=function(r){return++Kt.cache&&Ti(r===!0?2:0)};Ht.clearScrollMemory=Td;Ht.maxScroll=function(r,t){return fi(r,t?tn:Le)};Ht.getScrollFunc=function(r,t){return bi(fn(r),t?tn:Le)};Ht.getById=function(r){return Wc[r]};Ht.getAll=function(){return Qt.filter(function(r){return r.vars.id!=="ScrollSmoother"})};Ht.isScrolling=function(){return!!Vn};Ht.snapDirectional=Qc;Ht.addEventListener=function(r,t){var e=Lr[r]||(Lr[r]=[]);~e.indexOf(t)||e.push(t)};Ht.removeEventListener=function(r,t){var e=Lr[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};Ht.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,u){var h=[],f=[],d=Mt.delayedCall(i,function(){u(h,f),h=[],f=[]}).pause();return function(_){h.length||d.restart(!0),h.push(_.trigger),f.push(_),s<=h.length&&d.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&gn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return gn(s)&&(s=s(),Ge(Ht,"refresh",function(){return s=t.batchMax()})),To(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(Ht.create(c))}),e};var cd=function(t,e,n,i){return e>i?t(i):e<0&&t(0),n>i?(i-e)/(n-e):n<0?e/(e-n):1},zc=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Ce.isTouch?" pinch-zoom":""):"none",t===Kn&&r(_e,e)},ya={auto:1,scroll:1},B_=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||Mt.core.getCache(s),a=nn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==_e&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(ya[(l=kn(s)).overflowY]||ya[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!Ir(s)&&(ya[(l=kn(s)).overflowY]||ya[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},Cd=function(t,e,n,i){return Ce.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&B_,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&Ge(Te,Ce.eventTypes[0],hd,!1,!0)},onDisable:function(){return He(Te,Ce.eventTypes[0],hd,!0)}})},z_=/(input|label|select|textarea)/i,ud,hd=function(t){var e=z_.test(t.target.tagName);(e||ud)&&(t._gsapAllow=!0,ud=e)},k_=function(t){Ar(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e=t,n=e.normalizeScrollX,i=e.momentum,s=e.allowNestedScroll,o=e.onRelease,a,l,c=fn(t.target)||Kn,u=Mt.core.globals().ScrollSmoother,h=u&&u.get(),f=Ji&&(t.content&&fn(t.content)||h&&t.content!==!1&&!h.smooth()&&h.content()),d=bi(c,Le),_=bi(c,tn),g=1,p=(Ce.isTouch&&ne.visualViewport?ne.visualViewport.scale*ne.visualViewport.width:ne.outerWidth)/ne.innerWidth,m=0,S=gn(i)?function(){return i(a)}:function(){return i||2.8},v,M,D=Cd(c,t.type,!0,s),T=function(){return M=!1},E=hi,R=hi,y=function(){l=fi(c,Le),R=yo(Ji?1:0,l),n&&(E=yo(0,fi(c,tn))),v=Pr},x=function(){f._gsap.y=_o(parseFloat(f._gsap.y)+d.offset)+"px",f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(f._gsap.y)+", 0, 1)",d.offset=d.cacheID=0},L=function(){if(M){requestAnimationFrame(T);var U=_o(a.deltaY/2),I=R(d.v-U);if(f&&I!==d.v+d.offset){d.offset=I-d.v;var A=_o((parseFloat(f&&f._gsap.y)||0)-d.offset);f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+A+", 0, 1)",f._gsap.y=A+"px",d.cacheID=Kt.cache,Ti()}return!0}d.offset&&x(),M=!0},F,P,B,X,G=function(){y(),F.isActive()&&F.vars.scrollY>l&&(d()>l?F.progress(1)&&d(l):F.resetTo("scrollY",l))};return f&&Mt.set(f,{y:"+=0"}),t.ignoreCheck=function(J){return Ji&&J.type==="touchmove"&&L(J)||g>1.05&&J.type!=="touchstart"||a.isGesturing||J.touches&&J.touches.length>1},t.onPress=function(){M=!1;var J=g;g=_o((ne.visualViewport&&ne.visualViewport.scale||1)/p),F.pause(),J!==g&&zc(c,g>1.01?!0:n?!1:"x"),P=_(),B=d(),y(),v=Pr},t.onRelease=t.onGestureStart=function(J,U){if(d.offset&&x(),!U)X.restart(!0);else{Kt.cache++;var I=S(),A,it;n&&(A=_(),it=A+I*.05*-J.velocityX/.227,I*=cd(_,A,it,fi(c,tn)),F.vars.scrollX=E(it)),A=d(),it=A+I*.05*-J.velocityY/.227,I*=cd(d,A,it,fi(c,Le)),F.vars.scrollY=R(it),F.invalidate().duration(I).play(.01),(Ji&&F.vars.scrollY>=l||A>=l-1)&&Mt.to({},{onUpdate:G,duration:I})}o&&o(J)},t.onWheel=function(){F._ts&&F.pause(),nn()-m>1e3&&(v=0,m=nn())},t.onChange=function(J,U,I,A,it){if(Pr!==v&&y(),U&&n&&_(E(A[2]===U?P+(J.startX-J.x):_()+U-A[1])),I){d.offset&&x();var vt=it[2]===I,Wt=vt?B+J.startY-J.y:d()+I-it[1],q=R(Wt);vt&&Wt!==q&&(B+=q-Wt),d(q)}(I||U)&&Ti()},t.onEnable=function(){zc(c,n?!1:"x"),Ht.addEventListener("refresh",G),Ge(ne,"resize",G),d.smooth&&(d.target.style.scrollBehavior="auto",d.smooth=_.smooth=!1),D.enable()},t.onDisable=function(){zc(c,!0),He(ne,"resize",G),Ht.removeEventListener("refresh",G),D.kill()},t.lockAxis=t.lockAxis!==!1,a=new Ce(t),a.iOS=Ji,Ji&&!d()&&d(1),Ji&&Mt.ticker.add(hi),X=a._dc,F=Mt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Dd(d,d(),function(){return F.pause()})},onUpdate:Ti,onComplete:X.vars.onComplete}),a};Ht.sort=function(r){return Qt.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};Ht.observe=function(r){return new Ce(r)};Ht.normalizeScroll=function(r){if(typeof r>"u")return dn;if(r===!0&&dn)return dn.enable();if(r===!1){dn&&dn.kill(),dn=r;return}var t=r instanceof Ce?r:k_(r);return dn&&dn.target===t.target&&dn.kill(),Ir(t.target)&&(dn=t),t};Ht.core={_getVelocityProp:ua,_inputObserver:Cd,_scrollers:Kt,_proxies:$n,bridge:{ss:function(){Vn||Fr("scrollStart"),Vn=nn()},ref:function(){return en}}};xd()&&Mt.registerPlugin(Ht);he.registerPlugin(Ht);var Rd=()=>{[{wrapperSelector:".prx-steps-wrap",itemSelector:".prx-step-box, .prx-step-divider"},{wrapperSelector:".prx-trust_grid",itemSelector:".prx-trust-box"},{wrapperSelector:".prx-areas_wrapper",itemSelector:".prx-areas_item",desktopOnly:!0},{wrapperSelector:".prx-mastery_techonologies-wrapper",itemSelector:".mastery_technologies_image"}].forEach(({wrapperSelector:t,itemSelector:e,desktopOnly:n})=>{if(n&&window.innerWidth<992)return;let i=document.querySelector(t);if(!i)return;let s=i.querySelectorAll(e);s.length&&(he.set(s,{opacity:0,y:48}),he.timeline({scrollTrigger:{trigger:i,start:"top bottom-=12%",toggleActions:"play none none reverse"}}).to(s,{opacity:1,y:0,duration:.7,ease:"power2.out",stagger:.22}))})};var V_=/(?:^\s+|\s+$)/g,tu=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function _s(r){var t=r.nodeType,e="";if(t===1||t===9||t===11){if(typeof r.textContent=="string")return r.textContent;for(r=r.firstChild;r;r=r.nextSibling)e+=_s(r)}else if(t===3||t===4)return r.nodeValue;return e}function Qn(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(V_,"")),t&&t!=="")return r.replace(/>/g,">").replace(/</g,"<").split(t);for(var i=[],s=r.length,o=0,a,l;o<s;o++)l=r.charAt(o),(l.charCodeAt(0)>=55296&&l.charCodeAt(0)<=56319||r.charCodeAt(o+1)>=65024&&r.charCodeAt(o+1)<=65039)&&(a=((r.substr(o,12).split(tu)||[])[1]||"").length||2,l=r.substr(o,a),i.emoji=1,o+=a-1),i.push(l===">"?">":l==="<"?"<":n&&l===" "&&(r.charAt(o-1)===" "||r.charAt(o+1)===" ")?" ":l);return i}var Pa=function(){function r(e){this.chars=Qn(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=Id(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=Id(n-this.length,this.chars);this.length=n},r}(),Nr,Nd,Ud=function(){return Nr||typeof window<"u"&&(Nr=window.gsap)&&Nr.registerPlugin&&Nr},H_=1,Pd=/\s+/g,Id=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},eu="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Ld=eu.toLowerCase(),G_={upperCase:new Pa(eu),lowerCase:new Pa(Ld),upperAndLowerCase:new Pa(eu+Ld)},Fd=function(){Nd=Nr=Ud()},Do={version:"3.12.5",name:"scrambleText",register:function(t,e,n){Nr=t,Fd()},init:function(t,e,n,i,s){if(Nd||Fd(),this.prop="innerHTML"in t?"innerHTML":"textContent"in t?"textContent":0,!!this.prop){this.target=t,typeof e!="object"&&(e={text:e});var o=e.text||e.value||"",a=e.trim!==!1,l=this,c,u,h,f;return l.delimiter=c=e.delimiter||"",l.original=Qn(_s(t).replace(Pd," ").split(" ").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=Qn((o||"").replace(Pd," "),c,a),l.hasClass=!!(e.newClass||e.oldClass),l.newClass=e.newClass,l.oldClass=e.oldClass,f=c==="",l.textHasEmoji=f&&!!l.text.emoji,l.charsHaveEmoji=!!e.chars&&!!Qn(e.chars).emoji,l.length=f?l.original.length:l.original.join(c).length,l.lengthDif=(f?l.text.length:l.text.join(c).length)-l.length,l.fillChar=e.fillChar||e.chars&&~e.chars.indexOf(" ")?" ":"",l.charSet=h=G_[e.chars||"upperCase"]||new Pa(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,u=l.length+Math.max(l.lengthDif,0),u>h.length&&h.grow(u),l.chars=h.sets[l.setIndex],l.revealDelay=e.revealDelay||0,l.tweenLength=e.tweenLength!==!1,l.tween=n,l.rightToLeft=!!e.rightToLeft,l._props.push("scrambleText","text"),H_}},render:function(t,e){var n=e.target,i=e.prop,s=e.text,o=e.delimiter,a=e.tween,l=e.prevScrambleTime,c=e.revealDelay,u=e.setIndex,h=e.chars,f=e.charSet,d=e.length,_=e.textHasEmoji,g=e.charsHaveEmoji,p=e.lengthDif,m=e.tweenLength,S=e.oldClass,v=e.newClass,M=e.rightToLeft,D=e.fillChar,T=e.speed,E=e.original,R=e.hasClass,y=s.length,x=a._time,L=x-l,F,P,B,X,G,J,U,I,A,it,vt;c&&(a._from&&(x=a._dur-x),t=x===0?0:x<c?1e-6:x===a._dur?1:a._ease((x-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),M&&(t=1-t),F=~~(t*y+.5),t?((L>T||L<-T)&&(e.setIndex=u=(u+(Math.random()*19|0))%20,e.chars=f.sets[u],e.prevScrambleTime+=L),X=h):X=E.join(o),vt=a._from?t:1-t,it=d+(m?a._from?vt*vt*vt:1-vt*vt*vt:1)*p,M?t===1&&(a._from||a.data==="isFromStart")?(B="",X=E.join(o)):(U=s.slice(F).join(o),g?B=Qn(X).slice(0,it-(_?Qn(U):U).length+.5|0).join(""):B=X.substr(0,it-(_?Qn(U):U).length+.5|0),X=U):(B=s.slice(0,F).join(o),P=(_?Qn(B):B).length,g?X=Qn(X).slice(P,it+.5|0).join(""):X=X.substr(P,it-P+.5|0)),R?(I=M?S:v,A=M?v:S,G=I&&F!==0,J=A&&F!==y,U=(G?"<span class='"+I+"'>":"")+B+(G?"</span>":"")+(J?"<span class='"+A+"'>":"")+o+X+(J?"</span>":"")):U=B+o+X,n[i]=D===" "&&~U.indexOf(" ")?U.split(" ").join(" "):U}};Do.emojiSafeSplit=Qn;Do.getText=_s;Ud()&&Nr.registerPlugin(Do);he.registerPlugin(Do);var Od=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{he.matchMedia().add("(min-width: 768px)",()=>{he.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};he.registerPlugin(Ht);var Bd=()=>{let r=document.querySelector(".prx-header-wrapper-center.prx-pinned"),t=document.querySelector(".prx-special_content"),e=document.querySelectorAll(".prx-special_content .prx-special-row, .prx-special_content .prx-special-row-second");if(!r||!t||!e.length)return;he.matchMedia().add("(min-width: 1440px)",()=>{let o=80+r.offsetHeight;he.set(r,{zIndex:10,position:"relative"}),Ht.create({trigger:r,endTrigger:t,start:"top top+=80",end:"bottom bottom",pin:!0,pinSpacing:!1}),e.forEach((a,l)=>{if(l===e.length-1){Ht.create({trigger:a,endTrigger:t,start:`top top+=${o}`,end:"bottom bottom",pin:!0,pinSpacing:!1});return}he.to(a,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",scale:1,opacity:1},filter:"brightness(50%) blur(10px)",scale:.6,opacity:0,scrollTrigger:{trigger:a,start:`top top+=${o}`,endTrigger:t,end:"bottom+=5% bottom",pin:!0,pinSpacing:!1,scrub:1,invalidateOnRefresh:!1}})})})};var zd=()=>{if(window.innerWidth>=992)return;let r=document.querySelector(".prx-areas_wrapper"),t=r?.querySelector(".prx-areas_row"),e=t?Array.from(t.querySelectorAll(".prx-areas_item")):[];if(!e.length)return;let n=2,i=n,s=!1;e.slice(-n).reverse().forEach(_=>t.prepend(_.cloneNode(!0))),e.slice(0,n).forEach(_=>t.appendChild(_.cloneNode(!0)));let o=Array.from(t.querySelectorAll(".prx-areas_item")),a=0,l=0,c=0,u=()=>{he.set(t,{x:0}),l=o[0].offsetWidth,c=r.offsetWidth,a=l+16},h=_=>-_*a+(c-l)/2,f=_=>{s||(s=!0,he.to(t,{x:h(_),duration:.45,ease:"power2.out",onComplete:()=>{_<n?(i=_+e.length,he.set(t,{x:h(i)})):_>=n+e.length?(i=_-e.length,he.set(t,{x:h(i)})):i=_,s=!1}}))},d=0;r.addEventListener("touchstart",_=>d=_.touches[0].clientX),r.addEventListener("touchend",_=>{let g=d-_.changedTouches[0].clientX;Math.abs(g)>50&&f(i+(g>0?1:-1))}),requestAnimationFrame(()=>{he.set(o,{clearProps:"y,opacity"}),u(),he.set(t,{x:h(i)})}),window.addEventListener("resize",()=>{window.innerWidth>=992||(u(),he.set(t,{x:h(i)}))})};var vh="164";var W_=0,kd=1,X_=2;var fm=1,yh=2,Ii=3,lr=0,Tn=1,Fi=2,sr=0,or=1,Vd=2,Hd=3,Gd=4,q_=5,Gr=100,Y_=101,Z_=102,J_=103,$_=104,K_=200,Q_=201,j_=202,t0=203,Uu=204,Ou=205,e0=206,n0=207,i0=208,r0=209,s0=210,o0=211,a0=212,l0=213,c0=214,u0=0,h0=1,f0=2,il=3,d0=4,p0=5,m0=6,g0=7,dm=0,_0=1,x0=2,ar=0,v0=1,y0=2,M0=3,S0=4,b0=5,w0=6,E0=7;var pm=300,ks=301,Vs=302,Bu=303,zu=304,Rl=306,ku=1e3,Xr=1001,Vu=1002,Wn=1003,T0=1004;var Ia=1005;var ni=1006,nu=1007;var qr=1008;var cr=1009,A0=1010,D0=1011,mm=1012,gm=1013,Hs=1014,ir=1015,Pl=1016,_m=1017,xm=1018,ko=1020,C0=35902,R0=1021,P0=1022,pi=1023,I0=1024,L0=1025,Os=1026,Uo=1027,F0=1028,vm=1029,N0=1030,ym=1031,Mm=1033,iu=33776,ru=33777,su=33778,ou=33779,Wd=35840,Xd=35841,qd=35842,Yd=35843,Zd=36196,Jd=37492,$d=37496,Kd=37808,Qd=37809,jd=37810,tp=37811,ep=37812,np=37813,ip=37814,rp=37815,sp=37816,op=37817,ap=37818,lp=37819,cp=37820,up=37821,au=36492,hp=36494,fp=36495,U0=36283,dp=36284,pp=36285,mp=36286;var rl=2300,sl=2301,lu=2302,gp=2400,_p=2401,xp=2402;var O0=3200,B0=3201,z0=0,k0=1,nr="",Gn="srgb",fr="srgb-linear",Mh="display-p3",Il="display-p3-linear",ol="linear",xe="srgb",al="rec709",ll="p3";var xs=7680;var vp=519,V0=512,H0=513,G0=514,Sm=515,W0=516,X0=517,q0=518,Y0=519,yp=35044;var Mp="300 es",Ni=2e3,cl=2001,ur=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s<o;s++)i[s].call(this,t);t.target=null}}},rn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var cu=Math.PI/180,Hu=180/Math.PI;function Vo(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(rn[r&255]+rn[r>>8&255]+rn[r>>16&255]+rn[r>>24&255]+"-"+rn[t&255]+rn[t>>8&255]+"-"+rn[t>>16&15|64]+rn[t>>24&255]+"-"+rn[e&63|128]+rn[e>>8&255]+"-"+rn[e>>16&255]+rn[e>>24&255]+rn[n&255]+rn[n>>8&255]+rn[n>>16&255]+rn[n>>24&255]).toLowerCase()}function En(r,t,e){return Math.max(t,Math.min(e,r))}function Z0(r,t){return(r%t+t)%t}function uu(r,t,e){return(1-e)*r+e*t}function Co(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function wn(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var oe=class r{constructor(t=0,e=0){r.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(En(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Zt=class r{constructor(t,e,n,i,s,o,a,l,c){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c)}set(t,e,n,i,s,o,a,l,c){let u=this.elements;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=s,u[5]=l,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],u=n[4],h=n[7],f=n[2],d=n[5],_=n[8],g=i[0],p=i[3],m=i[6],S=i[1],v=i[4],M=i[7],D=i[2],T=i[5],E=i[8];return s[0]=o*g+a*S+l*D,s[3]=o*p+a*v+l*T,s[6]=o*m+a*M+l*E,s[1]=c*g+u*S+h*D,s[4]=c*p+u*v+h*T,s[7]=c*m+u*M+h*E,s[2]=f*g+d*S+_*D,s[5]=f*p+d*v+_*T,s[8]=f*m+d*M+_*E,this}multiplyScalar(t){let 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(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*s*u+n*a*l+i*s*c-i*o*l}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*o-a*c,f=a*l-u*s,d=c*s-o*l,_=e*h+n*f+i*d;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/_;return t[0]=h*g,t[1]=(i*c-u*n)*g,t[2]=(a*n-i*o)*g,t[3]=f*g,t[4]=(u*e-i*l)*g,t[5]=(i*s-a*e)*g,t[6]=d*g,t[7]=(n*l-c*e)*g,t[8]=(o*e-n*s)*g,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let 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(t,e,n,i,s,o,a){let l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+t,-i*c,i*l,-i*(-c*o+l*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(hu.makeScale(t,e)),this}rotate(t){return this.premultiply(hu.makeRotation(-t)),this}translate(t,e){return this.premultiply(hu.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},hu=new Zt;function bm(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function ul(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function J0(){let r=ul("canvas");return r.style.display="block",r}var Sp={};function $0(r){r in Sp||(Sp[r]=!0,console.warn(r))}var bp=new Zt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),wp=new Zt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),La={[fr]:{transfer:ol,primaries:al,toReference:r=>r,fromReference:r=>r},[Gn]:{transfer:xe,primaries:al,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Il]:{transfer:ol,primaries:ll,toReference:r=>r.applyMatrix3(wp),fromReference:r=>r.applyMatrix3(bp)},[Mh]:{transfer:xe,primaries:ll,toReference:r=>r.convertSRGBToLinear().applyMatrix3(wp),fromReference:r=>r.applyMatrix3(bp).convertLinearToSRGB()}},K0=new Set([fr,Il]),fe={enabled:!0,_workingColorSpace:fr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!K0.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,t,e){if(this.enabled===!1||t===e||!t||!e)return r;let n=La[t].toReference,i=La[e].fromReference;return i(n(r))},fromWorkingColorSpace:function(r,t){return this.convert(r,this._workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this._workingColorSpace)},getPrimaries:function(r){return La[r].primaries},getTransfer:function(r){return r===nr?ol:La[r].transfer}};function Bs(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function fu(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var vs,Gu=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{vs===void 0&&(vs=ul("canvas")),vs.width=t.width,vs.height=t.height;let n=vs.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=vs}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=ul("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=Bs(s[o]/255)*255;return n.putImageData(i,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(Bs(e[n]/255)*255):e[n]=Bs(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},Q0=0,hl=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Q0++}),this.uuid=Vo(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(du(i[o].image)):s.push(du(i[o]))}else s=du(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function du(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?Gu.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var j0=0,Yn=class r extends ur{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=Xr,i=Xr,s=ni,o=qr,a=pi,l=cr,c=r.DEFAULT_ANISOTROPY,u=nr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:j0++}),this.uuid=Vo(),this.name="",this.source=new hl(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new oe(0,0),this.repeat=new oe(1,1),this.center=new oe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Zt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,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.internalFormat=t.internalFormat,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.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==pm)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ku:t.x=t.x-Math.floor(t.x);break;case Xr:t.x=t.x<0?0:1;break;case Vu:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case ku:t.y=t.y-Math.floor(t.y);break;case Xr:t.y=t.y<0?0:1;break;case Vu:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};Yn.DEFAULT_IMAGE=null;Yn.DEFAULT_MAPPING=pm;Yn.DEFAULT_ANISOTROPY=1;var Xe=class r{constructor(t=0,e=0,n=0,i=1){r.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(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(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(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(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(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(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}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,l=t.elements,c=l[0],u=l[4],h=l[8],f=l[1],d=l[5],_=l[9],g=l[2],p=l[6],m=l[10];if(Math.abs(u-f)<.01&&Math.abs(h-g)<.01&&Math.abs(_-p)<.01){if(Math.abs(u+f)<.1&&Math.abs(h+g)<.1&&Math.abs(_+p)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let v=(c+1)/2,M=(d+1)/2,D=(m+1)/2,T=(u+f)/4,E=(h+g)/4,R=(_+p)/4;return v>M&&v>D?v<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(v),i=T/n,s=E/n):M>D?M<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(M),n=T/i,s=R/i):D<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(D),n=E/s,i=R/s),this.set(n,i,s,e),this}let S=Math.sqrt((p-_)*(p-_)+(h-g)*(h-g)+(f-u)*(f-u));return Math.abs(S)<.001&&(S=1),this.x=(p-_)/S,this.y=(h-g)/S,this.z=(f-u)/S,this.w=Math.acos((c+d+m-1)/2),this}min(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(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(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Wu=class extends ur{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xe(0,0,t,e),this.scissorTest=!1,this.viewport=new Xe(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ni,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new Yn(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];let o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,s=this.textures.length;i<s;i++)this.textures[i].image.width=t,this.textures[i].image.height=e,this.textures[i].image.depth=n;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,i=t.textures.length;n<i;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new hl(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Ui=class extends Wu{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},fl=class extends Yn{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=Wn,this.minFilter=Wn,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Xu=class extends Yn{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=Wn,this.minFilter=Wn,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var hr=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],f=s[o+0],d=s[o+1],_=s[o+2],g=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=u,t[e+3]=h;return}if(a===1){t[e+0]=f,t[e+1]=d,t[e+2]=_,t[e+3]=g;return}if(h!==g||l!==f||c!==d||u!==_){let p=1-a,m=l*f+c*d+u*_+h*g,S=m>=0?1:-1,v=1-m*m;if(v>Number.EPSILON){let D=Math.sqrt(v),T=Math.atan2(D,m*S);p=Math.sin(p*T)/D,a=Math.sin(a*T)/D}let M=a*S;if(l=l*p+f*M,c=c*p+d*M,u=u*p+_*M,h=h*p+g*M,p===1-a){let D=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=D,c*=D,u*=D,h*=D}}t[e]=l,t[e+1]=c,t[e+2]=u,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=s[o],f=s[o+1],d=s[o+2],_=s[o+3];return t[e]=a*_+u*h+l*d-c*f,t[e+1]=l*_+u*f+c*h-a*d,t[e+2]=c*_+u*d+a*f-l*h,t[e+3]=u*_-a*h-l*f-c*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,l=Math.sin,c=a(n/2),u=a(i/2),h=a(s/2),f=l(n/2),d=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=f*u*h+c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h-f*d*_;break;case"YXZ":this._x=f*u*h+c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h+f*d*_;break;case"ZXY":this._x=f*u*h-c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h-f*d*_;break;case"ZYX":this._x=f*u*h-c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h+f*d*_;break;case"YZX":this._x=f*u*h+c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h-f*d*_;break;case"XZY":this._x=f*u*h-c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h+f*d*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],l=e[9],c=e[2],u=e[6],h=e[10],f=n+a+h;if(f>0){let d=.5/Math.sqrt(f+1);this._w=.25/d,this._x=(u-l)*d,this._y=(s-c)*d,this._z=(o-i)*d}else if(n>a&&n>h){let d=2*Math.sqrt(1+n-a-h);this._w=(u-l)/d,this._x=.25*d,this._y=(i+o)/d,this._z=(s+c)/d}else if(a>h){let d=2*Math.sqrt(1+a-n-h);this._w=(s-c)/d,this._x=(i+o)/d,this._y=.25*d,this._z=(l+u)/d}else{let d=2*Math.sqrt(1+h-n-a);this._w=(o-i)/d,this._x=(s+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(En(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,l=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-n*c,this._z=s*u+o*c+n*l-i*a,this._w=o*u-n*a-i*l-s*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let l=1-a*a;if(l<=Number.EPSILON){let d=1-e;return this._w=d*o+e*this._w,this._x=d*n+e*this._x,this._y=d*i+e*this._y,this._z=d*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-e)*u)/c,f=Math.sin(e*u)/c;return this._w=o*h+this._w*f,this._x=n*h+this._x*f,this._y=i*h+this._y*f,this._z=s*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Z=class r{constructor(t=0,e=0,n=0){r.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Ep.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Ep.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,l=t.w,c=2*(o*i-a*n),u=2*(a*e-s*i),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*u,this.y=n+l*u+a*c-s*h,this.z=i+l*h+s*u-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(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(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(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return this.x=i*l-s*a,this.y=s*o-n*l,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return pu.copy(this).projectOnVector(t),this.sub(pu)}reflect(t){return this.sub(pu.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(En(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},pu=new Z,Ep=new hr,Yr=class{constructor(t=new Z(1/0,1/0,1/0),e=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(jn.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(jn.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=jn.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let s=n.getAttribute("position");if(e===!0&&s!==void 0&&t.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)t.isMesh===!0?t.getVertexPosition(o,jn):jn.fromBufferAttribute(s,o),jn.applyMatrix4(t.matrixWorld),this.expandByPoint(jn);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Fa.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Fa.copy(n.boundingBox)),Fa.applyMatrix4(t.matrixWorld),this.union(Fa)}let i=t.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],e);return this}containsPoint(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(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(t,e){return 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(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(t){return this.clampPoint(t.center,jn),jn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ro),Na.subVectors(this.max,Ro),ys.subVectors(t.a,Ro),Ms.subVectors(t.b,Ro),Ss.subVectors(t.c,Ro),$i.subVectors(Ms,ys),Ki.subVectors(Ss,Ms),Ur.subVectors(ys,Ss);let e=[0,-$i.z,$i.y,0,-Ki.z,Ki.y,0,-Ur.z,Ur.y,$i.z,0,-$i.x,Ki.z,0,-Ki.x,Ur.z,0,-Ur.x,-$i.y,$i.x,0,-Ki.y,Ki.x,0,-Ur.y,Ur.x,0];return!mu(e,ys,Ms,Ss,Na)||(e=[1,0,0,0,1,0,0,0,1],!mu(e,ys,Ms,Ss,Na))?!1:(Ua.crossVectors($i,Ki),e=[Ua.x,Ua.y,Ua.z],mu(e,ys,Ms,Ss,Na))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,jn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(jn).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ai[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ai[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ai[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ai[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ai[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ai[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ai[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ai[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ai),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ai=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],jn=new Z,Fa=new Yr,ys=new Z,Ms=new Z,Ss=new Z,$i=new Z,Ki=new Z,Ur=new Z,Ro=new Z,Na=new Z,Ua=new Z,Or=new Z;function mu(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){Or.fromArray(r,s);let a=i.x*Math.abs(Or.x)+i.y*Math.abs(Or.y)+i.z*Math.abs(Or.z),l=t.dot(Or),c=e.dot(Or),u=n.dot(Or);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}var tx=new Yr,Po=new Z,gu=new Z,Gs=class{constructor(t=new Z,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):tx.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;s<o;s++)i=Math.max(i,n.distanceToSquared(t[s]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Po.subVectors(t,this.center);let e=Po.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Po,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(gu.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Po.copy(t.center).add(gu)),this.expandByPoint(Po.copy(t.center).sub(gu))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Di=new Z,_u=new Z,Oa=new Z,Qi=new Z,xu=new Z,Ba=new Z,vu=new Z,dl=class{constructor(t=new Z,e=new Z(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Di)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Di.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Di.copy(this.origin).addScaledVector(this.direction,e),Di.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){_u.copy(t).add(e).multiplyScalar(.5),Oa.copy(e).sub(t).normalize(),Qi.copy(this.origin).sub(_u);let s=t.distanceTo(e)*.5,o=-this.direction.dot(Oa),a=Qi.dot(this.direction),l=-Qi.dot(Oa),c=Qi.lengthSq(),u=Math.abs(1-o*o),h,f,d,_;if(u>0)if(h=o*l-a,f=o*a-l,_=s*u,h>=0)if(f>=-_)if(f<=_){let g=1/u;h*=g,f*=g,d=h*(h+o*f+2*a)+f*(o*h+f+2*l)+c}else f=s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;else f=-s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;else f<=-_?(h=Math.max(0,-(-o*s+a)),f=h>0?-s:Math.min(Math.max(-s,-l),s),d=-h*h+f*(f+2*l)+c):f<=_?(h=0,f=Math.min(Math.max(-s,-l),s),d=f*(f+2*l)+c):(h=Math.max(0,-(o*s+a)),f=h>0?s:Math.min(Math.max(-s,-l),s),d=-h*h+f*(f+2*l)+c);else f=o>0?-s:s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(_u).addScaledVector(Oa,f),d}intersectSphere(t,e){Di.subVectors(t.center,this.origin);let n=Di.dot(this.direction),i=Di.dot(Di)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,f=this.origin;return c>=0?(n=(t.min.x-f.x)*c,i=(t.max.x-f.x)*c):(n=(t.max.x-f.x)*c,i=(t.min.x-f.x)*c),u>=0?(s=(t.min.y-f.y)*u,o=(t.max.y-f.y)*u):(s=(t.max.y-f.y)*u,o=(t.min.y-f.y)*u),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),h>=0?(a=(t.min.z-f.z)*h,l=(t.max.z-f.z)*h):(a=(t.max.z-f.z)*h,l=(t.min.z-f.z)*h),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,Di)!==null}intersectTriangle(t,e,n,i,s){xu.subVectors(e,t),Ba.subVectors(n,t),vu.crossVectors(xu,Ba);let o=this.direction.dot(vu),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Qi.subVectors(this.origin,t);let l=a*this.direction.dot(Ba.crossVectors(Qi,Ba));if(l<0)return null;let c=a*this.direction.dot(xu.cross(Qi));if(c<0||l+c>o)return null;let u=-a*Qi.dot(vu);return u<0?null:this.at(u/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Pe=class r{constructor(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p)}set(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p){let m=this.elements;return m[0]=t,m[4]=e,m[8]=n,m[12]=i,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=h,m[14]=f,m[3]=d,m[7]=_,m[11]=g,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new r().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/bs.setFromMatrixColumn(t,0).length(),s=1/bs.setFromMatrixColumn(t,1).length(),o=1/bs.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),h=Math.sin(s);if(t.order==="XYZ"){let f=o*u,d=o*h,_=a*u,g=a*h;e[0]=l*u,e[4]=-l*h,e[8]=c,e[1]=d+_*c,e[5]=f-g*c,e[9]=-a*l,e[2]=g-f*c,e[6]=_+d*c,e[10]=o*l}else if(t.order==="YXZ"){let f=l*u,d=l*h,_=c*u,g=c*h;e[0]=f+g*a,e[4]=_*a-d,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=d*a-_,e[6]=g+f*a,e[10]=o*l}else if(t.order==="ZXY"){let f=l*u,d=l*h,_=c*u,g=c*h;e[0]=f-g*a,e[4]=-o*h,e[8]=_+d*a,e[1]=d+_*a,e[5]=o*u,e[9]=g-f*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let f=o*u,d=o*h,_=a*u,g=a*h;e[0]=l*u,e[4]=_*c-d,e[8]=f*c+g,e[1]=l*h,e[5]=g*c+f,e[9]=d*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let f=o*l,d=o*c,_=a*l,g=a*c;e[0]=l*u,e[4]=g-f*h,e[8]=_*h+d,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=d*h+_,e[10]=f-g*h}else if(t.order==="XZY"){let f=o*l,d=o*c,_=a*l,g=a*c;e[0]=l*u,e[4]=-h,e[8]=c*u,e[1]=f*h+g,e[5]=o*u,e[9]=d*h-_,e[2]=_*h-d,e[6]=a*u,e[10]=g*h+f}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ex,t,nx)}lookAt(t,e,n){let i=this.elements;return In.subVectors(t,e),In.lengthSq()===0&&(In.z=1),In.normalize(),ji.crossVectors(n,In),ji.lengthSq()===0&&(Math.abs(n.z)===1?In.x+=1e-4:In.z+=1e-4,In.normalize(),ji.crossVectors(n,In)),ji.normalize(),za.crossVectors(In,ji),i[0]=ji.x,i[4]=za.x,i[8]=In.x,i[1]=ji.y,i[5]=za.y,i[9]=In.y,i[2]=ji.z,i[6]=za.z,i[10]=In.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],u=n[1],h=n[5],f=n[9],d=n[13],_=n[2],g=n[6],p=n[10],m=n[14],S=n[3],v=n[7],M=n[11],D=n[15],T=i[0],E=i[4],R=i[8],y=i[12],x=i[1],L=i[5],F=i[9],P=i[13],B=i[2],X=i[6],G=i[10],J=i[14],U=i[3],I=i[7],A=i[11],it=i[15];return s[0]=o*T+a*x+l*B+c*U,s[4]=o*E+a*L+l*X+c*I,s[8]=o*R+a*F+l*G+c*A,s[12]=o*y+a*P+l*J+c*it,s[1]=u*T+h*x+f*B+d*U,s[5]=u*E+h*L+f*X+d*I,s[9]=u*R+h*F+f*G+d*A,s[13]=u*y+h*P+f*J+d*it,s[2]=_*T+g*x+p*B+m*U,s[6]=_*E+g*L+p*X+m*I,s[10]=_*R+g*F+p*G+m*A,s[14]=_*y+g*P+p*J+m*it,s[3]=S*T+v*x+M*B+D*U,s[7]=S*E+v*L+M*X+D*I,s[11]=S*R+v*F+M*G+D*A,s[15]=S*y+v*P+M*J+D*it,this}multiplyScalar(t){let 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}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],l=t[9],c=t[13],u=t[2],h=t[6],f=t[10],d=t[14],_=t[3],g=t[7],p=t[11],m=t[15];return _*(+s*l*h-i*c*h-s*a*f+n*c*f+i*a*d-n*l*d)+g*(+e*l*d-e*c*f+s*o*f-i*o*d+i*c*u-s*l*u)+p*(+e*c*h-e*a*d-s*o*h+n*o*d+s*a*u-n*c*u)+m*(-i*a*u-e*l*h+e*a*f+i*o*h-n*o*f+n*l*u)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],_=t[12],g=t[13],p=t[14],m=t[15],S=h*p*c-g*f*c+g*l*d-a*p*d-h*l*m+a*f*m,v=_*f*c-u*p*c-_*l*d+o*p*d+u*l*m-o*f*m,M=u*g*c-_*h*c+_*a*d-o*g*d-u*a*m+o*h*m,D=_*h*l-u*g*l-_*a*f+o*g*f+u*a*p-o*h*p,T=e*S+n*v+i*M+s*D;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/T;return t[0]=S*E,t[1]=(g*f*s-h*p*s-g*i*d+n*p*d+h*i*m-n*f*m)*E,t[2]=(a*p*s-g*l*s+g*i*c-n*p*c-a*i*m+n*l*m)*E,t[3]=(h*l*s-a*f*s-h*i*c+n*f*c+a*i*d-n*l*d)*E,t[4]=v*E,t[5]=(u*p*s-_*f*s+_*i*d-e*p*d-u*i*m+e*f*m)*E,t[6]=(_*l*s-o*p*s-_*i*c+e*p*c+o*i*m-e*l*m)*E,t[7]=(o*f*s-u*l*s+u*i*c-e*f*c-o*i*d+e*l*d)*E,t[8]=M*E,t[9]=(_*h*s-u*g*s-_*n*d+e*g*d+u*n*m-e*h*m)*E,t[10]=(o*g*s-_*a*s+_*n*c-e*g*c-o*n*m+e*a*m)*E,t[11]=(u*a*s-o*h*s-u*n*c+e*h*c+o*n*d-e*a*d)*E,t[12]=D*E,t[13]=(u*g*i-_*h*i+_*n*f-e*g*f-u*n*p+e*h*p)*E,t[14]=(_*a*i-o*g*i-_*n*l+e*g*l+o*n*p-e*a*p)*E,t[15]=(o*h*i-u*a*i+u*n*l-e*h*l-o*n*f+e*a*f)*E,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,l=t.z,c=s*o,u=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+n,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,l=e._w,c=s+s,u=o+o,h=a+a,f=s*c,d=s*u,_=s*h,g=o*u,p=o*h,m=a*h,S=l*c,v=l*u,M=l*h,D=n.x,T=n.y,E=n.z;return i[0]=(1-(g+m))*D,i[1]=(d+M)*D,i[2]=(_-v)*D,i[3]=0,i[4]=(d-M)*T,i[5]=(1-(f+m))*T,i[6]=(p+S)*T,i[7]=0,i[8]=(_+v)*E,i[9]=(p-S)*E,i[10]=(1-(f+g))*E,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=bs.set(i[0],i[1],i[2]).length(),o=bs.set(i[4],i[5],i[6]).length(),a=bs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],ti.copy(this);let c=1/s,u=1/o,h=1/a;return ti.elements[0]*=c,ti.elements[1]*=c,ti.elements[2]*=c,ti.elements[4]*=u,ti.elements[5]*=u,ti.elements[6]*=u,ti.elements[8]*=h,ti.elements[9]*=h,ti.elements[10]*=h,e.setFromRotationMatrix(ti),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=Ni){let l=this.elements,c=2*s/(e-t),u=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),d,_;if(a===Ni)d=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===cl)d=-o/(o-s),_=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=Ni){let l=this.elements,c=1/(e-t),u=1/(n-i),h=1/(o-s),f=(e+t)*c,d=(n+i)*u,_,g;if(a===Ni)_=(o+s)*h,g=-2*h;else if(a===cl)_=s*h,g=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=g,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},bs=new Z,ti=new Pe,ex=new Z(0,0,0),nx=new Z(1,1,1),ji=new Z,za=new Z,In=new Z,Tp=new Pe,Ap=new hr,Oi=class r{constructor(t=0,e=0,n=0,i=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],h=i[2],f=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(En(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-En(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(En(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-En(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(En(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-En(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Tp.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Tp,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Ap.setFromEuler(this),this.setFromQuaternion(Ap,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(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(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Oi.DEFAULT_ORDER="XYZ";var pl=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},ix=0,Dp=new Z,ws=new hr,Ci=new Pe,ka=new Z,Io=new Z,rx=new Z,sx=new hr,Cp=new Z(1,0,0),Rp=new Z(0,1,0),Pp=new Z(0,0,1),Ip={type:"added"},ox={type:"removed"},Es={type:"childadded",child:null},yu={type:"childremoved",child:null},on=class r extends ur{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:ix++}),this.uuid=Vo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new Z,e=new Oi,n=new hr,i=new Z(1,1,1);function s(){n.setFromEuler(e,!1)}function o(){e.setFromQuaternion(n,void 0,!1)}e._onChange(s),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Pe},normalMatrix:{value:new Zt}}),this.matrix=new Pe,this.matrixWorld=new Pe,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new pl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return ws.setFromAxisAngle(t,e),this.quaternion.multiply(ws),this}rotateOnWorldAxis(t,e){return ws.setFromAxisAngle(t,e),this.quaternion.premultiply(ws),this}rotateX(t){return this.rotateOnAxis(Cp,t)}rotateY(t){return this.rotateOnAxis(Rp,t)}rotateZ(t){return this.rotateOnAxis(Pp,t)}translateOnAxis(t,e){return Dp.copy(t).applyQuaternion(this.quaternion),this.position.add(Dp.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Cp,t)}translateY(t){return this.translateOnAxis(Rp,t)}translateZ(t){return this.translateOnAxis(Pp,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ci.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?ka.copy(t):ka.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Io.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ci.lookAt(Io,ka,this.up):Ci.lookAt(ka,Io,this.up),this.quaternion.setFromRotationMatrix(Ci),i&&(Ci.extractRotation(i.matrixWorld),ws.setFromRotationMatrix(Ci),this.quaternion.premultiply(ws.invert()))}add(t){if(arguments.length>1){for(let 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.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Ip),Es.child=t,this.dispatchEvent(Es),Es.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(ox),yu.child=t,this.dispatchEvent(yu),yu.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Ci.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Ci.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ci),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Ip),Es.child=t,this.dispatchEvent(Es),Es.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){let o=this.children[n].getObjectByProperty(t,e);if(o!==void 0)return o}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);let i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Io,t,rx),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Io,sx,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){let e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(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);let e=this.children;for(let n=0,i=e.length;n<i;n++){let s=e[n];(s.matrixWorldAutoUpdate===!0||t===!0)&&s.updateMatrixWorld(t)}}updateWorldMatrix(t,e){let n=this.parent;if(t===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.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){let i=this.children;for(let s=0,o=i.length;s<o;s++){let a=i[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(t){let e=t===void 0||typeof t=="string",n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){let h=l[c];s(t.shapes,h)}else s(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(t.materials,this.material[l]));i.material=a}else i.material=s(t.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){let l=this.animations[a];i.animations.push(s(t.animations,l))}}if(e){let a=o(t.geometries),l=o(t.materials),c=o(t.textures),u=o(t.images),h=o(t.shapes),f=o(t.skeletons),d=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),f.length>0&&(n.skeletons=f),d.length>0&&(n.animations=d),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let u=a[c];delete u.metadata,l.push(u)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,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.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,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.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};on.DEFAULT_UP=new Z(0,1,0);on.DEFAULT_MATRIX_AUTO_UPDATE=!0;on.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var ei=new Z,Ri=new Z,Mu=new Z,Pi=new Z,Ts=new Z,As=new Z,Lp=new Z,Su=new Z,bu=new Z,wu=new Z,Ns=class r{constructor(t=new Z,e=new Z,n=new Z){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),ei.subVectors(t,e),i.cross(ei);let s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){ei.subVectors(i,e),Ri.subVectors(n,e),Mu.subVectors(t,e);let o=ei.dot(ei),a=ei.dot(Ri),l=ei.dot(Mu),c=Ri.dot(Ri),u=Ri.dot(Mu),h=o*c-a*a;if(h===0)return s.set(0,0,0),null;let f=1/h,d=(c*l-a*u)*f,_=(o*u-a*l)*f;return s.set(1-d-_,_,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Pi)===null?!1:Pi.x>=0&&Pi.y>=0&&Pi.x+Pi.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,Pi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Pi.x),l.addScaledVector(o,Pi.y),l.addScaledVector(a,Pi.z),l)}static isFrontFacing(t,e,n,i){return ei.subVectors(n,e),Ri.subVectors(t,e),ei.cross(Ri).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ei.subVectors(this.c,this.b),Ri.subVectors(this.a,this.b),ei.cross(Ri).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return r.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return r.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,s){return r.getInterpolation(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return r.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return r.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;Ts.subVectors(i,n),As.subVectors(s,n),Su.subVectors(t,n);let l=Ts.dot(Su),c=As.dot(Su);if(l<=0&&c<=0)return e.copy(n);bu.subVectors(t,i);let u=Ts.dot(bu),h=As.dot(bu);if(u>=0&&h<=u)return e.copy(i);let f=l*h-u*c;if(f<=0&&l>=0&&u<=0)return o=l/(l-u),e.copy(n).addScaledVector(Ts,o);wu.subVectors(t,s);let d=Ts.dot(wu),_=As.dot(wu);if(_>=0&&d<=_)return e.copy(s);let g=d*c-l*_;if(g<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(As,a);let p=u*_-d*h;if(p<=0&&h-u>=0&&d-_>=0)return Lp.subVectors(s,i),a=(h-u)/(h-u+(d-_)),e.copy(i).addScaledVector(Lp,a);let m=1/(p+g+f);return o=g*m,a=f*m,e.copy(n).addScaledVector(Ts,o).addScaledVector(As,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},wm={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},tr={h:0,s:0,l:0},Va={h:0,s:0,l:0};function Eu(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}var re=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Gn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,fe.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=fe.workingColorSpace){return this.r=t,this.g=e,this.b=n,fe.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=fe.workingColorSpace){if(t=Z0(t,1),e=En(e,0,1),n=En(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Eu(o,s,t+1/3),this.g=Eu(o,s,t),this.b=Eu(o,s,t-1/3)}return fe.toWorkingColorSpace(this,i),this}setStyle(t,e=Gn){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(o===6)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Gn){let n=wm[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Bs(t.r),this.g=Bs(t.g),this.b=Bs(t.b),this}copyLinearToSRGB(t){return this.r=fu(t.r),this.g=fu(t.g),this.b=fu(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Gn){return fe.fromWorkingColorSpace(sn.copy(this),t),Math.round(En(sn.r*255,0,255))*65536+Math.round(En(sn.g*255,0,255))*256+Math.round(En(sn.b*255,0,255))}getHexString(t=Gn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=fe.workingColorSpace){fe.fromWorkingColorSpace(sn.copy(this),e);let n=sn.r,i=sn.g,s=sn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,u=(a+o)/2;if(a===o)l=0,c=0;else{let h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case n:l=(i-s)/h+(i<s?6:0);break;case i:l=(s-n)/h+2;break;case s:l=(n-i)/h+4;break}l/=6}return t.h=l,t.s=c,t.l=u,t}getRGB(t,e=fe.workingColorSpace){return fe.fromWorkingColorSpace(sn.copy(this),e),t.r=sn.r,t.g=sn.g,t.b=sn.b,t}getStyle(t=Gn){fe.fromWorkingColorSpace(sn.copy(this),t);let e=sn.r,n=sn.g,i=sn.b;return t!==Gn?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(t,e,n){return this.getHSL(tr),this.setHSL(tr.h+t,tr.s+e,tr.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(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(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(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}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(tr),t.getHSL(Va);let n=uu(tr.h,Va.h,e),i=uu(tr.s,Va.s,e),s=uu(tr.l,Va.l,e);return this.setHSL(n,i,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,i=this.b,s=t.elements;return this.r=s[0]*e+s[3]*n+s[6]*i,this.g=s[1]*e+s[4]*n+s[7]*i,this.b=s[2]*e+s[5]*n+s[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},sn=new re;re.NAMES=wm;var ax=0,Zr=class extends ur{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ax++}),this.uuid=Vo(),this.name="",this.type="Material",this.blending=or,this.side=lr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Uu,this.blendDst=Ou,this.blendEquation=Gr,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new re(0,0,0),this.blendAlpha=0,this.depthFunc=il,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=vp,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xs,this.stencilZFail=xs,this.stencilZPass=xs,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}let i=this[e];if(i===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};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.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.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.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.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,n.lightMapIntensity=this.lightMapIntensity),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.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==or&&(n.blending=this.blending),this.side!==lr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Uu&&(n.blendSrc=this.blendSrc),this.blendDst!==Ou&&(n.blendDst=this.blendDst),this.blendEquation!==Gr&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==il&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==vp&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xs&&(n.stencilFail=this.stencilFail),this.stencilZFail!==xs&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==xs&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let l=s[a];delete l.metadata,o.push(l)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,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.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,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.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},ml=class extends Zr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new re(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Oi,this.combine=dm,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(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.envMapRotation.copy(t.envMapRotation),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.fog=t.fog,this}};var Ne=new Z,Ha=new oe,Xn=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=yp,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ir,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return $0("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(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.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)Ha.fromBufferAttribute(this,e),Ha.applyMatrix3(t),this.setXY(e,Ha.x,Ha.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyMatrix3(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyMatrix4(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyNormalMatrix(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.transformDirection(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Co(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=wn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Co(e,this.array)),e}setX(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Co(e,this.array)),e}setY(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Co(e,this.array)),e}setZ(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Co(e,this.array)),e}setW(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array),i=wn(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,s){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array),i=wn(i,this.array),s=wn(s,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=s,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==yp&&(t.usage=this.usage),t}};var gl=class extends Xn{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var _l=class extends Xn{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var qn=class extends Xn{constructor(t,e,n){super(new Float32Array(t),e,n)}},lx=0,Hn=new Pe,Tu=new on,Ds=new Z,Ln=new Yr,Lo=new Yr,We=new Z,mi=class r extends ur{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:lx++}),this.uuid=Vo(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(bm(t)?_l:gl)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let s=new Zt().getNormalMatrix(t);n.applyNormalMatrix(s),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Hn.makeRotationFromQuaternion(t),this.applyMatrix4(Hn),this}rotateX(t){return Hn.makeRotationX(t),this.applyMatrix4(Hn),this}rotateY(t){return Hn.makeRotationY(t),this.applyMatrix4(Hn),this}rotateZ(t){return Hn.makeRotationZ(t),this.applyMatrix4(Hn),this}translate(t,e,n){return Hn.makeTranslation(t,e,n),this.applyMatrix4(Hn),this}scale(t,e,n){return Hn.makeScale(t,e,n),this.applyMatrix4(Hn),this}lookAt(t){return Tu.lookAt(t),Tu.updateMatrix(),this.applyMatrix4(Tu.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ds).negate(),this.translate(Ds.x,Ds.y,Ds.z),this}setFromPoints(t){let e=[];for(let n=0,i=t.length;n<i;n++){let s=t[n];e.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new qn(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Yr);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Z(-1/0,-1/0,-1/0),new Z(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,i=e.length;n<i;n++){let s=e[n];Ln.setFromBufferAttribute(s),this.morphTargetsRelative?(We.addVectors(this.boundingBox.min,Ln.min),this.boundingBox.expandByPoint(We),We.addVectors(this.boundingBox.max,Ln.max),this.boundingBox.expandByPoint(We)):(this.boundingBox.expandByPoint(Ln.min),this.boundingBox.expandByPoint(Ln.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Gs);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Z,1/0);return}if(t){let n=this.boundingSphere.center;if(Ln.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];Lo.setFromBufferAttribute(a),this.morphTargetsRelative?(We.addVectors(Ln.min,Lo.min),Ln.expandByPoint(We),We.addVectors(Ln.max,Lo.max),Ln.expandByPoint(We)):(Ln.expandByPoint(Lo.min),Ln.expandByPoint(Lo.max))}Ln.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)We.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(We));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)We.fromBufferAttribute(a,c),l&&(Ds.fromBufferAttribute(t,c),We.add(Ds)),i=Math.max(i,n.distanceToSquared(We))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,i=e.normal,s=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Xn(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let R=0;R<n.count;R++)a[R]=new Z,l[R]=new Z;let c=new Z,u=new Z,h=new Z,f=new oe,d=new oe,_=new oe,g=new Z,p=new Z;function m(R,y,x){c.fromBufferAttribute(n,R),u.fromBufferAttribute(n,y),h.fromBufferAttribute(n,x),f.fromBufferAttribute(s,R),d.fromBufferAttribute(s,y),_.fromBufferAttribute(s,x),u.sub(c),h.sub(c),d.sub(f),_.sub(f);let L=1/(d.x*_.y-_.x*d.y);isFinite(L)&&(g.copy(u).multiplyScalar(_.y).addScaledVector(h,-d.y).multiplyScalar(L),p.copy(h).multiplyScalar(d.x).addScaledVector(u,-_.x).multiplyScalar(L),a[R].add(g),a[y].add(g),a[x].add(g),l[R].add(p),l[y].add(p),l[x].add(p))}let S=this.groups;S.length===0&&(S=[{start:0,count:t.count}]);for(let R=0,y=S.length;R<y;++R){let x=S[R],L=x.start,F=x.count;for(let P=L,B=L+F;P<B;P+=3)m(t.getX(P+0),t.getX(P+1),t.getX(P+2))}let v=new Z,M=new Z,D=new Z,T=new Z;function E(R){D.fromBufferAttribute(i,R),T.copy(D);let y=a[R];v.copy(y),v.sub(D.multiplyScalar(D.dot(y))).normalize(),M.crossVectors(T,y);let L=M.dot(l[R])<0?-1:1;o.setXYZW(R,v.x,v.y,v.z,L)}for(let R=0,y=S.length;R<y;++R){let x=S[R],L=x.start,F=x.count;for(let P=L,B=L+F;P<B;P+=3)E(t.getX(P+0)),E(t.getX(P+1)),E(t.getX(P+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Xn(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let f=0,d=n.count;f<d;f++)n.setXYZ(f,0,0,0);let i=new Z,s=new Z,o=new Z,a=new Z,l=new Z,c=new Z,u=new Z,h=new Z;if(t)for(let f=0,d=t.count;f<d;f+=3){let _=t.getX(f+0),g=t.getX(f+1),p=t.getX(f+2);i.fromBufferAttribute(e,_),s.fromBufferAttribute(e,g),o.fromBufferAttribute(e,p),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,p),a.add(u),l.add(u),c.add(u),n.setXYZ(_,a.x,a.y,a.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let f=0,d=e.count;f<d;f+=3)i.fromBufferAttribute(e,f+0),s.fromBufferAttribute(e,f+1),o.fromBufferAttribute(e,f+2),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),n.setXYZ(f+0,u.x,u.y,u.z),n.setXYZ(f+1,u.x,u.y,u.z),n.setXYZ(f+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)We.fromBufferAttribute(t,e),We.normalize(),t.setXYZ(e,We.x,We.y,We.z)}toNonIndexed(){function t(a,l){let c=a.array,u=a.itemSize,h=a.normalized,f=new c.constructor(l.length*u),d=0,_=0;for(let g=0,p=l.length;g<p;g++){a.isInterleavedBufferAttribute?d=l[g]*a.data.stride+a.offset:d=l[g]*u;for(let m=0;m<u;m++)f[_++]=c[d++]}return new Xn(f,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new r,n=this.index.array,i=this.attributes;for(let a in i){let l=i[a],c=t(l,n);e.setAttribute(a,c)}let s=this.morphAttributes;for(let a in s){let l=[],c=s[a];for(let u=0,h=c.length;u<h;u++){let f=c[u],d=t(f,n);l.push(d)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let a=0,l=o.length;a<l;a++){let c=o[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},s=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,f=c.length;h<f;h++){let d=c[h];u.push(d.toJSON(t.data))}u.length>0&&(i[l]=u,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let c in i){let u=i[c];this.setAttribute(c,u.clone(e))}let s=t.morphAttributes;for(let c in s){let u=[],h=s[c];for(let f=0,d=h.length;f<d;f++)u.push(h[f].clone(e));this.morphAttributes[c]=u}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,u=o.length;c<u;c++){let h=o[c];this.addGroup(h.start,h.count,h.materialIndex)}let a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},Fp=new Pe,Br=new dl,Ga=new Gs,Np=new Z,Cs=new Z,Rs=new Z,Ps=new Z,Au=new Z,Wa=new Z,Xa=new oe,qa=new oe,Ya=new oe,Up=new Z,Op=new Z,Bp=new Z,Za=new Z,Ja=new Z,ii=class extends on{constructor(t=new mi,e=new ml){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(t,e){let n=this.geometry,i=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;e.fromBufferAttribute(i,t);let a=this.morphTargetInfluences;if(s&&a){Wa.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let u=a[l],h=s[l];u!==0&&(Au.fromBufferAttribute(h,t),o?Wa.addScaledVector(Au,u):Wa.addScaledVector(Au.sub(e),u))}e.add(Wa)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ga.copy(n.boundingSphere),Ga.applyMatrix4(s),Br.copy(t.ray).recast(t.near),!(Ga.containsPoint(Br.origin)===!1&&(Br.intersectSphere(Ga,Np)===null||Br.origin.distanceToSquared(Np)>(t.far-t.near)**2))&&(Fp.copy(s).invert(),Br.copy(t.ray).applyMatrix4(Fp),!(n.boundingBox!==null&&Br.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Br)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,f=s.groups,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],S=Math.max(p.start,d.start),v=Math.min(a.count,Math.min(p.start+p.count,d.start+d.count));for(let M=S,D=v;M<D;M+=3){let T=a.getX(M),E=a.getX(M+1),R=a.getX(M+2);i=$a(this,m,t,n,c,u,h,T,E,R),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,d.start),g=Math.min(a.count,d.start+d.count);for(let p=_,m=g;p<m;p+=3){let S=a.getX(p),v=a.getX(p+1),M=a.getX(p+2);i=$a(this,o,t,n,c,u,h,S,v,M),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],S=Math.max(p.start,d.start),v=Math.min(l.count,Math.min(p.start+p.count,d.start+d.count));for(let M=S,D=v;M<D;M+=3){let T=M,E=M+1,R=M+2;i=$a(this,m,t,n,c,u,h,T,E,R),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,d.start),g=Math.min(l.count,d.start+d.count);for(let p=_,m=g;p<m;p+=3){let S=p,v=p+1,M=p+2;i=$a(this,o,t,n,c,u,h,S,v,M),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}}};function cx(r,t,e,n,i,s,o,a){let l;if(t.side===Tn?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===lr,a),l===null)return null;Ja.copy(a),Ja.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Ja);return c<e.near||c>e.far?null:{distance:c,point:Ja.clone(),object:r}}function $a(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,Cs),r.getVertexPosition(l,Rs),r.getVertexPosition(c,Ps);let u=cx(r,t,e,n,Cs,Rs,Ps,Za);if(u){i&&(Xa.fromBufferAttribute(i,a),qa.fromBufferAttribute(i,l),Ya.fromBufferAttribute(i,c),u.uv=Ns.getInterpolation(Za,Cs,Rs,Ps,Xa,qa,Ya,new oe)),s&&(Xa.fromBufferAttribute(s,a),qa.fromBufferAttribute(s,l),Ya.fromBufferAttribute(s,c),u.uv1=Ns.getInterpolation(Za,Cs,Rs,Ps,Xa,qa,Ya,new oe)),o&&(Up.fromBufferAttribute(o,a),Op.fromBufferAttribute(o,l),Bp.fromBufferAttribute(o,c),u.normal=Ns.getInterpolation(Za,Cs,Rs,Ps,Up,Op,Bp,new Z),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));let h={a,b:l,c,normal:new Z,materialIndex:0};Ns.getNormal(Cs,Rs,Ps,h.normal),u.face=h}return u}var Oo=class r extends mi{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let l=[],c=[],u=[],h=[],f=0,d=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new qn(c,3)),this.setAttribute("normal",new qn(u,3)),this.setAttribute("uv",new qn(h,2));function _(g,p,m,S,v,M,D,T,E,R,y){let x=M/E,L=D/R,F=M/2,P=D/2,B=T/2,X=E+1,G=R+1,J=0,U=0,I=new Z;for(let A=0;A<G;A++){let it=A*L-P;for(let vt=0;vt<X;vt++){let Wt=vt*x-F;I[g]=Wt*S,I[p]=it*v,I[m]=B,c.push(I.x,I.y,I.z),I[g]=0,I[p]=0,I[m]=T>0?1:-1,u.push(I.x,I.y,I.z),h.push(vt/E),h.push(1-A/R),J+=1}}for(let A=0;A<R;A++)for(let it=0;it<E;it++){let vt=f+it+X*A,Wt=f+it+X*(A+1),q=f+(it+1)+X*(A+1),Q=f+(it+1)+X*A;l.push(vt,Wt,Q),l.push(Wt,q,Q),U+=6}a.addGroup(d,U,y),d+=U,f+=J}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Ws(r){let t={};for(let e in r){t[e]={};for(let n in r[e]){let i=r[e][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=i.clone():Array.isArray(i)?t[e][n]=i.slice():t[e][n]=i}}return t}function _n(r){let t={};for(let e=0;e<r.length;e++){let n=Ws(r[e]);for(let i in n)t[i]=n[i]}return t}function ux(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function Em(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:fe.workingColorSpace}var hx={clone:Ws,merge:_n},fx=`void main() {
|
|
1
|
+
(()=>{function _i(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Oh(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var Sn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},jr={duration:.5,overwrite:!1,delay:0},nc,Ke,Me,Un=1e8,ge=1/Un,Xl=Math.PI*2,Wm=Xl/4,Xm=0,Bh=Math.sqrt,qm=Math.cos,Ym=Math.sin,Ue=function(t){return typeof t=="string"},Ae=function(t){return typeof t=="function"},vi=function(t){return typeof t=="number"},Qo=function(t){return typeof t>"u"},li=function(t){return typeof t=="object"},Mn=function(t){return t!==!1},ic=function(){return typeof window<"u"},Go=function(t){return Ae(t)||Ue(t)},zh=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Qe=Array.isArray,ql=/(?:-?\.?\d|\.)+/gi,rc=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,xr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Bl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,sc=/[+-]=-?[.\d]+/,kh=/[^,'"\[\]\s]+/gi,Zm=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,we,oi,Yl,oc,Dn={},Yo={},Vh,Hh=function(t){return(Yo=_r(t,Dn))&&je},jo=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},eo=function(t,e){return!e&&console.warn(t)},Gh=function(t,e){return t&&(Dn[t]=e)&&Yo&&(Yo[t]=e)||Dn},no=function(){return 0},Jm={suppressEvents:!0,isStart:!0,kill:!1},Wo={suppressEvents:!0,kill:!1},$m={suppressEvents:!0},ac={},ki=[],Zl={},Wh,vn={},zl={},Rh=30,Xo=[],lc="",cc=function(t){var e=t[0],n,i;if(li(e)||Ae(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=Xo.length;i--&&!Xo[i].targetTest(e););n=Xo[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new fc(t[i],n)))||t.splice(i,1);return t},Vi=function(t){return t._gsap||cc(On(t))[0]._gsap},uc=function(t,e,n){return(n=t[e])&&Ae(n)?t[e]():Qo(n)&&t.getAttribute&&t.getAttribute(e)||n},ln=function(t,e){return(t=t.split(",")).forEach(e)||t},De=function(t){return Math.round(t*1e5)/1e5||0},Ve=function(t){return Math.round(t*1e7)/1e7||0},vr=function(t,e){var n=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),n==="+"?t+i:n==="-"?t-i:n==="*"?t*i:t/i},Km=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},Zo=function(){var t=ki.length,e=ki.slice(0),n,i;for(Zl={},ki.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},Xh=function(t,e,n,i){ki.length&&!Ke&&Zo(),t.render(e,n,i||Ke&&e<0&&(t._initted||t._startAt)),ki.length&&!Ke&&Zo()},qh=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(kh).length<2?e:Ue(t)?t.trim():t},Yh=function(t){return t},Bn=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Qm=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},_r=function(t,e){for(var n in e)t[n]=e[n];return t},Ph=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=li(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},Jo=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Qs=function(t){var e=t.parent||we,n=t.keyframes?Qm(Qe(t.keyframes)):Bn;if(Mn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},jm=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},Zh=function(t,e,n,i,s){n===void 0&&(n="_first"),i===void 0&&(i="_last");var o=t[i],a;if(s)for(a=e[s];o&&o[s]>a;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[i]=e,e._prev=o,e.parent=e._dp=t,e},ta=function(t,e,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var s=e._prev,o=e._next;s?s._next=o:t[n]===e&&(t[n]=o),o?o._prev=s:t[i]===e&&(t[i]=s),e._next=e._prev=e.parent=null},Hi=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},pr=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},tg=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Jl=function(t,e,n,i){return t._startAt&&(Ke?t._startAt.revert(Wo):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},eg=function r(t){return!t||t._ts&&r(t.parent)},Ih=function(t){return t._repeat?ts(t._tTime,t=t.duration()+t._rDelay)*t:0},ts=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},$o=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},ea=function(t){return t._end=Ve(t._start+(t._tDur/Math.abs(t._ts||t._rts||ge)||0))},na=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Ve(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),ea(t),n._dirty||pr(n,t)),t},Jh=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=$o(t.rawTime(),e),(!e._dur||so(0,e.totalDuration(),n)-e._tTime>ge)&&e.render(n,!0)),pr(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-ge}},ai=function(t,e,n,i){return e.parent&&Hi(e),e._start=Ve((vi(n)?n:n||t!==we?Nn(t,n,e):t._time)+e._delay),e._end=Ve(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Zh(t,e,"_first","_last",t._sort?"_start":0),$l(e)||(t._recent=e),i||Jh(t,e),t._ts<0&&na(t,t._tTime),t},$h=function(t,e){return(Dn.ScrollTrigger||jo("scrollTrigger",e))&&Dn.ScrollTrigger.create(e,t)},Kh=function(t,e,n,i,s){if(mc(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!Ke&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Wh!==yn.frame)return ki.push(t),t._lazy=[s,i],1},ng=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},$l=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},ig=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&ng(t)&&!(!t._initted&&$l(t))||(t._ts<0||t._dp._ts<0)&&!$l(t))?0:1,a=t._rDelay,l=0,c,u,h;if(a&&t._repeat&&(l=so(0,t._tDur,e),u=ts(l,a),t._yoyo&&u&1&&(o=1-o),u!==ts(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||Ke||i||t._zTime===ge||!e&&t._zTime){if(!t._initted&&Kh(t,e,i,n,l))return;for(h=t._zTime,t._zTime=e||(n?ge:0),n||(n=e&&!h),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,c=t._pt;c;)c.r(o,c.d),c=c._next;e<0&&Jl(t,e,n,!0),t._onUpdate&&!n&&An(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&An(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&Hi(t,1),!n&&!Ke&&(An(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},rg=function(t,e,n){var i;if(n>e)for(i=t._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<e)return i;i=i._prev}},es=function(t,e,n,i){var s=t._repeat,o=Ve(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Ve(o*(s+1)+t._rDelay*s):o,a>0&&!i&&na(t,t._tTime=t._tDur*a),t.parent&&ea(t),n||pr(t.parent,t),t},Lh=function(t){return t instanceof qe?pr(t):es(t,t._dur)},sg={_start:0,endTime:no,totalDuration:no},Nn=function r(t,e,n){var i=t.labels,s=t._recent||sg,o=t.duration()>=Un?s.endTime(!1):t._dur,a,l,c;return Ue(e)&&(isNaN(e)||e in i)?(l=e.charAt(0),c=e.substr(-1)==="%",a=e.indexOf("="),l==="<"||l===">"?(a>=0&&(e=e.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(e.substr(1))||0)*(c?(a<0?s:n).totalDuration()/100:1)):a<0?(e in i||(i[e]=o),i[e]):(l=parseFloat(e.charAt(a-1)+e.substr(a+1)),c&&n&&(l=l/100*(Qe(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},js=function(t,e,n){var i=vi(e[1]),s=(i?2:1)+(t<2?0:1),o=e[s],a,l;if(i&&(o.duration=e[1]),o.parent=n,t){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Mn(l.vars.inherit)&&l.parent;o.immediateRender=Mn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Re(e[0],o,e[s+1])},Gi=function(t,e){return t||t===0?e(t):e},so=function(t,e,n){return n<t?t:n>e?e:n},Ye=function(t,e){return!Ue(t)||!(e=Zm.exec(t))?"":e[1]},og=function(t,e,n){return Gi(n,function(i){return so(t,e,i)})},Kl=[].slice,Qh=function(t,e){return t&&li(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&li(t[0]))&&!t.nodeType&&t!==oi},ag=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return Ue(i)&&!e||Qh(i,1)?(s=n).push.apply(s,On(i)):n.push(i)})||n},On=function(t,e,n){return Me&&!e&&Me.selector?Me.selector(t):Ue(t)&&!n&&(Yl||!ns())?Kl.call((e||oc).querySelectorAll(t),0):Qe(t)?ag(t,n):Qh(t)?Kl.call(t,0):t?[t]:[]},Ql=function(t){return t=On(t)[0]||eo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return On(e,n.querySelectorAll?n:n===t?eo("Invalid scope")||oc.createElement("div"):t)}},jh=function(t){return t.sort(function(){return .5-Math.random()})},tf=function(t){if(Ae(t))return t;var e=li(t)?t:{each:t},n=mr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,u=i,h=i;return Ue(i)?u=h={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(u=i[0],h=i[1]),function(f,d,_){var g=(_||e).length,p=o[g],m,S,v,M,D,T,E,R,y;if(!p){if(y=e.grid==="auto"?0:(e.grid||[1,Un])[1],!y){for(E=-Un;E<(E=_[y++].getBoundingClientRect().left)&&y<g;);y<g&&y--}for(p=o[g]=[],m=l?Math.min(y,g)*u-.5:i%y,S=y===Un?0:l?g*h/y-.5:i/y|0,E=0,R=Un,T=0;T<g;T++)v=T%y-m,M=S-(T/y|0),p[T]=D=c?Math.abs(c==="y"?M:v):Bh(v*v+M*M),D>E&&(E=D),D<R&&(R=D);i==="random"&&jh(p),p.max=E-R,p.min=R,p.v=g=(parseFloat(e.amount)||parseFloat(e.each)*(y>g?g-1:c?c==="y"?g/y:y:Math.max(y,g/y))||0)*(i==="edges"?-1:1),p.b=g<0?s-g:s,p.u=Ye(e.amount||e.each)||0,n=n&&g<0?uf(n):n}return g=(p[f]-p.min)/p.max||0,Ve(p.b+(n?n(g):g)*p.v)+p.u}},jl=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Ve(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(vi(n)?0:Ye(n))}},ef=function(t,e){var n=Qe(t),i,s;return!n&&li(t)&&(i=n=t.radius||Un,t.values?(t=On(t.values),(s=!vi(t[0]))&&(i*=i)):t=jl(t.increment)),Gi(e,n?Ae(t)?function(o){return s=t(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=Un,u=0,h=t.length,f,d;h--;)s?(f=t[h].x-a,d=t[h].y-l,f=f*f+d*d):f=Math.abs(t[h]-a),f<c&&(c=f,u=h);return u=!i||c<=i?t[u]:o,s||u===o||vi(o)?u:u+Ye(o)}:jl(t))},nf=function(t,e,n,i){return Gi(Qe(t)?!e:n===!0?!!(n=0):!i,function(){return Qe(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+n*.99))/n)*n*i)/i})},lg=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){return e.reduce(function(s,o){return o(s)},i)}},cg=function(t,e){return function(n){return t(parseFloat(n))+(e||Ye(n))}},ug=function(t,e,n){return sf(t,e,0,1,n)},rf=function(t,e,n){return Gi(n,function(i){return t[~~e(i)]})},hg=function r(t,e,n){var i=e-t;return Qe(t)?rf(t,r(0,t.length),e):Gi(n,function(s){return(i+(s-t)%i)%i+t})},fg=function r(t,e,n){var i=e-t,s=i*2;return Qe(t)?rf(t,r(0,t.length-1),e):Gi(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},is=function(t){for(var e=0,n="",i,s,o,a;~(i=t.indexOf("random(",e));)o=t.indexOf(")",i),a=t.charAt(i+7)==="[",s=t.substr(i+7,o-i-7).match(a?kh:ql),n+=t.substr(e,i-e)+nf(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},sf=function(t,e,n,i,s){var o=e-t,a=i-n;return Gi(s,function(l){return n+((l-t)/o*a||0)})},dg=function r(t,e,n,i){var s=isNaN(t+e)?0:function(d){return(1-d)*t+d*e};if(!s){var o=Ue(t),a={},l,c,u,h,f;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(Qe(t)&&!Qe(e)){for(u=[],h=t.length,f=h-2,c=1;c<h;c++)u.push(r(t[c-1],t[c]));h--,s=function(_){_*=h;var g=Math.min(f,~~_);return u[g](_-g)},n=e}else i||(t=_r(Qe(t)?[]:{},t));if(!u){for(l in e)dc.call(a,t,l,"get",e[l]);s=function(_){return xc(_,a)||(o?t.p:t)}}}return Gi(n,s)},Fh=function(t,e,n){var i=t.labels,s=Un,o,a,l;for(o in i)a=i[o]-e,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},An=function(t,e,n){var i=t.vars,s=i[e],o=Me,a=t._ctx,l,c,u;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&ki.length&&Zo(),a&&(Me=a),u=l?s.apply(c,l):s.call(c),Me=o,u},$s=function(t){return Hi(t),t.scrollTrigger&&t.scrollTrigger.kill(!!Ke),t.progress()<1&&An(t,"onInterrupt"),t},Qr,of=[],af=function(t){if(t)if(t=!t.name&&t.default||t,ic()||t.headless){var e=t.name,n=Ae(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:no,render:xc,add:dc,kill:Cg,modifier:Dg,rawVars:0},o={targetTest:0,get:0,getSetter:ia,aliases:{},register:0};if(ns(),t!==i){if(vn[e])return;Bn(i,Bn(Jo(t,s),o)),_r(i.prototype,_r(s,Jo(t,o))),vn[i.prop=e]=i,t.targetTest&&(Xo.push(i),ac[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Gh(e,i),t.register&&t.register(je,i,cn)}else of.push(t)},de=255,Ks={aqua:[0,de,de],lime:[0,de,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,de],navy:[0,0,128],white:[de,de,de],olive:[128,128,0],yellow:[de,de,0],orange:[de,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[de,0,0],pink:[de,192,203],cyan:[0,de,de],transparent:[de,de,de,0]},kl=function(t,e,n){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(n-e)*t*6:t<.5?n:t*3<2?e+(n-e)*(2/3-t)*6:e)*de+.5|0},lf=function(t,e,n){var i=t?vi(t)?[t>>16,t>>8&de,t&de]:0:Ks.black,s,o,a,l,c,u,h,f,d,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Ks[t])i=Ks[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return i=parseInt(t.substr(1,6),16),[i>>16,i>>8&de,i&de,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&de,t&de]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(ql),!e)l=+i[0]%360/360,c=+i[1]/100,u=+i[2]/100,o=u<=.5?u*(c+1):u+c-u*c,s=u*2-o,i.length>3&&(i[3]*=1),i[0]=kl(l+1/3,s,o),i[1]=kl(l,s,o),i[2]=kl(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(rc),n&&i.length<4&&(i[3]=1),i}else i=t.match(ql)||Ks.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/de,o=i[1]/de,a=i[2]/de,h=Math.max(s,o,a),f=Math.min(s,o,a),u=(h+f)/2,h===f?l=c=0:(d=h-f,c=u>.5?d/(2-h-f):d/(h+f),l=h===s?(o-a)/d+(o<a?6:0):h===o?(a-s)/d+2:(s-o)/d+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(u*100+.5)),n&&i.length<4&&(i[3]=1),i},cf=function(t){var e=[],n=[],i=-1;return t.split(xi).forEach(function(s){var o=s.match(xr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},Nh=function(t,e,n){var i="",s=(t+i).match(xi),o=e?"hsla(":"rgba(",a=0,l,c,u,h;if(!s)return t;if(s=s.map(function(f){return(f=lf(f,e,1))&&o+(e?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(u=cf(t),l=n.c,l.join(i)!==u.c.join(i)))for(c=t.replace(xi,"1").split(xr),h=c.length-1;a<h;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:n).shift());if(!c)for(c=t.split(xi),h=c.length-1;a<h;a++)i+=c[a]+s[a];return i+c[h]},xi=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Ks)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),pg=/hsl[a]?\(/,hc=function(t){var e=t.join(" "),n;if(xi.lastIndex=0,xi.test(e))return n=pg.test(e),t[1]=Nh(t[1],n),t[0]=Nh(t[0],n,cf(t[1])),!0},io,yn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,u,h,f,d,_=function g(p){var m=r()-i,S=p===!0,v,M,D,T;if((m>t||m<0)&&(n+=m-e),i+=m,D=i-n,v=D-o,(v>0||S)&&(T=++h.frame,f=D-h.time*1e3,h.time=D=D/1e3,o+=v+(v>=s?4:s-v),M=1),S||(l=c(g)),M)for(d=0;d<a.length;d++)a[d](D,f,T,p)};return h={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(p){return f/(1e3/(p||60))},wake:function(){Vh&&(!Yl&&ic()&&(oi=Yl=window,oc=oi.document||{},Dn.gsap=je,(oi.gsapVersions||(oi.gsapVersions=[])).push(je.version),Hh(Yo||oi.GreenSockGlobals||!oi.gsap&&oi||{}),of.forEach(af)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&h.sleep(),c=u||function(p){return setTimeout(p,o-h.time*1e3+1|0)},io=1,_(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),io=0,c=no},lagSmoothing:function(p,m){t=p||1/0,e=Math.min(m||33,t)},fps:function(p){s=1e3/(p||240),o=h.time*1e3+s},add:function(p,m,S){var v=m?function(M,D,T,E){p(M,D,T,E),h.remove(v)}:p;return h.remove(p),a[S?"unshift":"push"](v),ns(),v},remove:function(p,m){~(m=a.indexOf(p))&&a.splice(m,1)&&d>=m&&d--},_listeners:a},h}(),ns=function(){return!io&&yn.wake()},ee={},mg=/^[\d.\-M][\d.\-,\s]/,gg=/["']/g,_g=function(t){for(var e={},n=t.substr(1,t.length-3).split(":"),i=n[0],s=1,o=n.length,a,l,c;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),e[i]=isNaN(c)?c.replace(gg,"").trim():+c,i=l.substr(a+1).trim();return e},xg=function(t){var e=t.indexOf("(")+1,n=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<n?t.indexOf(")",n+1):n)},vg=function(t){var e=(t+"").split("("),n=ee[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[_g(e[1])]:xg(t).split(",").map(qh)):ee._CE&&mg.test(t)?ee._CE("",t):n},uf=function(t){return function(e){return 1-t(1-e)}},hf=function r(t,e){for(var n=t._first,i;n;)n instanceof qe?r(n,e):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==e&&(n.timeline?r(n.timeline,e):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=e)),n=n._next},mr=function(t,e){return t&&(Ae(t)?t:ee[t]||vg(t))||e},yr=function(t,e,n,i){n===void 0&&(n=function(l){return 1-e(1-l)}),i===void 0&&(i=function(l){return l<.5?e(l*2)/2:1-e((1-l)*2)/2});var s={easeIn:e,easeOut:n,easeInOut:i},o;return ln(t,function(a){ee[a]=Dn[a]=s,ee[o=a.toLowerCase()]=n;for(var l in s)ee[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=ee[a+"."+l]=s[l]}),s},ff=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},Vl=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/Xl*(Math.asin(1/i)||0),a=function(u){return u===1?1:i*Math.pow(2,-10*u)*Ym((u-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:ff(a);return s=Xl/s,l.config=function(c,u){return r(t,c,u)},l},Hl=function r(t,e){e===void 0&&(e=1.70158);var n=function(o){return o?--o*o*((e+1)*o+e)+1:0},i=t==="out"?n:t==="in"?function(s){return 1-n(1-s)}:ff(n);return i.config=function(s){return r(t,s)},i};ln("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;yr(r+",Power"+(e-1),t?function(n){return Math.pow(n,e)}:function(n){return n},function(n){return 1-Math.pow(1-n,e)},function(n){return n<.5?Math.pow(n*2,e)/2:1-Math.pow((1-n)*2,e)/2})});ee.Linear.easeNone=ee.none=ee.Linear.easeIn;yr("Elastic",Vl("in"),Vl("out"),Vl());(function(r,t){var e=1/t,n=2*e,i=2.5*e,s=function(a){return a<e?r*a*a:a<n?r*Math.pow(a-1.5/t,2)+.75:a<i?r*(a-=2.25/t)*a+.9375:r*Math.pow(a-2.625/t,2)+.984375};yr("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);yr("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});yr("Circ",function(r){return-(Bh(1-r*r)-1)});yr("Sine",function(r){return r===1?1:-qm(r*Wm)+1});yr("Back",Hl("in"),Hl("out"),Hl());ee.SteppedEase=ee.steps=Dn.SteppedEase={config:function(t,e){t===void 0&&(t=1);var n=1/t,i=t+(e?0:1),s=e?1:0,o=1-ge;return function(a){return((i*so(0,o,a)|0)+s)*n}}};jr.ease=ee["quad.out"];ln("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return lc+=r+","+r+"Params,"});var fc=function(t,e){this.id=Xm++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:uc,this.set=e?e.getSetter:ia},ro=function(){function r(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,es(this,+e.duration,1,1),this.data=e.data,Me&&(this._ctx=Me,Me.data.push(this)),io||yn.wake()}var t=r.prototype;return t.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},t.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},t.totalDuration=function(n){return arguments.length?(this._dirty=0,es(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(ns(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(na(this,n),!s._dp||s.parent||Jh(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&ai(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===ge||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),Xh(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+Ih(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},t.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+Ih(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(n,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,i):this._repeat?ts(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-ge?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?$o(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-ge?0:this._rts,this.totalTime(so(-Math.abs(this._delay),this._tDur,s),i!==!1),ea(this),tg(this)},t.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ns(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==ge&&(this._tTime-=ge)))),this):this._ps},t.startTime=function(n){if(arguments.length){this._start=n;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&ai(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Mn(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?$o(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=$m);var i=Ke;return Ke=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),Ke=i,this},t.globalTime=function(n){for(var i=this,s=arguments.length?n:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},t.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,Lh(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,Lh(this),i?this.time(i):this}return this._rDelay},t.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},t.seek=function(n,i){return this.totalTime(Nn(this,n),Mn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Mn(i))},t.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},t.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},t.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-ge:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-ge,this},t.isActive=function(){var n=this.parent||this._dp,i=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=i&&s<this.endTime(!0)-ge)},t.eventCallback=function(n,i,s){var o=this.vars;return arguments.length>1?(i?(o[n]=i,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=i)):delete o[n],this):o[n]},t.then=function(n){var i=this;return new Promise(function(s){var o=Ae(n)?n:Yh,a=function(){var c=i.then;i.then=null,Ae(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=c),s(o),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},t.kill=function(){$s(this)},r}();Bn(ro.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-ge,_prom:0,_ps:!1,_rts:1});var qe=function(r){Oh(t,r);function t(n,i){var s;return n===void 0&&(n={}),s=r.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=Mn(n.sortChildren),we&&ai(n.parent||we,_i(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&$h(_i(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return js(0,arguments,this),this},e.from=function(i,s,o){return js(1,arguments,this),this},e.fromTo=function(i,s,o,a){return js(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Qs(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Re(i,s,Nn(this,o),1),this},e.call=function(i,s,o){return ai(this,Re.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new Re(i,o,Nn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,u){return o.runBackwards=1,Qs(o).immediateRender=Mn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,u)},e.staggerFromTo=function(i,s,o,a,l,c,u,h){return a.startAt=o,Qs(a).immediateRender=Mn(a.immediateRender),this.staggerTo(i,s,a,l,c,u,h)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=i<=0?0:Ve(i),h=this._zTime<0!=i<0&&(this._initted||!c),f,d,_,g,p,m,S,v,M,D,T,E;if(this!==we&&u>l&&i>=0&&(u=l),u!==this._tTime||o||h){if(a!==this._time&&c&&(u+=this._time-a,i+=this._time-a),f=u,M=this._start,v=this._ts,m=!v,h&&(c||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(T=this._yoyo,p=c+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(p*100+i,s,o);if(f=Ve(u%p),u===l?(g=this._repeat,f=c):(g=~~(u/p),g&&g===u/p&&(f=c,g--),f>c&&(f=c)),D=ts(this._tTime,p),!a&&this._tTime&&D!==g&&this._tTime-D*p-this._dur<=0&&(D=g),T&&g&1&&(f=c-f,E=1),g!==D&&!this._lock){var R=T&&D&1,y=R===(T&&g&1);if(g<D&&(R=!R),a=R?0:u%c?c:u,this._lock=1,this.render(a||(E?0:Ve(g*p)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&An(this,"onRepeat"),this.vars.repeatRefresh&&!E&&(this.invalidate()._lock=1),a&&a!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,y&&(this._lock=2,a=R?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!E&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;hf(this,E)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=rg(this,Ve(a),Ve(f)),S&&(u-=f-(f=S._start))),this._tTime=u,this._time=f,this._act=!v,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&f&&!s&&!g&&(An(this,"onStart"),this._tTime!==u))return this;if(f>=a&&i>=0)for(d=this._first;d;){if(_=d._next,(d._act||f>=d._start)&&d._ts&&S!==d){if(d.parent!==this)return this.render(i,s,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,s,o),f!==this._time||!this._ts&&!m){S=0,_&&(u+=this._zTime=-ge);break}}d=_}else{d=this._last;for(var x=i<0?i:f;d;){if(_=d._prev,(d._act||x<=d._end)&&d._ts&&S!==d){if(d.parent!==this)return this.render(i,s,o);if(d.render(d._ts>0?(x-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(x-d._start)*d._ts,s,o||Ke&&(d._initted||d._startAt)),f!==this._time||!this._ts&&!m){S=0,_&&(u+=this._zTime=x?-ge:ge);break}}d=_}}if(S&&!s&&(this.pause(),S.render(f>=a?0:-ge)._zTime=f>=a?1:-1,this._ts))return this._start=M,ea(this),this.render(i,s,o);this._onUpdate&&!s&&An(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(M===this._start||Math.abs(v)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&Hi(this,1),!s&&!(i<0&&!a)&&(u||a||!l)&&(An(this,u===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(vi(s)||(s=Nn(this,s,i)),!(i instanceof ro)){if(Qe(i))return i.forEach(function(a){return o.add(a,s)}),this;if(Ue(i))return this.addLabel(i,s);if(Ae(i))i=Re.delayedCall(0,i);else return this}return this!==i?ai(this,i,s):this},e.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-Un);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Re?s&&l.push(c):(o&&l.push(c),i&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},e.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},e.remove=function(i){return Ue(i)?this.removeLabel(i):Ae(i)?this.killTweensOf(i):(ta(this,i),i===this._recent&&(this._recent=this._last),pr(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ve(yn.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),r.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},e.addLabel=function(i,s){return this.labels[i]=Nn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Re.delayedCall(0,s||no,o);return a.data="isPause",this._hasPause=1,ai(this,a,Nn(this,i))},e.removePause=function(i){var s=this._first;for(i=Nn(this,i);s;)s._start===i&&s.data==="isPause"&&Hi(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)zi!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=On(i),l=this._first,c=vi(s),u;l;)l instanceof Re?Km(l._targets,a)&&(c?(!zi||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Nn(o,i),l=s,c=l.startAt,u=l.onStart,h=l.onStartParams,f=l.immediateRender,d,_=Re.to(o,Bn({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||ge,onStart:function(){if(o.pause(),!d){var p=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==p&&es(_,p,0,1).render(_._time,!0,!0),d=1}u&&u.apply(_,h||[])}},s));return f?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,Bn({startAt:{time:Nn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),Fh(this,Nn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),Fh(this,Nn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+ge)},e.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=i);return pr(this)},e.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return r.prototype.invalidate.call(this,i)},e.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),pr(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=Un,c,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(h=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,ai(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(s-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;es(o,o===we&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(we._ts&&(Xh(we,$o(i,we)),Wh=yn.frame),yn.frame>=Rh){Rh+=Sn.autoSleep||120;var s=we._first;if((!s||!s._ts)&&Sn.autoSleep&&yn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||yn.sleep()}}},t}(ro);Bn(qe.prototype,{_lock:0,_hasPause:0,_forcing:0});var yg=function(t,e,n,i,s,o,a){var l=new cn(this._pt,t,e,0,1,_c,null,s),c=0,u=0,h,f,d,_,g,p,m,S;for(l.b=n,l.e=i,n+="",i+="",(m=~i.indexOf("random("))&&(i=is(i)),o&&(S=[n,i],o(S,t,e),n=S[0],i=S[1]),f=n.match(Bl)||[];h=Bl.exec(i);)_=h[0],g=i.substring(c,h.index),d?d=(d+1)%5:g.substr(-5)==="rgba("&&(d=1),_!==f[u++]&&(p=parseFloat(f[u-1])||0,l._pt={_next:l._pt,p:g||u===1?g:",",s:p,c:_.charAt(1)==="="?vr(p,_)-p:parseFloat(_)-p,m:d&&d<4?Math.round:0},c=Bl.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(sc.test(i)||m)&&(l.e=0),this._pt=l,l},dc=function(t,e,n,i,s,o,a,l,c,u){Ae(i)&&(i=i(s||0,t,o));var h=t[e],f=n!=="get"?n:Ae(h)?c?t[e.indexOf("set")||!Ae(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():h,d=Ae(h)?c?Eg:mf:gc,_;if(Ue(i)&&(~i.indexOf("random(")&&(i=is(i)),i.charAt(1)==="="&&(_=vr(f,i)+(Ye(f)||0),(_||_===0)&&(i=_))),!u||f!==i||tc)return!isNaN(f*i)&&i!==""?(_=new cn(this._pt,t,e,+f||0,i-(f||0),typeof h=="boolean"?Ag:gf,0,d),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!h&&!(e in t)&&jo(e,i),yg.call(this,t,e,f,i,d,l||Sn.stringFilter,c))},Mg=function(t,e,n,i,s){if(Ae(t)&&(t=to(t,s,e,n,i)),!li(t)||t.style&&t.nodeType||Qe(t)||zh(t))return Ue(t)?to(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=to(t[a],s,e,n,i);return o},pc=function(t,e,n,i,s,o){var a,l,c,u;if(vn[t]&&(a=new vn[t]).init(s,a.rawVars?e[t]:Mg(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new cn(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==Qr))for(c=n._ptLookup[n._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},zi,tc,mc=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,u=i.runBackwards,h=i.yoyoEase,f=i.keyframes,d=i.autoRevert,_=t._dur,g=t._startAt,p=t._targets,m=t.parent,S=m&&m.data==="nested"?m.vars.targets:p,v=t._overwrite==="auto"&&!nc,M=t.timeline,D,T,E,R,y,x,L,F,P,B,X,G,J;if(M&&(!f||!s)&&(s="none"),t._ease=mr(s,jr.ease),t._yEase=h?uf(mr(h===!0?s:h,jr.ease)):0,h&&t._yoyo&&!t._repeat&&(h=t._yEase,t._yEase=t._ease,t._ease=h),t._from=!M&&!!i.runBackwards,!M||f&&!i.stagger){if(F=p[0]?Vi(p[0]).harness:0,G=F&&i[F.prop],D=Jo(i,ac),g&&(g._zTime<0&&g.progress(1),e<0&&u&&a&&!d?g.render(-1,!0):g.revert(u&&_?Wo:Jm),g._lazy=0),o){if(Hi(t._startAt=Re.set(p,Bn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!g&&Mn(l),startAt:null,delay:0,onUpdate:c&&function(){return An(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Ke||!a&&!d)&&t._startAt.revert(Wo),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(u&&_&&!g){if(e&&(a=!1),E=Bn({overwrite:!1,data:"isFromStart",lazy:a&&!g&&Mn(l),immediateRender:a,stagger:0,parent:m},D),G&&(E[F.prop]=G),Hi(t._startAt=Re.set(p,E)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(Ke?t._startAt.revert(Wo):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,ge,ge);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Mn(l)||l&&!_,T=0;T<p.length;T++){if(y=p[T],L=y._gsap||cc(p)[T]._gsap,t._ptLookup[T]=B={},Zl[L.id]&&ki.length&&Zo(),X=S===p?T:S.indexOf(y),F&&(P=new F).init(y,G||D,t,X,S)!==!1&&(t._pt=R=new cn(t._pt,y,P.name,0,1,P.render,P,0,P.priority),P._props.forEach(function(U){B[U]=R}),P.priority&&(x=1)),!F||G)for(E in D)vn[E]&&(P=pc(E,D,t,X,y,S))?P.priority&&(x=1):B[E]=R=dc.call(t,y,E,"get",D[E],X,S,0,i.stringFilter);t._op&&t._op[T]&&t.kill(y,t._op[T]),v&&t._pt&&(zi=t,we.killTweensOf(y,B,t.globalTime(e)),J=!t.parent,zi=0),t._pt&&l&&(Zl[L.id]=1)}x&&vc(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!J,f&&e<=0&&M.render(Un,!0,!0)},Sg=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],u,h,f,d;if(!c)for(c=t._ptCache[e]=[],f=t._ptLookup,d=t._targets.length;d--;){if(u=f[d][e],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return tc=1,t.vars[e]="+=0",mc(t,a),tc=0,l?eo(e+" not eligible for reset"):1;c.push(u)}for(d=c.length;d--;)h=c[d],u=h._pt||h,u.s=(i||i===0)&&!s?i:u.s+(i||0)+o*u.c,u.c=n-u.s,h.e&&(h.e=De(n)+Ye(h.e)),h.b&&(h.b=u.s+Ye(h.b))},bg=function(t,e){var n=t[0]?Vi(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=_r({},e);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},wg=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(Qe(e))a=n[t]||(n[t]=[]),e.forEach(function(l,c){return a.push({t:c/(e.length-1)*100,v:l,e:s})});else for(o in e)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:e[o],e:s})},to=function(t,e,n,i,s){return Ae(t)?t.call(e,n,i,s):Ue(t)&&~t.indexOf("random(")?is(t):t},df=lc+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",pf={};ln(df+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return pf[r]=1});var Re=function(r){Oh(t,r);function t(n,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=r.call(this,o?i:Qs(i))||this;var l=a.vars,c=l.duration,u=l.delay,h=l.immediateRender,f=l.stagger,d=l.overwrite,_=l.keyframes,g=l.defaults,p=l.scrollTrigger,m=l.yoyoEase,S=i.parent||we,v=(Qe(n)||zh(n)?vi(n[0]):"length"in i)?[n]:On(n),M,D,T,E,R,y,x,L;if(a._targets=v.length?cc(v):eo("GSAP target "+n+" not found. https://gsap.com",!Sn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,_||f||Go(c)||Go(u)){if(i=a.vars,M=a.timeline=new qe({data:"nested",defaults:g||{},targets:S&&S.data==="nested"?S.vars.targets:v}),M.kill(),M.parent=M._dp=_i(a),M._start=0,f||Go(c)||Go(u)){if(E=v.length,x=f&&tf(f),li(f))for(R in f)~df.indexOf(R)&&(L||(L={}),L[R]=f[R]);for(D=0;D<E;D++)T=Jo(i,pf),T.stagger=0,m&&(T.yoyoEase=m),L&&_r(T,L),y=v[D],T.duration=+to(c,_i(a),D,y,v),T.delay=(+to(u,_i(a),D,y,v)||0)-a._delay,!f&&E===1&&T.delay&&(a._delay=u=T.delay,a._start+=u,T.delay=0),M.to(y,T,x?x(D,y,v):0),M._ease=ee.none;M.duration()?c=u=0:a.timeline=0}else if(_){Qs(Bn(M.vars.defaults,{ease:"none"})),M._ease=mr(_.ease||i.ease||"none");var F=0,P,B,X;if(Qe(_))_.forEach(function(G){return M.to(v,G,">")}),M.duration();else{T={};for(R in _)R==="ease"||R==="easeEach"||wg(R,_[R],T,_.easeEach);for(R in T)for(P=T[R].sort(function(G,J){return G.t-J.t}),F=0,D=0;D<P.length;D++)B=P[D],X={ease:B.e,duration:(B.t-(D?P[D-1].t:0))/100*c},X[R]=B.v,M.to(v,X,F),F+=X.duration;M.duration()<c&&M.to({},{duration:c-M.duration()})}}c||a.duration(c=M.duration())}else a.timeline=0;return d===!0&&!nc&&(zi=_i(a),we.killTweensOf(v),zi=0),ai(S,_i(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(h||!c&&!_&&a._start===Ve(S._time)&&Mn(h)&&eg(_i(a))&&S.data!=="nested")&&(a._tTime=-ge,a.render(Math.max(0,-u)||0)),p&&$h(_i(a),p),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,u=i<0,h=i>l-ge&&!u?l:i<ge?0:i,f,d,_,g,p,m,S,v,M;if(!c)ig(this,i,s,o);else if(h!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u){if(f=h,v=this.timeline,this._repeat){if(g=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(g*100+i,s,o);if(f=Ve(h%g),h===l?(_=this._repeat,f=c):(_=~~(h/g),_&&_===Ve(h/g)&&(f=c,_--),f>c&&(f=c)),m=this._yoyo&&_&1,m&&(M=this._yEase,f=c-f),p=ts(this._tTime,g),f===a&&!o&&this._initted&&_===p)return this._tTime=h,this;_!==p&&(v&&this._yEase&&hf(v,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==g&&this._initted&&(this._lock=o=1,this.render(Ve(g*_),!0).invalidate()._lock=0))}if(!this._initted){if(Kh(this,u?i:f,o,s,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&_!==p))return this;if(c!==this._dur)return this.render(i,s,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=S=(M||this._ease)(f/c),this._from&&(this.ratio=S=1-S),f&&!a&&!s&&!_&&(An(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(S,d.d),d=d._next;v&&v.render(i<0?i:v._dur*v._ease(f/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(u&&Jl(this,i,s,o),An(this,"onUpdate")),this._repeat&&_!==p&&this.vars.onRepeat&&!s&&this.parent&&An(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&Jl(this,i,!0,!0),(i||!c)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Hi(this,1),!s&&!(u&&!a)&&(h||a||m)&&(An(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),r.prototype.invalidate.call(this,i)},e.resetTo=function(i,s,o,a,l){io||yn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||mc(this,c),u=this._ease(c/this._dur),Sg(this,i,s,o,a,u,c,l)?this.resetTo(i,s,o,a,1):(na(this,0),this.parent||Zh(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?$s(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,zi&&zi.vars.overwrite!==!0)._first||$s(this),this.parent&&o!==this.timeline.totalDuration()&&es(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?On(i):a,c=this._ptLookup,u=this._pt,h,f,d,_,g,p,m;if((!s||s==="all")&&jm(a,l))return s==="all"&&(this._pt=0),$s(this);for(h=this._op=this._op||[],s!=="all"&&(Ue(s)&&(g={},ln(s,function(S){return g[S]=1}),s=g),s=bg(a,s)),m=a.length;m--;)if(~l.indexOf(a[m])){f=c[m],s==="all"?(h[m]=s,_=f,d={}):(d=h[m]=h[m]||{},_=s);for(g in _)p=f&&f[g],p&&((!("kill"in p.d)||p.d.kill(g)===!0)&&ta(this,p,"_pt"),delete f[g]),d!=="all"&&(d[g]=1)}return this._initted&&!this._pt&&u&&$s(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return js(1,arguments)},t.delayedCall=function(i,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(i,s,o){return js(2,arguments)},t.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(i,s)},t.killTweensOf=function(i,s,o){return we.killTweensOf(i,s,o)},t}(ro);Bn(Re.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ln("staggerTo,staggerFrom,staggerFromTo",function(r){Re[r]=function(){var t=new qe,e=Kl.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var gc=function(t,e,n){return t[e]=n},mf=function(t,e,n){return t[e](n)},Eg=function(t,e,n,i){return t[e](i.fp,n)},Tg=function(t,e,n){return t.setAttribute(e,n)},ia=function(t,e){return Ae(t[e])?mf:Qo(t[e])&&t.setAttribute?Tg:gc},gf=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},Ag=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},_c=function(t,e){var n=e._pt,i="";if(!t&&e.b)i=e.b;else if(t===1&&e.e)i=e.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*t):Math.round((n.s+n.c*t)*1e4)/1e4)+i,n=n._next;i+=e.c}e.set(e.t,e.p,i,e)},xc=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Dg=function(t,e,n,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(t,e,n),s=o},Cg=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?ta(this,e,"_pt"):e.dep||(n=1),e=i;return!n},Rg=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},vc=function(t){for(var e=t._pt,n,i,s,o;e;){for(n=e._next,i=s;i&&i.pr>e.pr;)i=i._next;(e._prev=i?i._prev:o)?e._prev._next=e:s=e,(e._next=i)?i._prev=e:o=e,e=n}t._pt=s},cn=function(){function r(e,n,i,s,o,a,l,c,u){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||gf,this.d=l||this,this.set=c||gc,this.pr=u||0,this._next=e,e&&(e._prev=this)}var t=r.prototype;return t.modifier=function(n,i,s){this.mSet=this.mSet||this.set,this.set=Rg,this.m=n,this.mt=s,this.tween=i},r}();ln(lc+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return ac[r]=1});Dn.TweenMax=Dn.TweenLite=Re;Dn.TimelineLite=Dn.TimelineMax=qe;we=new qe({sortChildren:!1,defaults:jr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Sn.stringFilter=hc;var gr=[],qo={},Pg=[],Uh=0,Ig=0,Gl=function(t){return(qo[t]||Pg).map(function(e){return e()})},ec=function(){var t=Date.now(),e=[];t-Uh>2&&(Gl("matchMediaInit"),gr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=oi.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),Gl("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),Uh=t,Gl("matchMedia"))},_f=function(){function r(e,n){this.selector=n&&Ql(n),this.data=[],this._r=[],this.isReverted=!1,this.id=Ig++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Ae(n)&&(s=i,i=n,n=Ae);var o=this,a=function(){var c=Me,u=o.selector,h;return c&&c!==o&&c.data.push(o),s&&(o.selector=Ql(s)),Me=o,h=i.apply(o,arguments),Ae(h)&&o._r.push(h),Me=c,o.selector=u,o.isReverted=!1,h};return o.last=a,n===Ae?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Me;Me=null,n(this),Me=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Re&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(n,i){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(n)}),l=s.data.length;l--;)c=s.data[l],c instanceof qe?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof Re)&&c.revert&&c.revert(n);s._r.forEach(function(u){return u(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=gr.length;o--;)gr[o].id===this.id&&gr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),Lg=function(){function r(e){this.contexts=[],this.scope=e,Me&&Me.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){li(n)||(n={matches:n});var o=new _f(0,s||this.scope),a=o.conditions={},l,c,u;Me&&!o.selector&&(o.selector=Me.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?u=1:(l=oi.matchMedia(n[c]),l&&(gr.indexOf(o)<0&&gr.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(ec):l.addEventListener("change",ec)));return u&&i(o,function(h){return o.add(null,h)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),Ko={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(i){return af(i)})},timeline:function(t){return new qe(t)},getTweensOf:function(t,e){return we.getTweensOf(t,e)},getProperty:function(t,e,n,i){Ue(t)&&(t=On(t)[0]);var s=Vi(t||{}).get,o=n?Yh:qh;return n==="native"&&(n=""),t&&(e?o((vn[e]&&vn[e].get||s)(t,e,n,i)):function(a,l,c){return o((vn[a]&&vn[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=On(t),t.length>1){var i=t.map(function(u){return je.quickSetter(u,e,n)}),s=i.length;return function(u){for(var h=s;h--;)i[h](u)}}t=t[0]||{};var o=vn[e],a=Vi(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(u){var h=new o;Qr._pt=0,h.init(t,n?u+n:u,Qr,0,[t]),h.render(1,h),Qr._pt&&xc(1,Qr)}:a.set(t,l);return o?c:function(u){return c(t,l,n?u+n:u,a,1)}},quickTo:function(t,e,n){var i,s=je.to(t,_r((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,u){return s.resetTo(e,l,c,u)};return o.tween=s,o},isTweening:function(t){return we.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=mr(t.ease,jr.ease)),Ph(jr,t||{})},config:function(t){return Ph(Sn,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,i=t.plugins,s=t.defaults,o=t.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!vn[a]&&!Dn[a]&&eo(e+" effect requires "+a+" plugin.")}),zl[e]=function(a,l,c){return n(On(a),Bn(l||{},s),c)},o&&(qe.prototype[e]=function(a,l,c){return this.add(zl[e](a,li(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){ee[t]=mr(e)},parseEase:function(t,e){return arguments.length?mr(t,e):ee},getById:function(t){return we.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new qe(t),i,s;for(n.smoothChildTiming=Mn(t.smoothChildTiming),we.remove(n),n._dp=0,n._time=n._tTime=we._time,i=we._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Re&&i.vars.onComplete===i._targets[0]))&&ai(n,i,i._start-i._delay),i=s;return ai(we,n,0),n},context:function(t,e){return t?new _f(t,e):Me},matchMedia:function(t){return new Lg(t)},matchMediaRefresh:function(){return gr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||ec()},addEventListener:function(t,e){var n=qo[t]||(qo[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=qo[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:hg,wrapYoyo:fg,distribute:tf,random:nf,snap:ef,normalize:ug,getUnit:Ye,clamp:og,splitColor:lf,toArray:On,selector:Ql,mapRange:sf,pipe:lg,unitize:cg,interpolate:dg,shuffle:jh},install:Hh,effects:zl,ticker:yn,updateRoot:qe.updateRoot,plugins:vn,globalTimeline:we,core:{PropTween:cn,globals:Gh,Tween:Re,Timeline:qe,Animation:ro,getCache:Vi,_removeLinkedListItem:ta,reverting:function(){return Ke},context:function(t){return t&&Me&&(Me.data.push(t),t._ctx=Me),Me},suppressOverwrites:function(t){return nc=t}}};ln("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return Ko[r]=Re[r]});yn.add(qe.updateRoot);Qr=Ko.to({},{duration:0});var Fg=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Ng=function(t,e){var n=t._targets,i,s,o;for(i in e)for(s=n.length;s--;)o=t._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=Fg(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},Wl=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(Ue(s)&&(l={},ln(s,function(u){return l[u]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}Ng(a,s)}}}},je=Ko.registerPlugin({name:"attr",init:function(t,e,n,i,s){var o,a,l;this.tween=n;for(o in e)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",e[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)Ke?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},Wl("roundProps",jl),Wl("modifiers"),Wl("snap",ef))||Ko;Re.version=qe.version=je.version="3.12.5";Vh=1;ic()&&ns();var Ug=ee.Power0,Og=ee.Power1,Bg=ee.Power2,zg=ee.Power3,kg=ee.Power4,Vg=ee.Linear,Hg=ee.Quad,Gg=ee.Cubic,Wg=ee.Quart,Xg=ee.Quint,qg=ee.Strong,Yg=ee.Elastic,Zg=ee.Back,Jg=ee.SteppedEase,$g=ee.Bounce,Kg=ee.Sine,Qg=ee.Expo,jg=ee.Circ;var xf,Wi,ss,Tc,wr,t_,vf,Ac,e_=function(){return typeof window<"u"},Mi={},br=180/Math.PI,os=Math.PI/180,rs=Math.atan2,yf=1e8,Dc=/([A-Z])/g,n_=/(left|right|width|margin|padding|x)/i,i_=/[\s,\(]\S/,ci={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Sc=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},r_=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},s_=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},o_=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Af=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Df=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},a_=function(t,e,n){return t.style[e]=n},l_=function(t,e,n){return t.style.setProperty(e,n)},c_=function(t,e,n){return t._gsap[e]=n},u_=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},h_=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},f_=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Ee="transform",bn=Ee+"Origin",d_=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in Mi&&s){if(this.tfm=this.tfm||{},t!=="transform")t=ci[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=yi(i,a)}):this.tfm[t]=o.x?o[t]:yi(i,t),t===bn&&(this.tfm.zOrigin=o.zOrigin);else return ci.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Ee)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(bn,e,"")),t=Ee}(s||e)&&this.props.push(t,e,s[t])},Cf=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},p_=function(){var t=this.props,e=this.target,n=e.style,i=e._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?e[t[s]]=t[s+2]:t[s+2]?n[t[s]]=t[s+2]:n.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(Dc,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),s=Ac(),(!s||!s.isStart)&&!n[Ee]&&(Cf(n),i.zOrigin&&n[bn]&&(n[bn]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},Rf=function(t,e){var n={target:t,props:[],revert:p_,save:d_};return t._gsap||je.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},Pf,bc=function(t,e){var n=Wi.createElementNS?Wi.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Wi.createElement(t);return n&&n.style?n:Wi.createElement(t)},ui=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Dc,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,as(e)||e,1)||""},Mf="O,Moz,ms,Ms,Webkit".split(","),as=function(t,e,n){var i=e||wr,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(Mf[o]+t in s););return o<0?null:(o===3?"ms":o>=0?Mf[o]:"")+t},wc=function(){e_()&&window.document&&(xf=window,Wi=xf.document,ss=Wi.documentElement,wr=bc("div")||{style:{}},t_=bc("div"),Ee=as(Ee),bn=Ee+"Origin",wr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Pf=!!as("perspective"),Ac=je.core.reverting,Tc=1)},yc=function r(t){var e=bc("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,i=this.nextSibling,s=this.style.cssText,o;if(ss.appendChild(e),e.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=r}catch{}else this._gsapBBox&&(o=this._gsapBBox());return n&&(i?n.insertBefore(this,i):n.appendChild(this)),ss.removeChild(e),this.style.cssText=s,o},Sf=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},If=function(t){var e;try{e=t.getBBox()}catch{e=yc.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===yc||(e=yc.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+Sf(t,["x","cx","x1"])||0,y:+Sf(t,["y","cy","y1"])||0,width:0,height:0}:e},Lf=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&If(t))},Er=function(t,e){if(e){var n=t.style,i;e in Mi&&e!==bn&&(e=Ee),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(Dc,"-$1").toLowerCase())):n.removeAttribute(e)}},Xi=function(t,e,n,i,s,o){var a=new cn(t._pt,e,n,0,1,o?Df:Af);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},bf={deg:1,rad:1,turn:1},m_={grid:1,flex:1},qi=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=wr.style,l=n_.test(e),c=t.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),h=100,f=i==="px",d=i==="%",_,g,p,m;if(i===o||!s||bf[i]||bf[o])return s;if(o!=="px"&&!f&&(s=r(t,e,n,"px")),m=t.getCTM&&Lf(t),(d||o==="%")&&(Mi[e]||~e.indexOf("adius")))return _=m?t.getBBox()[l?"width":"height"]:t[u],De(d?s/_*h:s/100*_);if(a[l?"width":"height"]=h+(f?o:i),g=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,m&&(g=(t.ownerSVGElement||{}).parentNode),(!g||g===Wi||!g.appendChild)&&(g=Wi.body),p=g._gsap,p&&d&&p.width&&l&&p.time===yn.time&&!p.uncache)return De(s/p.width*h);if(d&&(e==="height"||e==="width")){var S=t.style[e];t.style[e]=h+i,_=t[u],S?t.style[e]=S:Er(t,e)}else(d||o==="%")&&!m_[ui(g,"display")]&&(a.position=ui(t,"position")),g===t&&(a.position="static"),g.appendChild(wr),_=wr[u],g.removeChild(wr),a.position="absolute";return l&&d&&(p=Vi(g),p.time=yn.time,p.width=g[u]),De(f?_*s/h:_&&s?h/_*s:0)},yi=function(t,e,n,i){var s;return Tc||wc(),e in ci&&e!=="transform"&&(e=ci[e],~e.indexOf(",")&&(e=e.split(",")[0])),Mi[e]&&e!=="transform"?(s=lo(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:sa(ui(t,bn))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=ra[e]&&ra[e](t,e,n)||ui(t,e)||uc(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?qi(t,e,s,n)+n:s},g_=function(t,e,n,i){if(!n||n==="none"){var s=as(e,t,1),o=s&&ui(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=ui(t,"borderTopColor"))}var a=new cn(this._pt,t.style,e,0,1,_c),l=0,c=0,u,h,f,d,_,g,p,m,S,v,M,D;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(g=t.style[e],t.style[e]=i,i=ui(t,e)||i,g?t.style[e]=g:Er(t,e)),u=[n,i],hc(u),n=u[0],i=u[1],f=n.match(xr)||[],D=i.match(xr)||[],D.length){for(;h=xr.exec(i);)p=h[0],S=i.substring(l,h.index),_?_=(_+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(_=1),p!==(g=f[c++]||"")&&(d=parseFloat(g)||0,M=g.substr((d+"").length),p.charAt(1)==="="&&(p=vr(d,p)+M),m=parseFloat(p),v=p.substr((m+"").length),l=xr.lastIndex-v.length,v||(v=v||Sn.units[e]||M,l===i.length&&(i+=v,a.e+=v)),M!==v&&(d=qi(t,e,g,v)||0),a._pt={_next:a._pt,p:S||c===1?S:",",s:d,c:m-d,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?Df:Af;return sc.test(i)&&(a.e=0),this._pt=a,a},wf={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},__=function(t){var e=t.split(" "),n=e[0],i=e[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(t=n,n=i,i=t),e[0]=wf[n]||n,e[1]=wf[i]||i,e.join(" ")},x_=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n=e.t,i=n.style,s=e.u,o=n._gsap,a,l,c;if(s==="all"||s===!0)i.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],Mi[a]&&(l=1,a=a==="transformOrigin"?bn:Ee),Er(n,a);l&&(Er(n,Ee),o&&(o.svg&&n.removeAttribute("transform"),lo(n,1),o.uncache=1,Cf(i)))}},ra={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new cn(t._pt,e,n,0,0,x_);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},ao=[1,0,0,1,0,0],Ff={},Nf=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Ef=function(t){var e=ui(t,Ee);return Nf(e)?ao:e.substr(7).match(rc).map(De)},Cc=function(t,e){var n=t._gsap||Vi(t),i=t.style,s=Ef(t),o,a,l,c;return n.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?ao:s):(s===ao&&!t.offsetParent&&t!==ss&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,ss.appendChild(t)),s=Ef(t),l?i.display=l:Er(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):ss.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Ec=function(t,e,n,i,s,o){var a=t._gsap,l=s||Cc(t,!0),c=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,f=a.yOffset||0,d=l[0],_=l[1],g=l[2],p=l[3],m=l[4],S=l[5],v=e.split(" "),M=parseFloat(v[0])||0,D=parseFloat(v[1])||0,T,E,R,y;n?l!==ao&&(E=d*p-_*g)&&(R=M*(p/E)+D*(-g/E)+(g*S-p*m)/E,y=M*(-_/E)+D*(d/E)-(d*S-_*m)/E,M=R,D=y):(T=If(t),M=T.x+(~v[0].indexOf("%")?M/100*T.width:M),D=T.y+(~(v[1]||v[0]).indexOf("%")?D/100*T.height:D)),i||i!==!1&&a.smooth?(m=M-c,S=D-u,a.xOffset=h+(m*d+S*g)-m,a.yOffset=f+(m*_+S*p)-S):a.xOffset=a.yOffset=0,a.xOrigin=M,a.yOrigin=D,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[bn]="0px 0px",o&&(Xi(o,a,"xOrigin",c,M),Xi(o,a,"yOrigin",u,D),Xi(o,a,"xOffset",h,a.xOffset),Xi(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",M+" "+D)},lo=function(t,e){var n=t._gsap||new fc(t);if("x"in n&&!e&&!n.uncache)return n;var i=t.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(t),c=ui(t,bn)||"0",u,h,f,d,_,g,p,m,S,v,M,D,T,E,R,y,x,L,F,P,B,X,G,J,U,I,A,it,vt,Wt,q,Q;return u=h=f=g=p=m=S=v=M=0,d=_=1,n.svg=!!(t.getCTM&&Lf(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Ee]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Ee]!=="none"?l[Ee]:"")),i.scale=i.rotate=i.translate="none"),E=Cc(t,n.svg),n.svg&&(n.uncache?(U=t.getBBox(),c=n.xOrigin-U.x+"px "+(n.yOrigin-U.y)+"px",J=""):J=!e&&t.getAttribute("data-svg-origin"),Ec(t,J||c,!!J||n.originIsAbsolute,n.smooth!==!1,E)),D=n.xOrigin||0,T=n.yOrigin||0,E!==ao&&(L=E[0],F=E[1],P=E[2],B=E[3],u=X=E[4],h=G=E[5],E.length===6?(d=Math.sqrt(L*L+F*F),_=Math.sqrt(B*B+P*P),g=L||F?rs(F,L)*br:0,S=P||B?rs(P,B)*br+g:0,S&&(_*=Math.abs(Math.cos(S*os))),n.svg&&(u-=D-(D*L+T*P),h-=T-(D*F+T*B))):(Q=E[6],Wt=E[7],A=E[8],it=E[9],vt=E[10],q=E[11],u=E[12],h=E[13],f=E[14],R=rs(Q,vt),p=R*br,R&&(y=Math.cos(-R),x=Math.sin(-R),J=X*y+A*x,U=G*y+it*x,I=Q*y+vt*x,A=X*-x+A*y,it=G*-x+it*y,vt=Q*-x+vt*y,q=Wt*-x+q*y,X=J,G=U,Q=I),R=rs(-P,vt),m=R*br,R&&(y=Math.cos(-R),x=Math.sin(-R),J=L*y-A*x,U=F*y-it*x,I=P*y-vt*x,q=B*x+q*y,L=J,F=U,P=I),R=rs(F,L),g=R*br,R&&(y=Math.cos(R),x=Math.sin(R),J=L*y+F*x,U=X*y+G*x,F=F*y-L*x,G=G*y-X*x,L=J,X=U),p&&Math.abs(p)+Math.abs(g)>359.9&&(p=g=0,m=180-m),d=De(Math.sqrt(L*L+F*F+P*P)),_=De(Math.sqrt(G*G+Q*Q)),R=rs(X,G),S=Math.abs(R)>2e-4?R*br:0,M=q?1/(q<0?-q:q):0),n.svg&&(J=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Nf(ui(t,Ee)),J&&t.setAttribute("transform",J))),Math.abs(S)>90&&Math.abs(S)<270&&(s?(d*=-1,S+=g<=0?180:-180,g+=g<=0?180:-180):(_*=-1,S+=S<=0?180:-180)),e=e||n.uncache,n.x=u-((n.xPercent=u&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-u)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-h)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=f+o,n.scaleX=De(d),n.scaleY=De(_),n.rotation=De(g)+a,n.rotationX=De(p)+a,n.rotationY=De(m)+a,n.skewX=S+a,n.skewY=v+a,n.transformPerspective=M+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[bn]=sa(c)),n.xOffset=n.yOffset=0,n.force3D=Sn.force3D,n.renderTransform=n.svg?y_:Pf?Uf:v_,n.uncache=0,n},sa=function(t){return(t=t.split(" "))[0]+" "+t[1]},Mc=function(t,e,n){var i=Ye(e);return De(parseFloat(e)+parseFloat(qi(t,"x",n+"px",i)))+i},v_=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Uf(t,e)},Mr="0deg",oo="0px",Sr=") ",Uf=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,c=n.rotation,u=n.rotationY,h=n.rotationX,f=n.skewX,d=n.skewY,_=n.scaleX,g=n.scaleY,p=n.transformPerspective,m=n.force3D,S=n.target,v=n.zOrigin,M="",D=m==="auto"&&t&&t!==1||m===!0;if(v&&(h!==Mr||u!==Mr)){var T=parseFloat(u)*os,E=Math.sin(T),R=Math.cos(T),y;T=parseFloat(h)*os,y=Math.cos(T),o=Mc(S,o,E*y*-v),a=Mc(S,a,-Math.sin(T)*-v),l=Mc(S,l,R*y*-v+v)}p!==oo&&(M+="perspective("+p+Sr),(i||s)&&(M+="translate("+i+"%, "+s+"%) "),(D||o!==oo||a!==oo||l!==oo)&&(M+=l!==oo||D?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Sr),c!==Mr&&(M+="rotate("+c+Sr),u!==Mr&&(M+="rotateY("+u+Sr),h!==Mr&&(M+="rotateX("+h+Sr),(f!==Mr||d!==Mr)&&(M+="skew("+f+", "+d+Sr),(_!==1||g!==1)&&(M+="scale("+_+", "+g+Sr),S.style[Ee]=M||"translate(0, 0)"},y_=function(t,e){var n=e||this,i=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,c=n.skewX,u=n.skewY,h=n.scaleX,f=n.scaleY,d=n.target,_=n.xOrigin,g=n.yOrigin,p=n.xOffset,m=n.yOffset,S=n.forceCSS,v=parseFloat(o),M=parseFloat(a),D,T,E,R,y;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=os,c*=os,D=Math.cos(l)*h,T=Math.sin(l)*h,E=Math.sin(l-c)*-f,R=Math.cos(l-c)*f,c&&(u*=os,y=Math.tan(c-u),y=Math.sqrt(1+y*y),E*=y,R*=y,u&&(y=Math.tan(u),y=Math.sqrt(1+y*y),D*=y,T*=y)),D=De(D),T=De(T),E=De(E),R=De(R)):(D=h,R=f,T=E=0),(v&&!~(o+"").indexOf("px")||M&&!~(a+"").indexOf("px"))&&(v=qi(d,"x",o,"px"),M=qi(d,"y",a,"px")),(_||g||p||m)&&(v=De(v+_-(_*D+g*E)+p),M=De(M+g-(_*T+g*R)+m)),(i||s)&&(y=d.getBBox(),v=De(v+i/100*y.width),M=De(M+s/100*y.height)),y="matrix("+D+","+T+","+E+","+R+","+v+","+M+")",d.setAttribute("transform",y),S&&(d.style[Ee]=y)},M_=function(t,e,n,i,s){var o=360,a=Ue(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?br:1),c=l-i,u=i+c+"deg",h,f;return a&&(h=s.split("_")[1],h==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),h==="cw"&&c<0?c=(c+o*yf)%o-~~(c/o)*o:h==="ccw"&&c>0&&(c=(c-o*yf)%o-~~(c/o)*o)),t._pt=f=new cn(t._pt,e,n,i,c,r_),f.e=u,f.u="deg",t._props.push(n),f},Tf=function(t,e){for(var n in e)t[n]=e[n];return t},S_=function(t,e,n){var i=Tf({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,u,h,f,d,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Ee]=e,a=lo(n,1),Er(n,Ee),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Ee],o[Ee]=e,a=lo(n,1),o[Ee]=c);for(l in Mi)c=i[l],u=a[l],c!==u&&s.indexOf(l)<0&&(d=Ye(c),_=Ye(u),h=d!==_?qi(n,l,c,_):parseFloat(c),f=parseFloat(u),t._pt=new cn(t._pt,a,l,h,f-h,Sc),t._pt.u=_||0,t._props.push(l));Tf(a,i)};ln("padding,margin,Width,Radius",function(r,t){var e="Top",n="Right",i="Bottom",s="Left",o=(t<3?[e,n,i,s]:[e+s,e+n,i+n,i+s]).map(function(a){return t<2?r+a:"border"+a+r});ra[t>1?"border"+r:r]=function(a,l,c,u,h){var f,d;if(arguments.length<4)return f=o.map(function(_){return yi(a,_,c)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(u+"").split(" "),d={},o.forEach(function(_,g){return d[_]=f[g]=f[g]||f[(g-1)/2|0]}),a.init(l,d,h)}});var Rc={name:"css",register:wc,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,i,s){var o=this._props,a=t.style,l=n.vars.startAt,c,u,h,f,d,_,g,p,m,S,v,M,D,T,E,R;Tc||wc(),this.styles=this.styles||Rf(t),R=this.styles.props,this.tween=n;for(g in e)if(g!=="autoRound"&&(u=e[g],!(vn[g]&&pc(g,e,n,i,t,s)))){if(d=typeof u,_=ra[g],d==="function"&&(u=u.call(n,i,t,s),d=typeof u),d==="string"&&~u.indexOf("random(")&&(u=is(u)),_)_(this,t,g,u,n)&&(E=1);else if(g.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(g)+"").trim(),u+="",xi.lastIndex=0,xi.test(c)||(p=Ye(c),m=Ye(u)),m?p!==m&&(c=qi(t,g,c,m)+m):p&&(u+=p),this.add(a,"setProperty",c,u,i,s,0,0,g),o.push(g),R.push(g,0,a[g]);else if(d!=="undefined"){if(l&&g in l?(c=typeof l[g]=="function"?l[g].call(n,i,t,s):l[g],Ue(c)&&~c.indexOf("random(")&&(c=is(c)),Ye(c+"")||c==="auto"||(c+=Sn.units[g]||Ye(yi(t,g))||""),(c+"").charAt(1)==="="&&(c=yi(t,g))):c=yi(t,g),f=parseFloat(c),S=d==="string"&&u.charAt(1)==="="&&u.substr(0,2),S&&(u=u.substr(2)),h=parseFloat(u),g in ci&&(g==="autoAlpha"&&(f===1&&yi(t,"visibility")==="hidden"&&h&&(f=0),R.push("visibility",0,a.visibility),Xi(this,a,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),g!=="scale"&&g!=="transform"&&(g=ci[g],~g.indexOf(",")&&(g=g.split(",")[0]))),v=g in Mi,v){if(this.styles.save(g),M||(D=t._gsap,D.renderTransform&&!e.parseTransform||lo(t,e.parseTransform),T=e.smoothOrigin!==!1&&D.smooth,M=this._pt=new cn(this._pt,a,Ee,0,1,D.renderTransform,D,0,-1),M.dep=1),g==="scale")this._pt=new cn(this._pt,D,"scaleY",D.scaleY,(S?vr(D.scaleY,S+h):h)-D.scaleY||0,Sc),this._pt.u=0,o.push("scaleY",g),g+="X";else if(g==="transformOrigin"){R.push(bn,0,a[bn]),u=__(u),D.svg?Ec(t,u,0,T,0,this):(m=parseFloat(u.split(" ")[2])||0,m!==D.zOrigin&&Xi(this,D,"zOrigin",D.zOrigin,m),Xi(this,a,g,sa(c),sa(u)));continue}else if(g==="svgOrigin"){Ec(t,u,1,T,0,this);continue}else if(g in Ff){M_(this,D,g,f,S?vr(f,S+u):u);continue}else if(g==="smoothOrigin"){Xi(this,D,"smooth",D.smooth,u);continue}else if(g==="force3D"){D[g]=u;continue}else if(g==="transform"){S_(this,u,t);continue}}else g in a||(g=as(g)||g);if(v||(h||h===0)&&(f||f===0)&&!i_.test(u)&&g in a)p=(c+"").substr((f+"").length),h||(h=0),m=Ye(u)||(g in Sn.units?Sn.units[g]:p),p!==m&&(f=qi(t,g,c,m)),this._pt=new cn(this._pt,v?D:a,g,f,(S?vr(f,S+h):h)-f,!v&&(m==="px"||g==="zIndex")&&e.autoRound!==!1?o_:Sc),this._pt.u=m||0,p!==m&&m!=="%"&&(this._pt.b=c,this._pt.r=s_);else if(g in a)g_.call(this,t,g,c,S?S+u:u);else if(g in t)this.add(t,g,c||t[g],S?S+u:u,i,s);else if(g!=="parseTransform"){jo(g,u);continue}v||(g in a?R.push(g,0,a[g]):R.push(g,1,c||t[g])),o.push(g)}}E&&vc(this)},render:function(t,e){if(e.tween._time||!Ac())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:yi,aliases:ci,getSetter:function(t,e,n){var i=ci[e];return i&&i.indexOf(",")<0&&(e=i),e in Mi&&e!==bn&&(t._gsap.x||yi(t,"x"))?n&&vf===n?e==="scale"?u_:c_:(vf=n||{})&&(e==="scale"?h_:f_):t.style&&!Qo(t.style[e])?a_:~e.indexOf("-")?l_:ia(t,e)},core:{_removeProperty:Er,_getMatrix:Cc}};je.utils.checkPrefix=as;je.core.getStyleSaver=Rf;(function(r,t,e,n){var i=ln(r+","+t+","+e,function(s){Mi[s]=1});ln(t,function(s){Sn.units[s]="deg",Ff[s]=1}),ci[i[13]]=r+","+t,ln(n,function(s){var o=s.split(":");ci[o[1]]=i[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ln("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Sn.units[r]="px"});je.registerPlugin(Rc);var ce=je.registerPlugin(Rc)||je,Tb=ce.core.Tween;var Of=()=>{let r=()=>{requestAnimationFrame(()=>{let t=[];document.querySelectorAll(".client-list_wrapper").forEach(n=>{let i=n.querySelector(".client-list_wrap");if(!i)return;let s=Array.from(i.children),o=i.scrollWidth;if(!o)return;s.forEach(l=>i.appendChild(l.cloneNode(!0)));let a=ce.fromTo(i,{x:0},{x:-o,duration:60,ease:"none",repeat:-1});t.push(a)});let e=document.querySelector(".prx-client-rows_wrap");e&&(e.addEventListener("mouseenter",()=>t.forEach(n=>n.pause())),e.addEventListener("mouseleave",()=>t.forEach(n=>n.resume())))})};document.readyState==="complete"?r():window.addEventListener("load",r,{once:!0})};var Bf=()=>{let r=document.querySelectorAll("[data-contact-popup-toggler]"),t=document.querySelector("[data-contact-popup]");var e=0;if(!r||!t)return;let n=t.querySelector("[data-contact-popup-close]");if(!n)return;let i=t.querySelector(".contact-popup_box");if(!i)return;let s=(o,a)=>{let l=document.createElement("script"),c=document.getElementsByTagName("script")[0];l.async=1,l.onload=l.onreadystatechange=(u,h)=>{(h||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,h||a&&a())},l.src=o,c.parentNode.insertBefore(l,c)};r.forEach(o=>{o.addEventListener("click",a=>{a.preventDefault,e?(t.classList.add("-open"),document.body.classList.add("-popup-open")):s("https://embed.typeform.com/next/embed.js",()=>{e=1,t.classList.add("-open"),document.body.classList.add("-popup-open")})})}),n.addEventListener("click",o=>{o.preventDefault,t.classList.remove("-open"),document.body.classList.remove("-popup-open")}),t.addEventListener("click",o=>{i.contains(o.target)||(t.classList.remove("-open"),document.body.classList.remove("-popup-open"))}),new URL(document.location).searchParams.has("invicible")&&setTimeout(()=>{s("https://embed.typeform.com/next/embed.js",()=>{e=1,setTimeout(()=>{t.classList.add("-open"),document.body.classList.add("-popup-open")},200)})},2e3)};var zf=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||ce.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){ce.to(r,{y:"-100dvh",duration:.75})}},"<")};function kf(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function b_(r,t,e){return t&&kf(r.prototype,t),e&&kf(r,e),r}var Ze,la,w_,Cn,Yi,Zi,cs,Hf,Tr,uo,Gf,Si,Jn,Wf,Xf=function(){return Ze||typeof window<"u"&&(Ze=window.gsap)&&Ze.registerPlugin&&Ze},qf=1,ls=[],Kt=[],$n=[],ho=Date.now,Pc=function(t,e){return e},E_=function(){var t=uo.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,Kt),i.push.apply(i,$n),Kt=n,$n=i,Pc=function(o,a){return e[o](a)}},wi=function(t,e){return~$n.indexOf(t)&&$n[$n.indexOf(t)+1][e]},fo=function(t){return!!~Gf.indexOf(t)},hn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},un=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},oa="scrollLeft",aa="scrollTop",Ic=function(){return Si&&Si.isPressed||Kt.cache++},ca=function(t,e){var n=function i(s){if(s||s===0){qf&&(Cn.history.scrollRestoration="manual");var o=Si&&Si.isPressed;s=i.v=Math.round(s)||(Si&&Si.iOS?1:0),t(s),i.cacheID=Kt.cache,o&&Pc("ss",s)}else(e||Kt.cache!==i.cacheID||Pc("ref"))&&(i.cacheID=Kt.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},tn={s:oa,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:ca(function(r){return arguments.length?Cn.scrollTo(r,Le.sc()):Cn.pageXOffset||Yi[oa]||Zi[oa]||cs[oa]||0})},Le={s:aa,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:tn,sc:ca(function(r){return arguments.length?Cn.scrollTo(tn.sc(),r):Cn.pageYOffset||Yi[aa]||Zi[aa]||cs[aa]||0})},fn=function(t,e){return(e&&e._ctx&&e._ctx.selector||Ze.utils.toArray)(t)[0]||(typeof t=="string"&&Ze.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},bi=function(t,e){var n=e.s,i=e.sc;fo(t)&&(t=Yi.scrollingElement||Zi);var s=Kt.indexOf(t),o=i===Le.sc?1:2;!~s&&(s=Kt.push(t)-1),Kt[s+o]||hn(t,"scroll",Ic);var a=Kt[s+o],l=a||(Kt[s+o]=ca(wi(t,n),!0)||(fo(t)?i:ca(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=Ze.getProperty(t,"scrollBehavior")==="smooth"),l},ua=function(t,e,n){var i=t,s=t,o=ho(),a=o,l=e||50,c=Math.max(500,l*3),u=function(_,g){var p=ho();g||p-o>l?(s=i,i=_,a=o,o=p):n?i+=_:i=s+(_-s)/(p-a)*(o-a)},h=function(){s=i=n?0:i,a=o=0},f=function(_){var g=a,p=s,m=ho();return(_||_===0)&&_!==i&&u(_),o===a||m-a>c?0:(i+(n?p:-p))/((n?m:o)-g)*1e3};return{update:u,reset:h,getVelocity:f}},co=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},Vf=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},Yf=function(){uo=Ze.core.globals().ScrollTrigger,uo&&uo.core&&E_()},Zf=function(t){return Ze=t||Xf(),!la&&Ze&&typeof document<"u"&&document.body&&(Cn=window,Yi=document,Zi=Yi.documentElement,cs=Yi.body,Gf=[Cn,Yi,Zi,cs],w_=Ze.utils.clamp,Wf=Ze.core.context||function(){},Tr="onpointerenter"in cs?"pointer":"mouse",Hf=Ce.isTouch=Cn.matchMedia&&Cn.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Cn||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Jn=Ce.eventTypes=("ontouchstart"in Zi?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Zi?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return qf=0},500),Yf(),la=1),la};tn.op=Le;Kt.cache=0;var Ce=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){la||Zf(Ze)||console.warn("Please gsap.registerPlugin(Observer)"),uo||Yf();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,u=n.preventDefault,h=n.onStop,f=n.onStopDelay,d=n.ignore,_=n.wheelSpeed,g=n.event,p=n.onDragStart,m=n.onDragEnd,S=n.onDrag,v=n.onPress,M=n.onRelease,D=n.onRight,T=n.onLeft,E=n.onUp,R=n.onDown,y=n.onChangeX,x=n.onChangeY,L=n.onChange,F=n.onToggleX,P=n.onToggleY,B=n.onHover,X=n.onHoverEnd,G=n.onMove,J=n.ignoreCheck,U=n.isNormalizer,I=n.onGestureStart,A=n.onGestureEnd,it=n.onWheel,vt=n.onEnable,Wt=n.onDisable,q=n.onClick,Q=n.scrollSpeed,ct=n.capture,tt=n.allowClicks,It=n.lockAxis,Rt=n.onLockAxis;this.target=a=fn(a)||Zi,this.vars=n,d&&(d=Ze.utils.toArray(d)),i=i||1e-9,s=s||0,_=_||1,Q=Q||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(Cn.getComputedStyle(cs).lineHeight)||22);var z,Xt,bt,wt,_t,Ft,Pt,k=this,jt=0,C=0,b=n.passive||!u,Y=bi(a,tn),j=bi(a,Le),et=Y(),nt=j(),mt=~o.indexOf("touch")&&!~o.indexOf("pointer")&&Jn[0]==="pointerdown",lt=fo(a),rt=a.ownerDocument||Yi,Lt=[0,0,0],st=[0,0,0],St=0,Jt=function(){return St=ho()},gt=function(yt,ie){return(k.event=yt)&&d&&~d.indexOf(yt.target)||ie&&mt&&yt.pointerType!=="touch"||J&&J(yt,ie)},xt=function(){k._vx.reset(),k._vy.reset(),Xt.pause(),h&&h(k)},Nt=function(){var yt=k.deltaX=Vf(Lt),ie=k.deltaY=Vf(st),ht=Math.abs(yt)>=i,kt=Math.abs(ie)>=i;L&&(ht||kt)&&L(k,yt,ie,Lt,st),ht&&(D&&k.deltaX>0&&D(k),T&&k.deltaX<0&&T(k),y&&y(k),F&&k.deltaX<0!=jt<0&&F(k),jt=k.deltaX,Lt[0]=Lt[1]=Lt[2]=0),kt&&(R&&k.deltaY>0&&R(k),E&&k.deltaY<0&&E(k),x&&x(k),P&&k.deltaY<0!=C<0&&P(k),C=k.deltaY,st[0]=st[1]=st[2]=0),(wt||bt)&&(G&&G(k),bt&&(S(k),bt=!1),wt=!1),Ft&&!(Ft=!1)&&Rt&&Rt(k),_t&&(it(k),_t=!1),z=0},Gt=function(yt,ie,ht){Lt[ht]+=yt,st[ht]+=ie,k._vx.update(yt),k._vy.update(ie),c?z||(z=requestAnimationFrame(Nt)):Nt()},he=function(yt,ie){It&&!Pt&&(k.axis=Pt=Math.abs(yt)>Math.abs(ie)?"x":"y",Ft=!0),Pt!=="y"&&(Lt[2]+=yt,k._vx.update(yt,!0)),Pt!=="x"&&(st[2]+=ie,k._vy.update(ie,!0)),c?z||(z=requestAnimationFrame(Nt)):Nt()},Ut=function(yt){if(!gt(yt,1)){yt=co(yt,u);var ie=yt.clientX,ht=yt.clientY,kt=ie-k.x,At=ht-k.y,zt=k.isDragging;k.x=ie,k.y=ht,(zt||Math.abs(k.startX-ie)>=s||Math.abs(k.startY-ht)>=s)&&(S&&(bt=!0),zt||(k.isDragging=!0),he(kt,At),zt||p&&p(k))}},N=k.onPress=function(Ct){gt(Ct,1)||Ct&&Ct.button||(k.axis=Pt=null,Xt.pause(),k.isPressed=!0,Ct=co(Ct),jt=C=0,k.startX=k.x=Ct.clientX,k.startY=k.y=Ct.clientY,k._vx.reset(),k._vy.reset(),hn(U?a:rt,Jn[1],Ut,b,!0),k.deltaX=k.deltaY=0,v&&v(k))},$=k.onRelease=function(Ct){if(!gt(Ct,1)){un(U?a:rt,Jn[1],Ut,!0);var yt=!isNaN(k.y-k.startY),ie=k.isDragging,ht=ie&&(Math.abs(k.x-k.startX)>3||Math.abs(k.y-k.startY)>3),kt=co(Ct);!ht&&yt&&(k._vx.reset(),k._vy.reset(),u&&tt&&Ze.delayedCall(.08,function(){if(ho()-St>300&&!Ct.defaultPrevented){if(Ct.target.click)Ct.target.click();else if(rt.createEvent){var At=rt.createEvent("MouseEvents");At.initMouseEvent("click",!0,!0,Cn,1,kt.screenX,kt.screenY,kt.clientX,kt.clientY,!1,!1,!1,!1,0,null),Ct.target.dispatchEvent(At)}}})),k.isDragging=k.isGesturing=k.isPressed=!1,h&&ie&&!U&&Xt.restart(!0),m&&ie&&m(k),M&&M(k,ht)}},K=function(yt){return yt.touches&&yt.touches.length>1&&(k.isGesturing=!0)&&I(yt,k.isDragging)},at=function(){return(k.isGesturing=!1)||A(k)},ut=function(yt){if(!gt(yt)){var ie=Y(),ht=j();Gt((ie-et)*Q,(ht-nt)*Q,1),et=ie,nt=ht,h&&Xt.restart(!0)}},Vt=function(yt){if(!gt(yt)){yt=co(yt,u),it&&(_t=!0);var ie=(yt.deltaMode===1?l:yt.deltaMode===2?Cn.innerHeight:1)*_;Gt(yt.deltaX*ie,yt.deltaY*ie,0),h&&!U&&Xt.restart(!0)}},se=function(yt){if(!gt(yt)){var ie=yt.clientX,ht=yt.clientY,kt=ie-k.x,At=ht-k.y;k.x=ie,k.y=ht,wt=!0,h&&Xt.restart(!0),(kt||At)&&he(kt,At)}},ue=function(yt){k.event=yt,B(k)},pe=function(yt){k.event=yt,X(k)},te=function(yt){return gt(yt)||co(yt,u)&&q(k)};Xt=k._dc=Ze.delayedCall(f||.25,xt).pause(),k.deltaX=k.deltaY=0,k._vx=ua(0,50,!0),k._vy=ua(0,50,!0),k.scrollX=Y,k.scrollY=j,k.isDragging=k.isGesturing=k.isPressed=!1,Wf(this),k.enable=function(Ct){return k.isEnabled||(hn(lt?rt:a,"scroll",Ic),o.indexOf("scroll")>=0&&hn(lt?rt:a,"scroll",ut,b,ct),o.indexOf("wheel")>=0&&hn(a,"wheel",Vt,b,ct),(o.indexOf("touch")>=0&&Hf||o.indexOf("pointer")>=0)&&(hn(a,Jn[0],N,b,ct),hn(rt,Jn[2],$),hn(rt,Jn[3],$),tt&&hn(a,"click",Jt,!0,!0),q&&hn(a,"click",te),I&&hn(rt,"gesturestart",K),A&&hn(rt,"gestureend",at),B&&hn(a,Tr+"enter",ue),X&&hn(a,Tr+"leave",pe),G&&hn(a,Tr+"move",se)),k.isEnabled=!0,Ct&&Ct.type&&N(Ct),vt&&vt(k)),k},k.disable=function(){k.isEnabled&&(ls.filter(function(Ct){return Ct!==k&&fo(Ct.target)}).length||un(lt?rt:a,"scroll",Ic),k.isPressed&&(k._vx.reset(),k._vy.reset(),un(U?a:rt,Jn[1],Ut,!0)),un(lt?rt:a,"scroll",ut,ct),un(a,"wheel",Vt,ct),un(a,Jn[0],N,ct),un(rt,Jn[2],$),un(rt,Jn[3],$),un(a,"click",Jt,!0),un(a,"click",te),un(rt,"gesturestart",K),un(rt,"gestureend",at),un(a,Tr+"enter",ue),un(a,Tr+"leave",pe),un(a,Tr+"move",se),k.isEnabled=k.isPressed=k.isDragging=!1,Wt&&Wt(k))},k.kill=k.revert=function(){k.disable();var Ct=ls.indexOf(k);Ct>=0&&ls.splice(Ct,1),Si===k&&(Si=0)},ls.push(k),U&&fo(a)&&(Si=k),k.enable(g)},b_(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Ce.version="3.12.5";Ce.create=function(r){return new Ce(r)};Ce.register=Zf;Ce.getAll=function(){return ls.slice()};Ce.getById=function(r){return ls.filter(function(t){return t.vars.id===r})[0]};Xf()&&Ze.registerPlugin(Ce);var Mt,fs,ne,Te,Kn,_e,fd,Ta,To,yo,mo,ha,en,Ra,kc,pn,Jf,$f,ds,dd,Lc,pd,dn,Vc,md,gd,Ji,Hc,Yc,ps,Zc,Aa,Gc,Fc,fa=1,nn=Date.now,Nc=nn(),Vn=0,go=0,Kf=function(t,e,n){var i=Pn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},Qf=function(t,e){return e&&(!Pn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},T_=function r(){return go&&requestAnimationFrame(r)},jf=function(){return Ra=1},td=function(){return Ra=0},hi=function(t){return t},_o=function(t){return Math.round(t*1e5)/1e5||0},_d=function(){return typeof window<"u"},xd=function(){return Mt||_d()&&(Mt=window.gsap)&&Mt.registerPlugin&&Mt},Ir=function(t){return!!~fd.indexOf(t)},vd=function(t){return(t==="Height"?Zc:ne["inner"+t])||Kn["client"+t]||_e["client"+t]},yd=function(t){return wi(t,"getBoundingClientRect")||(Ir(t)?function(){return Ea.width=ne.innerWidth,Ea.height=Zc,Ea}:function(){return Ei(t)})},A_=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=wi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?vd(s):t["client"+s])||0}},D_=function(t,e){return!e||~$n.indexOf(t)?yd(t):function(){return Ea}},fi=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=wi(t,n))?o()-yd(t)()[s]:Ir(t)?(Kn[n]||_e[n])-vd(i):t[n]-t["offset"+i])},da=function(t,e){for(var n=0;n<ds.length;n+=3)(!e||~e.indexOf(ds[n+1]))&&t(ds[n],ds[n+1],ds[n+2])},Pn=function(t){return typeof t=="string"},gn=function(t){return typeof t=="function"},xo=function(t){return typeof t=="number"},Ar=function(t){return typeof t=="object"},po=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},Uc=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add(function(){return e(t)}):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},us=Math.abs,Md="left",Sd="top",Jc="right",$c="bottom",Cr="width",Rr="height",Mo="Right",So="Left",bo="Top",wo="Bottom",Fe="padding",zn="margin",gs="Width",Kc="Height",Oe="px",kn=function(t){return ne.getComputedStyle(t)},C_=function(t){var e=kn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},ed=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Ei=function(t,e){var n=e&&kn(t)[kc]!=="matrix(1, 0, 0, 1, 0, 0)"&&Mt.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return n&&n.progress(0).kill(),i},Da=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},bd=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},R_=function(t){return function(e){return Mt.utils.snap(bd(t),e)}},Qc=function(t){var e=Mt.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort(function(i,s){return i-s});return n?function(i,s,o){o===void 0&&(o=.001);var a;if(!s)return e(i);if(s>0){for(i-=o,a=0;a<n.length;a++)if(n[a]>=i)return n[a];return n[a-1]}else for(a=n.length,i+=o;a--;)if(n[a]<=i)return n[a];return n[0]}:function(i,s,o){o===void 0&&(o=.001);var a=e(i);return!s||Math.abs(a-i)<o||a-i<0==s<0?a:e(s<0?i-t:i+t)}},P_=function(t){return function(e,n){return Qc(bd(t))(e,n.direction)}},pa=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},Ge=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},He=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},ma=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},nd={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ga={toggleActions:"play",anticipatePin:0},Ca={top:0,left:0,center:.5,bottom:1,right:1},Ma=function(t,e){if(Pn(t)){var n=t.indexOf("="),i=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(i*=e/100),t=t.substr(0,n-1)),t=i+(t in Ca?Ca[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},_a=function(t,e,n,i,s,o,a,l){var c=s.startColor,u=s.endColor,h=s.fontSize,f=s.indent,d=s.fontWeight,_=Te.createElement("div"),g=Ir(n)||wi(n,"pinType")==="fixed",p=t.indexOf("scroller")!==-1,m=g?_e:n,S=t.indexOf("start")!==-1,v=S?c:u,M="border-color:"+v+";font-size:"+h+";color:"+v+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return M+="position:"+((p||l)&&g?"fixed;":"absolute;"),(p||l||!g)&&(M+=(i===Le?Jc:$c)+":"+(o+parseFloat(f))+"px;"),a&&(M+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=S,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=M,_.innerText=e||e===0?t+"-"+e:t,m.children[0]?m.insertBefore(_,m.children[0]):m.appendChild(_),_._offset=_["offset"+i.op.d2],Sa(_,0,i,S),_},Sa=function(t,e,n,i){var s={display:"block"},o=n[i?"os2":"p2"],a=n[i?"p2":"os2"];t._isFlipped=i,s[n.a+"Percent"]=i?-100:0,s[n.a]=i?"1px":0,s["border"+o+gs]=1,s["border"+a+gs]=0,s[n.p]=e+"px",Mt.set(t,s)},Qt=[],Wc={},Ao,id=function(){return nn()-Vn>34&&(Ao||(Ao=requestAnimationFrame(Ti)))},hs=function(){(!dn||!dn.isPressed||dn.startX>_e.clientWidth)&&(Kt.cache++,dn?Ao||(Ao=requestAnimationFrame(Ti)):Ti(),Vn||Fr("scrollStart"),Vn=nn())},Oc=function(){gd=ne.innerWidth,md=ne.innerHeight},vo=function(){Kt.cache++,!en&&!pd&&!Te.fullscreenElement&&!Te.webkitFullscreenElement&&(!Vc||gd!==ne.innerWidth||Math.abs(ne.innerHeight-md)>ne.innerHeight*.25)&&Ta.restart(!0)},Lr={},I_=[],wd=function r(){return He(Ht,"scrollEnd",r)||Dr(!0)},Fr=function(t){return Lr[t]&&Lr[t].map(function(e){return e()})||I_},Rn=[],Ed=function(t){for(var e=0;e<Rn.length;e+=5)(!t||Rn[e+4]&&Rn[e+4].query===t)&&(Rn[e].style.cssText=Rn[e+1],Rn[e].getBBox&&Rn[e].setAttribute("transform",Rn[e+2]||""),Rn[e+3].uncache=1)},jc=function(t,e){var n;for(pn=0;pn<Qt.length;pn++)n=Qt[pn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Aa=!0,e&&Ed(e),e||Fr("revert")},Td=function(t,e){Kt.cache++,(e||!mn)&&Kt.forEach(function(n){return gn(n)&&n.cacheID++&&(n.rec=0)}),Pn(t)&&(ne.history.scrollRestoration=Yc=t)},mn,Pr=0,rd,L_=function(){if(rd!==Pr){var t=rd=Pr;requestAnimationFrame(function(){return t===Pr&&Dr(!0)})}},Ad=function(){_e.appendChild(ps),Zc=!dn&&ps.offsetHeight||ne.innerHeight,_e.removeChild(ps)},sd=function(t){return To(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},Dr=function(t,e){if(Vn&&!t&&!Aa){Ge(Ht,"scrollEnd",wd);return}Ad(),mn=Ht.isRefreshing=!0,Kt.forEach(function(i){return gn(i)&&++i.cacheID&&(i.rec=i())});var n=Fr("refreshInit");dd&&Ht.sort(),e||jc(),Kt.forEach(function(i){gn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),Qt.slice(0).forEach(function(i){return i.refresh()}),Aa=!1,Qt.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",o=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-o),i.refresh()}}),Gc=1,sd(!0),Qt.forEach(function(i){var s=fi(i.scroller,i._dir),o=i.vars.end==="max"||i._endClamp&&i.end>s,a=i._startClamp&&i.start>=s;(o||a)&&i.setPositions(a?s-1:i.start,o?Math.max(a?s:i.start+1,s):i.end,!0)}),sd(!1),Gc=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),Kt.forEach(function(i){gn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Td(Yc,1),Ta.pause(),Pr++,mn=2,Ti(2),Qt.forEach(function(i){return gn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),mn=Ht.isRefreshing=!1,Fr("refresh")},Xc=0,ba=1,Eo,Ti=function(t){if(t===2||!mn&&!Aa){Ht.isUpdating=!0,Eo&&Eo.update(0);var e=Qt.length,n=nn(),i=n-Nc>=50,s=e&&Qt[0].scroll();if(ba=Xc>s?-1:1,mn||(Xc=s),i&&(Vn&&!Ra&&n-Vn>200&&(Vn=0,Fr("scrollEnd")),mo=Nc,Nc=n),ba<0){for(pn=e;pn-- >0;)Qt[pn]&&Qt[pn].update(0,i);ba=1}else for(pn=0;pn<e;pn++)Qt[pn]&&Qt[pn].update(0,i);Ht.isUpdating=!1}Ao=0},qc=[Md,Sd,$c,Jc,zn+wo,zn+Mo,zn+bo,zn+So,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],wa=qc.concat([Cr,Rr,"boxSizing","max"+gs,"max"+Kc,"position",zn,Fe,Fe+bo,Fe+Mo,Fe+wo,Fe+So]),F_=function(t,e,n){ms(n);var i=t._gsap;if(i.spacerIsNative)ms(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},Bc=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=qc.length,o=e.style,a=t.style,l;s--;)l=qc[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[$c]=a[Jc]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[Cr]=Da(t,tn)+Oe,o[Rr]=Da(t,Le)+Oe,o[Fe]=a[zn]=a[Sd]=a[Md]="0",ms(i),a[Cr]=a["max"+gs]=n[Cr],a[Rr]=a["max"+Kc]=n[Rr],a[Fe]=n[Fe],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},N_=/([A-Z])/g,ms=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||Mt.core.getCache(t.t)).uncache=1;i<n;i+=2)o=t[i+1],s=t[i],o?e[s]=o:e[s]&&e.removeProperty(s.replace(N_,"-$1").toLowerCase())}},xa=function(t){for(var e=wa.length,n=t.style,i=[],s=0;s<e;s++)i.push(wa[s],n[wa[s]]);return i.t=t,i},U_=function(t,e,n){for(var i=[],s=t.length,o=n?8:0,a;o<s;o+=2)a=t[o],i.push(a,a in e?e[a]:t[o+1]);return i.t=t.t,i},Ea={left:0,top:0},od=function(t,e,n,i,s,o,a,l,c,u,h,f,d,_){gn(t)&&(t=t(l)),Pn(t)&&t.substr(0,3)==="max"&&(t=f+(t.charAt(4)==="="?Ma("0"+t.substr(3),n):0));var g=d?d.time():0,p,m,S;if(d&&d.seek(0),isNaN(t)||(t=+t),xo(t))d&&(t=Mt.utils.mapRange(d.scrollTrigger.start,d.scrollTrigger.end,0,f,t)),a&&Sa(a,n,i,!0);else{gn(e)&&(e=e(l));var v=(t||"0").split(" "),M,D,T,E;S=fn(e,l)||_e,M=Ei(S)||{},(!M||!M.left&&!M.top)&&kn(S).display==="none"&&(E=S.style.display,S.style.display="block",M=Ei(S),E?S.style.display=E:S.style.removeProperty("display")),D=Ma(v[0],M[i.d]),T=Ma(v[1]||"0",n),t=M[i.p]-c[i.p]-u+D+s-T,a&&Sa(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var R=t+n,y=o._isStart;p="scroll"+i.d2,Sa(o,R,i,y&&R>20||!y&&(h?Math.max(_e[p],Kn[p]):o.parentNode[p])<=R+1),h&&(c=Ei(a),h&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+Oe))}return d&&S&&(p=Ei(S),d.seek(f),m=Ei(S),d._caScrollDist=p[i.p]-m[i.p],t=t/d._caScrollDist*f),d&&d.seek(g),d?t:Math.round(t)},O_=/(webkit|moz|length|cssText|inset)/i,ad=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===_e){t._stOrig=s.cssText,a=kn(t);for(o in a)!+o&&!O_.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=n,s.left=i}else s.cssText=t._stOrig;Mt.core.getCache(t).uncache=1,e.appendChild(t)}},Dd=function(t,e,n){var i=e,s=i;return function(o){var a=Math.round(t());return a!==i&&a!==s&&Math.abs(a-i)>3&&Math.abs(a-s)>3&&(o=a,n&&n()),s=i,i=o,o}},va=function(t,e,n){var i={};i[e.p]="+="+n,Mt.set(t,i)},ld=function(t,e){var n=bi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,u,h){var f=o.tween,d=l.onComplete,_={};c=c||n();var g=Dd(n,c,function(){f.kill(),o.tween=0});return h=u&&h||0,u=u||a-c,f&&f.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return g(c+u*f.ratio+h*f.ratio*f.ratio)},l.onUpdate=function(){Kt.cache++,o.tween&&Ti()},l.onComplete=function(){o.tween=0,d&&d.call(f)},f=o.tween=Mt.to(t,l),f};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},Ge(t,"wheel",n.wheelHandler),Ht.isTouch&&Ge(t,"touchmove",n.wheelHandler),s},Ht=function(){function r(e,n){fs||r.register(Mt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Hc(this),this.init(e,n)}var t=r.prototype;return t.init=function(n,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!go){this.update=this.refresh=this.kill=hi;return}n=ed(Pn(n)||xo(n)||n.nodeType?{trigger:n}:n,ga);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,u=s.onRefresh,h=s.scrub,f=s.trigger,d=s.pin,_=s.pinSpacing,g=s.invalidateOnRefresh,p=s.anticipatePin,m=s.onScrubComplete,S=s.onSnapComplete,v=s.once,M=s.snap,D=s.pinReparent,T=s.pinSpacer,E=s.containerAnimation,R=s.fastScrollEnd,y=s.preventOverlaps,x=n.horizontal||n.containerAnimation&&n.horizontal!==!1?tn:Le,L=!h&&h!==0,F=fn(n.scroller||ne),P=Mt.core.getCache(F),B=Ir(F),X=("pinType"in n?n.pinType:wi(F,"pinType")||B&&"fixed")==="fixed",G=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],J=L&&n.toggleActions.split(" "),U="markers"in n?n.markers:ga.markers,I=B?0:parseFloat(kn(F)["border"+x.p2+gs])||0,A=this,it=n.onRefreshInit&&function(){return n.onRefreshInit(A)},vt=A_(F,B,x),Wt=D_(F,B),q=0,Q=0,ct=0,tt=bi(F,x),It,Rt,z,Xt,bt,wt,_t,Ft,Pt,k,jt,C,b,Y,j,et,nt,mt,lt,rt,Lt,st,St,Jt,gt,xt,Nt,Gt,he,Ut,N,$,K,at,ut,Vt,se,ue,pe;if(A._startClamp=A._endClamp=!1,A._dir=x,p*=45,A.scroller=F,A.scroll=E?E.time.bind(E):tt,Xt=tt(),A.vars=n,i=i||n.animation,"refreshPriority"in n&&(dd=1,n.refreshPriority===-9999&&(Eo=A)),P.tweenScroll=P.tweenScroll||{top:ld(F,Le),left:ld(F,tn)},A.tweenTo=It=P.tweenScroll[x.p],A.scrubDuration=function(ht){K=xo(ht)&&ht,K?$?$.duration(ht):$=Mt.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:K,paused:!0,onComplete:function(){return m&&m(A)}}):($&&$.progress(1).kill(),$=0)},i&&(i.vars.lazy=!1,i._initted&&!A.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),A.animation=i.pause(),i.scrollTrigger=A,A.scrubDuration(h),Ut=0,l||(l=i.vars.id)),M&&((!Ar(M)||M.push)&&(M={snapTo:M}),"scrollBehavior"in _e.style&&Mt.set(B?[_e,Kn]:F,{scrollBehavior:"auto"}),Kt.forEach(function(ht){return gn(ht)&&ht.target===(B?Te.scrollingElement||Kn:F)&&(ht.smooth=!1)}),z=gn(M.snapTo)?M.snapTo:M.snapTo==="labels"?R_(i):M.snapTo==="labelsDirectional"?P_(i):M.directional!==!1?function(ht,kt){return Qc(M.snapTo)(ht,nn()-Q<500?0:kt.direction)}:Mt.utils.snap(M.snapTo),at=M.duration||{min:.1,max:2},at=Ar(at)?yo(at.min,at.max):yo(at,at),ut=Mt.delayedCall(M.delay||K/2||.1,function(){var ht=tt(),kt=nn()-Q<500,At=It.tween;if((kt||Math.abs(A.getVelocity())<10)&&!At&&!Ra&&q!==ht){var zt=(ht-wt)/Y,be=i&&!L?i.totalProgress():zt,$t=kt?0:(be-N)/(nn()-mo)*1e3||0,ve=Mt.utils.clamp(-zt,1-zt,us($t/2)*$t/.185),ke=zt+(M.inertia===!1?0:ve),ye,me,w=M,O=w.onStart,V=w.onInterrupt,H=w.onComplete;if(ye=z(ke,A),xo(ye)||(ye=ke),me=Math.round(wt+ye*Y),ht<=_t&&ht>=wt&&me!==ht){if(At&&!At._initted&&At.data<=us(me-ht))return;M.inertia===!1&&(ve=ye-zt),It(me,{duration:at(us(Math.max(us(ke-be),us(ye-be))*.185/$t/.05||0)),ease:M.ease||"power3",data:us(me-ht),onInterrupt:function(){return ut.restart(!0)&&V&&V(A)},onComplete:function(){A.update(),q=tt(),i&&($?$.resetTo("totalProgress",ye,i._tTime/i._tDur):i.progress(ye)),Ut=N=i&&!L?i.totalProgress():A.progress,S&&S(A),H&&H(A)}},ht,ve*Y,me-ht-ve*Y),O&&O(A,It.tween)}}else A.isActive&&q!==ht&&ut.restart(!0)}).pause()),l&&(Wc[l]=A),f=A.trigger=fn(f||d!==!0&&d),pe=f&&f._gsap&&f._gsap.stRevert,pe&&(pe=pe(A)),d=d===!0?f:fn(d),Pn(a)&&(a={targets:f,className:a}),d&&(_===!1||_===zn||(_=!_&&d.parentNode&&d.parentNode.style&&kn(d.parentNode).display==="flex"?!1:Fe),A.pin=d,Rt=Mt.core.getCache(d),Rt.spacer?j=Rt.pinState:(T&&(T=fn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),Rt.spacerIsNative=!!T,T&&(Rt.spacerState=xa(T))),Rt.spacer=mt=T||Te.createElement("div"),mt.classList.add("pin-spacer"),l&&mt.classList.add("pin-spacer-"+l),Rt.pinState=j=xa(d)),n.force3D!==!1&&Mt.set(d,{force3D:!0}),A.spacer=mt=Rt.spacer,he=kn(d),Jt=he[_+x.os2],rt=Mt.getProperty(d),Lt=Mt.quickSetter(d,x.a,Oe),Bc(d,mt,he),nt=xa(d)),U){C=Ar(U)?ed(U,nd):nd,k=_a("scroller-start",l,F,x,C,0),jt=_a("scroller-end",l,F,x,C,0,k),lt=k["offset"+x.op.d2];var te=fn(wi(F,"content")||F);Ft=this.markerStart=_a("start",l,te,x,C,lt,0,E),Pt=this.markerEnd=_a("end",l,te,x,C,lt,0,E),E&&(ue=Mt.quickSetter([Ft,Pt],x.a,Oe)),!X&&!($n.length&&wi(F,"fixedMarkers")===!0)&&(C_(B?_e:F),Mt.set([k,jt],{force3D:!0}),xt=Mt.quickSetter(k,x.a,Oe),Gt=Mt.quickSetter(jt,x.a,Oe))}if(E){var Ct=E.vars.onUpdate,yt=E.vars.onUpdateParams;E.eventCallback("onUpdate",function(){A.update(0,0,1),Ct&&Ct.apply(E,yt||[])})}if(A.previous=function(){return Qt[Qt.indexOf(A)-1]},A.next=function(){return Qt[Qt.indexOf(A)+1]},A.revert=function(ht,kt){if(!kt)return A.kill(!0);var At=ht!==!1||!A.enabled,zt=en;At!==A.isReverted&&(At&&(Vt=Math.max(tt(),A.scroll.rec||0),ct=A.progress,se=i&&i.progress()),Ft&&[Ft,Pt,k,jt].forEach(function(be){return be.style.display=At?"none":"block"}),At&&(en=A,A.update(At)),d&&(!D||!A.isActive)&&(At?F_(d,mt,j):Bc(d,mt,kn(d),gt)),At||A.update(At),en=zt,A.isReverted=At)},A.refresh=function(ht,kt,At,zt){if(!((en||!A.enabled)&&!kt)){if(d&&ht&&Vn){Ge(r,"scrollEnd",wd);return}!mn&&it&&it(A),en=A,It.tween&&!At&&(It.tween.kill(),It.tween=0),$&&$.pause(),g&&i&&i.revert({kill:!1}).invalidate(),A.isReverted||A.revert(!0,!0),A._subPinOffset=!1;var be=vt(),$t=Wt(),ve=E?E.duration():fi(F,x),ke=Y<=.01,ye=0,me=zt||0,w=Ar(At)?At.end:n.end,O=n.endTrigger||f,V=Ar(At)?At.start:n.start||(n.start===0||!f?0:d?"0 0":"0 100%"),H=A.pinnedContainer=n.pinnedContainer&&fn(n.pinnedContainer,A),W=f&&Math.max(0,Qt.indexOf(A))||0,ot=W,ft,pt,Dt,Bt,Tt,Et,ae,Ie,Je,an,qt,Ot,si;for(U&&Ar(At)&&(Ot=Mt.getProperty(k,x.p),si=Mt.getProperty(jt,x.p));ot--;)Et=Qt[ot],Et.end||Et.refresh(0,1)||(en=A),ae=Et.pin,ae&&(ae===f||ae===d||ae===H)&&!Et.isReverted&&(an||(an=[]),an.unshift(Et),Et.revert(!0,!0)),Et!==Qt[ot]&&(W--,ot--);for(gn(V)&&(V=V(A)),V=Kf(V,"start",A),wt=od(V,f,be,x,tt(),Ft,k,A,$t,I,X,ve,E,A._startClamp&&"_startClamp")||(d?-.001:0),gn(w)&&(w=w(A)),Pn(w)&&!w.indexOf("+=")&&(~w.indexOf(" ")?w=(Pn(V)?V.split(" ")[0]:"")+w:(ye=Ma(w.substr(2),be),w=Pn(V)?V:(E?Mt.utils.mapRange(0,E.duration(),E.scrollTrigger.start,E.scrollTrigger.end,wt):wt)+ye,O=f)),w=Kf(w,"end",A),_t=Math.max(wt,od(w||(O?"100% 0":ve),O,be,x,tt()+ye,Pt,jt,A,$t,I,X,ve,E,A._endClamp&&"_endClamp"))||-.001,ye=0,ot=W;ot--;)Et=Qt[ot],ae=Et.pin,ae&&Et.start-Et._pinPush<=wt&&!E&&Et.end>0&&(ft=Et.end-(A._startClamp?Math.max(0,Et.start):Et.start),(ae===f&&Et.start-Et._pinPush<wt||ae===H)&&isNaN(V)&&(ye+=ft*(1-Et.progress)),ae===d&&(me+=ft));if(wt+=ye,_t+=ye,A._startClamp&&(A._startClamp+=ye),A._endClamp&&!mn&&(A._endClamp=_t||-.001,_t=Math.min(_t,fi(F,x))),Y=_t-wt||(wt-=.01)&&.001,ke&&(ct=Mt.utils.clamp(0,1,Mt.utils.normalize(wt,_t,Vt))),A._pinPush=me,Ft&&ye&&(ft={},ft[x.a]="+="+ye,H&&(ft[x.p]="-="+tt()),Mt.set([Ft,Pt],ft)),d&&!(Gc&&A.end>=fi(F,x)))ft=kn(d),Bt=x===Le,Dt=tt(),st=parseFloat(rt(x.a))+me,!ve&&_t>1&&(qt=(B?Te.scrollingElement||Kn:F).style,qt={style:qt,value:qt["overflow"+x.a.toUpperCase()]},B&&kn(_e)["overflow"+x.a.toUpperCase()]!=="scroll"&&(qt.style["overflow"+x.a.toUpperCase()]="scroll")),Bc(d,mt,ft),nt=xa(d),pt=Ei(d,!0),Ie=X&&bi(F,Bt?tn:Le)(),_?(gt=[_+x.os2,Y+me+Oe],gt.t=mt,ot=_===Fe?Da(d,x)+Y+me:0,ot&&(gt.push(x.d,ot+Oe),mt.style.flexBasis!=="auto"&&(mt.style.flexBasis=ot+Oe)),ms(gt),H&&Qt.forEach(function(le){le.pin===H&&le.vars.pinSpacing!==!1&&(le._subPinOffset=!0)}),X&&tt(Vt)):(ot=Da(d,x),ot&&mt.style.flexBasis!=="auto"&&(mt.style.flexBasis=ot+Oe)),X&&(Tt={top:pt.top+(Bt?Dt-wt:Ie)+Oe,left:pt.left+(Bt?Ie:Dt-wt)+Oe,boxSizing:"border-box",position:"fixed"},Tt[Cr]=Tt["max"+gs]=Math.ceil(pt.width)+Oe,Tt[Rr]=Tt["max"+Kc]=Math.ceil(pt.height)+Oe,Tt[zn]=Tt[zn+bo]=Tt[zn+Mo]=Tt[zn+wo]=Tt[zn+So]="0",Tt[Fe]=ft[Fe],Tt[Fe+bo]=ft[Fe+bo],Tt[Fe+Mo]=ft[Fe+Mo],Tt[Fe+wo]=ft[Fe+wo],Tt[Fe+So]=ft[Fe+So],et=U_(j,Tt,D),mn&&tt(0)),i?(Je=i._initted,Lc(1),i.render(i.duration(),!0,!0),St=rt(x.a)-st+Y+me,Nt=Math.abs(Y-St)>1,X&&Nt&&et.splice(et.length-2,2),i.render(0,!0,!0),Je||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),Lc(0)):St=Y,qt&&(qt.value?qt.style["overflow"+x.a.toUpperCase()]=qt.value:qt.style.removeProperty("overflow-"+x.a));else if(f&&tt()&&!E)for(pt=f.parentNode;pt&&pt!==_e;)pt._pinOffset&&(wt-=pt._pinOffset,_t-=pt._pinOffset),pt=pt.parentNode;an&&an.forEach(function(le){return le.revert(!1,!0)}),A.start=wt,A.end=_t,Xt=bt=mn?Vt:tt(),!E&&!mn&&(Xt<Vt&&tt(Vt),A.scroll.rec=0),A.revert(!1,!0),Q=nn(),ut&&(q=-1,ut.restart(!0)),en=0,i&&L&&(i._initted||se)&&i.progress()!==se&&i.progress(se||0,!0).render(i.time(),!0,!0),(ke||ct!==A.progress||E||g)&&(i&&!L&&i.totalProgress(E&&wt<-.001&&!ct?Mt.utils.normalize(wt,_t,0):ct,!0),A.progress=ke||(Xt-wt)/Y===ct?0:ct),d&&_&&(mt._pinOffset=Math.round(A.progress*St)),$&&$.invalidate(),isNaN(Ot)||(Ot-=Mt.getProperty(k,x.p),si-=Mt.getProperty(jt,x.p),va(k,x,Ot),va(Ft,x,Ot-(zt||0)),va(jt,x,si),va(Pt,x,si-(zt||0))),ke&&!mn&&A.update(),u&&!mn&&!b&&(b=!0,u(A),b=!1)}},A.getVelocity=function(){return(tt()-bt)/(nn()-mo)*1e3||0},A.endAnimation=function(){po(A.callbackAnimation),i&&($?$.progress(1):i.paused()?L||po(i,A.direction<0,1):po(i,i.reversed()))},A.labelToScroll=function(ht){return i&&i.labels&&(wt||A.refresh()||wt)+i.labels[ht]/i.duration()*Y||0},A.getTrailing=function(ht){var kt=Qt.indexOf(A),At=A.direction>0?Qt.slice(0,kt).reverse():Qt.slice(kt+1);return(Pn(ht)?At.filter(function(zt){return zt.vars.preventOverlaps===ht}):At).filter(function(zt){return A.direction>0?zt.end<=wt:zt.start>=_t})},A.update=function(ht,kt,At){if(!(E&&!At&&!ht)){var zt=mn===!0?Vt:A.scroll(),be=ht?0:(zt-wt)/Y,$t=be<0?0:be>1?1:be||0,ve=A.progress,ke,ye,me,w,O,V,H,W;if(kt&&(bt=Xt,Xt=E?tt():zt,M&&(N=Ut,Ut=i&&!L?i.totalProgress():$t)),p&&d&&!en&&!fa&&Vn&&(!$t&&wt<zt+(zt-bt)/(nn()-mo)*p?$t=1e-4:$t===1&&_t>zt+(zt-bt)/(nn()-mo)*p&&($t=.9999)),$t!==ve&&A.enabled){if(ke=A.isActive=!!$t&&$t<1,ye=!!ve&&ve<1,V=ke!==ye,O=V||!!$t!=!!ve,A.direction=$t>ve?1:-1,A.progress=$t,O&&!en&&(me=$t&&!ve?0:$t===1?1:ve===1?2:3,L&&(w=!V&&J[me+1]!=="none"&&J[me+1]||J[me],W=i&&(w==="complete"||w==="reset"||w in i))),y&&(V||W)&&(W||h||!i)&&(gn(y)?y(A):A.getTrailing(y).forEach(function(Dt){return Dt.endAnimation()})),L||($&&!en&&!fa?($._dp._time-$._start!==$._time&&$.render($._dp._time-$._start),$.resetTo?$.resetTo("totalProgress",$t,i._tTime/i._tDur):($.vars.totalProgress=$t,$.invalidate().restart())):i&&i.totalProgress($t,!!(en&&(Q||ht)))),d){if(ht&&_&&(mt.style[_+x.os2]=Jt),!X)Lt(_o(st+St*$t));else if(O){if(H=!ht&&$t>ve&&_t+1>zt&&zt+1>=fi(F,x),D)if(!ht&&(ke||H)){var ot=Ei(d,!0),ft=zt-wt;ad(d,_e,ot.top+(x===Le?ft:0)+Oe,ot.left+(x===Le?0:ft)+Oe)}else ad(d,mt);ms(ke||H?et:nt),Nt&&$t<1&&ke||Lt(st+($t===1&&!H?St:0))}}M&&!It.tween&&!en&&!fa&&ut.restart(!0),a&&(V||v&&$t&&($t<1||!Fc))&&To(a.targets).forEach(function(Dt){return Dt.classList[ke||v?"add":"remove"](a.className)}),o&&!L&&!ht&&o(A),O&&!en?(L&&(W&&(w==="complete"?i.pause().totalProgress(1):w==="reset"?i.restart(!0).pause():w==="restart"?i.restart(!0):i[w]()),o&&o(A)),(V||!Fc)&&(c&&V&&Uc(A,c),G[me]&&Uc(A,G[me]),v&&($t===1?A.kill(!1,1):G[me]=0),V||(me=$t===1?1:3,G[me]&&Uc(A,G[me]))),R&&!ke&&Math.abs(A.getVelocity())>(xo(R)?R:2500)&&(po(A.callbackAnimation),$?$.progress(1):po(i,w==="reverse"?1:!$t,1))):L&&o&&!en&&o(A)}if(Gt){var pt=E?zt/E.duration()*(E._caScrollDist||0):zt;xt(pt+(k._isFlipped?1:0)),Gt(pt)}ue&&ue(-zt/E.duration()*(E._caScrollDist||0))}},A.enable=function(ht,kt){A.enabled||(A.enabled=!0,Ge(F,"resize",vo),B||Ge(F,"scroll",hs),it&&Ge(r,"refreshInit",it),ht!==!1&&(A.progress=ct=0,Xt=bt=q=tt()),kt!==!1&&A.refresh())},A.getTween=function(ht){return ht&&It?It.tween:$},A.setPositions=function(ht,kt,At,zt){if(E){var be=E.scrollTrigger,$t=E.duration(),ve=be.end-be.start;ht=be.start+ve*ht/$t,kt=be.start+ve*kt/$t}A.refresh(!1,!1,{start:Qf(ht,At&&!!A._startClamp),end:Qf(kt,At&&!!A._endClamp)},zt),A.update()},A.adjustPinSpacing=function(ht){if(gt&&ht){var kt=gt.indexOf(x.d)+1;gt[kt]=parseFloat(gt[kt])+ht+Oe,gt[1]=parseFloat(gt[1])+ht+Oe,ms(gt)}},A.disable=function(ht,kt){if(A.enabled&&(ht!==!1&&A.revert(!0,!0),A.enabled=A.isActive=!1,kt||$&&$.pause(),Vt=0,Rt&&(Rt.uncache=1),it&&He(r,"refreshInit",it),ut&&(ut.pause(),It.tween&&It.tween.kill()&&(It.tween=0)),!B)){for(var At=Qt.length;At--;)if(Qt[At].scroller===F&&Qt[At]!==A)return;He(F,"resize",vo),B||He(F,"scroll",hs)}},A.kill=function(ht,kt){A.disable(ht,kt),$&&!kt&&$.kill(),l&&delete Wc[l];var At=Qt.indexOf(A);At>=0&&Qt.splice(At,1),At===pn&&ba>0&&pn--,At=0,Qt.forEach(function(zt){return zt.scroller===A.scroller&&(At=1)}),At||mn||(A.scroll.rec=0),i&&(i.scrollTrigger=null,ht&&i.revert({kill:!1}),kt||i.kill()),Ft&&[Ft,Pt,k,jt].forEach(function(zt){return zt.parentNode&&zt.parentNode.removeChild(zt)}),Eo===A&&(Eo=0),d&&(Rt&&(Rt.uncache=1),At=0,Qt.forEach(function(zt){return zt.pin===d&&At++}),At||(Rt.spacer=0)),n.onKill&&n.onKill(A)},Qt.push(A),A.enable(!1,!1),pe&&pe(A),i&&i.add&&!Y){var ie=A.update;A.update=function(){A.update=ie,wt||_t||A.refresh()},Mt.delayedCall(.01,A.update),Y=.01,wt=_t=0}else A.refresh();d&&L_()},r.register=function(n){return fs||(Mt=n||xd(),_d()&&window.document&&r.enable(),fs=go),fs},r.defaults=function(n){if(n)for(var i in n)ga[i]=n[i];return ga},r.disable=function(n,i){go=0,Qt.forEach(function(o){return o[i?"kill":"disable"](n)}),He(ne,"wheel",hs),He(Te,"scroll",hs),clearInterval(ha),He(Te,"touchcancel",hi),He(_e,"touchstart",hi),pa(He,Te,"pointerdown,touchstart,mousedown",jf),pa(He,Te,"pointerup,touchend,mouseup",td),Ta.kill(),da(He);for(var s=0;s<Kt.length;s+=3)ma(He,Kt[s],Kt[s+1]),ma(He,Kt[s],Kt[s+2])},r.enable=function(){if(ne=window,Te=document,Kn=Te.documentElement,_e=Te.body,Mt&&(To=Mt.utils.toArray,yo=Mt.utils.clamp,Hc=Mt.core.context||hi,Lc=Mt.core.suppressOverwrites||hi,Yc=ne.history.scrollRestoration||"auto",Xc=ne.pageYOffset,Mt.core.globals("ScrollTrigger",r),_e)){go=1,ps=document.createElement("div"),ps.style.height="100vh",ps.style.position="absolute",Ad(),T_(),Ce.register(Mt),r.isTouch=Ce.isTouch,Ji=Ce.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Vc=Ce.isTouch===1,Ge(ne,"wheel",hs),fd=[ne,Te,Kn,_e],Mt.matchMedia?(r.matchMedia=function(l){var c=Mt.matchMedia(),u;for(u in l)c.add(u,l[u]);return c},Mt.addEventListener("matchMediaInit",function(){return jc()}),Mt.addEventListener("matchMediaRevert",function(){return Ed()}),Mt.addEventListener("matchMedia",function(){Dr(0,1),Fr("matchMedia")}),Mt.matchMedia("(orientation: portrait)",function(){return Oc(),Oc})):console.warn("Requires GSAP 3.11.0 or later"),Oc(),Ge(Te,"scroll",hs);var n=_e.style,i=n.borderTopStyle,s=Mt.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=Ei(_e),Le.m=Math.round(o.top+Le.sc())||0,tn.m=Math.round(o.left+tn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),ha=setInterval(id,250),Mt.delayedCall(.5,function(){return fa=0}),Ge(Te,"touchcancel",hi),Ge(_e,"touchstart",hi),pa(Ge,Te,"pointerdown,touchstart,mousedown",jf),pa(Ge,Te,"pointerup,touchend,mouseup",td),kc=Mt.utils.checkPrefix("transform"),wa.push(kc),fs=nn(),Ta=Mt.delayedCall(.2,Dr).pause(),ds=[Te,"visibilitychange",function(){var l=ne.innerWidth,c=ne.innerHeight;Te.hidden?(Jf=l,$f=c):(Jf!==l||$f!==c)&&vo()},Te,"DOMContentLoaded",Dr,ne,"load",Dr,ne,"resize",vo],da(Ge),Qt.forEach(function(l){return l.enable(0,1)}),a=0;a<Kt.length;a+=3)ma(He,Kt[a],Kt[a+1]),ma(He,Kt[a],Kt[a+2])}},r.config=function(n){"limitCallbacks"in n&&(Fc=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(ha)||(ha=i)&&setInterval(id,i),"ignoreMobileResize"in n&&(Vc=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(da(He)||da(Ge,n.autoRefreshEvents||"none"),pd=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=fn(n),o=Kt.indexOf(s),a=Ir(s);~o&&Kt.splice(o,a?6:2),i&&(a?$n.unshift(ne,i,_e,i,Kn,i):$n.unshift(s,i))},r.clearMatchMedia=function(n){Qt.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(Pn(n)?fn(n):n).getBoundingClientRect(),a=o[s?Cr:Rr]*i||0;return s?o.right-a>0&&o.left+a<ne.innerWidth:o.bottom-a>0&&o.top+a<ne.innerHeight},r.positionInViewport=function(n,i,s){Pn(n)&&(n=fn(n));var o=n.getBoundingClientRect(),a=o[s?Cr:Rr],l=i==null?a/2:i in Ca?Ca[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/ne.innerWidth:(o.top+l)/ne.innerHeight},r.killAll=function(n){if(Qt.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=Lr.killAll||[];Lr={},i.forEach(function(s){return s()})}},r}();Ht.version="3.12.5";Ht.saveStyles=function(r){return r?To(r).forEach(function(t){if(t&&t.style){var e=Rn.indexOf(t);e>=0&&Rn.splice(e,5),Rn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Mt.core.getCache(t),Hc())}}):Rn};Ht.revert=function(r,t){return jc(!r,t)};Ht.create=function(r,t){return new Ht(r,t)};Ht.refresh=function(r){return r?vo():(fs||Ht.register())&&Dr(!0)};Ht.update=function(r){return++Kt.cache&&Ti(r===!0?2:0)};Ht.clearScrollMemory=Td;Ht.maxScroll=function(r,t){return fi(r,t?tn:Le)};Ht.getScrollFunc=function(r,t){return bi(fn(r),t?tn:Le)};Ht.getById=function(r){return Wc[r]};Ht.getAll=function(){return Qt.filter(function(r){return r.vars.id!=="ScrollSmoother"})};Ht.isScrolling=function(){return!!Vn};Ht.snapDirectional=Qc;Ht.addEventListener=function(r,t){var e=Lr[r]||(Lr[r]=[]);~e.indexOf(t)||e.push(t)};Ht.removeEventListener=function(r,t){var e=Lr[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};Ht.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,u){var h=[],f=[],d=Mt.delayedCall(i,function(){u(h,f),h=[],f=[]}).pause();return function(_){h.length||d.restart(!0),h.push(_.trigger),f.push(_),s<=h.length&&d.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&gn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return gn(s)&&(s=s(),Ge(Ht,"refresh",function(){return s=t.batchMax()})),To(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(Ht.create(c))}),e};var cd=function(t,e,n,i){return e>i?t(i):e<0&&t(0),n>i?(i-e)/(n-e):n<0?e/(e-n):1},zc=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Ce.isTouch?" pinch-zoom":""):"none",t===Kn&&r(_e,e)},ya={auto:1,scroll:1},B_=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||Mt.core.getCache(s),a=nn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==_e&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(ya[(l=kn(s)).overflowY]||ya[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!Ir(s)&&(ya[(l=kn(s)).overflowY]||ya[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},Cd=function(t,e,n,i){return Ce.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&B_,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&Ge(Te,Ce.eventTypes[0],hd,!1,!0)},onDisable:function(){return He(Te,Ce.eventTypes[0],hd,!0)}})},z_=/(input|label|select|textarea)/i,ud,hd=function(t){var e=z_.test(t.target.tagName);(e||ud)&&(t._gsapAllow=!0,ud=e)},k_=function(t){Ar(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e=t,n=e.normalizeScrollX,i=e.momentum,s=e.allowNestedScroll,o=e.onRelease,a,l,c=fn(t.target)||Kn,u=Mt.core.globals().ScrollSmoother,h=u&&u.get(),f=Ji&&(t.content&&fn(t.content)||h&&t.content!==!1&&!h.smooth()&&h.content()),d=bi(c,Le),_=bi(c,tn),g=1,p=(Ce.isTouch&&ne.visualViewport?ne.visualViewport.scale*ne.visualViewport.width:ne.outerWidth)/ne.innerWidth,m=0,S=gn(i)?function(){return i(a)}:function(){return i||2.8},v,M,D=Cd(c,t.type,!0,s),T=function(){return M=!1},E=hi,R=hi,y=function(){l=fi(c,Le),R=yo(Ji?1:0,l),n&&(E=yo(0,fi(c,tn))),v=Pr},x=function(){f._gsap.y=_o(parseFloat(f._gsap.y)+d.offset)+"px",f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(f._gsap.y)+", 0, 1)",d.offset=d.cacheID=0},L=function(){if(M){requestAnimationFrame(T);var U=_o(a.deltaY/2),I=R(d.v-U);if(f&&I!==d.v+d.offset){d.offset=I-d.v;var A=_o((parseFloat(f&&f._gsap.y)||0)-d.offset);f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+A+", 0, 1)",f._gsap.y=A+"px",d.cacheID=Kt.cache,Ti()}return!0}d.offset&&x(),M=!0},F,P,B,X,G=function(){y(),F.isActive()&&F.vars.scrollY>l&&(d()>l?F.progress(1)&&d(l):F.resetTo("scrollY",l))};return f&&Mt.set(f,{y:"+=0"}),t.ignoreCheck=function(J){return Ji&&J.type==="touchmove"&&L(J)||g>1.05&&J.type!=="touchstart"||a.isGesturing||J.touches&&J.touches.length>1},t.onPress=function(){M=!1;var J=g;g=_o((ne.visualViewport&&ne.visualViewport.scale||1)/p),F.pause(),J!==g&&zc(c,g>1.01?!0:n?!1:"x"),P=_(),B=d(),y(),v=Pr},t.onRelease=t.onGestureStart=function(J,U){if(d.offset&&x(),!U)X.restart(!0);else{Kt.cache++;var I=S(),A,it;n&&(A=_(),it=A+I*.05*-J.velocityX/.227,I*=cd(_,A,it,fi(c,tn)),F.vars.scrollX=E(it)),A=d(),it=A+I*.05*-J.velocityY/.227,I*=cd(d,A,it,fi(c,Le)),F.vars.scrollY=R(it),F.invalidate().duration(I).play(.01),(Ji&&F.vars.scrollY>=l||A>=l-1)&&Mt.to({},{onUpdate:G,duration:I})}o&&o(J)},t.onWheel=function(){F._ts&&F.pause(),nn()-m>1e3&&(v=0,m=nn())},t.onChange=function(J,U,I,A,it){if(Pr!==v&&y(),U&&n&&_(E(A[2]===U?P+(J.startX-J.x):_()+U-A[1])),I){d.offset&&x();var vt=it[2]===I,Wt=vt?B+J.startY-J.y:d()+I-it[1],q=R(Wt);vt&&Wt!==q&&(B+=q-Wt),d(q)}(I||U)&&Ti()},t.onEnable=function(){zc(c,n?!1:"x"),Ht.addEventListener("refresh",G),Ge(ne,"resize",G),d.smooth&&(d.target.style.scrollBehavior="auto",d.smooth=_.smooth=!1),D.enable()},t.onDisable=function(){zc(c,!0),He(ne,"resize",G),Ht.removeEventListener("refresh",G),D.kill()},t.lockAxis=t.lockAxis!==!1,a=new Ce(t),a.iOS=Ji,Ji&&!d()&&d(1),Ji&&Mt.ticker.add(hi),X=a._dc,F=Mt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Dd(d,d(),function(){return F.pause()})},onUpdate:Ti,onComplete:X.vars.onComplete}),a};Ht.sort=function(r){return Qt.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};Ht.observe=function(r){return new Ce(r)};Ht.normalizeScroll=function(r){if(typeof r>"u")return dn;if(r===!0&&dn)return dn.enable();if(r===!1){dn&&dn.kill(),dn=r;return}var t=r instanceof Ce?r:k_(r);return dn&&dn.target===t.target&&dn.kill(),Ir(t.target)&&(dn=t),t};Ht.core={_getVelocityProp:ua,_inputObserver:Cd,_scrollers:Kt,_proxies:$n,bridge:{ss:function(){Vn||Fr("scrollStart"),Vn=nn()},ref:function(){return en}}};xd()&&Mt.registerPlugin(Ht);ce.registerPlugin(Ht);var Rd=()=>{[{wrapperSelector:".prx-steps-wrap",itemSelector:".prx-step-box, .prx-step-divider"},{wrapperSelector:".prx-trust_grid",itemSelector:".prx-trust-box"},{wrapperSelector:".prx-areas_wrapper",itemSelector:".prx-areas_item",desktopOnly:!0},{wrapperSelector:".prx-mastery_techonologies-wrapper",itemSelector:".mastery_technologies_image"}].forEach(({wrapperSelector:t,itemSelector:e,desktopOnly:n})=>{if(n&&window.innerWidth<992)return;let i=document.querySelector(t);if(!i)return;let s=i.querySelectorAll(e);s.length&&(ce.set(s,{opacity:0,y:48}),ce.timeline({scrollTrigger:{trigger:i,start:"top bottom-=12%",toggleActions:"play none none reverse"}}).to(s,{opacity:1,y:0,duration:.7,ease:"power2.out",stagger:.22}))})};var V_=/(?:^\s+|\s+$)/g,tu=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function _s(r){var t=r.nodeType,e="";if(t===1||t===9||t===11){if(typeof r.textContent=="string")return r.textContent;for(r=r.firstChild;r;r=r.nextSibling)e+=_s(r)}else if(t===3||t===4)return r.nodeValue;return e}function Qn(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(V_,"")),t&&t!=="")return r.replace(/>/g,">").replace(/</g,"<").split(t);for(var i=[],s=r.length,o=0,a,l;o<s;o++)l=r.charAt(o),(l.charCodeAt(0)>=55296&&l.charCodeAt(0)<=56319||r.charCodeAt(o+1)>=65024&&r.charCodeAt(o+1)<=65039)&&(a=((r.substr(o,12).split(tu)||[])[1]||"").length||2,l=r.substr(o,a),i.emoji=1,o+=a-1),i.push(l===">"?">":l==="<"?"<":n&&l===" "&&(r.charAt(o-1)===" "||r.charAt(o+1)===" ")?" ":l);return i}var Pa=function(){function r(e){this.chars=Qn(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=Id(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=Id(n-this.length,this.chars);this.length=n},r}(),Nr,Nd,Ud=function(){return Nr||typeof window<"u"&&(Nr=window.gsap)&&Nr.registerPlugin&&Nr},H_=1,Pd=/\s+/g,Id=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},eu="ABCDEFGHIJKLMNOPQRSTUVWXYZ",Ld=eu.toLowerCase(),G_={upperCase:new Pa(eu),lowerCase:new Pa(Ld),upperAndLowerCase:new Pa(eu+Ld)},Fd=function(){Nd=Nr=Ud()},Do={version:"3.12.5",name:"scrambleText",register:function(t,e,n){Nr=t,Fd()},init:function(t,e,n,i,s){if(Nd||Fd(),this.prop="innerHTML"in t?"innerHTML":"textContent"in t?"textContent":0,!!this.prop){this.target=t,typeof e!="object"&&(e={text:e});var o=e.text||e.value||"",a=e.trim!==!1,l=this,c,u,h,f;return l.delimiter=c=e.delimiter||"",l.original=Qn(_s(t).replace(Pd," ").split(" ").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=Qn((o||"").replace(Pd," "),c,a),l.hasClass=!!(e.newClass||e.oldClass),l.newClass=e.newClass,l.oldClass=e.oldClass,f=c==="",l.textHasEmoji=f&&!!l.text.emoji,l.charsHaveEmoji=!!e.chars&&!!Qn(e.chars).emoji,l.length=f?l.original.length:l.original.join(c).length,l.lengthDif=(f?l.text.length:l.text.join(c).length)-l.length,l.fillChar=e.fillChar||e.chars&&~e.chars.indexOf(" ")?" ":"",l.charSet=h=G_[e.chars||"upperCase"]||new Pa(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,u=l.length+Math.max(l.lengthDif,0),u>h.length&&h.grow(u),l.chars=h.sets[l.setIndex],l.revealDelay=e.revealDelay||0,l.tweenLength=e.tweenLength!==!1,l.tween=n,l.rightToLeft=!!e.rightToLeft,l._props.push("scrambleText","text"),H_}},render:function(t,e){var n=e.target,i=e.prop,s=e.text,o=e.delimiter,a=e.tween,l=e.prevScrambleTime,c=e.revealDelay,u=e.setIndex,h=e.chars,f=e.charSet,d=e.length,_=e.textHasEmoji,g=e.charsHaveEmoji,p=e.lengthDif,m=e.tweenLength,S=e.oldClass,v=e.newClass,M=e.rightToLeft,D=e.fillChar,T=e.speed,E=e.original,R=e.hasClass,y=s.length,x=a._time,L=x-l,F,P,B,X,G,J,U,I,A,it,vt;c&&(a._from&&(x=a._dur-x),t=x===0?0:x<c?1e-6:x===a._dur?1:a._ease((x-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),M&&(t=1-t),F=~~(t*y+.5),t?((L>T||L<-T)&&(e.setIndex=u=(u+(Math.random()*19|0))%20,e.chars=f.sets[u],e.prevScrambleTime+=L),X=h):X=E.join(o),vt=a._from?t:1-t,it=d+(m?a._from?vt*vt*vt:1-vt*vt*vt:1)*p,M?t===1&&(a._from||a.data==="isFromStart")?(B="",X=E.join(o)):(U=s.slice(F).join(o),g?B=Qn(X).slice(0,it-(_?Qn(U):U).length+.5|0).join(""):B=X.substr(0,it-(_?Qn(U):U).length+.5|0),X=U):(B=s.slice(0,F).join(o),P=(_?Qn(B):B).length,g?X=Qn(X).slice(P,it+.5|0).join(""):X=X.substr(P,it-P+.5|0)),R?(I=M?S:v,A=M?v:S,G=I&&F!==0,J=A&&F!==y,U=(G?"<span class='"+I+"'>":"")+B+(G?"</span>":"")+(J?"<span class='"+A+"'>":"")+o+X+(J?"</span>":"")):U=B+o+X,n[i]=D===" "&&~U.indexOf(" ")?U.split(" ").join(" "):U}};Do.emojiSafeSplit=Qn;Do.getText=_s;Ud()&&Nr.registerPlugin(Do);ce.registerPlugin(Do);var Od=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{ce.matchMedia().add("(min-width: 768px)",()=>{ce.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};ce.registerPlugin(Ht);var Bd=()=>{let r=document.querySelector(".prx-header-wrapper-center.prx-pinned"),t=document.querySelector(".prx-special_content"),e=document.querySelectorAll(".prx-special_content .prx-special-row, .prx-special_content .prx-special-row-second");if(!r||!t||!e.length)return;ce.matchMedia().add("(min-width: 1440px)",()=>{let o=80+r.offsetHeight;ce.set(r,{zIndex:10,position:"relative"}),Ht.create({trigger:r,endTrigger:t,start:"top top+=80",end:"bottom bottom",pin:!0,pinSpacing:!1}),e.forEach((a,l)=>{if(l===e.length-1){Ht.create({trigger:a,endTrigger:t,start:`top top+=${o}`,end:"bottom bottom",pin:!0,pinSpacing:!1});return}ce.to(a,{ease:"circ.out",startAt:{filter:"brightness(100%) blur(0px)",scale:1,opacity:1},filter:"brightness(50%) blur(10px)",scale:.6,opacity:0,scrollTrigger:{trigger:a,start:`top top+=${o}`,endTrigger:t,end:"bottom+=5% bottom",pin:!0,pinSpacing:!1,scrub:1,invalidateOnRefresh:!1}})})})};var zd=()=>{if(window.innerWidth>=992)return;let r=document.querySelector(".prx-areas_wrapper"),t=r?.querySelector(".prx-areas_row"),e=t?Array.from(t.querySelectorAll(".prx-areas_item")):[];if(!e.length)return;let n=2,i=n,s=!1;e.slice(-n).reverse().forEach(_=>t.prepend(_.cloneNode(!0))),e.slice(0,n).forEach(_=>t.appendChild(_.cloneNode(!0)));let o=Array.from(t.querySelectorAll(".prx-areas_item")),a=0,l=0,c=0,u=()=>{ce.set(t,{x:0}),l=o[0].offsetWidth,c=r.offsetWidth,a=l+16},h=_=>-_*a+(c-l)/2,f=_=>{s||(s=!0,ce.to(t,{x:h(_),duration:.45,ease:"power2.out",onComplete:()=>{_<n?(i=_+e.length,ce.set(t,{x:h(i)})):_>=n+e.length?(i=_-e.length,ce.set(t,{x:h(i)})):i=_,s=!1}}))},d=0;r.addEventListener("touchstart",_=>d=_.touches[0].clientX),r.addEventListener("touchend",_=>{let g=d-_.changedTouches[0].clientX;Math.abs(g)>50&&f(i+(g>0?1:-1))}),requestAnimationFrame(()=>{ce.set(o,{clearProps:"y,opacity"}),u(),ce.set(t,{x:h(i)})}),window.addEventListener("resize",()=>{window.innerWidth>=992||(u(),ce.set(t,{x:h(i)}))})};var vh="164";var W_=0,kd=1,X_=2;var fm=1,yh=2,Ii=3,lr=0,Tn=1,Fi=2,sr=0,or=1,Vd=2,Hd=3,Gd=4,q_=5,Gr=100,Y_=101,Z_=102,J_=103,$_=104,K_=200,Q_=201,j_=202,t0=203,Uu=204,Ou=205,e0=206,n0=207,i0=208,r0=209,s0=210,o0=211,a0=212,l0=213,c0=214,u0=0,h0=1,f0=2,il=3,d0=4,p0=5,m0=6,g0=7,dm=0,_0=1,x0=2,ar=0,v0=1,y0=2,M0=3,S0=4,b0=5,w0=6,E0=7;var pm=300,ks=301,Vs=302,Bu=303,zu=304,Rl=306,ku=1e3,Xr=1001,Vu=1002,Wn=1003,T0=1004;var Ia=1005;var ni=1006,nu=1007;var qr=1008;var cr=1009,A0=1010,D0=1011,mm=1012,gm=1013,Hs=1014,ir=1015,Pl=1016,_m=1017,xm=1018,ko=1020,C0=35902,R0=1021,P0=1022,pi=1023,I0=1024,L0=1025,Os=1026,Uo=1027,F0=1028,vm=1029,N0=1030,ym=1031,Mm=1033,iu=33776,ru=33777,su=33778,ou=33779,Wd=35840,Xd=35841,qd=35842,Yd=35843,Zd=36196,Jd=37492,$d=37496,Kd=37808,Qd=37809,jd=37810,tp=37811,ep=37812,np=37813,ip=37814,rp=37815,sp=37816,op=37817,ap=37818,lp=37819,cp=37820,up=37821,au=36492,hp=36494,fp=36495,U0=36283,dp=36284,pp=36285,mp=36286;var rl=2300,sl=2301,lu=2302,gp=2400,_p=2401,xp=2402;var O0=3200,B0=3201,z0=0,k0=1,nr="",Gn="srgb",fr="srgb-linear",Mh="display-p3",Il="display-p3-linear",ol="linear",xe="srgb",al="rec709",ll="p3";var xs=7680;var vp=519,V0=512,H0=513,G0=514,Sm=515,W0=516,X0=517,q0=518,Y0=519,yp=35044;var Mp="300 es",Ni=2e3,cl=2001,ur=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let s=0,o=i.length;s<o;s++)i[s].call(this,t);t.target=null}}},rn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];var cu=Math.PI/180,Hu=180/Math.PI;function Vo(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(rn[r&255]+rn[r>>8&255]+rn[r>>16&255]+rn[r>>24&255]+"-"+rn[t&255]+rn[t>>8&255]+"-"+rn[t>>16&15|64]+rn[t>>24&255]+"-"+rn[e&63|128]+rn[e>>8&255]+"-"+rn[e>>16&255]+rn[e>>24&255]+rn[n&255]+rn[n>>8&255]+rn[n>>16&255]+rn[n>>24&255]).toLowerCase()}function En(r,t,e){return Math.max(t,Math.min(e,r))}function Z0(r,t){return(r%t+t)%t}function uu(r,t,e){return(1-e)*r+e*t}function Co(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function wn(r,t){switch(t.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var oe=class r{constructor(t=0,e=0){r.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(En(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*n-o*i+t.x,this.y=s*i+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Zt=class r{constructor(t,e,n,i,s,o,a,l,c){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c)}set(t,e,n,i,s,o,a,l,c){let u=this.elements;return u[0]=t,u[1]=i,u[2]=a,u[3]=e,u[4]=s,u[5]=l,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],u=n[4],h=n[7],f=n[2],d=n[5],_=n[8],g=i[0],p=i[3],m=i[6],S=i[1],v=i[4],M=i[7],D=i[2],T=i[5],E=i[8];return s[0]=o*g+a*S+l*D,s[3]=o*p+a*v+l*T,s[6]=o*m+a*M+l*E,s[1]=c*g+u*S+h*D,s[4]=c*p+u*v+h*T,s[7]=c*m+u*M+h*E,s[2]=f*g+d*S+_*D,s[5]=f*p+d*v+_*T,s[8]=f*m+d*M+_*E,this}multiplyScalar(t){let 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(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e*o*u-e*a*c-n*s*u+n*a*l+i*s*c-i*o*l}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*o-a*c,f=a*l-u*s,d=c*s-o*l,_=e*h+n*f+i*d;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/_;return t[0]=h*g,t[1]=(i*c-u*n)*g,t[2]=(a*n-i*o)*g,t[3]=f*g,t[4]=(u*e-i*l)*g,t[5]=(i*s-a*e)*g,t[6]=d*g,t[7]=(n*l-c*e)*g,t[8]=(o*e-n*s)*g,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let 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(t,e,n,i,s,o,a){let l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+t,-i*c,i*l,-i*(-c*o+l*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(hu.makeScale(t,e)),this}rotate(t){return this.premultiply(hu.makeRotation(-t)),this}translate(t,e){return this.premultiply(hu.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<9;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}},hu=new Zt;function bm(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function ul(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function J0(){let r=ul("canvas");return r.style.display="block",r}var Sp={};function $0(r){r in Sp||(Sp[r]=!0,console.warn(r))}var bp=new Zt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),wp=new Zt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),La={[fr]:{transfer:ol,primaries:al,toReference:r=>r,fromReference:r=>r},[Gn]:{transfer:xe,primaries:al,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Il]:{transfer:ol,primaries:ll,toReference:r=>r.applyMatrix3(wp),fromReference:r=>r.applyMatrix3(bp)},[Mh]:{transfer:xe,primaries:ll,toReference:r=>r.convertSRGBToLinear().applyMatrix3(wp),fromReference:r=>r.applyMatrix3(bp).convertLinearToSRGB()}},K0=new Set([fr,Il]),fe={enabled:!0,_workingColorSpace:fr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!K0.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,t,e){if(this.enabled===!1||t===e||!t||!e)return r;let n=La[t].toReference,i=La[e].fromReference;return i(n(r))},fromWorkingColorSpace:function(r,t){return this.convert(r,this._workingColorSpace,t)},toWorkingColorSpace:function(r,t){return this.convert(r,t,this._workingColorSpace)},getPrimaries:function(r){return La[r].primaries},getTransfer:function(r){return r===nr?ol:La[r].transfer}};function Bs(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function fu(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var vs,Gu=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{vs===void 0&&(vs=ul("canvas")),vs.width=t.width,vs.height=t.height;let n=vs.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=vs}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=ul("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=Bs(s[o]/255)*255;return n.putImageData(i,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(Bs(e[n]/255)*255):e[n]=Bs(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},Q0=0,hl=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Q0++}),this.uuid=Vo(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(du(i[o].image)):s.push(du(i[o]))}else s=du(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function du(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?Gu.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var j0=0,Yn=class r extends ur{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=Xr,i=Xr,s=ni,o=qr,a=pi,l=cr,c=r.DEFAULT_ANISOTROPY,u=nr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:j0++}),this.uuid=Vo(),this.name="",this.source=new hl(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new oe(0,0),this.repeat=new oe(1,1),this.center=new oe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Zt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,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.internalFormat=t.internalFormat,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.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==pm)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case ku:t.x=t.x-Math.floor(t.x);break;case Xr:t.x=t.x<0?0:1;break;case Vu:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case ku:t.y=t.y-Math.floor(t.y);break;case Xr:t.y=t.y<0?0:1;break;case Vu:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}};Yn.DEFAULT_IMAGE=null;Yn.DEFAULT_MAPPING=pm;Yn.DEFAULT_ANISOTROPY=1;var Xe=class r{constructor(t=0,e=0,n=0,i=1){r.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(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(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(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(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(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(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}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*n+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*n+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*n+o[11]*i+o[15]*s,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,s,l=t.elements,c=l[0],u=l[4],h=l[8],f=l[1],d=l[5],_=l[9],g=l[2],p=l[6],m=l[10];if(Math.abs(u-f)<.01&&Math.abs(h-g)<.01&&Math.abs(_-p)<.01){if(Math.abs(u+f)<.1&&Math.abs(h+g)<.1&&Math.abs(_+p)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let v=(c+1)/2,M=(d+1)/2,D=(m+1)/2,T=(u+f)/4,E=(h+g)/4,R=(_+p)/4;return v>M&&v>D?v<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(v),i=T/n,s=E/n):M>D?M<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(M),n=T/i,s=R/i):D<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(D),n=E/s,i=R/s),this.set(n,i,s,e),this}let S=Math.sqrt((p-_)*(p-_)+(h-g)*(h-g)+(f-u)*(f-u));return Math.abs(S)<.001&&(S=1),this.x=(p-_)/S,this.y=(h-g)/S,this.z=(f-u)/S,this.w=Math.acos((c+d+m-1)/2),this}min(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(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(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},Wu=class extends ur{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new Xe(0,0,t,e),this.scissorTest=!1,this.viewport=new Xe(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ni,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new Yn(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);s.flipY=!1,s.generateMipmaps=n.generateMipmaps,s.internalFormat=n.internalFormat,this.textures=[];let o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,s=this.textures.length;i<s;i++)this.textures[i].image.width=t,this.textures[i].image.height=e,this.textures[i].image.depth=n;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,i=t.textures.length;n<i;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new hl(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Ui=class extends Wu{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},fl=class extends Yn{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=Wn,this.minFilter=Wn,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Xu=class extends Yn{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=Wn,this.minFilter=Wn,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var hr=class{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,s,o,a){let l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],f=s[o+0],d=s[o+1],_=s[o+2],g=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=u,t[e+3]=h;return}if(a===1){t[e+0]=f,t[e+1]=d,t[e+2]=_,t[e+3]=g;return}if(h!==g||l!==f||c!==d||u!==_){let p=1-a,m=l*f+c*d+u*_+h*g,S=m>=0?1:-1,v=1-m*m;if(v>Number.EPSILON){let D=Math.sqrt(v),T=Math.atan2(D,m*S);p=Math.sin(p*T)/D,a=Math.sin(a*T)/D}let M=a*S;if(l=l*p+f*M,c=c*p+d*M,u=u*p+_*M,h=h*p+g*M,p===1-a){let D=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=D,c*=D,u*=D,h*=D}}t[e]=l,t[e+1]=c,t[e+2]=u,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=s[o],f=s[o+1],d=s[o+2],_=s[o+3];return t[e]=a*_+u*h+l*d-c*f,t[e+1]=l*_+u*f+c*h-a*d,t[e+2]=c*_+u*d+a*f-l*h,t[e+3]=u*_-a*h-l*f-c*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){let n=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,l=Math.sin,c=a(n/2),u=a(i/2),h=a(s/2),f=l(n/2),d=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=f*u*h+c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h-f*d*_;break;case"YXZ":this._x=f*u*h+c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h+f*d*_;break;case"ZXY":this._x=f*u*h-c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h-f*d*_;break;case"ZYX":this._x=f*u*h-c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h+f*d*_;break;case"YZX":this._x=f*u*h+c*d*_,this._y=c*d*h+f*u*_,this._z=c*u*_-f*d*h,this._w=c*u*h-f*d*_;break;case"XZY":this._x=f*u*h-c*d*_,this._y=c*d*h-f*u*_,this._z=c*u*_+f*d*h,this._w=c*u*h+f*d*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],i=e[4],s=e[8],o=e[1],a=e[5],l=e[9],c=e[2],u=e[6],h=e[10],f=n+a+h;if(f>0){let d=.5/Math.sqrt(f+1);this._w=.25/d,this._x=(u-l)*d,this._y=(s-c)*d,this._z=(o-i)*d}else if(n>a&&n>h){let d=2*Math.sqrt(1+n-a-h);this._w=(u-l)/d,this._x=.25*d,this._y=(i+o)/d,this._z=(s+c)/d}else if(a>h){let d=2*Math.sqrt(1+a-n-h);this._w=(s-c)/d,this._x=(i+o)/d,this._y=.25*d,this._z=(l+u)/d}else{let d=2*Math.sqrt(1+h-n-a);this._w=(o-i)/d,this._x=(s+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(En(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,i=t._y,s=t._z,o=t._w,a=e._x,l=e._y,c=e._z,u=e._w;return this._x=n*u+o*a+i*c-s*l,this._y=i*u+o*l+s*a-n*c,this._z=s*u+o*c+n*l-i*a,this._w=o*u-n*a-i*l-s*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,i=this._y,s=this._z,o=this._w,a=o*t._w+n*t._x+i*t._y+s*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=o,this._x=n,this._y=i,this._z=s,this;let l=1-a*a;if(l<=Number.EPSILON){let d=1-e;return this._w=d*o+e*this._w,this._x=d*n+e*this._x,this._y=d*i+e*this._y,this._z=d*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-e)*u)/c,f=Math.sin(e*u)/c;return this._w=o*h+this._w*f,this._x=n*h+this._x*f,this._y=i*h+this._y*f,this._z=s*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},Z=class r{constructor(t=0,e=0,n=0){r.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Ep.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Ep.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*n+s[6]*i,this.y=s[1]*e+s[4]*n+s[7]*i,this.z=s[2]*e+s[5]*n+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*n+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*n+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*n+s[10]*i+s[14])*o,this}applyQuaternion(t){let e=this.x,n=this.y,i=this.z,s=t.x,o=t.y,a=t.z,l=t.w,c=2*(o*i-a*n),u=2*(a*e-s*i),h=2*(s*n-o*e);return this.x=e+l*c+o*h-a*u,this.y=n+l*u+a*c-s*h,this.z=i+l*h+s*u-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i,this.y=s[1]*e+s[5]*n+s[9]*i,this.z=s[2]*e+s[6]*n+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(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(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(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(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,i=t.y,s=t.z,o=e.x,a=e.y,l=e.z;return this.x=i*l-s*a,this.y=s*o-n*l,this.z=n*a-i*o,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return pu.copy(this).projectOnVector(t),this.sub(pu)}reflect(t){return this.sub(pu.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(En(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},pu=new Z,Ep=new hr,Yr=class{constructor(t=new Z(1/0,1/0,1/0),e=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(jn.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(jn.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=jn.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let s=n.getAttribute("position");if(e===!0&&s!==void 0&&t.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)t.isMesh===!0?t.getVertexPosition(o,jn):jn.fromBufferAttribute(s,o),jn.applyMatrix4(t.matrixWorld),this.expandByPoint(jn);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Fa.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Fa.copy(n.boundingBox)),Fa.applyMatrix4(t.matrixWorld),this.union(Fa)}let i=t.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],e);return this}containsPoint(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(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(t,e){return 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(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(t){return this.clampPoint(t.center,jn),jn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ro),Na.subVectors(this.max,Ro),ys.subVectors(t.a,Ro),Ms.subVectors(t.b,Ro),Ss.subVectors(t.c,Ro),$i.subVectors(Ms,ys),Ki.subVectors(Ss,Ms),Ur.subVectors(ys,Ss);let e=[0,-$i.z,$i.y,0,-Ki.z,Ki.y,0,-Ur.z,Ur.y,$i.z,0,-$i.x,Ki.z,0,-Ki.x,Ur.z,0,-Ur.x,-$i.y,$i.x,0,-Ki.y,Ki.x,0,-Ur.y,Ur.x,0];return!mu(e,ys,Ms,Ss,Na)||(e=[1,0,0,0,1,0,0,0,1],!mu(e,ys,Ms,Ss,Na))?!1:(Ua.crossVectors($i,Ki),e=[Ua.x,Ua.y,Ua.z],mu(e,ys,Ms,Ss,Na))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,jn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(jn).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Ai[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ai[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ai[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ai[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ai[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ai[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ai[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ai[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ai),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},Ai=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],jn=new Z,Fa=new Yr,ys=new Z,Ms=new Z,Ss=new Z,$i=new Z,Ki=new Z,Ur=new Z,Ro=new Z,Na=new Z,Ua=new Z,Or=new Z;function mu(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){Or.fromArray(r,s);let a=i.x*Math.abs(Or.x)+i.y*Math.abs(Or.y)+i.z*Math.abs(Or.z),l=t.dot(Or),c=e.dot(Or),u=n.dot(Or);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}var tx=new Yr,Po=new Z,gu=new Z,Gs=class{constructor(t=new Z,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):tx.setFromPoints(t).getCenter(n);let i=0;for(let s=0,o=t.length;s<o;s++)i=Math.max(i,n.distanceToSquared(t[s]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Po.subVectors(t,this.center);let e=Po.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Po,i/n),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(gu.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Po.copy(t.center).add(gu)),this.expandByPoint(Po.copy(t.center).sub(gu))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Di=new Z,_u=new Z,Oa=new Z,Qi=new Z,xu=new Z,Ba=new Z,vu=new Z,dl=class{constructor(t=new Z,e=new Z(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Di)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Di.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Di.copy(this.origin).addScaledVector(this.direction,e),Di.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){_u.copy(t).add(e).multiplyScalar(.5),Oa.copy(e).sub(t).normalize(),Qi.copy(this.origin).sub(_u);let s=t.distanceTo(e)*.5,o=-this.direction.dot(Oa),a=Qi.dot(this.direction),l=-Qi.dot(Oa),c=Qi.lengthSq(),u=Math.abs(1-o*o),h,f,d,_;if(u>0)if(h=o*l-a,f=o*a-l,_=s*u,h>=0)if(f>=-_)if(f<=_){let g=1/u;h*=g,f*=g,d=h*(h+o*f+2*a)+f*(o*h+f+2*l)+c}else f=s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;else f=-s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;else f<=-_?(h=Math.max(0,-(-o*s+a)),f=h>0?-s:Math.min(Math.max(-s,-l),s),d=-h*h+f*(f+2*l)+c):f<=_?(h=0,f=Math.min(Math.max(-s,-l),s),d=f*(f+2*l)+c):(h=Math.max(0,-(o*s+a)),f=h>0?s:Math.min(Math.max(-s,-l),s),d=-h*h+f*(f+2*l)+c);else f=o>0?-s:s,h=Math.max(0,-(o*f+a)),d=-h*h+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(_u).addScaledVector(Oa,f),d}intersectSphere(t,e){Di.subVectors(t.center,this.origin);let n=Di.dot(this.direction),i=Di.dot(Di)-n*n,s=t.radius*t.radius;if(i>s)return null;let o=Math.sqrt(s-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,s,o,a,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,f=this.origin;return c>=0?(n=(t.min.x-f.x)*c,i=(t.max.x-f.x)*c):(n=(t.max.x-f.x)*c,i=(t.min.x-f.x)*c),u>=0?(s=(t.min.y-f.y)*u,o=(t.max.y-f.y)*u):(s=(t.max.y-f.y)*u,o=(t.min.y-f.y)*u),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),h>=0?(a=(t.min.z-f.z)*h,l=(t.max.z-f.z)*h):(a=(t.max.z-f.z)*h,l=(t.min.z-f.z)*h),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,e)}intersectsBox(t){return this.intersectBox(t,Di)!==null}intersectTriangle(t,e,n,i,s){xu.subVectors(e,t),Ba.subVectors(n,t),vu.crossVectors(xu,Ba);let o=this.direction.dot(vu),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Qi.subVectors(this.origin,t);let l=a*this.direction.dot(Ba.crossVectors(Qi,Ba));if(l<0)return null;let c=a*this.direction.dot(xu.cross(Qi));if(c<0||l+c>o)return null;let u=-a*Qi.dot(vu);return u<0?null:this.at(u/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Pe=class r{constructor(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p)}set(t,e,n,i,s,o,a,l,c,u,h,f,d,_,g,p){let m=this.elements;return m[0]=t,m[4]=e,m[8]=n,m[12]=i,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=h,m[14]=f,m[3]=d,m[7]=_,m[11]=g,m[15]=p,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new r().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,i=1/bs.setFromMatrixColumn(t,0).length(),s=1/bs.setFromMatrixColumn(t,1).length(),o=1/bs.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*s,e[5]=n[5]*s,e[6]=n[6]*s,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,i=t.y,s=t.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(s),h=Math.sin(s);if(t.order==="XYZ"){let f=o*u,d=o*h,_=a*u,g=a*h;e[0]=l*u,e[4]=-l*h,e[8]=c,e[1]=d+_*c,e[5]=f-g*c,e[9]=-a*l,e[2]=g-f*c,e[6]=_+d*c,e[10]=o*l}else if(t.order==="YXZ"){let f=l*u,d=l*h,_=c*u,g=c*h;e[0]=f+g*a,e[4]=_*a-d,e[8]=o*c,e[1]=o*h,e[5]=o*u,e[9]=-a,e[2]=d*a-_,e[6]=g+f*a,e[10]=o*l}else if(t.order==="ZXY"){let f=l*u,d=l*h,_=c*u,g=c*h;e[0]=f-g*a,e[4]=-o*h,e[8]=_+d*a,e[1]=d+_*a,e[5]=o*u,e[9]=g-f*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let f=o*u,d=o*h,_=a*u,g=a*h;e[0]=l*u,e[4]=_*c-d,e[8]=f*c+g,e[1]=l*h,e[5]=g*c+f,e[9]=d*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let f=o*l,d=o*c,_=a*l,g=a*c;e[0]=l*u,e[4]=g-f*h,e[8]=_*h+d,e[1]=h,e[5]=o*u,e[9]=-a*u,e[2]=-c*u,e[6]=d*h+_,e[10]=f-g*h}else if(t.order==="XZY"){let f=o*l,d=o*c,_=a*l,g=a*c;e[0]=l*u,e[4]=-h,e[8]=c*u,e[1]=f*h+g,e[5]=o*u,e[9]=d*h-_,e[2]=_*h-d,e[6]=a*u,e[10]=g*h+f}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ex,t,nx)}lookAt(t,e,n){let i=this.elements;return In.subVectors(t,e),In.lengthSq()===0&&(In.z=1),In.normalize(),ji.crossVectors(n,In),ji.lengthSq()===0&&(Math.abs(n.z)===1?In.x+=1e-4:In.z+=1e-4,In.normalize(),ji.crossVectors(n,In)),ji.normalize(),za.crossVectors(In,ji),i[0]=ji.x,i[4]=za.x,i[8]=In.x,i[1]=ji.y,i[5]=za.y,i[9]=In.y,i[2]=ji.z,i[6]=za.z,i[10]=In.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,i=e.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],u=n[1],h=n[5],f=n[9],d=n[13],_=n[2],g=n[6],p=n[10],m=n[14],S=n[3],v=n[7],M=n[11],D=n[15],T=i[0],E=i[4],R=i[8],y=i[12],x=i[1],L=i[5],F=i[9],P=i[13],B=i[2],X=i[6],G=i[10],J=i[14],U=i[3],I=i[7],A=i[11],it=i[15];return s[0]=o*T+a*x+l*B+c*U,s[4]=o*E+a*L+l*X+c*I,s[8]=o*R+a*F+l*G+c*A,s[12]=o*y+a*P+l*J+c*it,s[1]=u*T+h*x+f*B+d*U,s[5]=u*E+h*L+f*X+d*I,s[9]=u*R+h*F+f*G+d*A,s[13]=u*y+h*P+f*J+d*it,s[2]=_*T+g*x+p*B+m*U,s[6]=_*E+g*L+p*X+m*I,s[10]=_*R+g*F+p*G+m*A,s[14]=_*y+g*P+p*J+m*it,s[3]=S*T+v*x+M*B+D*U,s[7]=S*E+v*L+M*X+D*I,s[11]=S*R+v*F+M*G+D*A,s[15]=S*y+v*P+M*J+D*it,this}multiplyScalar(t){let 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}determinant(){let t=this.elements,e=t[0],n=t[4],i=t[8],s=t[12],o=t[1],a=t[5],l=t[9],c=t[13],u=t[2],h=t[6],f=t[10],d=t[14],_=t[3],g=t[7],p=t[11],m=t[15];return _*(+s*l*h-i*c*h-s*a*f+n*c*f+i*a*d-n*l*d)+g*(+e*l*d-e*c*f+s*o*f-i*o*d+i*c*u-s*l*u)+p*(+e*c*h-e*a*d-s*o*h+n*o*d+s*a*u-n*c*u)+m*(-i*a*u-e*l*h+e*a*f+i*o*h-n*o*f+n*l*u)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],_=t[12],g=t[13],p=t[14],m=t[15],S=h*p*c-g*f*c+g*l*d-a*p*d-h*l*m+a*f*m,v=_*f*c-u*p*c-_*l*d+o*p*d+u*l*m-o*f*m,M=u*g*c-_*h*c+_*a*d-o*g*d-u*a*m+o*h*m,D=_*h*l-u*g*l-_*a*f+o*g*f+u*a*p-o*h*p,T=e*S+n*v+i*M+s*D;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/T;return t[0]=S*E,t[1]=(g*f*s-h*p*s-g*i*d+n*p*d+h*i*m-n*f*m)*E,t[2]=(a*p*s-g*l*s+g*i*c-n*p*c-a*i*m+n*l*m)*E,t[3]=(h*l*s-a*f*s-h*i*c+n*f*c+a*i*d-n*l*d)*E,t[4]=v*E,t[5]=(u*p*s-_*f*s+_*i*d-e*p*d-u*i*m+e*f*m)*E,t[6]=(_*l*s-o*p*s-_*i*c+e*p*c+o*i*m-e*l*m)*E,t[7]=(o*f*s-u*l*s+u*i*c-e*f*c-o*i*d+e*l*d)*E,t[8]=M*E,t[9]=(_*h*s-u*g*s-_*n*d+e*g*d+u*n*m-e*h*m)*E,t[10]=(o*g*s-_*a*s+_*n*c-e*g*c-o*n*m+e*a*m)*E,t[11]=(u*a*s-o*h*s-u*n*c+e*h*c+o*n*d-e*a*d)*E,t[12]=D*E,t[13]=(u*g*i-_*h*i+_*n*f-e*g*f-u*n*p+e*h*p)*E,t[14]=(_*a*i-o*g*i-_*n*l+e*g*l+o*n*p-e*a*p)*E,t[15]=(o*h*i-u*a*i+u*n*l-e*h*l-o*n*f+e*a*f)*E,this}scale(t){let e=this.elements,n=t.x,i=t.y,s=t.z;return e[0]*=n,e[4]*=i,e[8]*=s,e[1]*=n,e[5]*=i,e[9]*=s,e[2]*=n,e[6]*=i,e[10]*=s,e[3]*=n,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),i=Math.sin(e),s=1-n,o=t.x,a=t.y,l=t.z,c=s*o,u=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+n,u*l-i*o,0,c*l-i*a,u*l+i*o,s*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,s,o){return this.set(1,n,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){let i=this.elements,s=e._x,o=e._y,a=e._z,l=e._w,c=s+s,u=o+o,h=a+a,f=s*c,d=s*u,_=s*h,g=o*u,p=o*h,m=a*h,S=l*c,v=l*u,M=l*h,D=n.x,T=n.y,E=n.z;return i[0]=(1-(g+m))*D,i[1]=(d+M)*D,i[2]=(_-v)*D,i[3]=0,i[4]=(d-M)*T,i[5]=(1-(f+m))*T,i[6]=(p+S)*T,i[7]=0,i[8]=(_+v)*E,i[9]=(p-S)*E,i[10]=(1-(f+g))*E,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){let i=this.elements,s=bs.set(i[0],i[1],i[2]).length(),o=bs.set(i[4],i[5],i[6]).length(),a=bs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),t.x=i[12],t.y=i[13],t.z=i[14],ti.copy(this);let c=1/s,u=1/o,h=1/a;return ti.elements[0]*=c,ti.elements[1]*=c,ti.elements[2]*=c,ti.elements[4]*=u,ti.elements[5]*=u,ti.elements[6]*=u,ti.elements[8]*=h,ti.elements[9]*=h,ti.elements[10]*=h,e.setFromRotationMatrix(ti),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=Ni){let l=this.elements,c=2*s/(e-t),u=2*s/(n-i),h=(e+t)/(e-t),f=(n+i)/(n-i),d,_;if(a===Ni)d=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===cl)d=-o/(o-s),_=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=Ni){let l=this.elements,c=1/(e-t),u=1/(n-i),h=1/(o-s),f=(e+t)*c,d=(n+i)*u,_,g;if(a===Ni)_=(o+s)*h,g=-2*h;else if(a===cl)_=s*h,g=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=g,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let i=0;i<16;i++)if(e[i]!==n[i])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}},bs=new Z,ti=new Pe,ex=new Z(0,0,0),nx=new Z(1,1,1),ji=new Z,za=new Z,In=new Z,Tp=new Pe,Ap=new hr,Oi=class r{constructor(t=0,e=0,n=0,i=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){let i=t.elements,s=i[0],o=i[4],a=i[8],l=i[1],c=i[5],u=i[9],h=i[2],f=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(En(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-En(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(En(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-En(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(En(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-En(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Tp.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Tp,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Ap.setFromEuler(this),this.setFromQuaternion(Ap,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(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(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};Oi.DEFAULT_ORDER="XYZ";var pl=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},ix=0,Dp=new Z,ws=new hr,Ci=new Pe,ka=new Z,Io=new Z,rx=new Z,sx=new hr,Cp=new Z(1,0,0),Rp=new Z(0,1,0),Pp=new Z(0,0,1),Ip={type:"added"},ox={type:"removed"},Es={type:"childadded",child:null},yu={type:"childremoved",child:null},on=class r extends ur{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:ix++}),this.uuid=Vo(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new Z,e=new Oi,n=new hr,i=new Z(1,1,1);function s(){n.setFromEuler(e,!1)}function o(){e.setFromQuaternion(n,void 0,!1)}e._onChange(s),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Pe},normalMatrix:{value:new Zt}}),this.matrix=new Pe,this.matrixWorld=new Pe,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new pl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return ws.setFromAxisAngle(t,e),this.quaternion.multiply(ws),this}rotateOnWorldAxis(t,e){return ws.setFromAxisAngle(t,e),this.quaternion.premultiply(ws),this}rotateX(t){return this.rotateOnAxis(Cp,t)}rotateY(t){return this.rotateOnAxis(Rp,t)}rotateZ(t){return this.rotateOnAxis(Pp,t)}translateOnAxis(t,e){return Dp.copy(t).applyQuaternion(this.quaternion),this.position.add(Dp.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(Cp,t)}translateY(t){return this.translateOnAxis(Rp,t)}translateZ(t){return this.translateOnAxis(Pp,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ci.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?ka.copy(t):ka.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Io.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ci.lookAt(Io,ka,this.up):Ci.lookAt(ka,Io,this.up),this.quaternion.setFromRotationMatrix(Ci),i&&(Ci.extractRotation(i.matrixWorld),ws.setFromRotationMatrix(Ci),this.quaternion.premultiply(ws.invert()))}add(t){if(arguments.length>1){for(let 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.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Ip),Es.child=t,this.dispatchEvent(Es),Es.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(ox),yu.child=t,this.dispatchEvent(yu),yu.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Ci.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Ci.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ci),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Ip),Es.child=t,this.dispatchEvent(Es),Es.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){let o=this.children[n].getObjectByProperty(t,e);if(o!==void 0)return o}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);let i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Io,t,rx),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Io,sx,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){let e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(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);let e=this.children;for(let n=0,i=e.length;n<i;n++){let s=e[n];(s.matrixWorldAutoUpdate===!0||t===!0)&&s.updateMatrixWorld(t)}}updateWorldMatrix(t,e){let n=this.parent;if(t===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.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){let i=this.children;for(let s=0,o=i.length;s<o;s++){let a=i[s];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(t){let e=t===void 0||typeof t=="string",n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);let a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){let l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){let h=l[c];s(t.shapes,h)}else s(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(t.materials,this.material[l]));i.material=a}else i.material=s(t.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){let l=this.animations[a];i.animations.push(s(t.animations,l))}}if(e){let a=o(t.geometries),l=o(t.materials),c=o(t.textures),u=o(t.images),h=o(t.shapes),f=o(t.skeletons),d=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),f.length>0&&(n.skeletons=f),d.length>0&&(n.animations=d),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let u=a[c];delete u.metadata,l.push(u)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,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.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,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.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};on.DEFAULT_UP=new Z(0,1,0);on.DEFAULT_MATRIX_AUTO_UPDATE=!0;on.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var ei=new Z,Ri=new Z,Mu=new Z,Pi=new Z,Ts=new Z,As=new Z,Lp=new Z,Su=new Z,bu=new Z,wu=new Z,Ns=class r{constructor(t=new Z,e=new Z,n=new Z){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),ei.subVectors(t,e),i.cross(ei);let s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,n,i,s){ei.subVectors(i,e),Ri.subVectors(n,e),Mu.subVectors(t,e);let o=ei.dot(ei),a=ei.dot(Ri),l=ei.dot(Mu),c=Ri.dot(Ri),u=Ri.dot(Mu),h=o*c-a*a;if(h===0)return s.set(0,0,0),null;let f=1/h,d=(c*l-a*u)*f,_=(o*u-a*l)*f;return s.set(1-d-_,_,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Pi)===null?!1:Pi.x>=0&&Pi.y>=0&&Pi.x+Pi.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,Pi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Pi.x),l.addScaledVector(o,Pi.y),l.addScaledVector(a,Pi.z),l)}static isFrontFacing(t,e,n,i){return ei.subVectors(n,e),Ri.subVectors(t,e),ei.cross(Ri).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ei.subVectors(this.c,this.b),Ri.subVectors(this.a,this.b),ei.cross(Ri).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return r.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return r.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,s){return r.getInterpolation(t,this.a,this.b,this.c,e,n,i,s)}containsPoint(t){return r.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return r.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,i=this.b,s=this.c,o,a;Ts.subVectors(i,n),As.subVectors(s,n),Su.subVectors(t,n);let l=Ts.dot(Su),c=As.dot(Su);if(l<=0&&c<=0)return e.copy(n);bu.subVectors(t,i);let u=Ts.dot(bu),h=As.dot(bu);if(u>=0&&h<=u)return e.copy(i);let f=l*h-u*c;if(f<=0&&l>=0&&u<=0)return o=l/(l-u),e.copy(n).addScaledVector(Ts,o);wu.subVectors(t,s);let d=Ts.dot(wu),_=As.dot(wu);if(_>=0&&d<=_)return e.copy(s);let g=d*c-l*_;if(g<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(As,a);let p=u*_-d*h;if(p<=0&&h-u>=0&&d-_>=0)return Lp.subVectors(s,i),a=(h-u)/(h-u+(d-_)),e.copy(i).addScaledVector(Lp,a);let m=1/(p+g+f);return o=g*m,a=f*m,e.copy(n).addScaledVector(Ts,o).addScaledVector(As,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},wm={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},tr={h:0,s:0,l:0},Va={h:0,s:0,l:0};function Eu(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}var re=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Gn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,fe.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=fe.workingColorSpace){return this.r=t,this.g=e,this.b=n,fe.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=fe.workingColorSpace){if(t=Z0(t,1),e=En(e,0,1),n=En(n,0,1),e===0)this.r=this.g=this.b=n;else{let s=n<=.5?n*(1+e):n+e-n*e,o=2*n-s;this.r=Eu(o,s,t+1/3),this.g=Eu(o,s,t),this.b=Eu(o,s,t-1/3)}return fe.toWorkingColorSpace(this,i),this}setStyle(t,e=Gn){function n(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let s,o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(o===6)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Gn){let n=wm[t.toLowerCase()];return n!==void 0?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Bs(t.r),this.g=Bs(t.g),this.b=Bs(t.b),this}copyLinearToSRGB(t){return this.r=fu(t.r),this.g=fu(t.g),this.b=fu(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Gn){return fe.fromWorkingColorSpace(sn.copy(this),t),Math.round(En(sn.r*255,0,255))*65536+Math.round(En(sn.g*255,0,255))*256+Math.round(En(sn.b*255,0,255))}getHexString(t=Gn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=fe.workingColorSpace){fe.fromWorkingColorSpace(sn.copy(this),e);let n=sn.r,i=sn.g,s=sn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,u=(a+o)/2;if(a===o)l=0,c=0;else{let h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case n:l=(i-s)/h+(i<s?6:0);break;case i:l=(s-n)/h+2;break;case s:l=(n-i)/h+4;break}l/=6}return t.h=l,t.s=c,t.l=u,t}getRGB(t,e=fe.workingColorSpace){return fe.fromWorkingColorSpace(sn.copy(this),e),t.r=sn.r,t.g=sn.g,t.b=sn.b,t}getStyle(t=Gn){fe.fromWorkingColorSpace(sn.copy(this),t);let e=sn.r,n=sn.g,i=sn.b;return t!==Gn?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(t,e,n){return this.getHSL(tr),this.setHSL(tr.h+t,tr.s+e,tr.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(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(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(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}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(tr),t.getHSL(Va);let n=uu(tr.h,Va.h,e),i=uu(tr.s,Va.s,e),s=uu(tr.l,Va.l,e);return this.setHSL(n,i,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,i=this.b,s=t.elements;return this.r=s[0]*e+s[3]*n+s[6]*i,this.g=s[1]*e+s[4]*n+s[7]*i,this.b=s[2]*e+s[5]*n+s[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},sn=new re;re.NAMES=wm;var ax=0,Zr=class extends ur{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ax++}),this.uuid=Vo(),this.name="",this.type="Material",this.blending=or,this.side=lr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Uu,this.blendDst=Ou,this.blendEquation=Gr,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new re(0,0,0),this.blendAlpha=0,this.depthFunc=il,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=vp,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=xs,this.stencilZFail=xs,this.stencilZPass=xs,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}let i=this[e];if(i===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};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.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.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.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.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,n.lightMapIntensity=this.lightMapIntensity),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.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==or&&(n.blending=this.blending),this.side!==lr&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Uu&&(n.blendSrc=this.blendSrc),this.blendDst!==Ou&&(n.blendDst=this.blendDst),this.blendEquation!==Gr&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==il&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==vp&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==xs&&(n.stencilFail=this.stencilFail),this.stencilZFail!==xs&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==xs&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(s){let o=[];for(let a in s){let l=s[a];delete l.metadata,o.push(l)}return o}if(e){let s=i(t.textures),o=i(t.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,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.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let i=e.length;n=new Array(i);for(let s=0;s!==i;++s)n[s]=e[s].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,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.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}},ml=class extends Zr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new re(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Oi,this.combine=dm,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(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.envMapRotation.copy(t.envMapRotation),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.fog=t.fog,this}};var Ne=new Z,Ha=new oe,Xn=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=yp,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ir,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return $0("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(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.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)Ha.fromBufferAttribute(this,e),Ha.applyMatrix3(t),this.setXY(e,Ha.x,Ha.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyMatrix3(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyMatrix4(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.applyNormalMatrix(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ne.fromBufferAttribute(this,e),Ne.transformDirection(t),this.setXYZ(e,Ne.x,Ne.y,Ne.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Co(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=wn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Co(e,this.array)),e}setX(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Co(e,this.array)),e}setY(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Co(e,this.array)),e}setZ(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Co(e,this.array)),e}setW(t,e){return this.normalized&&(e=wn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array),i=wn(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,s){return t*=this.itemSize,this.normalized&&(e=wn(e,this.array),n=wn(n,this.array),i=wn(i,this.array),s=wn(s,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=s,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==yp&&(t.usage=this.usage),t}};var gl=class extends Xn{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var _l=class extends Xn{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var qn=class extends Xn{constructor(t,e,n){super(new Float32Array(t),e,n)}},lx=0,Hn=new Pe,Tu=new on,Ds=new Z,Ln=new Yr,Lo=new Yr,We=new Z,mi=class r extends ur{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:lx++}),this.uuid=Vo(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(bm(t)?_l:gl)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let s=new Zt().getNormalMatrix(t);n.applyNormalMatrix(s),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Hn.makeRotationFromQuaternion(t),this.applyMatrix4(Hn),this}rotateX(t){return Hn.makeRotationX(t),this.applyMatrix4(Hn),this}rotateY(t){return Hn.makeRotationY(t),this.applyMatrix4(Hn),this}rotateZ(t){return Hn.makeRotationZ(t),this.applyMatrix4(Hn),this}translate(t,e,n){return Hn.makeTranslation(t,e,n),this.applyMatrix4(Hn),this}scale(t,e,n){return Hn.makeScale(t,e,n),this.applyMatrix4(Hn),this}lookAt(t){return Tu.lookAt(t),Tu.updateMatrix(),this.applyMatrix4(Tu.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ds).negate(),this.translate(Ds.x,Ds.y,Ds.z),this}setFromPoints(t){let e=[];for(let n=0,i=t.length;n<i;n++){let s=t[n];e.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new qn(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Yr);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Z(-1/0,-1/0,-1/0),new Z(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,i=e.length;n<i;n++){let s=e[n];Ln.setFromBufferAttribute(s),this.morphTargetsRelative?(We.addVectors(this.boundingBox.min,Ln.min),this.boundingBox.expandByPoint(We),We.addVectors(this.boundingBox.max,Ln.max),this.boundingBox.expandByPoint(We)):(this.boundingBox.expandByPoint(Ln.min),this.boundingBox.expandByPoint(Ln.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Gs);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Z,1/0);return}if(t){let n=this.boundingSphere.center;if(Ln.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];Lo.setFromBufferAttribute(a),this.morphTargetsRelative?(We.addVectors(Ln.min,Lo.min),Ln.expandByPoint(We),We.addVectors(Ln.max,Lo.max),Ln.expandByPoint(We)):(Ln.expandByPoint(Lo.min),Ln.expandByPoint(Lo.max))}Ln.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)We.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(We));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)We.fromBufferAttribute(a,c),l&&(Ds.fromBufferAttribute(t,c),We.add(Ds)),i=Math.max(i,n.distanceToSquared(We))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,i=e.normal,s=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Xn(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let R=0;R<n.count;R++)a[R]=new Z,l[R]=new Z;let c=new Z,u=new Z,h=new Z,f=new oe,d=new oe,_=new oe,g=new Z,p=new Z;function m(R,y,x){c.fromBufferAttribute(n,R),u.fromBufferAttribute(n,y),h.fromBufferAttribute(n,x),f.fromBufferAttribute(s,R),d.fromBufferAttribute(s,y),_.fromBufferAttribute(s,x),u.sub(c),h.sub(c),d.sub(f),_.sub(f);let L=1/(d.x*_.y-_.x*d.y);isFinite(L)&&(g.copy(u).multiplyScalar(_.y).addScaledVector(h,-d.y).multiplyScalar(L),p.copy(h).multiplyScalar(d.x).addScaledVector(u,-_.x).multiplyScalar(L),a[R].add(g),a[y].add(g),a[x].add(g),l[R].add(p),l[y].add(p),l[x].add(p))}let S=this.groups;S.length===0&&(S=[{start:0,count:t.count}]);for(let R=0,y=S.length;R<y;++R){let x=S[R],L=x.start,F=x.count;for(let P=L,B=L+F;P<B;P+=3)m(t.getX(P+0),t.getX(P+1),t.getX(P+2))}let v=new Z,M=new Z,D=new Z,T=new Z;function E(R){D.fromBufferAttribute(i,R),T.copy(D);let y=a[R];v.copy(y),v.sub(D.multiplyScalar(D.dot(y))).normalize(),M.crossVectors(T,y);let L=M.dot(l[R])<0?-1:1;o.setXYZW(R,v.x,v.y,v.z,L)}for(let R=0,y=S.length;R<y;++R){let x=S[R],L=x.start,F=x.count;for(let P=L,B=L+F;P<B;P+=3)E(t.getX(P+0)),E(t.getX(P+1)),E(t.getX(P+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Xn(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let f=0,d=n.count;f<d;f++)n.setXYZ(f,0,0,0);let i=new Z,s=new Z,o=new Z,a=new Z,l=new Z,c=new Z,u=new Z,h=new Z;if(t)for(let f=0,d=t.count;f<d;f+=3){let _=t.getX(f+0),g=t.getX(f+1),p=t.getX(f+2);i.fromBufferAttribute(e,_),s.fromBufferAttribute(e,g),o.fromBufferAttribute(e,p),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,p),a.add(u),l.add(u),c.add(u),n.setXYZ(_,a.x,a.y,a.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let f=0,d=e.count;f<d;f+=3)i.fromBufferAttribute(e,f+0),s.fromBufferAttribute(e,f+1),o.fromBufferAttribute(e,f+2),u.subVectors(o,s),h.subVectors(i,s),u.cross(h),n.setXYZ(f+0,u.x,u.y,u.z),n.setXYZ(f+1,u.x,u.y,u.z),n.setXYZ(f+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)We.fromBufferAttribute(t,e),We.normalize(),t.setXYZ(e,We.x,We.y,We.z)}toNonIndexed(){function t(a,l){let c=a.array,u=a.itemSize,h=a.normalized,f=new c.constructor(l.length*u),d=0,_=0;for(let g=0,p=l.length;g<p;g++){a.isInterleavedBufferAttribute?d=l[g]*a.data.stride+a.offset:d=l[g]*u;for(let m=0;m<u;m++)f[_++]=c[d++]}return new Xn(f,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new r,n=this.index.array,i=this.attributes;for(let a in i){let l=i[a],c=t(l,n);e.setAttribute(a,c)}let s=this.morphAttributes;for(let a in s){let l=[],c=s[a];for(let u=0,h=c.length;u<h;u++){let f=c[u],d=t(f,n);l.push(d)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let a=0,l=o.length;a<l;a++){let c=o[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},s=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,f=c.length;h<f;h++){let d=c[h];u.push(d.toJSON(t.data))}u.length>0&&(i[l]=u,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let i=t.attributes;for(let c in i){let u=i[c];this.setAttribute(c,u.clone(e))}let s=t.morphAttributes;for(let c in s){let u=[],h=s[c];for(let f=0,d=h.length;f<d;f++)u.push(h[f].clone(e));this.morphAttributes[c]=u}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,u=o.length;c<u;c++){let h=o[c];this.addGroup(h.start,h.count,h.materialIndex)}let a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},Fp=new Pe,Br=new dl,Ga=new Gs,Np=new Z,Cs=new Z,Rs=new Z,Ps=new Z,Au=new Z,Wa=new Z,Xa=new oe,qa=new oe,Ya=new oe,Up=new Z,Op=new Z,Bp=new Z,Za=new Z,Ja=new Z,ii=class extends on{constructor(t=new mi,e=new ml){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(t,e){let n=this.geometry,i=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;e.fromBufferAttribute(i,t);let a=this.morphTargetInfluences;if(s&&a){Wa.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let u=a[l],h=s[l];u!==0&&(Au.fromBufferAttribute(h,t),o?Wa.addScaledVector(Au,u):Wa.addScaledVector(Au.sub(e),u))}e.add(Wa)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ga.copy(n.boundingSphere),Ga.applyMatrix4(s),Br.copy(t.ray).recast(t.near),!(Ga.containsPoint(Br.origin)===!1&&(Br.intersectSphere(Ga,Np)===null||Br.origin.distanceToSquared(Np)>(t.far-t.near)**2))&&(Fp.copy(s).invert(),Br.copy(t.ray).applyMatrix4(Fp),!(n.boundingBox!==null&&Br.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Br)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,f=s.groups,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],S=Math.max(p.start,d.start),v=Math.min(a.count,Math.min(p.start+p.count,d.start+d.count));for(let M=S,D=v;M<D;M+=3){let T=a.getX(M),E=a.getX(M+1),R=a.getX(M+2);i=$a(this,m,t,n,c,u,h,T,E,R),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,d.start),g=Math.min(a.count,d.start+d.count);for(let p=_,m=g;p<m;p+=3){let S=a.getX(p),v=a.getX(p+1),M=a.getX(p+2);i=$a(this,o,t,n,c,u,h,S,v,M),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],S=Math.max(p.start,d.start),v=Math.min(l.count,Math.min(p.start+p.count,d.start+d.count));for(let M=S,D=v;M<D;M+=3){let T=M,E=M+1,R=M+2;i=$a(this,m,t,n,c,u,h,T,E,R),i&&(i.faceIndex=Math.floor(M/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,d.start),g=Math.min(l.count,d.start+d.count);for(let p=_,m=g;p<m;p+=3){let S=p,v=p+1,M=p+2;i=$a(this,o,t,n,c,u,h,S,v,M),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}}};function cx(r,t,e,n,i,s,o,a){let l;if(t.side===Tn?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===lr,a),l===null)return null;Ja.copy(a),Ja.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Ja);return c<e.near||c>e.far?null:{distance:c,point:Ja.clone(),object:r}}function $a(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,Cs),r.getVertexPosition(l,Rs),r.getVertexPosition(c,Ps);let u=cx(r,t,e,n,Cs,Rs,Ps,Za);if(u){i&&(Xa.fromBufferAttribute(i,a),qa.fromBufferAttribute(i,l),Ya.fromBufferAttribute(i,c),u.uv=Ns.getInterpolation(Za,Cs,Rs,Ps,Xa,qa,Ya,new oe)),s&&(Xa.fromBufferAttribute(s,a),qa.fromBufferAttribute(s,l),Ya.fromBufferAttribute(s,c),u.uv1=Ns.getInterpolation(Za,Cs,Rs,Ps,Xa,qa,Ya,new oe)),o&&(Up.fromBufferAttribute(o,a),Op.fromBufferAttribute(o,l),Bp.fromBufferAttribute(o,c),u.normal=Ns.getInterpolation(Za,Cs,Rs,Ps,Up,Op,Bp,new Z),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));let h={a,b:l,c,normal:new Z,materialIndex:0};Ns.getNormal(Cs,Rs,Ps,h.normal),u.face=h}return u}var Oo=class r extends mi{constructor(t=1,e=1,n=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:s,depthSegments:o};let a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);let l=[],c=[],u=[],h=[],f=0,d=0;_("z","y","x",-1,-1,n,e,t,o,s,0),_("z","y","x",1,-1,n,e,-t,o,s,1),_("x","z","y",1,1,t,n,e,i,o,2),_("x","z","y",1,-1,t,n,-e,i,o,3),_("x","y","z",1,-1,t,e,n,i,s,4),_("x","y","z",-1,-1,t,e,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new qn(c,3)),this.setAttribute("normal",new qn(u,3)),this.setAttribute("uv",new qn(h,2));function _(g,p,m,S,v,M,D,T,E,R,y){let x=M/E,L=D/R,F=M/2,P=D/2,B=T/2,X=E+1,G=R+1,J=0,U=0,I=new Z;for(let A=0;A<G;A++){let it=A*L-P;for(let vt=0;vt<X;vt++){let Wt=vt*x-F;I[g]=Wt*S,I[p]=it*v,I[m]=B,c.push(I.x,I.y,I.z),I[g]=0,I[p]=0,I[m]=T>0?1:-1,u.push(I.x,I.y,I.z),h.push(vt/E),h.push(1-A/R),J+=1}}for(let A=0;A<R;A++)for(let it=0;it<E;it++){let vt=f+it+X*A,Wt=f+it+X*(A+1),q=f+(it+1)+X*(A+1),Q=f+(it+1)+X*A;l.push(vt,Wt,Q),l.push(Wt,q,Q),U+=6}a.addGroup(d,U,y),d+=U,f+=J}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Ws(r){let t={};for(let e in r){t[e]={};for(let n in r[e]){let i=r[e][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=i.clone():Array.isArray(i)?t[e][n]=i.slice():t[e][n]=i}}return t}function _n(r){let t={};for(let e=0;e<r.length;e++){let n=Ws(r[e]);for(let i in n)t[i]=n[i]}return t}function ux(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function Em(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:fe.workingColorSpace}var hx={clone:Ws,merge:_n},fx=`void main() {
|
|
2
2
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
3
3
|
}`,dx=`void main() {
|
|
4
4
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -3766,7 +3766,7 @@ Material Type: `+L.type+`
|
|
|
3766
3766
|
|
|
3767
3767
|
Program Info Log: `+F+`
|
|
3768
3768
|
`+J+`
|
|
3769
|
-
`+U)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(P===""||B==="")&&(G=!1);G&&(L.diagnostics={runnable:X,programLog:F,vertexShader:{log:P,prefix:p},fragmentShader:{log:B,prefix:m}})}i.deleteShader(D),i.deleteShader(T),R=new zs(i,g),y=aS(i,g)}let R;this.getUniforms=function(){return R===void 0&&E(this),R};let y;this.getAttributes=function(){return y===void 0&&E(this),y};let x=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return x===!1&&(x=i.getProgramParameter(g,jM)),x},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=tS++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=D,this.fragmentShader=T,this}var vS=0,Qu=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(t);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new ju(t),e.set(t,n)),n}},ju=class{constructor(t){this.id=vS++,this.code=t,this.usedTimes=0}};function yS(r,t,e,n,i,s,o){let a=new pl,l=new Qu,c=new Set,u=[],h=i.logarithmicDepthBuffer,f=i.vertexTextures,d=i.precision,_={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(y){return c.add(y),y===0?"uv":`uv${y}`}function p(y,x,L,F,P){let B=F.fog,X=P.geometry,G=y.isMeshStandardMaterial?F.environment:null,J=(y.isMeshStandardMaterial?e:t).get(y.envMap||G),U=J&&J.mapping===Rl?J.image.height:null,I=_[y.type];y.precision!==null&&(d=i.getMaxPrecision(y.precision),d!==y.precision&&console.warn("THREE.WebGLProgram.getParameters:",y.precision,"not supported, using",d,"instead."));let A=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,it=A!==void 0?A.length:0,vt=0;X.morphAttributes.position!==void 0&&(vt=1),X.morphAttributes.normal!==void 0&&(vt=2),X.morphAttributes.color!==void 0&&(vt=3);let Wt,q,Q,ct;if(I){let te=di[I];Wt=te.vertexShader,q=te.fragmentShader}else Wt=y.vertexShader,q=y.fragmentShader,l.update(y),Q=l.getVertexShaderID(y),ct=l.getFragmentShaderID(y);let tt=r.getRenderTarget(),It=P.isInstancedMesh===!0,Rt=P.isBatchedMesh===!0,z=!!y.map,Xt=!!y.matcap,bt=!!J,wt=!!y.aoMap,_t=!!y.lightMap,Ft=!!y.bumpMap,Pt=!!y.normalMap,k=!!y.displacementMap,jt=!!y.emissiveMap,C=!!y.metalnessMap,b=!!y.roughnessMap,Y=y.anisotropy>0,j=y.clearcoat>0,et=y.dispersion>0,nt=y.iridescence>0,mt=y.sheen>0,lt=y.transmission>0,rt=Y&&!!y.anisotropyMap,Lt=j&&!!y.clearcoatMap,st=j&&!!y.clearcoatNormalMap,St=j&&!!y.clearcoatRoughnessMap,Jt=nt&&!!y.iridescenceMap,gt=nt&&!!y.iridescenceThicknessMap,xt=mt&&!!y.sheenColorMap,Nt=mt&&!!y.sheenRoughnessMap,Gt=!!y.specularMap,ue=!!y.specularColorMap,Ut=!!y.specularIntensityMap,N=lt&&!!y.transmissionMap,$=lt&&!!y.thicknessMap,K=!!y.gradientMap,at=!!y.alphaMap,ut=y.alphaTest>0,Vt=!!y.alphaHash,se=!!y.extensions,ce=ar;y.toneMapped&&(tt===null||tt.isXRRenderTarget===!0)&&(ce=r.toneMapping);let pe={shaderID:I,shaderType:y.type,shaderName:y.name,vertexShader:Wt,fragmentShader:q,defines:y.defines,customVertexShaderID:Q,customFragmentShaderID:ct,isRawShaderMaterial:y.isRawShaderMaterial===!0,glslVersion:y.glslVersion,precision:d,batching:Rt,instancing:It,instancingColor:It&&P.instanceColor!==null,instancingMorph:It&&P.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:tt===null?r.outputColorSpace:tt.isXRRenderTarget===!0?tt.texture.colorSpace:fr,alphaToCoverage:!!y.alphaToCoverage,map:z,matcap:Xt,envMap:bt,envMapMode:bt&&J.mapping,envMapCubeUVHeight:U,aoMap:wt,lightMap:_t,bumpMap:Ft,normalMap:Pt,displacementMap:f&&k,emissiveMap:jt,normalMapObjectSpace:Pt&&y.normalMapType===k0,normalMapTangentSpace:Pt&&y.normalMapType===z0,metalnessMap:C,roughnessMap:b,anisotropy:Y,anisotropyMap:rt,clearcoat:j,clearcoatMap:Lt,clearcoatNormalMap:st,clearcoatRoughnessMap:St,dispersion:et,iridescence:nt,iridescenceMap:Jt,iridescenceThicknessMap:gt,sheen:mt,sheenColorMap:xt,sheenRoughnessMap:Nt,specularMap:Gt,specularColorMap:ue,specularIntensityMap:Ut,transmission:lt,transmissionMap:N,thicknessMap:$,gradientMap:K,opaque:y.transparent===!1&&y.blending===or&&y.alphaToCoverage===!1,alphaMap:at,alphaTest:ut,alphaHash:Vt,combine:y.combine,mapUv:z&&g(y.map.channel),aoMapUv:wt&&g(y.aoMap.channel),lightMapUv:_t&&g(y.lightMap.channel),bumpMapUv:Ft&&g(y.bumpMap.channel),normalMapUv:Pt&&g(y.normalMap.channel),displacementMapUv:k&&g(y.displacementMap.channel),emissiveMapUv:jt&&g(y.emissiveMap.channel),metalnessMapUv:C&&g(y.metalnessMap.channel),roughnessMapUv:b&&g(y.roughnessMap.channel),anisotropyMapUv:rt&&g(y.anisotropyMap.channel),clearcoatMapUv:Lt&&g(y.clearcoatMap.channel),clearcoatNormalMapUv:st&&g(y.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:St&&g(y.clearcoatRoughnessMap.channel),iridescenceMapUv:Jt&&g(y.iridescenceMap.channel),iridescenceThicknessMapUv:gt&&g(y.iridescenceThicknessMap.channel),sheenColorMapUv:xt&&g(y.sheenColorMap.channel),sheenRoughnessMapUv:Nt&&g(y.sheenRoughnessMap.channel),specularMapUv:Gt&&g(y.specularMap.channel),specularColorMapUv:ue&&g(y.specularColorMap.channel),specularIntensityMapUv:Ut&&g(y.specularIntensityMap.channel),transmissionMapUv:N&&g(y.transmissionMap.channel),thicknessMapUv:$&&g(y.thicknessMap.channel),alphaMapUv:at&&g(y.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(Pt||Y),vertexColors:y.vertexColors,vertexAlphas:y.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,pointsUvs:P.isPoints===!0&&!!X.attributes.uv&&(z||at),fog:!!B,useFog:y.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:y.flatShading===!0,sizeAttenuation:y.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:P.isSkinnedMesh===!0,morphTargets:X.morphAttributes.position!==void 0,morphNormals:X.morphAttributes.normal!==void 0,morphColors:X.morphAttributes.color!==void 0,morphTargetsCount:it,morphTextureStride:vt,numDirLights:x.directional.length,numPointLights:x.point.length,numSpotLights:x.spot.length,numSpotLightMaps:x.spotLightMap.length,numRectAreaLights:x.rectArea.length,numHemiLights:x.hemi.length,numDirLightShadows:x.directionalShadowMap.length,numPointLightShadows:x.pointShadowMap.length,numSpotLightShadows:x.spotShadowMap.length,numSpotLightShadowsWithMaps:x.numSpotLightShadowsWithMaps,numLightProbes:x.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:y.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:ce,useLegacyLights:r._useLegacyLights,decodeVideoTexture:z&&y.map.isVideoTexture===!0&&fe.getTransfer(y.map.colorSpace)===xe,premultipliedAlpha:y.premultipliedAlpha,doubleSided:y.side===Fi,flipSided:y.side===Tn,useDepthPacking:y.depthPacking>=0,depthPacking:y.depthPacking||0,index0AttributeName:y.index0AttributeName,extensionClipCullDistance:se&&y.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:se&&y.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:y.customProgramCacheKey()};return pe.vertexUv1s=c.has(1),pe.vertexUv2s=c.has(2),pe.vertexUv3s=c.has(3),c.clear(),pe}function m(y){let x=[];if(y.shaderID?x.push(y.shaderID):(x.push(y.customVertexShaderID),x.push(y.customFragmentShaderID)),y.defines!==void 0)for(let L in y.defines)x.push(L),x.push(y.defines[L]);return y.isRawShaderMaterial===!1&&(S(x,y),v(x,y),x.push(r.outputColorSpace)),x.push(y.customProgramCacheKey),x.join()}function S(y,x){y.push(x.precision),y.push(x.outputColorSpace),y.push(x.envMapMode),y.push(x.envMapCubeUVHeight),y.push(x.mapUv),y.push(x.alphaMapUv),y.push(x.lightMapUv),y.push(x.aoMapUv),y.push(x.bumpMapUv),y.push(x.normalMapUv),y.push(x.displacementMapUv),y.push(x.emissiveMapUv),y.push(x.metalnessMapUv),y.push(x.roughnessMapUv),y.push(x.anisotropyMapUv),y.push(x.clearcoatMapUv),y.push(x.clearcoatNormalMapUv),y.push(x.clearcoatRoughnessMapUv),y.push(x.iridescenceMapUv),y.push(x.iridescenceThicknessMapUv),y.push(x.sheenColorMapUv),y.push(x.sheenRoughnessMapUv),y.push(x.specularMapUv),y.push(x.specularColorMapUv),y.push(x.specularIntensityMapUv),y.push(x.transmissionMapUv),y.push(x.thicknessMapUv),y.push(x.combine),y.push(x.fogExp2),y.push(x.sizeAttenuation),y.push(x.morphTargetsCount),y.push(x.morphAttributeCount),y.push(x.numDirLights),y.push(x.numPointLights),y.push(x.numSpotLights),y.push(x.numSpotLightMaps),y.push(x.numHemiLights),y.push(x.numRectAreaLights),y.push(x.numDirLightShadows),y.push(x.numPointLightShadows),y.push(x.numSpotLightShadows),y.push(x.numSpotLightShadowsWithMaps),y.push(x.numLightProbes),y.push(x.shadowMapType),y.push(x.toneMapping),y.push(x.numClippingPlanes),y.push(x.numClipIntersection),y.push(x.depthPacking)}function v(y,x){a.disableAll(),x.supportsVertexTextures&&a.enable(0),x.instancing&&a.enable(1),x.instancingColor&&a.enable(2),x.instancingMorph&&a.enable(3),x.matcap&&a.enable(4),x.envMap&&a.enable(5),x.normalMapObjectSpace&&a.enable(6),x.normalMapTangentSpace&&a.enable(7),x.clearcoat&&a.enable(8),x.iridescence&&a.enable(9),x.alphaTest&&a.enable(10),x.vertexColors&&a.enable(11),x.vertexAlphas&&a.enable(12),x.vertexUv1s&&a.enable(13),x.vertexUv2s&&a.enable(14),x.vertexUv3s&&a.enable(15),x.vertexTangents&&a.enable(16),x.anisotropy&&a.enable(17),x.alphaHash&&a.enable(18),x.batching&&a.enable(19),x.dispersion&&a.enable(20),y.push(a.mask),a.disableAll(),x.fog&&a.enable(0),x.useFog&&a.enable(1),x.flatShading&&a.enable(2),x.logarithmicDepthBuffer&&a.enable(3),x.skinning&&a.enable(4),x.morphTargets&&a.enable(5),x.morphNormals&&a.enable(6),x.morphColors&&a.enable(7),x.premultipliedAlpha&&a.enable(8),x.shadowMapEnabled&&a.enable(9),x.useLegacyLights&&a.enable(10),x.doubleSided&&a.enable(11),x.flipSided&&a.enable(12),x.useDepthPacking&&a.enable(13),x.dithering&&a.enable(14),x.transmission&&a.enable(15),x.sheen&&a.enable(16),x.opaque&&a.enable(17),x.pointsUvs&&a.enable(18),x.decodeVideoTexture&&a.enable(19),x.alphaToCoverage&&a.enable(20),y.push(a.mask)}function M(y){let x=_[y.type],L;if(x){let F=di[x];L=hx.clone(F.uniforms)}else L=y.uniforms;return L}function D(y,x){let L;for(let F=0,P=u.length;F<P;F++){let B=u[F];if(B.cacheKey===x){L=B,++L.usedTimes;break}}return L===void 0&&(L=new xS(r,x,y,s),u.push(L)),L}function T(y){if(--y.usedTimes===0){let x=u.indexOf(y);u[x]=u[u.length-1],u.pop(),y.destroy()}}function E(y){l.remove(y)}function R(){l.dispose()}return{getParameters:p,getProgramCacheKey:m,getUniforms:M,acquireProgram:D,releaseProgram:T,releaseShaderCache:E,programs:u,dispose:R}}function MS(){let r=new WeakMap;function t(s){let o=r.get(s);return o===void 0&&(o={},r.set(s,o)),o}function e(s){r.delete(s)}function n(s,o,a){r.get(s)[o]=a}function i(){r=new WeakMap}return{get:t,remove:e,update:n,dispose:i}}function SS(r,t){return r.groupOrder!==t.groupOrder?r.groupOrder-t.groupOrder:r.renderOrder!==t.renderOrder?r.renderOrder-t.renderOrder:r.material.id!==t.material.id?r.material.id-t.material.id:r.z!==t.z?r.z-t.z:r.id-t.id}function sm(r,t){return r.groupOrder!==t.groupOrder?r.groupOrder-t.groupOrder:r.renderOrder!==t.renderOrder?r.renderOrder-t.renderOrder:r.z!==t.z?t.z-r.z:r.id-t.id}function om(){let r=[],t=0,e=[],n=[],i=[];function s(){t=0,e.length=0,n.length=0,i.length=0}function o(h,f,d,_,g,p){let m=r[t];return m===void 0?(m={id:h.id,object:h,geometry:f,material:d,groupOrder:_,renderOrder:h.renderOrder,z:g,group:p},r[t]=m):(m.id=h.id,m.object=h,m.geometry=f,m.material=d,m.groupOrder=_,m.renderOrder=h.renderOrder,m.z=g,m.group=p),t++,m}function a(h,f,d,_,g,p){let m=o(h,f,d,_,g,p);d.transmission>0?n.push(m):d.transparent===!0?i.push(m):e.push(m)}function l(h,f,d,_,g,p){let m=o(h,f,d,_,g,p);d.transmission>0?n.unshift(m):d.transparent===!0?i.unshift(m):e.unshift(m)}function c(h,f){e.length>1&&e.sort(h||SS),n.length>1&&n.sort(f||sm),i.length>1&&i.sort(f||sm)}function u(){for(let h=t,f=r.length;h<f;h++){let d=r[h];if(d.id===null)break;d.id=null,d.object=null,d.geometry=null,d.material=null,d.group=null}}return{opaque:e,transmissive:n,transparent:i,init:s,push:a,unshift:l,finish:u,sort:c}}function bS(){let r=new WeakMap;function t(n,i){let s=r.get(n),o;return s===void 0?(o=new om,r.set(n,[o])):i>=s.length?(o=new om,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function wS(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new Z,color:new re};break;case"SpotLight":e={position:new Z,direction:new Z,color:new re,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new Z,color:new re,distance:0,decay:0};break;case"HemisphereLight":e={direction:new Z,skyColor:new re,groundColor:new re};break;case"RectAreaLight":e={color:new re,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return r[t.id]=e,e}}}function ES(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var TS=0;function AS(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function DS(r){let t=new wS,e=ES(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new Z);let i=new Z,s=new Pe,o=new Pe;function a(c,u){let h=0,f=0,d=0;for(let L=0;L<9;L++)n.probe[L].set(0,0,0);let _=0,g=0,p=0,m=0,S=0,v=0,M=0,D=0,T=0,E=0,R=0;c.sort(AS);let y=u===!0?Math.PI:1;for(let L=0,F=c.length;L<F;L++){let P=c[L],B=P.color,X=P.intensity,G=P.distance,J=P.shadow&&P.shadow.map?P.shadow.map.texture:null;if(P.isAmbientLight)h+=B.r*X*y,f+=B.g*X*y,d+=B.b*X*y;else if(P.isLightProbe){for(let U=0;U<9;U++)n.probe[U].addScaledVector(P.sh.coefficients[U],X);R++}else if(P.isDirectionalLight){let U=t.get(P);if(U.color.copy(P.color).multiplyScalar(P.intensity*y),P.castShadow){let I=P.shadow,A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,n.directionalShadow[_]=A,n.directionalShadowMap[_]=J,n.directionalShadowMatrix[_]=P.shadow.matrix,v++}n.directional[_]=U,_++}else if(P.isSpotLight){let U=t.get(P);U.position.setFromMatrixPosition(P.matrixWorld),U.color.copy(B).multiplyScalar(X*y),U.distance=G,U.coneCos=Math.cos(P.angle),U.penumbraCos=Math.cos(P.angle*(1-P.penumbra)),U.decay=P.decay,n.spot[p]=U;let I=P.shadow;if(P.map&&(n.spotLightMap[T]=P.map,T++,I.updateMatrices(P),P.castShadow&&E++),n.spotLightMatrix[p]=I.matrix,P.castShadow){let A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,n.spotShadow[p]=A,n.spotShadowMap[p]=J,D++}p++}else if(P.isRectAreaLight){let U=t.get(P);U.color.copy(B).multiplyScalar(X),U.halfWidth.set(P.width*.5,0,0),U.halfHeight.set(0,P.height*.5,0),n.rectArea[m]=U,m++}else if(P.isPointLight){let U=t.get(P);if(U.color.copy(P.color).multiplyScalar(P.intensity*y),U.distance=P.distance,U.decay=P.decay,P.castShadow){let I=P.shadow,A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,A.shadowCameraNear=I.camera.near,A.shadowCameraFar=I.camera.far,n.pointShadow[g]=A,n.pointShadowMap[g]=J,n.pointShadowMatrix[g]=P.shadow.matrix,M++}n.point[g]=U,g++}else if(P.isHemisphereLight){let U=t.get(P);U.skyColor.copy(P.color).multiplyScalar(X*y),U.groundColor.copy(P.groundColor).multiplyScalar(X*y),n.hemi[S]=U,S++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=dt.LTC_FLOAT_1,n.rectAreaLTC2=dt.LTC_FLOAT_2):(n.rectAreaLTC1=dt.LTC_HALF_1,n.rectAreaLTC2=dt.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=f,n.ambient[2]=d;let x=n.hash;(x.directionalLength!==_||x.pointLength!==g||x.spotLength!==p||x.rectAreaLength!==m||x.hemiLength!==S||x.numDirectionalShadows!==v||x.numPointShadows!==M||x.numSpotShadows!==D||x.numSpotMaps!==T||x.numLightProbes!==R)&&(n.directional.length=_,n.spot.length=p,n.rectArea.length=m,n.point.length=g,n.hemi.length=S,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=D,n.spotShadowMap.length=D,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=D+T-E,n.spotLightMap.length=T,n.numSpotLightShadowsWithMaps=E,n.numLightProbes=R,x.directionalLength=_,x.pointLength=g,x.spotLength=p,x.rectAreaLength=m,x.hemiLength=S,x.numDirectionalShadows=v,x.numPointShadows=M,x.numSpotShadows=D,x.numSpotMaps=T,x.numLightProbes=R,n.version=TS++)}function l(c,u){let h=0,f=0,d=0,_=0,g=0,p=u.matrixWorldInverse;for(let m=0,S=c.length;m<S;m++){let v=c[m];if(v.isDirectionalLight){let M=n.directional[h];M.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(p),h++}else if(v.isSpotLight){let M=n.spot[d];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),M.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(p),d++}else if(v.isRectAreaLight){let M=n.rectArea[_];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),o.identity(),s.copy(v.matrixWorld),s.premultiply(p),o.extractRotation(s),M.halfWidth.set(v.width*.5,0,0),M.halfHeight.set(0,v.height*.5,0),M.halfWidth.applyMatrix4(o),M.halfHeight.applyMatrix4(o),_++}else if(v.isPointLight){let M=n.point[f];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),f++}else if(v.isHemisphereLight){let M=n.hemi[g];M.direction.setFromMatrixPosition(v.matrixWorld),M.direction.transformDirection(p),g++}}}return{setup:a,setupView:l,state:n}}function am(r){let t=new DS(r),e=[],n=[];function i(u){c.camera=u,e.length=0,n.length=0}function s(u){e.push(u)}function o(u){n.push(u)}function a(u){t.setup(e,u)}function l(u){t.setupView(e,u)}let c={lightsArray:e,shadowsArray:n,camera:null,lights:t,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function CS(r){let t=new WeakMap;function e(i,s=0){let o=t.get(i),a;return o===void 0?(a=new am(r),t.set(i,[a])):s>=o.length?(a=new am(r),o.push(a)):a=o[s],a}function n(){t=new WeakMap}return{get:e,dispose:n}}var th=class extends Zr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=O0,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,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}},eh=class extends Zr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},RS=`void main() {
|
|
3769
|
+
`+U)}else F!==""?console.warn("THREE.WebGLProgram: Program Info Log:",F):(P===""||B==="")&&(G=!1);G&&(L.diagnostics={runnable:X,programLog:F,vertexShader:{log:P,prefix:p},fragmentShader:{log:B,prefix:m}})}i.deleteShader(D),i.deleteShader(T),R=new zs(i,g),y=aS(i,g)}let R;this.getUniforms=function(){return R===void 0&&E(this),R};let y;this.getAttributes=function(){return y===void 0&&E(this),y};let x=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return x===!1&&(x=i.getProgramParameter(g,jM)),x},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=tS++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=D,this.fragmentShader=T,this}var vS=0,Qu=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(t);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let n of e)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache,n=e.get(t);return n===void 0&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){let e=this.shaderCache,n=e.get(t);return n===void 0&&(n=new ju(t),e.set(t,n)),n}},ju=class{constructor(t){this.id=vS++,this.code=t,this.usedTimes=0}};function yS(r,t,e,n,i,s,o){let a=new pl,l=new Qu,c=new Set,u=[],h=i.logarithmicDepthBuffer,f=i.vertexTextures,d=i.precision,_={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(y){return c.add(y),y===0?"uv":`uv${y}`}function p(y,x,L,F,P){let B=F.fog,X=P.geometry,G=y.isMeshStandardMaterial?F.environment:null,J=(y.isMeshStandardMaterial?e:t).get(y.envMap||G),U=J&&J.mapping===Rl?J.image.height:null,I=_[y.type];y.precision!==null&&(d=i.getMaxPrecision(y.precision),d!==y.precision&&console.warn("THREE.WebGLProgram.getParameters:",y.precision,"not supported, using",d,"instead."));let A=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,it=A!==void 0?A.length:0,vt=0;X.morphAttributes.position!==void 0&&(vt=1),X.morphAttributes.normal!==void 0&&(vt=2),X.morphAttributes.color!==void 0&&(vt=3);let Wt,q,Q,ct;if(I){let te=di[I];Wt=te.vertexShader,q=te.fragmentShader}else Wt=y.vertexShader,q=y.fragmentShader,l.update(y),Q=l.getVertexShaderID(y),ct=l.getFragmentShaderID(y);let tt=r.getRenderTarget(),It=P.isInstancedMesh===!0,Rt=P.isBatchedMesh===!0,z=!!y.map,Xt=!!y.matcap,bt=!!J,wt=!!y.aoMap,_t=!!y.lightMap,Ft=!!y.bumpMap,Pt=!!y.normalMap,k=!!y.displacementMap,jt=!!y.emissiveMap,C=!!y.metalnessMap,b=!!y.roughnessMap,Y=y.anisotropy>0,j=y.clearcoat>0,et=y.dispersion>0,nt=y.iridescence>0,mt=y.sheen>0,lt=y.transmission>0,rt=Y&&!!y.anisotropyMap,Lt=j&&!!y.clearcoatMap,st=j&&!!y.clearcoatNormalMap,St=j&&!!y.clearcoatRoughnessMap,Jt=nt&&!!y.iridescenceMap,gt=nt&&!!y.iridescenceThicknessMap,xt=mt&&!!y.sheenColorMap,Nt=mt&&!!y.sheenRoughnessMap,Gt=!!y.specularMap,he=!!y.specularColorMap,Ut=!!y.specularIntensityMap,N=lt&&!!y.transmissionMap,$=lt&&!!y.thicknessMap,K=!!y.gradientMap,at=!!y.alphaMap,ut=y.alphaTest>0,Vt=!!y.alphaHash,se=!!y.extensions,ue=ar;y.toneMapped&&(tt===null||tt.isXRRenderTarget===!0)&&(ue=r.toneMapping);let pe={shaderID:I,shaderType:y.type,shaderName:y.name,vertexShader:Wt,fragmentShader:q,defines:y.defines,customVertexShaderID:Q,customFragmentShaderID:ct,isRawShaderMaterial:y.isRawShaderMaterial===!0,glslVersion:y.glslVersion,precision:d,batching:Rt,instancing:It,instancingColor:It&&P.instanceColor!==null,instancingMorph:It&&P.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:tt===null?r.outputColorSpace:tt.isXRRenderTarget===!0?tt.texture.colorSpace:fr,alphaToCoverage:!!y.alphaToCoverage,map:z,matcap:Xt,envMap:bt,envMapMode:bt&&J.mapping,envMapCubeUVHeight:U,aoMap:wt,lightMap:_t,bumpMap:Ft,normalMap:Pt,displacementMap:f&&k,emissiveMap:jt,normalMapObjectSpace:Pt&&y.normalMapType===k0,normalMapTangentSpace:Pt&&y.normalMapType===z0,metalnessMap:C,roughnessMap:b,anisotropy:Y,anisotropyMap:rt,clearcoat:j,clearcoatMap:Lt,clearcoatNormalMap:st,clearcoatRoughnessMap:St,dispersion:et,iridescence:nt,iridescenceMap:Jt,iridescenceThicknessMap:gt,sheen:mt,sheenColorMap:xt,sheenRoughnessMap:Nt,specularMap:Gt,specularColorMap:he,specularIntensityMap:Ut,transmission:lt,transmissionMap:N,thicknessMap:$,gradientMap:K,opaque:y.transparent===!1&&y.blending===or&&y.alphaToCoverage===!1,alphaMap:at,alphaTest:ut,alphaHash:Vt,combine:y.combine,mapUv:z&&g(y.map.channel),aoMapUv:wt&&g(y.aoMap.channel),lightMapUv:_t&&g(y.lightMap.channel),bumpMapUv:Ft&&g(y.bumpMap.channel),normalMapUv:Pt&&g(y.normalMap.channel),displacementMapUv:k&&g(y.displacementMap.channel),emissiveMapUv:jt&&g(y.emissiveMap.channel),metalnessMapUv:C&&g(y.metalnessMap.channel),roughnessMapUv:b&&g(y.roughnessMap.channel),anisotropyMapUv:rt&&g(y.anisotropyMap.channel),clearcoatMapUv:Lt&&g(y.clearcoatMap.channel),clearcoatNormalMapUv:st&&g(y.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:St&&g(y.clearcoatRoughnessMap.channel),iridescenceMapUv:Jt&&g(y.iridescenceMap.channel),iridescenceThicknessMapUv:gt&&g(y.iridescenceThicknessMap.channel),sheenColorMapUv:xt&&g(y.sheenColorMap.channel),sheenRoughnessMapUv:Nt&&g(y.sheenRoughnessMap.channel),specularMapUv:Gt&&g(y.specularMap.channel),specularColorMapUv:he&&g(y.specularColorMap.channel),specularIntensityMapUv:Ut&&g(y.specularIntensityMap.channel),transmissionMapUv:N&&g(y.transmissionMap.channel),thicknessMapUv:$&&g(y.thicknessMap.channel),alphaMapUv:at&&g(y.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(Pt||Y),vertexColors:y.vertexColors,vertexAlphas:y.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,pointsUvs:P.isPoints===!0&&!!X.attributes.uv&&(z||at),fog:!!B,useFog:y.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:y.flatShading===!0,sizeAttenuation:y.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:P.isSkinnedMesh===!0,morphTargets:X.morphAttributes.position!==void 0,morphNormals:X.morphAttributes.normal!==void 0,morphColors:X.morphAttributes.color!==void 0,morphTargetsCount:it,morphTextureStride:vt,numDirLights:x.directional.length,numPointLights:x.point.length,numSpotLights:x.spot.length,numSpotLightMaps:x.spotLightMap.length,numRectAreaLights:x.rectArea.length,numHemiLights:x.hemi.length,numDirLightShadows:x.directionalShadowMap.length,numPointLightShadows:x.pointShadowMap.length,numSpotLightShadows:x.spotShadowMap.length,numSpotLightShadowsWithMaps:x.numSpotLightShadowsWithMaps,numLightProbes:x.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:y.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:ue,useLegacyLights:r._useLegacyLights,decodeVideoTexture:z&&y.map.isVideoTexture===!0&&fe.getTransfer(y.map.colorSpace)===xe,premultipliedAlpha:y.premultipliedAlpha,doubleSided:y.side===Fi,flipSided:y.side===Tn,useDepthPacking:y.depthPacking>=0,depthPacking:y.depthPacking||0,index0AttributeName:y.index0AttributeName,extensionClipCullDistance:se&&y.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:se&&y.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:y.customProgramCacheKey()};return pe.vertexUv1s=c.has(1),pe.vertexUv2s=c.has(2),pe.vertexUv3s=c.has(3),c.clear(),pe}function m(y){let x=[];if(y.shaderID?x.push(y.shaderID):(x.push(y.customVertexShaderID),x.push(y.customFragmentShaderID)),y.defines!==void 0)for(let L in y.defines)x.push(L),x.push(y.defines[L]);return y.isRawShaderMaterial===!1&&(S(x,y),v(x,y),x.push(r.outputColorSpace)),x.push(y.customProgramCacheKey),x.join()}function S(y,x){y.push(x.precision),y.push(x.outputColorSpace),y.push(x.envMapMode),y.push(x.envMapCubeUVHeight),y.push(x.mapUv),y.push(x.alphaMapUv),y.push(x.lightMapUv),y.push(x.aoMapUv),y.push(x.bumpMapUv),y.push(x.normalMapUv),y.push(x.displacementMapUv),y.push(x.emissiveMapUv),y.push(x.metalnessMapUv),y.push(x.roughnessMapUv),y.push(x.anisotropyMapUv),y.push(x.clearcoatMapUv),y.push(x.clearcoatNormalMapUv),y.push(x.clearcoatRoughnessMapUv),y.push(x.iridescenceMapUv),y.push(x.iridescenceThicknessMapUv),y.push(x.sheenColorMapUv),y.push(x.sheenRoughnessMapUv),y.push(x.specularMapUv),y.push(x.specularColorMapUv),y.push(x.specularIntensityMapUv),y.push(x.transmissionMapUv),y.push(x.thicknessMapUv),y.push(x.combine),y.push(x.fogExp2),y.push(x.sizeAttenuation),y.push(x.morphTargetsCount),y.push(x.morphAttributeCount),y.push(x.numDirLights),y.push(x.numPointLights),y.push(x.numSpotLights),y.push(x.numSpotLightMaps),y.push(x.numHemiLights),y.push(x.numRectAreaLights),y.push(x.numDirLightShadows),y.push(x.numPointLightShadows),y.push(x.numSpotLightShadows),y.push(x.numSpotLightShadowsWithMaps),y.push(x.numLightProbes),y.push(x.shadowMapType),y.push(x.toneMapping),y.push(x.numClippingPlanes),y.push(x.numClipIntersection),y.push(x.depthPacking)}function v(y,x){a.disableAll(),x.supportsVertexTextures&&a.enable(0),x.instancing&&a.enable(1),x.instancingColor&&a.enable(2),x.instancingMorph&&a.enable(3),x.matcap&&a.enable(4),x.envMap&&a.enable(5),x.normalMapObjectSpace&&a.enable(6),x.normalMapTangentSpace&&a.enable(7),x.clearcoat&&a.enable(8),x.iridescence&&a.enable(9),x.alphaTest&&a.enable(10),x.vertexColors&&a.enable(11),x.vertexAlphas&&a.enable(12),x.vertexUv1s&&a.enable(13),x.vertexUv2s&&a.enable(14),x.vertexUv3s&&a.enable(15),x.vertexTangents&&a.enable(16),x.anisotropy&&a.enable(17),x.alphaHash&&a.enable(18),x.batching&&a.enable(19),x.dispersion&&a.enable(20),y.push(a.mask),a.disableAll(),x.fog&&a.enable(0),x.useFog&&a.enable(1),x.flatShading&&a.enable(2),x.logarithmicDepthBuffer&&a.enable(3),x.skinning&&a.enable(4),x.morphTargets&&a.enable(5),x.morphNormals&&a.enable(6),x.morphColors&&a.enable(7),x.premultipliedAlpha&&a.enable(8),x.shadowMapEnabled&&a.enable(9),x.useLegacyLights&&a.enable(10),x.doubleSided&&a.enable(11),x.flipSided&&a.enable(12),x.useDepthPacking&&a.enable(13),x.dithering&&a.enable(14),x.transmission&&a.enable(15),x.sheen&&a.enable(16),x.opaque&&a.enable(17),x.pointsUvs&&a.enable(18),x.decodeVideoTexture&&a.enable(19),x.alphaToCoverage&&a.enable(20),y.push(a.mask)}function M(y){let x=_[y.type],L;if(x){let F=di[x];L=hx.clone(F.uniforms)}else L=y.uniforms;return L}function D(y,x){let L;for(let F=0,P=u.length;F<P;F++){let B=u[F];if(B.cacheKey===x){L=B,++L.usedTimes;break}}return L===void 0&&(L=new xS(r,x,y,s),u.push(L)),L}function T(y){if(--y.usedTimes===0){let x=u.indexOf(y);u[x]=u[u.length-1],u.pop(),y.destroy()}}function E(y){l.remove(y)}function R(){l.dispose()}return{getParameters:p,getProgramCacheKey:m,getUniforms:M,acquireProgram:D,releaseProgram:T,releaseShaderCache:E,programs:u,dispose:R}}function MS(){let r=new WeakMap;function t(s){let o=r.get(s);return o===void 0&&(o={},r.set(s,o)),o}function e(s){r.delete(s)}function n(s,o,a){r.get(s)[o]=a}function i(){r=new WeakMap}return{get:t,remove:e,update:n,dispose:i}}function SS(r,t){return r.groupOrder!==t.groupOrder?r.groupOrder-t.groupOrder:r.renderOrder!==t.renderOrder?r.renderOrder-t.renderOrder:r.material.id!==t.material.id?r.material.id-t.material.id:r.z!==t.z?r.z-t.z:r.id-t.id}function sm(r,t){return r.groupOrder!==t.groupOrder?r.groupOrder-t.groupOrder:r.renderOrder!==t.renderOrder?r.renderOrder-t.renderOrder:r.z!==t.z?t.z-r.z:r.id-t.id}function om(){let r=[],t=0,e=[],n=[],i=[];function s(){t=0,e.length=0,n.length=0,i.length=0}function o(h,f,d,_,g,p){let m=r[t];return m===void 0?(m={id:h.id,object:h,geometry:f,material:d,groupOrder:_,renderOrder:h.renderOrder,z:g,group:p},r[t]=m):(m.id=h.id,m.object=h,m.geometry=f,m.material=d,m.groupOrder=_,m.renderOrder=h.renderOrder,m.z=g,m.group=p),t++,m}function a(h,f,d,_,g,p){let m=o(h,f,d,_,g,p);d.transmission>0?n.push(m):d.transparent===!0?i.push(m):e.push(m)}function l(h,f,d,_,g,p){let m=o(h,f,d,_,g,p);d.transmission>0?n.unshift(m):d.transparent===!0?i.unshift(m):e.unshift(m)}function c(h,f){e.length>1&&e.sort(h||SS),n.length>1&&n.sort(f||sm),i.length>1&&i.sort(f||sm)}function u(){for(let h=t,f=r.length;h<f;h++){let d=r[h];if(d.id===null)break;d.id=null,d.object=null,d.geometry=null,d.material=null,d.group=null}}return{opaque:e,transmissive:n,transparent:i,init:s,push:a,unshift:l,finish:u,sort:c}}function bS(){let r=new WeakMap;function t(n,i){let s=r.get(n),o;return s===void 0?(o=new om,r.set(n,[o])):i>=s.length?(o=new om,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function wS(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new Z,color:new re};break;case"SpotLight":e={position:new Z,direction:new Z,color:new re,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new Z,color:new re,distance:0,decay:0};break;case"HemisphereLight":e={direction:new Z,skyColor:new re,groundColor:new re};break;case"RectAreaLight":e={color:new re,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return r[t.id]=e,e}}}function ES(){let r={};return{get:function(t){if(r[t.id]!==void 0)return r[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new oe,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var TS=0;function AS(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function DS(r){let t=new wS,e=ES(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new Z);let i=new Z,s=new Pe,o=new Pe;function a(c,u){let h=0,f=0,d=0;for(let L=0;L<9;L++)n.probe[L].set(0,0,0);let _=0,g=0,p=0,m=0,S=0,v=0,M=0,D=0,T=0,E=0,R=0;c.sort(AS);let y=u===!0?Math.PI:1;for(let L=0,F=c.length;L<F;L++){let P=c[L],B=P.color,X=P.intensity,G=P.distance,J=P.shadow&&P.shadow.map?P.shadow.map.texture:null;if(P.isAmbientLight)h+=B.r*X*y,f+=B.g*X*y,d+=B.b*X*y;else if(P.isLightProbe){for(let U=0;U<9;U++)n.probe[U].addScaledVector(P.sh.coefficients[U],X);R++}else if(P.isDirectionalLight){let U=t.get(P);if(U.color.copy(P.color).multiplyScalar(P.intensity*y),P.castShadow){let I=P.shadow,A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,n.directionalShadow[_]=A,n.directionalShadowMap[_]=J,n.directionalShadowMatrix[_]=P.shadow.matrix,v++}n.directional[_]=U,_++}else if(P.isSpotLight){let U=t.get(P);U.position.setFromMatrixPosition(P.matrixWorld),U.color.copy(B).multiplyScalar(X*y),U.distance=G,U.coneCos=Math.cos(P.angle),U.penumbraCos=Math.cos(P.angle*(1-P.penumbra)),U.decay=P.decay,n.spot[p]=U;let I=P.shadow;if(P.map&&(n.spotLightMap[T]=P.map,T++,I.updateMatrices(P),P.castShadow&&E++),n.spotLightMatrix[p]=I.matrix,P.castShadow){let A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,n.spotShadow[p]=A,n.spotShadowMap[p]=J,D++}p++}else if(P.isRectAreaLight){let U=t.get(P);U.color.copy(B).multiplyScalar(X),U.halfWidth.set(P.width*.5,0,0),U.halfHeight.set(0,P.height*.5,0),n.rectArea[m]=U,m++}else if(P.isPointLight){let U=t.get(P);if(U.color.copy(P.color).multiplyScalar(P.intensity*y),U.distance=P.distance,U.decay=P.decay,P.castShadow){let I=P.shadow,A=e.get(P);A.shadowBias=I.bias,A.shadowNormalBias=I.normalBias,A.shadowRadius=I.radius,A.shadowMapSize=I.mapSize,A.shadowCameraNear=I.camera.near,A.shadowCameraFar=I.camera.far,n.pointShadow[g]=A,n.pointShadowMap[g]=J,n.pointShadowMatrix[g]=P.shadow.matrix,M++}n.point[g]=U,g++}else if(P.isHemisphereLight){let U=t.get(P);U.skyColor.copy(P.color).multiplyScalar(X*y),U.groundColor.copy(P.groundColor).multiplyScalar(X*y),n.hemi[S]=U,S++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=dt.LTC_FLOAT_1,n.rectAreaLTC2=dt.LTC_FLOAT_2):(n.rectAreaLTC1=dt.LTC_HALF_1,n.rectAreaLTC2=dt.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=f,n.ambient[2]=d;let x=n.hash;(x.directionalLength!==_||x.pointLength!==g||x.spotLength!==p||x.rectAreaLength!==m||x.hemiLength!==S||x.numDirectionalShadows!==v||x.numPointShadows!==M||x.numSpotShadows!==D||x.numSpotMaps!==T||x.numLightProbes!==R)&&(n.directional.length=_,n.spot.length=p,n.rectArea.length=m,n.point.length=g,n.hemi.length=S,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=D,n.spotShadowMap.length=D,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=D+T-E,n.spotLightMap.length=T,n.numSpotLightShadowsWithMaps=E,n.numLightProbes=R,x.directionalLength=_,x.pointLength=g,x.spotLength=p,x.rectAreaLength=m,x.hemiLength=S,x.numDirectionalShadows=v,x.numPointShadows=M,x.numSpotShadows=D,x.numSpotMaps=T,x.numLightProbes=R,n.version=TS++)}function l(c,u){let h=0,f=0,d=0,_=0,g=0,p=u.matrixWorldInverse;for(let m=0,S=c.length;m<S;m++){let v=c[m];if(v.isDirectionalLight){let M=n.directional[h];M.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(p),h++}else if(v.isSpotLight){let M=n.spot[d];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),M.direction.setFromMatrixPosition(v.matrixWorld),i.setFromMatrixPosition(v.target.matrixWorld),M.direction.sub(i),M.direction.transformDirection(p),d++}else if(v.isRectAreaLight){let M=n.rectArea[_];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),o.identity(),s.copy(v.matrixWorld),s.premultiply(p),o.extractRotation(s),M.halfWidth.set(v.width*.5,0,0),M.halfHeight.set(0,v.height*.5,0),M.halfWidth.applyMatrix4(o),M.halfHeight.applyMatrix4(o),_++}else if(v.isPointLight){let M=n.point[f];M.position.setFromMatrixPosition(v.matrixWorld),M.position.applyMatrix4(p),f++}else if(v.isHemisphereLight){let M=n.hemi[g];M.direction.setFromMatrixPosition(v.matrixWorld),M.direction.transformDirection(p),g++}}}return{setup:a,setupView:l,state:n}}function am(r){let t=new DS(r),e=[],n=[];function i(u){c.camera=u,e.length=0,n.length=0}function s(u){e.push(u)}function o(u){n.push(u)}function a(u){t.setup(e,u)}function l(u){t.setupView(e,u)}let c={lightsArray:e,shadowsArray:n,camera:null,lights:t,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function CS(r){let t=new WeakMap;function e(i,s=0){let o=t.get(i),a;return o===void 0?(a=new am(r),t.set(i,[a])):s>=o.length?(a=new am(r),o.push(a)):a=o[s],a}function n(){t=new WeakMap}return{get:e,dispose:n}}var th=class extends Zr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=O0,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,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}},eh=class extends Zr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}},RS=`void main() {
|
|
3770
3770
|
gl_Position = vec4( position, 1.0 );
|
|
3771
3771
|
}`,PS=`uniform sampler2D shadow_pass;
|
|
3772
3772
|
uniform vec2 resolution;
|
|
@@ -3794,7 +3794,7 @@ void main() {
|
|
|
3794
3794
|
squared_mean = squared_mean / samples;
|
|
3795
3795
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
3796
3796
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
3797
|
-
}`;function IS(r,t,e){let n=new Bo,i=new oe,s=new oe,o=new Xe,a=new th({depthPacking:B0}),l=new eh,c={},u=e.maxTextureSize,h={[lr]:Tn,[Tn]:lr,[Fi]:Fi},f=new Zn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new oe},radius:{value:4}},vertexShader:RS,fragmentShader:PS}),d=f.clone();d.defines.HORIZONTAL_PASS=1;let _=new mi;_.setAttribute("position",new Xn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new ii(_,f),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=fm;let m=this.type;this.render=function(T,E,R){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||T.length===0)return;let y=r.getRenderTarget(),x=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),F=r.state;F.setBlending(sr),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);let P=m!==Ii&&this.type===Ii,B=m===Ii&&this.type!==Ii;for(let X=0,G=T.length;X<G;X++){let J=T[X],U=J.shadow;if(U===void 0){console.warn("THREE.WebGLShadowMap:",J,"has no shadow.");continue}if(U.autoUpdate===!1&&U.needsUpdate===!1)continue;i.copy(U.mapSize);let I=U.getFrameExtents();if(i.multiply(I),s.copy(U.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/I.x),i.x=s.x*I.x,U.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/I.y),i.y=s.y*I.y,U.mapSize.y=s.y)),U.map===null||P===!0||B===!0){let it=this.type!==Ii?{minFilter:Wn,magFilter:Wn}:{};U.map!==null&&U.map.dispose(),U.map=new Ui(i.x,i.y,it),U.map.texture.name=J.name+".shadowMap",U.camera.updateProjectionMatrix()}r.setRenderTarget(U.map),r.clear();let A=U.getViewportCount();for(let it=0;it<A;it++){let vt=U.getViewport(it);o.set(s.x*vt.x,s.y*vt.y,s.x*vt.z,s.y*vt.w),F.viewport(o),U.updateMatrices(J,it),n=U.getFrustum(),M(E,R,U.camera,J,this.type)}U.isPointLightShadow!==!0&&this.type===Ii&&S(U,R),U.needsUpdate=!1}m=this.type,p.needsUpdate=!1,r.setRenderTarget(y,x,L)};function S(T,E){let R=t.update(g);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,d.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,d.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Ui(i.x,i.y)),f.uniforms.shadow_pass.value=T.map.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,r.setRenderTarget(T.mapPass),r.clear(),r.renderBufferDirect(E,null,R,f,g,null),d.uniforms.shadow_pass.value=T.mapPass.texture,d.uniforms.resolution.value=T.mapSize,d.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(E,null,R,d,g,null)}function v(T,E,R,y){let x=null,L=R.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(L!==void 0)x=L;else if(x=R.isPointLight===!0?l:a,r.localClippingEnabled&&E.clipShadows===!0&&Array.isArray(E.clippingPlanes)&&E.clippingPlanes.length!==0||E.displacementMap&&E.displacementScale!==0||E.alphaMap&&E.alphaTest>0||E.map&&E.alphaTest>0){let F=x.uuid,P=E.uuid,B=c[F];B===void 0&&(B={},c[F]=B);let X=B[P];X===void 0&&(X=x.clone(),B[P]=X,E.addEventListener("dispose",D)),x=X}if(x.visible=E.visible,x.wireframe=E.wireframe,y===Ii?x.side=E.shadowSide!==null?E.shadowSide:E.side:x.side=E.shadowSide!==null?E.shadowSide:h[E.side],x.alphaMap=E.alphaMap,x.alphaTest=E.alphaTest,x.map=E.map,x.clipShadows=E.clipShadows,x.clippingPlanes=E.clippingPlanes,x.clipIntersection=E.clipIntersection,x.displacementMap=E.displacementMap,x.displacementScale=E.displacementScale,x.displacementBias=E.displacementBias,x.wireframeLinewidth=E.wireframeLinewidth,x.linewidth=E.linewidth,R.isPointLight===!0&&x.isMeshDistanceMaterial===!0){let F=r.properties.get(x);F.light=R}return x}function M(T,E,R,y,x){if(T.visible===!1)return;if(T.layers.test(E.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&x===Ii)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,T.matrixWorld);let P=t.update(T),B=T.material;if(Array.isArray(B)){let X=P.groups;for(let G=0,J=X.length;G<J;G++){let U=X[G],I=B[U.materialIndex];if(I&&I.visible){let A=v(T,I,y,x);T.onBeforeShadow(r,T,E,R,P,A,U),r.renderBufferDirect(R,null,P,A,T,U),T.onAfterShadow(r,T,E,R,P,A,U)}}}else if(B.visible){let X=v(T,B,y,x);T.onBeforeShadow(r,T,E,R,P,X,null),r.renderBufferDirect(R,null,P,X,T,null),T.onAfterShadow(r,T,E,R,P,X,null)}}let F=T.children;for(let P=0,B=F.length;P<B;P++)M(F[P],E,R,y,x)}function D(T){T.target.removeEventListener("dispose",D);for(let R in c){let y=c[R],x=T.target.uuid;x in y&&(y[x].dispose(),delete y[x])}}}function LS(r){function t(){let N=!1,$=new Xe,K=null,at=new Xe(0,0,0,0);return{setMask:function(ut){K!==ut&&!N&&(r.colorMask(ut,ut,ut,ut),K=ut)},setLocked:function(ut){N=ut},setClear:function(ut,Vt,se,ce,pe){pe===!0&&(ut*=ce,Vt*=ce,se*=ce),$.set(ut,Vt,se,ce),at.equals($)===!1&&(r.clearColor(ut,Vt,se,ce),at.copy($))},reset:function(){N=!1,K=null,at.set(-1,0,0,0)}}}function e(){let N=!1,$=null,K=null,at=null;return{setTest:function(ut){ut?ct(r.DEPTH_TEST):tt(r.DEPTH_TEST)},setMask:function(ut){$!==ut&&!N&&(r.depthMask(ut),$=ut)},setFunc:function(ut){if(K!==ut){switch(ut){case u0:r.depthFunc(r.NEVER);break;case h0:r.depthFunc(r.ALWAYS);break;case f0:r.depthFunc(r.LESS);break;case il:r.depthFunc(r.LEQUAL);break;case d0:r.depthFunc(r.EQUAL);break;case p0:r.depthFunc(r.GEQUAL);break;case m0:r.depthFunc(r.GREATER);break;case g0:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}K=ut}},setLocked:function(ut){N=ut},setClear:function(ut){at!==ut&&(r.clearDepth(ut),at=ut)},reset:function(){N=!1,$=null,K=null,at=null}}}function n(){let N=!1,$=null,K=null,at=null,ut=null,Vt=null,se=null,ce=null,pe=null;return{setTest:function(te){N||(te?ct(r.STENCIL_TEST):tt(r.STENCIL_TEST))},setMask:function(te){$!==te&&!N&&(r.stencilMask(te),$=te)},setFunc:function(te,Ct,yt){(K!==te||at!==Ct||ut!==yt)&&(r.stencilFunc(te,Ct,yt),K=te,at=Ct,ut=yt)},setOp:function(te,Ct,yt){(Vt!==te||se!==Ct||ce!==yt)&&(r.stencilOp(te,Ct,yt),Vt=te,se=Ct,ce=yt)},setLocked:function(te){N=te},setClear:function(te){pe!==te&&(r.clearStencil(te),pe=te)},reset:function(){N=!1,$=null,K=null,at=null,ut=null,Vt=null,se=null,ce=null,pe=null}}}let i=new t,s=new e,o=new n,a=new WeakMap,l=new WeakMap,c={},u={},h=new WeakMap,f=[],d=null,_=!1,g=null,p=null,m=null,S=null,v=null,M=null,D=null,T=new re(0,0,0),E=0,R=!1,y=null,x=null,L=null,F=null,P=null,B=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS),X=!1,G=0,J=r.getParameter(r.VERSION);J.indexOf("WebGL")!==-1?(G=parseFloat(/^WebGL (\d)/.exec(J)[1]),X=G>=1):J.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(J)[1]),X=G>=2);let U=null,I={},A=r.getParameter(r.SCISSOR_BOX),it=r.getParameter(r.VIEWPORT),vt=new Xe().fromArray(A),Wt=new Xe().fromArray(it);function q(N,$,K,at){let ut=new Uint8Array(4),Vt=r.createTexture();r.bindTexture(N,Vt),r.texParameteri(N,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(N,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let se=0;se<K;se++)N===r.TEXTURE_3D||N===r.TEXTURE_2D_ARRAY?r.texImage3D($,0,r.RGBA,1,1,at,0,r.RGBA,r.UNSIGNED_BYTE,ut):r.texImage2D($+se,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,ut);return Vt}let Q={};Q[r.TEXTURE_2D]=q(r.TEXTURE_2D,r.TEXTURE_2D,1),Q[r.TEXTURE_CUBE_MAP]=q(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),Q[r.TEXTURE_2D_ARRAY]=q(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),Q[r.TEXTURE_3D]=q(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),ct(r.DEPTH_TEST),s.setFunc(il),Ft(!1),Pt(kd),ct(r.CULL_FACE),wt(sr);function ct(N){c[N]!==!0&&(r.enable(N),c[N]=!0)}function tt(N){c[N]!==!1&&(r.disable(N),c[N]=!1)}function It(N,$){return u[N]!==$?(r.bindFramebuffer(N,$),u[N]=$,N===r.DRAW_FRAMEBUFFER&&(u[r.FRAMEBUFFER]=$),N===r.FRAMEBUFFER&&(u[r.DRAW_FRAMEBUFFER]=$),!0):!1}function Rt(N,$){let K=f,at=!1;if(N){K=h.get($),K===void 0&&(K=[],h.set($,K));let ut=N.textures;if(K.length!==ut.length||K[0]!==r.COLOR_ATTACHMENT0){for(let Vt=0,se=ut.length;Vt<se;Vt++)K[Vt]=r.COLOR_ATTACHMENT0+Vt;K.length=ut.length,at=!0}}else K[0]!==r.BACK&&(K[0]=r.BACK,at=!0);at&&r.drawBuffers(K)}function z(N){return d!==N?(r.useProgram(N),d=N,!0):!1}let Xt={[Gr]:r.FUNC_ADD,[Y_]:r.FUNC_SUBTRACT,[Z_]:r.FUNC_REVERSE_SUBTRACT};Xt[J_]=r.MIN,Xt[$_]=r.MAX;let bt={[K_]:r.ZERO,[Q_]:r.ONE,[j_]:r.SRC_COLOR,[Uu]:r.SRC_ALPHA,[s0]:r.SRC_ALPHA_SATURATE,[i0]:r.DST_COLOR,[e0]:r.DST_ALPHA,[t0]:r.ONE_MINUS_SRC_COLOR,[Ou]:r.ONE_MINUS_SRC_ALPHA,[r0]:r.ONE_MINUS_DST_COLOR,[n0]:r.ONE_MINUS_DST_ALPHA,[o0]:r.CONSTANT_COLOR,[a0]:r.ONE_MINUS_CONSTANT_COLOR,[l0]:r.CONSTANT_ALPHA,[c0]:r.ONE_MINUS_CONSTANT_ALPHA};function wt(N,$,K,at,ut,Vt,se,ce,pe,te){if(N===sr){_===!0&&(tt(r.BLEND),_=!1);return}if(_===!1&&(ct(r.BLEND),_=!0),N!==q_){if(N!==g||te!==R){if((p!==Gr||v!==Gr)&&(r.blendEquation(r.FUNC_ADD),p=Gr,v=Gr),te)switch(N){case or:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Vd:r.blendFunc(r.ONE,r.ONE);break;case Hd:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Gd:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}else switch(N){case or:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Vd:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Hd:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Gd:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}m=null,S=null,M=null,D=null,T.set(0,0,0),E=0,g=N,R=te}return}ut=ut||$,Vt=Vt||K,se=se||at,($!==p||ut!==v)&&(r.blendEquationSeparate(Xt[$],Xt[ut]),p=$,v=ut),(K!==m||at!==S||Vt!==M||se!==D)&&(r.blendFuncSeparate(bt[K],bt[at],bt[Vt],bt[se]),m=K,S=at,M=Vt,D=se),(ce.equals(T)===!1||pe!==E)&&(r.blendColor(ce.r,ce.g,ce.b,pe),T.copy(ce),E=pe),g=N,R=!1}function _t(N,$){N.side===Fi?tt(r.CULL_FACE):ct(r.CULL_FACE);let K=N.side===Tn;$&&(K=!K),Ft(K),N.blending===or&&N.transparent===!1?wt(sr):wt(N.blending,N.blendEquation,N.blendSrc,N.blendDst,N.blendEquationAlpha,N.blendSrcAlpha,N.blendDstAlpha,N.blendColor,N.blendAlpha,N.premultipliedAlpha),s.setFunc(N.depthFunc),s.setTest(N.depthTest),s.setMask(N.depthWrite),i.setMask(N.colorWrite);let at=N.stencilWrite;o.setTest(at),at&&(o.setMask(N.stencilWriteMask),o.setFunc(N.stencilFunc,N.stencilRef,N.stencilFuncMask),o.setOp(N.stencilFail,N.stencilZFail,N.stencilZPass)),jt(N.polygonOffset,N.polygonOffsetFactor,N.polygonOffsetUnits),N.alphaToCoverage===!0?ct(r.SAMPLE_ALPHA_TO_COVERAGE):tt(r.SAMPLE_ALPHA_TO_COVERAGE)}function Ft(N){y!==N&&(N?r.frontFace(r.CW):r.frontFace(r.CCW),y=N)}function Pt(N){N!==W_?(ct(r.CULL_FACE),N!==x&&(N===kd?r.cullFace(r.BACK):N===X_?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):tt(r.CULL_FACE),x=N}function k(N){N!==L&&(X&&r.lineWidth(N),L=N)}function jt(N,$,K){N?(ct(r.POLYGON_OFFSET_FILL),(F!==$||P!==K)&&(r.polygonOffset($,K),F=$,P=K)):tt(r.POLYGON_OFFSET_FILL)}function C(N){N?ct(r.SCISSOR_TEST):tt(r.SCISSOR_TEST)}function b(N){N===void 0&&(N=r.TEXTURE0+B-1),U!==N&&(r.activeTexture(N),U=N)}function Y(N,$,K){K===void 0&&(U===null?K=r.TEXTURE0+B-1:K=U);let at=I[K];at===void 0&&(at={type:void 0,texture:void 0},I[K]=at),(at.type!==N||at.texture!==$)&&(U!==K&&(r.activeTexture(K),U=K),r.bindTexture(N,$||Q[N]),at.type=N,at.texture=$)}function j(){let N=I[U];N!==void 0&&N.type!==void 0&&(r.bindTexture(N.type,null),N.type=void 0,N.texture=void 0)}function et(){try{r.compressedTexImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function nt(){try{r.compressedTexImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function mt(){try{r.texSubImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function lt(){try{r.texSubImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function rt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Lt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function st(){try{r.texStorage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function St(){try{r.texStorage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Jt(){try{r.texImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function gt(){try{r.texImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function xt(N){vt.equals(N)===!1&&(r.scissor(N.x,N.y,N.z,N.w),vt.copy(N))}function Nt(N){Wt.equals(N)===!1&&(r.viewport(N.x,N.y,N.z,N.w),Wt.copy(N))}function Gt(N,$){let K=l.get($);K===void 0&&(K=new WeakMap,l.set($,K));let at=K.get(N);at===void 0&&(at=r.getUniformBlockIndex($,N.name),K.set(N,at))}function ue(N,$){let at=l.get($).get(N);a.get($)!==at&&(r.uniformBlockBinding($,at,N.__bindingPointIndex),a.set($,at))}function Ut(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),c={},U=null,I={},u={},h=new WeakMap,f=[],d=null,_=!1,g=null,p=null,m=null,S=null,v=null,M=null,D=null,T=new re(0,0,0),E=0,R=!1,y=null,x=null,L=null,F=null,P=null,vt.set(0,0,r.canvas.width,r.canvas.height),Wt.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:ct,disable:tt,bindFramebuffer:It,drawBuffers:Rt,useProgram:z,setBlending:wt,setMaterial:_t,setFlipSided:Ft,setCullFace:Pt,setLineWidth:k,setPolygonOffset:jt,setScissorTest:C,activeTexture:b,bindTexture:Y,unbindTexture:j,compressedTexImage2D:et,compressedTexImage3D:nt,texImage2D:Jt,texImage3D:gt,updateUBOMapping:Gt,uniformBlockBinding:ue,texStorage2D:st,texStorage3D:St,texSubImage2D:mt,texSubImage3D:lt,compressedTexSubImage2D:rt,compressedTexSubImage3D:Lt,scissor:xt,viewport:Nt,reset:Ut}}function FS(r,t,e,n,i,s,o){let a=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new oe,u=new WeakMap,h,f=new WeakMap,d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(C,b){return d?new OffscreenCanvas(C,b):ul("canvas")}function g(C,b,Y){let j=1,et=jt(C);if((et.width>Y||et.height>Y)&&(j=Y/Math.max(et.width,et.height)),j<1)if(typeof HTMLImageElement<"u"&&C instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&C instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&C instanceof ImageBitmap||typeof VideoFrame<"u"&&C instanceof VideoFrame){let nt=Math.floor(j*et.width),mt=Math.floor(j*et.height);h===void 0&&(h=_(nt,mt));let lt=b?_(nt,mt):h;return lt.width=nt,lt.height=mt,lt.getContext("2d").drawImage(C,0,0,nt,mt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+et.width+"x"+et.height+") to ("+nt+"x"+mt+")."),lt}else return"data"in C&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+et.width+"x"+et.height+")."),C;return C}function p(C){return C.generateMipmaps&&C.minFilter!==Wn&&C.minFilter!==ni}function m(C){r.generateMipmap(C)}function S(C,b,Y,j,et=!1){if(C!==null){if(r[C]!==void 0)return r[C];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+C+"'")}let nt=b;if(b===r.RED&&(Y===r.FLOAT&&(nt=r.R32F),Y===r.HALF_FLOAT&&(nt=r.R16F),Y===r.UNSIGNED_BYTE&&(nt=r.R8)),b===r.RED_INTEGER&&(Y===r.UNSIGNED_BYTE&&(nt=r.R8UI),Y===r.UNSIGNED_SHORT&&(nt=r.R16UI),Y===r.UNSIGNED_INT&&(nt=r.R32UI),Y===r.BYTE&&(nt=r.R8I),Y===r.SHORT&&(nt=r.R16I),Y===r.INT&&(nt=r.R32I)),b===r.RG&&(Y===r.FLOAT&&(nt=r.RG32F),Y===r.HALF_FLOAT&&(nt=r.RG16F),Y===r.UNSIGNED_BYTE&&(nt=r.RG8)),b===r.RG_INTEGER&&(Y===r.UNSIGNED_BYTE&&(nt=r.RG8UI),Y===r.UNSIGNED_SHORT&&(nt=r.RG16UI),Y===r.UNSIGNED_INT&&(nt=r.RG32UI),Y===r.BYTE&&(nt=r.RG8I),Y===r.SHORT&&(nt=r.RG16I),Y===r.INT&&(nt=r.RG32I)),b===r.RGB&&Y===r.UNSIGNED_INT_5_9_9_9_REV&&(nt=r.RGB9_E5),b===r.RGBA){let mt=et?ol:fe.getTransfer(j);Y===r.FLOAT&&(nt=r.RGBA32F),Y===r.HALF_FLOAT&&(nt=r.RGBA16F),Y===r.UNSIGNED_BYTE&&(nt=mt===xe?r.SRGB8_ALPHA8:r.RGBA8),Y===r.UNSIGNED_SHORT_4_4_4_4&&(nt=r.RGBA4),Y===r.UNSIGNED_SHORT_5_5_5_1&&(nt=r.RGB5_A1)}return(nt===r.R16F||nt===r.R32F||nt===r.RG16F||nt===r.RG32F||nt===r.RGBA16F||nt===r.RGBA32F)&&t.get("EXT_color_buffer_float"),nt}function v(C,b){return p(C)===!0||C.isFramebufferTexture&&C.minFilter!==Wn&&C.minFilter!==ni?Math.log2(Math.max(b.width,b.height))+1:C.mipmaps!==void 0&&C.mipmaps.length>0?C.mipmaps.length:C.isCompressedTexture&&Array.isArray(C.image)?b.mipmaps.length:1}function M(C){let b=C.target;b.removeEventListener("dispose",M),T(b),b.isVideoTexture&&u.delete(b)}function D(C){let b=C.target;b.removeEventListener("dispose",D),R(b)}function T(C){let b=n.get(C);if(b.__webglInit===void 0)return;let Y=C.source,j=f.get(Y);if(j){let et=j[b.__cacheKey];et.usedTimes--,et.usedTimes===0&&E(C),Object.keys(j).length===0&&f.delete(Y)}n.remove(C)}function E(C){let b=n.get(C);r.deleteTexture(b.__webglTexture);let Y=C.source,j=f.get(Y);delete j[b.__cacheKey],o.memory.textures--}function R(C){let b=n.get(C);if(C.depthTexture&&C.depthTexture.dispose(),C.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(b.__webglFramebuffer[j]))for(let et=0;et<b.__webglFramebuffer[j].length;et++)r.deleteFramebuffer(b.__webglFramebuffer[j][et]);else r.deleteFramebuffer(b.__webglFramebuffer[j]);b.__webglDepthbuffer&&r.deleteRenderbuffer(b.__webglDepthbuffer[j])}else{if(Array.isArray(b.__webglFramebuffer))for(let j=0;j<b.__webglFramebuffer.length;j++)r.deleteFramebuffer(b.__webglFramebuffer[j]);else r.deleteFramebuffer(b.__webglFramebuffer);if(b.__webglDepthbuffer&&r.deleteRenderbuffer(b.__webglDepthbuffer),b.__webglMultisampledFramebuffer&&r.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer)for(let j=0;j<b.__webglColorRenderbuffer.length;j++)b.__webglColorRenderbuffer[j]&&r.deleteRenderbuffer(b.__webglColorRenderbuffer[j]);b.__webglDepthRenderbuffer&&r.deleteRenderbuffer(b.__webglDepthRenderbuffer)}let Y=C.textures;for(let j=0,et=Y.length;j<et;j++){let nt=n.get(Y[j]);nt.__webglTexture&&(r.deleteTexture(nt.__webglTexture),o.memory.textures--),n.remove(Y[j])}n.remove(C)}let y=0;function x(){y=0}function L(){let C=y;return C>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+C+" texture units while this GPU supports only "+i.maxTextures),y+=1,C}function F(C){let b=[];return b.push(C.wrapS),b.push(C.wrapT),b.push(C.wrapR||0),b.push(C.magFilter),b.push(C.minFilter),b.push(C.anisotropy),b.push(C.internalFormat),b.push(C.format),b.push(C.type),b.push(C.generateMipmaps),b.push(C.premultiplyAlpha),b.push(C.flipY),b.push(C.unpackAlignment),b.push(C.colorSpace),b.join()}function P(C,b){let Y=n.get(C);if(C.isVideoTexture&&Pt(C),C.isRenderTargetTexture===!1&&C.version>0&&Y.__version!==C.version){let j=C.image;if(j===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(j.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{vt(Y,C,b);return}}e.bindTexture(r.TEXTURE_2D,Y.__webglTexture,r.TEXTURE0+b)}function B(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){vt(Y,C,b);return}e.bindTexture(r.TEXTURE_2D_ARRAY,Y.__webglTexture,r.TEXTURE0+b)}function X(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){vt(Y,C,b);return}e.bindTexture(r.TEXTURE_3D,Y.__webglTexture,r.TEXTURE0+b)}function G(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){Wt(Y,C,b);return}e.bindTexture(r.TEXTURE_CUBE_MAP,Y.__webglTexture,r.TEXTURE0+b)}let J={[ku]:r.REPEAT,[Xr]:r.CLAMP_TO_EDGE,[Vu]:r.MIRRORED_REPEAT},U={[Wn]:r.NEAREST,[T0]:r.NEAREST_MIPMAP_NEAREST,[Ia]:r.NEAREST_MIPMAP_LINEAR,[ni]:r.LINEAR,[nu]:r.LINEAR_MIPMAP_NEAREST,[qr]:r.LINEAR_MIPMAP_LINEAR},I={[V0]:r.NEVER,[Y0]:r.ALWAYS,[H0]:r.LESS,[Sm]:r.LEQUAL,[G0]:r.EQUAL,[q0]:r.GEQUAL,[W0]:r.GREATER,[X0]:r.NOTEQUAL};function A(C,b){if(b.type===ir&&t.has("OES_texture_float_linear")===!1&&(b.magFilter===ni||b.magFilter===nu||b.magFilter===Ia||b.magFilter===qr||b.minFilter===ni||b.minFilter===nu||b.minFilter===Ia||b.minFilter===qr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(C,r.TEXTURE_WRAP_S,J[b.wrapS]),r.texParameteri(C,r.TEXTURE_WRAP_T,J[b.wrapT]),(C===r.TEXTURE_3D||C===r.TEXTURE_2D_ARRAY)&&r.texParameteri(C,r.TEXTURE_WRAP_R,J[b.wrapR]),r.texParameteri(C,r.TEXTURE_MAG_FILTER,U[b.magFilter]),r.texParameteri(C,r.TEXTURE_MIN_FILTER,U[b.minFilter]),b.compareFunction&&(r.texParameteri(C,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(C,r.TEXTURE_COMPARE_FUNC,I[b.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(b.magFilter===Wn||b.minFilter!==Ia&&b.minFilter!==qr||b.type===ir&&t.has("OES_texture_float_linear")===!1)return;if(b.anisotropy>1||n.get(b).__currentAnisotropy){let Y=t.get("EXT_texture_filter_anisotropic");r.texParameterf(C,Y.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,i.getMaxAnisotropy())),n.get(b).__currentAnisotropy=b.anisotropy}}}function it(C,b){let Y=!1;C.__webglInit===void 0&&(C.__webglInit=!0,b.addEventListener("dispose",M));let j=b.source,et=f.get(j);et===void 0&&(et={},f.set(j,et));let nt=F(b);if(nt!==C.__cacheKey){et[nt]===void 0&&(et[nt]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,Y=!0),et[nt].usedTimes++;let mt=et[C.__cacheKey];mt!==void 0&&(et[C.__cacheKey].usedTimes--,mt.usedTimes===0&&E(b)),C.__cacheKey=nt,C.__webglTexture=et[nt].texture}return Y}function vt(C,b,Y){let j=r.TEXTURE_2D;(b.isDataArrayTexture||b.isCompressedArrayTexture)&&(j=r.TEXTURE_2D_ARRAY),b.isData3DTexture&&(j=r.TEXTURE_3D);let et=it(C,b),nt=b.source;e.bindTexture(j,C.__webglTexture,r.TEXTURE0+Y);let mt=n.get(nt);if(nt.version!==mt.__version||et===!0){e.activeTexture(r.TEXTURE0+Y);let lt=fe.getPrimaries(fe.workingColorSpace),rt=b.colorSpace===nr?null:fe.getPrimaries(b.colorSpace),Lt=b.colorSpace===nr||lt===rt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,b.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Lt);let st=g(b.image,!1,i.maxTextureSize);st=k(b,st);let St=s.convert(b.format,b.colorSpace),Jt=s.convert(b.type),gt=S(b.internalFormat,St,Jt,b.colorSpace,b.isVideoTexture);A(j,b);let xt,Nt=b.mipmaps,Gt=b.isVideoTexture!==!0,ue=mt.__version===void 0||et===!0,Ut=nt.dataReady,N=v(b,st);if(b.isDepthTexture)gt=r.DEPTH_COMPONENT16,b.type===ir?gt=r.DEPTH_COMPONENT32F:b.type===Hs?gt=r.DEPTH_COMPONENT24:b.type===ko&&(gt=r.DEPTH24_STENCIL8),ue&&(Gt?e.texStorage2D(r.TEXTURE_2D,1,gt,st.width,st.height):e.texImage2D(r.TEXTURE_2D,0,gt,st.width,st.height,0,St,Jt,null));else if(b.isDataTexture)if(Nt.length>0){Gt&&ue&&e.texStorage2D(r.TEXTURE_2D,N,gt,Nt[0].width,Nt[0].height);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,Jt,xt.data):e.texImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,St,Jt,xt.data);b.generateMipmaps=!1}else Gt?(ue&&e.texStorage2D(r.TEXTURE_2D,N,gt,st.width,st.height),Ut&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,st.width,st.height,St,Jt,st.data)):e.texImage2D(r.TEXTURE_2D,0,gt,st.width,st.height,0,St,Jt,st.data);else if(b.isCompressedTexture)if(b.isCompressedArrayTexture){Gt&&ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,N,gt,Nt[0].width,Nt[0].height,st.depth);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],b.format!==pi?St!==null?Gt?Ut&&e.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,$,0,0,0,xt.width,xt.height,st.depth,St,xt.data,0,0):e.compressedTexImage3D(r.TEXTURE_2D_ARRAY,$,gt,xt.width,xt.height,st.depth,0,xt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Gt?Ut&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,$,0,0,0,xt.width,xt.height,st.depth,St,Jt,xt.data):e.texImage3D(r.TEXTURE_2D_ARRAY,$,gt,xt.width,xt.height,st.depth,0,St,Jt,xt.data)}else{Gt&&ue&&e.texStorage2D(r.TEXTURE_2D,N,gt,Nt[0].width,Nt[0].height);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],b.format!==pi?St!==null?Gt?Ut&&e.compressedTexSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,xt.data):e.compressedTexImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,xt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,Jt,xt.data):e.texImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,St,Jt,xt.data)}else if(b.isDataArrayTexture)Gt?(ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,N,gt,st.width,st.height,st.depth),Ut&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,st.width,st.height,st.depth,St,Jt,st.data)):e.texImage3D(r.TEXTURE_2D_ARRAY,0,gt,st.width,st.height,st.depth,0,St,Jt,st.data);else if(b.isData3DTexture)Gt?(ue&&e.texStorage3D(r.TEXTURE_3D,N,gt,st.width,st.height,st.depth),Ut&&e.texSubImage3D(r.TEXTURE_3D,0,0,0,0,st.width,st.height,st.depth,St,Jt,st.data)):e.texImage3D(r.TEXTURE_3D,0,gt,st.width,st.height,st.depth,0,St,Jt,st.data);else if(b.isFramebufferTexture){if(ue)if(Gt)e.texStorage2D(r.TEXTURE_2D,N,gt,st.width,st.height);else{let $=st.width,K=st.height;for(let at=0;at<N;at++)e.texImage2D(r.TEXTURE_2D,at,gt,$,K,0,St,Jt,null),$>>=1,K>>=1}}else if(Nt.length>0){if(Gt&&ue){let $=jt(Nt[0]);e.texStorage2D(r.TEXTURE_2D,N,gt,$.width,$.height)}for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,St,Jt,xt):e.texImage2D(r.TEXTURE_2D,$,gt,St,Jt,xt);b.generateMipmaps=!1}else if(Gt){if(ue){let $=jt(st);e.texStorage2D(r.TEXTURE_2D,N,gt,$.width,$.height)}Ut&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,St,Jt,st)}else e.texImage2D(r.TEXTURE_2D,0,gt,St,Jt,st);p(b)&&m(j),mt.__version=nt.version,b.onUpdate&&b.onUpdate(b)}C.__version=b.version}function Wt(C,b,Y){if(b.image.length!==6)return;let j=it(C,b),et=b.source;e.bindTexture(r.TEXTURE_CUBE_MAP,C.__webglTexture,r.TEXTURE0+Y);let nt=n.get(et);if(et.version!==nt.__version||j===!0){e.activeTexture(r.TEXTURE0+Y);let mt=fe.getPrimaries(fe.workingColorSpace),lt=b.colorSpace===nr?null:fe.getPrimaries(b.colorSpace),rt=b.colorSpace===nr||mt===lt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,b.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,rt);let Lt=b.isCompressedTexture||b.image[0].isCompressedTexture,st=b.image[0]&&b.image[0].isDataTexture,St=[];for(let K=0;K<6;K++)!Lt&&!st?St[K]=g(b.image[K],!0,i.maxCubemapSize):St[K]=st?b.image[K].image:b.image[K],St[K]=k(b,St[K]);let Jt=St[0],gt=s.convert(b.format,b.colorSpace),xt=s.convert(b.type),Nt=S(b.internalFormat,gt,xt,b.colorSpace),Gt=b.isVideoTexture!==!0,ue=nt.__version===void 0||j===!0,Ut=et.dataReady,N=v(b,Jt);A(r.TEXTURE_CUBE_MAP,b);let $;if(Lt){Gt&&ue&&e.texStorage2D(r.TEXTURE_CUBE_MAP,N,Nt,Jt.width,Jt.height);for(let K=0;K<6;K++){$=St[K].mipmaps;for(let at=0;at<$.length;at++){let ut=$[at];b.format!==pi?gt!==null?Gt?Ut&&e.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,0,0,ut.width,ut.height,gt,ut.data):e.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,Nt,ut.width,ut.height,0,ut.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,0,0,ut.width,ut.height,gt,xt,ut.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,Nt,ut.width,ut.height,0,gt,xt,ut.data)}}}else{if($=b.mipmaps,Gt&&ue){$.length>0&&N++;let K=jt(St[0]);e.texStorage2D(r.TEXTURE_CUBE_MAP,N,Nt,K.width,K.height)}for(let K=0;K<6;K++)if(st){Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,0,0,St[K].width,St[K].height,gt,xt,St[K].data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,Nt,St[K].width,St[K].height,0,gt,xt,St[K].data);for(let at=0;at<$.length;at++){let Vt=$[at].image[K].image;Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,0,0,Vt.width,Vt.height,gt,xt,Vt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,Nt,Vt.width,Vt.height,0,gt,xt,Vt.data)}}else{Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,0,0,gt,xt,St[K]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,Nt,gt,xt,St[K]);for(let at=0;at<$.length;at++){let ut=$[at];Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,0,0,gt,xt,ut.image[K]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,Nt,gt,xt,ut.image[K])}}}p(b)&&m(r.TEXTURE_CUBE_MAP),nt.__version=et.version,b.onUpdate&&b.onUpdate(b)}C.__version=b.version}function q(C,b,Y,j,et,nt){let mt=s.convert(Y.format,Y.colorSpace),lt=s.convert(Y.type),rt=S(Y.internalFormat,mt,lt,Y.colorSpace);if(!n.get(b).__hasExternalTextures){let st=Math.max(1,b.width>>nt),St=Math.max(1,b.height>>nt);et===r.TEXTURE_3D||et===r.TEXTURE_2D_ARRAY?e.texImage3D(et,nt,rt,st,St,b.depth,0,mt,lt,null):e.texImage2D(et,nt,rt,st,St,0,mt,lt,null)}e.bindFramebuffer(r.FRAMEBUFFER,C),Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,j,et,n.get(Y).__webglTexture,0,_t(b)):(et===r.TEXTURE_2D||et>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&et<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,j,et,n.get(Y).__webglTexture,nt),e.bindFramebuffer(r.FRAMEBUFFER,null)}function Q(C,b,Y){if(r.bindRenderbuffer(r.RENDERBUFFER,C),b.depthBuffer&&!b.stencilBuffer){let j=r.DEPTH_COMPONENT24;if(Y||Ft(b)){let et=b.depthTexture;et&&et.isDepthTexture&&(et.type===ir?j=r.DEPTH_COMPONENT32F:et.type===Hs&&(j=r.DEPTH_COMPONENT24));let nt=_t(b);Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,nt,j,b.width,b.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,nt,j,b.width,b.height)}else r.renderbufferStorage(r.RENDERBUFFER,j,b.width,b.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,C)}else if(b.depthBuffer&&b.stencilBuffer){let j=_t(b);Y&&Ft(b)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,j,r.DEPTH24_STENCIL8,b.width,b.height):Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,j,r.DEPTH24_STENCIL8,b.width,b.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,C)}else{let j=b.textures;for(let et=0;et<j.length;et++){let nt=j[et],mt=s.convert(nt.format,nt.colorSpace),lt=s.convert(nt.type),rt=S(nt.internalFormat,mt,lt,nt.colorSpace),Lt=_t(b);Y&&Ft(b)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Lt,rt,b.width,b.height):Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Lt,rt,b.width,b.height):r.renderbufferStorage(r.RENDERBUFFER,rt,b.width,b.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function ct(C,b){if(b&&b.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(r.FRAMEBUFFER,C),!(b.depthTexture&&b.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(b.depthTexture).__webglTexture||b.depthTexture.image.width!==b.width||b.depthTexture.image.height!==b.height)&&(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0),P(b.depthTexture,0);let j=n.get(b.depthTexture).__webglTexture,et=_t(b);if(b.depthTexture.format===Os)Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,j,0,et):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,j,0);else if(b.depthTexture.format===Uo)Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,j,0,et):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,j,0);else throw new Error("Unknown depthTexture format")}function tt(C){let b=n.get(C),Y=C.isWebGLCubeRenderTarget===!0;if(C.depthTexture&&!b.__autoAllocateDepthBuffer){if(Y)throw new Error("target.depthTexture not supported in Cube render targets");ct(b.__webglFramebuffer,C)}else if(Y){b.__webglDepthbuffer=[];for(let j=0;j<6;j++)e.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer[j]),b.__webglDepthbuffer[j]=r.createRenderbuffer(),Q(b.__webglDepthbuffer[j],C,!1)}else e.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer),b.__webglDepthbuffer=r.createRenderbuffer(),Q(b.__webglDepthbuffer,C,!1);e.bindFramebuffer(r.FRAMEBUFFER,null)}function It(C,b,Y){let j=n.get(C);b!==void 0&&q(j.__webglFramebuffer,C,C.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),Y!==void 0&&tt(C)}function Rt(C){let b=C.texture,Y=n.get(C),j=n.get(b);C.addEventListener("dispose",D);let et=C.textures,nt=C.isWebGLCubeRenderTarget===!0,mt=et.length>1;if(mt||(j.__webglTexture===void 0&&(j.__webglTexture=r.createTexture()),j.__version=b.version,o.memory.textures++),nt){Y.__webglFramebuffer=[];for(let lt=0;lt<6;lt++)if(b.mipmaps&&b.mipmaps.length>0){Y.__webglFramebuffer[lt]=[];for(let rt=0;rt<b.mipmaps.length;rt++)Y.__webglFramebuffer[lt][rt]=r.createFramebuffer()}else Y.__webglFramebuffer[lt]=r.createFramebuffer()}else{if(b.mipmaps&&b.mipmaps.length>0){Y.__webglFramebuffer=[];for(let lt=0;lt<b.mipmaps.length;lt++)Y.__webglFramebuffer[lt]=r.createFramebuffer()}else Y.__webglFramebuffer=r.createFramebuffer();if(mt)for(let lt=0,rt=et.length;lt<rt;lt++){let Lt=n.get(et[lt]);Lt.__webglTexture===void 0&&(Lt.__webglTexture=r.createTexture(),o.memory.textures++)}if(C.samples>0&&Ft(C)===!1){Y.__webglMultisampledFramebuffer=r.createFramebuffer(),Y.__webglColorRenderbuffer=[],e.bindFramebuffer(r.FRAMEBUFFER,Y.__webglMultisampledFramebuffer);for(let lt=0;lt<et.length;lt++){let rt=et[lt];Y.__webglColorRenderbuffer[lt]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,Y.__webglColorRenderbuffer[lt]);let Lt=s.convert(rt.format,rt.colorSpace),st=s.convert(rt.type),St=S(rt.internalFormat,Lt,st,rt.colorSpace,C.isXRRenderTarget===!0),Jt=_t(C);r.renderbufferStorageMultisample(r.RENDERBUFFER,Jt,St,C.width,C.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,Y.__webglColorRenderbuffer[lt])}r.bindRenderbuffer(r.RENDERBUFFER,null),C.depthBuffer&&(Y.__webglDepthRenderbuffer=r.createRenderbuffer(),Q(Y.__webglDepthRenderbuffer,C,!0)),e.bindFramebuffer(r.FRAMEBUFFER,null)}}if(nt){e.bindTexture(r.TEXTURE_CUBE_MAP,j.__webglTexture),A(r.TEXTURE_CUBE_MAP,b);for(let lt=0;lt<6;lt++)if(b.mipmaps&&b.mipmaps.length>0)for(let rt=0;rt<b.mipmaps.length;rt++)q(Y.__webglFramebuffer[lt][rt],C,b,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+lt,rt);else q(Y.__webglFramebuffer[lt],C,b,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+lt,0);p(b)&&m(r.TEXTURE_CUBE_MAP),e.unbindTexture()}else if(mt){for(let lt=0,rt=et.length;lt<rt;lt++){let Lt=et[lt],st=n.get(Lt);e.bindTexture(r.TEXTURE_2D,st.__webglTexture),A(r.TEXTURE_2D,Lt),q(Y.__webglFramebuffer,C,Lt,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,0),p(Lt)&&m(r.TEXTURE_2D)}e.unbindTexture()}else{let lt=r.TEXTURE_2D;if((C.isWebGL3DRenderTarget||C.isWebGLArrayRenderTarget)&&(lt=C.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),e.bindTexture(lt,j.__webglTexture),A(lt,b),b.mipmaps&&b.mipmaps.length>0)for(let rt=0;rt<b.mipmaps.length;rt++)q(Y.__webglFramebuffer[rt],C,b,r.COLOR_ATTACHMENT0,lt,rt);else q(Y.__webglFramebuffer,C,b,r.COLOR_ATTACHMENT0,lt,0);p(b)&&m(lt),e.unbindTexture()}C.depthBuffer&&tt(C)}function z(C){let b=C.textures;for(let Y=0,j=b.length;Y<j;Y++){let et=b[Y];if(p(et)){let nt=C.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,mt=n.get(et).__webglTexture;e.bindTexture(nt,mt),m(nt),e.unbindTexture()}}}let Xt=[],bt=[];function wt(C){if(C.samples>0){if(Ft(C)===!1){let b=C.textures,Y=C.width,j=C.height,et=r.COLOR_BUFFER_BIT,nt=C.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,mt=n.get(C),lt=b.length>1;if(lt)for(let rt=0;rt<b.length;rt++)e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.RENDERBUFFER,null),e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.TEXTURE_2D,null,0);e.bindFramebuffer(r.READ_FRAMEBUFFER,mt.__webglMultisampledFramebuffer),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,mt.__webglFramebuffer);for(let rt=0;rt<b.length;rt++){if(C.resolveDepthBuffer&&(C.depthBuffer&&(et|=r.DEPTH_BUFFER_BIT),C.stencilBuffer&&C.resolveStencilBuffer&&(et|=r.STENCIL_BUFFER_BIT)),lt){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,mt.__webglColorRenderbuffer[rt]);let Lt=n.get(b[rt]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,Lt,0)}r.blitFramebuffer(0,0,Y,j,0,0,Y,j,et,r.NEAREST),l===!0&&(Xt.length=0,bt.length=0,Xt.push(r.COLOR_ATTACHMENT0+rt),C.depthBuffer&&C.resolveDepthBuffer===!1&&(Xt.push(nt),bt.push(nt),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,bt)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,Xt))}if(e.bindFramebuffer(r.READ_FRAMEBUFFER,null),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),lt)for(let rt=0;rt<b.length;rt++){e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.RENDERBUFFER,mt.__webglColorRenderbuffer[rt]);let Lt=n.get(b[rt]).__webglTexture;e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.TEXTURE_2D,Lt,0)}e.bindFramebuffer(r.DRAW_FRAMEBUFFER,mt.__webglMultisampledFramebuffer)}else if(C.depthBuffer&&C.resolveDepthBuffer===!1&&l){let b=C.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[b])}}}function _t(C){return Math.min(i.maxSamples,C.samples)}function Ft(C){let b=n.get(C);return C.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&b.__useRenderToTexture!==!1}function Pt(C){let b=o.render.frame;u.get(C)!==b&&(u.set(C,b),C.update())}function k(C,b){let Y=C.colorSpace,j=C.format,et=C.type;return C.isCompressedTexture===!0||C.isVideoTexture===!0||Y!==fr&&Y!==nr&&(fe.getTransfer(Y)===xe?(j!==pi||et!==cr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Y)),b}function jt(C){return typeof HTMLImageElement<"u"&&C instanceof HTMLImageElement?(c.width=C.naturalWidth||C.width,c.height=C.naturalHeight||C.height):typeof VideoFrame<"u"&&C instanceof VideoFrame?(c.width=C.displayWidth,c.height=C.displayHeight):(c.width=C.width,c.height=C.height),c}this.allocateTextureUnit=L,this.resetTextureUnits=x,this.setTexture2D=P,this.setTexture2DArray=B,this.setTexture3D=X,this.setTextureCube=G,this.rebindTextures=It,this.setupRenderTarget=Rt,this.updateRenderTargetMipmap=z,this.updateMultisampleRenderTarget=wt,this.setupDepthRenderbuffer=tt,this.setupFrameBufferTexture=q,this.useMultisampledRTT=Ft}function NS(r,t){function e(n,i=nr){let s,o=fe.getTransfer(i);if(n===cr)return r.UNSIGNED_BYTE;if(n===_m)return r.UNSIGNED_SHORT_4_4_4_4;if(n===xm)return r.UNSIGNED_SHORT_5_5_5_1;if(n===C0)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===A0)return r.BYTE;if(n===D0)return r.SHORT;if(n===mm)return r.UNSIGNED_SHORT;if(n===gm)return r.INT;if(n===Hs)return r.UNSIGNED_INT;if(n===ir)return r.FLOAT;if(n===Pl)return r.HALF_FLOAT;if(n===R0)return r.ALPHA;if(n===P0)return r.RGB;if(n===pi)return r.RGBA;if(n===I0)return r.LUMINANCE;if(n===L0)return r.LUMINANCE_ALPHA;if(n===Os)return r.DEPTH_COMPONENT;if(n===Uo)return r.DEPTH_STENCIL;if(n===F0)return r.RED;if(n===vm)return r.RED_INTEGER;if(n===N0)return r.RG;if(n===ym)return r.RG_INTEGER;if(n===Mm)return r.RGBA_INTEGER;if(n===iu||n===ru||n===su||n===ou)if(o===xe)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===iu)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===ru)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===su)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ou)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===iu)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===ru)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===su)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ou)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Wd||n===Xd||n===qd||n===Yd)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Wd)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Xd)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===qd)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Yd)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Zd||n===Jd||n===$d)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Zd||n===Jd)return o===xe?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===$d)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Kd||n===Qd||n===jd||n===tp||n===ep||n===np||n===ip||n===rp||n===sp||n===op||n===ap||n===lp||n===cp||n===up)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Kd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Qd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===jd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===tp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===ep)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===np)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ip)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===rp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===sp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===op)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===ap)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===lp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===cp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===up)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===au||n===hp||n===fp)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(n===au)return o===xe?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===hp)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===fp)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===U0||n===dp||n===pp||n===mp)if(s=t.get("EXT_texture_compression_rgtc"),s!==null){if(n===au)return s.COMPRESSED_RED_RGTC1_EXT;if(n===dp)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===pp)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===mp)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===ko?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:e}}var nh=class extends xn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},rr=class extends on{constructor(){super(),this.isGroup=!0,this.type="Group"}},US={type:"move"},No=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,o=null,a=this._targetRay,l=this._grip,c=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(c&&t.hand){o=!0;for(let g of t.hand.values()){let p=e.getJointPose(g,n),m=this._getHandJoint(c,g);p!==null&&(m.matrix.fromArray(p.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=p.radius),m.visible=p!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],f=u.position.distanceTo(h.position),d=.02,_=.005;c.inputState.pinching&&f>d+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=d-_&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(US)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new rr;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},OS=`
|
|
3797
|
+
}`;function IS(r,t,e){let n=new Bo,i=new oe,s=new oe,o=new Xe,a=new th({depthPacking:B0}),l=new eh,c={},u=e.maxTextureSize,h={[lr]:Tn,[Tn]:lr,[Fi]:Fi},f=new Zn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new oe},radius:{value:4}},vertexShader:RS,fragmentShader:PS}),d=f.clone();d.defines.HORIZONTAL_PASS=1;let _=new mi;_.setAttribute("position",new Xn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new ii(_,f),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=fm;let m=this.type;this.render=function(T,E,R){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||T.length===0)return;let y=r.getRenderTarget(),x=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),F=r.state;F.setBlending(sr),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);let P=m!==Ii&&this.type===Ii,B=m===Ii&&this.type!==Ii;for(let X=0,G=T.length;X<G;X++){let J=T[X],U=J.shadow;if(U===void 0){console.warn("THREE.WebGLShadowMap:",J,"has no shadow.");continue}if(U.autoUpdate===!1&&U.needsUpdate===!1)continue;i.copy(U.mapSize);let I=U.getFrameExtents();if(i.multiply(I),s.copy(U.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(s.x=Math.floor(u/I.x),i.x=s.x*I.x,U.mapSize.x=s.x),i.y>u&&(s.y=Math.floor(u/I.y),i.y=s.y*I.y,U.mapSize.y=s.y)),U.map===null||P===!0||B===!0){let it=this.type!==Ii?{minFilter:Wn,magFilter:Wn}:{};U.map!==null&&U.map.dispose(),U.map=new Ui(i.x,i.y,it),U.map.texture.name=J.name+".shadowMap",U.camera.updateProjectionMatrix()}r.setRenderTarget(U.map),r.clear();let A=U.getViewportCount();for(let it=0;it<A;it++){let vt=U.getViewport(it);o.set(s.x*vt.x,s.y*vt.y,s.x*vt.z,s.y*vt.w),F.viewport(o),U.updateMatrices(J,it),n=U.getFrustum(),M(E,R,U.camera,J,this.type)}U.isPointLightShadow!==!0&&this.type===Ii&&S(U,R),U.needsUpdate=!1}m=this.type,p.needsUpdate=!1,r.setRenderTarget(y,x,L)};function S(T,E){let R=t.update(g);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,d.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,d.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new Ui(i.x,i.y)),f.uniforms.shadow_pass.value=T.map.texture,f.uniforms.resolution.value=T.mapSize,f.uniforms.radius.value=T.radius,r.setRenderTarget(T.mapPass),r.clear(),r.renderBufferDirect(E,null,R,f,g,null),d.uniforms.shadow_pass.value=T.mapPass.texture,d.uniforms.resolution.value=T.mapSize,d.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(E,null,R,d,g,null)}function v(T,E,R,y){let x=null,L=R.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(L!==void 0)x=L;else if(x=R.isPointLight===!0?l:a,r.localClippingEnabled&&E.clipShadows===!0&&Array.isArray(E.clippingPlanes)&&E.clippingPlanes.length!==0||E.displacementMap&&E.displacementScale!==0||E.alphaMap&&E.alphaTest>0||E.map&&E.alphaTest>0){let F=x.uuid,P=E.uuid,B=c[F];B===void 0&&(B={},c[F]=B);let X=B[P];X===void 0&&(X=x.clone(),B[P]=X,E.addEventListener("dispose",D)),x=X}if(x.visible=E.visible,x.wireframe=E.wireframe,y===Ii?x.side=E.shadowSide!==null?E.shadowSide:E.side:x.side=E.shadowSide!==null?E.shadowSide:h[E.side],x.alphaMap=E.alphaMap,x.alphaTest=E.alphaTest,x.map=E.map,x.clipShadows=E.clipShadows,x.clippingPlanes=E.clippingPlanes,x.clipIntersection=E.clipIntersection,x.displacementMap=E.displacementMap,x.displacementScale=E.displacementScale,x.displacementBias=E.displacementBias,x.wireframeLinewidth=E.wireframeLinewidth,x.linewidth=E.linewidth,R.isPointLight===!0&&x.isMeshDistanceMaterial===!0){let F=r.properties.get(x);F.light=R}return x}function M(T,E,R,y,x){if(T.visible===!1)return;if(T.layers.test(E.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&x===Ii)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(R.matrixWorldInverse,T.matrixWorld);let P=t.update(T),B=T.material;if(Array.isArray(B)){let X=P.groups;for(let G=0,J=X.length;G<J;G++){let U=X[G],I=B[U.materialIndex];if(I&&I.visible){let A=v(T,I,y,x);T.onBeforeShadow(r,T,E,R,P,A,U),r.renderBufferDirect(R,null,P,A,T,U),T.onAfterShadow(r,T,E,R,P,A,U)}}}else if(B.visible){let X=v(T,B,y,x);T.onBeforeShadow(r,T,E,R,P,X,null),r.renderBufferDirect(R,null,P,X,T,null),T.onAfterShadow(r,T,E,R,P,X,null)}}let F=T.children;for(let P=0,B=F.length;P<B;P++)M(F[P],E,R,y,x)}function D(T){T.target.removeEventListener("dispose",D);for(let R in c){let y=c[R],x=T.target.uuid;x in y&&(y[x].dispose(),delete y[x])}}}function LS(r){function t(){let N=!1,$=new Xe,K=null,at=new Xe(0,0,0,0);return{setMask:function(ut){K!==ut&&!N&&(r.colorMask(ut,ut,ut,ut),K=ut)},setLocked:function(ut){N=ut},setClear:function(ut,Vt,se,ue,pe){pe===!0&&(ut*=ue,Vt*=ue,se*=ue),$.set(ut,Vt,se,ue),at.equals($)===!1&&(r.clearColor(ut,Vt,se,ue),at.copy($))},reset:function(){N=!1,K=null,at.set(-1,0,0,0)}}}function e(){let N=!1,$=null,K=null,at=null;return{setTest:function(ut){ut?ct(r.DEPTH_TEST):tt(r.DEPTH_TEST)},setMask:function(ut){$!==ut&&!N&&(r.depthMask(ut),$=ut)},setFunc:function(ut){if(K!==ut){switch(ut){case u0:r.depthFunc(r.NEVER);break;case h0:r.depthFunc(r.ALWAYS);break;case f0:r.depthFunc(r.LESS);break;case il:r.depthFunc(r.LEQUAL);break;case d0:r.depthFunc(r.EQUAL);break;case p0:r.depthFunc(r.GEQUAL);break;case m0:r.depthFunc(r.GREATER);break;case g0:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}K=ut}},setLocked:function(ut){N=ut},setClear:function(ut){at!==ut&&(r.clearDepth(ut),at=ut)},reset:function(){N=!1,$=null,K=null,at=null}}}function n(){let N=!1,$=null,K=null,at=null,ut=null,Vt=null,se=null,ue=null,pe=null;return{setTest:function(te){N||(te?ct(r.STENCIL_TEST):tt(r.STENCIL_TEST))},setMask:function(te){$!==te&&!N&&(r.stencilMask(te),$=te)},setFunc:function(te,Ct,yt){(K!==te||at!==Ct||ut!==yt)&&(r.stencilFunc(te,Ct,yt),K=te,at=Ct,ut=yt)},setOp:function(te,Ct,yt){(Vt!==te||se!==Ct||ue!==yt)&&(r.stencilOp(te,Ct,yt),Vt=te,se=Ct,ue=yt)},setLocked:function(te){N=te},setClear:function(te){pe!==te&&(r.clearStencil(te),pe=te)},reset:function(){N=!1,$=null,K=null,at=null,ut=null,Vt=null,se=null,ue=null,pe=null}}}let i=new t,s=new e,o=new n,a=new WeakMap,l=new WeakMap,c={},u={},h=new WeakMap,f=[],d=null,_=!1,g=null,p=null,m=null,S=null,v=null,M=null,D=null,T=new re(0,0,0),E=0,R=!1,y=null,x=null,L=null,F=null,P=null,B=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS),X=!1,G=0,J=r.getParameter(r.VERSION);J.indexOf("WebGL")!==-1?(G=parseFloat(/^WebGL (\d)/.exec(J)[1]),X=G>=1):J.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(J)[1]),X=G>=2);let U=null,I={},A=r.getParameter(r.SCISSOR_BOX),it=r.getParameter(r.VIEWPORT),vt=new Xe().fromArray(A),Wt=new Xe().fromArray(it);function q(N,$,K,at){let ut=new Uint8Array(4),Vt=r.createTexture();r.bindTexture(N,Vt),r.texParameteri(N,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(N,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let se=0;se<K;se++)N===r.TEXTURE_3D||N===r.TEXTURE_2D_ARRAY?r.texImage3D($,0,r.RGBA,1,1,at,0,r.RGBA,r.UNSIGNED_BYTE,ut):r.texImage2D($+se,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,ut);return Vt}let Q={};Q[r.TEXTURE_2D]=q(r.TEXTURE_2D,r.TEXTURE_2D,1),Q[r.TEXTURE_CUBE_MAP]=q(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),Q[r.TEXTURE_2D_ARRAY]=q(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),Q[r.TEXTURE_3D]=q(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),ct(r.DEPTH_TEST),s.setFunc(il),Ft(!1),Pt(kd),ct(r.CULL_FACE),wt(sr);function ct(N){c[N]!==!0&&(r.enable(N),c[N]=!0)}function tt(N){c[N]!==!1&&(r.disable(N),c[N]=!1)}function It(N,$){return u[N]!==$?(r.bindFramebuffer(N,$),u[N]=$,N===r.DRAW_FRAMEBUFFER&&(u[r.FRAMEBUFFER]=$),N===r.FRAMEBUFFER&&(u[r.DRAW_FRAMEBUFFER]=$),!0):!1}function Rt(N,$){let K=f,at=!1;if(N){K=h.get($),K===void 0&&(K=[],h.set($,K));let ut=N.textures;if(K.length!==ut.length||K[0]!==r.COLOR_ATTACHMENT0){for(let Vt=0,se=ut.length;Vt<se;Vt++)K[Vt]=r.COLOR_ATTACHMENT0+Vt;K.length=ut.length,at=!0}}else K[0]!==r.BACK&&(K[0]=r.BACK,at=!0);at&&r.drawBuffers(K)}function z(N){return d!==N?(r.useProgram(N),d=N,!0):!1}let Xt={[Gr]:r.FUNC_ADD,[Y_]:r.FUNC_SUBTRACT,[Z_]:r.FUNC_REVERSE_SUBTRACT};Xt[J_]=r.MIN,Xt[$_]=r.MAX;let bt={[K_]:r.ZERO,[Q_]:r.ONE,[j_]:r.SRC_COLOR,[Uu]:r.SRC_ALPHA,[s0]:r.SRC_ALPHA_SATURATE,[i0]:r.DST_COLOR,[e0]:r.DST_ALPHA,[t0]:r.ONE_MINUS_SRC_COLOR,[Ou]:r.ONE_MINUS_SRC_ALPHA,[r0]:r.ONE_MINUS_DST_COLOR,[n0]:r.ONE_MINUS_DST_ALPHA,[o0]:r.CONSTANT_COLOR,[a0]:r.ONE_MINUS_CONSTANT_COLOR,[l0]:r.CONSTANT_ALPHA,[c0]:r.ONE_MINUS_CONSTANT_ALPHA};function wt(N,$,K,at,ut,Vt,se,ue,pe,te){if(N===sr){_===!0&&(tt(r.BLEND),_=!1);return}if(_===!1&&(ct(r.BLEND),_=!0),N!==q_){if(N!==g||te!==R){if((p!==Gr||v!==Gr)&&(r.blendEquation(r.FUNC_ADD),p=Gr,v=Gr),te)switch(N){case or:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Vd:r.blendFunc(r.ONE,r.ONE);break;case Hd:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Gd:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}else switch(N){case or:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Vd:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Hd:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Gd:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",N);break}m=null,S=null,M=null,D=null,T.set(0,0,0),E=0,g=N,R=te}return}ut=ut||$,Vt=Vt||K,se=se||at,($!==p||ut!==v)&&(r.blendEquationSeparate(Xt[$],Xt[ut]),p=$,v=ut),(K!==m||at!==S||Vt!==M||se!==D)&&(r.blendFuncSeparate(bt[K],bt[at],bt[Vt],bt[se]),m=K,S=at,M=Vt,D=se),(ue.equals(T)===!1||pe!==E)&&(r.blendColor(ue.r,ue.g,ue.b,pe),T.copy(ue),E=pe),g=N,R=!1}function _t(N,$){N.side===Fi?tt(r.CULL_FACE):ct(r.CULL_FACE);let K=N.side===Tn;$&&(K=!K),Ft(K),N.blending===or&&N.transparent===!1?wt(sr):wt(N.blending,N.blendEquation,N.blendSrc,N.blendDst,N.blendEquationAlpha,N.blendSrcAlpha,N.blendDstAlpha,N.blendColor,N.blendAlpha,N.premultipliedAlpha),s.setFunc(N.depthFunc),s.setTest(N.depthTest),s.setMask(N.depthWrite),i.setMask(N.colorWrite);let at=N.stencilWrite;o.setTest(at),at&&(o.setMask(N.stencilWriteMask),o.setFunc(N.stencilFunc,N.stencilRef,N.stencilFuncMask),o.setOp(N.stencilFail,N.stencilZFail,N.stencilZPass)),jt(N.polygonOffset,N.polygonOffsetFactor,N.polygonOffsetUnits),N.alphaToCoverage===!0?ct(r.SAMPLE_ALPHA_TO_COVERAGE):tt(r.SAMPLE_ALPHA_TO_COVERAGE)}function Ft(N){y!==N&&(N?r.frontFace(r.CW):r.frontFace(r.CCW),y=N)}function Pt(N){N!==W_?(ct(r.CULL_FACE),N!==x&&(N===kd?r.cullFace(r.BACK):N===X_?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):tt(r.CULL_FACE),x=N}function k(N){N!==L&&(X&&r.lineWidth(N),L=N)}function jt(N,$,K){N?(ct(r.POLYGON_OFFSET_FILL),(F!==$||P!==K)&&(r.polygonOffset($,K),F=$,P=K)):tt(r.POLYGON_OFFSET_FILL)}function C(N){N?ct(r.SCISSOR_TEST):tt(r.SCISSOR_TEST)}function b(N){N===void 0&&(N=r.TEXTURE0+B-1),U!==N&&(r.activeTexture(N),U=N)}function Y(N,$,K){K===void 0&&(U===null?K=r.TEXTURE0+B-1:K=U);let at=I[K];at===void 0&&(at={type:void 0,texture:void 0},I[K]=at),(at.type!==N||at.texture!==$)&&(U!==K&&(r.activeTexture(K),U=K),r.bindTexture(N,$||Q[N]),at.type=N,at.texture=$)}function j(){let N=I[U];N!==void 0&&N.type!==void 0&&(r.bindTexture(N.type,null),N.type=void 0,N.texture=void 0)}function et(){try{r.compressedTexImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function nt(){try{r.compressedTexImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function mt(){try{r.texSubImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function lt(){try{r.texSubImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function rt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Lt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function st(){try{r.texStorage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function St(){try{r.texStorage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function Jt(){try{r.texImage2D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function gt(){try{r.texImage3D.apply(r,arguments)}catch(N){console.error("THREE.WebGLState:",N)}}function xt(N){vt.equals(N)===!1&&(r.scissor(N.x,N.y,N.z,N.w),vt.copy(N))}function Nt(N){Wt.equals(N)===!1&&(r.viewport(N.x,N.y,N.z,N.w),Wt.copy(N))}function Gt(N,$){let K=l.get($);K===void 0&&(K=new WeakMap,l.set($,K));let at=K.get(N);at===void 0&&(at=r.getUniformBlockIndex($,N.name),K.set(N,at))}function he(N,$){let at=l.get($).get(N);a.get($)!==at&&(r.uniformBlockBinding($,at,N.__bindingPointIndex),a.set($,at))}function Ut(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),c={},U=null,I={},u={},h=new WeakMap,f=[],d=null,_=!1,g=null,p=null,m=null,S=null,v=null,M=null,D=null,T=new re(0,0,0),E=0,R=!1,y=null,x=null,L=null,F=null,P=null,vt.set(0,0,r.canvas.width,r.canvas.height),Wt.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:ct,disable:tt,bindFramebuffer:It,drawBuffers:Rt,useProgram:z,setBlending:wt,setMaterial:_t,setFlipSided:Ft,setCullFace:Pt,setLineWidth:k,setPolygonOffset:jt,setScissorTest:C,activeTexture:b,bindTexture:Y,unbindTexture:j,compressedTexImage2D:et,compressedTexImage3D:nt,texImage2D:Jt,texImage3D:gt,updateUBOMapping:Gt,uniformBlockBinding:he,texStorage2D:st,texStorage3D:St,texSubImage2D:mt,texSubImage3D:lt,compressedTexSubImage2D:rt,compressedTexSubImage3D:Lt,scissor:xt,viewport:Nt,reset:Ut}}function FS(r,t,e,n,i,s,o){let a=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new oe,u=new WeakMap,h,f=new WeakMap,d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(C,b){return d?new OffscreenCanvas(C,b):ul("canvas")}function g(C,b,Y){let j=1,et=jt(C);if((et.width>Y||et.height>Y)&&(j=Y/Math.max(et.width,et.height)),j<1)if(typeof HTMLImageElement<"u"&&C instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&C instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&C instanceof ImageBitmap||typeof VideoFrame<"u"&&C instanceof VideoFrame){let nt=Math.floor(j*et.width),mt=Math.floor(j*et.height);h===void 0&&(h=_(nt,mt));let lt=b?_(nt,mt):h;return lt.width=nt,lt.height=mt,lt.getContext("2d").drawImage(C,0,0,nt,mt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+et.width+"x"+et.height+") to ("+nt+"x"+mt+")."),lt}else return"data"in C&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+et.width+"x"+et.height+")."),C;return C}function p(C){return C.generateMipmaps&&C.minFilter!==Wn&&C.minFilter!==ni}function m(C){r.generateMipmap(C)}function S(C,b,Y,j,et=!1){if(C!==null){if(r[C]!==void 0)return r[C];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+C+"'")}let nt=b;if(b===r.RED&&(Y===r.FLOAT&&(nt=r.R32F),Y===r.HALF_FLOAT&&(nt=r.R16F),Y===r.UNSIGNED_BYTE&&(nt=r.R8)),b===r.RED_INTEGER&&(Y===r.UNSIGNED_BYTE&&(nt=r.R8UI),Y===r.UNSIGNED_SHORT&&(nt=r.R16UI),Y===r.UNSIGNED_INT&&(nt=r.R32UI),Y===r.BYTE&&(nt=r.R8I),Y===r.SHORT&&(nt=r.R16I),Y===r.INT&&(nt=r.R32I)),b===r.RG&&(Y===r.FLOAT&&(nt=r.RG32F),Y===r.HALF_FLOAT&&(nt=r.RG16F),Y===r.UNSIGNED_BYTE&&(nt=r.RG8)),b===r.RG_INTEGER&&(Y===r.UNSIGNED_BYTE&&(nt=r.RG8UI),Y===r.UNSIGNED_SHORT&&(nt=r.RG16UI),Y===r.UNSIGNED_INT&&(nt=r.RG32UI),Y===r.BYTE&&(nt=r.RG8I),Y===r.SHORT&&(nt=r.RG16I),Y===r.INT&&(nt=r.RG32I)),b===r.RGB&&Y===r.UNSIGNED_INT_5_9_9_9_REV&&(nt=r.RGB9_E5),b===r.RGBA){let mt=et?ol:fe.getTransfer(j);Y===r.FLOAT&&(nt=r.RGBA32F),Y===r.HALF_FLOAT&&(nt=r.RGBA16F),Y===r.UNSIGNED_BYTE&&(nt=mt===xe?r.SRGB8_ALPHA8:r.RGBA8),Y===r.UNSIGNED_SHORT_4_4_4_4&&(nt=r.RGBA4),Y===r.UNSIGNED_SHORT_5_5_5_1&&(nt=r.RGB5_A1)}return(nt===r.R16F||nt===r.R32F||nt===r.RG16F||nt===r.RG32F||nt===r.RGBA16F||nt===r.RGBA32F)&&t.get("EXT_color_buffer_float"),nt}function v(C,b){return p(C)===!0||C.isFramebufferTexture&&C.minFilter!==Wn&&C.minFilter!==ni?Math.log2(Math.max(b.width,b.height))+1:C.mipmaps!==void 0&&C.mipmaps.length>0?C.mipmaps.length:C.isCompressedTexture&&Array.isArray(C.image)?b.mipmaps.length:1}function M(C){let b=C.target;b.removeEventListener("dispose",M),T(b),b.isVideoTexture&&u.delete(b)}function D(C){let b=C.target;b.removeEventListener("dispose",D),R(b)}function T(C){let b=n.get(C);if(b.__webglInit===void 0)return;let Y=C.source,j=f.get(Y);if(j){let et=j[b.__cacheKey];et.usedTimes--,et.usedTimes===0&&E(C),Object.keys(j).length===0&&f.delete(Y)}n.remove(C)}function E(C){let b=n.get(C);r.deleteTexture(b.__webglTexture);let Y=C.source,j=f.get(Y);delete j[b.__cacheKey],o.memory.textures--}function R(C){let b=n.get(C);if(C.depthTexture&&C.depthTexture.dispose(),C.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(b.__webglFramebuffer[j]))for(let et=0;et<b.__webglFramebuffer[j].length;et++)r.deleteFramebuffer(b.__webglFramebuffer[j][et]);else r.deleteFramebuffer(b.__webglFramebuffer[j]);b.__webglDepthbuffer&&r.deleteRenderbuffer(b.__webglDepthbuffer[j])}else{if(Array.isArray(b.__webglFramebuffer))for(let j=0;j<b.__webglFramebuffer.length;j++)r.deleteFramebuffer(b.__webglFramebuffer[j]);else r.deleteFramebuffer(b.__webglFramebuffer);if(b.__webglDepthbuffer&&r.deleteRenderbuffer(b.__webglDepthbuffer),b.__webglMultisampledFramebuffer&&r.deleteFramebuffer(b.__webglMultisampledFramebuffer),b.__webglColorRenderbuffer)for(let j=0;j<b.__webglColorRenderbuffer.length;j++)b.__webglColorRenderbuffer[j]&&r.deleteRenderbuffer(b.__webglColorRenderbuffer[j]);b.__webglDepthRenderbuffer&&r.deleteRenderbuffer(b.__webglDepthRenderbuffer)}let Y=C.textures;for(let j=0,et=Y.length;j<et;j++){let nt=n.get(Y[j]);nt.__webglTexture&&(r.deleteTexture(nt.__webglTexture),o.memory.textures--),n.remove(Y[j])}n.remove(C)}let y=0;function x(){y=0}function L(){let C=y;return C>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+C+" texture units while this GPU supports only "+i.maxTextures),y+=1,C}function F(C){let b=[];return b.push(C.wrapS),b.push(C.wrapT),b.push(C.wrapR||0),b.push(C.magFilter),b.push(C.minFilter),b.push(C.anisotropy),b.push(C.internalFormat),b.push(C.format),b.push(C.type),b.push(C.generateMipmaps),b.push(C.premultiplyAlpha),b.push(C.flipY),b.push(C.unpackAlignment),b.push(C.colorSpace),b.join()}function P(C,b){let Y=n.get(C);if(C.isVideoTexture&&Pt(C),C.isRenderTargetTexture===!1&&C.version>0&&Y.__version!==C.version){let j=C.image;if(j===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(j.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{vt(Y,C,b);return}}e.bindTexture(r.TEXTURE_2D,Y.__webglTexture,r.TEXTURE0+b)}function B(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){vt(Y,C,b);return}e.bindTexture(r.TEXTURE_2D_ARRAY,Y.__webglTexture,r.TEXTURE0+b)}function X(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){vt(Y,C,b);return}e.bindTexture(r.TEXTURE_3D,Y.__webglTexture,r.TEXTURE0+b)}function G(C,b){let Y=n.get(C);if(C.version>0&&Y.__version!==C.version){Wt(Y,C,b);return}e.bindTexture(r.TEXTURE_CUBE_MAP,Y.__webglTexture,r.TEXTURE0+b)}let J={[ku]:r.REPEAT,[Xr]:r.CLAMP_TO_EDGE,[Vu]:r.MIRRORED_REPEAT},U={[Wn]:r.NEAREST,[T0]:r.NEAREST_MIPMAP_NEAREST,[Ia]:r.NEAREST_MIPMAP_LINEAR,[ni]:r.LINEAR,[nu]:r.LINEAR_MIPMAP_NEAREST,[qr]:r.LINEAR_MIPMAP_LINEAR},I={[V0]:r.NEVER,[Y0]:r.ALWAYS,[H0]:r.LESS,[Sm]:r.LEQUAL,[G0]:r.EQUAL,[q0]:r.GEQUAL,[W0]:r.GREATER,[X0]:r.NOTEQUAL};function A(C,b){if(b.type===ir&&t.has("OES_texture_float_linear")===!1&&(b.magFilter===ni||b.magFilter===nu||b.magFilter===Ia||b.magFilter===qr||b.minFilter===ni||b.minFilter===nu||b.minFilter===Ia||b.minFilter===qr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(C,r.TEXTURE_WRAP_S,J[b.wrapS]),r.texParameteri(C,r.TEXTURE_WRAP_T,J[b.wrapT]),(C===r.TEXTURE_3D||C===r.TEXTURE_2D_ARRAY)&&r.texParameteri(C,r.TEXTURE_WRAP_R,J[b.wrapR]),r.texParameteri(C,r.TEXTURE_MAG_FILTER,U[b.magFilter]),r.texParameteri(C,r.TEXTURE_MIN_FILTER,U[b.minFilter]),b.compareFunction&&(r.texParameteri(C,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(C,r.TEXTURE_COMPARE_FUNC,I[b.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(b.magFilter===Wn||b.minFilter!==Ia&&b.minFilter!==qr||b.type===ir&&t.has("OES_texture_float_linear")===!1)return;if(b.anisotropy>1||n.get(b).__currentAnisotropy){let Y=t.get("EXT_texture_filter_anisotropic");r.texParameterf(C,Y.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,i.getMaxAnisotropy())),n.get(b).__currentAnisotropy=b.anisotropy}}}function it(C,b){let Y=!1;C.__webglInit===void 0&&(C.__webglInit=!0,b.addEventListener("dispose",M));let j=b.source,et=f.get(j);et===void 0&&(et={},f.set(j,et));let nt=F(b);if(nt!==C.__cacheKey){et[nt]===void 0&&(et[nt]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,Y=!0),et[nt].usedTimes++;let mt=et[C.__cacheKey];mt!==void 0&&(et[C.__cacheKey].usedTimes--,mt.usedTimes===0&&E(b)),C.__cacheKey=nt,C.__webglTexture=et[nt].texture}return Y}function vt(C,b,Y){let j=r.TEXTURE_2D;(b.isDataArrayTexture||b.isCompressedArrayTexture)&&(j=r.TEXTURE_2D_ARRAY),b.isData3DTexture&&(j=r.TEXTURE_3D);let et=it(C,b),nt=b.source;e.bindTexture(j,C.__webglTexture,r.TEXTURE0+Y);let mt=n.get(nt);if(nt.version!==mt.__version||et===!0){e.activeTexture(r.TEXTURE0+Y);let lt=fe.getPrimaries(fe.workingColorSpace),rt=b.colorSpace===nr?null:fe.getPrimaries(b.colorSpace),Lt=b.colorSpace===nr||lt===rt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,b.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Lt);let st=g(b.image,!1,i.maxTextureSize);st=k(b,st);let St=s.convert(b.format,b.colorSpace),Jt=s.convert(b.type),gt=S(b.internalFormat,St,Jt,b.colorSpace,b.isVideoTexture);A(j,b);let xt,Nt=b.mipmaps,Gt=b.isVideoTexture!==!0,he=mt.__version===void 0||et===!0,Ut=nt.dataReady,N=v(b,st);if(b.isDepthTexture)gt=r.DEPTH_COMPONENT16,b.type===ir?gt=r.DEPTH_COMPONENT32F:b.type===Hs?gt=r.DEPTH_COMPONENT24:b.type===ko&&(gt=r.DEPTH24_STENCIL8),he&&(Gt?e.texStorage2D(r.TEXTURE_2D,1,gt,st.width,st.height):e.texImage2D(r.TEXTURE_2D,0,gt,st.width,st.height,0,St,Jt,null));else if(b.isDataTexture)if(Nt.length>0){Gt&&he&&e.texStorage2D(r.TEXTURE_2D,N,gt,Nt[0].width,Nt[0].height);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,Jt,xt.data):e.texImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,St,Jt,xt.data);b.generateMipmaps=!1}else Gt?(he&&e.texStorage2D(r.TEXTURE_2D,N,gt,st.width,st.height),Ut&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,st.width,st.height,St,Jt,st.data)):e.texImage2D(r.TEXTURE_2D,0,gt,st.width,st.height,0,St,Jt,st.data);else if(b.isCompressedTexture)if(b.isCompressedArrayTexture){Gt&&he&&e.texStorage3D(r.TEXTURE_2D_ARRAY,N,gt,Nt[0].width,Nt[0].height,st.depth);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],b.format!==pi?St!==null?Gt?Ut&&e.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,$,0,0,0,xt.width,xt.height,st.depth,St,xt.data,0,0):e.compressedTexImage3D(r.TEXTURE_2D_ARRAY,$,gt,xt.width,xt.height,st.depth,0,xt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Gt?Ut&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,$,0,0,0,xt.width,xt.height,st.depth,St,Jt,xt.data):e.texImage3D(r.TEXTURE_2D_ARRAY,$,gt,xt.width,xt.height,st.depth,0,St,Jt,xt.data)}else{Gt&&he&&e.texStorage2D(r.TEXTURE_2D,N,gt,Nt[0].width,Nt[0].height);for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],b.format!==pi?St!==null?Gt?Ut&&e.compressedTexSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,xt.data):e.compressedTexImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,xt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,xt.width,xt.height,St,Jt,xt.data):e.texImage2D(r.TEXTURE_2D,$,gt,xt.width,xt.height,0,St,Jt,xt.data)}else if(b.isDataArrayTexture)Gt?(he&&e.texStorage3D(r.TEXTURE_2D_ARRAY,N,gt,st.width,st.height,st.depth),Ut&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,st.width,st.height,st.depth,St,Jt,st.data)):e.texImage3D(r.TEXTURE_2D_ARRAY,0,gt,st.width,st.height,st.depth,0,St,Jt,st.data);else if(b.isData3DTexture)Gt?(he&&e.texStorage3D(r.TEXTURE_3D,N,gt,st.width,st.height,st.depth),Ut&&e.texSubImage3D(r.TEXTURE_3D,0,0,0,0,st.width,st.height,st.depth,St,Jt,st.data)):e.texImage3D(r.TEXTURE_3D,0,gt,st.width,st.height,st.depth,0,St,Jt,st.data);else if(b.isFramebufferTexture){if(he)if(Gt)e.texStorage2D(r.TEXTURE_2D,N,gt,st.width,st.height);else{let $=st.width,K=st.height;for(let at=0;at<N;at++)e.texImage2D(r.TEXTURE_2D,at,gt,$,K,0,St,Jt,null),$>>=1,K>>=1}}else if(Nt.length>0){if(Gt&&he){let $=jt(Nt[0]);e.texStorage2D(r.TEXTURE_2D,N,gt,$.width,$.height)}for(let $=0,K=Nt.length;$<K;$++)xt=Nt[$],Gt?Ut&&e.texSubImage2D(r.TEXTURE_2D,$,0,0,St,Jt,xt):e.texImage2D(r.TEXTURE_2D,$,gt,St,Jt,xt);b.generateMipmaps=!1}else if(Gt){if(he){let $=jt(st);e.texStorage2D(r.TEXTURE_2D,N,gt,$.width,$.height)}Ut&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,St,Jt,st)}else e.texImage2D(r.TEXTURE_2D,0,gt,St,Jt,st);p(b)&&m(j),mt.__version=nt.version,b.onUpdate&&b.onUpdate(b)}C.__version=b.version}function Wt(C,b,Y){if(b.image.length!==6)return;let j=it(C,b),et=b.source;e.bindTexture(r.TEXTURE_CUBE_MAP,C.__webglTexture,r.TEXTURE0+Y);let nt=n.get(et);if(et.version!==nt.__version||j===!0){e.activeTexture(r.TEXTURE0+Y);let mt=fe.getPrimaries(fe.workingColorSpace),lt=b.colorSpace===nr?null:fe.getPrimaries(b.colorSpace),rt=b.colorSpace===nr||mt===lt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,b.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,b.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,rt);let Lt=b.isCompressedTexture||b.image[0].isCompressedTexture,st=b.image[0]&&b.image[0].isDataTexture,St=[];for(let K=0;K<6;K++)!Lt&&!st?St[K]=g(b.image[K],!0,i.maxCubemapSize):St[K]=st?b.image[K].image:b.image[K],St[K]=k(b,St[K]);let Jt=St[0],gt=s.convert(b.format,b.colorSpace),xt=s.convert(b.type),Nt=S(b.internalFormat,gt,xt,b.colorSpace),Gt=b.isVideoTexture!==!0,he=nt.__version===void 0||j===!0,Ut=et.dataReady,N=v(b,Jt);A(r.TEXTURE_CUBE_MAP,b);let $;if(Lt){Gt&&he&&e.texStorage2D(r.TEXTURE_CUBE_MAP,N,Nt,Jt.width,Jt.height);for(let K=0;K<6;K++){$=St[K].mipmaps;for(let at=0;at<$.length;at++){let ut=$[at];b.format!==pi?gt!==null?Gt?Ut&&e.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,0,0,ut.width,ut.height,gt,ut.data):e.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,Nt,ut.width,ut.height,0,ut.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,0,0,ut.width,ut.height,gt,xt,ut.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at,Nt,ut.width,ut.height,0,gt,xt,ut.data)}}}else{if($=b.mipmaps,Gt&&he){$.length>0&&N++;let K=jt(St[0]);e.texStorage2D(r.TEXTURE_CUBE_MAP,N,Nt,K.width,K.height)}for(let K=0;K<6;K++)if(st){Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,0,0,St[K].width,St[K].height,gt,xt,St[K].data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,Nt,St[K].width,St[K].height,0,gt,xt,St[K].data);for(let at=0;at<$.length;at++){let Vt=$[at].image[K].image;Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,0,0,Vt.width,Vt.height,gt,xt,Vt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,Nt,Vt.width,Vt.height,0,gt,xt,Vt.data)}}else{Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,0,0,gt,xt,St[K]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,0,Nt,gt,xt,St[K]);for(let at=0;at<$.length;at++){let ut=$[at];Gt?Ut&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,0,0,gt,xt,ut.image[K]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+K,at+1,Nt,gt,xt,ut.image[K])}}}p(b)&&m(r.TEXTURE_CUBE_MAP),nt.__version=et.version,b.onUpdate&&b.onUpdate(b)}C.__version=b.version}function q(C,b,Y,j,et,nt){let mt=s.convert(Y.format,Y.colorSpace),lt=s.convert(Y.type),rt=S(Y.internalFormat,mt,lt,Y.colorSpace);if(!n.get(b).__hasExternalTextures){let st=Math.max(1,b.width>>nt),St=Math.max(1,b.height>>nt);et===r.TEXTURE_3D||et===r.TEXTURE_2D_ARRAY?e.texImage3D(et,nt,rt,st,St,b.depth,0,mt,lt,null):e.texImage2D(et,nt,rt,st,St,0,mt,lt,null)}e.bindFramebuffer(r.FRAMEBUFFER,C),Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,j,et,n.get(Y).__webglTexture,0,_t(b)):(et===r.TEXTURE_2D||et>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&et<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,j,et,n.get(Y).__webglTexture,nt),e.bindFramebuffer(r.FRAMEBUFFER,null)}function Q(C,b,Y){if(r.bindRenderbuffer(r.RENDERBUFFER,C),b.depthBuffer&&!b.stencilBuffer){let j=r.DEPTH_COMPONENT24;if(Y||Ft(b)){let et=b.depthTexture;et&&et.isDepthTexture&&(et.type===ir?j=r.DEPTH_COMPONENT32F:et.type===Hs&&(j=r.DEPTH_COMPONENT24));let nt=_t(b);Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,nt,j,b.width,b.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,nt,j,b.width,b.height)}else r.renderbufferStorage(r.RENDERBUFFER,j,b.width,b.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,C)}else if(b.depthBuffer&&b.stencilBuffer){let j=_t(b);Y&&Ft(b)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,j,r.DEPTH24_STENCIL8,b.width,b.height):Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,j,r.DEPTH24_STENCIL8,b.width,b.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,C)}else{let j=b.textures;for(let et=0;et<j.length;et++){let nt=j[et],mt=s.convert(nt.format,nt.colorSpace),lt=s.convert(nt.type),rt=S(nt.internalFormat,mt,lt,nt.colorSpace),Lt=_t(b);Y&&Ft(b)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Lt,rt,b.width,b.height):Ft(b)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Lt,rt,b.width,b.height):r.renderbufferStorage(r.RENDERBUFFER,rt,b.width,b.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function ct(C,b){if(b&&b.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(r.FRAMEBUFFER,C),!(b.depthTexture&&b.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(b.depthTexture).__webglTexture||b.depthTexture.image.width!==b.width||b.depthTexture.image.height!==b.height)&&(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0),P(b.depthTexture,0);let j=n.get(b.depthTexture).__webglTexture,et=_t(b);if(b.depthTexture.format===Os)Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,j,0,et):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,j,0);else if(b.depthTexture.format===Uo)Ft(b)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,j,0,et):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,j,0);else throw new Error("Unknown depthTexture format")}function tt(C){let b=n.get(C),Y=C.isWebGLCubeRenderTarget===!0;if(C.depthTexture&&!b.__autoAllocateDepthBuffer){if(Y)throw new Error("target.depthTexture not supported in Cube render targets");ct(b.__webglFramebuffer,C)}else if(Y){b.__webglDepthbuffer=[];for(let j=0;j<6;j++)e.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer[j]),b.__webglDepthbuffer[j]=r.createRenderbuffer(),Q(b.__webglDepthbuffer[j],C,!1)}else e.bindFramebuffer(r.FRAMEBUFFER,b.__webglFramebuffer),b.__webglDepthbuffer=r.createRenderbuffer(),Q(b.__webglDepthbuffer,C,!1);e.bindFramebuffer(r.FRAMEBUFFER,null)}function It(C,b,Y){let j=n.get(C);b!==void 0&&q(j.__webglFramebuffer,C,C.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),Y!==void 0&&tt(C)}function Rt(C){let b=C.texture,Y=n.get(C),j=n.get(b);C.addEventListener("dispose",D);let et=C.textures,nt=C.isWebGLCubeRenderTarget===!0,mt=et.length>1;if(mt||(j.__webglTexture===void 0&&(j.__webglTexture=r.createTexture()),j.__version=b.version,o.memory.textures++),nt){Y.__webglFramebuffer=[];for(let lt=0;lt<6;lt++)if(b.mipmaps&&b.mipmaps.length>0){Y.__webglFramebuffer[lt]=[];for(let rt=0;rt<b.mipmaps.length;rt++)Y.__webglFramebuffer[lt][rt]=r.createFramebuffer()}else Y.__webglFramebuffer[lt]=r.createFramebuffer()}else{if(b.mipmaps&&b.mipmaps.length>0){Y.__webglFramebuffer=[];for(let lt=0;lt<b.mipmaps.length;lt++)Y.__webglFramebuffer[lt]=r.createFramebuffer()}else Y.__webglFramebuffer=r.createFramebuffer();if(mt)for(let lt=0,rt=et.length;lt<rt;lt++){let Lt=n.get(et[lt]);Lt.__webglTexture===void 0&&(Lt.__webglTexture=r.createTexture(),o.memory.textures++)}if(C.samples>0&&Ft(C)===!1){Y.__webglMultisampledFramebuffer=r.createFramebuffer(),Y.__webglColorRenderbuffer=[],e.bindFramebuffer(r.FRAMEBUFFER,Y.__webglMultisampledFramebuffer);for(let lt=0;lt<et.length;lt++){let rt=et[lt];Y.__webglColorRenderbuffer[lt]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,Y.__webglColorRenderbuffer[lt]);let Lt=s.convert(rt.format,rt.colorSpace),st=s.convert(rt.type),St=S(rt.internalFormat,Lt,st,rt.colorSpace,C.isXRRenderTarget===!0),Jt=_t(C);r.renderbufferStorageMultisample(r.RENDERBUFFER,Jt,St,C.width,C.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,Y.__webglColorRenderbuffer[lt])}r.bindRenderbuffer(r.RENDERBUFFER,null),C.depthBuffer&&(Y.__webglDepthRenderbuffer=r.createRenderbuffer(),Q(Y.__webglDepthRenderbuffer,C,!0)),e.bindFramebuffer(r.FRAMEBUFFER,null)}}if(nt){e.bindTexture(r.TEXTURE_CUBE_MAP,j.__webglTexture),A(r.TEXTURE_CUBE_MAP,b);for(let lt=0;lt<6;lt++)if(b.mipmaps&&b.mipmaps.length>0)for(let rt=0;rt<b.mipmaps.length;rt++)q(Y.__webglFramebuffer[lt][rt],C,b,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+lt,rt);else q(Y.__webglFramebuffer[lt],C,b,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+lt,0);p(b)&&m(r.TEXTURE_CUBE_MAP),e.unbindTexture()}else if(mt){for(let lt=0,rt=et.length;lt<rt;lt++){let Lt=et[lt],st=n.get(Lt);e.bindTexture(r.TEXTURE_2D,st.__webglTexture),A(r.TEXTURE_2D,Lt),q(Y.__webglFramebuffer,C,Lt,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,0),p(Lt)&&m(r.TEXTURE_2D)}e.unbindTexture()}else{let lt=r.TEXTURE_2D;if((C.isWebGL3DRenderTarget||C.isWebGLArrayRenderTarget)&&(lt=C.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),e.bindTexture(lt,j.__webglTexture),A(lt,b),b.mipmaps&&b.mipmaps.length>0)for(let rt=0;rt<b.mipmaps.length;rt++)q(Y.__webglFramebuffer[rt],C,b,r.COLOR_ATTACHMENT0,lt,rt);else q(Y.__webglFramebuffer,C,b,r.COLOR_ATTACHMENT0,lt,0);p(b)&&m(lt),e.unbindTexture()}C.depthBuffer&&tt(C)}function z(C){let b=C.textures;for(let Y=0,j=b.length;Y<j;Y++){let et=b[Y];if(p(et)){let nt=C.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,mt=n.get(et).__webglTexture;e.bindTexture(nt,mt),m(nt),e.unbindTexture()}}}let Xt=[],bt=[];function wt(C){if(C.samples>0){if(Ft(C)===!1){let b=C.textures,Y=C.width,j=C.height,et=r.COLOR_BUFFER_BIT,nt=C.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,mt=n.get(C),lt=b.length>1;if(lt)for(let rt=0;rt<b.length;rt++)e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.RENDERBUFFER,null),e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.TEXTURE_2D,null,0);e.bindFramebuffer(r.READ_FRAMEBUFFER,mt.__webglMultisampledFramebuffer),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,mt.__webglFramebuffer);for(let rt=0;rt<b.length;rt++){if(C.resolveDepthBuffer&&(C.depthBuffer&&(et|=r.DEPTH_BUFFER_BIT),C.stencilBuffer&&C.resolveStencilBuffer&&(et|=r.STENCIL_BUFFER_BIT)),lt){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,mt.__webglColorRenderbuffer[rt]);let Lt=n.get(b[rt]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,Lt,0)}r.blitFramebuffer(0,0,Y,j,0,0,Y,j,et,r.NEAREST),l===!0&&(Xt.length=0,bt.length=0,Xt.push(r.COLOR_ATTACHMENT0+rt),C.depthBuffer&&C.resolveDepthBuffer===!1&&(Xt.push(nt),bt.push(nt),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,bt)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,Xt))}if(e.bindFramebuffer(r.READ_FRAMEBUFFER,null),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),lt)for(let rt=0;rt<b.length;rt++){e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.RENDERBUFFER,mt.__webglColorRenderbuffer[rt]);let Lt=n.get(b[rt]).__webglTexture;e.bindFramebuffer(r.FRAMEBUFFER,mt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+rt,r.TEXTURE_2D,Lt,0)}e.bindFramebuffer(r.DRAW_FRAMEBUFFER,mt.__webglMultisampledFramebuffer)}else if(C.depthBuffer&&C.resolveDepthBuffer===!1&&l){let b=C.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[b])}}}function _t(C){return Math.min(i.maxSamples,C.samples)}function Ft(C){let b=n.get(C);return C.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&b.__useRenderToTexture!==!1}function Pt(C){let b=o.render.frame;u.get(C)!==b&&(u.set(C,b),C.update())}function k(C,b){let Y=C.colorSpace,j=C.format,et=C.type;return C.isCompressedTexture===!0||C.isVideoTexture===!0||Y!==fr&&Y!==nr&&(fe.getTransfer(Y)===xe?(j!==pi||et!==cr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Y)),b}function jt(C){return typeof HTMLImageElement<"u"&&C instanceof HTMLImageElement?(c.width=C.naturalWidth||C.width,c.height=C.naturalHeight||C.height):typeof VideoFrame<"u"&&C instanceof VideoFrame?(c.width=C.displayWidth,c.height=C.displayHeight):(c.width=C.width,c.height=C.height),c}this.allocateTextureUnit=L,this.resetTextureUnits=x,this.setTexture2D=P,this.setTexture2DArray=B,this.setTexture3D=X,this.setTextureCube=G,this.rebindTextures=It,this.setupRenderTarget=Rt,this.updateRenderTargetMipmap=z,this.updateMultisampleRenderTarget=wt,this.setupDepthRenderbuffer=tt,this.setupFrameBufferTexture=q,this.useMultisampledRTT=Ft}function NS(r,t){function e(n,i=nr){let s,o=fe.getTransfer(i);if(n===cr)return r.UNSIGNED_BYTE;if(n===_m)return r.UNSIGNED_SHORT_4_4_4_4;if(n===xm)return r.UNSIGNED_SHORT_5_5_5_1;if(n===C0)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===A0)return r.BYTE;if(n===D0)return r.SHORT;if(n===mm)return r.UNSIGNED_SHORT;if(n===gm)return r.INT;if(n===Hs)return r.UNSIGNED_INT;if(n===ir)return r.FLOAT;if(n===Pl)return r.HALF_FLOAT;if(n===R0)return r.ALPHA;if(n===P0)return r.RGB;if(n===pi)return r.RGBA;if(n===I0)return r.LUMINANCE;if(n===L0)return r.LUMINANCE_ALPHA;if(n===Os)return r.DEPTH_COMPONENT;if(n===Uo)return r.DEPTH_STENCIL;if(n===F0)return r.RED;if(n===vm)return r.RED_INTEGER;if(n===N0)return r.RG;if(n===ym)return r.RG_INTEGER;if(n===Mm)return r.RGBA_INTEGER;if(n===iu||n===ru||n===su||n===ou)if(o===xe)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===iu)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===ru)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===su)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ou)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===iu)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===ru)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===su)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ou)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Wd||n===Xd||n===qd||n===Yd)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Wd)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Xd)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===qd)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Yd)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Zd||n===Jd||n===$d)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Zd||n===Jd)return o===xe?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===$d)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Kd||n===Qd||n===jd||n===tp||n===ep||n===np||n===ip||n===rp||n===sp||n===op||n===ap||n===lp||n===cp||n===up)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Kd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Qd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===jd)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===tp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===ep)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===np)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ip)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===rp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===sp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===op)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===ap)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===lp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===cp)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===up)return o===xe?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===au||n===hp||n===fp)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(n===au)return o===xe?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===hp)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===fp)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===U0||n===dp||n===pp||n===mp)if(s=t.get("EXT_texture_compression_rgtc"),s!==null){if(n===au)return s.COMPRESSED_RED_RGTC1_EXT;if(n===dp)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===pp)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===mp)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===ko?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:e}}var nh=class extends xn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},rr=class extends on{constructor(){super(),this.isGroup=!0,this.type="Group"}},US={type:"move"},No=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,n){let i=null,s=null,o=null,a=this._targetRay,l=this._grip,c=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(c&&t.hand){o=!0;for(let g of t.hand.values()){let p=e.getJointPose(g,n),m=this._getHandJoint(c,g);p!==null&&(m.matrix.fromArray(p.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=p.radius),m.visible=p!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],f=u.position.distanceTo(h.position),d=.02,_=.005;c.inputState.pinching&&f>d+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=d-_&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(s=e.getPose(t.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=e.getPose(t.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(US)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){let n=new rr;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},OS=`
|
|
3798
3798
|
void main() {
|
|
3799
3799
|
|
|
3800
3800
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -3818,7 +3818,7 @@ void main() {
|
|
|
3818
3818
|
|
|
3819
3819
|
}
|
|
3820
3820
|
|
|
3821
|
-
}`,ih=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(this.texture===null){let i=new Yn,s=t.properties.get(i);s.__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}render(t,e){if(this.texture!==null){if(this.mesh===null){let n=e.cameras[0].viewport,i=new Zn({vertexShader:OS,fragmentShader:BS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new ii(new yl(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},rh=class extends ur{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,f=null,d=null,_=null,g=new ih,p=e.getContextAttributes(),m=null,S=null,v=[],M=[],D=new oe,T=null,E=new xn;E.layers.enable(1),E.viewport=new Xe;let R=new xn;R.layers.enable(2),R.viewport=new Xe;let y=[E,R],x=new nh;x.layers.enable(1),x.layers.enable(2);let L=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getGripSpace()},this.getHand=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getHandSpace()};function P(q){let Q=M.indexOf(q.inputSource);if(Q===-1)return;let ct=v[Q];ct!==void 0&&(ct.update(q.inputSource,q.frame,c||o),ct.dispatchEvent({type:q.type,data:q.inputSource}))}function B(){i.removeEventListener("select",P),i.removeEventListener("selectstart",P),i.removeEventListener("selectend",P),i.removeEventListener("squeeze",P),i.removeEventListener("squeezestart",P),i.removeEventListener("squeezeend",P),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",X);for(let q=0;q<v.length;q++){let Q=M[q];Q!==null&&(M[q]=null,v[q].disconnect(Q))}L=null,F=null,g.reset(),t.setRenderTarget(m),d=null,f=null,h=null,i=null,S=null,Wt.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(D.width,D.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(q){s=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(q){a=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(q){c=q},this.getBaseLayer=function(){return f!==null?f:d},this.getBinding=function(){return h},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(q){if(i=q,i!==null){if(m=t.getRenderTarget(),i.addEventListener("select",P),i.addEventListener("selectstart",P),i.addEventListener("selectend",P),i.addEventListener("squeeze",P),i.addEventListener("squeezestart",P),i.addEventListener("squeezeend",P),i.addEventListener("end",B),i.addEventListener("inputsourceschange",X),p.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(D),i.renderState.layers===void 0){let Q={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:s};d=new XRWebGLLayer(i,e,Q),i.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),S=new Ui(d.framebufferWidth,d.framebufferHeight,{format:pi,type:cr,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let Q=null,ct=null,tt=null;p.depth&&(tt=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Q=p.stencil?Uo:Os,ct=p.stencil?ko:Hs);let It={colorFormat:e.RGBA8,depthFormat:tt,scaleFactor:s};h=new XRWebGLBinding(i,e),f=h.createProjectionLayer(It),i.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),S=new Ui(f.textureWidth,f.textureHeight,{format:pi,type:cr,depthTexture:new bl(f.textureWidth,f.textureHeight,ct,void 0,void 0,void 0,void 0,void 0,void 0,Q),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1})}S.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Wt.setContext(i),Wt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function X(q){for(let Q=0;Q<q.removed.length;Q++){let ct=q.removed[Q],tt=M.indexOf(ct);tt>=0&&(M[tt]=null,v[tt].disconnect(ct))}for(let Q=0;Q<q.added.length;Q++){let ct=q.added[Q],tt=M.indexOf(ct);if(tt===-1){for(let Rt=0;Rt<v.length;Rt++)if(Rt>=M.length){M.push(ct),tt=Rt;break}else if(M[Rt]===null){M[Rt]=ct,tt=Rt;break}if(tt===-1)break}let It=v[tt];It&&It.connect(ct)}}let G=new Z,J=new Z;function U(q,Q,ct){G.setFromMatrixPosition(Q.matrixWorld),J.setFromMatrixPosition(ct.matrixWorld);let tt=G.distanceTo(J),It=Q.projectionMatrix.elements,Rt=ct.projectionMatrix.elements,z=It[14]/(It[10]-1),Xt=It[14]/(It[10]+1),bt=(It[9]+1)/It[5],wt=(It[9]-1)/It[5],_t=(It[8]-1)/It[0],Ft=(Rt[8]+1)/Rt[0],Pt=z*_t,k=z*Ft,jt=tt/(-_t+Ft),C=jt*-_t;Q.matrixWorld.decompose(q.position,q.quaternion,q.scale),q.translateX(C),q.translateZ(jt),q.matrixWorld.compose(q.position,q.quaternion,q.scale),q.matrixWorldInverse.copy(q.matrixWorld).invert();let b=z+jt,Y=Xt+jt,j=Pt-C,et=k+(tt-C),nt=bt*Xt/Y*b,mt=wt*Xt/Y*b;q.projectionMatrix.makePerspective(j,et,nt,mt,b,Y),q.projectionMatrixInverse.copy(q.projectionMatrix).invert()}function I(q,Q){Q===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(Q.matrixWorld,q.matrix),q.matrixWorldInverse.copy(q.matrixWorld).invert()}this.updateCamera=function(q){if(i===null)return;g.texture!==null&&(q.near=g.depthNear,q.far=g.depthFar),x.near=R.near=E.near=q.near,x.far=R.far=E.far=q.far,(L!==x.near||F!==x.far)&&(i.updateRenderState({depthNear:x.near,depthFar:x.far}),L=x.near,F=x.far,E.near=L,E.far=F,R.near=L,R.far=F,E.updateProjectionMatrix(),R.updateProjectionMatrix(),q.updateProjectionMatrix());let Q=q.parent,ct=x.cameras;I(x,Q);for(let tt=0;tt<ct.length;tt++)I(ct[tt],Q);ct.length===2?U(x,E,R):x.projectionMatrix.copy(E.projectionMatrix),A(q,x,Q)};function A(q,Q,ct){ct===null?q.matrix.copy(Q.matrixWorld):(q.matrix.copy(ct.matrixWorld),q.matrix.invert(),q.matrix.multiply(Q.matrixWorld)),q.matrix.decompose(q.position,q.quaternion,q.scale),q.updateMatrixWorld(!0),q.projectionMatrix.copy(Q.projectionMatrix),q.projectionMatrixInverse.copy(Q.projectionMatrixInverse),q.isPerspectiveCamera&&(q.fov=Hu*2*Math.atan(1/q.projectionMatrix.elements[5]),q.zoom=1)}this.getCamera=function(){return x},this.getFoveation=function(){if(!(f===null&&d===null))return l},this.setFoveation=function(q){l=q,f!==null&&(f.fixedFoveation=q),d!==null&&d.fixedFoveation!==void 0&&(d.fixedFoveation=q)},this.hasDepthSensing=function(){return g.texture!==null};let it=null;function vt(q,Q){if(u=Q.getViewerPose(c||o),_=Q,u!==null){let ct=u.views;d!==null&&(t.setRenderTargetFramebuffer(S,d.framebuffer),t.setRenderTarget(S));let tt=!1;ct.length!==x.cameras.length&&(x.cameras.length=0,tt=!0);for(let Rt=0;Rt<ct.length;Rt++){let z=ct[Rt],Xt=null;if(d!==null)Xt=d.getViewport(z);else{let wt=h.getViewSubImage(f,z);Xt=wt.viewport,Rt===0&&(t.setRenderTargetTextures(S,wt.colorTexture,f.ignoreDepthValues?void 0:wt.depthStencilTexture),t.setRenderTarget(S))}let bt=y[Rt];bt===void 0&&(bt=new xn,bt.layers.enable(Rt),bt.viewport=new Xe,y[Rt]=bt),bt.matrix.fromArray(z.transform.matrix),bt.matrix.decompose(bt.position,bt.quaternion,bt.scale),bt.projectionMatrix.fromArray(z.projectionMatrix),bt.projectionMatrixInverse.copy(bt.projectionMatrix).invert(),bt.viewport.set(Xt.x,Xt.y,Xt.width,Xt.height),Rt===0&&(x.matrix.copy(bt.matrix),x.matrix.decompose(x.position,x.quaternion,x.scale)),tt===!0&&x.cameras.push(bt)}let It=i.enabledFeatures;if(It&&It.includes("depth-sensing")){let Rt=h.getDepthInformation(ct[0]);Rt&&Rt.isValid&&Rt.texture&&g.init(t,Rt,i.renderState)}}for(let ct=0;ct<v.length;ct++){let tt=M[ct],It=v[ct];tt!==null&&It!==void 0&&It.update(tt,Q,c||o)}g.render(t,x),it&&it(q,Q),Q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Q}),_=null}let Wt=new Tm;Wt.setAnimationLoop(vt),this.setAnimationLoop=function(q){it=q},this.dispose=function(){}}},Vr=new Oi,zS=new Pe;function kS(r,t){function e(p,m){p.matrixAutoUpdate===!0&&p.updateMatrix(),m.value.copy(p.matrix)}function n(p,m){m.color.getRGB(p.fogColor.value,Em(r)),m.isFog?(p.fogNear.value=m.near,p.fogFar.value=m.far):m.isFogExp2&&(p.fogDensity.value=m.density)}function i(p,m,S,v,M){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(p,m):m.isMeshToonMaterial?(s(p,m),h(p,m)):m.isMeshPhongMaterial?(s(p,m),u(p,m)):m.isMeshStandardMaterial?(s(p,m),f(p,m),m.isMeshPhysicalMaterial&&d(p,m,M)):m.isMeshMatcapMaterial?(s(p,m),_(p,m)):m.isMeshDepthMaterial?s(p,m):m.isMeshDistanceMaterial?(s(p,m),g(p,m)):m.isMeshNormalMaterial?s(p,m):m.isLineBasicMaterial?(o(p,m),m.isLineDashedMaterial&&a(p,m)):m.isPointsMaterial?l(p,m,S,v):m.isSpriteMaterial?c(p,m):m.isShadowMaterial?(p.color.value.copy(m.color),p.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(p,m){p.opacity.value=m.opacity,m.color&&p.diffuse.value.copy(m.color),m.emissive&&p.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(p.map.value=m.map,e(m.map,p.mapTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.bumpMap&&(p.bumpMap.value=m.bumpMap,e(m.bumpMap,p.bumpMapTransform),p.bumpScale.value=m.bumpScale,m.side===Tn&&(p.bumpScale.value*=-1)),m.normalMap&&(p.normalMap.value=m.normalMap,e(m.normalMap,p.normalMapTransform),p.normalScale.value.copy(m.normalScale),m.side===Tn&&p.normalScale.value.negate()),m.displacementMap&&(p.displacementMap.value=m.displacementMap,e(m.displacementMap,p.displacementMapTransform),p.displacementScale.value=m.displacementScale,p.displacementBias.value=m.displacementBias),m.emissiveMap&&(p.emissiveMap.value=m.emissiveMap,e(m.emissiveMap,p.emissiveMapTransform)),m.specularMap&&(p.specularMap.value=m.specularMap,e(m.specularMap,p.specularMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest);let S=t.get(m),v=S.envMap,M=S.envMapRotation;if(v&&(p.envMap.value=v,Vr.copy(M),Vr.x*=-1,Vr.y*=-1,Vr.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(Vr.y*=-1,Vr.z*=-1),p.envMapRotation.value.setFromMatrix4(zS.makeRotationFromEuler(Vr)),p.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=m.reflectivity,p.ior.value=m.ior,p.refractionRatio.value=m.refractionRatio),m.lightMap){p.lightMap.value=m.lightMap;let D=r._useLegacyLights===!0?Math.PI:1;p.lightMapIntensity.value=m.lightMapIntensity*D,e(m.lightMap,p.lightMapTransform)}m.aoMap&&(p.aoMap.value=m.aoMap,p.aoMapIntensity.value=m.aoMapIntensity,e(m.aoMap,p.aoMapTransform))}function o(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,m.map&&(p.map.value=m.map,e(m.map,p.mapTransform))}function a(p,m){p.dashSize.value=m.dashSize,p.totalSize.value=m.dashSize+m.gapSize,p.scale.value=m.scale}function l(p,m,S,v){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.size.value=m.size*S,p.scale.value=v*.5,m.map&&(p.map.value=m.map,e(m.map,p.uvTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function c(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.rotation.value=m.rotation,m.map&&(p.map.value=m.map,e(m.map,p.mapTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function u(p,m){p.specular.value.copy(m.specular),p.shininess.value=Math.max(m.shininess,1e-4)}function h(p,m){m.gradientMap&&(p.gradientMap.value=m.gradientMap)}function f(p,m){p.metalness.value=m.metalness,m.metalnessMap&&(p.metalnessMap.value=m.metalnessMap,e(m.metalnessMap,p.metalnessMapTransform)),p.roughness.value=m.roughness,m.roughnessMap&&(p.roughnessMap.value=m.roughnessMap,e(m.roughnessMap,p.roughnessMapTransform)),m.envMap&&(p.envMapIntensity.value=m.envMapIntensity)}function d(p,m,S){p.ior.value=m.ior,m.sheen>0&&(p.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),p.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(p.sheenColorMap.value=m.sheenColorMap,e(m.sheenColorMap,p.sheenColorMapTransform)),m.sheenRoughnessMap&&(p.sheenRoughnessMap.value=m.sheenRoughnessMap,e(m.sheenRoughnessMap,p.sheenRoughnessMapTransform))),m.clearcoat>0&&(p.clearcoat.value=m.clearcoat,p.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(p.clearcoatMap.value=m.clearcoatMap,e(m.clearcoatMap,p.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,e(m.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(p.clearcoatNormalMap.value=m.clearcoatNormalMap,e(m.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Tn&&p.clearcoatNormalScale.value.negate())),m.dispersion>0&&(p.dispersion.value=m.dispersion),m.iridescence>0&&(p.iridescence.value=m.iridescence,p.iridescenceIOR.value=m.iridescenceIOR,p.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(p.iridescenceMap.value=m.iridescenceMap,e(m.iridescenceMap,p.iridescenceMapTransform)),m.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=m.iridescenceThicknessMap,e(m.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),m.transmission>0&&(p.transmission.value=m.transmission,p.transmissionSamplerMap.value=S.texture,p.transmissionSamplerSize.value.set(S.width,S.height),m.transmissionMap&&(p.transmissionMap.value=m.transmissionMap,e(m.transmissionMap,p.transmissionMapTransform)),p.thickness.value=m.thickness,m.thicknessMap&&(p.thicknessMap.value=m.thicknessMap,e(m.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=m.attenuationDistance,p.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(p.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(p.anisotropyMap.value=m.anisotropyMap,e(m.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=m.specularIntensity,p.specularColor.value.copy(m.specularColor),m.specularColorMap&&(p.specularColorMap.value=m.specularColorMap,e(m.specularColorMap,p.specularColorMapTransform)),m.specularIntensityMap&&(p.specularIntensityMap.value=m.specularIntensityMap,e(m.specularIntensityMap,p.specularIntensityMapTransform))}function _(p,m){m.matcap&&(p.matcap.value=m.matcap)}function g(p,m){let S=t.get(m).light;p.referencePosition.value.setFromMatrixPosition(S.matrixWorld),p.nearDistance.value=S.shadow.camera.near,p.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function VS(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,v){let M=v.program;n.uniformBlockBinding(S,M)}function c(S,v){let M=i[S.id];M===void 0&&(_(S),M=u(S),i[S.id]=M,S.addEventListener("dispose",p));let D=v.program;n.updateUBOMapping(S,D);let T=t.render.frame;s[S.id]!==T&&(f(S),s[S.id]=T)}function u(S){let v=h();S.__bindingPointIndex=v;let M=r.createBuffer(),D=S.__size,T=S.usage;return r.bindBuffer(r.UNIFORM_BUFFER,M),r.bufferData(r.UNIFORM_BUFFER,D,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,v,M),M}function h(){for(let S=0;S<a;S++)if(o.indexOf(S)===-1)return o.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(S){let v=i[S.id],M=S.uniforms,D=S.__cache;r.bindBuffer(r.UNIFORM_BUFFER,v);for(let T=0,E=M.length;T<E;T++){let R=Array.isArray(M[T])?M[T]:[M[T]];for(let y=0,x=R.length;y<x;y++){let L=R[y];if(d(L,T,y,D)===!0){let F=L.__offset,P=Array.isArray(L.value)?L.value:[L.value],B=0;for(let X=0;X<P.length;X++){let G=P[X],J=g(G);typeof G=="number"||typeof G=="boolean"?(L.__data[0]=G,r.bufferSubData(r.UNIFORM_BUFFER,F+B,L.__data)):G.isMatrix3?(L.__data[0]=G.elements[0],L.__data[1]=G.elements[1],L.__data[2]=G.elements[2],L.__data[3]=0,L.__data[4]=G.elements[3],L.__data[5]=G.elements[4],L.__data[6]=G.elements[5],L.__data[7]=0,L.__data[8]=G.elements[6],L.__data[9]=G.elements[7],L.__data[10]=G.elements[8],L.__data[11]=0):(G.toArray(L.__data,B),B+=J.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,F,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function d(S,v,M,D){let T=S.value,E=v+"_"+M;if(D[E]===void 0)return typeof T=="number"||typeof T=="boolean"?D[E]=T:D[E]=T.clone(),!0;{let R=D[E];if(typeof T=="number"||typeof T=="boolean"){if(R!==T)return D[E]=T,!0}else if(R.equals(T)===!1)return R.copy(T),!0}return!1}function _(S){let v=S.uniforms,M=0,D=16;for(let E=0,R=v.length;E<R;E++){let y=Array.isArray(v[E])?v[E]:[v[E]];for(let x=0,L=y.length;x<L;x++){let F=y[x],P=Array.isArray(F.value)?F.value:[F.value];for(let B=0,X=P.length;B<X;B++){let G=P[B],J=g(G),U=M%D;U!==0&&D-U<J.boundary&&(M+=D-U),F.__data=new Float32Array(J.storage/Float32Array.BYTES_PER_ELEMENT),F.__offset=M,M+=J.storage}}}let T=M%D;return T>0&&(M+=D-T),S.__size=M,S.__cache={},this}function g(S){let v={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(v.boundary=4,v.storage=4):S.isVector2?(v.boundary=8,v.storage=8):S.isVector3||S.isColor?(v.boundary=16,v.storage=12):S.isVector4?(v.boundary=16,v.storage=16):S.isMatrix3?(v.boundary=48,v.storage=48):S.isMatrix4?(v.boundary=64,v.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),v}function p(S){let v=S.target;v.removeEventListener("dispose",p);let M=o.indexOf(v.__bindingPointIndex);o.splice(M,1),r.deleteBuffer(i[v.id]),delete i[v.id],delete s[v.id]}function m(){for(let S in i)r.deleteBuffer(i[S]);o=[],i={},s={}}return{bind:l,update:c,dispose:m}}var wl=class{constructor(t={}){let{canvas:e=J0(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=o;let d=new Uint32Array(4),_=new Int32Array(4),g=null,p=null,m=[],S=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Gn,this._useLegacyLights=!1,this.toneMapping=ar,this.toneMappingExposure=1;let v=this,M=!1,D=0,T=0,E=null,R=-1,y=null,x=new Xe,L=new Xe,F=null,P=new re(0),B=0,X=e.width,G=e.height,J=1,U=null,I=null,A=new Xe(0,0,X,G),it=new Xe(0,0,X,G),vt=!1,Wt=new Bo,q=!1,Q=!1,ct=new Pe,tt=new Z,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Rt(){return E===null?J:1}let z=n;function Xt(w,O){return e.getContext(w,O)}try{let w={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${vh}`),e.addEventListener("webglcontextlost",N,!1),e.addEventListener("webglcontextrestored",$,!1),e.addEventListener("webglcontextcreationerror",K,!1),z===null){let O="webgl2";if(z=Xt(O,w),z===null)throw Xt(O)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let bt,wt,_t,Ft,Pt,k,jt,C,b,Y,j,et,nt,mt,lt,rt,Lt,st,St,Jt,gt,xt,Nt,Gt;function ue(){bt=new oM(z),bt.init(),xt=new NS(z,bt),wt=new tM(z,bt,t,xt),_t=new LS(z),Ft=new cM(z),Pt=new MS,k=new FS(z,bt,_t,Pt,wt,xt,Ft),jt=new nM(v),C=new sM(v),b=new gx(z),Nt=new Qy(z,b),Y=new aM(z,b,Ft,Nt),j=new hM(z,Y,b,Ft),St=new uM(z,wt,k),rt=new eM(Pt),et=new yS(v,jt,C,bt,wt,Nt,rt),nt=new kS(v,Pt),mt=new bS,lt=new CS(bt),st=new Ky(v,jt,C,_t,j,f,l),Lt=new IS(v,j,wt),Gt=new VS(z,Ft,wt,_t),Jt=new jy(z,bt,Ft),gt=new lM(z,bt,Ft),Ft.programs=et.programs,v.capabilities=wt,v.extensions=bt,v.properties=Pt,v.renderLists=mt,v.shadowMap=Lt,v.state=_t,v.info=Ft}ue();let Ut=new rh(v,z);this.xr=Ut,this.getContext=function(){return z},this.getContextAttributes=function(){return z.getContextAttributes()},this.forceContextLoss=function(){let w=bt.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){let w=bt.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return J},this.setPixelRatio=function(w){w!==void 0&&(J=w,this.setSize(X,G,!1))},this.getSize=function(w){return w.set(X,G)},this.setSize=function(w,O,V=!0){if(Ut.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=w,G=O,e.width=Math.floor(w*J),e.height=Math.floor(O*J),V===!0&&(e.style.width=w+"px",e.style.height=O+"px"),this.setViewport(0,0,w,O)},this.getDrawingBufferSize=function(w){return w.set(X*J,G*J).floor()},this.setDrawingBufferSize=function(w,O,V){X=w,G=O,J=V,e.width=Math.floor(w*V),e.height=Math.floor(O*V),this.setViewport(0,0,w,O)},this.getCurrentViewport=function(w){return w.copy(x)},this.getViewport=function(w){return w.copy(A)},this.setViewport=function(w,O,V,H){w.isVector4?A.set(w.x,w.y,w.z,w.w):A.set(w,O,V,H),_t.viewport(x.copy(A).multiplyScalar(J).round())},this.getScissor=function(w){return w.copy(it)},this.setScissor=function(w,O,V,H){w.isVector4?it.set(w.x,w.y,w.z,w.w):it.set(w,O,V,H),_t.scissor(L.copy(it).multiplyScalar(J).round())},this.getScissorTest=function(){return vt},this.setScissorTest=function(w){_t.setScissorTest(vt=w)},this.setOpaqueSort=function(w){U=w},this.setTransparentSort=function(w){I=w},this.getClearColor=function(w){return w.copy(st.getClearColor())},this.setClearColor=function(){st.setClearColor.apply(st,arguments)},this.getClearAlpha=function(){return st.getClearAlpha()},this.setClearAlpha=function(){st.setClearAlpha.apply(st,arguments)},this.clear=function(w=!0,O=!0,V=!0){let H=0;if(w){let W=!1;if(E!==null){let ot=E.texture.format;W=ot===Mm||ot===ym||ot===vm}if(W){let ot=E.texture.type,ft=ot===cr||ot===Hs||ot===mm||ot===ko||ot===_m||ot===xm,pt=st.getClearColor(),Dt=st.getClearAlpha(),Bt=pt.r,Tt=pt.g,Et=pt.b;ft?(d[0]=Bt,d[1]=Tt,d[2]=Et,d[3]=Dt,z.clearBufferuiv(z.COLOR,0,d)):(_[0]=Bt,_[1]=Tt,_[2]=Et,_[3]=Dt,z.clearBufferiv(z.COLOR,0,_))}else H|=z.COLOR_BUFFER_BIT}O&&(H|=z.DEPTH_BUFFER_BIT),V&&(H|=z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),z.clear(H)},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(){e.removeEventListener("webglcontextlost",N,!1),e.removeEventListener("webglcontextrestored",$,!1),e.removeEventListener("webglcontextcreationerror",K,!1),mt.dispose(),lt.dispose(),Pt.dispose(),jt.dispose(),C.dispose(),j.dispose(),Nt.dispose(),Gt.dispose(),et.dispose(),Ut.dispose(),Ut.removeEventListener("sessionstart",te),Ut.removeEventListener("sessionend",Ct),yt.stop()};function N(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function $(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;let w=Ft.autoReset,O=Lt.enabled,V=Lt.autoUpdate,H=Lt.needsUpdate,W=Lt.type;ue(),Ft.autoReset=w,Lt.enabled=O,Lt.autoUpdate=V,Lt.needsUpdate=H,Lt.type=W}function K(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function at(w){let O=w.target;O.removeEventListener("dispose",at),ut(O)}function ut(w){Vt(w),Pt.remove(w)}function Vt(w){let O=Pt.get(w).programs;O!==void 0&&(O.forEach(function(V){et.releaseProgram(V)}),w.isShaderMaterial&&et.releaseShaderCache(w))}this.renderBufferDirect=function(w,O,V,H,W,ot){O===null&&(O=It);let ft=W.isMesh&&W.matrixWorld.determinant()<0,pt=ke(w,O,V,H,W);_t.setMaterial(H,ft);let Dt=V.index,Bt=1;if(H.wireframe===!0){if(Dt=Y.getWireframeAttribute(V),Dt===void 0)return;Bt=2}let Tt=V.drawRange,Et=V.attributes.position,ae=Tt.start*Bt,Ie=(Tt.start+Tt.count)*Bt;ot!==null&&(ae=Math.max(ae,ot.start*Bt),Ie=Math.min(Ie,(ot.start+ot.count)*Bt)),Dt!==null?(ae=Math.max(ae,0),Ie=Math.min(Ie,Dt.count)):Et!=null&&(ae=Math.max(ae,0),Ie=Math.min(Ie,Et.count));let Je=Ie-ae;if(Je<0||Je===1/0)return;Nt.setup(W,H,pt,V,Dt);let an,qt=Jt;if(Dt!==null&&(an=b.get(Dt),qt=gt,qt.setIndex(an)),W.isMesh)H.wireframe===!0?(_t.setLineWidth(H.wireframeLinewidth*Rt()),qt.setMode(z.LINES)):qt.setMode(z.TRIANGLES);else if(W.isLine){let Ot=H.linewidth;Ot===void 0&&(Ot=1),_t.setLineWidth(Ot*Rt()),W.isLineSegments?qt.setMode(z.LINES):W.isLineLoop?qt.setMode(z.LINE_LOOP):qt.setMode(z.LINE_STRIP)}else W.isPoints?qt.setMode(z.POINTS):W.isSprite&&qt.setMode(z.TRIANGLES);if(W.isBatchedMesh)W._multiDrawInstances!==null?qt.renderMultiDrawInstances(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount,W._multiDrawInstances):qt.renderMultiDraw(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount);else if(W.isInstancedMesh)qt.renderInstances(ae,Je,W.count);else if(V.isInstancedBufferGeometry){let Ot=V._maxInstanceCount!==void 0?V._maxInstanceCount:1/0,si=Math.min(V.instanceCount,Ot);qt.renderInstances(ae,Je,si)}else qt.render(ae,Je)};function se(w,O,V){w.transparent===!0&&w.side===Fi&&w.forceSinglePass===!1?(w.side=Tn,w.needsUpdate=!0,be(w,O,V),w.side=lr,w.needsUpdate=!0,be(w,O,V),w.side=Fi):be(w,O,V)}this.compile=function(w,O,V=null){V===null&&(V=w),p=lt.get(V),p.init(O),S.push(p),V.traverseVisible(function(W){W.isLight&&W.layers.test(O.layers)&&(p.pushLight(W),W.castShadow&&p.pushShadow(W))}),w!==V&&w.traverseVisible(function(W){W.isLight&&W.layers.test(O.layers)&&(p.pushLight(W),W.castShadow&&p.pushShadow(W))}),p.setupLights(v._useLegacyLights);let H=new Set;return w.traverse(function(W){let ot=W.material;if(ot)if(Array.isArray(ot))for(let ft=0;ft<ot.length;ft++){let pt=ot[ft];se(pt,V,W),H.add(pt)}else se(ot,V,W),H.add(ot)}),S.pop(),p=null,H},this.compileAsync=function(w,O,V=null){let H=this.compile(w,O,V);return new Promise(W=>{function ot(){if(H.forEach(function(ft){Pt.get(ft).currentProgram.isReady()&&H.delete(ft)}),H.size===0){W(w);return}setTimeout(ot,10)}bt.get("KHR_parallel_shader_compile")!==null?ot():setTimeout(ot,10)})};let ce=null;function pe(w){ce&&ce(w)}function te(){yt.stop()}function Ct(){yt.start()}let yt=new Tm;yt.setAnimationLoop(pe),typeof self<"u"&&yt.setContext(self),this.setAnimationLoop=function(w){ce=w,Ut.setAnimationLoop(w),w===null?yt.stop():yt.start()},Ut.addEventListener("sessionstart",te),Ut.addEventListener("sessionend",Ct),this.render=function(w,O){if(O!==void 0&&O.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(M===!0)return;w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),O.parent===null&&O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),Ut.enabled===!0&&Ut.isPresenting===!0&&(Ut.cameraAutoUpdate===!0&&Ut.updateCamera(O),O=Ut.getCamera()),w.isScene===!0&&w.onBeforeRender(v,w,O,E),p=lt.get(w,S.length),p.init(O),S.push(p),ct.multiplyMatrices(O.projectionMatrix,O.matrixWorldInverse),Wt.setFromProjectionMatrix(ct),Q=this.localClippingEnabled,q=rt.init(this.clippingPlanes,Q),g=mt.get(w,m.length),g.init(),m.push(g),ie(w,O,0,v.sortObjects),g.finish(),v.sortObjects===!0&&g.sort(U,I);let V=Ut.enabled===!1||Ut.isPresenting===!1||Ut.hasDepthSensing()===!1;V&&st.addToRenderList(g,w),this.info.render.frame++,q===!0&&rt.beginShadows();let H=p.state.shadowsArray;Lt.render(H,w,O),q===!0&&rt.endShadows(),this.info.autoReset===!0&&this.info.reset();let W=g.opaque,ot=g.transmissive;if(p.setupLights(v._useLegacyLights),O.isArrayCamera){let ft=O.cameras;if(ot.length>0)for(let pt=0,Dt=ft.length;pt<Dt;pt++){let Bt=ft[pt];kt(W,ot,w,Bt)}V&&st.render(w);for(let pt=0,Dt=ft.length;pt<Dt;pt++){let Bt=ft[pt];ht(g,w,Bt,Bt.viewport)}}else ot.length>0&&kt(W,ot,w,O),V&&st.render(w),ht(g,w,O);E!==null&&(k.updateMultisampleRenderTarget(E),k.updateRenderTargetMipmap(E)),w.isScene===!0&&w.onAfterRender(v,w,O),Nt.resetDefaultState(),R=-1,y=null,S.pop(),S.length>0?(p=S[S.length-1],q===!0&&rt.setGlobalState(v.clippingPlanes,p.state.camera)):p=null,m.pop(),m.length>0?g=m[m.length-1]:g=null};function ie(w,O,V,H){if(w.visible===!1)return;if(w.layers.test(O.layers)){if(w.isGroup)V=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(O);else if(w.isLight)p.pushLight(w),w.castShadow&&p.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||Wt.intersectsSprite(w)){H&&tt.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ct);let ft=j.update(w),pt=w.material;pt.visible&&g.push(w,ft,pt,V,tt.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||Wt.intersectsObject(w))){let ft=j.update(w),pt=w.material;if(H&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),tt.copy(w.boundingSphere.center)):(ft.boundingSphere===null&&ft.computeBoundingSphere(),tt.copy(ft.boundingSphere.center)),tt.applyMatrix4(w.matrixWorld).applyMatrix4(ct)),Array.isArray(pt)){let Dt=ft.groups;for(let Bt=0,Tt=Dt.length;Bt<Tt;Bt++){let Et=Dt[Bt],ae=pt[Et.materialIndex];ae&&ae.visible&&g.push(w,ft,ae,V,tt.z,Et)}}else pt.visible&&g.push(w,ft,pt,V,tt.z,null)}}let ot=w.children;for(let ft=0,pt=ot.length;ft<pt;ft++)ie(ot[ft],O,V,H)}function ht(w,O,V,H){let W=w.opaque,ot=w.transmissive,ft=w.transparent;p.setupLightsView(V),q===!0&&rt.setGlobalState(v.clippingPlanes,V),H&&_t.viewport(x.copy(H)),W.length>0&&At(W,O,V),ot.length>0&&At(ot,O,V),ft.length>0&&At(ft,O,V),_t.buffers.depth.setTest(!0),_t.buffers.depth.setMask(!0),_t.buffers.color.setMask(!0),_t.setPolygonOffset(!1)}function kt(w,O,V,H){if((V.isScene===!0?V.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[H.id]===void 0&&(p.state.transmissionRenderTarget[H.id]=new Ui(1,1,{generateMipmaps:!0,type:bt.has("EXT_color_buffer_half_float")||bt.has("EXT_color_buffer_float")?Pl:cr,minFilter:qr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let ot=p.state.transmissionRenderTarget[H.id],ft=H.viewport||x;ot.setSize(ft.z,ft.w);let pt=v.getRenderTarget();v.setRenderTarget(ot),v.getClearColor(P),B=v.getClearAlpha(),B<1&&v.setClearColor(16777215,.5),v.clear();let Dt=v.toneMapping;v.toneMapping=ar;let Bt=H.viewport;if(H.viewport!==void 0&&(H.viewport=void 0),p.setupLightsView(H),q===!0&&rt.setGlobalState(v.clippingPlanes,H),At(w,V,H),k.updateMultisampleRenderTarget(ot),k.updateRenderTargetMipmap(ot),bt.has("WEBGL_multisampled_render_to_texture")===!1){let Tt=!1;for(let Et=0,ae=O.length;Et<ae;Et++){let Ie=O[Et],Je=Ie.object,an=Ie.geometry,qt=Ie.material,Ot=Ie.group;if(qt.side===Fi&&Je.layers.test(H.layers)){let si=qt.side;qt.side=Tn,qt.needsUpdate=!0,zt(Je,V,H,an,qt,Ot),qt.side=si,qt.needsUpdate=!0,Tt=!0}}Tt===!0&&(k.updateMultisampleRenderTarget(ot),k.updateRenderTargetMipmap(ot))}v.setRenderTarget(pt),v.setClearColor(P,B),Bt!==void 0&&(H.viewport=Bt),v.toneMapping=Dt}function At(w,O,V){let H=O.isScene===!0?O.overrideMaterial:null;for(let W=0,ot=w.length;W<ot;W++){let ft=w[W],pt=ft.object,Dt=ft.geometry,Bt=H===null?ft.material:H,Tt=ft.group;pt.layers.test(V.layers)&&zt(pt,O,V,Dt,Bt,Tt)}}function zt(w,O,V,H,W,ot){w.onBeforeRender(v,O,V,H,W,ot),w.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),W.onBeforeRender(v,O,V,H,w,ot),W.transparent===!0&&W.side===Fi&&W.forceSinglePass===!1?(W.side=Tn,W.needsUpdate=!0,v.renderBufferDirect(V,O,H,W,w,ot),W.side=lr,W.needsUpdate=!0,v.renderBufferDirect(V,O,H,W,w,ot),W.side=Fi):v.renderBufferDirect(V,O,H,W,w,ot),w.onAfterRender(v,O,V,H,W,ot)}function be(w,O,V){O.isScene!==!0&&(O=It);let H=Pt.get(w),W=p.state.lights,ot=p.state.shadowsArray,ft=W.state.version,pt=et.getParameters(w,W.state,ot,O,V),Dt=et.getProgramCacheKey(pt),Bt=H.programs;H.environment=w.isMeshStandardMaterial?O.environment:null,H.fog=O.fog,H.envMap=(w.isMeshStandardMaterial?C:jt).get(w.envMap||H.environment),H.envMapRotation=H.environment!==null&&w.envMap===null?O.environmentRotation:w.envMapRotation,Bt===void 0&&(w.addEventListener("dispose",at),Bt=new Map,H.programs=Bt);let Tt=Bt.get(Dt);if(Tt!==void 0){if(H.currentProgram===Tt&&H.lightsStateVersion===ft)return ve(w,pt),Tt}else pt.uniforms=et.getUniforms(w),w.onBuild(V,pt,v),w.onBeforeCompile(pt,v),Tt=et.acquireProgram(pt,Dt),Bt.set(Dt,Tt),H.uniforms=pt.uniforms;let Et=H.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Et.clippingPlanes=rt.uniform),ve(w,pt),H.needsLights=me(w),H.lightsStateVersion=ft,H.needsLights&&(Et.ambientLightColor.value=W.state.ambient,Et.lightProbe.value=W.state.probe,Et.directionalLights.value=W.state.directional,Et.directionalLightShadows.value=W.state.directionalShadow,Et.spotLights.value=W.state.spot,Et.spotLightShadows.value=W.state.spotShadow,Et.rectAreaLights.value=W.state.rectArea,Et.ltc_1.value=W.state.rectAreaLTC1,Et.ltc_2.value=W.state.rectAreaLTC2,Et.pointLights.value=W.state.point,Et.pointLightShadows.value=W.state.pointShadow,Et.hemisphereLights.value=W.state.hemi,Et.directionalShadowMap.value=W.state.directionalShadowMap,Et.directionalShadowMatrix.value=W.state.directionalShadowMatrix,Et.spotShadowMap.value=W.state.spotShadowMap,Et.spotLightMatrix.value=W.state.spotLightMatrix,Et.spotLightMap.value=W.state.spotLightMap,Et.pointShadowMap.value=W.state.pointShadowMap,Et.pointShadowMatrix.value=W.state.pointShadowMatrix),H.currentProgram=Tt,H.uniformsList=null,Tt}function $t(w){if(w.uniformsList===null){let O=w.currentProgram.getUniforms();w.uniformsList=zs.seqWithValue(O.seq,w.uniforms)}return w.uniformsList}function ve(w,O){let V=Pt.get(w);V.outputColorSpace=O.outputColorSpace,V.batching=O.batching,V.instancing=O.instancing,V.instancingColor=O.instancingColor,V.instancingMorph=O.instancingMorph,V.skinning=O.skinning,V.morphTargets=O.morphTargets,V.morphNormals=O.morphNormals,V.morphColors=O.morphColors,V.morphTargetsCount=O.morphTargetsCount,V.numClippingPlanes=O.numClippingPlanes,V.numIntersection=O.numClipIntersection,V.vertexAlphas=O.vertexAlphas,V.vertexTangents=O.vertexTangents,V.toneMapping=O.toneMapping}function ke(w,O,V,H,W){O.isScene!==!0&&(O=It),k.resetTextureUnits();let ot=O.fog,ft=H.isMeshStandardMaterial?O.environment:null,pt=E===null?v.outputColorSpace:E.isXRRenderTarget===!0?E.texture.colorSpace:fr,Dt=(H.isMeshStandardMaterial?C:jt).get(H.envMap||ft),Bt=H.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,Tt=!!V.attributes.tangent&&(!!H.normalMap||H.anisotropy>0),Et=!!V.morphAttributes.position,ae=!!V.morphAttributes.normal,Ie=!!V.morphAttributes.color,Je=ar;H.toneMapped&&(E===null||E.isXRRenderTarget===!0)&&(Je=v.toneMapping);let an=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,qt=an!==void 0?an.length:0,Ot=Pt.get(H),si=p.state.lights;if(q===!0&&(Q===!0||w!==y)){let Fn=w===y&&H.id===R;rt.setState(H,w,Fn)}let le=!1;H.version===Ot.__version?(Ot.needsLights&&Ot.lightsStateVersion!==si.state.version||Ot.outputColorSpace!==pt||W.isBatchedMesh&&Ot.batching===!1||!W.isBatchedMesh&&Ot.batching===!0||W.isInstancedMesh&&Ot.instancing===!1||!W.isInstancedMesh&&Ot.instancing===!0||W.isSkinnedMesh&&Ot.skinning===!1||!W.isSkinnedMesh&&Ot.skinning===!0||W.isInstancedMesh&&Ot.instancingColor===!0&&W.instanceColor===null||W.isInstancedMesh&&Ot.instancingColor===!1&&W.instanceColor!==null||W.isInstancedMesh&&Ot.instancingMorph===!0&&W.morphTexture===null||W.isInstancedMesh&&Ot.instancingMorph===!1&&W.morphTexture!==null||Ot.envMap!==Dt||H.fog===!0&&Ot.fog!==ot||Ot.numClippingPlanes!==void 0&&(Ot.numClippingPlanes!==rt.numPlanes||Ot.numIntersection!==rt.numIntersection)||Ot.vertexAlphas!==Bt||Ot.vertexTangents!==Tt||Ot.morphTargets!==Et||Ot.morphNormals!==ae||Ot.morphColors!==Ie||Ot.toneMapping!==Je||Ot.morphTargetsCount!==qt)&&(le=!0):(le=!0,Ot.__version=H.version);let dr=Ot.currentProgram;le===!0&&(dr=be(H,O,W));let Dh=!1,Js=!1,Nl=!1,$e=dr.getUniforms(),Bi=Ot.uniforms;if(_t.useProgram(dr.program)&&(Dh=!0,Js=!0,Nl=!0),H.id!==R&&(R=H.id,Js=!0),Dh||y!==w){$e.setValue(z,"projectionMatrix",w.projectionMatrix),$e.setValue(z,"viewMatrix",w.matrixWorldInverse);let Fn=$e.map.cameraPosition;Fn!==void 0&&Fn.setValue(z,tt.setFromMatrixPosition(w.matrixWorld)),wt.logarithmicDepthBuffer&&$e.setValue(z,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(H.isMeshPhongMaterial||H.isMeshToonMaterial||H.isMeshLambertMaterial||H.isMeshBasicMaterial||H.isMeshStandardMaterial||H.isShaderMaterial)&&$e.setValue(z,"isOrthographic",w.isOrthographicCamera===!0),y!==w&&(y=w,Js=!0,Nl=!0)}if(W.isSkinnedMesh){$e.setOptional(z,W,"bindMatrix"),$e.setOptional(z,W,"bindMatrixInverse");let Fn=W.skeleton;Fn&&(Fn.boneTexture===null&&Fn.computeBoneTexture(),$e.setValue(z,"boneTexture",Fn.boneTexture,k))}W.isBatchedMesh&&($e.setOptional(z,W,"batchingTexture"),$e.setValue(z,"batchingTexture",W._matricesTexture,k));let Ul=V.morphAttributes;if((Ul.position!==void 0||Ul.normal!==void 0||Ul.color!==void 0)&&St.update(W,V,dr),(Js||Ot.receiveShadow!==W.receiveShadow)&&(Ot.receiveShadow=W.receiveShadow,$e.setValue(z,"receiveShadow",W.receiveShadow)),H.isMeshGouraudMaterial&&H.envMap!==null&&(Bi.envMap.value=Dt,Bi.flipEnvMap.value=Dt.isCubeTexture&&Dt.isRenderTargetTexture===!1?-1:1),H.isMeshStandardMaterial&&H.envMap===null&&O.environment!==null&&(Bi.envMapIntensity.value=O.environmentIntensity),Js&&($e.setValue(z,"toneMappingExposure",v.toneMappingExposure),Ot.needsLights&&ye(Bi,Nl),ot&&H.fog===!0&&nt.refreshFogUniforms(Bi,ot),nt.refreshMaterialUniforms(Bi,H,J,G,p.state.transmissionRenderTarget[w.id]),zs.upload(z,$t(Ot),Bi,k)),H.isShaderMaterial&&H.uniformsNeedUpdate===!0&&(zs.upload(z,$t(Ot),Bi,k),H.uniformsNeedUpdate=!1),H.isSpriteMaterial&&$e.setValue(z,"center",W.center),$e.setValue(z,"modelViewMatrix",W.modelViewMatrix),$e.setValue(z,"normalMatrix",W.normalMatrix),$e.setValue(z,"modelMatrix",W.matrixWorld),H.isShaderMaterial||H.isRawShaderMaterial){let Fn=H.uniformsGroups;for(let Ol=0,Gm=Fn.length;Ol<Gm;Ol++){let Ch=Fn[Ol];Gt.update(Ch,dr),Gt.bind(Ch,dr)}}return dr}function ye(w,O){w.ambientLightColor.needsUpdate=O,w.lightProbe.needsUpdate=O,w.directionalLights.needsUpdate=O,w.directionalLightShadows.needsUpdate=O,w.pointLights.needsUpdate=O,w.pointLightShadows.needsUpdate=O,w.spotLights.needsUpdate=O,w.spotLightShadows.needsUpdate=O,w.rectAreaLights.needsUpdate=O,w.hemisphereLights.needsUpdate=O}function me(w){return w.isMeshLambertMaterial||w.isMeshToonMaterial||w.isMeshPhongMaterial||w.isMeshStandardMaterial||w.isShadowMaterial||w.isShaderMaterial&&w.lights===!0}this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(w,O,V){Pt.get(w.texture).__webglTexture=O,Pt.get(w.depthTexture).__webglTexture=V;let H=Pt.get(w);H.__hasExternalTextures=!0,H.__autoAllocateDepthBuffer=V===void 0,H.__autoAllocateDepthBuffer||bt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),H.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(w,O){let V=Pt.get(w);V.__webglFramebuffer=O,V.__useDefaultFramebuffer=O===void 0},this.setRenderTarget=function(w,O=0,V=0){E=w,D=O,T=V;let H=!0,W=null,ot=!1,ft=!1;if(w){let Dt=Pt.get(w);Dt.__useDefaultFramebuffer!==void 0?(_t.bindFramebuffer(z.FRAMEBUFFER,null),H=!1):Dt.__webglFramebuffer===void 0?k.setupRenderTarget(w):Dt.__hasExternalTextures&&k.rebindTextures(w,Pt.get(w.texture).__webglTexture,Pt.get(w.depthTexture).__webglTexture);let Bt=w.texture;(Bt.isData3DTexture||Bt.isDataArrayTexture||Bt.isCompressedArrayTexture)&&(ft=!0);let Tt=Pt.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Tt[O])?W=Tt[O][V]:W=Tt[O],ot=!0):w.samples>0&&k.useMultisampledRTT(w)===!1?W=Pt.get(w).__webglMultisampledFramebuffer:Array.isArray(Tt)?W=Tt[V]:W=Tt,x.copy(w.viewport),L.copy(w.scissor),F=w.scissorTest}else x.copy(A).multiplyScalar(J).floor(),L.copy(it).multiplyScalar(J).floor(),F=vt;if(_t.bindFramebuffer(z.FRAMEBUFFER,W)&&H&&_t.drawBuffers(w,W),_t.viewport(x),_t.scissor(L),_t.setScissorTest(F),ot){let Dt=Pt.get(w.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_CUBE_MAP_POSITIVE_X+O,Dt.__webglTexture,V)}else if(ft){let Dt=Pt.get(w.texture),Bt=O||0;z.framebufferTextureLayer(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,Dt.__webglTexture,V||0,Bt)}R=-1},this.readRenderTargetPixels=function(w,O,V,H,W,ot,ft){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let pt=Pt.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ft!==void 0&&(pt=pt[ft]),pt){_t.bindFramebuffer(z.FRAMEBUFFER,pt);try{let Dt=w.texture,Bt=Dt.format,Tt=Dt.type;if(!wt.textureFormatReadable(Bt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!wt.textureTypeReadable(Tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}O>=0&&O<=w.width-H&&V>=0&&V<=w.height-W&&z.readPixels(O,V,H,W,xt.convert(Bt),xt.convert(Tt),ot)}finally{let Dt=E!==null?Pt.get(E).__webglFramebuffer:null;_t.bindFramebuffer(z.FRAMEBUFFER,Dt)}}},this.copyFramebufferToTexture=function(w,O,V=0){let H=Math.pow(2,-V),W=Math.floor(O.image.width*H),ot=Math.floor(O.image.height*H);k.setTexture2D(O,0),z.copyTexSubImage2D(z.TEXTURE_2D,V,0,0,w.x,w.y,W,ot),_t.unbindTexture()},this.copyTextureToTexture=function(w,O,V,H=0){let W=O.image.width,ot=O.image.height,ft=xt.convert(V.format),pt=xt.convert(V.type);k.setTexture2D(V,0),z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,V.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,V.unpackAlignment),O.isDataTexture?z.texSubImage2D(z.TEXTURE_2D,H,w.x,w.y,W,ot,ft,pt,O.image.data):O.isCompressedTexture?z.compressedTexSubImage2D(z.TEXTURE_2D,H,w.x,w.y,O.mipmaps[0].width,O.mipmaps[0].height,ft,O.mipmaps[0].data):z.texSubImage2D(z.TEXTURE_2D,H,w.x,w.y,ft,pt,O.image),H===0&&V.generateMipmaps&&z.generateMipmap(z.TEXTURE_2D),_t.unbindTexture()},this.copyTextureToTexture3D=function(w,O,V,H,W=0){let ot=w.max.x-w.min.x,ft=w.max.y-w.min.y,pt=w.max.z-w.min.z,Dt=xt.convert(H.format),Bt=xt.convert(H.type),Tt;if(H.isData3DTexture)k.setTexture3D(H,0),Tt=z.TEXTURE_3D;else if(H.isDataArrayTexture||H.isCompressedArrayTexture)k.setTexture2DArray(H,0),Tt=z.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,H.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,H.unpackAlignment);let Et=z.getParameter(z.UNPACK_ROW_LENGTH),ae=z.getParameter(z.UNPACK_IMAGE_HEIGHT),Ie=z.getParameter(z.UNPACK_SKIP_PIXELS),Je=z.getParameter(z.UNPACK_SKIP_ROWS),an=z.getParameter(z.UNPACK_SKIP_IMAGES),qt=V.isCompressedTexture?V.mipmaps[W]:V.image;z.pixelStorei(z.UNPACK_ROW_LENGTH,qt.width),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,qt.height),z.pixelStorei(z.UNPACK_SKIP_PIXELS,w.min.x),z.pixelStorei(z.UNPACK_SKIP_ROWS,w.min.y),z.pixelStorei(z.UNPACK_SKIP_IMAGES,w.min.z),V.isDataTexture||V.isData3DTexture?z.texSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,Bt,qt.data):H.isCompressedArrayTexture?z.compressedTexSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,qt.data):z.texSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,Bt,qt),z.pixelStorei(z.UNPACK_ROW_LENGTH,Et),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,ae),z.pixelStorei(z.UNPACK_SKIP_PIXELS,Ie),z.pixelStorei(z.UNPACK_SKIP_ROWS,Je),z.pixelStorei(z.UNPACK_SKIP_IMAGES,an),W===0&&H.generateMipmaps&&z.generateMipmap(Tt),_t.unbindTexture()},this.initTexture=function(w){w.isCubeTexture?k.setTextureCube(w,0):w.isData3DTexture?k.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?k.setTexture2DArray(w,0):k.setTexture2D(w,0),_t.unbindTexture()},this.resetState=function(){D=0,T=0,E=null,_t.reset(),Nt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ni}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Mh?"display-p3":"srgb",e.unpackColorSpace=fe.workingColorSpace===Il?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}};var El=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new re(t),this.near=e,this.far=n}clone(){return new r(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Tl=class extends on{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Oi,this.environmentIntensity=1,this.environmentRotation=new Oi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}};var sh=class extends Zr{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new re(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}},lm=new Pe,oh=new dl,tl=new Gs,el=new Z,Al=class extends on{constructor(t=new mi,e=new sh){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){let n=this.geometry,i=this.matrixWorld,s=t.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),tl.copy(n.boundingSphere),tl.applyMatrix4(i),tl.radius+=s,t.ray.intersectsSphere(tl)===!1)return;lm.copy(i).invert(),oh.copy(t.ray).applyMatrix4(lm);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,h=n.attributes.position;if(c!==null){let f=Math.max(0,o.start),d=Math.min(c.count,o.start+o.count);for(let _=f,g=d;_<g;_++){let p=c.getX(_);el.fromBufferAttribute(h,p),cm(el,p,l,i,t,e,this)}}else{let f=Math.max(0,o.start),d=Math.min(h.count,o.start+o.count);for(let _=f,g=d;_<g;_++)el.fromBufferAttribute(h,_),cm(el,_,l,i,t,e,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function cm(r,t,e,n,i,s,o){let a=oh.distanceSqToPoint(r);if(a<e){let l=new Z;oh.closestPointToPoint(r,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:o})}}function nl(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function HS(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Xs=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t<i)){for(let a=n+2;;){if(i===void 0){if(t<s)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=i,i=e[++n],t<i)break t}o=e.length;break e}if(!(t>=s)){let a=e[1];t<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=s,s=e[--n-1],t>=s)break t}o=n,n=0;break e}break n}for(;n<o;){let a=n+o>>>1;t<e[a]?o=a:n=a+1}if(i=e[n],s=e[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=t*i;for(let o=0;o!==i;++o)e[o]=n[s+o];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},ah=class extends Xs{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:gp,endingEnd:gp}}intervalChanged_(t,e,n){let i=this.parameterPositions,s=t-2,o=t+1,a=i[s],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case _p:s=t,a=2*e-n;break;case xp:s=i.length-2,a=e+i[s]-i[s+1];break;default:s=t,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case _p:o=t,l=2*n-e;break;case xp:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=this._offsetPrev,h=this._offsetNext,f=this._weightPrev,d=this._weightNext,_=(n-e)/(i-e),g=_*_,p=g*_,m=-f*p+2*f*g-f*_,S=(1+f)*p+(-1.5-2*f)*g+(-.5+f)*_+1,v=(-1-d)*p+(1.5+d)*g+.5*_,M=d*p-d*g;for(let D=0;D!==a;++D)s[D]=m*o[u+D]+S*o[c+D]+v*o[l+D]+M*o[h+D];return s}},lh=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=(n-e)/(i-e),h=1-u;for(let f=0;f!==a;++f)s[f]=o[c+f]*h+o[l+f]*u;return s}},ch=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},ri=class{constructor(t,e,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=nl(e,this.TimeBufferType),this.values=nl(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let e=t.constructor,n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:nl(t.times,Array),values:nl(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new ch(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new lh(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new ah(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case rl:e=this.InterpolantFactoryMethodDiscrete;break;case sl:e=this.InterpolantFactoryMethodLinear;break;case lu:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return rl;case this.InterpolantFactoryMethodLinear:return sl;case this.InterpolantFactoryMethodSmooth:return lu}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(t!==1){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){let n=this.times,i=n.length,s=0,o=i-1;for(;s!==i&&n[s]<t;)++s;for(;o!==-1&&n[o]>e;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),t=!1;break}o=l}if(i!==void 0&&HS(i))for(let a=0,l=i.length;a!==l;++a){let c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===lu,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],u=t[a+1];if(c!==u&&(a!==1||c!==t[0]))if(i)l=!0;else{let h=a*n,f=h-n,d=h+n;for(let _=0;_!==n;++_){let g=e[h+_];if(g!==e[f+_]||g!==e[d+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let h=a*n,f=o*n;for(let d=0;d!==n;++d)e[f+d]=e[h+d]}++o}}if(s>0){t[o]=t[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)e[l+c]=e[a+c];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){let t=this.times.slice(),e=this.values.slice(),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};ri.prototype.TimeBufferType=Float32Array;ri.prototype.ValueBufferType=Float32Array;ri.prototype.DefaultInterpolation=sl;var Jr=class extends ri{};Jr.prototype.ValueTypeName="bool";Jr.prototype.ValueBufferType=Array;Jr.prototype.DefaultInterpolation=rl;Jr.prototype.InterpolantFactoryMethodLinear=void 0;Jr.prototype.InterpolantFactoryMethodSmooth=void 0;var uh=class extends ri{};uh.prototype.ValueTypeName="color";var hh=class extends ri{};hh.prototype.ValueTypeName="number";var fh=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-e)/(i-e),c=t*a;for(let u=c+a;c!==u;c+=4)hr.slerpFlat(s,0,o,c-a,o,c,l);return s}},zo=class extends ri{InterpolantFactoryMethodLinear(t){return new fh(this.times,this.values,this.getValueSize(),t)}};zo.prototype.ValueTypeName="quaternion";zo.prototype.DefaultInterpolation=sl;zo.prototype.InterpolantFactoryMethodSmooth=void 0;var $r=class extends ri{};$r.prototype.ValueTypeName="string";$r.prototype.ValueBufferType=Array;$r.prototype.DefaultInterpolation=rl;$r.prototype.InterpolantFactoryMethodLinear=void 0;$r.prototype.InterpolantFactoryMethodSmooth=void 0;var dh=class extends ri{};dh.prototype.ValueTypeName="vector";var ph=class{constructor(t,e,n){let i=this,s=!1,o=0,a=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(u){a++,s===!1&&i.onStart!==void 0&&i.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,i.onProgress!==void 0&&i.onProgress(u,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){let h=c.indexOf(u);return h!==-1&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,f=c.length;h<f;h+=2){let d=c[h],_=c[h+1];if(d.global&&(d.lastIndex=0),d.test(u))return _}return null}}},GS=new ph,mh=class{constructor(t){this.manager=t!==void 0?t:GS,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let n=this;return new Promise(function(i,s){n.load(t,i,e,s)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}};mh.DEFAULT_MATERIAL_NAME="__DEFAULT";var Dl=class extends on{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new re(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),e}},Cl=class extends Dl{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(on.DEFAULT_UP),this.updateMatrix(),this.groundColor=new re(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},Nu=new Pe,um=new Z,hm=new Z,gh=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new oe(512,512),this.map=null,this.mapPass=null,this.matrix=new Pe,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Bo,this._frameExtents=new oe(1,1),this._viewportCount=1,this._viewports=[new Xe(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;um.setFromMatrixPosition(t.matrixWorld),e.position.copy(um),hm.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(hm),e.updateMatrixWorld(),Nu.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Nu),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Nu)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),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}};var _h=class extends gh{constructor(){super(new Ml(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Kr=class extends Dl{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(on.DEFAULT_UP),this.updateMatrix(),this.target=new on,this.shadow=new _h}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var bh="\\[\\]\\.:\\/",WS=new RegExp("["+bh+"]","g"),wh="[^"+bh+"]",XS="[^"+bh.replace("\\.","")+"]",qS=/((?:WC+[\/:])*)/.source.replace("WC",wh),YS=/(WCOD+)?/.source.replace("WCOD",XS),ZS=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",wh),JS=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",wh),$S=new RegExp("^"+qS+YS+ZS+JS+"$"),KS=["material","materials","bones","map"],xh=class{constructor(t,e,n){let i=n||Se.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Se=class r{constructor(t,e,n){this.path=e,this.parsedPath=n||r.parseTrackName(e),this.node=r.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new r.Composite(t,e,n):new r(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(WS,"")}static parseTrackName(t){let e=$S.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);KS.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;o<s.length;o++){let a=s[o];if(a.name===e||a.uuid===e)return a;let l=n(a.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node,e=this.parsedPath,n=e.objectName,i=e.propertyName,s=e.propertyIndex;if(t||(t=r.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=e.objectIndex;switch(n){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}t=t.skeleton.bones;for(let u=0;u<t.length;u++)if(t[u].name===c){c=u;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let o=t[i];if(o===void 0){let c=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(i==="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.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[s]!==void 0&&(s=t.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};Se.Composite=xh;Se.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Se.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Se.prototype.GetterByBindingType=[Se.prototype._getValue_direct,Se.prototype._getValue_array,Se.prototype._getValue_arrayElement,Se.prototype._getValue_toArray];Se.prototype.SetterByBindingTypeAndVersioning=[[Se.prototype._setValue_direct,Se.prototype._setValue_direct_setNeedsUpdate,Se.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_array,Se.prototype._setValue_array_setNeedsUpdate,Se.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_arrayElement,Se.prototype._setValue_arrayElement_setNeedsUpdate,Se.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_fromArray,Se.prototype._setValue_fromArray_setNeedsUpdate,Se.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var Jb=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:vh}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=vh);var Im=(r,t,e=7e3,n=25)=>{let i=new rr,s=new wl({canvas:r,antialias:!0,alpha:!0}),o=new Tl,a=new xn(18);a.near=1,a.far=2e3,a.position.z=-10,s.outputColorSpace=Gn,s.shadowMap.enabled=!0,s.shadowMap.type=yh,o.fog=new El(3741705,9,15),o.add(i);let l=new Cl(16777215,41378,1),c=new Kr(3355443,4);c.position.set(5,5,5),c.lookAt(0,0,0),c.castShadow=!0,c.shadow.mapSize.width=512,c.shadow.mapSize.height=512,c.shadow.camera.near=.5,c.shadow.camera.far=500,o.add(c),o.add(l);let u=[new Kr(16777215,1),new Kr(11460838,1),new Kr(14277490,1)];u[0].position.set(1,0,0),u[1].position.set(.75,1,.5),u[2].position.set(-.75,-1,.5),u.forEach(S=>o.add(S));let h=new mi,f=[],d=[],_=n/2;for(let S=0;S<e;S++)f.push(Math.random()*n-_,Math.random()*n-_,Math.random()*n-_),d.push(Math.random()*.9+.1);h.setAttribute("position",new qn(f,3)),h.setAttribute("opacity",new qn(d,1)),h.computeBoundingSphere();let g=new Zn({vertexShader:`
|
|
3821
|
+
}`,ih=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(this.texture===null){let i=new Yn,s=t.properties.get(i);s.__webglTexture=e.texture,(e.depthNear!=n.depthNear||e.depthFar!=n.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}render(t,e){if(this.texture!==null){if(this.mesh===null){let n=e.cameras[0].viewport,i=new Zn({vertexShader:OS,fragmentShader:BS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new ii(new yl(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},rh=class extends ur{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,f=null,d=null,_=null,g=new ih,p=e.getContextAttributes(),m=null,S=null,v=[],M=[],D=new oe,T=null,E=new xn;E.layers.enable(1),E.viewport=new Xe;let R=new xn;R.layers.enable(2),R.viewport=new Xe;let y=[E,R],x=new nh;x.layers.enable(1),x.layers.enable(2);let L=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getGripSpace()},this.getHand=function(q){let Q=v[q];return Q===void 0&&(Q=new No,v[q]=Q),Q.getHandSpace()};function P(q){let Q=M.indexOf(q.inputSource);if(Q===-1)return;let ct=v[Q];ct!==void 0&&(ct.update(q.inputSource,q.frame,c||o),ct.dispatchEvent({type:q.type,data:q.inputSource}))}function B(){i.removeEventListener("select",P),i.removeEventListener("selectstart",P),i.removeEventListener("selectend",P),i.removeEventListener("squeeze",P),i.removeEventListener("squeezestart",P),i.removeEventListener("squeezeend",P),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",X);for(let q=0;q<v.length;q++){let Q=M[q];Q!==null&&(M[q]=null,v[q].disconnect(Q))}L=null,F=null,g.reset(),t.setRenderTarget(m),d=null,f=null,h=null,i=null,S=null,Wt.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(D.width,D.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(q){s=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(q){a=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(q){c=q},this.getBaseLayer=function(){return f!==null?f:d},this.getBinding=function(){return h},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(q){if(i=q,i!==null){if(m=t.getRenderTarget(),i.addEventListener("select",P),i.addEventListener("selectstart",P),i.addEventListener("selectend",P),i.addEventListener("squeeze",P),i.addEventListener("squeezestart",P),i.addEventListener("squeezeend",P),i.addEventListener("end",B),i.addEventListener("inputsourceschange",X),p.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(D),i.renderState.layers===void 0){let Q={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:s};d=new XRWebGLLayer(i,e,Q),i.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),S=new Ui(d.framebufferWidth,d.framebufferHeight,{format:pi,type:cr,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let Q=null,ct=null,tt=null;p.depth&&(tt=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Q=p.stencil?Uo:Os,ct=p.stencil?ko:Hs);let It={colorFormat:e.RGBA8,depthFormat:tt,scaleFactor:s};h=new XRWebGLBinding(i,e),f=h.createProjectionLayer(It),i.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),S=new Ui(f.textureWidth,f.textureHeight,{format:pi,type:cr,depthTexture:new bl(f.textureWidth,f.textureHeight,ct,void 0,void 0,void 0,void 0,void 0,void 0,Q),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1})}S.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Wt.setContext(i),Wt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function X(q){for(let Q=0;Q<q.removed.length;Q++){let ct=q.removed[Q],tt=M.indexOf(ct);tt>=0&&(M[tt]=null,v[tt].disconnect(ct))}for(let Q=0;Q<q.added.length;Q++){let ct=q.added[Q],tt=M.indexOf(ct);if(tt===-1){for(let Rt=0;Rt<v.length;Rt++)if(Rt>=M.length){M.push(ct),tt=Rt;break}else if(M[Rt]===null){M[Rt]=ct,tt=Rt;break}if(tt===-1)break}let It=v[tt];It&&It.connect(ct)}}let G=new Z,J=new Z;function U(q,Q,ct){G.setFromMatrixPosition(Q.matrixWorld),J.setFromMatrixPosition(ct.matrixWorld);let tt=G.distanceTo(J),It=Q.projectionMatrix.elements,Rt=ct.projectionMatrix.elements,z=It[14]/(It[10]-1),Xt=It[14]/(It[10]+1),bt=(It[9]+1)/It[5],wt=(It[9]-1)/It[5],_t=(It[8]-1)/It[0],Ft=(Rt[8]+1)/Rt[0],Pt=z*_t,k=z*Ft,jt=tt/(-_t+Ft),C=jt*-_t;Q.matrixWorld.decompose(q.position,q.quaternion,q.scale),q.translateX(C),q.translateZ(jt),q.matrixWorld.compose(q.position,q.quaternion,q.scale),q.matrixWorldInverse.copy(q.matrixWorld).invert();let b=z+jt,Y=Xt+jt,j=Pt-C,et=k+(tt-C),nt=bt*Xt/Y*b,mt=wt*Xt/Y*b;q.projectionMatrix.makePerspective(j,et,nt,mt,b,Y),q.projectionMatrixInverse.copy(q.projectionMatrix).invert()}function I(q,Q){Q===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(Q.matrixWorld,q.matrix),q.matrixWorldInverse.copy(q.matrixWorld).invert()}this.updateCamera=function(q){if(i===null)return;g.texture!==null&&(q.near=g.depthNear,q.far=g.depthFar),x.near=R.near=E.near=q.near,x.far=R.far=E.far=q.far,(L!==x.near||F!==x.far)&&(i.updateRenderState({depthNear:x.near,depthFar:x.far}),L=x.near,F=x.far,E.near=L,E.far=F,R.near=L,R.far=F,E.updateProjectionMatrix(),R.updateProjectionMatrix(),q.updateProjectionMatrix());let Q=q.parent,ct=x.cameras;I(x,Q);for(let tt=0;tt<ct.length;tt++)I(ct[tt],Q);ct.length===2?U(x,E,R):x.projectionMatrix.copy(E.projectionMatrix),A(q,x,Q)};function A(q,Q,ct){ct===null?q.matrix.copy(Q.matrixWorld):(q.matrix.copy(ct.matrixWorld),q.matrix.invert(),q.matrix.multiply(Q.matrixWorld)),q.matrix.decompose(q.position,q.quaternion,q.scale),q.updateMatrixWorld(!0),q.projectionMatrix.copy(Q.projectionMatrix),q.projectionMatrixInverse.copy(Q.projectionMatrixInverse),q.isPerspectiveCamera&&(q.fov=Hu*2*Math.atan(1/q.projectionMatrix.elements[5]),q.zoom=1)}this.getCamera=function(){return x},this.getFoveation=function(){if(!(f===null&&d===null))return l},this.setFoveation=function(q){l=q,f!==null&&(f.fixedFoveation=q),d!==null&&d.fixedFoveation!==void 0&&(d.fixedFoveation=q)},this.hasDepthSensing=function(){return g.texture!==null};let it=null;function vt(q,Q){if(u=Q.getViewerPose(c||o),_=Q,u!==null){let ct=u.views;d!==null&&(t.setRenderTargetFramebuffer(S,d.framebuffer),t.setRenderTarget(S));let tt=!1;ct.length!==x.cameras.length&&(x.cameras.length=0,tt=!0);for(let Rt=0;Rt<ct.length;Rt++){let z=ct[Rt],Xt=null;if(d!==null)Xt=d.getViewport(z);else{let wt=h.getViewSubImage(f,z);Xt=wt.viewport,Rt===0&&(t.setRenderTargetTextures(S,wt.colorTexture,f.ignoreDepthValues?void 0:wt.depthStencilTexture),t.setRenderTarget(S))}let bt=y[Rt];bt===void 0&&(bt=new xn,bt.layers.enable(Rt),bt.viewport=new Xe,y[Rt]=bt),bt.matrix.fromArray(z.transform.matrix),bt.matrix.decompose(bt.position,bt.quaternion,bt.scale),bt.projectionMatrix.fromArray(z.projectionMatrix),bt.projectionMatrixInverse.copy(bt.projectionMatrix).invert(),bt.viewport.set(Xt.x,Xt.y,Xt.width,Xt.height),Rt===0&&(x.matrix.copy(bt.matrix),x.matrix.decompose(x.position,x.quaternion,x.scale)),tt===!0&&x.cameras.push(bt)}let It=i.enabledFeatures;if(It&&It.includes("depth-sensing")){let Rt=h.getDepthInformation(ct[0]);Rt&&Rt.isValid&&Rt.texture&&g.init(t,Rt,i.renderState)}}for(let ct=0;ct<v.length;ct++){let tt=M[ct],It=v[ct];tt!==null&&It!==void 0&&It.update(tt,Q,c||o)}g.render(t,x),it&&it(q,Q),Q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Q}),_=null}let Wt=new Tm;Wt.setAnimationLoop(vt),this.setAnimationLoop=function(q){it=q},this.dispose=function(){}}},Vr=new Oi,zS=new Pe;function kS(r,t){function e(p,m){p.matrixAutoUpdate===!0&&p.updateMatrix(),m.value.copy(p.matrix)}function n(p,m){m.color.getRGB(p.fogColor.value,Em(r)),m.isFog?(p.fogNear.value=m.near,p.fogFar.value=m.far):m.isFogExp2&&(p.fogDensity.value=m.density)}function i(p,m,S,v,M){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(p,m):m.isMeshToonMaterial?(s(p,m),h(p,m)):m.isMeshPhongMaterial?(s(p,m),u(p,m)):m.isMeshStandardMaterial?(s(p,m),f(p,m),m.isMeshPhysicalMaterial&&d(p,m,M)):m.isMeshMatcapMaterial?(s(p,m),_(p,m)):m.isMeshDepthMaterial?s(p,m):m.isMeshDistanceMaterial?(s(p,m),g(p,m)):m.isMeshNormalMaterial?s(p,m):m.isLineBasicMaterial?(o(p,m),m.isLineDashedMaterial&&a(p,m)):m.isPointsMaterial?l(p,m,S,v):m.isSpriteMaterial?c(p,m):m.isShadowMaterial?(p.color.value.copy(m.color),p.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(p,m){p.opacity.value=m.opacity,m.color&&p.diffuse.value.copy(m.color),m.emissive&&p.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(p.map.value=m.map,e(m.map,p.mapTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.bumpMap&&(p.bumpMap.value=m.bumpMap,e(m.bumpMap,p.bumpMapTransform),p.bumpScale.value=m.bumpScale,m.side===Tn&&(p.bumpScale.value*=-1)),m.normalMap&&(p.normalMap.value=m.normalMap,e(m.normalMap,p.normalMapTransform),p.normalScale.value.copy(m.normalScale),m.side===Tn&&p.normalScale.value.negate()),m.displacementMap&&(p.displacementMap.value=m.displacementMap,e(m.displacementMap,p.displacementMapTransform),p.displacementScale.value=m.displacementScale,p.displacementBias.value=m.displacementBias),m.emissiveMap&&(p.emissiveMap.value=m.emissiveMap,e(m.emissiveMap,p.emissiveMapTransform)),m.specularMap&&(p.specularMap.value=m.specularMap,e(m.specularMap,p.specularMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest);let S=t.get(m),v=S.envMap,M=S.envMapRotation;if(v&&(p.envMap.value=v,Vr.copy(M),Vr.x*=-1,Vr.y*=-1,Vr.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(Vr.y*=-1,Vr.z*=-1),p.envMapRotation.value.setFromMatrix4(zS.makeRotationFromEuler(Vr)),p.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=m.reflectivity,p.ior.value=m.ior,p.refractionRatio.value=m.refractionRatio),m.lightMap){p.lightMap.value=m.lightMap;let D=r._useLegacyLights===!0?Math.PI:1;p.lightMapIntensity.value=m.lightMapIntensity*D,e(m.lightMap,p.lightMapTransform)}m.aoMap&&(p.aoMap.value=m.aoMap,p.aoMapIntensity.value=m.aoMapIntensity,e(m.aoMap,p.aoMapTransform))}function o(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,m.map&&(p.map.value=m.map,e(m.map,p.mapTransform))}function a(p,m){p.dashSize.value=m.dashSize,p.totalSize.value=m.dashSize+m.gapSize,p.scale.value=m.scale}function l(p,m,S,v){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.size.value=m.size*S,p.scale.value=v*.5,m.map&&(p.map.value=m.map,e(m.map,p.uvTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function c(p,m){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.rotation.value=m.rotation,m.map&&(p.map.value=m.map,e(m.map,p.mapTransform)),m.alphaMap&&(p.alphaMap.value=m.alphaMap,e(m.alphaMap,p.alphaMapTransform)),m.alphaTest>0&&(p.alphaTest.value=m.alphaTest)}function u(p,m){p.specular.value.copy(m.specular),p.shininess.value=Math.max(m.shininess,1e-4)}function h(p,m){m.gradientMap&&(p.gradientMap.value=m.gradientMap)}function f(p,m){p.metalness.value=m.metalness,m.metalnessMap&&(p.metalnessMap.value=m.metalnessMap,e(m.metalnessMap,p.metalnessMapTransform)),p.roughness.value=m.roughness,m.roughnessMap&&(p.roughnessMap.value=m.roughnessMap,e(m.roughnessMap,p.roughnessMapTransform)),m.envMap&&(p.envMapIntensity.value=m.envMapIntensity)}function d(p,m,S){p.ior.value=m.ior,m.sheen>0&&(p.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),p.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(p.sheenColorMap.value=m.sheenColorMap,e(m.sheenColorMap,p.sheenColorMapTransform)),m.sheenRoughnessMap&&(p.sheenRoughnessMap.value=m.sheenRoughnessMap,e(m.sheenRoughnessMap,p.sheenRoughnessMapTransform))),m.clearcoat>0&&(p.clearcoat.value=m.clearcoat,p.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(p.clearcoatMap.value=m.clearcoatMap,e(m.clearcoatMap,p.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,e(m.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(p.clearcoatNormalMap.value=m.clearcoatNormalMap,e(m.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Tn&&p.clearcoatNormalScale.value.negate())),m.dispersion>0&&(p.dispersion.value=m.dispersion),m.iridescence>0&&(p.iridescence.value=m.iridescence,p.iridescenceIOR.value=m.iridescenceIOR,p.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(p.iridescenceMap.value=m.iridescenceMap,e(m.iridescenceMap,p.iridescenceMapTransform)),m.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=m.iridescenceThicknessMap,e(m.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),m.transmission>0&&(p.transmission.value=m.transmission,p.transmissionSamplerMap.value=S.texture,p.transmissionSamplerSize.value.set(S.width,S.height),m.transmissionMap&&(p.transmissionMap.value=m.transmissionMap,e(m.transmissionMap,p.transmissionMapTransform)),p.thickness.value=m.thickness,m.thicknessMap&&(p.thicknessMap.value=m.thicknessMap,e(m.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=m.attenuationDistance,p.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(p.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(p.anisotropyMap.value=m.anisotropyMap,e(m.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=m.specularIntensity,p.specularColor.value.copy(m.specularColor),m.specularColorMap&&(p.specularColorMap.value=m.specularColorMap,e(m.specularColorMap,p.specularColorMapTransform)),m.specularIntensityMap&&(p.specularIntensityMap.value=m.specularIntensityMap,e(m.specularIntensityMap,p.specularIntensityMapTransform))}function _(p,m){m.matcap&&(p.matcap.value=m.matcap)}function g(p,m){let S=t.get(m).light;p.referencePosition.value.setFromMatrixPosition(S.matrixWorld),p.nearDistance.value=S.shadow.camera.near,p.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function VS(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,v){let M=v.program;n.uniformBlockBinding(S,M)}function c(S,v){let M=i[S.id];M===void 0&&(_(S),M=u(S),i[S.id]=M,S.addEventListener("dispose",p));let D=v.program;n.updateUBOMapping(S,D);let T=t.render.frame;s[S.id]!==T&&(f(S),s[S.id]=T)}function u(S){let v=h();S.__bindingPointIndex=v;let M=r.createBuffer(),D=S.__size,T=S.usage;return r.bindBuffer(r.UNIFORM_BUFFER,M),r.bufferData(r.UNIFORM_BUFFER,D,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,v,M),M}function h(){for(let S=0;S<a;S++)if(o.indexOf(S)===-1)return o.push(S),S;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(S){let v=i[S.id],M=S.uniforms,D=S.__cache;r.bindBuffer(r.UNIFORM_BUFFER,v);for(let T=0,E=M.length;T<E;T++){let R=Array.isArray(M[T])?M[T]:[M[T]];for(let y=0,x=R.length;y<x;y++){let L=R[y];if(d(L,T,y,D)===!0){let F=L.__offset,P=Array.isArray(L.value)?L.value:[L.value],B=0;for(let X=0;X<P.length;X++){let G=P[X],J=g(G);typeof G=="number"||typeof G=="boolean"?(L.__data[0]=G,r.bufferSubData(r.UNIFORM_BUFFER,F+B,L.__data)):G.isMatrix3?(L.__data[0]=G.elements[0],L.__data[1]=G.elements[1],L.__data[2]=G.elements[2],L.__data[3]=0,L.__data[4]=G.elements[3],L.__data[5]=G.elements[4],L.__data[6]=G.elements[5],L.__data[7]=0,L.__data[8]=G.elements[6],L.__data[9]=G.elements[7],L.__data[10]=G.elements[8],L.__data[11]=0):(G.toArray(L.__data,B),B+=J.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,F,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function d(S,v,M,D){let T=S.value,E=v+"_"+M;if(D[E]===void 0)return typeof T=="number"||typeof T=="boolean"?D[E]=T:D[E]=T.clone(),!0;{let R=D[E];if(typeof T=="number"||typeof T=="boolean"){if(R!==T)return D[E]=T,!0}else if(R.equals(T)===!1)return R.copy(T),!0}return!1}function _(S){let v=S.uniforms,M=0,D=16;for(let E=0,R=v.length;E<R;E++){let y=Array.isArray(v[E])?v[E]:[v[E]];for(let x=0,L=y.length;x<L;x++){let F=y[x],P=Array.isArray(F.value)?F.value:[F.value];for(let B=0,X=P.length;B<X;B++){let G=P[B],J=g(G),U=M%D;U!==0&&D-U<J.boundary&&(M+=D-U),F.__data=new Float32Array(J.storage/Float32Array.BYTES_PER_ELEMENT),F.__offset=M,M+=J.storage}}}let T=M%D;return T>0&&(M+=D-T),S.__size=M,S.__cache={},this}function g(S){let v={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(v.boundary=4,v.storage=4):S.isVector2?(v.boundary=8,v.storage=8):S.isVector3||S.isColor?(v.boundary=16,v.storage=12):S.isVector4?(v.boundary=16,v.storage=16):S.isMatrix3?(v.boundary=48,v.storage=48):S.isMatrix4?(v.boundary=64,v.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),v}function p(S){let v=S.target;v.removeEventListener("dispose",p);let M=o.indexOf(v.__bindingPointIndex);o.splice(M,1),r.deleteBuffer(i[v.id]),delete i[v.id],delete s[v.id]}function m(){for(let S in i)r.deleteBuffer(i[S]);o=[],i={},s={}}return{bind:l,update:c,dispose:m}}var wl=class{constructor(t={}){let{canvas:e=J0(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1}=t;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=o;let d=new Uint32Array(4),_=new Int32Array(4),g=null,p=null,m=[],S=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Gn,this._useLegacyLights=!1,this.toneMapping=ar,this.toneMappingExposure=1;let v=this,M=!1,D=0,T=0,E=null,R=-1,y=null,x=new Xe,L=new Xe,F=null,P=new re(0),B=0,X=e.width,G=e.height,J=1,U=null,I=null,A=new Xe(0,0,X,G),it=new Xe(0,0,X,G),vt=!1,Wt=new Bo,q=!1,Q=!1,ct=new Pe,tt=new Z,It={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Rt(){return E===null?J:1}let z=n;function Xt(w,O){return e.getContext(w,O)}try{let w={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${vh}`),e.addEventListener("webglcontextlost",N,!1),e.addEventListener("webglcontextrestored",$,!1),e.addEventListener("webglcontextcreationerror",K,!1),z===null){let O="webgl2";if(z=Xt(O,w),z===null)throw Xt(O)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let bt,wt,_t,Ft,Pt,k,jt,C,b,Y,j,et,nt,mt,lt,rt,Lt,st,St,Jt,gt,xt,Nt,Gt;function he(){bt=new oM(z),bt.init(),xt=new NS(z,bt),wt=new tM(z,bt,t,xt),_t=new LS(z),Ft=new cM(z),Pt=new MS,k=new FS(z,bt,_t,Pt,wt,xt,Ft),jt=new nM(v),C=new sM(v),b=new gx(z),Nt=new Qy(z,b),Y=new aM(z,b,Ft,Nt),j=new hM(z,Y,b,Ft),St=new uM(z,wt,k),rt=new eM(Pt),et=new yS(v,jt,C,bt,wt,Nt,rt),nt=new kS(v,Pt),mt=new bS,lt=new CS(bt),st=new Ky(v,jt,C,_t,j,f,l),Lt=new IS(v,j,wt),Gt=new VS(z,Ft,wt,_t),Jt=new jy(z,bt,Ft),gt=new lM(z,bt,Ft),Ft.programs=et.programs,v.capabilities=wt,v.extensions=bt,v.properties=Pt,v.renderLists=mt,v.shadowMap=Lt,v.state=_t,v.info=Ft}he();let Ut=new rh(v,z);this.xr=Ut,this.getContext=function(){return z},this.getContextAttributes=function(){return z.getContextAttributes()},this.forceContextLoss=function(){let w=bt.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){let w=bt.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return J},this.setPixelRatio=function(w){w!==void 0&&(J=w,this.setSize(X,G,!1))},this.getSize=function(w){return w.set(X,G)},this.setSize=function(w,O,V=!0){if(Ut.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=w,G=O,e.width=Math.floor(w*J),e.height=Math.floor(O*J),V===!0&&(e.style.width=w+"px",e.style.height=O+"px"),this.setViewport(0,0,w,O)},this.getDrawingBufferSize=function(w){return w.set(X*J,G*J).floor()},this.setDrawingBufferSize=function(w,O,V){X=w,G=O,J=V,e.width=Math.floor(w*V),e.height=Math.floor(O*V),this.setViewport(0,0,w,O)},this.getCurrentViewport=function(w){return w.copy(x)},this.getViewport=function(w){return w.copy(A)},this.setViewport=function(w,O,V,H){w.isVector4?A.set(w.x,w.y,w.z,w.w):A.set(w,O,V,H),_t.viewport(x.copy(A).multiplyScalar(J).round())},this.getScissor=function(w){return w.copy(it)},this.setScissor=function(w,O,V,H){w.isVector4?it.set(w.x,w.y,w.z,w.w):it.set(w,O,V,H),_t.scissor(L.copy(it).multiplyScalar(J).round())},this.getScissorTest=function(){return vt},this.setScissorTest=function(w){_t.setScissorTest(vt=w)},this.setOpaqueSort=function(w){U=w},this.setTransparentSort=function(w){I=w},this.getClearColor=function(w){return w.copy(st.getClearColor())},this.setClearColor=function(){st.setClearColor.apply(st,arguments)},this.getClearAlpha=function(){return st.getClearAlpha()},this.setClearAlpha=function(){st.setClearAlpha.apply(st,arguments)},this.clear=function(w=!0,O=!0,V=!0){let H=0;if(w){let W=!1;if(E!==null){let ot=E.texture.format;W=ot===Mm||ot===ym||ot===vm}if(W){let ot=E.texture.type,ft=ot===cr||ot===Hs||ot===mm||ot===ko||ot===_m||ot===xm,pt=st.getClearColor(),Dt=st.getClearAlpha(),Bt=pt.r,Tt=pt.g,Et=pt.b;ft?(d[0]=Bt,d[1]=Tt,d[2]=Et,d[3]=Dt,z.clearBufferuiv(z.COLOR,0,d)):(_[0]=Bt,_[1]=Tt,_[2]=Et,_[3]=Dt,z.clearBufferiv(z.COLOR,0,_))}else H|=z.COLOR_BUFFER_BIT}O&&(H|=z.DEPTH_BUFFER_BIT),V&&(H|=z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),z.clear(H)},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(){e.removeEventListener("webglcontextlost",N,!1),e.removeEventListener("webglcontextrestored",$,!1),e.removeEventListener("webglcontextcreationerror",K,!1),mt.dispose(),lt.dispose(),Pt.dispose(),jt.dispose(),C.dispose(),j.dispose(),Nt.dispose(),Gt.dispose(),et.dispose(),Ut.dispose(),Ut.removeEventListener("sessionstart",te),Ut.removeEventListener("sessionend",Ct),yt.stop()};function N(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function $(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;let w=Ft.autoReset,O=Lt.enabled,V=Lt.autoUpdate,H=Lt.needsUpdate,W=Lt.type;he(),Ft.autoReset=w,Lt.enabled=O,Lt.autoUpdate=V,Lt.needsUpdate=H,Lt.type=W}function K(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function at(w){let O=w.target;O.removeEventListener("dispose",at),ut(O)}function ut(w){Vt(w),Pt.remove(w)}function Vt(w){let O=Pt.get(w).programs;O!==void 0&&(O.forEach(function(V){et.releaseProgram(V)}),w.isShaderMaterial&&et.releaseShaderCache(w))}this.renderBufferDirect=function(w,O,V,H,W,ot){O===null&&(O=It);let ft=W.isMesh&&W.matrixWorld.determinant()<0,pt=ke(w,O,V,H,W);_t.setMaterial(H,ft);let Dt=V.index,Bt=1;if(H.wireframe===!0){if(Dt=Y.getWireframeAttribute(V),Dt===void 0)return;Bt=2}let Tt=V.drawRange,Et=V.attributes.position,ae=Tt.start*Bt,Ie=(Tt.start+Tt.count)*Bt;ot!==null&&(ae=Math.max(ae,ot.start*Bt),Ie=Math.min(Ie,(ot.start+ot.count)*Bt)),Dt!==null?(ae=Math.max(ae,0),Ie=Math.min(Ie,Dt.count)):Et!=null&&(ae=Math.max(ae,0),Ie=Math.min(Ie,Et.count));let Je=Ie-ae;if(Je<0||Je===1/0)return;Nt.setup(W,H,pt,V,Dt);let an,qt=Jt;if(Dt!==null&&(an=b.get(Dt),qt=gt,qt.setIndex(an)),W.isMesh)H.wireframe===!0?(_t.setLineWidth(H.wireframeLinewidth*Rt()),qt.setMode(z.LINES)):qt.setMode(z.TRIANGLES);else if(W.isLine){let Ot=H.linewidth;Ot===void 0&&(Ot=1),_t.setLineWidth(Ot*Rt()),W.isLineSegments?qt.setMode(z.LINES):W.isLineLoop?qt.setMode(z.LINE_LOOP):qt.setMode(z.LINE_STRIP)}else W.isPoints?qt.setMode(z.POINTS):W.isSprite&&qt.setMode(z.TRIANGLES);if(W.isBatchedMesh)W._multiDrawInstances!==null?qt.renderMultiDrawInstances(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount,W._multiDrawInstances):qt.renderMultiDraw(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount);else if(W.isInstancedMesh)qt.renderInstances(ae,Je,W.count);else if(V.isInstancedBufferGeometry){let Ot=V._maxInstanceCount!==void 0?V._maxInstanceCount:1/0,si=Math.min(V.instanceCount,Ot);qt.renderInstances(ae,Je,si)}else qt.render(ae,Je)};function se(w,O,V){w.transparent===!0&&w.side===Fi&&w.forceSinglePass===!1?(w.side=Tn,w.needsUpdate=!0,be(w,O,V),w.side=lr,w.needsUpdate=!0,be(w,O,V),w.side=Fi):be(w,O,V)}this.compile=function(w,O,V=null){V===null&&(V=w),p=lt.get(V),p.init(O),S.push(p),V.traverseVisible(function(W){W.isLight&&W.layers.test(O.layers)&&(p.pushLight(W),W.castShadow&&p.pushShadow(W))}),w!==V&&w.traverseVisible(function(W){W.isLight&&W.layers.test(O.layers)&&(p.pushLight(W),W.castShadow&&p.pushShadow(W))}),p.setupLights(v._useLegacyLights);let H=new Set;return w.traverse(function(W){let ot=W.material;if(ot)if(Array.isArray(ot))for(let ft=0;ft<ot.length;ft++){let pt=ot[ft];se(pt,V,W),H.add(pt)}else se(ot,V,W),H.add(ot)}),S.pop(),p=null,H},this.compileAsync=function(w,O,V=null){let H=this.compile(w,O,V);return new Promise(W=>{function ot(){if(H.forEach(function(ft){Pt.get(ft).currentProgram.isReady()&&H.delete(ft)}),H.size===0){W(w);return}setTimeout(ot,10)}bt.get("KHR_parallel_shader_compile")!==null?ot():setTimeout(ot,10)})};let ue=null;function pe(w){ue&&ue(w)}function te(){yt.stop()}function Ct(){yt.start()}let yt=new Tm;yt.setAnimationLoop(pe),typeof self<"u"&&yt.setContext(self),this.setAnimationLoop=function(w){ue=w,Ut.setAnimationLoop(w),w===null?yt.stop():yt.start()},Ut.addEventListener("sessionstart",te),Ut.addEventListener("sessionend",Ct),this.render=function(w,O){if(O!==void 0&&O.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(M===!0)return;w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),O.parent===null&&O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),Ut.enabled===!0&&Ut.isPresenting===!0&&(Ut.cameraAutoUpdate===!0&&Ut.updateCamera(O),O=Ut.getCamera()),w.isScene===!0&&w.onBeforeRender(v,w,O,E),p=lt.get(w,S.length),p.init(O),S.push(p),ct.multiplyMatrices(O.projectionMatrix,O.matrixWorldInverse),Wt.setFromProjectionMatrix(ct),Q=this.localClippingEnabled,q=rt.init(this.clippingPlanes,Q),g=mt.get(w,m.length),g.init(),m.push(g),ie(w,O,0,v.sortObjects),g.finish(),v.sortObjects===!0&&g.sort(U,I);let V=Ut.enabled===!1||Ut.isPresenting===!1||Ut.hasDepthSensing()===!1;V&&st.addToRenderList(g,w),this.info.render.frame++,q===!0&&rt.beginShadows();let H=p.state.shadowsArray;Lt.render(H,w,O),q===!0&&rt.endShadows(),this.info.autoReset===!0&&this.info.reset();let W=g.opaque,ot=g.transmissive;if(p.setupLights(v._useLegacyLights),O.isArrayCamera){let ft=O.cameras;if(ot.length>0)for(let pt=0,Dt=ft.length;pt<Dt;pt++){let Bt=ft[pt];kt(W,ot,w,Bt)}V&&st.render(w);for(let pt=0,Dt=ft.length;pt<Dt;pt++){let Bt=ft[pt];ht(g,w,Bt,Bt.viewport)}}else ot.length>0&&kt(W,ot,w,O),V&&st.render(w),ht(g,w,O);E!==null&&(k.updateMultisampleRenderTarget(E),k.updateRenderTargetMipmap(E)),w.isScene===!0&&w.onAfterRender(v,w,O),Nt.resetDefaultState(),R=-1,y=null,S.pop(),S.length>0?(p=S[S.length-1],q===!0&&rt.setGlobalState(v.clippingPlanes,p.state.camera)):p=null,m.pop(),m.length>0?g=m[m.length-1]:g=null};function ie(w,O,V,H){if(w.visible===!1)return;if(w.layers.test(O.layers)){if(w.isGroup)V=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(O);else if(w.isLight)p.pushLight(w),w.castShadow&&p.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||Wt.intersectsSprite(w)){H&&tt.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ct);let ft=j.update(w),pt=w.material;pt.visible&&g.push(w,ft,pt,V,tt.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||Wt.intersectsObject(w))){let ft=j.update(w),pt=w.material;if(H&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),tt.copy(w.boundingSphere.center)):(ft.boundingSphere===null&&ft.computeBoundingSphere(),tt.copy(ft.boundingSphere.center)),tt.applyMatrix4(w.matrixWorld).applyMatrix4(ct)),Array.isArray(pt)){let Dt=ft.groups;for(let Bt=0,Tt=Dt.length;Bt<Tt;Bt++){let Et=Dt[Bt],ae=pt[Et.materialIndex];ae&&ae.visible&&g.push(w,ft,ae,V,tt.z,Et)}}else pt.visible&&g.push(w,ft,pt,V,tt.z,null)}}let ot=w.children;for(let ft=0,pt=ot.length;ft<pt;ft++)ie(ot[ft],O,V,H)}function ht(w,O,V,H){let W=w.opaque,ot=w.transmissive,ft=w.transparent;p.setupLightsView(V),q===!0&&rt.setGlobalState(v.clippingPlanes,V),H&&_t.viewport(x.copy(H)),W.length>0&&At(W,O,V),ot.length>0&&At(ot,O,V),ft.length>0&&At(ft,O,V),_t.buffers.depth.setTest(!0),_t.buffers.depth.setMask(!0),_t.buffers.color.setMask(!0),_t.setPolygonOffset(!1)}function kt(w,O,V,H){if((V.isScene===!0?V.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[H.id]===void 0&&(p.state.transmissionRenderTarget[H.id]=new Ui(1,1,{generateMipmaps:!0,type:bt.has("EXT_color_buffer_half_float")||bt.has("EXT_color_buffer_float")?Pl:cr,minFilter:qr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let ot=p.state.transmissionRenderTarget[H.id],ft=H.viewport||x;ot.setSize(ft.z,ft.w);let pt=v.getRenderTarget();v.setRenderTarget(ot),v.getClearColor(P),B=v.getClearAlpha(),B<1&&v.setClearColor(16777215,.5),v.clear();let Dt=v.toneMapping;v.toneMapping=ar;let Bt=H.viewport;if(H.viewport!==void 0&&(H.viewport=void 0),p.setupLightsView(H),q===!0&&rt.setGlobalState(v.clippingPlanes,H),At(w,V,H),k.updateMultisampleRenderTarget(ot),k.updateRenderTargetMipmap(ot),bt.has("WEBGL_multisampled_render_to_texture")===!1){let Tt=!1;for(let Et=0,ae=O.length;Et<ae;Et++){let Ie=O[Et],Je=Ie.object,an=Ie.geometry,qt=Ie.material,Ot=Ie.group;if(qt.side===Fi&&Je.layers.test(H.layers)){let si=qt.side;qt.side=Tn,qt.needsUpdate=!0,zt(Je,V,H,an,qt,Ot),qt.side=si,qt.needsUpdate=!0,Tt=!0}}Tt===!0&&(k.updateMultisampleRenderTarget(ot),k.updateRenderTargetMipmap(ot))}v.setRenderTarget(pt),v.setClearColor(P,B),Bt!==void 0&&(H.viewport=Bt),v.toneMapping=Dt}function At(w,O,V){let H=O.isScene===!0?O.overrideMaterial:null;for(let W=0,ot=w.length;W<ot;W++){let ft=w[W],pt=ft.object,Dt=ft.geometry,Bt=H===null?ft.material:H,Tt=ft.group;pt.layers.test(V.layers)&&zt(pt,O,V,Dt,Bt,Tt)}}function zt(w,O,V,H,W,ot){w.onBeforeRender(v,O,V,H,W,ot),w.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),W.onBeforeRender(v,O,V,H,w,ot),W.transparent===!0&&W.side===Fi&&W.forceSinglePass===!1?(W.side=Tn,W.needsUpdate=!0,v.renderBufferDirect(V,O,H,W,w,ot),W.side=lr,W.needsUpdate=!0,v.renderBufferDirect(V,O,H,W,w,ot),W.side=Fi):v.renderBufferDirect(V,O,H,W,w,ot),w.onAfterRender(v,O,V,H,W,ot)}function be(w,O,V){O.isScene!==!0&&(O=It);let H=Pt.get(w),W=p.state.lights,ot=p.state.shadowsArray,ft=W.state.version,pt=et.getParameters(w,W.state,ot,O,V),Dt=et.getProgramCacheKey(pt),Bt=H.programs;H.environment=w.isMeshStandardMaterial?O.environment:null,H.fog=O.fog,H.envMap=(w.isMeshStandardMaterial?C:jt).get(w.envMap||H.environment),H.envMapRotation=H.environment!==null&&w.envMap===null?O.environmentRotation:w.envMapRotation,Bt===void 0&&(w.addEventListener("dispose",at),Bt=new Map,H.programs=Bt);let Tt=Bt.get(Dt);if(Tt!==void 0){if(H.currentProgram===Tt&&H.lightsStateVersion===ft)return ve(w,pt),Tt}else pt.uniforms=et.getUniforms(w),w.onBuild(V,pt,v),w.onBeforeCompile(pt,v),Tt=et.acquireProgram(pt,Dt),Bt.set(Dt,Tt),H.uniforms=pt.uniforms;let Et=H.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Et.clippingPlanes=rt.uniform),ve(w,pt),H.needsLights=me(w),H.lightsStateVersion=ft,H.needsLights&&(Et.ambientLightColor.value=W.state.ambient,Et.lightProbe.value=W.state.probe,Et.directionalLights.value=W.state.directional,Et.directionalLightShadows.value=W.state.directionalShadow,Et.spotLights.value=W.state.spot,Et.spotLightShadows.value=W.state.spotShadow,Et.rectAreaLights.value=W.state.rectArea,Et.ltc_1.value=W.state.rectAreaLTC1,Et.ltc_2.value=W.state.rectAreaLTC2,Et.pointLights.value=W.state.point,Et.pointLightShadows.value=W.state.pointShadow,Et.hemisphereLights.value=W.state.hemi,Et.directionalShadowMap.value=W.state.directionalShadowMap,Et.directionalShadowMatrix.value=W.state.directionalShadowMatrix,Et.spotShadowMap.value=W.state.spotShadowMap,Et.spotLightMatrix.value=W.state.spotLightMatrix,Et.spotLightMap.value=W.state.spotLightMap,Et.pointShadowMap.value=W.state.pointShadowMap,Et.pointShadowMatrix.value=W.state.pointShadowMatrix),H.currentProgram=Tt,H.uniformsList=null,Tt}function $t(w){if(w.uniformsList===null){let O=w.currentProgram.getUniforms();w.uniformsList=zs.seqWithValue(O.seq,w.uniforms)}return w.uniformsList}function ve(w,O){let V=Pt.get(w);V.outputColorSpace=O.outputColorSpace,V.batching=O.batching,V.instancing=O.instancing,V.instancingColor=O.instancingColor,V.instancingMorph=O.instancingMorph,V.skinning=O.skinning,V.morphTargets=O.morphTargets,V.morphNormals=O.morphNormals,V.morphColors=O.morphColors,V.morphTargetsCount=O.morphTargetsCount,V.numClippingPlanes=O.numClippingPlanes,V.numIntersection=O.numClipIntersection,V.vertexAlphas=O.vertexAlphas,V.vertexTangents=O.vertexTangents,V.toneMapping=O.toneMapping}function ke(w,O,V,H,W){O.isScene!==!0&&(O=It),k.resetTextureUnits();let ot=O.fog,ft=H.isMeshStandardMaterial?O.environment:null,pt=E===null?v.outputColorSpace:E.isXRRenderTarget===!0?E.texture.colorSpace:fr,Dt=(H.isMeshStandardMaterial?C:jt).get(H.envMap||ft),Bt=H.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,Tt=!!V.attributes.tangent&&(!!H.normalMap||H.anisotropy>0),Et=!!V.morphAttributes.position,ae=!!V.morphAttributes.normal,Ie=!!V.morphAttributes.color,Je=ar;H.toneMapped&&(E===null||E.isXRRenderTarget===!0)&&(Je=v.toneMapping);let an=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,qt=an!==void 0?an.length:0,Ot=Pt.get(H),si=p.state.lights;if(q===!0&&(Q===!0||w!==y)){let Fn=w===y&&H.id===R;rt.setState(H,w,Fn)}let le=!1;H.version===Ot.__version?(Ot.needsLights&&Ot.lightsStateVersion!==si.state.version||Ot.outputColorSpace!==pt||W.isBatchedMesh&&Ot.batching===!1||!W.isBatchedMesh&&Ot.batching===!0||W.isInstancedMesh&&Ot.instancing===!1||!W.isInstancedMesh&&Ot.instancing===!0||W.isSkinnedMesh&&Ot.skinning===!1||!W.isSkinnedMesh&&Ot.skinning===!0||W.isInstancedMesh&&Ot.instancingColor===!0&&W.instanceColor===null||W.isInstancedMesh&&Ot.instancingColor===!1&&W.instanceColor!==null||W.isInstancedMesh&&Ot.instancingMorph===!0&&W.morphTexture===null||W.isInstancedMesh&&Ot.instancingMorph===!1&&W.morphTexture!==null||Ot.envMap!==Dt||H.fog===!0&&Ot.fog!==ot||Ot.numClippingPlanes!==void 0&&(Ot.numClippingPlanes!==rt.numPlanes||Ot.numIntersection!==rt.numIntersection)||Ot.vertexAlphas!==Bt||Ot.vertexTangents!==Tt||Ot.morphTargets!==Et||Ot.morphNormals!==ae||Ot.morphColors!==Ie||Ot.toneMapping!==Je||Ot.morphTargetsCount!==qt)&&(le=!0):(le=!0,Ot.__version=H.version);let dr=Ot.currentProgram;le===!0&&(dr=be(H,O,W));let Dh=!1,Js=!1,Nl=!1,$e=dr.getUniforms(),Bi=Ot.uniforms;if(_t.useProgram(dr.program)&&(Dh=!0,Js=!0,Nl=!0),H.id!==R&&(R=H.id,Js=!0),Dh||y!==w){$e.setValue(z,"projectionMatrix",w.projectionMatrix),$e.setValue(z,"viewMatrix",w.matrixWorldInverse);let Fn=$e.map.cameraPosition;Fn!==void 0&&Fn.setValue(z,tt.setFromMatrixPosition(w.matrixWorld)),wt.logarithmicDepthBuffer&&$e.setValue(z,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(H.isMeshPhongMaterial||H.isMeshToonMaterial||H.isMeshLambertMaterial||H.isMeshBasicMaterial||H.isMeshStandardMaterial||H.isShaderMaterial)&&$e.setValue(z,"isOrthographic",w.isOrthographicCamera===!0),y!==w&&(y=w,Js=!0,Nl=!0)}if(W.isSkinnedMesh){$e.setOptional(z,W,"bindMatrix"),$e.setOptional(z,W,"bindMatrixInverse");let Fn=W.skeleton;Fn&&(Fn.boneTexture===null&&Fn.computeBoneTexture(),$e.setValue(z,"boneTexture",Fn.boneTexture,k))}W.isBatchedMesh&&($e.setOptional(z,W,"batchingTexture"),$e.setValue(z,"batchingTexture",W._matricesTexture,k));let Ul=V.morphAttributes;if((Ul.position!==void 0||Ul.normal!==void 0||Ul.color!==void 0)&&St.update(W,V,dr),(Js||Ot.receiveShadow!==W.receiveShadow)&&(Ot.receiveShadow=W.receiveShadow,$e.setValue(z,"receiveShadow",W.receiveShadow)),H.isMeshGouraudMaterial&&H.envMap!==null&&(Bi.envMap.value=Dt,Bi.flipEnvMap.value=Dt.isCubeTexture&&Dt.isRenderTargetTexture===!1?-1:1),H.isMeshStandardMaterial&&H.envMap===null&&O.environment!==null&&(Bi.envMapIntensity.value=O.environmentIntensity),Js&&($e.setValue(z,"toneMappingExposure",v.toneMappingExposure),Ot.needsLights&&ye(Bi,Nl),ot&&H.fog===!0&&nt.refreshFogUniforms(Bi,ot),nt.refreshMaterialUniforms(Bi,H,J,G,p.state.transmissionRenderTarget[w.id]),zs.upload(z,$t(Ot),Bi,k)),H.isShaderMaterial&&H.uniformsNeedUpdate===!0&&(zs.upload(z,$t(Ot),Bi,k),H.uniformsNeedUpdate=!1),H.isSpriteMaterial&&$e.setValue(z,"center",W.center),$e.setValue(z,"modelViewMatrix",W.modelViewMatrix),$e.setValue(z,"normalMatrix",W.normalMatrix),$e.setValue(z,"modelMatrix",W.matrixWorld),H.isShaderMaterial||H.isRawShaderMaterial){let Fn=H.uniformsGroups;for(let Ol=0,Gm=Fn.length;Ol<Gm;Ol++){let Ch=Fn[Ol];Gt.update(Ch,dr),Gt.bind(Ch,dr)}}return dr}function ye(w,O){w.ambientLightColor.needsUpdate=O,w.lightProbe.needsUpdate=O,w.directionalLights.needsUpdate=O,w.directionalLightShadows.needsUpdate=O,w.pointLights.needsUpdate=O,w.pointLightShadows.needsUpdate=O,w.spotLights.needsUpdate=O,w.spotLightShadows.needsUpdate=O,w.rectAreaLights.needsUpdate=O,w.hemisphereLights.needsUpdate=O}function me(w){return w.isMeshLambertMaterial||w.isMeshToonMaterial||w.isMeshPhongMaterial||w.isMeshStandardMaterial||w.isShadowMaterial||w.isShaderMaterial&&w.lights===!0}this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(w,O,V){Pt.get(w.texture).__webglTexture=O,Pt.get(w.depthTexture).__webglTexture=V;let H=Pt.get(w);H.__hasExternalTextures=!0,H.__autoAllocateDepthBuffer=V===void 0,H.__autoAllocateDepthBuffer||bt.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),H.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(w,O){let V=Pt.get(w);V.__webglFramebuffer=O,V.__useDefaultFramebuffer=O===void 0},this.setRenderTarget=function(w,O=0,V=0){E=w,D=O,T=V;let H=!0,W=null,ot=!1,ft=!1;if(w){let Dt=Pt.get(w);Dt.__useDefaultFramebuffer!==void 0?(_t.bindFramebuffer(z.FRAMEBUFFER,null),H=!1):Dt.__webglFramebuffer===void 0?k.setupRenderTarget(w):Dt.__hasExternalTextures&&k.rebindTextures(w,Pt.get(w.texture).__webglTexture,Pt.get(w.depthTexture).__webglTexture);let Bt=w.texture;(Bt.isData3DTexture||Bt.isDataArrayTexture||Bt.isCompressedArrayTexture)&&(ft=!0);let Tt=Pt.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Tt[O])?W=Tt[O][V]:W=Tt[O],ot=!0):w.samples>0&&k.useMultisampledRTT(w)===!1?W=Pt.get(w).__webglMultisampledFramebuffer:Array.isArray(Tt)?W=Tt[V]:W=Tt,x.copy(w.viewport),L.copy(w.scissor),F=w.scissorTest}else x.copy(A).multiplyScalar(J).floor(),L.copy(it).multiplyScalar(J).floor(),F=vt;if(_t.bindFramebuffer(z.FRAMEBUFFER,W)&&H&&_t.drawBuffers(w,W),_t.viewport(x),_t.scissor(L),_t.setScissorTest(F),ot){let Dt=Pt.get(w.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_CUBE_MAP_POSITIVE_X+O,Dt.__webglTexture,V)}else if(ft){let Dt=Pt.get(w.texture),Bt=O||0;z.framebufferTextureLayer(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,Dt.__webglTexture,V||0,Bt)}R=-1},this.readRenderTargetPixels=function(w,O,V,H,W,ot,ft){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let pt=Pt.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ft!==void 0&&(pt=pt[ft]),pt){_t.bindFramebuffer(z.FRAMEBUFFER,pt);try{let Dt=w.texture,Bt=Dt.format,Tt=Dt.type;if(!wt.textureFormatReadable(Bt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!wt.textureTypeReadable(Tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}O>=0&&O<=w.width-H&&V>=0&&V<=w.height-W&&z.readPixels(O,V,H,W,xt.convert(Bt),xt.convert(Tt),ot)}finally{let Dt=E!==null?Pt.get(E).__webglFramebuffer:null;_t.bindFramebuffer(z.FRAMEBUFFER,Dt)}}},this.copyFramebufferToTexture=function(w,O,V=0){let H=Math.pow(2,-V),W=Math.floor(O.image.width*H),ot=Math.floor(O.image.height*H);k.setTexture2D(O,0),z.copyTexSubImage2D(z.TEXTURE_2D,V,0,0,w.x,w.y,W,ot),_t.unbindTexture()},this.copyTextureToTexture=function(w,O,V,H=0){let W=O.image.width,ot=O.image.height,ft=xt.convert(V.format),pt=xt.convert(V.type);k.setTexture2D(V,0),z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,V.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,V.unpackAlignment),O.isDataTexture?z.texSubImage2D(z.TEXTURE_2D,H,w.x,w.y,W,ot,ft,pt,O.image.data):O.isCompressedTexture?z.compressedTexSubImage2D(z.TEXTURE_2D,H,w.x,w.y,O.mipmaps[0].width,O.mipmaps[0].height,ft,O.mipmaps[0].data):z.texSubImage2D(z.TEXTURE_2D,H,w.x,w.y,ft,pt,O.image),H===0&&V.generateMipmaps&&z.generateMipmap(z.TEXTURE_2D),_t.unbindTexture()},this.copyTextureToTexture3D=function(w,O,V,H,W=0){let ot=w.max.x-w.min.x,ft=w.max.y-w.min.y,pt=w.max.z-w.min.z,Dt=xt.convert(H.format),Bt=xt.convert(H.type),Tt;if(H.isData3DTexture)k.setTexture3D(H,0),Tt=z.TEXTURE_3D;else if(H.isDataArrayTexture||H.isCompressedArrayTexture)k.setTexture2DArray(H,0),Tt=z.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,H.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,H.unpackAlignment);let Et=z.getParameter(z.UNPACK_ROW_LENGTH),ae=z.getParameter(z.UNPACK_IMAGE_HEIGHT),Ie=z.getParameter(z.UNPACK_SKIP_PIXELS),Je=z.getParameter(z.UNPACK_SKIP_ROWS),an=z.getParameter(z.UNPACK_SKIP_IMAGES),qt=V.isCompressedTexture?V.mipmaps[W]:V.image;z.pixelStorei(z.UNPACK_ROW_LENGTH,qt.width),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,qt.height),z.pixelStorei(z.UNPACK_SKIP_PIXELS,w.min.x),z.pixelStorei(z.UNPACK_SKIP_ROWS,w.min.y),z.pixelStorei(z.UNPACK_SKIP_IMAGES,w.min.z),V.isDataTexture||V.isData3DTexture?z.texSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,Bt,qt.data):H.isCompressedArrayTexture?z.compressedTexSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,qt.data):z.texSubImage3D(Tt,W,O.x,O.y,O.z,ot,ft,pt,Dt,Bt,qt),z.pixelStorei(z.UNPACK_ROW_LENGTH,Et),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,ae),z.pixelStorei(z.UNPACK_SKIP_PIXELS,Ie),z.pixelStorei(z.UNPACK_SKIP_ROWS,Je),z.pixelStorei(z.UNPACK_SKIP_IMAGES,an),W===0&&H.generateMipmaps&&z.generateMipmap(Tt),_t.unbindTexture()},this.initTexture=function(w){w.isCubeTexture?k.setTextureCube(w,0):w.isData3DTexture?k.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?k.setTexture2DArray(w,0):k.setTexture2D(w,0),_t.unbindTexture()},this.resetState=function(){D=0,T=0,E=null,_t.reset(),Nt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ni}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Mh?"display-p3":"srgb",e.unpackColorSpace=fe.workingColorSpace===Il?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}};var El=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new re(t),this.near=e,this.far=n}clone(){return new r(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}},Tl=class extends on{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Oi,this.environmentIntensity=1,this.environmentRotation=new Oi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}};var sh=class extends Zr{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new re(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}},lm=new Pe,oh=new dl,tl=new Gs,el=new Z,Al=class extends on{constructor(t=new mi,e=new sh){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){let n=this.geometry,i=this.matrixWorld,s=t.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),tl.copy(n.boundingSphere),tl.applyMatrix4(i),tl.radius+=s,t.ray.intersectsSphere(tl)===!1)return;lm.copy(i).invert(),oh.copy(t.ray).applyMatrix4(lm);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,h=n.attributes.position;if(c!==null){let f=Math.max(0,o.start),d=Math.min(c.count,o.start+o.count);for(let _=f,g=d;_<g;_++){let p=c.getX(_);el.fromBufferAttribute(h,p),cm(el,p,l,i,t,e,this)}}else{let f=Math.max(0,o.start),d=Math.min(h.count,o.start+o.count);for(let _=f,g=d;_<g;_++)el.fromBufferAttribute(h,_),cm(el,_,l,i,t,e,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,n=Object.keys(e);if(n.length>0){let i=e[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){let a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function cm(r,t,e,n,i,s,o){let a=oh.distanceSqToPoint(r);if(a<e){let l=new Z;oh.closestPointToPoint(r,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:o})}}function nl(r,t,e){return!r||!e&&r.constructor===t?r:typeof t.BYTES_PER_ELEMENT=="number"?new t(r):Array.prototype.slice.call(r)}function HS(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Xs=class{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,n=this._cachedIndex,i=e[n],s=e[n-1];n:{t:{let o;e:{i:if(!(t<i)){for(let a=n+2;;){if(i===void 0){if(t<s)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=i,i=e[++n],t<i)break t}o=e.length;break e}if(!(t>=s)){let a=e[1];t<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=s,s=e[--n-1],t>=s)break t}o=n,n=0;break e}break n}for(;n<o;){let a=n+o>>>1;t<e[a]?o=a:n=a+1}if(i=e[n],s=e[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,i)}return this.interpolate_(n,s,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,s=t*i;for(let o=0;o!==i;++o)e[o]=n[s+o];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}},ah=class extends Xs{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:gp,endingEnd:gp}}intervalChanged_(t,e,n){let i=this.parameterPositions,s=t-2,o=t+1,a=i[s],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case _p:s=t,a=2*e-n;break;case xp:s=i.length-2,a=e+i[s]-i[s+1];break;default:s=t,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case _p:o=t,l=2*n-e;break;case xp:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,u=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=this._offsetPrev,h=this._offsetNext,f=this._weightPrev,d=this._weightNext,_=(n-e)/(i-e),g=_*_,p=g*_,m=-f*p+2*f*g-f*_,S=(1+f)*p+(-1.5-2*f)*g+(-.5+f)*_+1,v=(-1-d)*p+(1.5+d)*g+.5*_,M=d*p-d*g;for(let D=0;D!==a;++D)s[D]=m*o[u+D]+S*o[c+D]+v*o[l+D]+M*o[h+D];return s}},lh=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,u=(n-e)/(i-e),h=1-u;for(let f=0;f!==a;++f)s[f]=o[c+f]*h+o[l+f]*u;return s}},ch=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},ri=class{constructor(t,e,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=nl(e,this.TimeBufferType),this.values=nl(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let e=t.constructor,n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:nl(t.times,Array),values:nl(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new ch(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new lh(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new ah(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case rl:e=this.InterpolantFactoryMethodDiscrete;break;case sl:e=this.InterpolantFactoryMethodLinear;break;case lu:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return rl;case this.InterpolantFactoryMethodLinear:return sl;case this.InterpolantFactoryMethodSmooth:return lu}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(t!==1){let e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){let n=this.times,i=n.length,s=0,o=i-1;for(;s!==i&&n[s]<t;)++s;for(;o!==-1&&n[o]>e;)--o;if(++o,s!==0||o!==i){s>=o&&(o=Math.max(o,1),s=o-1);let a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,s=n.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let a=0;a!==s;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),t=!1;break}o=l}if(i!==void 0&&HS(i))for(let a=0,l=i.length;a!==l;++a){let c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===lu,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],u=t[a+1];if(c!==u&&(a!==1||c!==t[0]))if(i)l=!0;else{let h=a*n,f=h-n,d=h+n;for(let _=0;_!==n;++_){let g=e[h+_];if(g!==e[f+_]||g!==e[d+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let h=a*n,f=o*n;for(let d=0;d!==n;++d)e[f+d]=e[h+d]}++o}}if(s>0){t[o]=t[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)e[l+c]=e[a+c];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){let t=this.times.slice(),e=this.values.slice(),n=this.constructor,i=new n(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}};ri.prototype.TimeBufferType=Float32Array;ri.prototype.ValueBufferType=Float32Array;ri.prototype.DefaultInterpolation=sl;var Jr=class extends ri{};Jr.prototype.ValueTypeName="bool";Jr.prototype.ValueBufferType=Array;Jr.prototype.DefaultInterpolation=rl;Jr.prototype.InterpolantFactoryMethodLinear=void 0;Jr.prototype.InterpolantFactoryMethodSmooth=void 0;var uh=class extends ri{};uh.prototype.ValueTypeName="color";var hh=class extends ri{};hh.prototype.ValueTypeName="number";var fh=class extends Xs{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-e)/(i-e),c=t*a;for(let u=c+a;c!==u;c+=4)hr.slerpFlat(s,0,o,c-a,o,c,l);return s}},zo=class extends ri{InterpolantFactoryMethodLinear(t){return new fh(this.times,this.values,this.getValueSize(),t)}};zo.prototype.ValueTypeName="quaternion";zo.prototype.DefaultInterpolation=sl;zo.prototype.InterpolantFactoryMethodSmooth=void 0;var $r=class extends ri{};$r.prototype.ValueTypeName="string";$r.prototype.ValueBufferType=Array;$r.prototype.DefaultInterpolation=rl;$r.prototype.InterpolantFactoryMethodLinear=void 0;$r.prototype.InterpolantFactoryMethodSmooth=void 0;var dh=class extends ri{};dh.prototype.ValueTypeName="vector";var ph=class{constructor(t,e,n){let i=this,s=!1,o=0,a=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(u){a++,s===!1&&i.onStart!==void 0&&i.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,i.onProgress!==void 0&&i.onProgress(u,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){let h=c.indexOf(u);return h!==-1&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,f=c.length;h<f;h+=2){let d=c[h],_=c[h+1];if(d.global&&(d.lastIndex=0),d.test(u))return _}return null}}},GS=new ph,mh=class{constructor(t){this.manager=t!==void 0?t:GS,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let n=this;return new Promise(function(i,s){n.load(t,i,e,s)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}};mh.DEFAULT_MATERIAL_NAME="__DEFAULT";var Dl=class extends on{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new re(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),e}},Cl=class extends Dl{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(on.DEFAULT_UP),this.updateMatrix(),this.groundColor=new re(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},Nu=new Pe,um=new Z,hm=new Z,gh=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new oe(512,512),this.map=null,this.mapPass=null,this.matrix=new Pe,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Bo,this._frameExtents=new oe(1,1),this._viewportCount=1,this._viewports=[new Xe(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;um.setFromMatrixPosition(t.matrixWorld),e.position.copy(um),hm.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(hm),e.updateMatrixWorld(),Nu.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Nu),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Nu)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),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}};var _h=class extends gh{constructor(){super(new Ml(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Kr=class extends Dl{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(on.DEFAULT_UP),this.updateMatrix(),this.target=new on,this.shadow=new _h}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var bh="\\[\\]\\.:\\/",WS=new RegExp("["+bh+"]","g"),wh="[^"+bh+"]",XS="[^"+bh.replace("\\.","")+"]",qS=/((?:WC+[\/:])*)/.source.replace("WC",wh),YS=/(WCOD+)?/.source.replace("WCOD",XS),ZS=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",wh),JS=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",wh),$S=new RegExp("^"+qS+YS+ZS+JS+"$"),KS=["material","materials","bones","map"],xh=class{constructor(t,e,n){let i=n||Se.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Se=class r{constructor(t,e,n){this.path=e,this.parsedPath=n||r.parseTrackName(e),this.node=r.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new r.Composite(t,e,n):new r(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(WS,"")}static parseTrackName(t){let e=$S.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let s=n.nodeName.substring(i+1);KS.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(e);if(n!==void 0)return n}if(t.children){let n=function(s){for(let o=0;o<s.length;o++){let a=s[o];if(a.name===e||a.uuid===e)return a;let l=n(a.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){let n=this.resolvedProperty;for(let i=0,s=n.length;i!==s;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node,e=this.parsedPath,n=e.objectName,i=e.propertyName,s=e.propertyIndex;if(t||(t=r.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=e.objectIndex;switch(n){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}t=t.skeleton.bones;for(let u=0;u<t.length;u++)if(t[u].name===c){c=u;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let o=t[i];if(o===void 0){let c=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(i==="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.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[s]!==void 0&&(s=t.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};Se.Composite=xh;Se.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Se.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Se.prototype.GetterByBindingType=[Se.prototype._getValue_direct,Se.prototype._getValue_array,Se.prototype._getValue_arrayElement,Se.prototype._getValue_toArray];Se.prototype.SetterByBindingTypeAndVersioning=[[Se.prototype._setValue_direct,Se.prototype._setValue_direct_setNeedsUpdate,Se.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_array,Se.prototype._setValue_array_setNeedsUpdate,Se.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_arrayElement,Se.prototype._setValue_arrayElement_setNeedsUpdate,Se.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Se.prototype._setValue_fromArray,Se.prototype._setValue_fromArray_setNeedsUpdate,Se.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var $b=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:vh}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=vh);var Im=(r,t,e=7e3,n=25)=>{let i=new rr,s=new wl({canvas:r,antialias:!0,alpha:!0}),o=new Tl,a=new xn(18);a.near=1,a.far=2e3,a.position.z=-10,s.outputColorSpace=Gn,s.shadowMap.enabled=!0,s.shadowMap.type=yh,o.fog=new El(3741705,9,15),o.add(i);let l=new Cl(16777215,41378,1),c=new Kr(3355443,4);c.position.set(5,5,5),c.lookAt(0,0,0),c.castShadow=!0,c.shadow.mapSize.width=512,c.shadow.mapSize.height=512,c.shadow.camera.near=.5,c.shadow.camera.far=500,o.add(c),o.add(l);let u=[new Kr(16777215,1),new Kr(11460838,1),new Kr(14277490,1)];u[0].position.set(1,0,0),u[1].position.set(.75,1,.5),u[2].position.set(-.75,-1,.5),u.forEach(S=>o.add(S));let h=new mi,f=[],d=[],_=n/2;for(let S=0;S<e;S++)f.push(Math.random()*n-_,Math.random()*n-_,Math.random()*n-_),d.push(Math.random()*.9+.1);h.setAttribute("position",new qn(f,3)),h.setAttribute("opacity",new qn(d,1)),h.computeBoundingSphere();let g=new Zn({vertexShader:`
|
|
3822
3822
|
attribute float opacity;
|
|
3823
3823
|
varying float vOpacity;
|
|
3824
3824
|
varying float distanceToCamera;
|
|
@@ -3839,7 +3839,7 @@ void main() {
|
|
|
3839
3839
|
float opacityFactor = distanceToCamera / 15.0;
|
|
3840
3840
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * opacityFactor);
|
|
3841
3841
|
}
|
|
3842
|
-
`,blending:or,transparent:!0});g.needsUpdate=!0,i.add(new Al(h,g));let p=()=>{let{w:S,h:v}=t();a.aspect=S/v,a.updateProjectionMatrix(),s.setSize(S,v)},m=()=>{requestAnimationFrame(m);let S=Date.now()*.003;i.rotation.z+=.001/4,i.rotation.y+=5e-4/4,i.position.y=Math.sin(S*.05)*.05,a.lookAt(o.position),a.updateMatrixWorld(),s.render(o,a)};p(),s.compile(o,a),m(),window.addEventListener("resize",p,!1)},Lm=()=>{let r=document.querySelector("#canvas");r&&window.addEventListener("load",()=>Im(r,()=>({w:window.innerWidth,h:window.innerHeight})),!1)},Fm=()=>{let r=document.querySelector(".prx-nav_menu");if(!r)return;let t=document.createElement("canvas");Object.assign(t.style,{position:"fixed",inset:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:"0"}),r.prepend(t),Im(t,()=>({w:window.innerWidth,h:window.innerHeight}),3e3,20)};var Ys,Th,Om,Ho,Bm,Fl,jS=/(?:\r|\n|\t\t)/g,tb=/(?:\s\s+)/g,eb="\xA0",zm=function(t){Ys=document,Th=window,Ho=Ho||t||Th.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),Ho&&(Fl=Ho.utils.toArray,Bm=Ho.core.context||function(){},Om=1)},nb=1,km=function(t){return Th.getComputedStyle(t)},Ah=function(t){return t.position==="absolute"||t.absolute===!0},ib=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},rb=" style='position:relative;display:inline-block;'",Nm=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+rb+(t?" class='"+t+(n?i++:"")+"'>":">")}},Vm=function r(t,e,n){var i=t.nodeType;if(i===1||i===9||i===11)for(t=t.firstChild;t;t=t.nextSibling)r(t,e,n);else(i===3||i===4)&&(t.nodeValue=t.nodeValue.split(e).join(n))},Eh=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},Um=function(t,e,n){for(var i;t&&t!==e;){if(i=t._next||t.nextSibling,i)return i.textContent.charAt(0)===n;t=t.parentNode||t._parent}},sb=function r(t){var e=Fl(t.childNodes),n=e.length,i,s;for(i=0;i<n;i++)s=e[i],s._isSplit?r(s):i&&s.previousSibling&&s.previousSibling.nodeType===3?(s.previousSibling.nodeValue+=s.nodeType===3?s.nodeValue:s.firstChild.nodeValue,t.removeChild(s)):s.nodeType!==3&&(t.insertBefore(s.firstChild,s),t.removeChild(s))},gi=function(t,e){return parseFloat(e[t])||0},ob=function(t,e,n,i,s,o,a){var l=km(t),c=gi("paddingLeft",l),u=-999,h=gi("borderBottomWidth",l)+gi("borderTopWidth",l),f=gi("borderLeftWidth",l)+gi("borderRightWidth",l),d=gi("paddingTop",l)+gi("paddingBottom",l),_=gi("paddingLeft",l)+gi("paddingRight",l),g=gi("fontSize",l)*(e.lineThreshold||.2),p=l.textAlign,m=[],S=[],v=[],M=e.wordDelimiter||" ",D=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",E=s&&~T.indexOf("lines")?[]:null,R=~T.indexOf("words"),y=~T.indexOf("chars"),x=Ah(e),L=e.linesClass,F=~(L||"").indexOf("++"),P=[],B=l.display==="flex",X=t.style.display,G,J,U,I,A,it,vt,Wt,q,Q,ct,tt;for(F&&(L=L.split("++").join("")),B&&(t.style.display="block"),J=t.getElementsByTagName("*"),U=J.length,A=[],G=0;G<U;G++)A[G]=J[G];if(E||x)for(G=0;G<U;G++)I=A[G],it=I.parentNode===t,(it||x||y&&!R)&&(tt=I.offsetTop,E&&it&&Math.abs(tt-u)>g&&(I.nodeName!=="BR"||G===0)&&(vt=[],E.push(vt),u=tt),x&&(I._x=I.offsetLeft,I._y=tt,I._w=I.offsetWidth,I._h=I.offsetHeight),E&&((I._isSplit&&it||!y&&it||R&&it||!R&&I.parentNode.parentNode===t&&!I.parentNode._isSplit)&&(vt.push(I),I._x-=c,Um(I,t,M)&&(I._wordEnd=!0)),I.nodeName==="BR"&&(I.nextSibling&&I.nextSibling.nodeName==="BR"||G===0)&&E.push([])));for(G=0;G<U;G++){if(I=A[G],it=I.parentNode===t,I.nodeName==="BR"){E||x?(I.parentNode&&I.parentNode.removeChild(I),A.splice(G--,1),U--):R||t.appendChild(I);continue}if(x&&(q=I.style,!R&&!it&&(I._x+=I.parentNode._x,I._y+=I.parentNode._y),q.left=I._x+"px",q.top=I._y+"px",q.position="absolute",q.display="block",q.width=I._w+1+"px",q.height=I._h+"px"),!R&&y)if(I._isSplit)for(I._next=J=I.nextSibling,I.parentNode.appendChild(I);J&&J.nodeType===3&&J.textContent===" ";)I._next=J.nextSibling,I.parentNode.appendChild(J),J=J.nextSibling;else I.parentNode._isSplit?(I._parent=I.parentNode,!I.previousSibling&&I.firstChild&&(I.firstChild._isFirst=!0),I.nextSibling&&I.nextSibling.textContent===" "&&!I.nextSibling.nextSibling&&P.push(I.nextSibling),I._next=I.nextSibling&&I.nextSibling._isFirst?null:I.nextSibling,I.parentNode.removeChild(I),A.splice(G--,1),U--):it||(tt=!I.nextSibling&&Um(I.parentNode,t,M),I.parentNode._parent&&I.parentNode._parent.appendChild(I),tt&&I.parentNode.appendChild(Ys.createTextNode(" ")),D==="span"&&(I.style.display="inline"),m.push(I));else I.parentNode._isSplit&&!I._isSplit&&I.innerHTML!==""?S.push(I):y&&!I._isSplit&&(D==="span"&&(I.style.display="inline"),m.push(I))}for(G=P.length;--G>-1;)P[G].parentNode.removeChild(P[G]);if(E){for(x&&(Q=Ys.createElement(D),t.appendChild(Q),ct=Q.offsetWidth+"px",tt=Q.offsetParent===t?0:t.offsetLeft,t.removeChild(Q)),q=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Wt=M===" "&&(!x||!R&&!y),G=0;G<E.length;G++){for(vt=E[G],Q=Ys.createElement(D),Q.style.cssText="display:block;text-align:"+p+";position:"+(x?"absolute;":"relative;"),L&&(Q.className=L+(F?G+1:"")),v.push(Q),U=vt.length,J=0;J<U;J++)vt[J].nodeName!=="BR"&&(I=vt[J],Q.appendChild(I),Wt&&I._wordEnd&&Q.appendChild(Ys.createTextNode(" ")),x&&(J===0&&(Q.style.top=I._y+"px",Q.style.left=c+tt+"px"),I.style.top="0px",tt&&(I.style.left=I._x-tt+"px")));U===0?Q.innerHTML=" ":!R&&!y&&(sb(Q),Vm(Q,"\xA0"," ")),x&&(Q.style.width=ct,Q.style.height=I._h+"px"),t.appendChild(Q)}t.style.cssText=q}x&&(a>t.clientHeight&&(t.style.height=a-d+"px",t.clientHeight<a&&(t.style.height=a+h+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+f+"px"))),B&&(X?t.style.display=X:t.style.removeProperty("display")),Eh(n,m),R&&Eh(i,S),Eh(s,v)},ab=function(t,e,n,i){var s=e.tag?e.tag:e.span?"span":"div",o=e.type||e.split||"chars,words,lines",a=~o.indexOf("chars"),l=Ah(e),c=e.wordDelimiter||" ",u=function(x){return x===c||x===eb&&c===" "},h=c!==" "?"":l?"­ ":" ",f="</"+s+">",d=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:ib:null,g,p,m,S,v,M,D,T,E=Ys.createElement("div"),R=t.parentNode;for(R.insertBefore(E,t),E.textContent=t.nodeValue,R.removeChild(t),t=E,g=_s(t),D=g.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(g=g.replace(tb," ").replace(jS,"")),D&&(g=g.split("<").join("{{LT}}")),v=g.length,p=(g.charAt(0)===" "?h:"")+n(),m=0;m<v;m++)if(M=g.charAt(m),_&&(T=_(g.substr(m),e.specialChars)))M=g.substr(m,T||1),p+=a&&M!==" "?i()+M+"</"+s+">":M,m+=T-1;else if(u(M)&&!u(g.charAt(m-1))&&m){for(p+=d?f:"",d=0;u(g.charAt(m+1));)p+=h,m++;m===v-1?p+=h:g.charAt(m+1)!==")"&&(p+=h+n(),d=1)}else M==="{"&&g.substr(m,6)==="{{LT}}"?(p+=a?i()+"{{LT}}</"+s+">":"{{LT}}",m+=5):M.charCodeAt(0)>=55296&&M.charCodeAt(0)<=56319||g.charCodeAt(m+1)>=65024&&g.charCodeAt(m+1)<=65039?(S=((g.substr(m,12).split(tu)||[])[1]||"").length||2,p+=a&&M!==" "?i()+g.substr(m,S)+"</"+s+">":g.substr(m,S),m+=S-1):p+=a&&M!==" "?i()+M+"</"+s+">":M;t.outerHTML=p+(d?f:""),D&&Vm(R,"{{LT}}","<")},lb=function r(t,e,n,i){var s=Fl(t.childNodes),o=s.length,a=Ah(e),l,c;if(t.nodeType!==3||o>1){for(e.absolute=!1,l=0;l<o;l++)c=s[l],c._next=c._isFirst=c._parent=c._wordEnd=null,(c.nodeType!==3||/\S+/.test(c.nodeValue))&&(a&&c.nodeType!==3&&km(c).display==="inline"&&(c.style.display="inline-block",c.style.position="relative"),c._isSplit=!0,r(c,e,n,i));e.absolute=a,t._isSplit=!0;return}ab(t,e,n,i)},Zs=function(){function r(e,n){Om||zm(),this.elements=Fl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},Bm(this),nb&&this.split(n)}var t=r.prototype;return t.split=function(n){this.isSplit&&this.revert(),this.vars=n=n||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var i=this.elements.length,s=n.tag?n.tag:n.span?"span":"div",o=Nm(n.wordsClass,s),a=Nm(n.charsClass,s),l,c,u;--i>-1;)u=this.elements[i],this._originals[i]={html:u.innerHTML,style:u.getAttribute("style")},l=u.clientHeight,c=u.clientWidth,lb(u,n,o,a),ob(u,n,this.chars,this.words,this.lines,c,l);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},t.revert=function(){var n=this._originals;if(!n)throw"revert() call wasn't scoped properly.";return this.elements.forEach(function(i,s){i.innerHTML=n[s].html,i.setAttribute("style",n[s].style)}),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.create=function(n,i){return new r(n,i)},r}();Zs.version="3.12.5";Zs.register=zm;var Hm=()=>{
|
|
3842
|
+
`,blending:or,transparent:!0});g.needsUpdate=!0,i.add(new Al(h,g));let p=()=>{let{w:S,h:v}=t();a.aspect=S/v,a.updateProjectionMatrix(),s.setSize(S,v)},m=()=>{requestAnimationFrame(m);let S=Date.now()*.003;i.rotation.z+=.001/4,i.rotation.y+=5e-4/4,i.position.y=Math.sin(S*.05)*.05,a.lookAt(o.position),a.updateMatrixWorld(),s.render(o,a)};p(),s.compile(o,a),m(),window.addEventListener("resize",p,!1)},Lm=()=>{let r=document.querySelector("#canvas");r&&window.addEventListener("load",()=>Im(r,()=>({w:window.innerWidth,h:window.innerHeight})),!1)},Fm=()=>{let r=document.querySelector(".prx-nav_menu");if(!r)return;let t=document.createElement("canvas");Object.assign(t.style,{position:"fixed",inset:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:"0"}),r.prepend(t),Im(t,()=>({w:window.innerWidth,h:window.innerHeight}),3e3,20)};var Ys,Th,Om,Ho,Bm,Fl,jS=/(?:\r|\n|\t\t)/g,tb=/(?:\s\s+)/g,eb="\xA0",zm=function(t){Ys=document,Th=window,Ho=Ho||t||Th.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),Ho&&(Fl=Ho.utils.toArray,Bm=Ho.core.context||function(){},Om=1)},nb=1,km=function(t){return Th.getComputedStyle(t)},Ah=function(t){return t.position==="absolute"||t.absolute===!0},ib=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},rb=" style='position:relative;display:inline-block;'",Nm=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+rb+(t?" class='"+t+(n?i++:"")+"'>":">")}},Vm=function r(t,e,n){var i=t.nodeType;if(i===1||i===9||i===11)for(t=t.firstChild;t;t=t.nextSibling)r(t,e,n);else(i===3||i===4)&&(t.nodeValue=t.nodeValue.split(e).join(n))},Eh=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},Um=function(t,e,n){for(var i;t&&t!==e;){if(i=t._next||t.nextSibling,i)return i.textContent.charAt(0)===n;t=t.parentNode||t._parent}},sb=function r(t){var e=Fl(t.childNodes),n=e.length,i,s;for(i=0;i<n;i++)s=e[i],s._isSplit?r(s):i&&s.previousSibling&&s.previousSibling.nodeType===3?(s.previousSibling.nodeValue+=s.nodeType===3?s.nodeValue:s.firstChild.nodeValue,t.removeChild(s)):s.nodeType!==3&&(t.insertBefore(s.firstChild,s),t.removeChild(s))},gi=function(t,e){return parseFloat(e[t])||0},ob=function(t,e,n,i,s,o,a){var l=km(t),c=gi("paddingLeft",l),u=-999,h=gi("borderBottomWidth",l)+gi("borderTopWidth",l),f=gi("borderLeftWidth",l)+gi("borderRightWidth",l),d=gi("paddingTop",l)+gi("paddingBottom",l),_=gi("paddingLeft",l)+gi("paddingRight",l),g=gi("fontSize",l)*(e.lineThreshold||.2),p=l.textAlign,m=[],S=[],v=[],M=e.wordDelimiter||" ",D=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",E=s&&~T.indexOf("lines")?[]:null,R=~T.indexOf("words"),y=~T.indexOf("chars"),x=Ah(e),L=e.linesClass,F=~(L||"").indexOf("++"),P=[],B=l.display==="flex",X=t.style.display,G,J,U,I,A,it,vt,Wt,q,Q,ct,tt;for(F&&(L=L.split("++").join("")),B&&(t.style.display="block"),J=t.getElementsByTagName("*"),U=J.length,A=[],G=0;G<U;G++)A[G]=J[G];if(E||x)for(G=0;G<U;G++)I=A[G],it=I.parentNode===t,(it||x||y&&!R)&&(tt=I.offsetTop,E&&it&&Math.abs(tt-u)>g&&(I.nodeName!=="BR"||G===0)&&(vt=[],E.push(vt),u=tt),x&&(I._x=I.offsetLeft,I._y=tt,I._w=I.offsetWidth,I._h=I.offsetHeight),E&&((I._isSplit&&it||!y&&it||R&&it||!R&&I.parentNode.parentNode===t&&!I.parentNode._isSplit)&&(vt.push(I),I._x-=c,Um(I,t,M)&&(I._wordEnd=!0)),I.nodeName==="BR"&&(I.nextSibling&&I.nextSibling.nodeName==="BR"||G===0)&&E.push([])));for(G=0;G<U;G++){if(I=A[G],it=I.parentNode===t,I.nodeName==="BR"){E||x?(I.parentNode&&I.parentNode.removeChild(I),A.splice(G--,1),U--):R||t.appendChild(I);continue}if(x&&(q=I.style,!R&&!it&&(I._x+=I.parentNode._x,I._y+=I.parentNode._y),q.left=I._x+"px",q.top=I._y+"px",q.position="absolute",q.display="block",q.width=I._w+1+"px",q.height=I._h+"px"),!R&&y)if(I._isSplit)for(I._next=J=I.nextSibling,I.parentNode.appendChild(I);J&&J.nodeType===3&&J.textContent===" ";)I._next=J.nextSibling,I.parentNode.appendChild(J),J=J.nextSibling;else I.parentNode._isSplit?(I._parent=I.parentNode,!I.previousSibling&&I.firstChild&&(I.firstChild._isFirst=!0),I.nextSibling&&I.nextSibling.textContent===" "&&!I.nextSibling.nextSibling&&P.push(I.nextSibling),I._next=I.nextSibling&&I.nextSibling._isFirst?null:I.nextSibling,I.parentNode.removeChild(I),A.splice(G--,1),U--):it||(tt=!I.nextSibling&&Um(I.parentNode,t,M),I.parentNode._parent&&I.parentNode._parent.appendChild(I),tt&&I.parentNode.appendChild(Ys.createTextNode(" ")),D==="span"&&(I.style.display="inline"),m.push(I));else I.parentNode._isSplit&&!I._isSplit&&I.innerHTML!==""?S.push(I):y&&!I._isSplit&&(D==="span"&&(I.style.display="inline"),m.push(I))}for(G=P.length;--G>-1;)P[G].parentNode.removeChild(P[G]);if(E){for(x&&(Q=Ys.createElement(D),t.appendChild(Q),ct=Q.offsetWidth+"px",tt=Q.offsetParent===t?0:t.offsetLeft,t.removeChild(Q)),q=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Wt=M===" "&&(!x||!R&&!y),G=0;G<E.length;G++){for(vt=E[G],Q=Ys.createElement(D),Q.style.cssText="display:block;text-align:"+p+";position:"+(x?"absolute;":"relative;"),L&&(Q.className=L+(F?G+1:"")),v.push(Q),U=vt.length,J=0;J<U;J++)vt[J].nodeName!=="BR"&&(I=vt[J],Q.appendChild(I),Wt&&I._wordEnd&&Q.appendChild(Ys.createTextNode(" ")),x&&(J===0&&(Q.style.top=I._y+"px",Q.style.left=c+tt+"px"),I.style.top="0px",tt&&(I.style.left=I._x-tt+"px")));U===0?Q.innerHTML=" ":!R&&!y&&(sb(Q),Vm(Q,"\xA0"," ")),x&&(Q.style.width=ct,Q.style.height=I._h+"px"),t.appendChild(Q)}t.style.cssText=q}x&&(a>t.clientHeight&&(t.style.height=a-d+"px",t.clientHeight<a&&(t.style.height=a+h+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+f+"px"))),B&&(X?t.style.display=X:t.style.removeProperty("display")),Eh(n,m),R&&Eh(i,S),Eh(s,v)},ab=function(t,e,n,i){var s=e.tag?e.tag:e.span?"span":"div",o=e.type||e.split||"chars,words,lines",a=~o.indexOf("chars"),l=Ah(e),c=e.wordDelimiter||" ",u=function(x){return x===c||x===eb&&c===" "},h=c!==" "?"":l?"­ ":" ",f="</"+s+">",d=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:ib:null,g,p,m,S,v,M,D,T,E=Ys.createElement("div"),R=t.parentNode;for(R.insertBefore(E,t),E.textContent=t.nodeValue,R.removeChild(t),t=E,g=_s(t),D=g.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(g=g.replace(tb," ").replace(jS,"")),D&&(g=g.split("<").join("{{LT}}")),v=g.length,p=(g.charAt(0)===" "?h:"")+n(),m=0;m<v;m++)if(M=g.charAt(m),_&&(T=_(g.substr(m),e.specialChars)))M=g.substr(m,T||1),p+=a&&M!==" "?i()+M+"</"+s+">":M,m+=T-1;else if(u(M)&&!u(g.charAt(m-1))&&m){for(p+=d?f:"",d=0;u(g.charAt(m+1));)p+=h,m++;m===v-1?p+=h:g.charAt(m+1)!==")"&&(p+=h+n(),d=1)}else M==="{"&&g.substr(m,6)==="{{LT}}"?(p+=a?i()+"{{LT}}</"+s+">":"{{LT}}",m+=5):M.charCodeAt(0)>=55296&&M.charCodeAt(0)<=56319||g.charCodeAt(m+1)>=65024&&g.charCodeAt(m+1)<=65039?(S=((g.substr(m,12).split(tu)||[])[1]||"").length||2,p+=a&&M!==" "?i()+g.substr(m,S)+"</"+s+">":g.substr(m,S),m+=S-1):p+=a&&M!==" "?i()+M+"</"+s+">":M;t.outerHTML=p+(d?f:""),D&&Vm(R,"{{LT}}","<")},lb=function r(t,e,n,i){var s=Fl(t.childNodes),o=s.length,a=Ah(e),l,c;if(t.nodeType!==3||o>1){for(e.absolute=!1,l=0;l<o;l++)c=s[l],c._next=c._isFirst=c._parent=c._wordEnd=null,(c.nodeType!==3||/\S+/.test(c.nodeValue))&&(a&&c.nodeType!==3&&km(c).display==="inline"&&(c.style.display="inline-block",c.style.position="relative"),c._isSplit=!0,r(c,e,n,i));e.absolute=a,t._isSplit=!0;return}ab(t,e,n,i)},Zs=function(){function r(e,n){Om||zm(),this.elements=Fl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},Bm(this),nb&&this.split(n)}var t=r.prototype;return t.split=function(n){this.isSplit&&this.revert(),this.vars=n=n||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var i=this.elements.length,s=n.tag?n.tag:n.span?"span":"div",o=Nm(n.wordsClass,s),a=Nm(n.charsClass,s),l,c,u;--i>-1;)u=this.elements[i],this._originals[i]={html:u.innerHTML,style:u.getAttribute("style")},l=u.clientHeight,c=u.clientWidth,lb(u,n,o,a),ob(u,n,this.chars,this.words,this.lines,c,l);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},t.revert=function(){var n=this._originals;if(!n)throw"revert() call wasn't scoped properly.";return this.elements.forEach(function(i,s){i.innerHTML=n[s].html,i.setAttribute("style",n[s].style)}),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},r.create=function(n,i){return new r(n,i)},r}();Zs.version="3.12.5";Zs.register=zm;var Hm=()=>{ce.registerPlugin(Ht,Zs),document.querySelectorAll("[data-header-animation]").forEach(t=>{let e=t.querySelector("h2");if(!e||(e.classList.contains("is-all-strong")&&(e=e.querySelector("strong")),!e))return;let n=new Zs(e,{type:"lines",tag:"span"}),i=new Zs(e,{type:"lines",linesClass:"header_line"});n.lines=i.chars.concat(n.lines);let s=ce.timeline({scrollTrigger:{trigger:t,start:"top bottom",toggleActions:"play none none reset"}});s.fromTo(n.lines,{y:100},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"+=0.25");let o=t.querySelector(".hero_holo");o&&s.fromTo(o,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25");let a=t.querySelector(".button");a&&s.fromTo(a,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"-=0.75")})};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{zf(),Of(),Od(),Lm(),Fm(),Rd(),zd(),Bd(),Bf(),Hm()});})();
|
|
3843
3843
|
/*! Bundled license information:
|
|
3844
3844
|
|
|
3845
3845
|
gsap/gsap-core.js:
|