@widelab-development/pirxey-webflow-dev 0.0.7 → 0.0.8
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/talents.js +13 -13
- package/package.json +1 -1
package/dist/talents.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var nd=()=>{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=(h,d)=>{(d||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,d||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 Ni(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ud(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var Rn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Us={duration:.5,overwrite:!1,delay:0},hu,on,Ae,Xn=1e8,we=1/Xn,tu=Math.PI*2,W_=tu/4,X_=0,hd=Math.sqrt,Y_=Math.cos,q_=Math.sin,Ge=function(t){return typeof t=="string"},Ie=function(t){return typeof t=="function"},Oi=function(t){return typeof t=="number"},Ka=function(t){return typeof t>"u"},wi=function(t){return typeof t=="object"},Cn=function(t){return t!==!1},fu=function(){return typeof window<"u"},Ha=function(t){return Ie(t)||Ge(t)},fd=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},an=Array.isArray,eu=/(?:-?\.?\d|\.)+/gi,du=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Zr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,qc=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,pu=/[+-]=-?[.\d]+/,dd=/[^,'"\[\]\s]+/gi,Z_=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ce,Mi,nu,mu,Un={},Ya={},pd,md=function(t){return(Ya=qr(t,Un))&&ln},ja=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Xo=function(t,e){return!e&&console.warn(t)},gd=function(t,e){return t&&(Un[t]=e)&&Ya&&(Ya[t]=e)||Un},Yo=function(){return 0},J_={suppressEvents:!0,isStart:!0,kill:!1},Ga={suppressEvents:!0,kill:!1},$_={suppressEvents:!0},gu={},cr=[],iu={},_d,An={},Zc={},id=30,Wa=[],_u="",xu=function(t){var e=t[0],n,i;if(wi(e)||Ie(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=Wa.length;i--&&!Wa[i].targetTest(e););n=Wa[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Su(t[i],n)))||t.splice(i,1);return t},ur=function(t){return t._gsap||xu(Yn(t))[0]._gsap},yu=function(t,e,n){return(n=t[e])&&Ie(n)?t[e]():Ka(n)&&t.getAttribute&&t.getAttribute(e)||n},gn=function(t,e){return(t=t.split(",")).forEach(e)||t},Le=function(t){return Math.round(t*1e5)/1e5||0},Ze=function(t){return Math.round(t*1e7)/1e7||0},Jr=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},K_=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},qa=function(){var t=cr.length,e=cr.slice(0),n,i;for(iu={},cr.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},xd=function(t,e,n,i){cr.length&&!on&&qa(),t.render(e,n,i||on&&e<0&&(t._initted||t._startAt)),cr.length&&!on&&qa()},yd=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(dd).length<2?e:Ge(t)?t.trim():t},vd=function(t){return t},qn=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},j_=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},qr=function(t,e){for(var n in e)t[n]=e[n];return t},rd=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=wi(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},Za=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Ho=function(t){var e=t.parent||Ce,n=t.keyframes?j_(an(t.keyframes)):qn;if(Cn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},Q_=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},Sd=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},Qa=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},hr=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Wr=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},t0=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},ru=function(t,e,n,i){return t._startAt&&(on?t._startAt.revert(Ga):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},e0=function r(t){return!t||t._ts&&r(t.parent)},sd=function(t){return t._repeat?Os(t._tTime,t=t.duration()+t._rDelay)*t:0},Os=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},Ja=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},tl=function(t){return t._end=Ze(t._start+(t._tDur/Math.abs(t._ts||t._rts||we)||0))},el=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Ze(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),tl(t),n._dirty||Wr(n,t)),t},Md=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=Ja(t.rawTime(),e),(!e._dur||Jo(0,e.totalDuration(),n)-e._tTime>we)&&e.render(n,!0)),Wr(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=-we}},bi=function(t,e,n,i){return e.parent&&hr(e),e._start=Ze((Oi(n)?n:n||t!==Ce?Wn(t,n,e):t._time)+e._delay),e._end=Ze(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Sd(t,e,"_first","_last",t._sort?"_start":0),su(e)||(t._recent=e),i||Md(t,e),t._ts<0&&el(t,t._tTime),t},bd=function(t,e){return(Un.ScrollTrigger||ja("scrollTrigger",e))&&Un.ScrollTrigger.create(e,t)},wd=function(t,e,n,i,s){if(wu(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!on&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&_d!==Dn.frame)return cr.push(t),t._lazy=[s,i],1},n0=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},su=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},i0=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&n0(t)&&!(!t._initted&&su(t))||(t._ts<0||t._dp._ts<0)&&!su(t))?0:1,a=t._rDelay,l=0,c,h,d;if(a&&t._repeat&&(l=Jo(0,t._tDur,e),h=Os(l,a),t._yoyo&&h&1&&(o=1-o),h!==Os(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||on||i||t._zTime===we||!e&&t._zTime){if(!t._initted&&wd(t,e,i,n,l))return;for(d=t._zTime,t._zTime=e||(n?we:0),n||(n=e&&!d),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&&ru(t,e,n,!0),t._onUpdate&&!n&&Nn(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&Nn(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&hr(t,1),!n&&!on&&(Nn(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},r0=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}},Bs=function(t,e,n,i){var s=t._repeat,o=Ze(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Ze(o*(s+1)+t._rDelay*s):o,a>0&&!i&&el(t,t._tTime=t._tDur*a),t.parent&&tl(t),n||Wr(t.parent,t),t},od=function(t){return t instanceof Qe?Wr(t):Bs(t,t._dur)},s0={_start:0,endTime:Yo,totalDuration:Yo},Wn=function r(t,e,n){var i=t.labels,s=t._recent||s0,o=t.duration()>=Xn?s.endTime(!1):t._dur,a,l,c;return Ge(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*(an(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},Go=function(t,e,n){var i=Oi(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=Cn(l.vars.inherit)&&l.parent;o.immediateRender=Cn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Ne(e[0],o,e[s+1])},fr=function(t,e){return t||t===0?e(t):e},Jo=function(t,e,n){return n<t?t:n>e?e:n},tn=function(t,e){return!Ge(t)||!(e=Z_.exec(t))?"":e[1]},o0=function(t,e,n){return fr(n,function(i){return Jo(t,e,i)})},ou=[].slice,Ed=function(t,e){return t&&wi(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&wi(t[0]))&&!t.nodeType&&t!==Mi},a0=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return Ge(i)&&!e||Ed(i,1)?(s=n).push.apply(s,Yn(i)):n.push(i)})||n},Yn=function(t,e,n){return Ae&&!e&&Ae.selector?Ae.selector(t):Ge(t)&&!n&&(nu||!ks())?ou.call((e||mu).querySelectorAll(t),0):an(t)?a0(t,n):Ed(t)?ou.call(t,0):t?[t]:[]},au=function(t){return t=Yn(t)[0]||Xo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return Yn(e,n.querySelectorAll?n:n===t?Xo("Invalid scope")||mu.createElement("div"):t)}},Td=function(t){return t.sort(function(){return .5-Math.random()})},Ad=function(t){if(Ie(t))return t;var e=wi(t)?t:{each:t},n=Xr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,h=i,d=i;return Ge(i)?h=d={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(h=i[0],d=i[1]),function(f,u,_){var g=(_||e).length,p=o[g],m,b,S,v,D,T,w,I,M;if(!p){if(M=e.grid==="auto"?0:(e.grid||[1,Xn])[1],!M){for(w=-Xn;w<(w=_[M++].getBoundingClientRect().left)&&M<g;);M<g&&M--}for(p=o[g]=[],m=l?Math.min(M,g)*h-.5:i%M,b=M===Xn?0:l?g*d/M-.5:i/M|0,w=0,I=Xn,T=0;T<g;T++)S=T%M-m,v=b-(T/M|0),p[T]=D=c?Math.abs(c==="y"?v:S):hd(S*S+v*v),D>w&&(w=D),D<I&&(I=D);i==="random"&&Td(p),p.max=w-I,p.min=I,p.v=g=(parseFloat(e.amount)||parseFloat(e.each)*(M>g?g-1:c?c==="y"?g/M:M:Math.max(M,g/M))||0)*(i==="edges"?-1:1),p.b=g<0?s-g:s,p.u=tn(e.amount||e.each)||0,n=n&&g<0?Ud(n):n}return g=(p[f]-p.min)/p.max||0,Ze(p.b+(n?n(g):g)*p.v)+p.u}},lu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Ze(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(Oi(n)?0:tn(n))}},Dd=function(t,e){var n=an(t),i,s;return!n&&wi(t)&&(i=n=t.radius||Xn,t.values?(t=Yn(t.values),(s=!Oi(t[0]))&&(i*=i)):t=lu(t.increment)),fr(e,n?Ie(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=Xn,h=0,d=t.length,f,u;d--;)s?(f=t[d].x-a,u=t[d].y-l,f=f*f+u*u):f=Math.abs(t[d]-a),f<c&&(c=f,h=d);return h=!i||c<=i?t[h]:o,s||h===o||Oi(o)?h:h+tn(o)}:lu(t))},Cd=function(t,e,n,i){return fr(an(t)?!e:n===!0?!!(n=0):!i,function(){return an(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})},l0=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)}},c0=function(t,e){return function(n){return t(parseFloat(n))+(e||tn(n))}},u0=function(t,e,n){return Pd(t,e,0,1,n)},Rd=function(t,e,n){return fr(n,function(i){return t[~~e(i)]})},h0=function r(t,e,n){var i=e-t;return an(t)?Rd(t,r(0,t.length),e):fr(n,function(s){return(i+(s-t)%i)%i+t})},f0=function r(t,e,n){var i=e-t,s=i*2;return an(t)?Rd(t,r(0,t.length-1),e):fr(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},zs=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?dd:eu),n+=t.substr(e,i-e)+Cd(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},Pd=function(t,e,n,i,s){var o=e-t,a=i-n;return fr(s,function(l){return n+((l-t)/o*a||0)})},d0=function r(t,e,n,i){var s=isNaN(t+e)?0:function(u){return(1-u)*t+u*e};if(!s){var o=Ge(t),a={},l,c,h,d,f;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(an(t)&&!an(e)){for(h=[],d=t.length,f=d-2,c=1;c<d;c++)h.push(r(t[c-1],t[c]));d--,s=function(_){_*=d;var g=Math.min(f,~~_);return h[g](_-g)},n=e}else i||(t=qr(an(t)?[]:{},t));if(!h){for(l in e)Mu.call(a,t,l,"get",e[l]);s=function(_){return Au(_,a)||(o?t.p:t)}}}return fr(n,s)},ad=function(t,e,n){var i=t.labels,s=Xn,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},Nn=function(t,e,n){var i=t.vars,s=i[e],o=Ae,a=t._ctx,l,c,h;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&cr.length&&qa(),a&&(Ae=a),h=l?s.apply(c,l):s.call(c),Ae=o,h},zo=function(t){return hr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!on),t.progress()<1&&Nn(t,"onInterrupt"),t},Ns,Id=[],Ld=function(t){if(t)if(t=!t.name&&t.default||t,fu()||t.headless){var e=t.name,n=Ie(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:Yo,render:Au,add:Mu,kill:C0,modifier:D0,rawVars:0},o={targetTest:0,get:0,getSetter:nl,aliases:{},register:0};if(ks(),t!==i){if(An[e])return;qn(i,qn(Za(t,s),o)),qr(i.prototype,qr(s,Za(t,o))),An[i.prop=e]=i,t.targetTest&&(Wa.push(i),gu[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}gd(e,i),t.register&&t.register(ln,i,_n)}else Id.push(t)},Me=255,Vo={aqua:[0,Me,Me],lime:[0,Me,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Me],navy:[0,0,128],white:[Me,Me,Me],olive:[128,128,0],yellow:[Me,Me,0],orange:[Me,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Me,0,0],pink:[Me,192,203],cyan:[0,Me,Me],transparent:[Me,Me,Me,0]},Jc=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)*Me+.5|0},Fd=function(t,e,n){var i=t?Oi(t)?[t>>16,t>>8&Me,t&Me]:0:Vo.black,s,o,a,l,c,h,d,f,u,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Vo[t])i=Vo[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&Me,i&Me,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&Me,t&Me]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(eu),!e)l=+i[0]%360/360,c=+i[1]/100,h=+i[2]/100,o=h<=.5?h*(c+1):h+c-h*c,s=h*2-o,i.length>3&&(i[3]*=1),i[0]=Jc(l+1/3,s,o),i[1]=Jc(l,s,o),i[2]=Jc(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(du),n&&i.length<4&&(i[3]=1),i}else i=t.match(eu)||Vo.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/Me,o=i[1]/Me,a=i[2]/Me,d=Math.max(s,o,a),f=Math.min(s,o,a),h=(d+f)/2,d===f?l=c=0:(u=d-f,c=h>.5?u/(2-d-f):u/(d+f),l=d===s?(o-a)/u+(o<a?6:0):d===o?(a-s)/u+2:(s-o)/u+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(h*100+.5)),n&&i.length<4&&(i[3]=1),i},Nd=function(t){var e=[],n=[],i=-1;return t.split(Ui).forEach(function(s){var o=s.match(Zr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},ld=function(t,e,n){var i="",s=(t+i).match(Ui),o=e?"hsla(":"rgba(",a=0,l,c,h,d;if(!s)return t;if(s=s.map(function(f){return(f=Fd(f,e,1))&&o+(e?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(h=Nd(t),l=n.c,l.join(i)!==h.c.join(i)))for(c=t.replace(Ui,"1").split(Zr),d=c.length-1;a<d;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:n).shift());if(!c)for(c=t.split(Ui),d=c.length-1;a<d;a++)i+=c[a]+s[a];return i+c[d]},Ui=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Vo)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),p0=/hsl[a]?\(/,vu=function(t){var e=t.join(" "),n;if(Ui.lastIndex=0,Ui.test(e))return n=p0.test(e),t[1]=ld(t[1],n),t[0]=ld(t[0],n,Nd(t[1])),!0},qo,Dn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,h,d,f,u,_=function g(p){var m=r()-i,b=p===!0,S,v,D,T;if((m>t||m<0)&&(n+=m-e),i+=m,D=i-n,S=D-o,(S>0||b)&&(T=++d.frame,f=D-d.time*1e3,d.time=D=D/1e3,o+=S+(S>=s?4:s-S),v=1),b||(l=c(g)),v)for(u=0;u<a.length;u++)a[u](D,f,T,p)};return d={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(p){return f/(1e3/(p||60))},wake:function(){pd&&(!nu&&fu()&&(Mi=nu=window,mu=Mi.document||{},Un.gsap=ln,(Mi.gsapVersions||(Mi.gsapVersions=[])).push(ln.version),md(Ya||Mi.GreenSockGlobals||!Mi.gsap&&Mi||{}),Id.forEach(Ld)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),c=h||function(p){return setTimeout(p,o-d.time*1e3+1|0)},qo=1,_(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),qo=0,c=Yo},lagSmoothing:function(p,m){t=p||1/0,e=Math.min(m||33,t)},fps:function(p){s=1e3/(p||240),o=d.time*1e3+s},add:function(p,m,b){var S=m?function(v,D,T,w){p(v,D,T,w),d.remove(S)}:p;return d.remove(p),a[b?"unshift":"push"](S),ks(),S},remove:function(p,m){~(m=a.indexOf(p))&&a.splice(m,1)&&u>=m&&u--},_listeners:a},d}(),ks=function(){return!qo&&Dn.wake()},fe={},m0=/^[\d.\-M][\d.\-,\s]/,g0=/["']/g,_0=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(g0,"").trim():+c,i=l.substr(a+1).trim();return e},x0=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)},y0=function(t){var e=(t+"").split("("),n=fe[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[_0(e[1])]:x0(t).split(",").map(yd)):fe._CE&&m0.test(t)?fe._CE("",t):n},Ud=function(t){return function(e){return 1-t(1-e)}},Od=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},Xr=function(t,e){return t&&(Ie(t)?t:fe[t]||y0(t))||e},$r=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 gn(t,function(a){fe[a]=Un[a]=s,fe[o=a.toLowerCase()]=n;for(var l in s)fe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=fe[a+"."+l]=s[l]}),s},Bd=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},$c=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/tu*(Math.asin(1/i)||0),a=function(h){return h===1?1:i*Math.pow(2,-10*h)*q_((h-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:Bd(a);return s=tu/s,l.config=function(c,h){return r(t,c,h)},l},Kc=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)}:Bd(n);return i.config=function(s){return r(t,s)},i};gn("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;$r(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})});fe.Linear.easeNone=fe.none=fe.Linear.easeIn;$r("Elastic",$c("in"),$c("out"),$c());(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};$r("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);$r("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});$r("Circ",function(r){return-(hd(1-r*r)-1)});$r("Sine",function(r){return r===1?1:-Y_(r*W_)+1});$r("Back",Kc("in"),Kc("out"),Kc());fe.SteppedEase=fe.steps=Un.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-we;return function(a){return((i*Jo(0,o,a)|0)+s)*n}}};Us.ease=fe["quad.out"];gn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return _u+=r+","+r+"Params,"});var Su=function(t,e){this.id=X_++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:yu,this.set=e?e.getSetter:nl},Zo=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,Bs(this,+e.duration,1,1),this.data=e.data,Ae&&(this._ctx=Ae,Ae.data.push(this)),qo||Dn.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,Bs(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(ks(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(el(this,n),!s._dp||s.parent||Md(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)&&bi(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===we||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),xd(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+sd(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)+sd(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?Os(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-we?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-we?0:this._rts,this.totalTime(Jo(-Math.abs(this._delay),this._tDur,s),i!==!1),tl(this),t0(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):(ks(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==we&&(this._tTime-=we)))),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)&&bi(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Cn(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?Ja(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=$_);var i=on;return on=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),on=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,od(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,od(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(Wn(this,n),Cn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Cn(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?-we:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-we,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)-we)},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=Ie(n)?n:vd,a=function(){var c=i.then;i.then=null,Ie(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(){zo(this)},r}();qn(Zo.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:-we,_prom:0,_ps:!1,_rts:1});var Qe=function(r){ud(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=Cn(n.sortChildren),Ce&&bi(n.parent||Ce,Ni(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&bd(Ni(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return Go(0,arguments,this),this},e.from=function(i,s,o){return Go(1,arguments,this),this},e.fromTo=function(i,s,o,a){return Go(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Ho(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Ne(i,s,Wn(this,o),1),this},e.call=function(i,s,o){return bi(this,Ne.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Ne(i,o,Wn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,h){return o.runBackwards=1,Ho(o).immediateRender=Cn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,h)},e.staggerFromTo=function(i,s,o,a,l,c,h,d){return a.startAt=o,Ho(a).immediateRender=Cn(a.immediateRender),this.staggerTo(i,s,a,l,c,h,d)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=i<=0?0:Ze(i),d=this._zTime<0!=i<0&&(this._initted||!c),f,u,_,g,p,m,b,S,v,D,T,w;if(this!==Ce&&h>l&&i>=0&&(h=l),h!==this._tTime||o||d){if(a!==this._time&&c&&(h+=this._time-a,i+=this._time-a),f=h,v=this._start,S=this._ts,m=!S,d&&(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=Ze(h%p),h===l?(g=this._repeat,f=c):(g=~~(h/p),g&&g===h/p&&(f=c,g--),f>c&&(f=c)),D=Os(this._tTime,p),!a&&this._tTime&&D!==g&&this._tTime-D*p-this._dur<=0&&(D=g),T&&g&1&&(f=c-f,w=1),g!==D&&!this._lock){var I=T&&D&1,M=I===(T&&g&1);if(g<D&&(I=!I),a=I?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Ze(g*p)),s,!c)._lock=0,this._tTime=h,!s&&this.parent&&Nn(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(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,M&&(this._lock=2,a=I?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;Od(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=r0(this,Ze(a),Ze(f)),b&&(h-=f-(f=b._start))),this._tTime=h,this._time=f,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&f&&!s&&!g&&(Nn(this,"onStart"),this._tTime!==h))return this;if(f>=a&&i>=0)for(u=this._first;u;){if(_=u._next,(u._act||f>=u._start)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(f-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(f-u._start)*u._ts,s,o),f!==this._time||!this._ts&&!m){b=0,_&&(h+=this._zTime=-we);break}}u=_}else{u=this._last;for(var y=i<0?i:f;u;){if(_=u._prev,(u._act||y<=u._end)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(y-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(y-u._start)*u._ts,s,o||on&&(u._initted||u._startAt)),f!==this._time||!this._ts&&!m){b=0,_&&(h+=this._zTime=y?-we:we);break}}u=_}}if(b&&!s&&(this.pause(),b.render(f>=a?0:-we)._zTime=f>=a?1:-1,this._ts))return this._start=v,tl(this),this.render(i,s,o);this._onUpdate&&!s&&Nn(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(v===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&hr(this,1),!s&&!(i<0&&!a)&&(h||a||!l)&&(Nn(this,h===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(Oi(s)||(s=Wn(this,s,i)),!(i instanceof Zo)){if(an(i))return i.forEach(function(a){return o.add(a,s)}),this;if(Ge(i))return this.addLabel(i,s);if(Ie(i))i=Ne.delayedCall(0,i);else return this}return this!==i?bi(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=-Xn);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Ne?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 Ge(i)?this.removeLabel(i):Ie(i)?this.killTweensOf(i):(Qa(this,i),i===this._recent&&(this._recent=this._last),Wr(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ze(Dn.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]=Wn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Ne.delayedCall(0,s||Yo,o);return a.data="isPause",this._hasPause=1,bi(this,a,Wn(this,i))},e.removePause=function(i){var s=this._first;for(i=Wn(this,i);s;)s._start===i&&s.data==="isPause"&&hr(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)lr!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=Yn(i),l=this._first,c=Oi(s),h;l;)l instanceof Ne?K_(l._targets,a)&&(c?(!lr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Wn(o,i),l=s,c=l.startAt,h=l.onStart,d=l.onStartParams,f=l.immediateRender,u,_=Ne.to(o,qn({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())||we,onStart:function(){if(o.pause(),!u){var p=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==p&&Bs(_,p,0,1).render(_._time,!0,!0),u=1}h&&h.apply(_,d||[])}},s));return f?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,qn({startAt:{time:Wn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),ad(this,Wn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),ad(this,Wn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+we)},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 Wr(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={}),Wr(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=Xn,c,h,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(d=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,bi(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;Bs(o,o===Ce&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(Ce._ts&&(xd(Ce,Ja(i,Ce)),_d=Dn.frame),Dn.frame>=id){id+=Rn.autoSleep||120;var s=Ce._first;if((!s||!s._ts)&&Rn.autoSleep&&Dn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Dn.sleep()}}},t}(Zo);qn(Qe.prototype,{_lock:0,_hasPause:0,_forcing:0});var v0=function(t,e,n,i,s,o,a){var l=new _n(this._pt,t,e,0,1,Tu,null,s),c=0,h=0,d,f,u,_,g,p,m,b;for(l.b=n,l.e=i,n+="",i+="",(m=~i.indexOf("random("))&&(i=zs(i)),o&&(b=[n,i],o(b,t,e),n=b[0],i=b[1]),f=n.match(qc)||[];d=qc.exec(i);)_=d[0],g=i.substring(c,d.index),u?u=(u+1)%5:g.substr(-5)==="rgba("&&(u=1),_!==f[h++]&&(p=parseFloat(f[h-1])||0,l._pt={_next:l._pt,p:g||h===1?g:",",s:p,c:_.charAt(1)==="="?Jr(p,_)-p:parseFloat(_)-p,m:u&&u<4?Math.round:0},c=qc.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(pu.test(i)||m)&&(l.e=0),this._pt=l,l},Mu=function(t,e,n,i,s,o,a,l,c,h){Ie(i)&&(i=i(s||0,t,o));var d=t[e],f=n!=="get"?n:Ie(d)?c?t[e.indexOf("set")||!Ie(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():d,u=Ie(d)?c?E0:Vd:Eu,_;if(Ge(i)&&(~i.indexOf("random(")&&(i=zs(i)),i.charAt(1)==="="&&(_=Jr(f,i)+(tn(f)||0),(_||_===0)&&(i=_))),!h||f!==i||cu)return!isNaN(f*i)&&i!==""?(_=new _n(this._pt,t,e,+f||0,i-(f||0),typeof d=="boolean"?A0:Hd,0,u),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!d&&!(e in t)&&ja(e,i),v0.call(this,t,e,f,i,u,l||Rn.stringFilter,c))},S0=function(t,e,n,i,s){if(Ie(t)&&(t=Wo(t,s,e,n,i)),!wi(t)||t.style&&t.nodeType||an(t)||fd(t))return Ge(t)?Wo(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=Wo(t[a],s,e,n,i);return o},bu=function(t,e,n,i,s,o){var a,l,c,h;if(An[t]&&(a=new An[t]).init(s,a.rawVars?e[t]:S0(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new _n(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==Ns))for(c=n._ptLookup[n._targets.indexOf(s)],h=a._props.length;h--;)c[a._props[h]]=l;return a},lr,cu,wu=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,h=i.runBackwards,d=i.yoyoEase,f=i.keyframes,u=i.autoRevert,_=t._dur,g=t._startAt,p=t._targets,m=t.parent,b=m&&m.data==="nested"?m.vars.targets:p,S=t._overwrite==="auto"&&!hu,v=t.timeline,D,T,w,I,M,y,P,L,C,B,J,O,Y;if(v&&(!f||!s)&&(s="none"),t._ease=Xr(s,Us.ease),t._yEase=d?Ud(Xr(d===!0?s:d,Us.ease)):0,d&&t._yoyo&&!t._repeat&&(d=t._yEase,t._yEase=t._ease,t._ease=d),t._from=!v&&!!i.runBackwards,!v||f&&!i.stagger){if(L=p[0]?ur(p[0]).harness:0,O=L&&i[L.prop],D=Za(i,gu),g&&(g._zTime<0&&g.progress(1),e<0&&h&&a&&!u?g.render(-1,!0):g.revert(h&&_?Ga:J_),g._lazy=0),o){if(hr(t._startAt=Ne.set(p,qn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!g&&Cn(l),startAt:null,delay:0,onUpdate:c&&function(){return Nn(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(on||!a&&!u)&&t._startAt.revert(Ga),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(h&&_&&!g){if(e&&(a=!1),w=qn({overwrite:!1,data:"isFromStart",lazy:a&&!g&&Cn(l),immediateRender:a,stagger:0,parent:m},D),O&&(w[L.prop]=O),hr(t._startAt=Ne.set(p,w)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(on?t._startAt.revert(Ga):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,we,we);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Cn(l)||l&&!_,T=0;T<p.length;T++){if(M=p[T],P=M._gsap||xu(p)[T]._gsap,t._ptLookup[T]=B={},iu[P.id]&&cr.length&&qa(),J=b===p?T:b.indexOf(M),L&&(C=new L).init(M,O||D,t,J,b)!==!1&&(t._pt=I=new _n(t._pt,M,C.name,0,1,C.render,C,0,C.priority),C._props.forEach(function(H){B[H]=I}),C.priority&&(y=1)),!L||O)for(w in D)An[w]&&(C=bu(w,D,t,J,M,b))?C.priority&&(y=1):B[w]=I=Mu.call(t,M,w,"get",D[w],J,b,0,i.stringFilter);t._op&&t._op[T]&&t.kill(M,t._op[T]),S&&t._pt&&(lr=t,Ce.killTweensOf(M,B,t.globalTime(e)),Y=!t.parent,lr=0),t._pt&&l&&(iu[P.id]=1)}y&&Du(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!Y,f&&e<=0&&v.render(Xn,!0,!0)},M0=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],h,d,f,u;if(!c)for(c=t._ptCache[e]=[],f=t._ptLookup,u=t._targets.length;u--;){if(h=f[u][e],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return cu=1,t.vars[e]="+=0",wu(t,a),cu=0,l?Xo(e+" not eligible for reset"):1;c.push(h)}for(u=c.length;u--;)d=c[u],h=d._pt||d,h.s=(i||i===0)&&!s?i:h.s+(i||0)+o*h.c,h.c=n-h.s,d.e&&(d.e=Le(n)+tn(d.e)),d.b&&(d.b=h.s+tn(d.b))},b0=function(t,e){var n=t[0]?ur(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=qr({},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},w0=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(an(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})},Wo=function(t,e,n,i,s){return Ie(t)?t.call(e,n,i,s):Ge(t)&&~t.indexOf("random(")?zs(t):t},kd=_u+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",zd={};gn(kd+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return zd[r]=1});var Ne=function(r){ud(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:Ho(i))||this;var l=a.vars,c=l.duration,h=l.delay,d=l.immediateRender,f=l.stagger,u=l.overwrite,_=l.keyframes,g=l.defaults,p=l.scrollTrigger,m=l.yoyoEase,b=i.parent||Ce,S=(an(n)||fd(n)?Oi(n[0]):"length"in i)?[n]:Yn(n),v,D,T,w,I,M,y,P;if(a._targets=S.length?xu(S):Xo("GSAP target "+n+" not found. https://gsap.com",!Rn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=u,_||f||Ha(c)||Ha(h)){if(i=a.vars,v=a.timeline=new Qe({data:"nested",defaults:g||{},targets:b&&b.data==="nested"?b.vars.targets:S}),v.kill(),v.parent=v._dp=Ni(a),v._start=0,f||Ha(c)||Ha(h)){if(w=S.length,y=f&&Ad(f),wi(f))for(I in f)~kd.indexOf(I)&&(P||(P={}),P[I]=f[I]);for(D=0;D<w;D++)T=Za(i,zd),T.stagger=0,m&&(T.yoyoEase=m),P&&qr(T,P),M=S[D],T.duration=+Wo(c,Ni(a),D,M,S),T.delay=(+Wo(h,Ni(a),D,M,S)||0)-a._delay,!f&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),v.to(M,T,y?y(D,M,S):0),v._ease=fe.none;v.duration()?c=h=0:a.timeline=0}else if(_){Ho(qn(v.vars.defaults,{ease:"none"})),v._ease=Xr(_.ease||i.ease||"none");var L=0,C,B,J;if(an(_))_.forEach(function(O){return v.to(S,O,">")}),v.duration();else{T={};for(I in _)I==="ease"||I==="easeEach"||w0(I,_[I],T,_.easeEach);for(I in T)for(C=T[I].sort(function(O,Y){return O.t-Y.t}),L=0,D=0;D<C.length;D++)B=C[D],J={ease:B.e,duration:(B.t-(D?C[D-1].t:0))/100*c},J[I]=B.v,v.to(S,J,L),L+=J.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||a.duration(c=v.duration())}else a.timeline=0;return u===!0&&!hu&&(lr=Ni(a),Ce.killTweensOf(S),lr=0),bi(b,Ni(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(d||!c&&!_&&a._start===Ze(b._time)&&Cn(d)&&e0(Ni(a))&&b.data!=="nested")&&(a._tTime=-we,a.render(Math.max(0,-h)||0)),p&&bd(Ni(a),p),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,h=i<0,d=i>l-we&&!h?l:i<we?0:i,f,u,_,g,p,m,b,S,v;if(!c)i0(this,i,s,o);else if(d!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(f=d,S=this.timeline,this._repeat){if(g=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(g*100+i,s,o);if(f=Ze(d%g),d===l?(_=this._repeat,f=c):(_=~~(d/g),_&&_===Ze(d/g)&&(f=c,_--),f>c&&(f=c)),m=this._yoyo&&_&1,m&&(v=this._yEase,f=c-f),p=Os(this._tTime,g),f===a&&!o&&this._initted&&_===p)return this._tTime=d,this;_!==p&&(S&&this._yEase&&Od(S,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==g&&this._initted&&(this._lock=o=1,this.render(Ze(g*_),!0).invalidate()._lock=0))}if(!this._initted){if(wd(this,h?i:f,o,s,d))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=d,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(v||this._ease)(f/c),this._from&&(this.ratio=b=1-b),f&&!a&&!s&&!_&&(Nn(this,"onStart"),this._tTime!==d))return this;for(u=this._pt;u;)u.r(b,u.d),u=u._next;S&&S.render(i<0?i:S._dur*S._ease(f/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(h&&ru(this,i,s,o),Nn(this,"onUpdate")),this._repeat&&_!==p&&this.vars.onRepeat&&!s&&this.parent&&Nn(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(h&&!this._onUpdate&&ru(this,i,!0,!0),(i||!c)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&hr(this,1),!s&&!(h&&!a)&&(d||a||m)&&(Nn(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<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){qo||Dn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||wu(this,c),h=this._ease(c/this._dur),M0(this,i,s,o,a,h,c,l)?this.resetTo(i,s,o,a,1):(el(this,0),this.parent||Sd(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?zo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,lr&&lr.vars.overwrite!==!0)._first||zo(this),this.parent&&o!==this.timeline.totalDuration()&&Bs(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?Yn(i):a,c=this._ptLookup,h=this._pt,d,f,u,_,g,p,m;if((!s||s==="all")&&Q_(a,l))return s==="all"&&(this._pt=0),zo(this);for(d=this._op=this._op||[],s!=="all"&&(Ge(s)&&(g={},gn(s,function(b){return g[b]=1}),s=g),s=b0(a,s)),m=a.length;m--;)if(~l.indexOf(a[m])){f=c[m],s==="all"?(d[m]=s,_=f,u={}):(u=d[m]=d[m]||{},_=s);for(g in _)p=f&&f[g],p&&((!("kill"in p.d)||p.d.kill(g)===!0)&&Qa(this,p,"_pt"),delete f[g]),u!=="all"&&(u[g]=1)}return this._initted&&!this._pt&&h&&zo(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return Go(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 Go(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 Ce.killTweensOf(i,s,o)},t}(Zo);qn(Ne.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});gn("staggerTo,staggerFrom,staggerFromTo",function(r){Ne[r]=function(){var t=new Qe,e=ou.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var Eu=function(t,e,n){return t[e]=n},Vd=function(t,e,n){return t[e](n)},E0=function(t,e,n,i){return t[e](i.fp,n)},T0=function(t,e,n){return t.setAttribute(e,n)},nl=function(t,e){return Ie(t[e])?Vd:Ka(t[e])&&t.setAttribute?T0:Eu},Hd=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},A0=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Tu=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)},Au=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},D0=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},C0=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?Qa(this,e,"_pt"):e.dep||(n=1),e=i;return!n},R0=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},Du=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},_n=function(){function r(e,n,i,s,o,a,l,c,h){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||Hd,this.d=l||this,this.set=c||Eu,this.pr=h||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=R0,this.m=n,this.mt=s,this.tween=i},r}();gn(_u+"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 gu[r]=1});Un.TweenMax=Un.TweenLite=Ne;Un.TimelineLite=Un.TimelineMax=Qe;Ce=new Qe({sortChildren:!1,defaults:Us,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Rn.stringFilter=vu;var Yr=[],Xa={},P0=[],cd=0,I0=0,jc=function(t){return(Xa[t]||P0).map(function(e){return e()})},uu=function(){var t=Date.now(),e=[];t-cd>2&&(jc("matchMediaInit"),Yr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=Mi.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),jc("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),cd=t,jc("matchMedia"))},Gd=function(){function r(e,n){this.selector=n&&au(n),this.data=[],this._r=[],this.isReverted=!1,this.id=I0++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Ie(n)&&(s=i,i=n,n=Ie);var o=this,a=function(){var c=Ae,h=o.selector,d;return c&&c!==o&&c.data.push(o),s&&(o.selector=au(s)),Ae=o,d=i.apply(o,arguments),Ie(d)&&o._r.push(d),Ae=c,o.selector=h,o.isReverted=!1,d};return o.last=a,n===Ie?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Ae;Ae=null,n(this),Ae=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Ne&&!(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(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,d){return d.g-h.g||-1/0}).forEach(function(h){return h.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 Ne)&&c.revert&&c.revert(n);s._r.forEach(function(h){return h(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=Yr.length;o--;)Yr[o].id===this.id&&Yr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),L0=function(){function r(e){this.contexts=[],this.scope=e,Ae&&Ae.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){wi(n)||(n={matches:n});var o=new Gd(0,s||this.scope),a=o.conditions={},l,c,h;Ae&&!o.selector&&(o.selector=Ae.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?h=1:(l=Mi.matchMedia(n[c]),l&&(Yr.indexOf(o)<0&&Yr.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(uu):l.addEventListener("change",uu)));return h&&i(o,function(d){return o.add(null,d)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),$a={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 Ld(i)})},timeline:function(t){return new Qe(t)},getTweensOf:function(t,e){return Ce.getTweensOf(t,e)},getProperty:function(t,e,n,i){Ge(t)&&(t=Yn(t)[0]);var s=ur(t||{}).get,o=n?vd:yd;return n==="native"&&(n=""),t&&(e?o((An[e]&&An[e].get||s)(t,e,n,i)):function(a,l,c){return o((An[a]&&An[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=Yn(t),t.length>1){var i=t.map(function(h){return ln.quickSetter(h,e,n)}),s=i.length;return function(h){for(var d=s;d--;)i[d](h)}}t=t[0]||{};var o=An[e],a=ur(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(h){var d=new o;Ns._pt=0,d.init(t,n?h+n:h,Ns,0,[t]),d.render(1,d),Ns._pt&&Au(1,Ns)}:a.set(t,l);return o?c:function(h){return c(t,l,n?h+n:h,a,1)}},quickTo:function(t,e,n){var i,s=ln.to(t,qr((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,h){return s.resetTo(e,l,c,h)};return o.tween=s,o},isTweening:function(t){return Ce.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Xr(t.ease,Us.ease)),rd(Us,t||{})},config:function(t){return rd(Rn,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&&!An[a]&&!Un[a]&&Xo(e+" effect requires "+a+" plugin.")}),Zc[e]=function(a,l,c){return n(Yn(a),qn(l||{},s),c)},o&&(Qe.prototype[e]=function(a,l,c){return this.add(Zc[e](a,wi(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){fe[t]=Xr(e)},parseEase:function(t,e){return arguments.length?Xr(t,e):fe},getById:function(t){return Ce.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new Qe(t),i,s;for(n.smoothChildTiming=Cn(t.smoothChildTiming),Ce.remove(n),n._dp=0,n._time=n._tTime=Ce._time,i=Ce._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Ne&&i.vars.onComplete===i._targets[0]))&&bi(n,i,i._start-i._delay),i=s;return bi(Ce,n,0),n},context:function(t,e){return t?new Gd(t,e):Ae},matchMedia:function(t){return new L0(t)},matchMediaRefresh:function(){return Yr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||uu()},addEventListener:function(t,e){var n=Xa[t]||(Xa[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=Xa[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:h0,wrapYoyo:f0,distribute:Ad,random:Cd,snap:Dd,normalize:u0,getUnit:tn,clamp:o0,splitColor:Fd,toArray:Yn,selector:au,mapRange:Pd,pipe:l0,unitize:c0,interpolate:d0,shuffle:Td},install:md,effects:Zc,ticker:Dn,updateRoot:Qe.updateRoot,plugins:An,globalTimeline:Ce,core:{PropTween:_n,globals:gd,Tween:Ne,Timeline:Qe,Animation:Zo,getCache:ur,_removeLinkedListItem:Qa,reverting:function(){return on},context:function(t){return t&&Ae&&(Ae.data.push(t),t._ctx=Ae),Ae},suppressOverwrites:function(t){return hu=t}}};gn("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return $a[r]=Ne[r]});Dn.add(Qe.updateRoot);Ns=$a.to({},{duration:0});var F0=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},N0=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=F0(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},Qc=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(Ge(s)&&(l={},gn(s,function(h){return l[h]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}N0(a,s)}}}},ln=$a.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;)on?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)}},Qc("roundProps",lu),Qc("modifiers"),Qc("snap",Dd))||$a;Ne.version=Qe.version=ln.version="3.12.5";pd=1;fu()&&ks();var U0=fe.Power0,O0=fe.Power1,B0=fe.Power2,k0=fe.Power3,z0=fe.Power4,V0=fe.Linear,H0=fe.Quad,G0=fe.Cubic,W0=fe.Quart,X0=fe.Quint,Y0=fe.Strong,q0=fe.Elastic,Z0=fe.Back,J0=fe.SteppedEase,$0=fe.Bounce,K0=fe.Sine,j0=fe.Expo,Q0=fe.Circ;var Wd,dr,Hs,Nu,ts,tx,Xd,Uu,ex=function(){return typeof window<"u"},ki={},Qr=180/Math.PI,Gs=Math.PI/180,Vs=Math.atan2,Yd=1e8,Ou=/([A-Z])/g,nx=/(left|right|width|margin|padding|x)/i,ix=/[\s,\(]\S/,Ei={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Pu=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},rx=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)},sx=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)},ox=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Qd=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},tp=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},ax=function(t,e,n){return t.style[e]=n},lx=function(t,e,n){return t.style.setProperty(e,n)},cx=function(t,e,n){return t._gsap[e]=n},ux=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},hx=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},fx=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Re="transform",Pn=Re+"Origin",dx=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in ki&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Ei[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=Bi(i,a)}):this.tfm[t]=o.x?o[t]:Bi(i,t),t===Pn&&(this.tfm.zOrigin=o.zOrigin);else return Ei.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Re)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Pn,e,"")),t=Re}(s||e)&&this.props.push(t,e,s[t])},ep=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},px=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(Ou,"-$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=Uu(),(!s||!s.isStart)&&!n[Re]&&(ep(n),i.zOrigin&&n[Pn]&&(n[Pn]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},np=function(t,e){var n={target:t,props:[],revert:px,save:dx};return t._gsap||ln.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},ip,Iu=function(t,e){var n=dr.createElementNS?dr.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):dr.createElement(t);return n&&n.style?n:dr.createElement(t)},Ti=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Ou,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,Ws(e)||e,1)||""},qd="O,Moz,ms,Ms,Webkit".split(","),Ws=function(t,e,n){var i=e||ts,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(qd[o]+t in s););return o<0?null:(o===3?"ms":o>=0?qd[o]:"")+t},Lu=function(){ex()&&window.document&&(Wd=window,dr=Wd.document,Hs=dr.documentElement,ts=Iu("div")||{style:{}},tx=Iu("div"),Re=Ws(Re),Pn=Re+"Origin",ts.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ip=!!Ws("perspective"),Uu=ln.core.reverting,Nu=1)},Cu=function r(t){var e=Iu("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(Hs.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)),Hs.removeChild(e),this.style.cssText=s,o},Zd=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},rp=function(t){var e;try{e=t.getBBox()}catch{e=Cu.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Cu||(e=Cu.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+Zd(t,["x","cx","x1"])||0,y:+Zd(t,["y","cy","y1"])||0,width:0,height:0}:e},sp=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&rp(t))},es=function(t,e){if(e){var n=t.style,i;e in ki&&e!==Pn&&(e=Re),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(Ou,"-$1").toLowerCase())):n.removeAttribute(e)}},pr=function(t,e,n,i,s,o){var a=new _n(t._pt,e,n,0,1,o?tp:Qd);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},Jd={deg:1,rad:1,turn:1},mx={grid:1,flex:1},mr=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=ts.style,l=nx.test(e),c=t.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),d=100,f=i==="px",u=i==="%",_,g,p,m;if(i===o||!s||Jd[i]||Jd[o])return s;if(o!=="px"&&!f&&(s=r(t,e,n,"px")),m=t.getCTM&&sp(t),(u||o==="%")&&(ki[e]||~e.indexOf("adius")))return _=m?t.getBBox()[l?"width":"height"]:t[h],Le(u?s/_*d:s/100*_);if(a[l?"width":"height"]=d+(f?o:i),g=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,m&&(g=(t.ownerSVGElement||{}).parentNode),(!g||g===dr||!g.appendChild)&&(g=dr.body),p=g._gsap,p&&u&&p.width&&l&&p.time===Dn.time&&!p.uncache)return Le(s/p.width*d);if(u&&(e==="height"||e==="width")){var b=t.style[e];t.style[e]=d+i,_=t[h],b?t.style[e]=b:es(t,e)}else(u||o==="%")&&!mx[Ti(g,"display")]&&(a.position=Ti(t,"position")),g===t&&(a.position="static"),g.appendChild(ts),_=ts[h],g.removeChild(ts),a.position="absolute";return l&&u&&(p=ur(g),p.time=Dn.time,p.width=g[h]),Le(f?_*s/d:_&&s?d/_*s:0)},Bi=function(t,e,n,i){var s;return Nu||Lu(),e in Ei&&e!=="transform"&&(e=Ei[e],~e.indexOf(",")&&(e=e.split(",")[0])),ki[e]&&e!=="transform"?(s=jo(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:rl(Ti(t,Pn))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=il[e]&&il[e](t,e,n)||Ti(t,e)||yu(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?mr(t,e,s,n)+n:s},gx=function(t,e,n,i){if(!n||n==="none"){var s=Ws(e,t,1),o=s&&Ti(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=Ti(t,"borderTopColor"))}var a=new _n(this._pt,t.style,e,0,1,Tu),l=0,c=0,h,d,f,u,_,g,p,m,b,S,v,D;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(g=t.style[e],t.style[e]=i,i=Ti(t,e)||i,g?t.style[e]=g:es(t,e)),h=[n,i],vu(h),n=h[0],i=h[1],f=n.match(Zr)||[],D=i.match(Zr)||[],D.length){for(;d=Zr.exec(i);)p=d[0],b=i.substring(l,d.index),_?_=(_+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(_=1),p!==(g=f[c++]||"")&&(u=parseFloat(g)||0,v=g.substr((u+"").length),p.charAt(1)==="="&&(p=Jr(u,p)+v),m=parseFloat(p),S=p.substr((m+"").length),l=Zr.lastIndex-S.length,S||(S=S||Rn.units[e]||v,l===i.length&&(i+=S,a.e+=S)),v!==S&&(u=mr(t,e,g,S)||0),a._pt={_next:a._pt,p:b||c===1?b:",",s:u,c:m-u,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?tp:Qd;return pu.test(i)&&(a.e=0),this._pt=a,a},$d={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_x=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]=$d[n]||n,e[1]=$d[i]||i,e.join(" ")},xx=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],ki[a]&&(l=1,a=a==="transformOrigin"?Pn:Re),es(n,a);l&&(es(n,Re),o&&(o.svg&&n.removeAttribute("transform"),jo(n,1),o.uncache=1,ep(i)))}},il={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new _n(t._pt,e,n,0,0,xx);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},Ko=[1,0,0,1,0,0],op={},ap=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Kd=function(t){var e=Ti(t,Re);return ap(e)?Ko:e.substr(7).match(du).map(Le)},Bu=function(t,e){var n=t._gsap||ur(t),i=t.style,s=Kd(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"?Ko:s):(s===Ko&&!t.offsetParent&&t!==Hs&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,Hs.appendChild(t)),s=Kd(t),l?i.display=l:es(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):Hs.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Fu=function(t,e,n,i,s,o){var a=t._gsap,l=s||Bu(t,!0),c=a.xOrigin||0,h=a.yOrigin||0,d=a.xOffset||0,f=a.yOffset||0,u=l[0],_=l[1],g=l[2],p=l[3],m=l[4],b=l[5],S=e.split(" "),v=parseFloat(S[0])||0,D=parseFloat(S[1])||0,T,w,I,M;n?l!==Ko&&(w=u*p-_*g)&&(I=v*(p/w)+D*(-g/w)+(g*b-p*m)/w,M=v*(-_/w)+D*(u/w)-(u*b-_*m)/w,v=I,D=M):(T=rp(t),v=T.x+(~S[0].indexOf("%")?v/100*T.width:v),D=T.y+(~(S[1]||S[0]).indexOf("%")?D/100*T.height:D)),i||i!==!1&&a.smooth?(m=v-c,b=D-h,a.xOffset=d+(m*u+b*g)-m,a.yOffset=f+(m*_+b*p)-b):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=D,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[Pn]="0px 0px",o&&(pr(o,a,"xOrigin",c,v),pr(o,a,"yOrigin",h,D),pr(o,a,"xOffset",d,a.xOffset),pr(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",v+" "+D)},jo=function(t,e){var n=t._gsap||new Su(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=Ti(t,Pn)||"0",h,d,f,u,_,g,p,m,b,S,v,D,T,w,I,M,y,P,L,C,B,J,O,Y,H,U,R,at,_t,Ut,X,ot;return h=d=f=g=p=m=b=S=v=0,u=_=1,n.svg=!!(t.getCTM&&sp(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Re]=(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[Re]!=="none"?l[Re]:"")),i.scale=i.rotate=i.translate="none"),w=Bu(t,n.svg),n.svg&&(n.uncache?(H=t.getBBox(),c=n.xOrigin-H.x+"px "+(n.yOrigin-H.y)+"px",Y=""):Y=!e&&t.getAttribute("data-svg-origin"),Fu(t,Y||c,!!Y||n.originIsAbsolute,n.smooth!==!1,w)),D=n.xOrigin||0,T=n.yOrigin||0,w!==Ko&&(P=w[0],L=w[1],C=w[2],B=w[3],h=J=w[4],d=O=w[5],w.length===6?(u=Math.sqrt(P*P+L*L),_=Math.sqrt(B*B+C*C),g=P||L?Vs(L,P)*Qr:0,b=C||B?Vs(C,B)*Qr+g:0,b&&(_*=Math.abs(Math.cos(b*Gs))),n.svg&&(h-=D-(D*P+T*C),d-=T-(D*L+T*B))):(ot=w[6],Ut=w[7],R=w[8],at=w[9],_t=w[10],X=w[11],h=w[12],d=w[13],f=w[14],I=Vs(ot,_t),p=I*Qr,I&&(M=Math.cos(-I),y=Math.sin(-I),Y=J*M+R*y,H=O*M+at*y,U=ot*M+_t*y,R=J*-y+R*M,at=O*-y+at*M,_t=ot*-y+_t*M,X=Ut*-y+X*M,J=Y,O=H,ot=U),I=Vs(-C,_t),m=I*Qr,I&&(M=Math.cos(-I),y=Math.sin(-I),Y=P*M-R*y,H=L*M-at*y,U=C*M-_t*y,X=B*y+X*M,P=Y,L=H,C=U),I=Vs(L,P),g=I*Qr,I&&(M=Math.cos(I),y=Math.sin(I),Y=P*M+L*y,H=J*M+O*y,L=L*M-P*y,O=O*M-J*y,P=Y,J=H),p&&Math.abs(p)+Math.abs(g)>359.9&&(p=g=0,m=180-m),u=Le(Math.sqrt(P*P+L*L+C*C)),_=Le(Math.sqrt(O*O+ot*ot)),I=Vs(J,O),b=Math.abs(I)>2e-4?I*Qr:0,v=X?1/(X<0?-X:X):0),n.svg&&(Y=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!ap(Ti(t,Re)),Y&&t.setAttribute("transform",Y))),Math.abs(b)>90&&Math.abs(b)<270&&(s?(u*=-1,b+=g<=0?180:-180,g+=g<=0?180:-180):(_*=-1,b+=b<=0?180:-180)),e=e||n.uncache,n.x=h-((n.xPercent=h&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-h)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=d-((n.yPercent=d&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-d)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=f+o,n.scaleX=Le(u),n.scaleY=Le(_),n.rotation=Le(g)+a,n.rotationX=Le(p)+a,n.rotationY=Le(m)+a,n.skewX=b+a,n.skewY=S+a,n.transformPerspective=v+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[Pn]=rl(c)),n.xOffset=n.yOffset=0,n.force3D=Rn.force3D,n.renderTransform=n.svg?vx:ip?lp:yx,n.uncache=0,n},rl=function(t){return(t=t.split(" "))[0]+" "+t[1]},Ru=function(t,e,n){var i=tn(e);return Le(parseFloat(e)+parseFloat(mr(t,"x",n+"px",i)))+i},yx=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,lp(t,e)},Kr="0deg",$o="0px",jr=") ",lp=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,h=n.rotationY,d=n.rotationX,f=n.skewX,u=n.skewY,_=n.scaleX,g=n.scaleY,p=n.transformPerspective,m=n.force3D,b=n.target,S=n.zOrigin,v="",D=m==="auto"&&t&&t!==1||m===!0;if(S&&(d!==Kr||h!==Kr)){var T=parseFloat(h)*Gs,w=Math.sin(T),I=Math.cos(T),M;T=parseFloat(d)*Gs,M=Math.cos(T),o=Ru(b,o,w*M*-S),a=Ru(b,a,-Math.sin(T)*-S),l=Ru(b,l,I*M*-S+S)}p!==$o&&(v+="perspective("+p+jr),(i||s)&&(v+="translate("+i+"%, "+s+"%) "),(D||o!==$o||a!==$o||l!==$o)&&(v+=l!==$o||D?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+jr),c!==Kr&&(v+="rotate("+c+jr),h!==Kr&&(v+="rotateY("+h+jr),d!==Kr&&(v+="rotateX("+d+jr),(f!==Kr||u!==Kr)&&(v+="skew("+f+", "+u+jr),(_!==1||g!==1)&&(v+="scale("+_+", "+g+jr),b.style[Re]=v||"translate(0, 0)"},vx=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,h=n.skewY,d=n.scaleX,f=n.scaleY,u=n.target,_=n.xOrigin,g=n.yOrigin,p=n.xOffset,m=n.yOffset,b=n.forceCSS,S=parseFloat(o),v=parseFloat(a),D,T,w,I,M;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Gs,c*=Gs,D=Math.cos(l)*d,T=Math.sin(l)*d,w=Math.sin(l-c)*-f,I=Math.cos(l-c)*f,c&&(h*=Gs,M=Math.tan(c-h),M=Math.sqrt(1+M*M),w*=M,I*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),D*=M,T*=M)),D=Le(D),T=Le(T),w=Le(w),I=Le(I)):(D=d,I=f,T=w=0),(S&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(S=mr(u,"x",o,"px"),v=mr(u,"y",a,"px")),(_||g||p||m)&&(S=Le(S+_-(_*D+g*w)+p),v=Le(v+g-(_*T+g*I)+m)),(i||s)&&(M=u.getBBox(),S=Le(S+i/100*M.width),v=Le(v+s/100*M.height)),M="matrix("+D+","+T+","+w+","+I+","+S+","+v+")",u.setAttribute("transform",M),b&&(u.style[Re]=M)},Sx=function(t,e,n,i,s){var o=360,a=Ge(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Qr:1),c=l-i,h=i+c+"deg",d,f;return a&&(d=s.split("_")[1],d==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),d==="cw"&&c<0?c=(c+o*Yd)%o-~~(c/o)*o:d==="ccw"&&c>0&&(c=(c-o*Yd)%o-~~(c/o)*o)),t._pt=f=new _n(t._pt,e,n,i,c,rx),f.e=h,f.u="deg",t._props.push(n),f},jd=function(t,e){for(var n in e)t[n]=e[n];return t},Mx=function(t,e,n){var i=jd({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,h,d,f,u,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Re]=e,a=jo(n,1),es(n,Re),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Re],o[Re]=e,a=jo(n,1),o[Re]=c);for(l in ki)c=i[l],h=a[l],c!==h&&s.indexOf(l)<0&&(u=tn(c),_=tn(h),d=u!==_?mr(n,l,c,_):parseFloat(c),f=parseFloat(h),t._pt=new _n(t._pt,a,l,d,f-d,Pu),t._pt.u=_||0,t._props.push(l));jd(a,i)};gn("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});il[t>1?"border"+r:r]=function(a,l,c,h,d){var f,u;if(arguments.length<4)return f=o.map(function(_){return Bi(a,_,c)}),u=f.join(" "),u.split(f[0]).length===5?f[0]:u;f=(h+"").split(" "),u={},o.forEach(function(_,g){return u[_]=f[g]=f[g]||f[(g-1)/2|0]}),a.init(l,u,d)}});var ku={name:"css",register:Lu,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,h,d,f,u,_,g,p,m,b,S,v,D,T,w,I;Nu||Lu(),this.styles=this.styles||np(t),I=this.styles.props,this.tween=n;for(g in e)if(g!=="autoRound"&&(h=e[g],!(An[g]&&bu(g,e,n,i,t,s)))){if(u=typeof h,_=il[g],u==="function"&&(h=h.call(n,i,t,s),u=typeof h),u==="string"&&~h.indexOf("random(")&&(h=zs(h)),_)_(this,t,g,h,n)&&(w=1);else if(g.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(g)+"").trim(),h+="",Ui.lastIndex=0,Ui.test(c)||(p=tn(c),m=tn(h)),m?p!==m&&(c=mr(t,g,c,m)+m):p&&(h+=p),this.add(a,"setProperty",c,h,i,s,0,0,g),o.push(g),I.push(g,0,a[g]);else if(u!=="undefined"){if(l&&g in l?(c=typeof l[g]=="function"?l[g].call(n,i,t,s):l[g],Ge(c)&&~c.indexOf("random(")&&(c=zs(c)),tn(c+"")||c==="auto"||(c+=Rn.units[g]||tn(Bi(t,g))||""),(c+"").charAt(1)==="="&&(c=Bi(t,g))):c=Bi(t,g),f=parseFloat(c),b=u==="string"&&h.charAt(1)==="="&&h.substr(0,2),b&&(h=h.substr(2)),d=parseFloat(h),g in Ei&&(g==="autoAlpha"&&(f===1&&Bi(t,"visibility")==="hidden"&&d&&(f=0),I.push("visibility",0,a.visibility),pr(this,a,"visibility",f?"inherit":"hidden",d?"inherit":"hidden",!d)),g!=="scale"&&g!=="transform"&&(g=Ei[g],~g.indexOf(",")&&(g=g.split(",")[0]))),S=g in ki,S){if(this.styles.save(g),v||(D=t._gsap,D.renderTransform&&!e.parseTransform||jo(t,e.parseTransform),T=e.smoothOrigin!==!1&&D.smooth,v=this._pt=new _n(this._pt,a,Re,0,1,D.renderTransform,D,0,-1),v.dep=1),g==="scale")this._pt=new _n(this._pt,D,"scaleY",D.scaleY,(b?Jr(D.scaleY,b+d):d)-D.scaleY||0,Pu),this._pt.u=0,o.push("scaleY",g),g+="X";else if(g==="transformOrigin"){I.push(Pn,0,a[Pn]),h=_x(h),D.svg?Fu(t,h,0,T,0,this):(m=parseFloat(h.split(" ")[2])||0,m!==D.zOrigin&&pr(this,D,"zOrigin",D.zOrigin,m),pr(this,a,g,rl(c),rl(h)));continue}else if(g==="svgOrigin"){Fu(t,h,1,T,0,this);continue}else if(g in op){Sx(this,D,g,f,b?Jr(f,b+h):h);continue}else if(g==="smoothOrigin"){pr(this,D,"smooth",D.smooth,h);continue}else if(g==="force3D"){D[g]=h;continue}else if(g==="transform"){Mx(this,h,t);continue}}else g in a||(g=Ws(g)||g);if(S||(d||d===0)&&(f||f===0)&&!ix.test(h)&&g in a)p=(c+"").substr((f+"").length),d||(d=0),m=tn(h)||(g in Rn.units?Rn.units[g]:p),p!==m&&(f=mr(t,g,c,m)),this._pt=new _n(this._pt,S?D:a,g,f,(b?Jr(f,b+d):d)-f,!S&&(m==="px"||g==="zIndex")&&e.autoRound!==!1?ox:Pu),this._pt.u=m||0,p!==m&&m!=="%"&&(this._pt.b=c,this._pt.r=sx);else if(g in a)gx.call(this,t,g,c,b?b+h:h);else if(g in t)this.add(t,g,c||t[g],b?b+h:h,i,s);else if(g!=="parseTransform"){ja(g,h);continue}S||(g in a?I.push(g,0,a[g]):I.push(g,1,c||t[g])),o.push(g)}}w&&Du(this)},render:function(t,e){if(e.tween._time||!Uu())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Bi,aliases:Ei,getSetter:function(t,e,n){var i=Ei[e];return i&&i.indexOf(",")<0&&(e=i),e in ki&&e!==Pn&&(t._gsap.x||Bi(t,"x"))?n&&Xd===n?e==="scale"?ux:cx:(Xd=n||{})&&(e==="scale"?hx:fx):t.style&&!Ka(t.style[e])?ax:~e.indexOf("-")?lx:nl(t,e)},core:{_removeProperty:es,_getMatrix:Bu}};ln.utils.checkPrefix=Ws;ln.core.getStyleSaver=np;(function(r,t,e,n){var i=gn(r+","+t+","+e,function(s){ki[s]=1});gn(t,function(s){Rn.units[s]="deg",op[s]=1}),Ei[i[13]]=r+","+t,gn(n,function(s){var o=s.split(":");Ei[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");gn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Rn.units[r]="px"});ln.registerPlugin(ku);var Kt=ln.registerPlugin(ku)||ln,eE=Kt.core.Tween;function cp(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 bx(r,t,e){return t&&cp(r.prototype,t),e&&cp(r,e),r}var en,al,wx,On,gr,_r,Ys,hp,ns,ta,fp,zi,oi,dp,pp=function(){return en||typeof window<"u"&&(en=window.gsap)&&en.registerPlugin&&en},mp=1,Xs=[],le=[],ai=[],ea=Date.now,zu=function(t,e){return e},Ex=function(){var t=ta.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,le),i.push.apply(i,ai),le=n,ai=i,zu=function(o,a){return e[o](a)}},Hi=function(t,e){return~ai.indexOf(t)&&ai[ai.indexOf(t)+1][e]},na=function(t){return!!~fp.indexOf(t)},yn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},xn=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},sl="scrollLeft",ol="scrollTop",Vu=function(){return zi&&zi.isPressed||le.cache++},ll=function(t,e){var n=function i(s){if(s||s===0){mp&&(On.history.scrollRestoration="manual");var o=zi&&zi.isPressed;s=i.v=Math.round(s)||(zi&&zi.iOS?1:0),t(s),i.cacheID=le.cache,o&&zu("ss",s)}else(e||le.cache!==i.cacheID||zu("ref"))&&(i.cacheID=le.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},cn={s:sl,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:ll(function(r){return arguments.length?On.scrollTo(r,ke.sc()):On.pageXOffset||gr[sl]||_r[sl]||Ys[sl]||0})},ke={s:ol,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:cn,sc:ll(function(r){return arguments.length?On.scrollTo(cn.sc(),r):On.pageYOffset||gr[ol]||_r[ol]||Ys[ol]||0})},vn=function(t,e){return(e&&e._ctx&&e._ctx.selector||en.utils.toArray)(t)[0]||(typeof t=="string"&&en.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},Vi=function(t,e){var n=e.s,i=e.sc;na(t)&&(t=gr.scrollingElement||_r);var s=le.indexOf(t),o=i===ke.sc?1:2;!~s&&(s=le.push(t)-1),le[s+o]||yn(t,"scroll",Vu);var a=le[s+o],l=a||(le[s+o]=ll(Hi(t,n),!0)||(na(t)?i:ll(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=en.getProperty(t,"scrollBehavior")==="smooth"),l},cl=function(t,e,n){var i=t,s=t,o=ea(),a=o,l=e||50,c=Math.max(500,l*3),h=function(_,g){var p=ea();g||p-o>l?(s=i,i=_,a=o,o=p):n?i+=_:i=s+(_-s)/(p-a)*(o-a)},d=function(){s=i=n?0:i,a=o=0},f=function(_){var g=a,p=s,m=ea();return(_||_===0)&&_!==i&&h(_),o===a||m-a>c?0:(i+(n?p:-p))/((n?m:o)-g)*1e3};return{update:h,reset:d,getVelocity:f}},Qo=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},up=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},gp=function(){ta=en.core.globals().ScrollTrigger,ta&&ta.core&&Ex()},_p=function(t){return en=t||pp(),!al&&en&&typeof document<"u"&&document.body&&(On=window,gr=document,_r=gr.documentElement,Ys=gr.body,fp=[On,gr,_r,Ys],wx=en.utils.clamp,dp=en.core.context||function(){},ns="onpointerenter"in Ys?"pointer":"mouse",hp=Fe.isTouch=On.matchMedia&&On.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in On||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,oi=Fe.eventTypes=("ontouchstart"in _r?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in _r?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return mp=0},500),gp(),al=1),al};cn.op=ke;le.cache=0;var Fe=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){al||_p(en)||console.warn("Please gsap.registerPlugin(Observer)"),ta||gp();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,h=n.preventDefault,d=n.onStop,f=n.onStopDelay,u=n.ignore,_=n.wheelSpeed,g=n.event,p=n.onDragStart,m=n.onDragEnd,b=n.onDrag,S=n.onPress,v=n.onRelease,D=n.onRight,T=n.onLeft,w=n.onUp,I=n.onDown,M=n.onChangeX,y=n.onChangeY,P=n.onChange,L=n.onToggleX,C=n.onToggleY,B=n.onHover,J=n.onHoverEnd,O=n.onMove,Y=n.ignoreCheck,H=n.isNormalizer,U=n.onGestureStart,R=n.onGestureEnd,at=n.onWheel,_t=n.onEnable,Ut=n.onDisable,X=n.onClick,ot=n.scrollSpeed,xt=n.capture,ct=n.allowClicks,Rt=n.lockAxis,kt=n.onLockAxis;this.target=a=vn(a)||_r,this.vars=n,u&&(u=en.utils.toArray(u)),i=i||1e-9,s=s||0,_=_||1,ot=ot||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(On.getComputedStyle(Ys).lineHeight)||22);var Z,Jt,It,Ft,bt,Et,Ht,W=this,$t=0,A=0,x=n.passive||!h,N=Vi(a,cn),q=Vi(a,ke),tt=N(),it=q(),vt=~o.indexOf("touch")&&!~o.indexOf("pointer")&&oi[0]==="pointerdown",pt=na(a),lt=a.ownerDocument||gr,Lt=[0,0,0],ht=[0,0,0],yt=0,Yt=function(){return yt=ea()},ut=function(j,dt){return(W.event=j)&&u&&~u.indexOf(j.target)||dt&&vt&&j.pointerType!=="touch"||Y&&Y(j,dt)},Tt=function(){W._vx.reset(),W._vy.reset(),Jt.pause(),d&&d(W)},Wt=function(){var j=W.deltaX=up(Lt),dt=W.deltaY=up(ht),et=Math.abs(j)>=i,wt=Math.abs(dt)>=i;P&&(et||wt)&&P(W,j,dt,Lt,ht),et&&(D&&W.deltaX>0&&D(W),T&&W.deltaX<0&&T(W),M&&M(W),L&&W.deltaX<0!=$t<0&&L(W),$t=W.deltaX,Lt[0]=Lt[1]=Lt[2]=0),wt&&(I&&W.deltaY>0&&I(W),w&&W.deltaY<0&&w(W),y&&y(W),C&&W.deltaY<0!=A<0&&C(W),A=W.deltaY,ht[0]=ht[1]=ht[2]=0),(Ft||It)&&(O&&O(W),It&&(b(W),It=!1),Ft=!1),Et&&!(Et=!1)&&kt&&kt(W),bt&&(at(W),bt=!1),Z=0},qt=function(j,dt,et){Lt[et]+=j,ht[et]+=dt,W._vx.update(j),W._vy.update(dt),c?Z||(Z=requestAnimationFrame(Wt)):Wt()},ue=function(j,dt){Rt&&!Ht&&(W.axis=Ht=Math.abs(j)>Math.abs(dt)?"x":"y",Et=!0),Ht!=="y"&&(Lt[2]+=j,W._vx.update(j,!0)),Ht!=="x"&&(ht[2]+=dt,W._vy.update(dt,!0)),c?Z||(Z=requestAnimationFrame(Wt)):Wt()},Zt=function(j){if(!ut(j,1)){j=Qo(j,h);var dt=j.clientX,et=j.clientY,wt=dt-W.x,ft=et-W.y,Dt=W.isDragging;W.x=dt,W.y=et,(Dt||Math.abs(W.startX-dt)>=s||Math.abs(W.startY-et)>=s)&&(b&&(It=!0),Dt||(W.isDragging=!0),ue(wt,ft),Dt||p&&p(W))}},V=W.onPress=function(k){ut(k,1)||k&&k.button||(W.axis=Ht=null,Jt.pause(),W.isPressed=!0,k=Qo(k),$t=A=0,W.startX=W.x=k.clientX,W.startY=W.y=k.clientY,W._vx.reset(),W._vy.reset(),yn(H?a:lt,oi[1],Zt,x,!0),W.deltaX=W.deltaY=0,S&&S(W))},Q=W.onRelease=function(k){if(!ut(k,1)){xn(H?a:lt,oi[1],Zt,!0);var j=!isNaN(W.y-W.startY),dt=W.isDragging,et=dt&&(Math.abs(W.x-W.startX)>3||Math.abs(W.y-W.startY)>3),wt=Qo(k);!et&&j&&(W._vx.reset(),W._vy.reset(),h&&ct&&en.delayedCall(.08,function(){if(ea()-yt>300&&!k.defaultPrevented){if(k.target.click)k.target.click();else if(lt.createEvent){var ft=lt.createEvent("MouseEvents");ft.initMouseEvent("click",!0,!0,On,1,wt.screenX,wt.screenY,wt.clientX,wt.clientY,!1,!1,!1,!1,0,null),k.target.dispatchEvent(ft)}}})),W.isDragging=W.isGesturing=W.isPressed=!1,d&&dt&&!H&&Jt.restart(!0),m&&dt&&m(W),v&&v(W,et)}},st=function(j){return j.touches&&j.touches.length>1&&(W.isGesturing=!0)&&U(j,W.isDragging)},mt=function(){return(W.isGesturing=!1)||R(W)},gt=function(j){if(!ut(j)){var dt=N(),et=q();qt((dt-tt)*ot,(et-it)*ot,1),tt=dt,it=et,d&&Jt.restart(!0)}},Bt=function(j){if(!ut(j)){j=Qo(j,h),at&&(bt=!0);var dt=(j.deltaMode===1?l:j.deltaMode===2?On.innerHeight:1)*_;qt(j.deltaX*dt,j.deltaY*dt,0),d&&!H&&Jt.restart(!0)}},ee=function(j){if(!ut(j)){var dt=j.clientX,et=j.clientY,wt=dt-W.x,ft=et-W.y;W.x=dt,W.y=et,Ft=!0,d&&Jt.restart(!0),(wt||ft)&&ue(wt,ft)}},Mt=function(j){W.event=j,B(W)},F=function(j){W.event=j,J(W)},rt=function(j){return ut(j)||Qo(j,h)&&X(W)};Jt=W._dc=en.delayedCall(f||.25,Tt).pause(),W.deltaX=W.deltaY=0,W._vx=cl(0,50,!0),W._vy=cl(0,50,!0),W.scrollX=N,W.scrollY=q,W.isDragging=W.isGesturing=W.isPressed=!1,dp(this),W.enable=function(k){return W.isEnabled||(yn(pt?lt:a,"scroll",Vu),o.indexOf("scroll")>=0&&yn(pt?lt:a,"scroll",gt,x,xt),o.indexOf("wheel")>=0&&yn(a,"wheel",Bt,x,xt),(o.indexOf("touch")>=0&&hp||o.indexOf("pointer")>=0)&&(yn(a,oi[0],V,x,xt),yn(lt,oi[2],Q),yn(lt,oi[3],Q),ct&&yn(a,"click",Yt,!0,!0),X&&yn(a,"click",rt),U&&yn(lt,"gesturestart",st),R&&yn(lt,"gestureend",mt),B&&yn(a,ns+"enter",Mt),J&&yn(a,ns+"leave",F),O&&yn(a,ns+"move",ee)),W.isEnabled=!0,k&&k.type&&V(k),_t&&_t(W)),W},W.disable=function(){W.isEnabled&&(Xs.filter(function(k){return k!==W&&na(k.target)}).length||xn(pt?lt:a,"scroll",Vu),W.isPressed&&(W._vx.reset(),W._vy.reset(),xn(H?a:lt,oi[1],Zt,!0)),xn(pt?lt:a,"scroll",gt,xt),xn(a,"wheel",Bt,xt),xn(a,oi[0],V,xt),xn(lt,oi[2],Q),xn(lt,oi[3],Q),xn(a,"click",Yt,!0),xn(a,"click",rt),xn(lt,"gesturestart",st),xn(lt,"gestureend",mt),xn(a,ns+"enter",Mt),xn(a,ns+"leave",F),xn(a,ns+"move",ee),W.isEnabled=W.isPressed=W.isDragging=!1,Ut&&Ut(W))},W.kill=W.revert=function(){W.disable();var k=Xs.indexOf(W);k>=0&&Xs.splice(k,1),zi===W&&(zi=0)},Xs.push(W),H&&na(a)&&(zi=W),W.enable(g)},bx(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Fe.version="3.12.5";Fe.create=function(r){return new Fe(r)};Fe.register=_p;Fe.getAll=function(){return Xs.slice()};Fe.getById=function(r){return Xs.filter(function(t){return t.vars.id===r})[0]};pp()&&en.registerPlugin(Fe);var Ot,Js,de,Pe,li,Ee,Np,El,ma,ca,ra,ul,un,Cl,Ju,Mn,xp,yp,$s,Up,Hu,Op,Sn,$u,Bp,kp,xr,Ku,nh,Ks,ih,Tl,ju,Gu,hl=1,hn=Date.now,Wu=hn(),$n=0,sa=0,vp=function(t,e,n){var i=kn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},Sp=function(t,e){return e&&(!kn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},Tx=function r(){return sa&&requestAnimationFrame(r)},Mp=function(){return Cl=1},bp=function(){return Cl=0},Ai=function(t){return t},oa=function(t){return Math.round(t*1e5)/1e5||0},zp=function(){return typeof window<"u"},Vp=function(){return Ot||zp()&&(Ot=window.gsap)&&Ot.registerPlugin&&Ot},ls=function(t){return!!~Np.indexOf(t)},Hp=function(t){return(t==="Height"?ih:de["inner"+t])||li["client"+t]||Ee["client"+t]},Gp=function(t){return Hi(t,"getBoundingClientRect")||(ls(t)?function(){return wl.width=de.innerWidth,wl.height=ih,wl}:function(){return Gi(t)})},Ax=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=Hi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?Hp(s):t["client"+s])||0}},Dx=function(t,e){return!e||~ai.indexOf(t)?Gp(t):function(){return wl}},Di=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=Hi(t,n))?o()-Gp(t)()[s]:ls(t)?(li[n]||Ee[n])-Hp(i):t[n]-t["offset"+i])},fl=function(t,e){for(var n=0;n<$s.length;n+=3)(!e||~e.indexOf($s[n+1]))&&t($s[n],$s[n+1],$s[n+2])},kn=function(t){return typeof t=="string"},wn=function(t){return typeof t=="function"},aa=function(t){return typeof t=="number"},is=function(t){return typeof t=="object"},ia=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},Xu=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)}},qs=Math.abs,Wp="left",Xp="top",rh="right",sh="bottom",ss="width",os="height",ua="Right",ha="Left",fa="Top",da="Bottom",ze="padding",Zn="margin",Qs="Width",oh="Height",We="px",Jn=function(t){return de.getComputedStyle(t)},Cx=function(t){var e=Jn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},wp=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Gi=function(t,e){var n=e&&Jn(t)[Ju]!=="matrix(1, 0, 0, 1, 0, 0)"&&Ot.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},Al=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},Yp=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},Rx=function(t){return function(e){return Ot.utils.snap(Yp(t),e)}},ah=function(t){var e=Ot.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)}},Px=function(t){return function(e,n){return ah(Yp(t))(e,n.direction)}},dl=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},$e=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},Je=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},pl=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},Ep={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ml={toggleActions:"play",anticipatePin:0},Dl={top:0,left:0,center:.5,bottom:1,right:1},vl=function(t,e){if(kn(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 Dl?Dl[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},gl=function(t,e,n,i,s,o,a,l){var c=s.startColor,h=s.endColor,d=s.fontSize,f=s.indent,u=s.fontWeight,_=Pe.createElement("div"),g=ls(n)||Hi(n,"pinType")==="fixed",p=t.indexOf("scroller")!==-1,m=g?Ee:n,b=t.indexOf("start")!==-1,S=b?c:h,v="border-color:"+S+";font-size:"+d+";color:"+S+";font-weight:"+u+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return v+="position:"+((p||l)&&g?"fixed;":"absolute;"),(p||l||!g)&&(v+=(i===ke?rh:sh)+":"+(o+parseFloat(f))+"px;"),a&&(v+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=b,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=v,_.innerText=e||e===0?t+"-"+e:t,m.children[0]?m.insertBefore(_,m.children[0]):m.appendChild(_),_._offset=_["offset"+i.op.d2],Sl(_,0,i,b),_},Sl=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+Qs]=1,s["border"+a+Qs]=0,s[n.p]=e+"px",Ot.set(t,s)},ce=[],Qu={},ga,Tp=function(){return hn()-$n>34&&(ga||(ga=requestAnimationFrame(Wi)))},Zs=function(){(!Sn||!Sn.isPressed||Sn.startX>Ee.clientWidth)&&(le.cache++,Sn?ga||(ga=requestAnimationFrame(Wi)):Wi(),$n||us("scrollStart"),$n=hn())},Yu=function(){kp=de.innerWidth,Bp=de.innerHeight},la=function(){le.cache++,!un&&!Op&&!Pe.fullscreenElement&&!Pe.webkitFullscreenElement&&(!$u||kp!==de.innerWidth||Math.abs(de.innerHeight-Bp)>de.innerHeight*.25)&&El.restart(!0)},cs={},Ix=[],qp=function r(){return Je(ne,"scrollEnd",r)||rs(!0)},us=function(t){return cs[t]&&cs[t].map(function(e){return e()})||Ix},Bn=[],Zp=function(t){for(var e=0;e<Bn.length;e+=5)(!t||Bn[e+4]&&Bn[e+4].query===t)&&(Bn[e].style.cssText=Bn[e+1],Bn[e].getBBox&&Bn[e].setAttribute("transform",Bn[e+2]||""),Bn[e+3].uncache=1)},lh=function(t,e){var n;for(Mn=0;Mn<ce.length;Mn++)n=ce[Mn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Tl=!0,e&&Zp(e),e||us("revert")},Jp=function(t,e){le.cache++,(e||!bn)&&le.forEach(function(n){return wn(n)&&n.cacheID++&&(n.rec=0)}),kn(t)&&(de.history.scrollRestoration=nh=t)},bn,as=0,Ap,Lx=function(){if(Ap!==as){var t=Ap=as;requestAnimationFrame(function(){return t===as&&rs(!0)})}},$p=function(){Ee.appendChild(Ks),ih=!Sn&&Ks.offsetHeight||de.innerHeight,Ee.removeChild(Ks)},Dp=function(t){return ma(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},rs=function(t,e){if($n&&!t&&!Tl){$e(ne,"scrollEnd",qp);return}$p(),bn=ne.isRefreshing=!0,le.forEach(function(i){return wn(i)&&++i.cacheID&&(i.rec=i())});var n=us("refreshInit");Up&&ne.sort(),e||lh(),le.forEach(function(i){wn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),ce.slice(0).forEach(function(i){return i.refresh()}),Tl=!1,ce.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()}}),ju=1,Dp(!0),ce.forEach(function(i){var s=Di(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)}),Dp(!1),ju=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),le.forEach(function(i){wn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Jp(nh,1),El.pause(),as++,bn=2,Wi(2),ce.forEach(function(i){return wn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),bn=ne.isRefreshing=!1,us("refresh")},th=0,Ml=1,pa,Wi=function(t){if(t===2||!bn&&!Tl){ne.isUpdating=!0,pa&&pa.update(0);var e=ce.length,n=hn(),i=n-Wu>=50,s=e&&ce[0].scroll();if(Ml=th>s?-1:1,bn||(th=s),i&&($n&&!Cl&&n-$n>200&&($n=0,us("scrollEnd")),ra=Wu,Wu=n),Ml<0){for(Mn=e;Mn-- >0;)ce[Mn]&&ce[Mn].update(0,i);Ml=1}else for(Mn=0;Mn<e;Mn++)ce[Mn]&&ce[Mn].update(0,i);ne.isUpdating=!1}ga=0},eh=[Wp,Xp,sh,rh,Zn+da,Zn+ua,Zn+fa,Zn+ha,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],bl=eh.concat([ss,os,"boxSizing","max"+Qs,"max"+oh,"position",Zn,ze,ze+fa,ze+ua,ze+da,ze+ha]),Fx=function(t,e,n){js(n);var i=t._gsap;if(i.spacerIsNative)js(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},qu=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=eh.length,o=e.style,a=t.style,l;s--;)l=eh[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[sh]=a[rh]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[ss]=Al(t,cn)+We,o[os]=Al(t,ke)+We,o[ze]=a[Zn]=a[Xp]=a[Wp]="0",js(i),a[ss]=a["max"+Qs]=n[ss],a[os]=a["max"+oh]=n[os],a[ze]=n[ze],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Nx=/([A-Z])/g,js=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||Ot.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(Nx,"-$1").toLowerCase())}},_l=function(t){for(var e=bl.length,n=t.style,i=[],s=0;s<e;s++)i.push(bl[s],n[bl[s]]);return i.t=t,i},Ux=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},wl={left:0,top:0},Cp=function(t,e,n,i,s,o,a,l,c,h,d,f,u,_){wn(t)&&(t=t(l)),kn(t)&&t.substr(0,3)==="max"&&(t=f+(t.charAt(4)==="="?vl("0"+t.substr(3),n):0));var g=u?u.time():0,p,m,b;if(u&&u.seek(0),isNaN(t)||(t=+t),aa(t))u&&(t=Ot.utils.mapRange(u.scrollTrigger.start,u.scrollTrigger.end,0,f,t)),a&&Sl(a,n,i,!0);else{wn(e)&&(e=e(l));var S=(t||"0").split(" "),v,D,T,w;b=vn(e,l)||Ee,v=Gi(b)||{},(!v||!v.left&&!v.top)&&Jn(b).display==="none"&&(w=b.style.display,b.style.display="block",v=Gi(b),w?b.style.display=w:b.style.removeProperty("display")),D=vl(S[0],v[i.d]),T=vl(S[1]||"0",n),t=v[i.p]-c[i.p]-h+D+s-T,a&&Sl(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var I=t+n,M=o._isStart;p="scroll"+i.d2,Sl(o,I,i,M&&I>20||!M&&(d?Math.max(Ee[p],li[p]):o.parentNode[p])<=I+1),d&&(c=Gi(a),d&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+We))}return u&&b&&(p=Gi(b),u.seek(f),m=Gi(b),u._caScrollDist=p[i.p]-m[i.p],t=t/u._caScrollDist*f),u&&u.seek(g),u?t:Math.round(t)},Ox=/(webkit|moz|length|cssText|inset)/i,Rp=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===Ee){t._stOrig=s.cssText,a=Jn(t);for(o in a)!+o&&!Ox.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;Ot.core.getCache(t).uncache=1,e.appendChild(t)}},Kp=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}},xl=function(t,e,n){var i={};i[e.p]="+="+n,Ot.set(t,i)},Pp=function(t,e){var n=Vi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,h,d){var f=o.tween,u=l.onComplete,_={};c=c||n();var g=Kp(n,c,function(){f.kill(),o.tween=0});return d=h&&d||0,h=h||a-c,f&&f.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return g(c+h*f.ratio+d*f.ratio*f.ratio)},l.onUpdate=function(){le.cache++,o.tween&&Wi()},l.onComplete=function(){o.tween=0,u&&u.call(f)},f=o.tween=Ot.to(t,l),f};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},$e(t,"wheel",n.wheelHandler),ne.isTouch&&$e(t,"touchmove",n.wheelHandler),s},ne=function(){function r(e,n){Js||r.register(Ot)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Ku(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),!sa){this.update=this.refresh=this.kill=Ai;return}n=wp(kn(n)||aa(n)||n.nodeType?{trigger:n}:n,ml);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,h=s.onRefresh,d=s.scrub,f=s.trigger,u=s.pin,_=s.pinSpacing,g=s.invalidateOnRefresh,p=s.anticipatePin,m=s.onScrubComplete,b=s.onSnapComplete,S=s.once,v=s.snap,D=s.pinReparent,T=s.pinSpacer,w=s.containerAnimation,I=s.fastScrollEnd,M=s.preventOverlaps,y=n.horizontal||n.containerAnimation&&n.horizontal!==!1?cn:ke,P=!d&&d!==0,L=vn(n.scroller||de),C=Ot.core.getCache(L),B=ls(L),J=("pinType"in n?n.pinType:Hi(L,"pinType")||B&&"fixed")==="fixed",O=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],Y=P&&n.toggleActions.split(" "),H="markers"in n?n.markers:ml.markers,U=B?0:parseFloat(Jn(L)["border"+y.p2+Qs])||0,R=this,at=n.onRefreshInit&&function(){return n.onRefreshInit(R)},_t=Ax(L,B,y),Ut=Dx(L,B),X=0,ot=0,xt=0,ct=Vi(L,y),Rt,kt,Z,Jt,It,Ft,bt,Et,Ht,W,$t,A,x,N,q,tt,it,vt,pt,lt,Lt,ht,yt,Yt,ut,Tt,Wt,qt,ue,Zt,V,Q,st,mt,gt,Bt,ee,Mt,F;if(R._startClamp=R._endClamp=!1,R._dir=y,p*=45,R.scroller=L,R.scroll=w?w.time.bind(w):ct,Jt=ct(),R.vars=n,i=i||n.animation,"refreshPriority"in n&&(Up=1,n.refreshPriority===-9999&&(pa=R)),C.tweenScroll=C.tweenScroll||{top:Pp(L,ke),left:Pp(L,cn)},R.tweenTo=Rt=C.tweenScroll[y.p],R.scrubDuration=function(et){st=aa(et)&&et,st?Q?Q.duration(et):Q=Ot.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:st,paused:!0,onComplete:function(){return m&&m(R)}}):(Q&&Q.progress(1).kill(),Q=0)},i&&(i.vars.lazy=!1,i._initted&&!R.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),R.animation=i.pause(),i.scrollTrigger=R,R.scrubDuration(d),Zt=0,l||(l=i.vars.id)),v&&((!is(v)||v.push)&&(v={snapTo:v}),"scrollBehavior"in Ee.style&&Ot.set(B?[Ee,li]:L,{scrollBehavior:"auto"}),le.forEach(function(et){return wn(et)&&et.target===(B?Pe.scrollingElement||li:L)&&(et.smooth=!1)}),Z=wn(v.snapTo)?v.snapTo:v.snapTo==="labels"?Rx(i):v.snapTo==="labelsDirectional"?Px(i):v.directional!==!1?function(et,wt){return ah(v.snapTo)(et,hn()-ot<500?0:wt.direction)}:Ot.utils.snap(v.snapTo),mt=v.duration||{min:.1,max:2},mt=is(mt)?ca(mt.min,mt.max):ca(mt,mt),gt=Ot.delayedCall(v.delay||st/2||.1,function(){var et=ct(),wt=hn()-ot<500,ft=Rt.tween;if((wt||Math.abs(R.getVelocity())<10)&&!ft&&!Cl&&X!==et){var Dt=(et-Ft)/N,zt=i&&!P?i.totalProgress():Dt,Nt=wt?0:(zt-V)/(hn()-ra)*1e3||0,te=Ot.utils.clamp(-Dt,1-Dt,qs(Nt/2)*Nt/.185),he=Dt+(v.inertia===!1?0:te),me,ae,E=v,z=E.onStart,G=E.onInterrupt,K=E.onComplete;if(me=Z(he,R),aa(me)||(me=he),ae=Math.round(Ft+me*N),et<=bt&&et>=Ft&&ae!==et){if(ft&&!ft._initted&&ft.data<=qs(ae-et))return;v.inertia===!1&&(te=me-Dt),Rt(ae,{duration:mt(qs(Math.max(qs(he-zt),qs(me-zt))*.185/Nt/.05||0)),ease:v.ease||"power3",data:qs(ae-et),onInterrupt:function(){return gt.restart(!0)&&G&&G(R)},onComplete:function(){R.update(),X=ct(),i&&(Q?Q.resetTo("totalProgress",me,i._tTime/i._tDur):i.progress(me)),Zt=V=i&&!P?i.totalProgress():R.progress,b&&b(R),K&&K(R)}},et,te*N,ae-et-te*N),z&&z(R,Rt.tween)}}else R.isActive&&X!==et&>.restart(!0)}).pause()),l&&(Qu[l]=R),f=R.trigger=vn(f||u!==!0&&u),F=f&&f._gsap&&f._gsap.stRevert,F&&(F=F(R)),u=u===!0?f:vn(u),kn(a)&&(a={targets:f,className:a}),u&&(_===!1||_===Zn||(_=!_&&u.parentNode&&u.parentNode.style&&Jn(u.parentNode).display==="flex"?!1:ze),R.pin=u,kt=Ot.core.getCache(u),kt.spacer?q=kt.pinState:(T&&(T=vn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),kt.spacerIsNative=!!T,T&&(kt.spacerState=_l(T))),kt.spacer=vt=T||Pe.createElement("div"),vt.classList.add("pin-spacer"),l&&vt.classList.add("pin-spacer-"+l),kt.pinState=q=_l(u)),n.force3D!==!1&&Ot.set(u,{force3D:!0}),R.spacer=vt=kt.spacer,ue=Jn(u),Yt=ue[_+y.os2],lt=Ot.getProperty(u),Lt=Ot.quickSetter(u,y.a,We),qu(u,vt,ue),it=_l(u)),H){A=is(H)?wp(H,Ep):Ep,W=gl("scroller-start",l,L,y,A,0),$t=gl("scroller-end",l,L,y,A,0,W),pt=W["offset"+y.op.d2];var rt=vn(Hi(L,"content")||L);Et=this.markerStart=gl("start",l,rt,y,A,pt,0,w),Ht=this.markerEnd=gl("end",l,rt,y,A,pt,0,w),w&&(Mt=Ot.quickSetter([Et,Ht],y.a,We)),!J&&!(ai.length&&Hi(L,"fixedMarkers")===!0)&&(Cx(B?Ee:L),Ot.set([W,$t],{force3D:!0}),Tt=Ot.quickSetter(W,y.a,We),qt=Ot.quickSetter($t,y.a,We))}if(w){var k=w.vars.onUpdate,j=w.vars.onUpdateParams;w.eventCallback("onUpdate",function(){R.update(0,0,1),k&&k.apply(w,j||[])})}if(R.previous=function(){return ce[ce.indexOf(R)-1]},R.next=function(){return ce[ce.indexOf(R)+1]},R.revert=function(et,wt){if(!wt)return R.kill(!0);var ft=et!==!1||!R.enabled,Dt=un;ft!==R.isReverted&&(ft&&(Bt=Math.max(ct(),R.scroll.rec||0),xt=R.progress,ee=i&&i.progress()),Et&&[Et,Ht,W,$t].forEach(function(zt){return zt.style.display=ft?"none":"block"}),ft&&(un=R,R.update(ft)),u&&(!D||!R.isActive)&&(ft?Fx(u,vt,q):qu(u,vt,Jn(u),ut)),ft||R.update(ft),un=Dt,R.isReverted=ft)},R.refresh=function(et,wt,ft,Dt){if(!((un||!R.enabled)&&!wt)){if(u&&et&&$n){$e(r,"scrollEnd",qp);return}!bn&&at&&at(R),un=R,Rt.tween&&!ft&&(Rt.tween.kill(),Rt.tween=0),Q&&Q.pause(),g&&i&&i.revert({kill:!1}).invalidate(),R.isReverted||R.revert(!0,!0),R._subPinOffset=!1;var zt=_t(),Nt=Ut(),te=w?w.duration():Di(L,y),he=N<=.01,me=0,ae=Dt||0,E=is(ft)?ft.end:n.end,z=n.endTrigger||f,G=is(ft)?ft.start:n.start||(n.start===0||!f?0:u?"0 0":"0 100%"),K=R.pinnedContainer=n.pinnedContainer&&vn(n.pinnedContainer,R),$=f&&Math.max(0,ce.indexOf(R))||0,St=$,At,Pt,Xt,Qt,Gt,Vt,xe,Be,rn,mn,ie,jt,Si;for(H&&is(ft)&&(jt=Ot.getProperty(W,y.p),Si=Ot.getProperty($t,y.p));St--;)Vt=ce[St],Vt.end||Vt.refresh(0,1)||(un=R),xe=Vt.pin,xe&&(xe===f||xe===u||xe===K)&&!Vt.isReverted&&(mn||(mn=[]),mn.unshift(Vt),Vt.revert(!0,!0)),Vt!==ce[St]&&($--,St--);for(wn(G)&&(G=G(R)),G=vp(G,"start",R),Ft=Cp(G,f,zt,y,ct(),Et,W,R,Nt,U,J,te,w,R._startClamp&&"_startClamp")||(u?-.001:0),wn(E)&&(E=E(R)),kn(E)&&!E.indexOf("+=")&&(~E.indexOf(" ")?E=(kn(G)?G.split(" ")[0]:"")+E:(me=vl(E.substr(2),zt),E=kn(G)?G:(w?Ot.utils.mapRange(0,w.duration(),w.scrollTrigger.start,w.scrollTrigger.end,Ft):Ft)+me,z=f)),E=vp(E,"end",R),bt=Math.max(Ft,Cp(E||(z?"100% 0":te),z,zt,y,ct()+me,Ht,$t,R,Nt,U,J,te,w,R._endClamp&&"_endClamp"))||-.001,me=0,St=$;St--;)Vt=ce[St],xe=Vt.pin,xe&&Vt.start-Vt._pinPush<=Ft&&!w&&Vt.end>0&&(At=Vt.end-(R._startClamp?Math.max(0,Vt.start):Vt.start),(xe===f&&Vt.start-Vt._pinPush<Ft||xe===K)&&isNaN(G)&&(me+=At*(1-Vt.progress)),xe===u&&(ae+=At));if(Ft+=me,bt+=me,R._startClamp&&(R._startClamp+=me),R._endClamp&&!bn&&(R._endClamp=bt||-.001,bt=Math.min(bt,Di(L,y))),N=bt-Ft||(Ft-=.01)&&.001,he&&(xt=Ot.utils.clamp(0,1,Ot.utils.normalize(Ft,bt,Bt))),R._pinPush=ae,Et&&me&&(At={},At[y.a]="+="+me,K&&(At[y.p]="-="+ct()),Ot.set([Et,Ht],At)),u&&!(ju&&R.end>=Di(L,y)))At=Jn(u),Qt=y===ke,Xt=ct(),ht=parseFloat(lt(y.a))+ae,!te&&bt>1&&(ie=(B?Pe.scrollingElement||li:L).style,ie={style:ie,value:ie["overflow"+y.a.toUpperCase()]},B&&Jn(Ee)["overflow"+y.a.toUpperCase()]!=="scroll"&&(ie.style["overflow"+y.a.toUpperCase()]="scroll")),qu(u,vt,At),it=_l(u),Pt=Gi(u,!0),Be=J&&Vi(L,Qt?cn:ke)(),_?(ut=[_+y.os2,N+ae+We],ut.t=vt,St=_===ze?Al(u,y)+N+ae:0,St&&(ut.push(y.d,St+We),vt.style.flexBasis!=="auto"&&(vt.style.flexBasis=St+We)),js(ut),K&&ce.forEach(function(ve){ve.pin===K&&ve.vars.pinSpacing!==!1&&(ve._subPinOffset=!0)}),J&&ct(Bt)):(St=Al(u,y),St&&vt.style.flexBasis!=="auto"&&(vt.style.flexBasis=St+We)),J&&(Gt={top:Pt.top+(Qt?Xt-Ft:Be)+We,left:Pt.left+(Qt?Be:Xt-Ft)+We,boxSizing:"border-box",position:"fixed"},Gt[ss]=Gt["max"+Qs]=Math.ceil(Pt.width)+We,Gt[os]=Gt["max"+oh]=Math.ceil(Pt.height)+We,Gt[Zn]=Gt[Zn+fa]=Gt[Zn+ua]=Gt[Zn+da]=Gt[Zn+ha]="0",Gt[ze]=At[ze],Gt[ze+fa]=At[ze+fa],Gt[ze+ua]=At[ze+ua],Gt[ze+da]=At[ze+da],Gt[ze+ha]=At[ze+ha],tt=Ux(q,Gt,D),bn&&ct(0)),i?(rn=i._initted,Hu(1),i.render(i.duration(),!0,!0),yt=lt(y.a)-ht+N+ae,Wt=Math.abs(N-yt)>1,J&&Wt&&tt.splice(tt.length-2,2),i.render(0,!0,!0),rn||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),Hu(0)):yt=N,ie&&(ie.value?ie.style["overflow"+y.a.toUpperCase()]=ie.value:ie.style.removeProperty("overflow-"+y.a));else if(f&&ct()&&!w)for(Pt=f.parentNode;Pt&&Pt!==Ee;)Pt._pinOffset&&(Ft-=Pt._pinOffset,bt-=Pt._pinOffset),Pt=Pt.parentNode;mn&&mn.forEach(function(ve){return ve.revert(!1,!0)}),R.start=Ft,R.end=bt,Jt=It=bn?Bt:ct(),!w&&!bn&&(Jt<Bt&&ct(Bt),R.scroll.rec=0),R.revert(!1,!0),ot=hn(),gt&&(X=-1,gt.restart(!0)),un=0,i&&P&&(i._initted||ee)&&i.progress()!==ee&&i.progress(ee||0,!0).render(i.time(),!0,!0),(he||xt!==R.progress||w||g)&&(i&&!P&&i.totalProgress(w&&Ft<-.001&&!xt?Ot.utils.normalize(Ft,bt,0):xt,!0),R.progress=he||(Jt-Ft)/N===xt?0:xt),u&&_&&(vt._pinOffset=Math.round(R.progress*yt)),Q&&Q.invalidate(),isNaN(jt)||(jt-=Ot.getProperty(W,y.p),Si-=Ot.getProperty($t,y.p),xl(W,y,jt),xl(Et,y,jt-(Dt||0)),xl($t,y,Si),xl(Ht,y,Si-(Dt||0))),he&&!bn&&R.update(),h&&!bn&&!x&&(x=!0,h(R),x=!1)}},R.getVelocity=function(){return(ct()-It)/(hn()-ra)*1e3||0},R.endAnimation=function(){ia(R.callbackAnimation),i&&(Q?Q.progress(1):i.paused()?P||ia(i,R.direction<0,1):ia(i,i.reversed()))},R.labelToScroll=function(et){return i&&i.labels&&(Ft||R.refresh()||Ft)+i.labels[et]/i.duration()*N||0},R.getTrailing=function(et){var wt=ce.indexOf(R),ft=R.direction>0?ce.slice(0,wt).reverse():ce.slice(wt+1);return(kn(et)?ft.filter(function(Dt){return Dt.vars.preventOverlaps===et}):ft).filter(function(Dt){return R.direction>0?Dt.end<=Ft:Dt.start>=bt})},R.update=function(et,wt,ft){if(!(w&&!ft&&!et)){var Dt=bn===!0?Bt:R.scroll(),zt=et?0:(Dt-Ft)/N,Nt=zt<0?0:zt>1?1:zt||0,te=R.progress,he,me,ae,E,z,G,K,$;if(wt&&(It=Jt,Jt=w?ct():Dt,v&&(V=Zt,Zt=i&&!P?i.totalProgress():Nt)),p&&u&&!un&&!hl&&$n&&(!Nt&&Ft<Dt+(Dt-It)/(hn()-ra)*p?Nt=1e-4:Nt===1&&bt>Dt+(Dt-It)/(hn()-ra)*p&&(Nt=.9999)),Nt!==te&&R.enabled){if(he=R.isActive=!!Nt&&Nt<1,me=!!te&&te<1,G=he!==me,z=G||!!Nt!=!!te,R.direction=Nt>te?1:-1,R.progress=Nt,z&&!un&&(ae=Nt&&!te?0:Nt===1?1:te===1?2:3,P&&(E=!G&&Y[ae+1]!=="none"&&Y[ae+1]||Y[ae],$=i&&(E==="complete"||E==="reset"||E in i))),M&&(G||$)&&($||d||!i)&&(wn(M)?M(R):R.getTrailing(M).forEach(function(Xt){return Xt.endAnimation()})),P||(Q&&!un&&!hl?(Q._dp._time-Q._start!==Q._time&&Q.render(Q._dp._time-Q._start),Q.resetTo?Q.resetTo("totalProgress",Nt,i._tTime/i._tDur):(Q.vars.totalProgress=Nt,Q.invalidate().restart())):i&&i.totalProgress(Nt,!!(un&&(ot||et)))),u){if(et&&_&&(vt.style[_+y.os2]=Yt),!J)Lt(oa(ht+yt*Nt));else if(z){if(K=!et&&Nt>te&&bt+1>Dt&&Dt+1>=Di(L,y),D)if(!et&&(he||K)){var St=Gi(u,!0),At=Dt-Ft;Rp(u,Ee,St.top+(y===ke?At:0)+We,St.left+(y===ke?0:At)+We)}else Rp(u,vt);js(he||K?tt:it),Wt&&Nt<1&&he||Lt(ht+(Nt===1&&!K?yt:0))}}v&&!Rt.tween&&!un&&!hl&>.restart(!0),a&&(G||S&&Nt&&(Nt<1||!Gu))&&ma(a.targets).forEach(function(Xt){return Xt.classList[he||S?"add":"remove"](a.className)}),o&&!P&&!et&&o(R),z&&!un?(P&&($&&(E==="complete"?i.pause().totalProgress(1):E==="reset"?i.restart(!0).pause():E==="restart"?i.restart(!0):i[E]()),o&&o(R)),(G||!Gu)&&(c&&G&&Xu(R,c),O[ae]&&Xu(R,O[ae]),S&&(Nt===1?R.kill(!1,1):O[ae]=0),G||(ae=Nt===1?1:3,O[ae]&&Xu(R,O[ae]))),I&&!he&&Math.abs(R.getVelocity())>(aa(I)?I:2500)&&(ia(R.callbackAnimation),Q?Q.progress(1):ia(i,E==="reverse"?1:!Nt,1))):P&&o&&!un&&o(R)}if(qt){var Pt=w?Dt/w.duration()*(w._caScrollDist||0):Dt;Tt(Pt+(W._isFlipped?1:0)),qt(Pt)}Mt&&Mt(-Dt/w.duration()*(w._caScrollDist||0))}},R.enable=function(et,wt){R.enabled||(R.enabled=!0,$e(L,"resize",la),B||$e(L,"scroll",Zs),at&&$e(r,"refreshInit",at),et!==!1&&(R.progress=xt=0,Jt=It=X=ct()),wt!==!1&&R.refresh())},R.getTween=function(et){return et&&Rt?Rt.tween:Q},R.setPositions=function(et,wt,ft,Dt){if(w){var zt=w.scrollTrigger,Nt=w.duration(),te=zt.end-zt.start;et=zt.start+te*et/Nt,wt=zt.start+te*wt/Nt}R.refresh(!1,!1,{start:Sp(et,ft&&!!R._startClamp),end:Sp(wt,ft&&!!R._endClamp)},Dt),R.update()},R.adjustPinSpacing=function(et){if(ut&&et){var wt=ut.indexOf(y.d)+1;ut[wt]=parseFloat(ut[wt])+et+We,ut[1]=parseFloat(ut[1])+et+We,js(ut)}},R.disable=function(et,wt){if(R.enabled&&(et!==!1&&R.revert(!0,!0),R.enabled=R.isActive=!1,wt||Q&&Q.pause(),Bt=0,kt&&(kt.uncache=1),at&&Je(r,"refreshInit",at),gt&&(gt.pause(),Rt.tween&&Rt.tween.kill()&&(Rt.tween=0)),!B)){for(var ft=ce.length;ft--;)if(ce[ft].scroller===L&&ce[ft]!==R)return;Je(L,"resize",la),B||Je(L,"scroll",Zs)}},R.kill=function(et,wt){R.disable(et,wt),Q&&!wt&&Q.kill(),l&&delete Qu[l];var ft=ce.indexOf(R);ft>=0&&ce.splice(ft,1),ft===Mn&&Ml>0&&Mn--,ft=0,ce.forEach(function(Dt){return Dt.scroller===R.scroller&&(ft=1)}),ft||bn||(R.scroll.rec=0),i&&(i.scrollTrigger=null,et&&i.revert({kill:!1}),wt||i.kill()),Et&&[Et,Ht,W,$t].forEach(function(Dt){return Dt.parentNode&&Dt.parentNode.removeChild(Dt)}),pa===R&&(pa=0),u&&(kt&&(kt.uncache=1),ft=0,ce.forEach(function(Dt){return Dt.pin===u&&ft++}),ft||(kt.spacer=0)),n.onKill&&n.onKill(R)},ce.push(R),R.enable(!1,!1),F&&F(R),i&&i.add&&!N){var dt=R.update;R.update=function(){R.update=dt,Ft||bt||R.refresh()},Ot.delayedCall(.01,R.update),N=.01,Ft=bt=0}else R.refresh();u&&Lx()},r.register=function(n){return Js||(Ot=n||Vp(),zp()&&window.document&&r.enable(),Js=sa),Js},r.defaults=function(n){if(n)for(var i in n)ml[i]=n[i];return ml},r.disable=function(n,i){sa=0,ce.forEach(function(o){return o[i?"kill":"disable"](n)}),Je(de,"wheel",Zs),Je(Pe,"scroll",Zs),clearInterval(ul),Je(Pe,"touchcancel",Ai),Je(Ee,"touchstart",Ai),dl(Je,Pe,"pointerdown,touchstart,mousedown",Mp),dl(Je,Pe,"pointerup,touchend,mouseup",bp),El.kill(),fl(Je);for(var s=0;s<le.length;s+=3)pl(Je,le[s],le[s+1]),pl(Je,le[s],le[s+2])},r.enable=function(){if(de=window,Pe=document,li=Pe.documentElement,Ee=Pe.body,Ot&&(ma=Ot.utils.toArray,ca=Ot.utils.clamp,Ku=Ot.core.context||Ai,Hu=Ot.core.suppressOverwrites||Ai,nh=de.history.scrollRestoration||"auto",th=de.pageYOffset,Ot.core.globals("ScrollTrigger",r),Ee)){sa=1,Ks=document.createElement("div"),Ks.style.height="100vh",Ks.style.position="absolute",$p(),Tx(),Fe.register(Ot),r.isTouch=Fe.isTouch,xr=Fe.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),$u=Fe.isTouch===1,$e(de,"wheel",Zs),Np=[de,Pe,li,Ee],Ot.matchMedia?(r.matchMedia=function(l){var c=Ot.matchMedia(),h;for(h in l)c.add(h,l[h]);return c},Ot.addEventListener("matchMediaInit",function(){return lh()}),Ot.addEventListener("matchMediaRevert",function(){return Zp()}),Ot.addEventListener("matchMedia",function(){rs(0,1),us("matchMedia")}),Ot.matchMedia("(orientation: portrait)",function(){return Yu(),Yu})):console.warn("Requires GSAP 3.11.0 or later"),Yu(),$e(Pe,"scroll",Zs);var n=Ee.style,i=n.borderTopStyle,s=Ot.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=Gi(Ee),ke.m=Math.round(o.top+ke.sc())||0,cn.m=Math.round(o.left+cn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),ul=setInterval(Tp,250),Ot.delayedCall(.5,function(){return hl=0}),$e(Pe,"touchcancel",Ai),$e(Ee,"touchstart",Ai),dl($e,Pe,"pointerdown,touchstart,mousedown",Mp),dl($e,Pe,"pointerup,touchend,mouseup",bp),Ju=Ot.utils.checkPrefix("transform"),bl.push(Ju),Js=hn(),El=Ot.delayedCall(.2,rs).pause(),$s=[Pe,"visibilitychange",function(){var l=de.innerWidth,c=de.innerHeight;Pe.hidden?(xp=l,yp=c):(xp!==l||yp!==c)&&la()},Pe,"DOMContentLoaded",rs,de,"load",rs,de,"resize",la],fl($e),ce.forEach(function(l){return l.enable(0,1)}),a=0;a<le.length;a+=3)pl(Je,le[a],le[a+1]),pl(Je,le[a],le[a+2])}},r.config=function(n){"limitCallbacks"in n&&(Gu=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(ul)||(ul=i)&&setInterval(Tp,i),"ignoreMobileResize"in n&&($u=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(fl(Je)||fl($e,n.autoRefreshEvents||"none"),Op=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=vn(n),o=le.indexOf(s),a=ls(s);~o&&le.splice(o,a?6:2),i&&(a?ai.unshift(de,i,Ee,i,li,i):ai.unshift(s,i))},r.clearMatchMedia=function(n){ce.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(kn(n)?vn(n):n).getBoundingClientRect(),a=o[s?ss:os]*i||0;return s?o.right-a>0&&o.left+a<de.innerWidth:o.bottom-a>0&&o.top+a<de.innerHeight},r.positionInViewport=function(n,i,s){kn(n)&&(n=vn(n));var o=n.getBoundingClientRect(),a=o[s?ss:os],l=i==null?a/2:i in Dl?Dl[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/de.innerWidth:(o.top+l)/de.innerHeight},r.killAll=function(n){if(ce.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=cs.killAll||[];cs={},i.forEach(function(s){return s()})}},r}();ne.version="3.12.5";ne.saveStyles=function(r){return r?ma(r).forEach(function(t){if(t&&t.style){var e=Bn.indexOf(t);e>=0&&Bn.splice(e,5),Bn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Ot.core.getCache(t),Ku())}}):Bn};ne.revert=function(r,t){return lh(!r,t)};ne.create=function(r,t){return new ne(r,t)};ne.refresh=function(r){return r?la():(Js||ne.register())&&rs(!0)};ne.update=function(r){return++le.cache&&Wi(r===!0?2:0)};ne.clearScrollMemory=Jp;ne.maxScroll=function(r,t){return Di(r,t?cn:ke)};ne.getScrollFunc=function(r,t){return Vi(vn(r),t?cn:ke)};ne.getById=function(r){return Qu[r]};ne.getAll=function(){return ce.filter(function(r){return r.vars.id!=="ScrollSmoother"})};ne.isScrolling=function(){return!!$n};ne.snapDirectional=ah;ne.addEventListener=function(r,t){var e=cs[r]||(cs[r]=[]);~e.indexOf(t)||e.push(t)};ne.removeEventListener=function(r,t){var e=cs[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};ne.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,h){var d=[],f=[],u=Ot.delayedCall(i,function(){h(d,f),d=[],f=[]}).pause();return function(_){d.length||u.restart(!0),d.push(_.trigger),f.push(_),s<=d.length&&u.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&wn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return wn(s)&&(s=s(),$e(ne,"refresh",function(){return s=t.batchMax()})),ma(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(ne.create(c))}),e};var Ip=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},Zu=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Fe.isTouch?" pinch-zoom":""):"none",t===li&&r(Ee,e)},yl={auto:1,scroll:1},Bx=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||Ot.core.getCache(s),a=hn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==Ee&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(yl[(l=Jn(s)).overflowY]||yl[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!ls(s)&&(yl[(l=Jn(s)).overflowY]||yl[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},jp=function(t,e,n,i){return Fe.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&Bx,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&$e(Pe,Fe.eventTypes[0],Fp,!1,!0)},onDisable:function(){return Je(Pe,Fe.eventTypes[0],Fp,!0)}})},kx=/(input|label|select|textarea)/i,Lp,Fp=function(t){var e=kx.test(t.target.tagName);(e||Lp)&&(t._gsapAllow=!0,Lp=e)},zx=function(t){is(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=vn(t.target)||li,h=Ot.core.globals().ScrollSmoother,d=h&&h.get(),f=xr&&(t.content&&vn(t.content)||d&&t.content!==!1&&!d.smooth()&&d.content()),u=Vi(c,ke),_=Vi(c,cn),g=1,p=(Fe.isTouch&&de.visualViewport?de.visualViewport.scale*de.visualViewport.width:de.outerWidth)/de.innerWidth,m=0,b=wn(i)?function(){return i(a)}:function(){return i||2.8},S,v,D=jp(c,t.type,!0,s),T=function(){return v=!1},w=Ai,I=Ai,M=function(){l=Di(c,ke),I=ca(xr?1:0,l),n&&(w=ca(0,Di(c,cn))),S=as},y=function(){f._gsap.y=oa(parseFloat(f._gsap.y)+u.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)",u.offset=u.cacheID=0},P=function(){if(v){requestAnimationFrame(T);var H=oa(a.deltaY/2),U=I(u.v-H);if(f&&U!==u.v+u.offset){u.offset=U-u.v;var R=oa((parseFloat(f&&f._gsap.y)||0)-u.offset);f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+R+", 0, 1)",f._gsap.y=R+"px",u.cacheID=le.cache,Wi()}return!0}u.offset&&y(),v=!0},L,C,B,J,O=function(){M(),L.isActive()&&L.vars.scrollY>l&&(u()>l?L.progress(1)&&u(l):L.resetTo("scrollY",l))};return f&&Ot.set(f,{y:"+=0"}),t.ignoreCheck=function(Y){return xr&&Y.type==="touchmove"&&P(Y)||g>1.05&&Y.type!=="touchstart"||a.isGesturing||Y.touches&&Y.touches.length>1},t.onPress=function(){v=!1;var Y=g;g=oa((de.visualViewport&&de.visualViewport.scale||1)/p),L.pause(),Y!==g&&Zu(c,g>1.01?!0:n?!1:"x"),C=_(),B=u(),M(),S=as},t.onRelease=t.onGestureStart=function(Y,H){if(u.offset&&y(),!H)J.restart(!0);else{le.cache++;var U=b(),R,at;n&&(R=_(),at=R+U*.05*-Y.velocityX/.227,U*=Ip(_,R,at,Di(c,cn)),L.vars.scrollX=w(at)),R=u(),at=R+U*.05*-Y.velocityY/.227,U*=Ip(u,R,at,Di(c,ke)),L.vars.scrollY=I(at),L.invalidate().duration(U).play(.01),(xr&&L.vars.scrollY>=l||R>=l-1)&&Ot.to({},{onUpdate:O,duration:U})}o&&o(Y)},t.onWheel=function(){L._ts&&L.pause(),hn()-m>1e3&&(S=0,m=hn())},t.onChange=function(Y,H,U,R,at){if(as!==S&&M(),H&&n&&_(w(R[2]===H?C+(Y.startX-Y.x):_()+H-R[1])),U){u.offset&&y();var _t=at[2]===U,Ut=_t?B+Y.startY-Y.y:u()+U-at[1],X=I(Ut);_t&&Ut!==X&&(B+=X-Ut),u(X)}(U||H)&&Wi()},t.onEnable=function(){Zu(c,n?!1:"x"),ne.addEventListener("refresh",O),$e(de,"resize",O),u.smooth&&(u.target.style.scrollBehavior="auto",u.smooth=_.smooth=!1),D.enable()},t.onDisable=function(){Zu(c,!0),Je(de,"resize",O),ne.removeEventListener("refresh",O),D.kill()},t.lockAxis=t.lockAxis!==!1,a=new Fe(t),a.iOS=xr,xr&&!u()&&u(1),xr&&Ot.ticker.add(Ai),J=a._dc,L=Ot.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Kp(u,u(),function(){return L.pause()})},onUpdate:Wi,onComplete:J.vars.onComplete}),a};ne.sort=function(r){return ce.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};ne.observe=function(r){return new Fe(r)};ne.normalizeScroll=function(r){if(typeof r>"u")return Sn;if(r===!0&&Sn)return Sn.enable();if(r===!1){Sn&&Sn.kill(),Sn=r;return}var t=r instanceof Fe?r:zx(r);return Sn&&Sn.target===t.target&&Sn.kill(),ls(t.target)&&(Sn=t),t};ne.core={_getVelocityProp:cl,_inputObserver:jp,_scrollers:le,_proxies:ai,bridge:{ss:function(){$n||us("scrollStart"),$n=hn()},ref:function(){return un}}};Vp()&&Ot.registerPlugin(ne);var Vx=/(?:^\s+|\s+$)/g,ch=/([\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 to(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+=to(r)}else if(t===3||t===4)return r.nodeValue;return e}function ci(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(Vx,"")),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(ch)||[])[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 eo,hh,em,_a,nm,Rl,Hx=/(?:\r|\n|\t\t)/g,Gx=/(?:\s\s+)/g,Wx="\xA0",im=function(t){eo=document,hh=window,_a=_a||t||hh.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),_a&&(Rl=_a.utils.toArray,nm=_a.core.context||function(){},em=1)},Xx=1,rm=function(t){return hh.getComputedStyle(t)},fh=function(t){return t.position==="absolute"||t.absolute===!0},Yx=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},qx=" style='position:relative;display:inline-block;'",Qp=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+qx+(t?" class='"+t+(n?i++:"")+"'>":">")}},sm=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))},uh=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},tm=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}},Zx=function r(t){var e=Rl(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))},Ci=function(t,e){return parseFloat(e[t])||0},Jx=function(t,e,n,i,s,o,a){var l=rm(t),c=Ci("paddingLeft",l),h=-999,d=Ci("borderBottomWidth",l)+Ci("borderTopWidth",l),f=Ci("borderLeftWidth",l)+Ci("borderRightWidth",l),u=Ci("paddingTop",l)+Ci("paddingBottom",l),_=Ci("paddingLeft",l)+Ci("paddingRight",l),g=Ci("fontSize",l)*(e.lineThreshold||.2),p=l.textAlign,m=[],b=[],S=[],v=e.wordDelimiter||" ",D=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",w=s&&~T.indexOf("lines")?[]:null,I=~T.indexOf("words"),M=~T.indexOf("chars"),y=fh(e),P=e.linesClass,L=~(P||"").indexOf("++"),C=[],B=l.display==="flex",J=t.style.display,O,Y,H,U,R,at,_t,Ut,X,ot,xt,ct;for(L&&(P=P.split("++").join("")),B&&(t.style.display="block"),Y=t.getElementsByTagName("*"),H=Y.length,R=[],O=0;O<H;O++)R[O]=Y[O];if(w||y)for(O=0;O<H;O++)U=R[O],at=U.parentNode===t,(at||y||M&&!I)&&(ct=U.offsetTop,w&&at&&Math.abs(ct-h)>g&&(U.nodeName!=="BR"||O===0)&&(_t=[],w.push(_t),h=ct),y&&(U._x=U.offsetLeft,U._y=ct,U._w=U.offsetWidth,U._h=U.offsetHeight),w&&((U._isSplit&&at||!M&&at||I&&at||!I&&U.parentNode.parentNode===t&&!U.parentNode._isSplit)&&(_t.push(U),U._x-=c,tm(U,t,v)&&(U._wordEnd=!0)),U.nodeName==="BR"&&(U.nextSibling&&U.nextSibling.nodeName==="BR"||O===0)&&w.push([])));for(O=0;O<H;O++){if(U=R[O],at=U.parentNode===t,U.nodeName==="BR"){w||y?(U.parentNode&&U.parentNode.removeChild(U),R.splice(O--,1),H--):I||t.appendChild(U);continue}if(y&&(X=U.style,!I&&!at&&(U._x+=U.parentNode._x,U._y+=U.parentNode._y),X.left=U._x+"px",X.top=U._y+"px",X.position="absolute",X.display="block",X.width=U._w+1+"px",X.height=U._h+"px"),!I&&M)if(U._isSplit)for(U._next=Y=U.nextSibling,U.parentNode.appendChild(U);Y&&Y.nodeType===3&&Y.textContent===" ";)U._next=Y.nextSibling,U.parentNode.appendChild(Y),Y=Y.nextSibling;else U.parentNode._isSplit?(U._parent=U.parentNode,!U.previousSibling&&U.firstChild&&(U.firstChild._isFirst=!0),U.nextSibling&&U.nextSibling.textContent===" "&&!U.nextSibling.nextSibling&&C.push(U.nextSibling),U._next=U.nextSibling&&U.nextSibling._isFirst?null:U.nextSibling,U.parentNode.removeChild(U),R.splice(O--,1),H--):at||(ct=!U.nextSibling&&tm(U.parentNode,t,v),U.parentNode._parent&&U.parentNode._parent.appendChild(U),ct&&U.parentNode.appendChild(eo.createTextNode(" ")),D==="span"&&(U.style.display="inline"),m.push(U));else U.parentNode._isSplit&&!U._isSplit&&U.innerHTML!==""?b.push(U):M&&!U._isSplit&&(D==="span"&&(U.style.display="inline"),m.push(U))}for(O=C.length;--O>-1;)C[O].parentNode.removeChild(C[O]);if(w){for(y&&(ot=eo.createElement(D),t.appendChild(ot),xt=ot.offsetWidth+"px",ct=ot.offsetParent===t?0:t.offsetLeft,t.removeChild(ot)),X=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Ut=v===" "&&(!y||!I&&!M),O=0;O<w.length;O++){for(_t=w[O],ot=eo.createElement(D),ot.style.cssText="display:block;text-align:"+p+";position:"+(y?"absolute;":"relative;"),P&&(ot.className=P+(L?O+1:"")),S.push(ot),H=_t.length,Y=0;Y<H;Y++)_t[Y].nodeName!=="BR"&&(U=_t[Y],ot.appendChild(U),Ut&&U._wordEnd&&ot.appendChild(eo.createTextNode(" ")),y&&(Y===0&&(ot.style.top=U._y+"px",ot.style.left=c+ct+"px"),U.style.top="0px",ct&&(U.style.left=U._x-ct+"px")));H===0?ot.innerHTML=" ":!I&&!M&&(Zx(ot),sm(ot,"\xA0"," ")),y&&(ot.style.width=xt,ot.style.height=U._h+"px"),t.appendChild(ot)}t.style.cssText=X}y&&(a>t.clientHeight&&(t.style.height=a-u+"px",t.clientHeight<a&&(t.style.height=a+d+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+f+"px"))),B&&(J?t.style.display=J:t.style.removeProperty("display")),uh(n,m),I&&uh(i,b),uh(s,S)},$x=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=fh(e),c=e.wordDelimiter||" ",h=function(y){return y===c||y===Wx&&c===" "},d=c!==" "?"":l?"­ ":" ",f="</"+s+">",u=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:Yx:null,g,p,m,b,S,v,D,T,w=eo.createElement("div"),I=t.parentNode;for(I.insertBefore(w,t),w.textContent=t.nodeValue,I.removeChild(t),t=w,g=to(t),D=g.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(g=g.replace(Gx," ").replace(Hx,"")),D&&(g=g.split("<").join("{{LT}}")),S=g.length,p=(g.charAt(0)===" "?d:"")+n(),m=0;m<S;m++)if(v=g.charAt(m),_&&(T=_(g.substr(m),e.specialChars)))v=g.substr(m,T||1),p+=a&&v!==" "?i()+v+"</"+s+">":v,m+=T-1;else if(h(v)&&!h(g.charAt(m-1))&&m){for(p+=u?f:"",u=0;h(g.charAt(m+1));)p+=d,m++;m===S-1?p+=d:g.charAt(m+1)!==")"&&(p+=d+n(),u=1)}else v==="{"&&g.substr(m,6)==="{{LT}}"?(p+=a?i()+"{{LT}}</"+s+">":"{{LT}}",m+=5):v.charCodeAt(0)>=55296&&v.charCodeAt(0)<=56319||g.charCodeAt(m+1)>=65024&&g.charCodeAt(m+1)<=65039?(b=((g.substr(m,12).split(ch)||[])[1]||"").length||2,p+=a&&v!==" "?i()+g.substr(m,b)+"</"+s+">":g.substr(m,b),m+=b-1):p+=a&&v!==" "?i()+v+"</"+s+">":v;t.outerHTML=p+(u?f:""),D&&sm(I,"{{LT}}","<")},Kx=function r(t,e,n,i){var s=Rl(t.childNodes),o=s.length,a=fh(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&&rm(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}$x(t,e,n,i)},Ri=function(){function r(e,n){em||im(),this.elements=Rl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},nm(this),Xx&&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=Qp(n.wordsClass,s),a=Qp(n.charsClass,s),l,c,h;--i>-1;)h=this.elements[i],this._originals[i]={html:h.innerHTML,style:h.getAttribute("style")},l=h.clientHeight,c=h.clientWidth,Kx(h,n,o,a),Jx(h,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}();Ri.version="3.12.5";Ri.register=im;var om=()=>{Kt.registerPlugin(ne,Ri),document.querySelectorAll("[data-header-animation]").forEach(t=>{let e=t.querySelector("h2");if(e.classList.contains("is-all-strong")&&(e=e.querySelector("strong")),!e)return;let n=new Ri(e,{type:"lines",tag:"span"}),i=new Ri(e,{type:"lines",linesClass:"header_line"});n.lines=i.chars.concat(n.lines);let s=Kt.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")})};var am=()=>{if(Kt.registerPlugin(ne,Ri),document.querySelector(".hero_grid")){let r=document.querySelector(".hero_grid"),t=r.querySelector(".hero_holo"),e=r.querySelector("h1"),n=r.querySelector(".paragraph-big"),i=new Ri(e,{type:"lines",tag:"span"}),s=new Ri(e,{type:"lines",linesClass:"header_line"});i.lines=s.chars.concat(i.lines),Kt.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(n,{autoAlpha:0},{autoAlpha:1,duration:.35,ease:"circ.out"},"+=1.75").fromTo(i.lines,{y:"100%"},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"-=0.25").fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25")}};var lm=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||Kt.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){Kt.to(r,{y:"-100dvh",duration:.75})}},"<")};var Pl=function(){function r(e){this.chars=ci(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=um(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=um(n-this.length,this.chars);this.length=n},r}(),hs,dm,pm=function(){return hs||typeof window<"u"&&(hs=window.gsap)&&hs.registerPlugin&&hs},jx=1,cm=/\s+/g,um=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},dh="ABCDEFGHIJKLMNOPQRSTUVWXYZ",hm=dh.toLowerCase(),Qx={upperCase:new Pl(dh),lowerCase:new Pl(hm),upperAndLowerCase:new Pl(dh+hm)},fm=function(){dm=hs=pm()},xa={version:"3.12.5",name:"scrambleText",register:function(t,e,n){hs=t,fm()},init:function(t,e,n,i,s){if(dm||fm(),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,h,d,f;return l.delimiter=c=e.delimiter||"",l.original=ci(to(t).replace(cm," ").split(" ").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=ci((o||"").replace(cm," "),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&&!!ci(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=d=Qx[e.chars||"upperCase"]||new Pl(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,h=l.length+Math.max(l.lengthDif,0),h>d.length&&d.grow(h),l.chars=d.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"),jx}},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,h=e.setIndex,d=e.chars,f=e.charSet,u=e.length,_=e.textHasEmoji,g=e.charsHaveEmoji,p=e.lengthDif,m=e.tweenLength,b=e.oldClass,S=e.newClass,v=e.rightToLeft,D=e.fillChar,T=e.speed,w=e.original,I=e.hasClass,M=s.length,y=a._time,P=y-l,L,C,B,J,O,Y,H,U,R,at,_t;c&&(a._from&&(y=a._dur-y),t=y===0?0:y<c?1e-6:y===a._dur?1:a._ease((y-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),v&&(t=1-t),L=~~(t*M+.5),t?((P>T||P<-T)&&(e.setIndex=h=(h+(Math.random()*19|0))%20,e.chars=f.sets[h],e.prevScrambleTime+=P),J=d):J=w.join(o),_t=a._from?t:1-t,at=u+(m?a._from?_t*_t*_t:1-_t*_t*_t:1)*p,v?t===1&&(a._from||a.data==="isFromStart")?(B="",J=w.join(o)):(H=s.slice(L).join(o),g?B=ci(J).slice(0,at-(_?ci(H):H).length+.5|0).join(""):B=J.substr(0,at-(_?ci(H):H).length+.5|0),J=H):(B=s.slice(0,L).join(o),C=(_?ci(B):B).length,g?J=ci(J).slice(C,at+.5|0).join(""):J=J.substr(C,at-C+.5|0)),I?(U=v?b:S,R=v?S:b,O=U&&L!==0,Y=R&&L!==M,H=(O?"<span class='"+U+"'>":"")+B+(O?"</span>":"")+(Y?"<span class='"+R+"'>":"")+o+J+(Y?"</span>":"")):H=B+o+J,n[i]=D===" "&&~H.indexOf(" ")?H.split(" ").join(" "):H}};xa.emojiSafeSplit=ci;xa.getText=to;pm()&&hs.registerPlugin(xa);Kt.registerPlugin(xa);var mm=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{Kt.matchMedia().add("(min-width: 768px)",()=>{Kt.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};function gm(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 ty(r,t,e){return t&&gm(r.prototype,t),e&&gm(r,e),r}var ye,Il,nn,ds,no,ui,ey,fs,_m,re,Pi,Ll,xm,ym,vm,Sm,Mm=function(){return typeof window<"u"},bm=function(){return ye||Mm()&&(ye=window.gsap)&&ye.registerPlugin&&ye};var ny=function(t){return Math.round(t*1e5)/1e5||0},yr=function(t){return re.maxScroll(t||nn)},iy=function(t,e){var n=t.parentNode||no,i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),o=s.top-i.top,a=s.bottom-i.bottom,l=(Math.abs(o)>Math.abs(a)?o:a)/(1-e),c=-l*e,h,d;return l>0&&(h=s.height/(nn.innerHeight+s.height),d=h===.5?s.height*2:Math.min(s.height,Math.abs(-l*h/(2*h-1)))*2*(e||1),c+=e?-d*e:-d/2,l+=d),{change:l,offset:c}},ry=function(t){var e=ds.querySelector(".ScrollSmoother-wrapper");return e||(e=ds.createElement("div"),e.classList.add("ScrollSmoother-wrapper"),t.parentNode.insertBefore(e,t),e.appendChild(t)),e},Xi=function(){function r(t){var e=this;Il||r.register(ye)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},Pi&&Pi.kill(),Pi=this,vm(this);var n=t,i=n.smoothTouch,s=n.onUpdate,o=n.onStop,a=n.smooth,l=n.onFocusIn,c=n.normalizeScroll,h=n.wholePixels,d,f,u,_,g,p,m,b,S,v,D,T,w,I,M=this,y=t.effectsPrefix||"",P=re.getScrollFunc(nn),L=re.isTouch===1?i===!0?.8:parseFloat(i)||0:a===0||a===!1?0:parseFloat(a)||.8,C=L&&+t.speed||1,B=0,J=0,O=1,Y=xm(0),H=function(){return Y.update(-B)},U={y:0},R=function(){return d.style.overflow="visible"},at,_t=function(x){x.update();var N=x.getTween();N&&(N.pause(),N._time=N._dur,N._tTime=N._tDur),at=!1,x.animation.progress(x.progress,!0)},Ut=function(x,N){(x!==B&&!v||N)&&(h&&(x=Math.round(x)),L&&(d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+x+", 0, 1)",d._gsap.y=x+"px"),J=x-B,B=x,re.isUpdating||r.isRefreshing||re.update())},X=function(x){return arguments.length?(x<0&&(x=0),U.y=-x,at=!0,v?B=-x:Ut(-x),re.isRefreshing?_.update():P(x/C),this):-B},ot=typeof ResizeObserver<"u"&&t.autoResize!==!1&&new ResizeObserver(function(){if(!re.isRefreshing){var A=yr(f)*C;A<-B&&X(A),Sm.restart(!0)}}),xt,ct=function(x){f.scrollTop=0,!(x.target.contains&&x.target.contains(f)||l&&l(e,x)===!1)&&(re.isInViewport(x.target)||x.target===xt||e.scrollTo(x.target,!1,"center center"),xt=x.target)},Rt=function(x,N){if(x<N.start)return x;var q=isNaN(N.ratio)?1:N.ratio,tt=N.end-N.start,it=x-N.start,vt=N.offset||0,pt=N.pins||[],lt=pt.offset||0,Lt=N._startClamp&&N.start<=0||N.pins&&N.pins.offset?0:N._endClamp&&N.end===yr()?1:.5;return pt.forEach(function(ht){tt-=ht.distance,ht.nativeStart<=x&&(it-=ht.distance)}),lt&&(it*=(tt-lt/q)/tt),x+(it-vt*Lt)/q-it},kt=function A(x,N,q){q||(x.pins.length=x.pins.offset=0);var tt=x.pins,it=x.markers,vt,pt,lt,Lt,ht,yt,Yt,ut;for(Yt=0;Yt<N.length;Yt++)if(ut=N[Yt],x.trigger&&ut.trigger&&x!==ut&&(ut.trigger===x.trigger||ut.pinnedContainer===x.trigger||x.trigger.contains(ut.trigger))&&(ht=ut._startNative||ut._startClamp||ut.start,yt=ut._endNative||ut._endClamp||ut.end,lt=Rt(ht,x),Lt=ut.pin&&yt>0?lt+(yt-ht):Rt(yt,x),ut.setPositions(lt,Lt,!0,(ut._startClamp?Math.max(0,lt):lt)-ht),ut.markerStart&&it.push(ye.quickSetter([ut.markerStart,ut.markerEnd],"y","px")),ut.pin&&ut.end>0&&!q)){if(vt=ut.end-ut.start,pt=x._startClamp&&ut.start<0,pt){if(x.start>0){x.setPositions(0,x.end+(x._startNative-x.start),!0),A(x,N);return}vt+=ut.start,tt.offset=-ut.start}tt.push({start:ut.start,nativeStart:ht,end:ut.end,distance:vt,trig:ut}),x.setPositions(x.start,x.end+(pt?-ut.start:vt),!0)}},Z=function(x,N){g.forEach(function(q){return kt(q,x,N)})},Jt=function(){R(),requestAnimationFrame(R),g&&(re.getAll().forEach(function(x){x._startNative=x.start,x._endNative=x.end}),g.forEach(function(x){var N=x._startClamp||x.start,q=x.autoSpeed?Math.min(yr(),x.end):N+Math.abs((x.end-N)/x.ratio),tt=q-x.end;if(N-=tt/2,q-=tt/2,N>q){var it=N;N=q,q=it}x._startClamp&&N<0?(q=x.ratio<0?yr():x.end/x.ratio,tt=q-x.end,N=0):(x.ratio<0||x._endClamp&&q>=yr())&&(q=yr(),N=x.ratio<0||x.ratio>1?0:q-(q-x.start)/x.ratio,tt=(q-N)*x.ratio-(x.end-x.start)),x.offset=tt||1e-4,x.pins.length=x.pins.offset=0,x.setPositions(N,q,!0)}),Z(re.sort())),Y.reset()},It=function(){return re.addEventListener("refresh",Jt)},Ft=function(){return g&&g.forEach(function(x){return x.vars.onRefresh(x)})},bt=function(){return g&&g.forEach(function(x){return x.vars.onRefreshInit(x)}),Ft},Et=function(x,N,q,tt){return function(){var it=typeof N=="function"?N(q,tt):N;it||it===0||(it=tt.getAttribute("data-"+y+x)||(x==="speed"?1:0)),tt.setAttribute("data-"+y+x,it);var vt=(it+"").substr(0,6)==="clamp(";return{clamp:vt,value:vt?it.substr(6,it.length-7):it}}},Ht=function(x,N,q,tt,it){it=(typeof it=="function"?it(tt,x):it)||0;var vt=Et("speed",N,tt,x),pt=Et("lag",q,tt,x),lt=ye.getProperty(x,"y"),Lt=x._gsap,ht,yt,Yt,ut,Tt,Wt,qt=[],ue=function(){N=vt(),q=parseFloat(pt().value),ht=parseFloat(N.value)||1,Yt=N.value==="auto",Tt=Yt||yt&&yt._startClamp&&yt.start<=0||qt.offset?0:yt&&yt._endClamp&&yt.end===yr()?1:.5,ut&&ut.kill(),ut=q&&ye.to(x,{ease:Ll,overwrite:!1,y:"+=0",duration:q}),yt&&(yt.ratio=ht,yt.autoSpeed=Yt)},Zt=function(){Lt.y=lt+"px",Lt.renderTransform(1),ue()},V=[],Q=0,st=function(gt){if(Yt){Zt();var Bt=iy(x,_m(0,1,-gt.start/(gt.end-gt.start)));Q=Bt.change,Wt=Bt.offset}else Wt=qt.offset||0,Q=(gt.end-gt.start-Wt)*(1-ht);qt.forEach(function(ee){return Q-=ee.distance*(1-ht)}),gt.offset=Q||.001,gt.vars.onUpdate(gt),ut&&ut.progress(1)};return ue(),(ht!==1||Yt||ut)&&(yt=re.create({trigger:Yt?x.parentNode:x,start:function(){return N.clamp?"clamp(top bottom+="+it+")":"top bottom+="+it},end:function(){return N.value<0?"max":N.clamp?"clamp(bottom top-="+it+")":"bottom top-="+it},scroller:f,scrub:!0,refreshPriority:-999,onRefreshInit:Zt,onRefresh:st,onKill:function(gt){var Bt=g.indexOf(gt);Bt>=0&&g.splice(Bt,1),Zt()},onUpdate:function(gt){var Bt=lt+Q*(gt.progress-Tt),ee=qt.length,Mt=0,F,rt,k;if(gt.offset){if(ee){for(rt=-B,k=gt.end;ee--;){if(F=qt[ee],F.trig.isActive||rt>=F.start&&rt<=F.end){ut&&(F.trig.progress+=F.trig.direction<0?.001:-.001,F.trig.update(0,0,1),ut.resetTo("y",parseFloat(Lt.y),-J,!0),O&&ut.progress(1));return}rt>F.end&&(Mt+=F.distance),k-=F.distance}Bt=lt+Mt+Q*((ye.utils.clamp(gt.start,gt.end,rt)-gt.start-Mt)/(k-gt.start)-Tt)}V.length&&!Yt&&V.forEach(function(j){return j(Bt-Mt)}),Bt=ny(Bt+Wt),ut?(ut.resetTo("y",Bt,-J,!0),O&&ut.progress(1)):(Lt.y=Bt+"px",Lt.renderTransform(1))}}}),st(yt),ye.core.getCache(yt.trigger).stRevert=bt,yt.startY=lt,yt.pins=qt,yt.markers=V,yt.ratio=ht,yt.autoSpeed=Yt,x.style.willChange="transform"),yt};It(),re.addEventListener("killAll",It),ye.delayedCall(.5,function(){return O=0}),this.scrollTop=X,this.scrollTo=function(A,x,N){var q=ye.utils.clamp(0,yr(),isNaN(A)?e.offset(A,N,!!x&&!v):+A);x?v?ye.to(e,{duration:L,scrollTop:q,overwrite:"auto",ease:Ll}):P(q):X(q)},this.offset=function(A,x,N){A=fs(A)[0];var q=A.style.cssText,tt=re.create({trigger:A,start:x||"top top"}),it;return g&&(O?re.refresh():Z([tt],!0)),it=tt.start/(N?C:1),tt.kill(!1),A.style.cssText=q,ye.core.getCache(A).uncache=1,it};function W(){return u=d.clientHeight,d.style.overflow="visible",ui.style.height=nn.innerHeight+(u-nn.innerHeight)/C+"px",u-nn.innerHeight}this.content=function(A){if(arguments.length){var x=fs(A||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||ui.children[0];return x!==d&&(d=x,S=d.getAttribute("style")||"",ot&&ot.observe(d),ye.set(d,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),L||ye.set(d,{clearProps:"transform"})),this}return d},this.wrapper=function(A){return arguments.length?(f=fs(A||"#smooth-wrapper")[0]||ry(d),b=f.getAttribute("style")||"",W(),ye.set(f,L?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):f},this.effects=function(A,x){var N;if(g||(g=[]),!A)return g.slice(0);A=fs(A),A.forEach(function(ht){for(var yt=g.length;yt--;)g[yt].trigger===ht&&g[yt].kill()}),x=x||{};var q=x,tt=q.speed,it=q.lag,vt=q.effectsPadding,pt=[],lt,Lt;for(lt=0;lt<A.length;lt++)Lt=Ht(A[lt],tt,it,lt,vt),Lt&&pt.push(Lt);return(N=g).push.apply(N,pt),x.refresh!==!1&&re.refresh(),pt},this.sections=function(A,x){var N;if(p||(p=[]),!A)return p.slice(0);var q=fs(A).map(function(tt){return re.create({trigger:tt,start:"top 120%",end:"bottom -20%",onToggle:function(vt){tt.style.opacity=vt.isActive?"1":"0",tt.style.pointerEvents=vt.isActive?"all":"none"}})});return x&&x.add?(N=p).push.apply(N,q):p=q.slice(0),q},this.content(t.content),this.wrapper(t.wrapper),this.render=function(A){return Ut(A||A===0?A:B)},this.getVelocity=function(){return Y.getVelocity(-B)},re.scrollerProxy(f,{scrollTop:X,scrollHeight:function(){return W()&&ui.scrollHeight},fixedMarkers:t.fixedMarkers!==!1&&!!L,content:d,getBoundingClientRect:function(){return{top:0,left:0,width:nn.innerWidth,height:nn.innerHeight}}}),re.defaults({scroller:f});var $t=re.getAll().filter(function(A){return A.scroller===nn||A.scroller===f});$t.forEach(function(A){return A.revert(!0,!0)}),_=re.create({animation:ye.fromTo(U,{y:function(){return I=0,0}},{y:function(){return I=1,-W()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(I){var x=at;x&&(_t(_),U.y=B),Ut(U.y,x),H(),s&&!v&&s(M)}}}),onRefreshInit:function(x){if(!r.isRefreshing){if(r.isRefreshing=!0,g){var N=re.getAll().filter(function(tt){return!!tt.pin});g.forEach(function(tt){tt.vars.pinnedContainer||N.forEach(function(it){if(it.pin.contains(tt.trigger)){var vt=tt.vars;vt.pinnedContainer=it.pin,tt.vars=null,tt.init(vt,tt.animation)}})})}var q=x.getTween();w=q&&q._end>q._dp._time,T=B,U.y=0,L&&(re.isTouch===1&&(f.style.position="absolute"),f.scrollTop=0,re.isTouch===1&&(f.style.position="fixed"))}},onRefresh:function(x){x.animation.invalidate(),x.setPositions(x.start,W()/C),w||_t(x),U.y=-P()*C,Ut(U.y),O||(w&&(at=!1),x.animation.progress(ye.utils.clamp(0,1,T/C/-x.end))),w&&(x.progress-=.001,x.update()),r.isRefreshing=!1},id:"ScrollSmoother",scroller:nn,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return W()/C},onScrubComplete:function(){Y.reset(),o&&o(e)},scrub:L||!0}),this.smooth=function(A){return arguments.length&&(L=A||0,C=L&&+t.speed||1,_.scrubDuration(A)),_.getTween()?_.getTween().duration():0},_.getTween()&&(_.getTween().vars.ease=t.ease||Ll),this.scrollTrigger=_,t.effects&&this.effects(t.effects===!0?"[data-"+y+"speed], [data-"+y+"lag]":t.effects,{effectsPadding:t.effectsPadding,refresh:!1}),t.sections&&this.sections(t.sections===!0?"[data-section]":t.sections),$t.forEach(function(A){A.vars.scroller=f,A.revert(!1,!0),A.init(A.vars,A.animation)}),this.paused=function(A,x){return arguments.length?(!!v!==A&&(A?(_.getTween()&&_.getTween().pause(),P(-B/C),Y.reset(),D=re.normalizeScroll(),D&&D.disable(),v=re.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return X(-B)}}),v.nested=ym(no,"wheel,touch,scroll",!0,x!==!1)):(v.nested.kill(),v.kill(),v=0,D&&D.enable(),_.progress=(-B/C-_.start)/(_.end-_.start),_t(_))),this):!!v},this.kill=this.revert=function(){e.paused(!1),_t(_),_.kill();for(var A=(g||[]).concat(p||[]),x=A.length;x--;)A[x].kill();re.scrollerProxy(f),re.removeEventListener("killAll",It),re.removeEventListener("refresh",Jt),f.style.cssText=b,d.style.cssText=S;var N=re.defaults({});N&&N.scroller===f&&re.defaults({scroller:nn}),e.normalizer&&re.normalizeScroll(!1),clearInterval(m),Pi=null,ot&&ot.disconnect(),ui.style.removeProperty("height"),nn.removeEventListener("focusin",ct)},this.refresh=function(A,x){return _.refresh(A,x)},c&&(this.normalizer=re.normalizeScroll(c===!0?{debounce:!0,content:!L&&d}:c)),re.config(t),"overscrollBehavior"in nn.getComputedStyle(ui)&&ye.set([ui,no],{overscrollBehavior:"none"}),"scrollBehavior"in nn.getComputedStyle(ui)&&ye.set([ui,no],{scrollBehavior:"auto"}),nn.addEventListener("focusin",ct),m=setInterval(H,250),ds.readyState==="loading"||requestAnimationFrame(function(){return re.refresh()})}return r.register=function(e){return Il||(ye=e||bm(),Mm()&&window.document&&(nn=window,ds=document,no=ds.documentElement,ui=ds.body),ye&&(fs=ye.utils.toArray,_m=ye.utils.clamp,Ll=ye.parseEase("expo"),vm=ye.core.context||function(){},re=ye.core.globals().ScrollTrigger,ye.core.globals("ScrollSmoother",r),ui&&re&&(Sm=ye.delayedCall(.2,function(){return re.isRefreshing||Pi&&Pi.refresh()}).pause(),ey=[nn,ds,no,ui],xm=re.core._getVelocityProp,ym=re.core._inputObserver,r.refresh=re.refresh,Il=1))),Il},ty(r,[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}]),r}();Xi.version="3.12.5";Xi.create=function(r){return Pi&&r&&Pi.content()===fs(r.content)[0]?Pi:new Xi(r)};Xi.get=function(){return Pi};bm()&&ye.registerPlugin(Xi);Kt.registerPlugin(Xi,ne);var wm=()=>{Kt.registerPlugin(Xi),Xi.create({smooth:1.5,effects:!0}),ne.refresh()};var If="164";var sy=0,Em=1,oy=2;var Kg=1,Lf=2,Ki=3,Ir=0,Fn=1,Qi=2,Cr=0,Rr=1,Tm=2,Am=3,Dm=4,ay=5,Ss=100,ly=101,cy=102,uy=103,hy=104,fy=200,dy=201,py=202,my=203,Zh=204,Jh=205,gy=206,_y=207,xy=208,yy=209,vy=210,Sy=211,My=212,by=213,wy=214,Ey=0,Ty=1,Ay=2,sc=3,Dy=4,Cy=5,Ry=6,Py=7,jg=0,Iy=1,Ly=2,Pr=0,Fy=1,Ny=2,Uy=3,Oy=4,By=5,ky=6,zy=7;var Qg=300,To=301,Ao=302,$h=303,Kh=304,Ic=306,jh=1e3,bs=1001,Qh=1002,Qn=1003,Vy=1004;var Fl=1005;var pi=1006,ph=1007;var ws=1008;var Lr=1009,Hy=1010,Gy=1011,t_=1012,e_=1013,Do=1014,Ar=1015,Lc=1016,n_=1017,i_=1018,Ra=1020,Wy=35902,Xy=1021,Yy=1022,Li=1023,qy=1024,Zy=1025,bo=1026,Ta=1027,Jy=1028,r_=1029,$y=1030,s_=1031,o_=1033,mh=33776,gh=33777,_h=33778,xh=33779,Cm=35840,Rm=35841,Pm=35842,Im=35843,Lm=36196,Fm=37492,Nm=37496,Um=37808,Om=37809,Bm=37810,km=37811,zm=37812,Vm=37813,Hm=37814,Gm=37815,Wm=37816,Xm=37817,Ym=37818,qm=37819,Zm=37820,Jm=37821,yh=36492,$m=36494,Km=36495,Ky=36283,jm=36284,Qm=36285,tg=36286;var oc=2300,ac=2301,vh=2302,eg=2400,ng=2401,ig=2402;var jy=3200,Qy=3201,tv=0,ev=1,Tr="",jn="srgb",Ur="srgb-linear",Ff="display-p3",Fc="display-p3-linear",lc="linear",Te="srgb",cc="rec709",uc="p3";var io=7680;var rg=519,nv=512,iv=513,rv=514,a_=515,sv=516,ov=517,av=518,lv=519,sg=35044;var og="300 es",tr=2e3,hc=2001,Fr=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}}},fn=["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 Sh=Math.PI/180,tf=180/Math.PI;function Pa(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(fn[r&255]+fn[r>>8&255]+fn[r>>16&255]+fn[r>>24&255]+"-"+fn[t&255]+fn[t>>8&255]+"-"+fn[t>>16&15|64]+fn[t>>24&255]+"-"+fn[e&63|128]+fn[e>>8&255]+"-"+fn[e>>16&255]+fn[e>>24&255]+fn[n&255]+fn[n>>8&255]+fn[n>>16&255]+fn[n>>24&255]).toLowerCase()}function Ln(r,t,e){return Math.max(t,Math.min(e,r))}function cv(r,t){return(r%t+t)%t}function Mh(r,t,e){return(1-e)*r+e*t}function ya(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 In(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 _e=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(Ln(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}},oe=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 h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=l,h[6]=n,h[7]=o,h[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],h=n[4],d=n[7],f=n[2],u=n[5],_=n[8],g=i[0],p=i[3],m=i[6],b=i[1],S=i[4],v=i[7],D=i[2],T=i[5],w=i[8];return s[0]=o*g+a*b+l*D,s[3]=o*p+a*S+l*T,s[6]=o*m+a*v+l*w,s[1]=c*g+h*b+d*D,s[4]=c*p+h*S+d*T,s[7]=c*m+h*v+d*w,s[2]=f*g+u*b+_*D,s[5]=f*p+u*S+_*T,s[8]=f*m+u*v+_*w,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],h=t[8];return e*o*h-e*a*c-n*s*h+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],h=t[8],d=h*o-a*c,f=a*l-h*s,u=c*s-o*l,_=e*d+n*f+i*u;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/_;return t[0]=d*g,t[1]=(i*c-h*n)*g,t[2]=(a*n-i*o)*g,t[3]=f*g,t[4]=(h*e-i*l)*g,t[5]=(i*s-a*e)*g,t[6]=u*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(bh.makeScale(t,e)),this}rotate(t){return this.premultiply(bh.makeRotation(-t)),this}translate(t,e){return this.premultiply(bh.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)}},bh=new oe;function l_(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function fc(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function uv(){let r=fc("canvas");return r.style.display="block",r}var ag={};function hv(r){r in ag||(ag[r]=!0,console.warn(r))}var lg=new oe().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),cg=new oe().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Nl={[Ur]:{transfer:lc,primaries:cc,toReference:r=>r,fromReference:r=>r},[jn]:{transfer:Te,primaries:cc,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Fc]:{transfer:lc,primaries:uc,toReference:r=>r.applyMatrix3(cg),fromReference:r=>r.applyMatrix3(lg)},[Ff]:{transfer:Te,primaries:uc,toReference:r=>r.convertSRGBToLinear().applyMatrix3(cg),fromReference:r=>r.applyMatrix3(lg).convertLinearToSRGB()}},fv=new Set([Ur,Fc]),Se={enabled:!0,_workingColorSpace:Ur,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!fv.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=Nl[t].toReference,i=Nl[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 Nl[r].primaries},getTransfer:function(r){return r===Tr?lc:Nl[r].transfer}};function wo(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function wh(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var ro,ef=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{ro===void 0&&(ro=fc("canvas")),ro.width=t.width,ro.height=t.height;let n=ro.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ro}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=fc("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]=wo(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(wo(e[n]/255)*255):e[n]=wo(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}},dv=0,dc=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:dv++}),this.uuid=Pa(),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(Eh(i[o].image)):s.push(Eh(i[o]))}else s=Eh(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function Eh(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?ef.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 pv=0,ni=class r extends Fr{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=bs,i=bs,s=pi,o=ws,a=Li,l=Lr,c=r.DEFAULT_ANISOTROPY,h=Tr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pv++}),this.uuid=Pa(),this.name="",this.source=new dc(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 _e(0,0),this.repeat=new _e(1,1),this.center=new _e(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new oe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,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!==Qg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case jh:t.x=t.x-Math.floor(t.x);break;case bs:t.x=t.x<0?0:1;break;case Qh: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 jh:t.y=t.y-Math.floor(t.y);break;case bs:t.y=t.y<0?0:1;break;case Qh: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++}};ni.DEFAULT_IMAGE=null;ni.DEFAULT_MAPPING=Qg;ni.DEFAULT_ANISOTROPY=1;var je=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],h=l[4],d=l[8],f=l[1],u=l[5],_=l[9],g=l[2],p=l[6],m=l[10];if(Math.abs(h-f)<.01&&Math.abs(d-g)<.01&&Math.abs(_-p)<.01){if(Math.abs(h+f)<.1&&Math.abs(d+g)<.1&&Math.abs(_+p)<.1&&Math.abs(c+u+m-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let S=(c+1)/2,v=(u+1)/2,D=(m+1)/2,T=(h+f)/4,w=(d+g)/4,I=(_+p)/4;return S>v&&S>D?S<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(S),i=T/n,s=w/n):v>D?v<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(v),n=T/i,s=I/i):D<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(D),n=w/s,i=I/s),this.set(n,i,s,e),this}let b=Math.sqrt((p-_)*(p-_)+(d-g)*(d-g)+(f-h)*(f-h));return Math.abs(b)<.001&&(b=1),this.x=(p-_)/b,this.y=(d-g)/b,this.z=(f-h)/b,this.w=Math.acos((c+u+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}},nf=class extends Fr{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new je(0,0,t,e),this.scissorTest=!1,this.viewport=new je(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:pi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new ni(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 dc(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"})}},er=class extends nf{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},pc=class extends ni{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=Qn,this.minFilter=Qn,this.wrapR=bs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var rf=class extends ni{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=Qn,this.minFilter=Qn,this.wrapR=bs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nr=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],h=n[i+2],d=n[i+3],f=s[o+0],u=s[o+1],_=s[o+2],g=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=h,t[e+3]=d;return}if(a===1){t[e+0]=f,t[e+1]=u,t[e+2]=_,t[e+3]=g;return}if(d!==g||l!==f||c!==u||h!==_){let p=1-a,m=l*f+c*u+h*_+d*g,b=m>=0?1:-1,S=1-m*m;if(S>Number.EPSILON){let D=Math.sqrt(S),T=Math.atan2(D,m*b);p=Math.sin(p*T)/D,a=Math.sin(a*T)/D}let v=a*b;if(l=l*p+f*v,c=c*p+u*v,h=h*p+_*v,d=d*p+g*v,p===1-a){let D=1/Math.sqrt(l*l+c*c+h*h+d*d);l*=D,c*=D,h*=D,d*=D}}t[e]=l,t[e+1]=c,t[e+2]=h,t[e+3]=d}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],h=n[i+3],d=s[o],f=s[o+1],u=s[o+2],_=s[o+3];return t[e]=a*_+h*d+l*u-c*f,t[e+1]=l*_+h*f+c*d-a*u,t[e+2]=c*_+h*u+a*f-l*d,t[e+3]=h*_-a*d-l*f-c*u,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),h=a(i/2),d=a(s/2),f=l(n/2),u=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=f*h*d+c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d-f*u*_;break;case"YXZ":this._x=f*h*d+c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d+f*u*_;break;case"ZXY":this._x=f*h*d-c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d-f*u*_;break;case"ZYX":this._x=f*h*d-c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d+f*u*_;break;case"YZX":this._x=f*h*d+c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d-f*u*_;break;case"XZY":this._x=f*h*d-c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d+f*u*_;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],h=e[6],d=e[10],f=n+a+d;if(f>0){let u=.5/Math.sqrt(f+1);this._w=.25/u,this._x=(h-l)*u,this._y=(s-c)*u,this._z=(o-i)*u}else if(n>a&&n>d){let u=2*Math.sqrt(1+n-a-d);this._w=(h-l)/u,this._x=.25*u,this._y=(i+o)/u,this._z=(s+c)/u}else if(a>d){let u=2*Math.sqrt(1+a-n-d);this._w=(s-c)/u,this._x=(i+o)/u,this._y=.25*u,this._z=(l+h)/u}else{let u=2*Math.sqrt(1+d-n-a);this._w=(o-i)/u,this._x=(s+c)/u,this._y=(l+h)/u,this._z=.25*u}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(Ln(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,h=e._w;return this._x=n*h+o*a+i*c-s*l,this._y=i*h+o*l+s*a-n*c,this._z=s*h+o*c+n*l-i*a,this._w=o*h-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 u=1-e;return this._w=u*o+e*this._w,this._x=u*n+e*this._x,this._y=u*i+e*this._y,this._z=u*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),h=Math.atan2(c,a),d=Math.sin((1-e)*h)/c,f=Math.sin(e*h)/c;return this._w=o*d+this._w*f,this._x=n*d+this._x*f,this._y=i*d+this._y*f,this._z=s*d+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}},nt=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(ug.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ug.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),h=2*(a*e-s*i),d=2*(s*n-o*e);return this.x=e+l*c+o*d-a*h,this.y=n+l*h+a*c-s*d,this.z=i+l*d+s*h-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 Th.copy(this).projectOnVector(t),this.sub(Th)}reflect(t){return this.sub(Th.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(Ln(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}},Th=new nt,ug=new Nr,Es=class{constructor(t=new nt(1/0,1/0,1/0),e=new nt(-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(hi.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(hi.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=hi.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,hi):hi.fromBufferAttribute(s,o),hi.applyMatrix4(t.matrixWorld),this.expandByPoint(hi);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Ul.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Ul.copy(n.boundingBox)),Ul.applyMatrix4(t.matrixWorld),this.union(Ul)}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,hi),hi.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(va),Ol.subVectors(this.max,va),so.subVectors(t.a,va),oo.subVectors(t.b,va),ao.subVectors(t.c,va),vr.subVectors(oo,so),Sr.subVectors(ao,oo),ps.subVectors(so,ao);let e=[0,-vr.z,vr.y,0,-Sr.z,Sr.y,0,-ps.z,ps.y,vr.z,0,-vr.x,Sr.z,0,-Sr.x,ps.z,0,-ps.x,-vr.y,vr.x,0,-Sr.y,Sr.x,0,-ps.y,ps.x,0];return!Ah(e,so,oo,ao,Ol)||(e=[1,0,0,0,1,0,0,0,1],!Ah(e,so,oo,ao,Ol))?!1:(Bl.crossVectors(vr,Sr),e=[Bl.x,Bl.y,Bl.z],Ah(e,so,oo,ao,Ol))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,hi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(hi).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:(Yi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Yi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Yi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Yi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Yi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Yi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Yi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Yi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Yi),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)}},Yi=[new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt],hi=new nt,Ul=new Es,so=new nt,oo=new nt,ao=new nt,vr=new nt,Sr=new nt,ps=new nt,va=new nt,Ol=new nt,Bl=new nt,ms=new nt;function Ah(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){ms.fromArray(r,s);let a=i.x*Math.abs(ms.x)+i.y*Math.abs(ms.y)+i.z*Math.abs(ms.z),l=t.dot(ms),c=e.dot(ms),h=n.dot(ms);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>a)return!1}return!0}var mv=new Es,Sa=new nt,Dh=new nt,Co=class{constructor(t=new nt,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):mv.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;Sa.subVectors(t,this.center);let e=Sa.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Sa,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):(Dh.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sa.copy(t.center).add(Dh)),this.expandByPoint(Sa.copy(t.center).sub(Dh))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},qi=new nt,Ch=new nt,kl=new nt,Mr=new nt,Rh=new nt,zl=new nt,Ph=new nt,mc=class{constructor(t=new nt,e=new nt(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,qi)),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=qi.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(qi.copy(this.origin).addScaledVector(this.direction,e),qi.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Ch.copy(t).add(e).multiplyScalar(.5),kl.copy(e).sub(t).normalize(),Mr.copy(this.origin).sub(Ch);let s=t.distanceTo(e)*.5,o=-this.direction.dot(kl),a=Mr.dot(this.direction),l=-Mr.dot(kl),c=Mr.lengthSq(),h=Math.abs(1-o*o),d,f,u,_;if(h>0)if(d=o*l-a,f=o*a-l,_=s*h,d>=0)if(f>=-_)if(f<=_){let g=1/h;d*=g,f*=g,u=d*(d+o*f+2*a)+f*(o*d+f+2*l)+c}else f=s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;else f=-s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;else f<=-_?(d=Math.max(0,-(-o*s+a)),f=d>0?-s:Math.min(Math.max(-s,-l),s),u=-d*d+f*(f+2*l)+c):f<=_?(d=0,f=Math.min(Math.max(-s,-l),s),u=f*(f+2*l)+c):(d=Math.max(0,-(o*s+a)),f=d>0?s:Math.min(Math.max(-s,-l),s),u=-d*d+f*(f+2*l)+c);else f=o>0?-s:s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(Ch).addScaledVector(kl,f),u}intersectSphere(t,e){qi.subVectors(t.center,this.origin);let n=qi.dot(this.direction),i=qi.dot(qi)-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,h=1/this.direction.y,d=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),h>=0?(s=(t.min.y-f.y)*h,o=(t.max.y-f.y)*h):(s=(t.max.y-f.y)*h,o=(t.min.y-f.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),d>=0?(a=(t.min.z-f.z)*d,l=(t.max.z-f.z)*d):(a=(t.max.z-f.z)*d,l=(t.min.z-f.z)*d),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,qi)!==null}intersectTriangle(t,e,n,i,s){Rh.subVectors(e,t),zl.subVectors(n,t),Ph.crossVectors(Rh,zl);let o=this.direction.dot(Ph),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Mr.subVectors(this.origin,t);let l=a*this.direction.dot(zl.crossVectors(Mr,zl));if(l<0)return null;let c=a*this.direction.dot(Rh.cross(Mr));if(c<0||l+c>o)return null;let h=-a*Mr.dot(Ph);return h<0?null:this.at(h/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)}},Ue=class r{constructor(t,e,n,i,s,o,a,l,c,h,d,f,u,_,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,h,d,f,u,_,g,p)}set(t,e,n,i,s,o,a,l,c,h,d,f,u,_,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]=h,m[10]=d,m[14]=f,m[3]=u,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/lo.setFromMatrixColumn(t,0).length(),s=1/lo.setFromMatrixColumn(t,1).length(),o=1/lo.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),h=Math.cos(s),d=Math.sin(s);if(t.order==="XYZ"){let f=o*h,u=o*d,_=a*h,g=a*d;e[0]=l*h,e[4]=-l*d,e[8]=c,e[1]=u+_*c,e[5]=f-g*c,e[9]=-a*l,e[2]=g-f*c,e[6]=_+u*c,e[10]=o*l}else if(t.order==="YXZ"){let f=l*h,u=l*d,_=c*h,g=c*d;e[0]=f+g*a,e[4]=_*a-u,e[8]=o*c,e[1]=o*d,e[5]=o*h,e[9]=-a,e[2]=u*a-_,e[6]=g+f*a,e[10]=o*l}else if(t.order==="ZXY"){let f=l*h,u=l*d,_=c*h,g=c*d;e[0]=f-g*a,e[4]=-o*d,e[8]=_+u*a,e[1]=u+_*a,e[5]=o*h,e[9]=g-f*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let f=o*h,u=o*d,_=a*h,g=a*d;e[0]=l*h,e[4]=_*c-u,e[8]=f*c+g,e[1]=l*d,e[5]=g*c+f,e[9]=u*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let f=o*l,u=o*c,_=a*l,g=a*c;e[0]=l*h,e[4]=g-f*d,e[8]=_*d+u,e[1]=d,e[5]=o*h,e[9]=-a*h,e[2]=-c*h,e[6]=u*d+_,e[10]=f-g*d}else if(t.order==="XZY"){let f=o*l,u=o*c,_=a*l,g=a*c;e[0]=l*h,e[4]=-d,e[8]=c*h,e[1]=f*d+g,e[5]=o*h,e[9]=u*d-_,e[2]=_*d-u,e[6]=a*h,e[10]=g*d+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(gv,t,_v)}lookAt(t,e,n){let i=this.elements;return zn.subVectors(t,e),zn.lengthSq()===0&&(zn.z=1),zn.normalize(),br.crossVectors(n,zn),br.lengthSq()===0&&(Math.abs(n.z)===1?zn.x+=1e-4:zn.z+=1e-4,zn.normalize(),br.crossVectors(n,zn)),br.normalize(),Vl.crossVectors(zn,br),i[0]=br.x,i[4]=Vl.x,i[8]=zn.x,i[1]=br.y,i[5]=Vl.y,i[9]=zn.y,i[2]=br.z,i[6]=Vl.z,i[10]=zn.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],h=n[1],d=n[5],f=n[9],u=n[13],_=n[2],g=n[6],p=n[10],m=n[14],b=n[3],S=n[7],v=n[11],D=n[15],T=i[0],w=i[4],I=i[8],M=i[12],y=i[1],P=i[5],L=i[9],C=i[13],B=i[2],J=i[6],O=i[10],Y=i[14],H=i[3],U=i[7],R=i[11],at=i[15];return s[0]=o*T+a*y+l*B+c*H,s[4]=o*w+a*P+l*J+c*U,s[8]=o*I+a*L+l*O+c*R,s[12]=o*M+a*C+l*Y+c*at,s[1]=h*T+d*y+f*B+u*H,s[5]=h*w+d*P+f*J+u*U,s[9]=h*I+d*L+f*O+u*R,s[13]=h*M+d*C+f*Y+u*at,s[2]=_*T+g*y+p*B+m*H,s[6]=_*w+g*P+p*J+m*U,s[10]=_*I+g*L+p*O+m*R,s[14]=_*M+g*C+p*Y+m*at,s[3]=b*T+S*y+v*B+D*H,s[7]=b*w+S*P+v*J+D*U,s[11]=b*I+S*L+v*O+D*R,s[15]=b*M+S*C+v*Y+D*at,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],h=t[2],d=t[6],f=t[10],u=t[14],_=t[3],g=t[7],p=t[11],m=t[15];return _*(+s*l*d-i*c*d-s*a*f+n*c*f+i*a*u-n*l*u)+g*(+e*l*u-e*c*f+s*o*f-i*o*u+i*c*h-s*l*h)+p*(+e*c*d-e*a*u-s*o*d+n*o*u+s*a*h-n*c*h)+m*(-i*a*h-e*l*d+e*a*f+i*o*d-n*o*f+n*l*h)}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],h=t[8],d=t[9],f=t[10],u=t[11],_=t[12],g=t[13],p=t[14],m=t[15],b=d*p*c-g*f*c+g*l*u-a*p*u-d*l*m+a*f*m,S=_*f*c-h*p*c-_*l*u+o*p*u+h*l*m-o*f*m,v=h*g*c-_*d*c+_*a*u-o*g*u-h*a*m+o*d*m,D=_*d*l-h*g*l-_*a*f+o*g*f+h*a*p-o*d*p,T=e*b+n*S+i*v+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 w=1/T;return t[0]=b*w,t[1]=(g*f*s-d*p*s-g*i*u+n*p*u+d*i*m-n*f*m)*w,t[2]=(a*p*s-g*l*s+g*i*c-n*p*c-a*i*m+n*l*m)*w,t[3]=(d*l*s-a*f*s-d*i*c+n*f*c+a*i*u-n*l*u)*w,t[4]=S*w,t[5]=(h*p*s-_*f*s+_*i*u-e*p*u-h*i*m+e*f*m)*w,t[6]=(_*l*s-o*p*s-_*i*c+e*p*c+o*i*m-e*l*m)*w,t[7]=(o*f*s-h*l*s+h*i*c-e*f*c-o*i*u+e*l*u)*w,t[8]=v*w,t[9]=(_*d*s-h*g*s-_*n*u+e*g*u+h*n*m-e*d*m)*w,t[10]=(o*g*s-_*a*s+_*n*c-e*g*c-o*n*m+e*a*m)*w,t[11]=(h*a*s-o*d*s-h*n*c+e*d*c+o*n*u-e*a*u)*w,t[12]=D*w,t[13]=(h*g*i-_*d*i+_*n*f-e*g*f-h*n*p+e*d*p)*w,t[14]=(_*a*i-o*g*i-_*n*l+e*g*l+o*n*p-e*a*p)*w,t[15]=(o*d*i-h*a*i+h*n*l-e*d*l-o*n*f+e*a*f)*w,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,h=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,h*a+n,h*l-i*o,0,c*l-i*a,h*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,h=o+o,d=a+a,f=s*c,u=s*h,_=s*d,g=o*h,p=o*d,m=a*d,b=l*c,S=l*h,v=l*d,D=n.x,T=n.y,w=n.z;return i[0]=(1-(g+m))*D,i[1]=(u+v)*D,i[2]=(_-S)*D,i[3]=0,i[4]=(u-v)*T,i[5]=(1-(f+m))*T,i[6]=(p+b)*T,i[7]=0,i[8]=(_+S)*w,i[9]=(p-b)*w,i[10]=(1-(f+g))*w,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=lo.set(i[0],i[1],i[2]).length(),o=lo.set(i[4],i[5],i[6]).length(),a=lo.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],fi.copy(this);let c=1/s,h=1/o,d=1/a;return fi.elements[0]*=c,fi.elements[1]*=c,fi.elements[2]*=c,fi.elements[4]*=h,fi.elements[5]*=h,fi.elements[6]*=h,fi.elements[8]*=d,fi.elements[9]*=d,fi.elements[10]*=d,e.setFromRotationMatrix(fi),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=tr){let l=this.elements,c=2*s/(e-t),h=2*s/(n-i),d=(e+t)/(e-t),f=(n+i)/(n-i),u,_;if(a===tr)u=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===hc)u=-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]=d,l[12]=0,l[1]=0,l[5]=h,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=u,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=tr){let l=this.elements,c=1/(e-t),h=1/(n-i),d=1/(o-s),f=(e+t)*c,u=(n+i)*h,_,g;if(a===tr)_=(o+s)*d,g=-2*d;else if(a===hc)_=s*d,g=-1*d;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*h,l[9]=0,l[13]=-u,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}},lo=new nt,fi=new Ue,gv=new nt(0,0,0),_v=new nt(1,1,1),br=new nt,Vl=new nt,zn=new nt,hg=new Ue,fg=new Nr,nr=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],h=i[9],d=i[2],f=i[6],u=i[10];switch(e){case"XYZ":this._y=Math.asin(Ln(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,u),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ln(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,u),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ln(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,u),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Ln(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,u),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Ln(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,u));break;case"XZY":this._z=Math.asin(-Ln(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,u),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 hg.makeRotationFromQuaternion(t),this.setFromRotationMatrix(hg,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return fg.setFromEuler(this),this.setFromQuaternion(fg,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}};nr.DEFAULT_ORDER="XYZ";var gc=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}},xv=0,dg=new nt,co=new Nr,Zi=new Ue,Hl=new nt,Ma=new nt,yv=new nt,vv=new Nr,pg=new nt(1,0,0),mg=new nt(0,1,0),gg=new nt(0,0,1),_g={type:"added"},Sv={type:"removed"},uo={type:"childadded",child:null},Ih={type:"childremoved",child:null},pn=class r extends Fr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:xv++}),this.uuid=Pa(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new nt,e=new nr,n=new Nr,i=new nt(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 Ue},normalMatrix:{value:new oe}}),this.matrix=new Ue,this.matrixWorld=new Ue,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new gc,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 co.setFromAxisAngle(t,e),this.quaternion.multiply(co),this}rotateOnWorldAxis(t,e){return co.setFromAxisAngle(t,e),this.quaternion.premultiply(co),this}rotateX(t){return this.rotateOnAxis(pg,t)}rotateY(t){return this.rotateOnAxis(mg,t)}rotateZ(t){return this.rotateOnAxis(gg,t)}translateOnAxis(t,e){return dg.copy(t).applyQuaternion(this.quaternion),this.position.add(dg.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(pg,t)}translateY(t){return this.translateOnAxis(mg,t)}translateZ(t){return this.translateOnAxis(gg,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Zi.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?Hl.copy(t):Hl.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Ma.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Zi.lookAt(Ma,Hl,this.up):Zi.lookAt(Hl,Ma,this.up),this.quaternion.setFromRotationMatrix(Zi),i&&(Zi.extractRotation(i.matrixWorld),co.setFromRotationMatrix(Zi),this.quaternion.premultiply(co.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(_g),uo.child=t,this.dispatchEvent(uo),uo.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(Sv),Ih.child=t,this.dispatchEvent(Ih),Ih.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),Zi.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Zi.multiply(t.parent.matrixWorld)),t.applyMatrix4(Zi),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(_g),uo.child=t,this.dispatchEvent(uo),uo.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(Ma,t,yv),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ma,vv,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,h=l.length;c<h;c++){let d=l[c];s(t.shapes,d)}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),h=o(t.images),d=o(t.shapes),f=o(t.skeletons),u=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),h.length>0&&(n.images=h),d.length>0&&(n.shapes=d),f.length>0&&(n.skeletons=f),u.length>0&&(n.animations=u),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let h=a[c];delete h.metadata,l.push(h)}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}};pn.DEFAULT_UP=new nt(0,1,0);pn.DEFAULT_MATRIX_AUTO_UPDATE=!0;pn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var di=new nt,Ji=new nt,Lh=new nt,$i=new nt,ho=new nt,fo=new nt,xg=new nt,Fh=new nt,Nh=new nt,Uh=new nt,So=class r{constructor(t=new nt,e=new nt,n=new nt){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),di.subVectors(t,e),i.cross(di);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){di.subVectors(i,e),Ji.subVectors(n,e),Lh.subVectors(t,e);let o=di.dot(di),a=di.dot(Ji),l=di.dot(Lh),c=Ji.dot(Ji),h=Ji.dot(Lh),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;let f=1/d,u=(c*l-a*h)*f,_=(o*h-a*l)*f;return s.set(1-u-_,_,u)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,$i)===null?!1:$i.x>=0&&$i.y>=0&&$i.x+$i.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,$i)===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,$i.x),l.addScaledVector(o,$i.y),l.addScaledVector(a,$i.z),l)}static isFrontFacing(t,e,n,i){return di.subVectors(n,e),Ji.subVectors(t,e),di.cross(Ji).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 di.subVectors(this.c,this.b),Ji.subVectors(this.a,this.b),di.cross(Ji).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;ho.subVectors(i,n),fo.subVectors(s,n),Fh.subVectors(t,n);let l=ho.dot(Fh),c=fo.dot(Fh);if(l<=0&&c<=0)return e.copy(n);Nh.subVectors(t,i);let h=ho.dot(Nh),d=fo.dot(Nh);if(h>=0&&d<=h)return e.copy(i);let f=l*d-h*c;if(f<=0&&l>=0&&h<=0)return o=l/(l-h),e.copy(n).addScaledVector(ho,o);Uh.subVectors(t,s);let u=ho.dot(Uh),_=fo.dot(Uh);if(_>=0&&u<=_)return e.copy(s);let g=u*c-l*_;if(g<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(fo,a);let p=h*_-u*d;if(p<=0&&d-h>=0&&u-_>=0)return xg.subVectors(s,i),a=(d-h)/(d-h+(u-_)),e.copy(i).addScaledVector(xg,a);let m=1/(p+g+f);return o=g*m,a=f*m,e.copy(n).addScaledVector(ho,o).addScaledVector(fo,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},c_={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},wr={h:0,s:0,l:0},Gl={h:0,s:0,l:0};function Oh(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 ge=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=jn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Se.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Se.workingColorSpace){return this.r=t,this.g=e,this.b=n,Se.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Se.workingColorSpace){if(t=cv(t,1),e=Ln(e,0,1),n=Ln(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=Oh(o,s,t+1/3),this.g=Oh(o,s,t),this.b=Oh(o,s,t-1/3)}return Se.toWorkingColorSpace(this,i),this}setStyle(t,e=jn){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=jn){let n=c_[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=wo(t.r),this.g=wo(t.g),this.b=wo(t.b),this}copyLinearToSRGB(t){return this.r=wh(t.r),this.g=wh(t.g),this.b=wh(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=jn){return Se.fromWorkingColorSpace(dn.copy(this),t),Math.round(Ln(dn.r*255,0,255))*65536+Math.round(Ln(dn.g*255,0,255))*256+Math.round(Ln(dn.b*255,0,255))}getHexString(t=jn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Se.workingColorSpace){Se.fromWorkingColorSpace(dn.copy(this),e);let n=dn.r,i=dn.g,s=dn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,h=(a+o)/2;if(a===o)l=0,c=0;else{let d=o-a;switch(c=h<=.5?d/(o+a):d/(2-o-a),o){case n:l=(i-s)/d+(i<s?6:0);break;case i:l=(s-n)/d+2;break;case s:l=(n-i)/d+4;break}l/=6}return t.h=l,t.s=c,t.l=h,t}getRGB(t,e=Se.workingColorSpace){return Se.fromWorkingColorSpace(dn.copy(this),e),t.r=dn.r,t.g=dn.g,t.b=dn.b,t}getStyle(t=jn){Se.fromWorkingColorSpace(dn.copy(this),t);let e=dn.r,n=dn.g,i=dn.b;return t!==jn?`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(wr),this.setHSL(wr.h+t,wr.s+e,wr.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(wr),t.getHSL(Gl);let n=Mh(wr.h,Gl.h,e),i=Mh(wr.s,Gl.s,e),s=Mh(wr.l,Gl.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}},dn=new ge;ge.NAMES=c_;var Mv=0,Ts=class extends Fr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Mv++}),this.uuid=Pa(),this.name="",this.type="Material",this.blending=Rr,this.side=Ir,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Zh,this.blendDst=Jh,this.blendEquation=Ss,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ge(0,0,0),this.blendAlpha=0,this.depthFunc=sc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=rg,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=io,this.stencilZFail=io,this.stencilZPass=io,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!==Rr&&(n.blending=this.blending),this.side!==Ir&&(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!==Zh&&(n.blendSrc=this.blendSrc),this.blendDst!==Jh&&(n.blendDst=this.blendDst),this.blendEquation!==Ss&&(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!==sc&&(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!==rg&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==io&&(n.stencilFail=this.stencilFail),this.stencilZFail!==io&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==io&&(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++}},_c=class extends Ts{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ge(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 nr,this.combine=jg,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 Ve=new nt,Wl=new _e,ti=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=sg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ar,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return hv("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++)Wl.fromBufferAttribute(this,e),Wl.applyMatrix3(t),this.setXY(e,Wl.x,Wl.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyMatrix3(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyMatrix4(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyNormalMatrix(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.transformDirection(t),this.setXYZ(e,Ve.x,Ve.y,Ve.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=ya(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=In(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ya(e,this.array)),e}setX(t,e){return this.normalized&&(e=In(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ya(e,this.array)),e}setY(t,e){return this.normalized&&(e=In(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=ya(e,this.array)),e}setZ(t,e){return this.normalized&&(e=In(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=ya(e,this.array)),e}setW(t,e){return this.normalized&&(e=In(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=In(e,this.array),n=In(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=In(e,this.array),n=In(n,this.array),i=In(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=In(e,this.array),n=In(n,this.array),i=In(i,this.array),s=In(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!==sg&&(t.usage=this.usage),t}};var xc=class extends ti{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var yc=class extends ti{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var ei=class extends ti{constructor(t,e,n){super(new Float32Array(t),e,n)}},bv=0,Kn=new Ue,Bh=new pn,po=new nt,Vn=new Es,ba=new Es,Ke=new nt,Fi=class r extends Fr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bv++}),this.uuid=Pa(),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(l_(t)?yc:xc)(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 oe().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 Kn.makeRotationFromQuaternion(t),this.applyMatrix4(Kn),this}rotateX(t){return Kn.makeRotationX(t),this.applyMatrix4(Kn),this}rotateY(t){return Kn.makeRotationY(t),this.applyMatrix4(Kn),this}rotateZ(t){return Kn.makeRotationZ(t),this.applyMatrix4(Kn),this}translate(t,e,n){return Kn.makeTranslation(t,e,n),this.applyMatrix4(Kn),this}scale(t,e,n){return Kn.makeScale(t,e,n),this.applyMatrix4(Kn),this}lookAt(t){return Bh.lookAt(t),Bh.updateMatrix(),this.applyMatrix4(Bh.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(po).negate(),this.translate(po.x,po.y,po.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 ei(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Es);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 nt(-1/0,-1/0,-1/0),new nt(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];Vn.setFromBufferAttribute(s),this.morphTargetsRelative?(Ke.addVectors(this.boundingBox.min,Vn.min),this.boundingBox.expandByPoint(Ke),Ke.addVectors(this.boundingBox.max,Vn.max),this.boundingBox.expandByPoint(Ke)):(this.boundingBox.expandByPoint(Vn.min),this.boundingBox.expandByPoint(Vn.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 Co);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 nt,1/0);return}if(t){let n=this.boundingSphere.center;if(Vn.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];ba.setFromBufferAttribute(a),this.morphTargetsRelative?(Ke.addVectors(Vn.min,ba.min),Vn.expandByPoint(Ke),Ke.addVectors(Vn.max,ba.max),Vn.expandByPoint(Ke)):(Vn.expandByPoint(ba.min),Vn.expandByPoint(ba.max))}Vn.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)Ke.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(Ke));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,h=a.count;c<h;c++)Ke.fromBufferAttribute(a,c),l&&(po.fromBufferAttribute(t,c),Ke.add(po)),i=Math.max(i,n.distanceToSquared(Ke))}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 ti(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let I=0;I<n.count;I++)a[I]=new nt,l[I]=new nt;let c=new nt,h=new nt,d=new nt,f=new _e,u=new _e,_=new _e,g=new nt,p=new nt;function m(I,M,y){c.fromBufferAttribute(n,I),h.fromBufferAttribute(n,M),d.fromBufferAttribute(n,y),f.fromBufferAttribute(s,I),u.fromBufferAttribute(s,M),_.fromBufferAttribute(s,y),h.sub(c),d.sub(c),u.sub(f),_.sub(f);let P=1/(u.x*_.y-_.x*u.y);isFinite(P)&&(g.copy(h).multiplyScalar(_.y).addScaledVector(d,-u.y).multiplyScalar(P),p.copy(d).multiplyScalar(u.x).addScaledVector(h,-_.x).multiplyScalar(P),a[I].add(g),a[M].add(g),a[y].add(g),l[I].add(p),l[M].add(p),l[y].add(p))}let b=this.groups;b.length===0&&(b=[{start:0,count:t.count}]);for(let I=0,M=b.length;I<M;++I){let y=b[I],P=y.start,L=y.count;for(let C=P,B=P+L;C<B;C+=3)m(t.getX(C+0),t.getX(C+1),t.getX(C+2))}let S=new nt,v=new nt,D=new nt,T=new nt;function w(I){D.fromBufferAttribute(i,I),T.copy(D);let M=a[I];S.copy(M),S.sub(D.multiplyScalar(D.dot(M))).normalize(),v.crossVectors(T,M);let P=v.dot(l[I])<0?-1:1;o.setXYZW(I,S.x,S.y,S.z,P)}for(let I=0,M=b.length;I<M;++I){let y=b[I],P=y.start,L=y.count;for(let C=P,B=P+L;C<B;C+=3)w(t.getX(C+0)),w(t.getX(C+1)),w(t.getX(C+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 ti(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let f=0,u=n.count;f<u;f++)n.setXYZ(f,0,0,0);let i=new nt,s=new nt,o=new nt,a=new nt,l=new nt,c=new nt,h=new nt,d=new nt;if(t)for(let f=0,u=t.count;f<u;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),h.subVectors(o,s),d.subVectors(i,s),h.cross(d),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,p),a.add(h),l.add(h),c.add(h),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,u=e.count;f<u;f+=3)i.fromBufferAttribute(e,f+0),s.fromBufferAttribute(e,f+1),o.fromBufferAttribute(e,f+2),h.subVectors(o,s),d.subVectors(i,s),h.cross(d),n.setXYZ(f+0,h.x,h.y,h.z),n.setXYZ(f+1,h.x,h.y,h.z),n.setXYZ(f+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Ke.fromBufferAttribute(t,e),Ke.normalize(),t.setXYZ(e,Ke.x,Ke.y,Ke.z)}toNonIndexed(){function t(a,l){let c=a.array,h=a.itemSize,d=a.normalized,f=new c.constructor(l.length*h),u=0,_=0;for(let g=0,p=l.length;g<p;g++){a.isInterleavedBufferAttribute?u=l[g]*a.data.stride+a.offset:u=l[g]*h;for(let m=0;m<h;m++)f[_++]=c[u++]}return new ti(f,h,d)}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 h=0,d=c.length;h<d;h++){let f=c[h],u=t(f,n);l.push(u)}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],h=[];for(let d=0,f=c.length;d<f;d++){let u=c[d];h.push(u.toJSON(t.data))}h.length>0&&(i[l]=h,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 h=i[c];this.setAttribute(c,h.clone(e))}let s=t.morphAttributes;for(let c in s){let h=[],d=s[c];for(let f=0,u=d.length;f<u;f++)h.push(d[f].clone(e));this.morphAttributes[c]=h}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,h=o.length;c<h;c++){let d=o[c];this.addGroup(d.start,d.count,d.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"})}},yg=new Ue,gs=new mc,Xl=new Co,vg=new nt,mo=new nt,go=new nt,_o=new nt,kh=new nt,Yl=new nt,ql=new _e,Zl=new _e,Jl=new _e,Sg=new nt,Mg=new nt,bg=new nt,$l=new nt,Kl=new nt,mi=class extends pn{constructor(t=new Fi,e=new _c){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){Yl.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let h=a[l],d=s[l];h!==0&&(kh.fromBufferAttribute(d,t),o?Yl.addScaledVector(kh,h):Yl.addScaledVector(kh.sub(e),h))}e.add(Yl)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Xl.copy(n.boundingSphere),Xl.applyMatrix4(s),gs.copy(t.ray).recast(t.near),!(Xl.containsPoint(gs.origin)===!1&&(gs.intersectSphere(Xl,vg)===null||gs.origin.distanceToSquared(vg)>(t.far-t.near)**2))&&(yg.copy(s).invert(),gs.copy(t.ray).applyMatrix4(yg),!(n.boundingBox!==null&&gs.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,gs)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,f=s.groups,u=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],b=Math.max(p.start,u.start),S=Math.min(a.count,Math.min(p.start+p.count,u.start+u.count));for(let v=b,D=S;v<D;v+=3){let T=a.getX(v),w=a.getX(v+1),I=a.getX(v+2);i=jl(this,m,t,n,c,h,d,T,w,I),i&&(i.faceIndex=Math.floor(v/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),g=Math.min(a.count,u.start+u.count);for(let p=_,m=g;p<m;p+=3){let b=a.getX(p),S=a.getX(p+1),v=a.getX(p+2);i=jl(this,o,t,n,c,h,d,b,S,v),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],b=Math.max(p.start,u.start),S=Math.min(l.count,Math.min(p.start+p.count,u.start+u.count));for(let v=b,D=S;v<D;v+=3){let T=v,w=v+1,I=v+2;i=jl(this,m,t,n,c,h,d,T,w,I),i&&(i.faceIndex=Math.floor(v/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),g=Math.min(l.count,u.start+u.count);for(let p=_,m=g;p<m;p+=3){let b=p,S=p+1,v=p+2;i=jl(this,o,t,n,c,h,d,b,S,v),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}}};function wv(r,t,e,n,i,s,o,a){let l;if(t.side===Fn?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===Ir,a),l===null)return null;Kl.copy(a),Kl.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Kl);return c<e.near||c>e.far?null:{distance:c,point:Kl.clone(),object:r}}function jl(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,mo),r.getVertexPosition(l,go),r.getVertexPosition(c,_o);let h=wv(r,t,e,n,mo,go,_o,$l);if(h){i&&(ql.fromBufferAttribute(i,a),Zl.fromBufferAttribute(i,l),Jl.fromBufferAttribute(i,c),h.uv=So.getInterpolation($l,mo,go,_o,ql,Zl,Jl,new _e)),s&&(ql.fromBufferAttribute(s,a),Zl.fromBufferAttribute(s,l),Jl.fromBufferAttribute(s,c),h.uv1=So.getInterpolation($l,mo,go,_o,ql,Zl,Jl,new _e)),o&&(Sg.fromBufferAttribute(o,a),Mg.fromBufferAttribute(o,l),bg.fromBufferAttribute(o,c),h.normal=So.getInterpolation($l,mo,go,_o,Sg,Mg,bg,new nt),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let d={a,b:l,c,normal:new nt,materialIndex:0};So.getNormal(mo,go,_o,d.normal),h.face=d}return h}var Aa=class r extends Fi{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=[],h=[],d=[],f=0,u=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 ei(c,3)),this.setAttribute("normal",new ei(h,3)),this.setAttribute("uv",new ei(d,2));function _(g,p,m,b,S,v,D,T,w,I,M){let y=v/w,P=D/I,L=v/2,C=D/2,B=T/2,J=w+1,O=I+1,Y=0,H=0,U=new nt;for(let R=0;R<O;R++){let at=R*P-C;for(let _t=0;_t<J;_t++){let Ut=_t*y-L;U[g]=Ut*b,U[p]=at*S,U[m]=B,c.push(U.x,U.y,U.z),U[g]=0,U[p]=0,U[m]=T>0?1:-1,h.push(U.x,U.y,U.z),d.push(_t/w),d.push(1-R/I),Y+=1}}for(let R=0;R<I;R++)for(let at=0;at<w;at++){let _t=f+at+J*R,Ut=f+at+J*(R+1),X=f+(at+1)+J*(R+1),ot=f+(at+1)+J*R;l.push(_t,Ut,ot),l.push(Ut,X,ot),H+=6}a.addGroup(u,H,M),u+=H,f+=Y}}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 Ro(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 En(r){let t={};for(let e=0;e<r.length;e++){let n=Ro(r[e]);for(let i in n)t[i]=n[i]}return t}function Ev(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function u_(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Se.workingColorSpace}var Tv={clone:Ro,merge:En},Av=`void main() {
|
|
1
|
+
(()=>{var nd=()=>{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=(h,d)=>{(d||!l.readyState||/loaded|complete/.test(l.readyState))&&(l.onload=l.onreadystatechange=null,l=void 0,d||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 Ni(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ud(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var Rn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Us={duration:.5,overwrite:!1,delay:0},hu,on,Ae,Xn=1e8,we=1/Xn,tu=Math.PI*2,W_=tu/4,X_=0,hd=Math.sqrt,Y_=Math.cos,q_=Math.sin,Ge=function(t){return typeof t=="string"},Ie=function(t){return typeof t=="function"},Oi=function(t){return typeof t=="number"},Ka=function(t){return typeof t>"u"},wi=function(t){return typeof t=="object"},Cn=function(t){return t!==!1},fu=function(){return typeof window<"u"},Ha=function(t){return Ie(t)||Ge(t)},fd=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},an=Array.isArray,eu=/(?:-?\.?\d|\.)+/gi,du=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Zr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,qc=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,pu=/[+-]=-?[.\d]+/,dd=/[^,'"\[\]\s]+/gi,Z_=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ce,Mi,nu,mu,Un={},Ya={},pd,md=function(t){return(Ya=qr(t,Un))&&ln},ja=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},Xo=function(t,e){return!e&&console.warn(t)},gd=function(t,e){return t&&(Un[t]=e)&&Ya&&(Ya[t]=e)||Un},Yo=function(){return 0},J_={suppressEvents:!0,isStart:!0,kill:!1},Ga={suppressEvents:!0,kill:!1},$_={suppressEvents:!0},gu={},cr=[],iu={},_d,An={},Zc={},id=30,Wa=[],_u="",xu=function(t){var e=t[0],n,i;if(wi(e)||Ie(e)||(t=[t]),!(n=(e._gsap||{}).harness)){for(i=Wa.length;i--&&!Wa[i].targetTest(e););n=Wa[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Su(t[i],n)))||t.splice(i,1);return t},ur=function(t){return t._gsap||xu(Yn(t))[0]._gsap},yu=function(t,e,n){return(n=t[e])&&Ie(n)?t[e]():Ka(n)&&t.getAttribute&&t.getAttribute(e)||n},gn=function(t,e){return(t=t.split(",")).forEach(e)||t},Le=function(t){return Math.round(t*1e5)/1e5||0},Ze=function(t){return Math.round(t*1e7)/1e7||0},Jr=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},K_=function(t,e){for(var n=e.length,i=0;t.indexOf(e[i])<0&&++i<n;);return i<n},qa=function(){var t=cr.length,e=cr.slice(0),n,i;for(iu={},cr.length=0,n=0;n<t;n++)i=e[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},xd=function(t,e,n,i){cr.length&&!on&&qa(),t.render(e,n,i||on&&e<0&&(t._initted||t._startAt)),cr.length&&!on&&qa()},yd=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(dd).length<2?e:Ge(t)?t.trim():t},vd=function(t){return t},qn=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},j_=function(t){return function(e,n){for(var i in n)i in e||i==="duration"&&t||i==="ease"||(e[i]=n[i])}},qr=function(t,e){for(var n in e)t[n]=e[n];return t},rd=function r(t,e){for(var n in e)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(t[n]=wi(e[n])?r(t[n]||(t[n]={}),e[n]):e[n]);return t},Za=function(t,e){var n={},i;for(i in t)i in e||(n[i]=t[i]);return n},Ho=function(t){var e=t.parent||Ce,n=t.keyframes?j_(an(t.keyframes)):qn;if(Cn(t.inherit))for(;e;)n(t,e.vars.defaults),e=e.parent||e._dp;return t},Q_=function(t,e){for(var n=t.length,i=n===e.length;i&&n--&&t[n]===e[n];);return n<0},Sd=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},Qa=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},hr=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Wr=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},t0=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},ru=function(t,e,n,i){return t._startAt&&(on?t._startAt.revert(Ga):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))},e0=function r(t){return!t||t._ts&&r(t.parent)},sd=function(t){return t._repeat?Os(t._tTime,t=t.duration()+t._rDelay)*t:0},Os=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},Ja=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},tl=function(t){return t._end=Ze(t._start+(t._tDur/Math.abs(t._ts||t._rts||we)||0))},el=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=Ze(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),tl(t),n._dirty||Wr(n,t)),t},Md=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=Ja(t.rawTime(),e),(!e._dur||Jo(0,e.totalDuration(),n)-e._tTime>we)&&e.render(n,!0)),Wr(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=-we}},bi=function(t,e,n,i){return e.parent&&hr(e),e._start=Ze((Oi(n)?n:n||t!==Ce?Wn(t,n,e):t._time)+e._delay),e._end=Ze(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Sd(t,e,"_first","_last",t._sort?"_start":0),su(e)||(t._recent=e),i||Md(t,e),t._ts<0&&el(t,t._tTime),t},bd=function(t,e){return(Un.ScrollTrigger||ja("scrollTrigger",e))&&Un.ScrollTrigger.create(e,t)},wd=function(t,e,n,i,s){if(wu(t,e,s),!t._initted)return 1;if(!n&&t._pt&&!on&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&_d!==Dn.frame)return cr.push(t),t._lazy=[s,i],1},n0=function r(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||r(e))},su=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},i0=function(t,e,n,i){var s=t.ratio,o=e<0||!e&&(!t._start&&n0(t)&&!(!t._initted&&su(t))||(t._ts<0||t._dp._ts<0)&&!su(t))?0:1,a=t._rDelay,l=0,c,h,d;if(a&&t._repeat&&(l=Jo(0,t._tDur,e),h=Os(l,a),t._yoyo&&h&1&&(o=1-o),h!==Os(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||on||i||t._zTime===we||!e&&t._zTime){if(!t._initted&&wd(t,e,i,n,l))return;for(d=t._zTime,t._zTime=e||(n?we:0),n||(n=e&&!d),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&&ru(t,e,n,!0),t._onUpdate&&!n&&Nn(t,"onUpdate"),l&&t._repeat&&!n&&t.parent&&Nn(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===o&&(o&&hr(t,1),!n&&!on&&(Nn(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},r0=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}},Bs=function(t,e,n,i){var s=t._repeat,o=Ze(e)||0,a=t._tTime/t._tDur;return a&&!i&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:Ze(o*(s+1)+t._rDelay*s):o,a>0&&!i&&el(t,t._tTime=t._tDur*a),t.parent&&tl(t),n||Wr(t.parent,t),t},od=function(t){return t instanceof Qe?Wr(t):Bs(t,t._dur)},s0={_start:0,endTime:Yo,totalDuration:Yo},Wn=function r(t,e,n){var i=t.labels,s=t._recent||s0,o=t.duration()>=Xn?s.endTime(!1):t._dur,a,l,c;return Ge(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*(an(n)?n[0]:n).totalDuration()),a>1?r(t,e.substr(0,a-1),n)+l:o+l)):e==null?o:+e},Go=function(t,e,n){var i=Oi(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=Cn(l.vars.inherit)&&l.parent;o.immediateRender=Cn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=e[s-1]}return new Ne(e[0],o,e[s+1])},fr=function(t,e){return t||t===0?e(t):e},Jo=function(t,e,n){return n<t?t:n>e?e:n},tn=function(t,e){return!Ge(t)||!(e=Z_.exec(t))?"":e[1]},o0=function(t,e,n){return fr(n,function(i){return Jo(t,e,i)})},ou=[].slice,Ed=function(t,e){return t&&wi(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&wi(t[0]))&&!t.nodeType&&t!==Mi},a0=function(t,e,n){return n===void 0&&(n=[]),t.forEach(function(i){var s;return Ge(i)&&!e||Ed(i,1)?(s=n).push.apply(s,Yn(i)):n.push(i)})||n},Yn=function(t,e,n){return Ae&&!e&&Ae.selector?Ae.selector(t):Ge(t)&&!n&&(nu||!ks())?ou.call((e||mu).querySelectorAll(t),0):an(t)?a0(t,n):Ed(t)?ou.call(t,0):t?[t]:[]},au=function(t){return t=Yn(t)[0]||Xo("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return Yn(e,n.querySelectorAll?n:n===t?Xo("Invalid scope")||mu.createElement("div"):t)}},Td=function(t){return t.sort(function(){return .5-Math.random()})},Ad=function(t){if(Ie(t))return t;var e=wi(t)?t:{each:t},n=Xr(e.ease),i=e.from||0,s=parseFloat(e.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,c=e.axis,h=i,d=i;return Ge(i)?h=d={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(h=i[0],d=i[1]),function(f,u,_){var g=(_||e).length,p=o[g],m,b,S,v,C,T,w,P,M;if(!p){if(M=e.grid==="auto"?0:(e.grid||[1,Xn])[1],!M){for(w=-Xn;w<(w=_[M++].getBoundingClientRect().left)&&M<g;);M<g&&M--}for(p=o[g]=[],m=l?Math.min(M,g)*h-.5:i%M,b=M===Xn?0:l?g*d/M-.5:i/M|0,w=0,P=Xn,T=0;T<g;T++)S=T%M-m,v=b-(T/M|0),p[T]=C=c?Math.abs(c==="y"?v:S):hd(S*S+v*v),C>w&&(w=C),C<P&&(P=C);i==="random"&&Td(p),p.max=w-P,p.min=P,p.v=g=(parseFloat(e.amount)||parseFloat(e.each)*(M>g?g-1:c?c==="y"?g/M:M:Math.max(M,g/M))||0)*(i==="edges"?-1:1),p.b=g<0?s-g:s,p.u=tn(e.amount||e.each)||0,n=n&&g<0?Ud(n):n}return g=(p[f]-p.min)/p.max||0,Ze(p.b+(n?n(g):g)*p.v)+p.u}},lu=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var i=Ze(Math.round(parseFloat(n)/t)*t*e);return(i-i%1)/e+(Oi(n)?0:tn(n))}},Dd=function(t,e){var n=an(t),i,s;return!n&&wi(t)&&(i=n=t.radius||Xn,t.values?(t=Yn(t.values),(s=!Oi(t[0]))&&(i*=i)):t=lu(t.increment)),fr(e,n?Ie(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=Xn,h=0,d=t.length,f,u;d--;)s?(f=t[d].x-a,u=t[d].y-l,f=f*f+u*u):f=Math.abs(t[d]-a),f<c&&(c=f,h=d);return h=!i||c<=i?t[h]:o,s||h===o||Oi(o)?h:h+tn(o)}:lu(t))},Cd=function(t,e,n,i){return fr(an(t)?!e:n===!0?!!(n=0):!i,function(){return an(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})},l0=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)}},c0=function(t,e){return function(n){return t(parseFloat(n))+(e||tn(n))}},u0=function(t,e,n){return Pd(t,e,0,1,n)},Rd=function(t,e,n){return fr(n,function(i){return t[~~e(i)]})},h0=function r(t,e,n){var i=e-t;return an(t)?Rd(t,r(0,t.length),e):fr(n,function(s){return(i+(s-t)%i)%i+t})},f0=function r(t,e,n){var i=e-t,s=i*2;return an(t)?Rd(t,r(0,t.length-1),e):fr(n,function(o){return o=(s+(o-t)%s)%s||0,t+(o>i?s-o:o)})},zs=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?dd:eu),n+=t.substr(e,i-e)+Cd(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),e=o+1;return n+t.substr(e,t.length-e)},Pd=function(t,e,n,i,s){var o=e-t,a=i-n;return fr(s,function(l){return n+((l-t)/o*a||0)})},d0=function r(t,e,n,i){var s=isNaN(t+e)?0:function(u){return(1-u)*t+u*e};if(!s){var o=Ge(t),a={},l,c,h,d,f;if(n===!0&&(i=1)&&(n=null),o)t={p:t},e={p:e};else if(an(t)&&!an(e)){for(h=[],d=t.length,f=d-2,c=1;c<d;c++)h.push(r(t[c-1],t[c]));d--,s=function(_){_*=d;var g=Math.min(f,~~_);return h[g](_-g)},n=e}else i||(t=qr(an(t)?[]:{},t));if(!h){for(l in e)Mu.call(a,t,l,"get",e[l]);s=function(_){return Au(_,a)||(o?t.p:t)}}}return fr(n,s)},ad=function(t,e,n){var i=t.labels,s=Xn,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},Nn=function(t,e,n){var i=t.vars,s=i[e],o=Ae,a=t._ctx,l,c,h;if(s)return l=i[e+"Params"],c=i.callbackScope||t,n&&cr.length&&qa(),a&&(Ae=a),h=l?s.apply(c,l):s.call(c),Ae=o,h},zo=function(t){return hr(t),t.scrollTrigger&&t.scrollTrigger.kill(!!on),t.progress()<1&&Nn(t,"onInterrupt"),t},Ns,Id=[],Ld=function(t){if(t)if(t=!t.name&&t.default||t,fu()||t.headless){var e=t.name,n=Ie(t),i=e&&!n&&t.init?function(){this._props=[]}:t,s={init:Yo,render:Au,add:Mu,kill:C0,modifier:D0,rawVars:0},o={targetTest:0,get:0,getSetter:nl,aliases:{},register:0};if(ks(),t!==i){if(An[e])return;qn(i,qn(Za(t,s),o)),qr(i.prototype,qr(s,Za(t,o))),An[i.prop=e]=i,t.targetTest&&(Wa.push(i),gu[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}gd(e,i),t.register&&t.register(ln,i,_n)}else Id.push(t)},Me=255,Vo={aqua:[0,Me,Me],lime:[0,Me,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Me],navy:[0,0,128],white:[Me,Me,Me],olive:[128,128,0],yellow:[Me,Me,0],orange:[Me,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Me,0,0],pink:[Me,192,203],cyan:[0,Me,Me],transparent:[Me,Me,Me,0]},Jc=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)*Me+.5|0},Fd=function(t,e,n){var i=t?Oi(t)?[t>>16,t>>8&Me,t&Me]:0:Vo.black,s,o,a,l,c,h,d,f,u,_;if(!i){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),Vo[t])i=Vo[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&Me,i&Me,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),i=[t>>16,t>>8&Me,t&Me]}else if(t.substr(0,3)==="hsl"){if(i=_=t.match(eu),!e)l=+i[0]%360/360,c=+i[1]/100,h=+i[2]/100,o=h<=.5?h*(c+1):h+c-h*c,s=h*2-o,i.length>3&&(i[3]*=1),i[0]=Jc(l+1/3,s,o),i[1]=Jc(l,s,o),i[2]=Jc(l-1/3,s,o);else if(~t.indexOf("="))return i=t.match(du),n&&i.length<4&&(i[3]=1),i}else i=t.match(eu)||Vo.transparent;i=i.map(Number)}return e&&!_&&(s=i[0]/Me,o=i[1]/Me,a=i[2]/Me,d=Math.max(s,o,a),f=Math.min(s,o,a),h=(d+f)/2,d===f?l=c=0:(u=d-f,c=h>.5?u/(2-d-f):u/(d+f),l=d===s?(o-a)/u+(o<a?6:0):d===o?(a-s)/u+2:(s-o)/u+4,l*=60),i[0]=~~(l+.5),i[1]=~~(c*100+.5),i[2]=~~(h*100+.5)),n&&i.length<4&&(i[3]=1),i},Nd=function(t){var e=[],n=[],i=-1;return t.split(Ui).forEach(function(s){var o=s.match(Zr)||[];e.push.apply(e,o),n.push(i+=o.length+1)}),e.c=n,e},ld=function(t,e,n){var i="",s=(t+i).match(Ui),o=e?"hsla(":"rgba(",a=0,l,c,h,d;if(!s)return t;if(s=s.map(function(f){return(f=Fd(f,e,1))&&o+(e?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(h=Nd(t),l=n.c,l.join(i)!==h.c.join(i)))for(c=t.replace(Ui,"1").split(Zr),d=c.length-1;a<d;a++)i+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:n).shift());if(!c)for(c=t.split(Ui),d=c.length-1;a<d;a++)i+=c[a]+s[a];return i+c[d]},Ui=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in Vo)r+="|"+t+"\\b";return new RegExp(r+")","gi")}(),p0=/hsl[a]?\(/,vu=function(t){var e=t.join(" "),n;if(Ui.lastIndex=0,Ui.test(e))return n=p0.test(e),t[1]=ld(t[1],n),t[0]=ld(t[0],n,Nd(t[1])),!0},qo,Dn=function(){var r=Date.now,t=500,e=33,n=r(),i=n,s=1e3/240,o=s,a=[],l,c,h,d,f,u,_=function g(p){var m=r()-i,b=p===!0,S,v,C,T;if((m>t||m<0)&&(n+=m-e),i+=m,C=i-n,S=C-o,(S>0||b)&&(T=++d.frame,f=C-d.time*1e3,d.time=C=C/1e3,o+=S+(S>=s?4:s-S),v=1),b||(l=c(g)),v)for(u=0;u<a.length;u++)a[u](C,f,T,p)};return d={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(p){return f/(1e3/(p||60))},wake:function(){pd&&(!nu&&fu()&&(Mi=nu=window,mu=Mi.document||{},Un.gsap=ln,(Mi.gsapVersions||(Mi.gsapVersions=[])).push(ln.version),md(Ya||Mi.GreenSockGlobals||!Mi.gsap&&Mi||{}),Id.forEach(Ld)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),c=h||function(p){return setTimeout(p,o-d.time*1e3+1|0)},qo=1,_(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),qo=0,c=Yo},lagSmoothing:function(p,m){t=p||1/0,e=Math.min(m||33,t)},fps:function(p){s=1e3/(p||240),o=d.time*1e3+s},add:function(p,m,b){var S=m?function(v,C,T,w){p(v,C,T,w),d.remove(S)}:p;return d.remove(p),a[b?"unshift":"push"](S),ks(),S},remove:function(p,m){~(m=a.indexOf(p))&&a.splice(m,1)&&u>=m&&u--},_listeners:a},d}(),ks=function(){return!qo&&Dn.wake()},fe={},m0=/^[\d.\-M][\d.\-,\s]/,g0=/["']/g,_0=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(g0,"").trim():+c,i=l.substr(a+1).trim();return e},x0=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)},y0=function(t){var e=(t+"").split("("),n=fe[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[_0(e[1])]:x0(t).split(",").map(yd)):fe._CE&&m0.test(t)?fe._CE("",t):n},Ud=function(t){return function(e){return 1-t(1-e)}},Od=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},Xr=function(t,e){return t&&(Ie(t)?t:fe[t]||y0(t))||e},$r=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 gn(t,function(a){fe[a]=Un[a]=s,fe[o=a.toLowerCase()]=n;for(var l in s)fe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=fe[a+"."+l]=s[l]}),s},Bd=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},$c=function r(t,e,n){var i=e>=1?e:1,s=(n||(t?.3:.45))/(e<1?e:1),o=s/tu*(Math.asin(1/i)||0),a=function(h){return h===1?1:i*Math.pow(2,-10*h)*q_((h-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:Bd(a);return s=tu/s,l.config=function(c,h){return r(t,c,h)},l},Kc=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)}:Bd(n);return i.config=function(s){return r(t,s)},i};gn("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,t){var e=t<5?t+1:t;$r(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})});fe.Linear.easeNone=fe.none=fe.Linear.easeIn;$r("Elastic",$c("in"),$c("out"),$c());(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};$r("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);$r("Expo",function(r){return r?Math.pow(2,10*(r-1)):0});$r("Circ",function(r){return-(hd(1-r*r)-1)});$r("Sine",function(r){return r===1?1:-Y_(r*W_)+1});$r("Back",Kc("in"),Kc("out"),Kc());fe.SteppedEase=fe.steps=Un.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-we;return function(a){return((i*Jo(0,o,a)|0)+s)*n}}};Us.ease=fe["quad.out"];gn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return _u+=r+","+r+"Params,"});var Su=function(t,e){this.id=X_++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:yu,this.set=e?e.getSetter:nl},Zo=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,Bs(this,+e.duration,1,1),this.data=e.data,Ae&&(this._ctx=Ae,Ae.data.push(this)),qo||Dn.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,Bs(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(n,i){if(ks(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(el(this,n),!s._dp||s.parent||Md(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)&&bi(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===we||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),xd(this,n,i)),this},t.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+sd(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)+sd(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?Os(this._tTime,s)+1:1},t.timeScale=function(n,i){if(!arguments.length)return this._rts===-we?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-we?0:this._rts,this.totalTime(Jo(-Math.abs(this._delay),this._tDur,s),i!==!1),tl(this),t0(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):(ks(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==we&&(this._tTime-=we)))),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)&&bi(i,this,n-this._delay),this}return this._start},t.endTime=function(n){return this._start+(Cn(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?Ja(i.rawTime(n),this):this._tTime:this._tTime},t.revert=function(n){n===void 0&&(n=$_);var i=on;return on=n,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),on=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,od(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,od(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(Wn(this,n),Cn(i))},t.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Cn(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?-we:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-we,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)-we)},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=Ie(n)?n:vd,a=function(){var c=i.then;i.then=null,Ie(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(){zo(this)},r}();qn(Zo.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:-we,_prom:0,_ps:!1,_rts:1});var Qe=function(r){ud(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=Cn(n.sortChildren),Ce&&bi(n.parent||Ce,Ni(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&bd(Ni(s),n.scrollTrigger),s}var e=t.prototype;return e.to=function(i,s,o){return Go(0,arguments,this),this},e.from=function(i,s,o){return Go(1,arguments,this),this},e.fromTo=function(i,s,o,a){return Go(2,arguments,this),this},e.set=function(i,s,o){return s.duration=0,s.parent=this,Ho(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Ne(i,s,Wn(this,o),1),this},e.call=function(i,s,o){return bi(this,Ne.delayedCall(0,i,s),o)},e.staggerTo=function(i,s,o,a,l,c,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new Ne(i,o,Wn(this,l)),this},e.staggerFrom=function(i,s,o,a,l,c,h){return o.runBackwards=1,Ho(o).immediateRender=Cn(o.immediateRender),this.staggerTo(i,s,o,a,l,c,h)},e.staggerFromTo=function(i,s,o,a,l,c,h,d){return a.startAt=o,Ho(a).immediateRender=Cn(a.immediateRender),this.staggerTo(i,s,a,l,c,h,d)},e.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=i<=0?0:Ze(i),d=this._zTime<0!=i<0&&(this._initted||!c),f,u,_,g,p,m,b,S,v,C,T,w;if(this!==Ce&&h>l&&i>=0&&(h=l),h!==this._tTime||o||d){if(a!==this._time&&c&&(h+=this._time-a,i+=this._time-a),f=h,v=this._start,S=this._ts,m=!S,d&&(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=Ze(h%p),h===l?(g=this._repeat,f=c):(g=~~(h/p),g&&g===h/p&&(f=c,g--),f>c&&(f=c)),C=Os(this._tTime,p),!a&&this._tTime&&C!==g&&this._tTime-C*p-this._dur<=0&&(C=g),T&&g&1&&(f=c-f,w=1),g!==C&&!this._lock){var P=T&&C&1,M=P===(T&&g&1);if(g<C&&(P=!P),a=P?0:h%c?c:h,this._lock=1,this.render(a||(w?0:Ze(g*p)),s,!c)._lock=0,this._tTime=h,!s&&this.parent&&Nn(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(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,M&&(this._lock=2,a=P?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;Od(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=r0(this,Ze(a),Ze(f)),b&&(h-=f-(f=b._start))),this._tTime=h,this._time=f,this._act=!S,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&f&&!s&&!g&&(Nn(this,"onStart"),this._tTime!==h))return this;if(f>=a&&i>=0)for(u=this._first;u;){if(_=u._next,(u._act||f>=u._start)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(f-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(f-u._start)*u._ts,s,o),f!==this._time||!this._ts&&!m){b=0,_&&(h+=this._zTime=-we);break}}u=_}else{u=this._last;for(var y=i<0?i:f;u;){if(_=u._prev,(u._act||y<=u._end)&&u._ts&&b!==u){if(u.parent!==this)return this.render(i,s,o);if(u.render(u._ts>0?(y-u._start)*u._ts:(u._dirty?u.totalDuration():u._tDur)+(y-u._start)*u._ts,s,o||on&&(u._initted||u._startAt)),f!==this._time||!this._ts&&!m){b=0,_&&(h+=this._zTime=y?-we:we);break}}u=_}}if(b&&!s&&(this.pause(),b.render(f>=a?0:-we)._zTime=f>=a?1:-1,this._ts))return this._start=v,tl(this),this.render(i,s,o);this._onUpdate&&!s&&Nn(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(v===this._start||Math.abs(S)!==Math.abs(this._ts))&&(this._lock||((i||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&hr(this,1),!s&&!(i<0&&!a)&&(h||a||!l)&&(Nn(this,h===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(i,s){var o=this;if(Oi(s)||(s=Wn(this,s,i)),!(i instanceof Zo)){if(an(i))return i.forEach(function(a){return o.add(a,s)}),this;if(Ge(i))return this.addLabel(i,s);if(Ie(i))i=Ne.delayedCall(0,i);else return this}return this!==i?bi(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=-Xn);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof Ne?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 Ge(i)?this.removeLabel(i):Ie(i)?this.killTweensOf(i):(Qa(this,i),i===this._recent&&(this._recent=this._last),Wr(this))},e.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ze(Dn.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]=Wn(this,s),this},e.removeLabel=function(i){return delete this.labels[i],this},e.addPause=function(i,s,o){var a=Ne.delayedCall(0,s||Yo,o);return a.data="isPause",this._hasPause=1,bi(this,a,Wn(this,i))},e.removePause=function(i){var s=this._first;for(i=Wn(this,i);s;)s._start===i&&s.data==="isPause"&&hr(s),s=s._next},e.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)lr!==a[l]&&a[l].kill(i,s);return this},e.getTweensOf=function(i,s){for(var o=[],a=Yn(i),l=this._first,c=Oi(s),h;l;)l instanceof Ne?K_(l._targets,a)&&(c?(!lr||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},e.tweenTo=function(i,s){s=s||{};var o=this,a=Wn(o,i),l=s,c=l.startAt,h=l.onStart,d=l.onStartParams,f=l.immediateRender,u,_=Ne.to(o,qn({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())||we,onStart:function(){if(o.pause(),!u){var p=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());_._dur!==p&&Bs(_,p,0,1).render(_._time,!0,!0),u=1}h&&h.apply(_,d||[])}},s));return f?_.render(0):_},e.tweenFromTo=function(i,s,o){return this.tweenTo(s,qn({startAt:{time:Wn(this,i)}},o))},e.recent=function(){return this._recent},e.nextLabel=function(i){return i===void 0&&(i=this._time),ad(this,Wn(this,i))},e.previousLabel=function(i){return i===void 0&&(i=this._time),ad(this,Wn(this,i),1)},e.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+we)},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 Wr(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={}),Wr(this)},e.totalDuration=function(i){var s=0,o=this,a=o._last,l=Xn,c,h,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(d=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,bi(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;Bs(o,o===Ce&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(i){if(Ce._ts&&(xd(Ce,Ja(i,Ce)),_d=Dn.frame),Dn.frame>=id){id+=Rn.autoSleep||120;var s=Ce._first;if((!s||!s._ts)&&Rn.autoSleep&&Dn._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Dn.sleep()}}},t}(Zo);qn(Qe.prototype,{_lock:0,_hasPause:0,_forcing:0});var v0=function(t,e,n,i,s,o,a){var l=new _n(this._pt,t,e,0,1,Tu,null,s),c=0,h=0,d,f,u,_,g,p,m,b;for(l.b=n,l.e=i,n+="",i+="",(m=~i.indexOf("random("))&&(i=zs(i)),o&&(b=[n,i],o(b,t,e),n=b[0],i=b[1]),f=n.match(qc)||[];d=qc.exec(i);)_=d[0],g=i.substring(c,d.index),u?u=(u+1)%5:g.substr(-5)==="rgba("&&(u=1),_!==f[h++]&&(p=parseFloat(f[h-1])||0,l._pt={_next:l._pt,p:g||h===1?g:",",s:p,c:_.charAt(1)==="="?Jr(p,_)-p:parseFloat(_)-p,m:u&&u<4?Math.round:0},c=qc.lastIndex);return l.c=c<i.length?i.substring(c,i.length):"",l.fp=a,(pu.test(i)||m)&&(l.e=0),this._pt=l,l},Mu=function(t,e,n,i,s,o,a,l,c,h){Ie(i)&&(i=i(s||0,t,o));var d=t[e],f=n!=="get"?n:Ie(d)?c?t[e.indexOf("set")||!Ie(t["get"+e.substr(3)])?e:"get"+e.substr(3)](c):t[e]():d,u=Ie(d)?c?E0:Vd:Eu,_;if(Ge(i)&&(~i.indexOf("random(")&&(i=zs(i)),i.charAt(1)==="="&&(_=Jr(f,i)+(tn(f)||0),(_||_===0)&&(i=_))),!h||f!==i||cu)return!isNaN(f*i)&&i!==""?(_=new _n(this._pt,t,e,+f||0,i-(f||0),typeof d=="boolean"?A0:Hd,0,u),c&&(_.fp=c),a&&_.modifier(a,this,t),this._pt=_):(!d&&!(e in t)&&ja(e,i),v0.call(this,t,e,f,i,u,l||Rn.stringFilter,c))},S0=function(t,e,n,i,s){if(Ie(t)&&(t=Wo(t,s,e,n,i)),!wi(t)||t.style&&t.nodeType||an(t)||fd(t))return Ge(t)?Wo(t,s,e,n,i):t;var o={},a;for(a in t)o[a]=Wo(t[a],s,e,n,i);return o},bu=function(t,e,n,i,s,o){var a,l,c,h;if(An[t]&&(a=new An[t]).init(s,a.rawVars?e[t]:S0(e[t],i,s,o,n),n,i,o)!==!1&&(n._pt=l=new _n(n._pt,s,t,0,1,a.render,a,0,a.priority),n!==Ns))for(c=n._ptLookup[n._targets.indexOf(s)],h=a._props.length;h--;)c[a._props[h]]=l;return a},lr,cu,wu=function r(t,e,n){var i=t.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,c=i.onUpdate,h=i.runBackwards,d=i.yoyoEase,f=i.keyframes,u=i.autoRevert,_=t._dur,g=t._startAt,p=t._targets,m=t.parent,b=m&&m.data==="nested"?m.vars.targets:p,S=t._overwrite==="auto"&&!hu,v=t.timeline,C,T,w,P,M,y,L,I,D,O,X,H,G;if(v&&(!f||!s)&&(s="none"),t._ease=Xr(s,Us.ease),t._yEase=d?Ud(Xr(d===!0?s:d,Us.ease)):0,d&&t._yoyo&&!t._repeat&&(d=t._yEase,t._yEase=t._ease,t._ease=d),t._from=!v&&!!i.runBackwards,!v||f&&!i.stagger){if(I=p[0]?ur(p[0]).harness:0,H=I&&i[I.prop],C=Za(i,gu),g&&(g._zTime<0&&g.progress(1),e<0&&h&&a&&!u?g.render(-1,!0):g.revert(h&&_?Ga:J_),g._lazy=0),o){if(hr(t._startAt=Ne.set(p,qn({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!g&&Cn(l),startAt:null,delay:0,onUpdate:c&&function(){return Nn(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(on||!a&&!u)&&t._startAt.revert(Ga),a&&_&&e<=0&&n<=0){e&&(t._zTime=e);return}}else if(h&&_&&!g){if(e&&(a=!1),w=qn({overwrite:!1,data:"isFromStart",lazy:a&&!g&&Cn(l),immediateRender:a,stagger:0,parent:m},C),H&&(w[I.prop]=H),hr(t._startAt=Ne.set(p,w)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(on?t._startAt.revert(Ga):t._startAt.render(-1,!0)),t._zTime=e,!a)r(t._startAt,we,we);else if(!e)return}for(t._pt=t._ptCache=0,l=_&&Cn(l)||l&&!_,T=0;T<p.length;T++){if(M=p[T],L=M._gsap||xu(p)[T]._gsap,t._ptLookup[T]=O={},iu[L.id]&&cr.length&&qa(),X=b===p?T:b.indexOf(M),I&&(D=new I).init(M,H||C,t,X,b)!==!1&&(t._pt=P=new _n(t._pt,M,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(B){O[B]=P}),D.priority&&(y=1)),!I||H)for(w in C)An[w]&&(D=bu(w,C,t,X,M,b))?D.priority&&(y=1):O[w]=P=Mu.call(t,M,w,"get",C[w],X,b,0,i.stringFilter);t._op&&t._op[T]&&t.kill(M,t._op[T]),S&&t._pt&&(lr=t,Ce.killTweensOf(M,O,t.globalTime(e)),G=!t.parent,lr=0),t._pt&&l&&(iu[L.id]=1)}y&&Du(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!G,f&&e<=0&&v.render(Xn,!0,!0)},M0=function(t,e,n,i,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[e],h,d,f,u;if(!c)for(c=t._ptCache[e]=[],f=t._ptLookup,u=t._targets.length;u--;){if(h=f[u][e],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return cu=1,t.vars[e]="+=0",wu(t,a),cu=0,l?Xo(e+" not eligible for reset"):1;c.push(h)}for(u=c.length;u--;)d=c[u],h=d._pt||d,h.s=(i||i===0)&&!s?i:h.s+(i||0)+o*h.c,h.c=n-h.s,d.e&&(d.e=Le(n)+tn(d.e)),d.b&&(d.b=h.s+tn(d.b))},b0=function(t,e){var n=t[0]?ur(t[0]).harness:0,i=n&&n.aliases,s,o,a,l;if(!i)return e;s=qr({},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},w0=function(t,e,n,i){var s=e.ease||i||"power1.inOut",o,a;if(an(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})},Wo=function(t,e,n,i,s){return Ie(t)?t.call(e,n,i,s):Ge(t)&&~t.indexOf("random(")?zs(t):t},kd=_u+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",zd={};gn(kd+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return zd[r]=1});var Ne=function(r){ud(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:Ho(i))||this;var l=a.vars,c=l.duration,h=l.delay,d=l.immediateRender,f=l.stagger,u=l.overwrite,_=l.keyframes,g=l.defaults,p=l.scrollTrigger,m=l.yoyoEase,b=i.parent||Ce,S=(an(n)||fd(n)?Oi(n[0]):"length"in i)?[n]:Yn(n),v,C,T,w,P,M,y,L;if(a._targets=S.length?xu(S):Xo("GSAP target "+n+" not found. https://gsap.com",!Rn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=u,_||f||Ha(c)||Ha(h)){if(i=a.vars,v=a.timeline=new Qe({data:"nested",defaults:g||{},targets:b&&b.data==="nested"?b.vars.targets:S}),v.kill(),v.parent=v._dp=Ni(a),v._start=0,f||Ha(c)||Ha(h)){if(w=S.length,y=f&&Ad(f),wi(f))for(P in f)~kd.indexOf(P)&&(L||(L={}),L[P]=f[P]);for(C=0;C<w;C++)T=Za(i,zd),T.stagger=0,m&&(T.yoyoEase=m),L&&qr(T,L),M=S[C],T.duration=+Wo(c,Ni(a),C,M,S),T.delay=(+Wo(h,Ni(a),C,M,S)||0)-a._delay,!f&&w===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),v.to(M,T,y?y(C,M,S):0),v._ease=fe.none;v.duration()?c=h=0:a.timeline=0}else if(_){Ho(qn(v.vars.defaults,{ease:"none"})),v._ease=Xr(_.ease||i.ease||"none");var I=0,D,O,X;if(an(_))_.forEach(function(H){return v.to(S,H,">")}),v.duration();else{T={};for(P in _)P==="ease"||P==="easeEach"||w0(P,_[P],T,_.easeEach);for(P in T)for(D=T[P].sort(function(H,G){return H.t-G.t}),I=0,C=0;C<D.length;C++)O=D[C],X={ease:O.e,duration:(O.t-(C?D[C-1].t:0))/100*c},X[P]=O.v,v.to(S,X,I),I+=X.duration;v.duration()<c&&v.to({},{duration:c-v.duration()})}}c||a.duration(c=v.duration())}else a.timeline=0;return u===!0&&!hu&&(lr=Ni(a),Ce.killTweensOf(S),lr=0),bi(b,Ni(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(d||!c&&!_&&a._start===Ze(b._time)&&Cn(d)&&e0(Ni(a))&&b.data!=="nested")&&(a._tTime=-we,a.render(Math.max(0,-h)||0)),p&&bd(Ni(a),p),a}var e=t.prototype;return e.render=function(i,s,o){var a=this._time,l=this._tDur,c=this._dur,h=i<0,d=i>l-we&&!h?l:i<we?0:i,f,u,_,g,p,m,b,S,v;if(!c)i0(this,i,s,o);else if(d!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(f=d,S=this.timeline,this._repeat){if(g=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(g*100+i,s,o);if(f=Ze(d%g),d===l?(_=this._repeat,f=c):(_=~~(d/g),_&&_===Ze(d/g)&&(f=c,_--),f>c&&(f=c)),m=this._yoyo&&_&1,m&&(v=this._yEase,f=c-f),p=Os(this._tTime,g),f===a&&!o&&this._initted&&_===p)return this._tTime=d,this;_!==p&&(S&&this._yEase&&Od(S,m),this.vars.repeatRefresh&&!m&&!this._lock&&this._time!==g&&this._initted&&(this._lock=o=1,this.render(Ze(g*_),!0).invalidate()._lock=0))}if(!this._initted){if(wd(this,h?i:f,o,s,d))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=d,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(v||this._ease)(f/c),this._from&&(this.ratio=b=1-b),f&&!a&&!s&&!_&&(Nn(this,"onStart"),this._tTime!==d))return this;for(u=this._pt;u;)u.r(b,u.d),u=u._next;S&&S.render(i<0?i:S._dur*S._ease(f/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(h&&ru(this,i,s,o),Nn(this,"onUpdate")),this._repeat&&_!==p&&this.vars.onRepeat&&!s&&this.parent&&Nn(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(h&&!this._onUpdate&&ru(this,i,!0,!0),(i||!c)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&hr(this,1),!s&&!(h&&!a)&&(d||a||m)&&(Nn(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<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){qo||Dn.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||wu(this,c),h=this._ease(c/this._dur),M0(this,i,s,o,a,h,c,l)?this.resetTo(i,s,o,a,1):(el(this,0),this.parent||Sd(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?zo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,lr&&lr.vars.overwrite!==!0)._first||zo(this),this.parent&&o!==this.timeline.totalDuration()&&Bs(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?Yn(i):a,c=this._ptLookup,h=this._pt,d,f,u,_,g,p,m;if((!s||s==="all")&&Q_(a,l))return s==="all"&&(this._pt=0),zo(this);for(d=this._op=this._op||[],s!=="all"&&(Ge(s)&&(g={},gn(s,function(b){return g[b]=1}),s=g),s=b0(a,s)),m=a.length;m--;)if(~l.indexOf(a[m])){f=c[m],s==="all"?(d[m]=s,_=f,u={}):(u=d[m]=d[m]||{},_=s);for(g in _)p=f&&f[g],p&&((!("kill"in p.d)||p.d.kill(g)===!0)&&Qa(this,p,"_pt"),delete f[g]),u!=="all"&&(u[g]=1)}return this._initted&&!this._pt&&h&&zo(this),this},t.to=function(i,s){return new t(i,s,arguments[2])},t.from=function(i,s){return Go(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 Go(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 Ce.killTweensOf(i,s,o)},t}(Zo);qn(Ne.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});gn("staggerTo,staggerFrom,staggerFromTo",function(r){Ne[r]=function(){var t=new Qe,e=ou.call(arguments,0);return e.splice(r==="staggerFromTo"?5:4,0,0),t[r].apply(t,e)}});var Eu=function(t,e,n){return t[e]=n},Vd=function(t,e,n){return t[e](n)},E0=function(t,e,n,i){return t[e](i.fp,n)},T0=function(t,e,n){return t.setAttribute(e,n)},nl=function(t,e){return Ie(t[e])?Vd:Ka(t[e])&&t.setAttribute?T0:Eu},Hd=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},A0=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Tu=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)},Au=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},D0=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},C0=function(t){for(var e=this._pt,n,i;e;)i=e._next,e.p===t&&!e.op||e.op===t?Qa(this,e,"_pt"):e.dep||(n=1),e=i;return!n},R0=function(t,e,n,i){i.mSet(t,e,i.m.call(i.tween,n,i.mt),i)},Du=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},_n=function(){function r(e,n,i,s,o,a,l,c,h){this.t=n,this.s=s,this.c=o,this.p=i,this.r=a||Hd,this.d=l||this,this.set=c||Eu,this.pr=h||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=R0,this.m=n,this.mt=s,this.tween=i},r}();gn(_u+"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 gu[r]=1});Un.TweenMax=Un.TweenLite=Ne;Un.TimelineLite=Un.TimelineMax=Qe;Ce=new Qe({sortChildren:!1,defaults:Us,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Rn.stringFilter=vu;var Yr=[],Xa={},P0=[],cd=0,I0=0,jc=function(t){return(Xa[t]||P0).map(function(e){return e()})},uu=function(){var t=Date.now(),e=[];t-cd>2&&(jc("matchMediaInit"),Yr.forEach(function(n){var i=n.queries,s=n.conditions,o,a,l,c;for(a in i)o=Mi.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&e.push(n))}),jc("matchMediaRevert"),e.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),cd=t,jc("matchMedia"))},Gd=function(){function r(e,n){this.selector=n&&au(n),this.data=[],this._r=[],this.isReverted=!1,this.id=I0++,e&&this.add(e)}var t=r.prototype;return t.add=function(n,i,s){Ie(n)&&(s=i,i=n,n=Ie);var o=this,a=function(){var c=Ae,h=o.selector,d;return c&&c!==o&&c.data.push(o),s&&(o.selector=au(s)),Ae=o,d=i.apply(o,arguments),Ie(d)&&o._r.push(d),Ae=c,o.selector=h,o.isReverted=!1,d};return o.last=a,n===Ie?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},t.ignore=function(n){var i=Ae;Ae=null,n(this),Ae=i},t.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof Ne&&!(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(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,d){return d.g-h.g||-1/0}).forEach(function(h){return h.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 Ne)&&c.revert&&c.revert(n);s._r.forEach(function(h){return h(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=Yr.length;o--;)Yr[o].id===this.id&&Yr.splice(o,1)},t.revert=function(n){this.kill(n||{})},r}(),L0=function(){function r(e){this.contexts=[],this.scope=e,Ae&&Ae.data.push(this)}var t=r.prototype;return t.add=function(n,i,s){wi(n)||(n={matches:n});var o=new Gd(0,s||this.scope),a=o.conditions={},l,c,h;Ae&&!o.selector&&(o.selector=Ae.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(c in n)c==="all"?h=1:(l=Mi.matchMedia(n[c]),l&&(Yr.indexOf(o)<0&&Yr.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(uu):l.addEventListener("change",uu)));return h&&i(o,function(d){return o.add(null,d)}),this},t.revert=function(n){this.kill(n||{})},t.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),$a={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 Ld(i)})},timeline:function(t){return new Qe(t)},getTweensOf:function(t,e){return Ce.getTweensOf(t,e)},getProperty:function(t,e,n,i){Ge(t)&&(t=Yn(t)[0]);var s=ur(t||{}).get,o=n?vd:yd;return n==="native"&&(n=""),t&&(e?o((An[e]&&An[e].get||s)(t,e,n,i)):function(a,l,c){return o((An[a]&&An[a].get||s)(t,a,l,c))})},quickSetter:function(t,e,n){if(t=Yn(t),t.length>1){var i=t.map(function(h){return ln.quickSetter(h,e,n)}),s=i.length;return function(h){for(var d=s;d--;)i[d](h)}}t=t[0]||{};var o=An[e],a=ur(t),l=a.harness&&(a.harness.aliases||{})[e]||e,c=o?function(h){var d=new o;Ns._pt=0,d.init(t,n?h+n:h,Ns,0,[t]),d.render(1,d),Ns._pt&&Au(1,Ns)}:a.set(t,l);return o?c:function(h){return c(t,l,n?h+n:h,a,1)}},quickTo:function(t,e,n){var i,s=ln.to(t,qr((i={},i[e]="+=0.1",i.paused=!0,i),n||{})),o=function(l,c,h){return s.resetTo(e,l,c,h)};return o.tween=s,o},isTweening:function(t){return Ce.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Xr(t.ease,Us.ease)),rd(Us,t||{})},config:function(t){return rd(Rn,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&&!An[a]&&!Un[a]&&Xo(e+" effect requires "+a+" plugin.")}),Zc[e]=function(a,l,c){return n(Yn(a),qn(l||{},s),c)},o&&(Qe.prototype[e]=function(a,l,c){return this.add(Zc[e](a,wi(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,e){fe[t]=Xr(e)},parseEase:function(t,e){return arguments.length?Xr(t,e):fe},getById:function(t){return Ce.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var n=new Qe(t),i,s;for(n.smoothChildTiming=Cn(t.smoothChildTiming),Ce.remove(n),n._dp=0,n._time=n._tTime=Ce._time,i=Ce._first;i;)s=i._next,(e||!(!i._dur&&i instanceof Ne&&i.vars.onComplete===i._targets[0]))&&bi(n,i,i._start-i._delay),i=s;return bi(Ce,n,0),n},context:function(t,e){return t?new Gd(t,e):Ae},matchMedia:function(t){return new L0(t)},matchMediaRefresh:function(){return Yr.forEach(function(t){var e=t.conditions,n,i;for(i in e)e[i]&&(e[i]=!1,n=1);n&&t.revert()})||uu()},addEventListener:function(t,e){var n=Xa[t]||(Xa[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=Xa[t],i=n&&n.indexOf(e);i>=0&&n.splice(i,1)},utils:{wrap:h0,wrapYoyo:f0,distribute:Ad,random:Cd,snap:Dd,normalize:u0,getUnit:tn,clamp:o0,splitColor:Fd,toArray:Yn,selector:au,mapRange:Pd,pipe:l0,unitize:c0,interpolate:d0,shuffle:Td},install:md,effects:Zc,ticker:Dn,updateRoot:Qe.updateRoot,plugins:An,globalTimeline:Ce,core:{PropTween:_n,globals:gd,Tween:Ne,Timeline:Qe,Animation:Zo,getCache:ur,_removeLinkedListItem:Qa,reverting:function(){return on},context:function(t){return t&&Ae&&(Ae.data.push(t),t._ctx=Ae),Ae},suppressOverwrites:function(t){return hu=t}}};gn("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return $a[r]=Ne[r]});Dn.add(Qe.updateRoot);Ns=$a.to({},{duration:0});var F0=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},N0=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=F0(o,i)),o&&o.modifier&&o.modifier(e[i],t,n[s],i))},Qc=function(t,e){return{name:t,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,c;if(Ge(s)&&(l={},gn(s,function(h){return l[h]=1}),s=l),e){l={};for(c in s)l[c]=e(s[c]);s=l}N0(a,s)}}}},ln=$a.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;)on?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)}},Qc("roundProps",lu),Qc("modifiers"),Qc("snap",Dd))||$a;Ne.version=Qe.version=ln.version="3.12.5";pd=1;fu()&&ks();var U0=fe.Power0,O0=fe.Power1,B0=fe.Power2,k0=fe.Power3,z0=fe.Power4,V0=fe.Linear,H0=fe.Quad,G0=fe.Cubic,W0=fe.Quart,X0=fe.Quint,Y0=fe.Strong,q0=fe.Elastic,Z0=fe.Back,J0=fe.SteppedEase,$0=fe.Bounce,K0=fe.Sine,j0=fe.Expo,Q0=fe.Circ;var Wd,dr,Hs,Nu,ts,tx,Xd,Uu,ex=function(){return typeof window<"u"},ki={},Qr=180/Math.PI,Gs=Math.PI/180,Vs=Math.atan2,Yd=1e8,Ou=/([A-Z])/g,nx=/(left|right|width|margin|padding|x)/i,ix=/[\s,\(]\S/,Ei={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Pu=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},rx=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)},sx=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)},ox=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Qd=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},tp=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},ax=function(t,e,n){return t.style[e]=n},lx=function(t,e,n){return t.style.setProperty(e,n)},cx=function(t,e,n){return t._gsap[e]=n},ux=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},hx=function(t,e,n,i,s){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},fx=function(t,e,n,i,s){var o=t._gsap;o[e]=n,o.renderTransform(s,o)},Re="transform",Pn=Re+"Origin",dx=function r(t,e){var n=this,i=this.target,s=i.style,o=i._gsap;if(t in ki&&s){if(this.tfm=this.tfm||{},t!=="transform")t=Ei[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return n.tfm[a]=Bi(i,a)}):this.tfm[t]=o.x?o[t]:Bi(i,t),t===Pn&&(this.tfm.zOrigin=o.zOrigin);else return Ei.transform.split(",").forEach(function(a){return r.call(n,a,e)});if(this.props.indexOf(Re)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Pn,e,"")),t=Re}(s||e)&&this.props.push(t,e,s[t])},ep=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},px=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(Ou,"-$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=Uu(),(!s||!s.isStart)&&!n[Re]&&(ep(n),i.zOrigin&&n[Pn]&&(n[Pn]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},np=function(t,e){var n={target:t,props:[],revert:px,save:dx};return t._gsap||ln.core.getCache(t),e&&e.split(",").forEach(function(i){return n.save(i)}),n},ip,Iu=function(t,e){var n=dr.createElementNS?dr.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):dr.createElement(t);return n&&n.style?n:dr.createElement(t)},Ti=function r(t,e,n){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(Ou,"-$1").toLowerCase())||i.getPropertyValue(e)||!n&&r(t,Ws(e)||e,1)||""},qd="O,Moz,ms,Ms,Webkit".split(","),Ws=function(t,e,n){var i=e||ts,s=i.style,o=5;if(t in s&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(qd[o]+t in s););return o<0?null:(o===3?"ms":o>=0?qd[o]:"")+t},Lu=function(){ex()&&window.document&&(Wd=window,dr=Wd.document,Hs=dr.documentElement,ts=Iu("div")||{style:{}},tx=Iu("div"),Re=Ws(Re),Pn=Re+"Origin",ts.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ip=!!Ws("perspective"),Uu=ln.core.reverting,Nu=1)},Cu=function r(t){var e=Iu("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(Hs.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)),Hs.removeChild(e),this.style.cssText=s,o},Zd=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},rp=function(t){var e;try{e=t.getBBox()}catch{e=Cu.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Cu||(e=Cu.call(t,!0)),e&&!e.width&&!e.x&&!e.y?{x:+Zd(t,["x","cx","x1"])||0,y:+Zd(t,["y","cy","y1"])||0,width:0,height:0}:e},sp=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&rp(t))},es=function(t,e){if(e){var n=t.style,i;e in ki&&e!==Pn&&(e=Re),n.removeProperty?(i=e.substr(0,2),(i==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),n.removeProperty(i==="--"?e:e.replace(Ou,"-$1").toLowerCase())):n.removeAttribute(e)}},pr=function(t,e,n,i,s,o){var a=new _n(t._pt,e,n,0,1,o?tp:Qd);return t._pt=a,a.b=i,a.e=s,t._props.push(n),a},Jd={deg:1,rad:1,turn:1},mx={grid:1,flex:1},mr=function r(t,e,n,i){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=ts.style,l=nx.test(e),c=t.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),d=100,f=i==="px",u=i==="%",_,g,p,m;if(i===o||!s||Jd[i]||Jd[o])return s;if(o!=="px"&&!f&&(s=r(t,e,n,"px")),m=t.getCTM&&sp(t),(u||o==="%")&&(ki[e]||~e.indexOf("adius")))return _=m?t.getBBox()[l?"width":"height"]:t[h],Le(u?s/_*d:s/100*_);if(a[l?"width":"height"]=d+(f?o:i),g=~e.indexOf("adius")||i==="em"&&t.appendChild&&!c?t:t.parentNode,m&&(g=(t.ownerSVGElement||{}).parentNode),(!g||g===dr||!g.appendChild)&&(g=dr.body),p=g._gsap,p&&u&&p.width&&l&&p.time===Dn.time&&!p.uncache)return Le(s/p.width*d);if(u&&(e==="height"||e==="width")){var b=t.style[e];t.style[e]=d+i,_=t[h],b?t.style[e]=b:es(t,e)}else(u||o==="%")&&!mx[Ti(g,"display")]&&(a.position=Ti(t,"position")),g===t&&(a.position="static"),g.appendChild(ts),_=ts[h],g.removeChild(ts),a.position="absolute";return l&&u&&(p=ur(g),p.time=Dn.time,p.width=g[h]),Le(f?_*s/d:_&&s?d/_*s:0)},Bi=function(t,e,n,i){var s;return Nu||Lu(),e in Ei&&e!=="transform"&&(e=Ei[e],~e.indexOf(",")&&(e=e.split(",")[0])),ki[e]&&e!=="transform"?(s=jo(t,i),s=e!=="transformOrigin"?s[e]:s.svg?s.origin:rl(Ti(t,Pn))+" "+s.zOrigin+"px"):(s=t.style[e],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=il[e]&&il[e](t,e,n)||Ti(t,e)||yu(t,e)||(e==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?mr(t,e,s,n)+n:s},gx=function(t,e,n,i){if(!n||n==="none"){var s=Ws(e,t,1),o=s&&Ti(t,s,1);o&&o!==n?(e=s,n=o):e==="borderColor"&&(n=Ti(t,"borderTopColor"))}var a=new _n(this._pt,t.style,e,0,1,Tu),l=0,c=0,h,d,f,u,_,g,p,m,b,S,v,C;if(a.b=n,a.e=i,n+="",i+="",i==="auto"&&(g=t.style[e],t.style[e]=i,i=Ti(t,e)||i,g?t.style[e]=g:es(t,e)),h=[n,i],vu(h),n=h[0],i=h[1],f=n.match(Zr)||[],C=i.match(Zr)||[],C.length){for(;d=Zr.exec(i);)p=d[0],b=i.substring(l,d.index),_?_=(_+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(_=1),p!==(g=f[c++]||"")&&(u=parseFloat(g)||0,v=g.substr((u+"").length),p.charAt(1)==="="&&(p=Jr(u,p)+v),m=parseFloat(p),S=p.substr((m+"").length),l=Zr.lastIndex-S.length,S||(S=S||Rn.units[e]||v,l===i.length&&(i+=S,a.e+=S)),v!==S&&(u=mr(t,e,g,S)||0),a._pt={_next:a._pt,p:b||c===1?b:",",s:u,c:m-u,m:_&&_<4||e==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=e==="display"&&i==="none"?tp:Qd;return pu.test(i)&&(a.e=0),this._pt=a,a},$d={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_x=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]=$d[n]||n,e[1]=$d[i]||i,e.join(" ")},xx=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],ki[a]&&(l=1,a=a==="transformOrigin"?Pn:Re),es(n,a);l&&(es(n,Re),o&&(o.svg&&n.removeAttribute("transform"),jo(n,1),o.uncache=1,ep(i)))}},il={clearProps:function(t,e,n,i,s){if(s.data!=="isFromStart"){var o=t._pt=new _n(t._pt,e,n,0,0,xx);return o.u=i,o.pr=-10,o.tween=s,t._props.push(n),1}}},Ko=[1,0,0,1,0,0],op={},ap=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Kd=function(t){var e=Ti(t,Re);return ap(e)?Ko:e.substr(7).match(du).map(Le)},Bu=function(t,e){var n=t._gsap||ur(t),i=t.style,s=Kd(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"?Ko:s):(s===Ko&&!t.offsetParent&&t!==Hs&&!n.svg&&(l=i.display,i.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,Hs.appendChild(t)),s=Kd(t),l?i.display=l:es(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):Hs.removeChild(t))),e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Fu=function(t,e,n,i,s,o){var a=t._gsap,l=s||Bu(t,!0),c=a.xOrigin||0,h=a.yOrigin||0,d=a.xOffset||0,f=a.yOffset||0,u=l[0],_=l[1],g=l[2],p=l[3],m=l[4],b=l[5],S=e.split(" "),v=parseFloat(S[0])||0,C=parseFloat(S[1])||0,T,w,P,M;n?l!==Ko&&(w=u*p-_*g)&&(P=v*(p/w)+C*(-g/w)+(g*b-p*m)/w,M=v*(-_/w)+C*(u/w)-(u*b-_*m)/w,v=P,C=M):(T=rp(t),v=T.x+(~S[0].indexOf("%")?v/100*T.width:v),C=T.y+(~(S[1]||S[0]).indexOf("%")?C/100*T.height:C)),i||i!==!1&&a.smooth?(m=v-c,b=C-h,a.xOffset=d+(m*u+b*g)-m,a.yOffset=f+(m*_+b*p)-b):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=C,a.smooth=!!i,a.origin=e,a.originIsAbsolute=!!n,t.style[Pn]="0px 0px",o&&(pr(o,a,"xOrigin",c,v),pr(o,a,"yOrigin",h,C),pr(o,a,"xOffset",d,a.xOffset),pr(o,a,"yOffset",f,a.yOffset)),t.setAttribute("data-svg-origin",v+" "+C)},jo=function(t,e){var n=t._gsap||new Su(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=Ti(t,Pn)||"0",h,d,f,u,_,g,p,m,b,S,v,C,T,w,P,M,y,L,I,D,O,X,H,G,B,U,R,at,_t,Ut,q,ot;return h=d=f=g=p=m=b=S=v=0,u=_=1,n.svg=!!(t.getCTM&&sp(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Re]=(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[Re]!=="none"?l[Re]:"")),i.scale=i.rotate=i.translate="none"),w=Bu(t,n.svg),n.svg&&(n.uncache?(B=t.getBBox(),c=n.xOrigin-B.x+"px "+(n.yOrigin-B.y)+"px",G=""):G=!e&&t.getAttribute("data-svg-origin"),Fu(t,G||c,!!G||n.originIsAbsolute,n.smooth!==!1,w)),C=n.xOrigin||0,T=n.yOrigin||0,w!==Ko&&(L=w[0],I=w[1],D=w[2],O=w[3],h=X=w[4],d=H=w[5],w.length===6?(u=Math.sqrt(L*L+I*I),_=Math.sqrt(O*O+D*D),g=L||I?Vs(I,L)*Qr:0,b=D||O?Vs(D,O)*Qr+g:0,b&&(_*=Math.abs(Math.cos(b*Gs))),n.svg&&(h-=C-(C*L+T*D),d-=T-(C*I+T*O))):(ot=w[6],Ut=w[7],R=w[8],at=w[9],_t=w[10],q=w[11],h=w[12],d=w[13],f=w[14],P=Vs(ot,_t),p=P*Qr,P&&(M=Math.cos(-P),y=Math.sin(-P),G=X*M+R*y,B=H*M+at*y,U=ot*M+_t*y,R=X*-y+R*M,at=H*-y+at*M,_t=ot*-y+_t*M,q=Ut*-y+q*M,X=G,H=B,ot=U),P=Vs(-D,_t),m=P*Qr,P&&(M=Math.cos(-P),y=Math.sin(-P),G=L*M-R*y,B=I*M-at*y,U=D*M-_t*y,q=O*y+q*M,L=G,I=B,D=U),P=Vs(I,L),g=P*Qr,P&&(M=Math.cos(P),y=Math.sin(P),G=L*M+I*y,B=X*M+H*y,I=I*M-L*y,H=H*M-X*y,L=G,X=B),p&&Math.abs(p)+Math.abs(g)>359.9&&(p=g=0,m=180-m),u=Le(Math.sqrt(L*L+I*I+D*D)),_=Le(Math.sqrt(H*H+ot*ot)),P=Vs(X,H),b=Math.abs(P)>2e-4?P*Qr:0,v=q?1/(q<0?-q:q):0),n.svg&&(G=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!ap(Ti(t,Re)),G&&t.setAttribute("transform",G))),Math.abs(b)>90&&Math.abs(b)<270&&(s?(u*=-1,b+=g<=0?180:-180,g+=g<=0?180:-180):(_*=-1,b+=b<=0?180:-180)),e=e||n.uncache,n.x=h-((n.xPercent=h&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-h)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+o,n.y=d-((n.yPercent=d&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-d)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+o,n.z=f+o,n.scaleX=Le(u),n.scaleY=Le(_),n.rotation=Le(g)+a,n.rotationX=Le(p)+a,n.rotationY=Le(m)+a,n.skewX=b+a,n.skewY=S+a,n.transformPerspective=v+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!e&&n.zOrigin||0)&&(i[Pn]=rl(c)),n.xOffset=n.yOffset=0,n.force3D=Rn.force3D,n.renderTransform=n.svg?vx:ip?lp:yx,n.uncache=0,n},rl=function(t){return(t=t.split(" "))[0]+" "+t[1]},Ru=function(t,e,n){var i=tn(e);return Le(parseFloat(e)+parseFloat(mr(t,"x",n+"px",i)))+i},yx=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,lp(t,e)},Kr="0deg",$o="0px",jr=") ",lp=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,h=n.rotationY,d=n.rotationX,f=n.skewX,u=n.skewY,_=n.scaleX,g=n.scaleY,p=n.transformPerspective,m=n.force3D,b=n.target,S=n.zOrigin,v="",C=m==="auto"&&t&&t!==1||m===!0;if(S&&(d!==Kr||h!==Kr)){var T=parseFloat(h)*Gs,w=Math.sin(T),P=Math.cos(T),M;T=parseFloat(d)*Gs,M=Math.cos(T),o=Ru(b,o,w*M*-S),a=Ru(b,a,-Math.sin(T)*-S),l=Ru(b,l,P*M*-S+S)}p!==$o&&(v+="perspective("+p+jr),(i||s)&&(v+="translate("+i+"%, "+s+"%) "),(C||o!==$o||a!==$o||l!==$o)&&(v+=l!==$o||C?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+jr),c!==Kr&&(v+="rotate("+c+jr),h!==Kr&&(v+="rotateY("+h+jr),d!==Kr&&(v+="rotateX("+d+jr),(f!==Kr||u!==Kr)&&(v+="skew("+f+", "+u+jr),(_!==1||g!==1)&&(v+="scale("+_+", "+g+jr),b.style[Re]=v||"translate(0, 0)"},vx=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,h=n.skewY,d=n.scaleX,f=n.scaleY,u=n.target,_=n.xOrigin,g=n.yOrigin,p=n.xOffset,m=n.yOffset,b=n.forceCSS,S=parseFloat(o),v=parseFloat(a),C,T,w,P,M;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=Gs,c*=Gs,C=Math.cos(l)*d,T=Math.sin(l)*d,w=Math.sin(l-c)*-f,P=Math.cos(l-c)*f,c&&(h*=Gs,M=Math.tan(c-h),M=Math.sqrt(1+M*M),w*=M,P*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),C*=M,T*=M)),C=Le(C),T=Le(T),w=Le(w),P=Le(P)):(C=d,P=f,T=w=0),(S&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(S=mr(u,"x",o,"px"),v=mr(u,"y",a,"px")),(_||g||p||m)&&(S=Le(S+_-(_*C+g*w)+p),v=Le(v+g-(_*T+g*P)+m)),(i||s)&&(M=u.getBBox(),S=Le(S+i/100*M.width),v=Le(v+s/100*M.height)),M="matrix("+C+","+T+","+w+","+P+","+S+","+v+")",u.setAttribute("transform",M),b&&(u.style[Re]=M)},Sx=function(t,e,n,i,s){var o=360,a=Ge(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Qr:1),c=l-i,h=i+c+"deg",d,f;return a&&(d=s.split("_")[1],d==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),d==="cw"&&c<0?c=(c+o*Yd)%o-~~(c/o)*o:d==="ccw"&&c>0&&(c=(c-o*Yd)%o-~~(c/o)*o)),t._pt=f=new _n(t._pt,e,n,i,c,rx),f.e=h,f.u="deg",t._props.push(n),f},jd=function(t,e){for(var n in e)t[n]=e[n];return t},Mx=function(t,e,n){var i=jd({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,h,d,f,u,_;i.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[Re]=e,a=jo(n,1),es(n,Re),n.setAttribute("transform",c)):(c=getComputedStyle(n)[Re],o[Re]=e,a=jo(n,1),o[Re]=c);for(l in ki)c=i[l],h=a[l],c!==h&&s.indexOf(l)<0&&(u=tn(c),_=tn(h),d=u!==_?mr(n,l,c,_):parseFloat(c),f=parseFloat(h),t._pt=new _n(t._pt,a,l,d,f-d,Pu),t._pt.u=_||0,t._props.push(l));jd(a,i)};gn("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});il[t>1?"border"+r:r]=function(a,l,c,h,d){var f,u;if(arguments.length<4)return f=o.map(function(_){return Bi(a,_,c)}),u=f.join(" "),u.split(f[0]).length===5?f[0]:u;f=(h+"").split(" "),u={},o.forEach(function(_,g){return u[_]=f[g]=f[g]||f[(g-1)/2|0]}),a.init(l,u,d)}});var ku={name:"css",register:Lu,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,h,d,f,u,_,g,p,m,b,S,v,C,T,w,P;Nu||Lu(),this.styles=this.styles||np(t),P=this.styles.props,this.tween=n;for(g in e)if(g!=="autoRound"&&(h=e[g],!(An[g]&&bu(g,e,n,i,t,s)))){if(u=typeof h,_=il[g],u==="function"&&(h=h.call(n,i,t,s),u=typeof h),u==="string"&&~h.indexOf("random(")&&(h=zs(h)),_)_(this,t,g,h,n)&&(w=1);else if(g.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(g)+"").trim(),h+="",Ui.lastIndex=0,Ui.test(c)||(p=tn(c),m=tn(h)),m?p!==m&&(c=mr(t,g,c,m)+m):p&&(h+=p),this.add(a,"setProperty",c,h,i,s,0,0,g),o.push(g),P.push(g,0,a[g]);else if(u!=="undefined"){if(l&&g in l?(c=typeof l[g]=="function"?l[g].call(n,i,t,s):l[g],Ge(c)&&~c.indexOf("random(")&&(c=zs(c)),tn(c+"")||c==="auto"||(c+=Rn.units[g]||tn(Bi(t,g))||""),(c+"").charAt(1)==="="&&(c=Bi(t,g))):c=Bi(t,g),f=parseFloat(c),b=u==="string"&&h.charAt(1)==="="&&h.substr(0,2),b&&(h=h.substr(2)),d=parseFloat(h),g in Ei&&(g==="autoAlpha"&&(f===1&&Bi(t,"visibility")==="hidden"&&d&&(f=0),P.push("visibility",0,a.visibility),pr(this,a,"visibility",f?"inherit":"hidden",d?"inherit":"hidden",!d)),g!=="scale"&&g!=="transform"&&(g=Ei[g],~g.indexOf(",")&&(g=g.split(",")[0]))),S=g in ki,S){if(this.styles.save(g),v||(C=t._gsap,C.renderTransform&&!e.parseTransform||jo(t,e.parseTransform),T=e.smoothOrigin!==!1&&C.smooth,v=this._pt=new _n(this._pt,a,Re,0,1,C.renderTransform,C,0,-1),v.dep=1),g==="scale")this._pt=new _n(this._pt,C,"scaleY",C.scaleY,(b?Jr(C.scaleY,b+d):d)-C.scaleY||0,Pu),this._pt.u=0,o.push("scaleY",g),g+="X";else if(g==="transformOrigin"){P.push(Pn,0,a[Pn]),h=_x(h),C.svg?Fu(t,h,0,T,0,this):(m=parseFloat(h.split(" ")[2])||0,m!==C.zOrigin&&pr(this,C,"zOrigin",C.zOrigin,m),pr(this,a,g,rl(c),rl(h)));continue}else if(g==="svgOrigin"){Fu(t,h,1,T,0,this);continue}else if(g in op){Sx(this,C,g,f,b?Jr(f,b+h):h);continue}else if(g==="smoothOrigin"){pr(this,C,"smooth",C.smooth,h);continue}else if(g==="force3D"){C[g]=h;continue}else if(g==="transform"){Mx(this,h,t);continue}}else g in a||(g=Ws(g)||g);if(S||(d||d===0)&&(f||f===0)&&!ix.test(h)&&g in a)p=(c+"").substr((f+"").length),d||(d=0),m=tn(h)||(g in Rn.units?Rn.units[g]:p),p!==m&&(f=mr(t,g,c,m)),this._pt=new _n(this._pt,S?C:a,g,f,(b?Jr(f,b+d):d)-f,!S&&(m==="px"||g==="zIndex")&&e.autoRound!==!1?ox:Pu),this._pt.u=m||0,p!==m&&m!=="%"&&(this._pt.b=c,this._pt.r=sx);else if(g in a)gx.call(this,t,g,c,b?b+h:h);else if(g in t)this.add(t,g,c||t[g],b?b+h:h,i,s);else if(g!=="parseTransform"){ja(g,h);continue}S||(g in a?P.push(g,0,a[g]):P.push(g,1,c||t[g])),o.push(g)}}w&&Du(this)},render:function(t,e){if(e.tween._time||!Uu())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Bi,aliases:Ei,getSetter:function(t,e,n){var i=Ei[e];return i&&i.indexOf(",")<0&&(e=i),e in ki&&e!==Pn&&(t._gsap.x||Bi(t,"x"))?n&&Xd===n?e==="scale"?ux:cx:(Xd=n||{})&&(e==="scale"?hx:fx):t.style&&!Ka(t.style[e])?ax:~e.indexOf("-")?lx:nl(t,e)},core:{_removeProperty:es,_getMatrix:Bu}};ln.utils.checkPrefix=Ws;ln.core.getStyleSaver=np;(function(r,t,e,n){var i=gn(r+","+t+","+e,function(s){ki[s]=1});gn(t,function(s){Rn.units[s]="deg",op[s]=1}),Ei[i[13]]=r+","+t,gn(n,function(s){var o=s.split(":");Ei[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");gn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Rn.units[r]="px"});ln.registerPlugin(ku);var Yt=ln.registerPlugin(ku)||ln,eE=Yt.core.Tween;function cp(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 bx(r,t,e){return t&&cp(r.prototype,t),e&&cp(r,e),r}var en,al,wx,On,gr,_r,Ys,hp,ns,ta,fp,zi,oi,dp,pp=function(){return en||typeof window<"u"&&(en=window.gsap)&&en.registerPlugin&&en},mp=1,Xs=[],le=[],ai=[],ea=Date.now,zu=function(t,e){return e},Ex=function(){var t=ta.core,e=t.bridge||{},n=t._scrollers,i=t._proxies;n.push.apply(n,le),i.push.apply(i,ai),le=n,ai=i,zu=function(o,a){return e[o](a)}},Hi=function(t,e){return~ai.indexOf(t)&&ai[ai.indexOf(t)+1][e]},na=function(t){return!!~fp.indexOf(t)},yn=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:i!==!1,capture:!!s})},xn=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},sl="scrollLeft",ol="scrollTop",Vu=function(){return zi&&zi.isPressed||le.cache++},ll=function(t,e){var n=function i(s){if(s||s===0){mp&&(On.history.scrollRestoration="manual");var o=zi&&zi.isPressed;s=i.v=Math.round(s)||(zi&&zi.iOS?1:0),t(s),i.cacheID=le.cache,o&&zu("ss",s)}else(e||le.cache!==i.cacheID||zu("ref"))&&(i.cacheID=le.cache,i.v=t());return i.v+i.offset};return n.offset=0,t&&n},cn={s:sl,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:ll(function(r){return arguments.length?On.scrollTo(r,ke.sc()):On.pageXOffset||gr[sl]||_r[sl]||Ys[sl]||0})},ke={s:ol,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:cn,sc:ll(function(r){return arguments.length?On.scrollTo(cn.sc(),r):On.pageYOffset||gr[ol]||_r[ol]||Ys[ol]||0})},vn=function(t,e){return(e&&e._ctx&&e._ctx.selector||en.utils.toArray)(t)[0]||(typeof t=="string"&&en.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},Vi=function(t,e){var n=e.s,i=e.sc;na(t)&&(t=gr.scrollingElement||_r);var s=le.indexOf(t),o=i===ke.sc?1:2;!~s&&(s=le.push(t)-1),le[s+o]||yn(t,"scroll",Vu);var a=le[s+o],l=a||(le[s+o]=ll(Hi(t,n),!0)||(na(t)?i:ll(function(c){return arguments.length?t[n]=c:t[n]})));return l.target=t,a||(l.smooth=en.getProperty(t,"scrollBehavior")==="smooth"),l},cl=function(t,e,n){var i=t,s=t,o=ea(),a=o,l=e||50,c=Math.max(500,l*3),h=function(_,g){var p=ea();g||p-o>l?(s=i,i=_,a=o,o=p):n?i+=_:i=s+(_-s)/(p-a)*(o-a)},d=function(){s=i=n?0:i,a=o=0},f=function(_){var g=a,p=s,m=ea();return(_||_===0)&&_!==i&&h(_),o===a||m-a>c?0:(i+(n?p:-p))/((n?m:o)-g)*1e3};return{update:h,reset:d,getVelocity:f}},Qo=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},up=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},gp=function(){ta=en.core.globals().ScrollTrigger,ta&&ta.core&&Ex()},_p=function(t){return en=t||pp(),!al&&en&&typeof document<"u"&&document.body&&(On=window,gr=document,_r=gr.documentElement,Ys=gr.body,fp=[On,gr,_r,Ys],wx=en.utils.clamp,dp=en.core.context||function(){},ns="onpointerenter"in Ys?"pointer":"mouse",hp=Fe.isTouch=On.matchMedia&&On.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in On||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,oi=Fe.eventTypes=("ontouchstart"in _r?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in _r?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return mp=0},500),gp(),al=1),al};cn.op=ke;le.cache=0;var Fe=function(){function r(e){this.init(e)}var t=r.prototype;return t.init=function(n){al||_p(en)||console.warn("Please gsap.registerPlugin(Observer)"),ta||gp();var i=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,h=n.preventDefault,d=n.onStop,f=n.onStopDelay,u=n.ignore,_=n.wheelSpeed,g=n.event,p=n.onDragStart,m=n.onDragEnd,b=n.onDrag,S=n.onPress,v=n.onRelease,C=n.onRight,T=n.onLeft,w=n.onUp,P=n.onDown,M=n.onChangeX,y=n.onChangeY,L=n.onChange,I=n.onToggleX,D=n.onToggleY,O=n.onHover,X=n.onHoverEnd,H=n.onMove,G=n.ignoreCheck,B=n.isNormalizer,U=n.onGestureStart,R=n.onGestureEnd,at=n.onWheel,_t=n.onEnable,Ut=n.onDisable,q=n.onClick,ot=n.scrollSpeed,xt=n.capture,ct=n.allowClicks,Rt=n.lockAxis,kt=n.onLockAxis;this.target=a=vn(a)||_r,this.vars=n,u&&(u=en.utils.toArray(u)),i=i||1e-9,s=s||0,_=_||1,ot=ot||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(On.getComputedStyle(Ys).lineHeight)||22);var J,$t,It,Ft,bt,Et,Ht,Y=this,Kt=0,A=0,x=n.passive||!h,N=Vi(a,cn),Z=Vi(a,ke),tt=N(),it=Z(),vt=~o.indexOf("touch")&&!~o.indexOf("pointer")&&oi[0]==="pointerdown",pt=na(a),lt=a.ownerDocument||gr,Lt=[0,0,0],ht=[0,0,0],yt=0,qt=function(){return yt=ea()},ut=function(j,dt){return(Y.event=j)&&u&&~u.indexOf(j.target)||dt&&vt&&j.pointerType!=="touch"||G&&G(j,dt)},Tt=function(){Y._vx.reset(),Y._vy.reset(),$t.pause(),d&&d(Y)},Wt=function(){var j=Y.deltaX=up(Lt),dt=Y.deltaY=up(ht),et=Math.abs(j)>=i,wt=Math.abs(dt)>=i;L&&(et||wt)&&L(Y,j,dt,Lt,ht),et&&(C&&Y.deltaX>0&&C(Y),T&&Y.deltaX<0&&T(Y),M&&M(Y),I&&Y.deltaX<0!=Kt<0&&I(Y),Kt=Y.deltaX,Lt[0]=Lt[1]=Lt[2]=0),wt&&(P&&Y.deltaY>0&&P(Y),w&&Y.deltaY<0&&w(Y),y&&y(Y),D&&Y.deltaY<0!=A<0&&D(Y),A=Y.deltaY,ht[0]=ht[1]=ht[2]=0),(Ft||It)&&(H&&H(Y),It&&(b(Y),It=!1),Ft=!1),Et&&!(Et=!1)&&kt&&kt(Y),bt&&(at(Y),bt=!1),J=0},Zt=function(j,dt,et){Lt[et]+=j,ht[et]+=dt,Y._vx.update(j),Y._vy.update(dt),c?J||(J=requestAnimationFrame(Wt)):Wt()},ue=function(j,dt){Rt&&!Ht&&(Y.axis=Ht=Math.abs(j)>Math.abs(dt)?"x":"y",Et=!0),Ht!=="y"&&(Lt[2]+=j,Y._vx.update(j,!0)),Ht!=="x"&&(ht[2]+=dt,Y._vy.update(dt,!0)),c?J||(J=requestAnimationFrame(Wt)):Wt()},Jt=function(j){if(!ut(j,1)){j=Qo(j,h);var dt=j.clientX,et=j.clientY,wt=dt-Y.x,ft=et-Y.y,Dt=Y.isDragging;Y.x=dt,Y.y=et,(Dt||Math.abs(Y.startX-dt)>=s||Math.abs(Y.startY-et)>=s)&&(b&&(It=!0),Dt||(Y.isDragging=!0),ue(wt,ft),Dt||p&&p(Y))}},V=Y.onPress=function(k){ut(k,1)||k&&k.button||(Y.axis=Ht=null,$t.pause(),Y.isPressed=!0,k=Qo(k),Kt=A=0,Y.startX=Y.x=k.clientX,Y.startY=Y.y=k.clientY,Y._vx.reset(),Y._vy.reset(),yn(B?a:lt,oi[1],Jt,x,!0),Y.deltaX=Y.deltaY=0,S&&S(Y))},Q=Y.onRelease=function(k){if(!ut(k,1)){xn(B?a:lt,oi[1],Jt,!0);var j=!isNaN(Y.y-Y.startY),dt=Y.isDragging,et=dt&&(Math.abs(Y.x-Y.startX)>3||Math.abs(Y.y-Y.startY)>3),wt=Qo(k);!et&&j&&(Y._vx.reset(),Y._vy.reset(),h&&ct&&en.delayedCall(.08,function(){if(ea()-yt>300&&!k.defaultPrevented){if(k.target.click)k.target.click();else if(lt.createEvent){var ft=lt.createEvent("MouseEvents");ft.initMouseEvent("click",!0,!0,On,1,wt.screenX,wt.screenY,wt.clientX,wt.clientY,!1,!1,!1,!1,0,null),k.target.dispatchEvent(ft)}}})),Y.isDragging=Y.isGesturing=Y.isPressed=!1,d&&dt&&!B&&$t.restart(!0),m&&dt&&m(Y),v&&v(Y,et)}},st=function(j){return j.touches&&j.touches.length>1&&(Y.isGesturing=!0)&&U(j,Y.isDragging)},mt=function(){return(Y.isGesturing=!1)||R(Y)},gt=function(j){if(!ut(j)){var dt=N(),et=Z();Zt((dt-tt)*ot,(et-it)*ot,1),tt=dt,it=et,d&&$t.restart(!0)}},Bt=function(j){if(!ut(j)){j=Qo(j,h),at&&(bt=!0);var dt=(j.deltaMode===1?l:j.deltaMode===2?On.innerHeight:1)*_;Zt(j.deltaX*dt,j.deltaY*dt,0),d&&!B&&$t.restart(!0)}},ee=function(j){if(!ut(j)){var dt=j.clientX,et=j.clientY,wt=dt-Y.x,ft=et-Y.y;Y.x=dt,Y.y=et,Ft=!0,d&&$t.restart(!0),(wt||ft)&&ue(wt,ft)}},Mt=function(j){Y.event=j,O(Y)},F=function(j){Y.event=j,X(Y)},rt=function(j){return ut(j)||Qo(j,h)&&q(Y)};$t=Y._dc=en.delayedCall(f||.25,Tt).pause(),Y.deltaX=Y.deltaY=0,Y._vx=cl(0,50,!0),Y._vy=cl(0,50,!0),Y.scrollX=N,Y.scrollY=Z,Y.isDragging=Y.isGesturing=Y.isPressed=!1,dp(this),Y.enable=function(k){return Y.isEnabled||(yn(pt?lt:a,"scroll",Vu),o.indexOf("scroll")>=0&&yn(pt?lt:a,"scroll",gt,x,xt),o.indexOf("wheel")>=0&&yn(a,"wheel",Bt,x,xt),(o.indexOf("touch")>=0&&hp||o.indexOf("pointer")>=0)&&(yn(a,oi[0],V,x,xt),yn(lt,oi[2],Q),yn(lt,oi[3],Q),ct&&yn(a,"click",qt,!0,!0),q&&yn(a,"click",rt),U&&yn(lt,"gesturestart",st),R&&yn(lt,"gestureend",mt),O&&yn(a,ns+"enter",Mt),X&&yn(a,ns+"leave",F),H&&yn(a,ns+"move",ee)),Y.isEnabled=!0,k&&k.type&&V(k),_t&&_t(Y)),Y},Y.disable=function(){Y.isEnabled&&(Xs.filter(function(k){return k!==Y&&na(k.target)}).length||xn(pt?lt:a,"scroll",Vu),Y.isPressed&&(Y._vx.reset(),Y._vy.reset(),xn(B?a:lt,oi[1],Jt,!0)),xn(pt?lt:a,"scroll",gt,xt),xn(a,"wheel",Bt,xt),xn(a,oi[0],V,xt),xn(lt,oi[2],Q),xn(lt,oi[3],Q),xn(a,"click",qt,!0),xn(a,"click",rt),xn(lt,"gesturestart",st),xn(lt,"gestureend",mt),xn(a,ns+"enter",Mt),xn(a,ns+"leave",F),xn(a,ns+"move",ee),Y.isEnabled=Y.isPressed=Y.isDragging=!1,Ut&&Ut(Y))},Y.kill=Y.revert=function(){Y.disable();var k=Xs.indexOf(Y);k>=0&&Xs.splice(k,1),zi===Y&&(zi=0)},Xs.push(Y),B&&na(a)&&(zi=Y),Y.enable(g)},bx(r,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),r}();Fe.version="3.12.5";Fe.create=function(r){return new Fe(r)};Fe.register=_p;Fe.getAll=function(){return Xs.slice()};Fe.getById=function(r){return Xs.filter(function(t){return t.vars.id===r})[0]};pp()&&en.registerPlugin(Fe);var Ot,Js,de,Pe,li,Ee,Np,El,ma,ca,ra,ul,un,Cl,Ju,Mn,xp,yp,$s,Up,Hu,Op,Sn,$u,Bp,kp,xr,Ku,nh,Ks,ih,Tl,ju,Gu,hl=1,hn=Date.now,Wu=hn(),$n=0,sa=0,vp=function(t,e,n){var i=kn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=i,i?t.substr(6,t.length-7):t},Sp=function(t,e){return e&&(!kn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},Tx=function r(){return sa&&requestAnimationFrame(r)},Mp=function(){return Cl=1},bp=function(){return Cl=0},Ai=function(t){return t},oa=function(t){return Math.round(t*1e5)/1e5||0},zp=function(){return typeof window<"u"},Vp=function(){return Ot||zp()&&(Ot=window.gsap)&&Ot.registerPlugin&&Ot},ls=function(t){return!!~Np.indexOf(t)},Hp=function(t){return(t==="Height"?ih:de["inner"+t])||li["client"+t]||Ee["client"+t]},Gp=function(t){return Hi(t,"getBoundingClientRect")||(ls(t)?function(){return wl.width=de.innerWidth,wl.height=ih,wl}:function(){return Gi(t)})},Ax=function(t,e,n){var i=n.d,s=n.d2,o=n.a;return(o=Hi(t,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(e?Hp(s):t["client"+s])||0}},Dx=function(t,e){return!e||~ai.indexOf(t)?Gp(t):function(){return wl}},Di=function(t,e){var n=e.s,i=e.d2,s=e.d,o=e.a;return Math.max(0,(n="scroll"+i)&&(o=Hi(t,n))?o()-Gp(t)()[s]:ls(t)?(li[n]||Ee[n])-Hp(i):t[n]-t["offset"+i])},fl=function(t,e){for(var n=0;n<$s.length;n+=3)(!e||~e.indexOf($s[n+1]))&&t($s[n],$s[n+1],$s[n+2])},kn=function(t){return typeof t=="string"},wn=function(t){return typeof t=="function"},aa=function(t){return typeof t=="number"},is=function(t){return typeof t=="object"},ia=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},Xu=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)}},qs=Math.abs,Wp="left",Xp="top",rh="right",sh="bottom",ss="width",os="height",ua="Right",ha="Left",fa="Top",da="Bottom",ze="padding",Zn="margin",Qs="Width",oh="Height",We="px",Jn=function(t){return de.getComputedStyle(t)},Cx=function(t){var e=Jn(t).position;t.style.position=e==="absolute"||e==="fixed"?e:"relative"},wp=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Gi=function(t,e){var n=e&&Jn(t)[Ju]!=="matrix(1, 0, 0, 1, 0, 0)"&&Ot.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},Al=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},Yp=function(t){var e=[],n=t.labels,i=t.duration(),s;for(s in n)e.push(n[s]/i);return e},Rx=function(t){return function(e){return Ot.utils.snap(Yp(t),e)}},ah=function(t){var e=Ot.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)}},Px=function(t){return function(e,n){return ah(Yp(t))(e,n.direction)}},dl=function(t,e,n,i){return n.split(",").forEach(function(s){return t(e,s,i)})},$e=function(t,e,n,i,s){return t.addEventListener(e,n,{passive:!i,capture:!!s})},Je=function(t,e,n,i){return t.removeEventListener(e,n,!!i)},pl=function(t,e,n){n=n&&n.wheelHandler,n&&(t(e,"wheel",n),t(e,"touchmove",n))},Ep={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ml={toggleActions:"play",anticipatePin:0},Dl={top:0,left:0,center:.5,bottom:1,right:1},vl=function(t,e){if(kn(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 Dl?Dl[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},gl=function(t,e,n,i,s,o,a,l){var c=s.startColor,h=s.endColor,d=s.fontSize,f=s.indent,u=s.fontWeight,_=Pe.createElement("div"),g=ls(n)||Hi(n,"pinType")==="fixed",p=t.indexOf("scroller")!==-1,m=g?Ee:n,b=t.indexOf("start")!==-1,S=b?c:h,v="border-color:"+S+";font-size:"+d+";color:"+S+";font-weight:"+u+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return v+="position:"+((p||l)&&g?"fixed;":"absolute;"),(p||l||!g)&&(v+=(i===ke?rh:sh)+":"+(o+parseFloat(f))+"px;"),a&&(v+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),_._isStart=b,_.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),_.style.cssText=v,_.innerText=e||e===0?t+"-"+e:t,m.children[0]?m.insertBefore(_,m.children[0]):m.appendChild(_),_._offset=_["offset"+i.op.d2],Sl(_,0,i,b),_},Sl=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+Qs]=1,s["border"+a+Qs]=0,s[n.p]=e+"px",Ot.set(t,s)},ce=[],Qu={},ga,Tp=function(){return hn()-$n>34&&(ga||(ga=requestAnimationFrame(Wi)))},Zs=function(){(!Sn||!Sn.isPressed||Sn.startX>Ee.clientWidth)&&(le.cache++,Sn?ga||(ga=requestAnimationFrame(Wi)):Wi(),$n||us("scrollStart"),$n=hn())},Yu=function(){kp=de.innerWidth,Bp=de.innerHeight},la=function(){le.cache++,!un&&!Op&&!Pe.fullscreenElement&&!Pe.webkitFullscreenElement&&(!$u||kp!==de.innerWidth||Math.abs(de.innerHeight-Bp)>de.innerHeight*.25)&&El.restart(!0)},cs={},Ix=[],qp=function r(){return Je(ne,"scrollEnd",r)||rs(!0)},us=function(t){return cs[t]&&cs[t].map(function(e){return e()})||Ix},Bn=[],Zp=function(t){for(var e=0;e<Bn.length;e+=5)(!t||Bn[e+4]&&Bn[e+4].query===t)&&(Bn[e].style.cssText=Bn[e+1],Bn[e].getBBox&&Bn[e].setAttribute("transform",Bn[e+2]||""),Bn[e+3].uncache=1)},lh=function(t,e){var n;for(Mn=0;Mn<ce.length;Mn++)n=ce[Mn],n&&(!e||n._ctx===e)&&(t?n.kill(1):n.revert(!0,!0));Tl=!0,e&&Zp(e),e||us("revert")},Jp=function(t,e){le.cache++,(e||!bn)&&le.forEach(function(n){return wn(n)&&n.cacheID++&&(n.rec=0)}),kn(t)&&(de.history.scrollRestoration=nh=t)},bn,as=0,Ap,Lx=function(){if(Ap!==as){var t=Ap=as;requestAnimationFrame(function(){return t===as&&rs(!0)})}},$p=function(){Ee.appendChild(Ks),ih=!Sn&&Ks.offsetHeight||de.innerHeight,Ee.removeChild(Ks)},Dp=function(t){return ma(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(e){return e.style.display=t?"none":"block"})},rs=function(t,e){if($n&&!t&&!Tl){$e(ne,"scrollEnd",qp);return}$p(),bn=ne.isRefreshing=!0,le.forEach(function(i){return wn(i)&&++i.cacheID&&(i.rec=i())});var n=us("refreshInit");Up&&ne.sort(),e||lh(),le.forEach(function(i){wn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),ce.slice(0).forEach(function(i){return i.refresh()}),Tl=!1,ce.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()}}),ju=1,Dp(!0),ce.forEach(function(i){var s=Di(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)}),Dp(!1),ju=0,n.forEach(function(i){return i&&i.render&&i.render(-1)}),le.forEach(function(i){wn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),Jp(nh,1),El.pause(),as++,bn=2,Wi(2),ce.forEach(function(i){return wn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),bn=ne.isRefreshing=!1,us("refresh")},th=0,Ml=1,pa,Wi=function(t){if(t===2||!bn&&!Tl){ne.isUpdating=!0,pa&&pa.update(0);var e=ce.length,n=hn(),i=n-Wu>=50,s=e&&ce[0].scroll();if(Ml=th>s?-1:1,bn||(th=s),i&&($n&&!Cl&&n-$n>200&&($n=0,us("scrollEnd")),ra=Wu,Wu=n),Ml<0){for(Mn=e;Mn-- >0;)ce[Mn]&&ce[Mn].update(0,i);Ml=1}else for(Mn=0;Mn<e;Mn++)ce[Mn]&&ce[Mn].update(0,i);ne.isUpdating=!1}ga=0},eh=[Wp,Xp,sh,rh,Zn+da,Zn+ua,Zn+fa,Zn+ha,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],bl=eh.concat([ss,os,"boxSizing","max"+Qs,"max"+oh,"position",Zn,ze,ze+fa,ze+ua,ze+da,ze+ha]),Fx=function(t,e,n){js(n);var i=t._gsap;if(i.spacerIsNative)js(i.spacerState);else if(t._gsap.swappedIn){var s=e.parentNode;s&&(s.insertBefore(t,e),s.removeChild(e))}t._gsap.swappedIn=!1},qu=function(t,e,n,i){if(!t._gsap.swappedIn){for(var s=eh.length,o=e.style,a=t.style,l;s--;)l=eh[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[sh]=a[rh]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[ss]=Al(t,cn)+We,o[os]=Al(t,ke)+We,o[ze]=a[Zn]=a[Xp]=a[Wp]="0",js(i),a[ss]=a["max"+Qs]=n[ss],a[os]=a["max"+oh]=n[os],a[ze]=n[ze],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Nx=/([A-Z])/g,js=function(t){if(t){var e=t.t.style,n=t.length,i=0,s,o;for((t.t._gsap||Ot.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(Nx,"-$1").toLowerCase())}},_l=function(t){for(var e=bl.length,n=t.style,i=[],s=0;s<e;s++)i.push(bl[s],n[bl[s]]);return i.t=t,i},Ux=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},wl={left:0,top:0},Cp=function(t,e,n,i,s,o,a,l,c,h,d,f,u,_){wn(t)&&(t=t(l)),kn(t)&&t.substr(0,3)==="max"&&(t=f+(t.charAt(4)==="="?vl("0"+t.substr(3),n):0));var g=u?u.time():0,p,m,b;if(u&&u.seek(0),isNaN(t)||(t=+t),aa(t))u&&(t=Ot.utils.mapRange(u.scrollTrigger.start,u.scrollTrigger.end,0,f,t)),a&&Sl(a,n,i,!0);else{wn(e)&&(e=e(l));var S=(t||"0").split(" "),v,C,T,w;b=vn(e,l)||Ee,v=Gi(b)||{},(!v||!v.left&&!v.top)&&Jn(b).display==="none"&&(w=b.style.display,b.style.display="block",v=Gi(b),w?b.style.display=w:b.style.removeProperty("display")),C=vl(S[0],v[i.d]),T=vl(S[1]||"0",n),t=v[i.p]-c[i.p]-h+C+s-T,a&&Sl(a,T,i,n-T<20||a._isStart&&T>20),n-=n-T}if(_&&(l[_]=t||-.001,t<0&&(t=0)),o){var P=t+n,M=o._isStart;p="scroll"+i.d2,Sl(o,P,i,M&&P>20||!M&&(d?Math.max(Ee[p],li[p]):o.parentNode[p])<=P+1),d&&(c=Gi(a),d&&(o.style[i.op.p]=c[i.op.p]-i.op.m-o._offset+We))}return u&&b&&(p=Gi(b),u.seek(f),m=Gi(b),u._caScrollDist=p[i.p]-m[i.p],t=t/u._caScrollDist*f),u&&u.seek(g),u?t:Math.round(t)},Ox=/(webkit|moz|length|cssText|inset)/i,Rp=function(t,e,n,i){if(t.parentNode!==e){var s=t.style,o,a;if(e===Ee){t._stOrig=s.cssText,a=Jn(t);for(o in a)!+o&&!Ox.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;Ot.core.getCache(t).uncache=1,e.appendChild(t)}},Kp=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}},xl=function(t,e,n){var i={};i[e.p]="+="+n,Ot.set(t,i)},Pp=function(t,e){var n=Vi(t,e),i="_scroll"+e.p2,s=function o(a,l,c,h,d){var f=o.tween,u=l.onComplete,_={};c=c||n();var g=Kp(n,c,function(){f.kill(),o.tween=0});return d=h&&d||0,h=h||a-c,f&&f.kill(),l[i]=a,l.inherit=!1,l.modifiers=_,_[i]=function(){return g(c+h*f.ratio+d*f.ratio*f.ratio)},l.onUpdate=function(){le.cache++,o.tween&&Wi()},l.onComplete=function(){o.tween=0,u&&u.call(f)},f=o.tween=Ot.to(t,l),f};return t[i]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},$e(t,"wheel",n.wheelHandler),ne.isTouch&&$e(t,"touchmove",n.wheelHandler),s},ne=function(){function r(e,n){Js||r.register(Ot)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Ku(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),!sa){this.update=this.refresh=this.kill=Ai;return}n=wp(kn(n)||aa(n)||n.nodeType?{trigger:n}:n,ml);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,h=s.onRefresh,d=s.scrub,f=s.trigger,u=s.pin,_=s.pinSpacing,g=s.invalidateOnRefresh,p=s.anticipatePin,m=s.onScrubComplete,b=s.onSnapComplete,S=s.once,v=s.snap,C=s.pinReparent,T=s.pinSpacer,w=s.containerAnimation,P=s.fastScrollEnd,M=s.preventOverlaps,y=n.horizontal||n.containerAnimation&&n.horizontal!==!1?cn:ke,L=!d&&d!==0,I=vn(n.scroller||de),D=Ot.core.getCache(I),O=ls(I),X=("pinType"in n?n.pinType:Hi(I,"pinType")||O&&"fixed")==="fixed",H=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],G=L&&n.toggleActions.split(" "),B="markers"in n?n.markers:ml.markers,U=O?0:parseFloat(Jn(I)["border"+y.p2+Qs])||0,R=this,at=n.onRefreshInit&&function(){return n.onRefreshInit(R)},_t=Ax(I,O,y),Ut=Dx(I,O),q=0,ot=0,xt=0,ct=Vi(I,y),Rt,kt,J,$t,It,Ft,bt,Et,Ht,Y,Kt,A,x,N,Z,tt,it,vt,pt,lt,Lt,ht,yt,qt,ut,Tt,Wt,Zt,ue,Jt,V,Q,st,mt,gt,Bt,ee,Mt,F;if(R._startClamp=R._endClamp=!1,R._dir=y,p*=45,R.scroller=I,R.scroll=w?w.time.bind(w):ct,$t=ct(),R.vars=n,i=i||n.animation,"refreshPriority"in n&&(Up=1,n.refreshPriority===-9999&&(pa=R)),D.tweenScroll=D.tweenScroll||{top:Pp(I,ke),left:Pp(I,cn)},R.tweenTo=Rt=D.tweenScroll[y.p],R.scrubDuration=function(et){st=aa(et)&&et,st?Q?Q.duration(et):Q=Ot.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:st,paused:!0,onComplete:function(){return m&&m(R)}}):(Q&&Q.progress(1).kill(),Q=0)},i&&(i.vars.lazy=!1,i._initted&&!R.isReverted||i.vars.immediateRender!==!1&&n.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),R.animation=i.pause(),i.scrollTrigger=R,R.scrubDuration(d),Jt=0,l||(l=i.vars.id)),v&&((!is(v)||v.push)&&(v={snapTo:v}),"scrollBehavior"in Ee.style&&Ot.set(O?[Ee,li]:I,{scrollBehavior:"auto"}),le.forEach(function(et){return wn(et)&&et.target===(O?Pe.scrollingElement||li:I)&&(et.smooth=!1)}),J=wn(v.snapTo)?v.snapTo:v.snapTo==="labels"?Rx(i):v.snapTo==="labelsDirectional"?Px(i):v.directional!==!1?function(et,wt){return ah(v.snapTo)(et,hn()-ot<500?0:wt.direction)}:Ot.utils.snap(v.snapTo),mt=v.duration||{min:.1,max:2},mt=is(mt)?ca(mt.min,mt.max):ca(mt,mt),gt=Ot.delayedCall(v.delay||st/2||.1,function(){var et=ct(),wt=hn()-ot<500,ft=Rt.tween;if((wt||Math.abs(R.getVelocity())<10)&&!ft&&!Cl&&q!==et){var Dt=(et-Ft)/N,zt=i&&!L?i.totalProgress():Dt,Nt=wt?0:(zt-V)/(hn()-ra)*1e3||0,te=Ot.utils.clamp(-Dt,1-Dt,qs(Nt/2)*Nt/.185),he=Dt+(v.inertia===!1?0:te),me,ae,E=v,z=E.onStart,W=E.onInterrupt,K=E.onComplete;if(me=J(he,R),aa(me)||(me=he),ae=Math.round(Ft+me*N),et<=bt&&et>=Ft&&ae!==et){if(ft&&!ft._initted&&ft.data<=qs(ae-et))return;v.inertia===!1&&(te=me-Dt),Rt(ae,{duration:mt(qs(Math.max(qs(he-zt),qs(me-zt))*.185/Nt/.05||0)),ease:v.ease||"power3",data:qs(ae-et),onInterrupt:function(){return gt.restart(!0)&&W&&W(R)},onComplete:function(){R.update(),q=ct(),i&&(Q?Q.resetTo("totalProgress",me,i._tTime/i._tDur):i.progress(me)),Jt=V=i&&!L?i.totalProgress():R.progress,b&&b(R),K&&K(R)}},et,te*N,ae-et-te*N),z&&z(R,Rt.tween)}}else R.isActive&&q!==et&>.restart(!0)}).pause()),l&&(Qu[l]=R),f=R.trigger=vn(f||u!==!0&&u),F=f&&f._gsap&&f._gsap.stRevert,F&&(F=F(R)),u=u===!0?f:vn(u),kn(a)&&(a={targets:f,className:a}),u&&(_===!1||_===Zn||(_=!_&&u.parentNode&&u.parentNode.style&&Jn(u.parentNode).display==="flex"?!1:ze),R.pin=u,kt=Ot.core.getCache(u),kt.spacer?Z=kt.pinState:(T&&(T=vn(T),T&&!T.nodeType&&(T=T.current||T.nativeElement),kt.spacerIsNative=!!T,T&&(kt.spacerState=_l(T))),kt.spacer=vt=T||Pe.createElement("div"),vt.classList.add("pin-spacer"),l&&vt.classList.add("pin-spacer-"+l),kt.pinState=Z=_l(u)),n.force3D!==!1&&Ot.set(u,{force3D:!0}),R.spacer=vt=kt.spacer,ue=Jn(u),qt=ue[_+y.os2],lt=Ot.getProperty(u),Lt=Ot.quickSetter(u,y.a,We),qu(u,vt,ue),it=_l(u)),B){A=is(B)?wp(B,Ep):Ep,Y=gl("scroller-start",l,I,y,A,0),Kt=gl("scroller-end",l,I,y,A,0,Y),pt=Y["offset"+y.op.d2];var rt=vn(Hi(I,"content")||I);Et=this.markerStart=gl("start",l,rt,y,A,pt,0,w),Ht=this.markerEnd=gl("end",l,rt,y,A,pt,0,w),w&&(Mt=Ot.quickSetter([Et,Ht],y.a,We)),!X&&!(ai.length&&Hi(I,"fixedMarkers")===!0)&&(Cx(O?Ee:I),Ot.set([Y,Kt],{force3D:!0}),Tt=Ot.quickSetter(Y,y.a,We),Zt=Ot.quickSetter(Kt,y.a,We))}if(w){var k=w.vars.onUpdate,j=w.vars.onUpdateParams;w.eventCallback("onUpdate",function(){R.update(0,0,1),k&&k.apply(w,j||[])})}if(R.previous=function(){return ce[ce.indexOf(R)-1]},R.next=function(){return ce[ce.indexOf(R)+1]},R.revert=function(et,wt){if(!wt)return R.kill(!0);var ft=et!==!1||!R.enabled,Dt=un;ft!==R.isReverted&&(ft&&(Bt=Math.max(ct(),R.scroll.rec||0),xt=R.progress,ee=i&&i.progress()),Et&&[Et,Ht,Y,Kt].forEach(function(zt){return zt.style.display=ft?"none":"block"}),ft&&(un=R,R.update(ft)),u&&(!C||!R.isActive)&&(ft?Fx(u,vt,Z):qu(u,vt,Jn(u),ut)),ft||R.update(ft),un=Dt,R.isReverted=ft)},R.refresh=function(et,wt,ft,Dt){if(!((un||!R.enabled)&&!wt)){if(u&&et&&$n){$e(r,"scrollEnd",qp);return}!bn&&at&&at(R),un=R,Rt.tween&&!ft&&(Rt.tween.kill(),Rt.tween=0),Q&&Q.pause(),g&&i&&i.revert({kill:!1}).invalidate(),R.isReverted||R.revert(!0,!0),R._subPinOffset=!1;var zt=_t(),Nt=Ut(),te=w?w.duration():Di(I,y),he=N<=.01,me=0,ae=Dt||0,E=is(ft)?ft.end:n.end,z=n.endTrigger||f,W=is(ft)?ft.start:n.start||(n.start===0||!f?0:u?"0 0":"0 100%"),K=R.pinnedContainer=n.pinnedContainer&&vn(n.pinnedContainer,R),$=f&&Math.max(0,ce.indexOf(R))||0,St=$,At,Pt,Xt,Qt,Gt,Vt,xe,Be,rn,mn,ie,jt,Si;for(B&&is(ft)&&(jt=Ot.getProperty(Y,y.p),Si=Ot.getProperty(Kt,y.p));St--;)Vt=ce[St],Vt.end||Vt.refresh(0,1)||(un=R),xe=Vt.pin,xe&&(xe===f||xe===u||xe===K)&&!Vt.isReverted&&(mn||(mn=[]),mn.unshift(Vt),Vt.revert(!0,!0)),Vt!==ce[St]&&($--,St--);for(wn(W)&&(W=W(R)),W=vp(W,"start",R),Ft=Cp(W,f,zt,y,ct(),Et,Y,R,Nt,U,X,te,w,R._startClamp&&"_startClamp")||(u?-.001:0),wn(E)&&(E=E(R)),kn(E)&&!E.indexOf("+=")&&(~E.indexOf(" ")?E=(kn(W)?W.split(" ")[0]:"")+E:(me=vl(E.substr(2),zt),E=kn(W)?W:(w?Ot.utils.mapRange(0,w.duration(),w.scrollTrigger.start,w.scrollTrigger.end,Ft):Ft)+me,z=f)),E=vp(E,"end",R),bt=Math.max(Ft,Cp(E||(z?"100% 0":te),z,zt,y,ct()+me,Ht,Kt,R,Nt,U,X,te,w,R._endClamp&&"_endClamp"))||-.001,me=0,St=$;St--;)Vt=ce[St],xe=Vt.pin,xe&&Vt.start-Vt._pinPush<=Ft&&!w&&Vt.end>0&&(At=Vt.end-(R._startClamp?Math.max(0,Vt.start):Vt.start),(xe===f&&Vt.start-Vt._pinPush<Ft||xe===K)&&isNaN(W)&&(me+=At*(1-Vt.progress)),xe===u&&(ae+=At));if(Ft+=me,bt+=me,R._startClamp&&(R._startClamp+=me),R._endClamp&&!bn&&(R._endClamp=bt||-.001,bt=Math.min(bt,Di(I,y))),N=bt-Ft||(Ft-=.01)&&.001,he&&(xt=Ot.utils.clamp(0,1,Ot.utils.normalize(Ft,bt,Bt))),R._pinPush=ae,Et&&me&&(At={},At[y.a]="+="+me,K&&(At[y.p]="-="+ct()),Ot.set([Et,Ht],At)),u&&!(ju&&R.end>=Di(I,y)))At=Jn(u),Qt=y===ke,Xt=ct(),ht=parseFloat(lt(y.a))+ae,!te&&bt>1&&(ie=(O?Pe.scrollingElement||li:I).style,ie={style:ie,value:ie["overflow"+y.a.toUpperCase()]},O&&Jn(Ee)["overflow"+y.a.toUpperCase()]!=="scroll"&&(ie.style["overflow"+y.a.toUpperCase()]="scroll")),qu(u,vt,At),it=_l(u),Pt=Gi(u,!0),Be=X&&Vi(I,Qt?cn:ke)(),_?(ut=[_+y.os2,N+ae+We],ut.t=vt,St=_===ze?Al(u,y)+N+ae:0,St&&(ut.push(y.d,St+We),vt.style.flexBasis!=="auto"&&(vt.style.flexBasis=St+We)),js(ut),K&&ce.forEach(function(ve){ve.pin===K&&ve.vars.pinSpacing!==!1&&(ve._subPinOffset=!0)}),X&&ct(Bt)):(St=Al(u,y),St&&vt.style.flexBasis!=="auto"&&(vt.style.flexBasis=St+We)),X&&(Gt={top:Pt.top+(Qt?Xt-Ft:Be)+We,left:Pt.left+(Qt?Be:Xt-Ft)+We,boxSizing:"border-box",position:"fixed"},Gt[ss]=Gt["max"+Qs]=Math.ceil(Pt.width)+We,Gt[os]=Gt["max"+oh]=Math.ceil(Pt.height)+We,Gt[Zn]=Gt[Zn+fa]=Gt[Zn+ua]=Gt[Zn+da]=Gt[Zn+ha]="0",Gt[ze]=At[ze],Gt[ze+fa]=At[ze+fa],Gt[ze+ua]=At[ze+ua],Gt[ze+da]=At[ze+da],Gt[ze+ha]=At[ze+ha],tt=Ux(Z,Gt,C),bn&&ct(0)),i?(rn=i._initted,Hu(1),i.render(i.duration(),!0,!0),yt=lt(y.a)-ht+N+ae,Wt=Math.abs(N-yt)>1,X&&Wt&&tt.splice(tt.length-2,2),i.render(0,!0,!0),rn||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),Hu(0)):yt=N,ie&&(ie.value?ie.style["overflow"+y.a.toUpperCase()]=ie.value:ie.style.removeProperty("overflow-"+y.a));else if(f&&ct()&&!w)for(Pt=f.parentNode;Pt&&Pt!==Ee;)Pt._pinOffset&&(Ft-=Pt._pinOffset,bt-=Pt._pinOffset),Pt=Pt.parentNode;mn&&mn.forEach(function(ve){return ve.revert(!1,!0)}),R.start=Ft,R.end=bt,$t=It=bn?Bt:ct(),!w&&!bn&&($t<Bt&&ct(Bt),R.scroll.rec=0),R.revert(!1,!0),ot=hn(),gt&&(q=-1,gt.restart(!0)),un=0,i&&L&&(i._initted||ee)&&i.progress()!==ee&&i.progress(ee||0,!0).render(i.time(),!0,!0),(he||xt!==R.progress||w||g)&&(i&&!L&&i.totalProgress(w&&Ft<-.001&&!xt?Ot.utils.normalize(Ft,bt,0):xt,!0),R.progress=he||($t-Ft)/N===xt?0:xt),u&&_&&(vt._pinOffset=Math.round(R.progress*yt)),Q&&Q.invalidate(),isNaN(jt)||(jt-=Ot.getProperty(Y,y.p),Si-=Ot.getProperty(Kt,y.p),xl(Y,y,jt),xl(Et,y,jt-(Dt||0)),xl(Kt,y,Si),xl(Ht,y,Si-(Dt||0))),he&&!bn&&R.update(),h&&!bn&&!x&&(x=!0,h(R),x=!1)}},R.getVelocity=function(){return(ct()-It)/(hn()-ra)*1e3||0},R.endAnimation=function(){ia(R.callbackAnimation),i&&(Q?Q.progress(1):i.paused()?L||ia(i,R.direction<0,1):ia(i,i.reversed()))},R.labelToScroll=function(et){return i&&i.labels&&(Ft||R.refresh()||Ft)+i.labels[et]/i.duration()*N||0},R.getTrailing=function(et){var wt=ce.indexOf(R),ft=R.direction>0?ce.slice(0,wt).reverse():ce.slice(wt+1);return(kn(et)?ft.filter(function(Dt){return Dt.vars.preventOverlaps===et}):ft).filter(function(Dt){return R.direction>0?Dt.end<=Ft:Dt.start>=bt})},R.update=function(et,wt,ft){if(!(w&&!ft&&!et)){var Dt=bn===!0?Bt:R.scroll(),zt=et?0:(Dt-Ft)/N,Nt=zt<0?0:zt>1?1:zt||0,te=R.progress,he,me,ae,E,z,W,K,$;if(wt&&(It=$t,$t=w?ct():Dt,v&&(V=Jt,Jt=i&&!L?i.totalProgress():Nt)),p&&u&&!un&&!hl&&$n&&(!Nt&&Ft<Dt+(Dt-It)/(hn()-ra)*p?Nt=1e-4:Nt===1&&bt>Dt+(Dt-It)/(hn()-ra)*p&&(Nt=.9999)),Nt!==te&&R.enabled){if(he=R.isActive=!!Nt&&Nt<1,me=!!te&&te<1,W=he!==me,z=W||!!Nt!=!!te,R.direction=Nt>te?1:-1,R.progress=Nt,z&&!un&&(ae=Nt&&!te?0:Nt===1?1:te===1?2:3,L&&(E=!W&&G[ae+1]!=="none"&&G[ae+1]||G[ae],$=i&&(E==="complete"||E==="reset"||E in i))),M&&(W||$)&&($||d||!i)&&(wn(M)?M(R):R.getTrailing(M).forEach(function(Xt){return Xt.endAnimation()})),L||(Q&&!un&&!hl?(Q._dp._time-Q._start!==Q._time&&Q.render(Q._dp._time-Q._start),Q.resetTo?Q.resetTo("totalProgress",Nt,i._tTime/i._tDur):(Q.vars.totalProgress=Nt,Q.invalidate().restart())):i&&i.totalProgress(Nt,!!(un&&(ot||et)))),u){if(et&&_&&(vt.style[_+y.os2]=qt),!X)Lt(oa(ht+yt*Nt));else if(z){if(K=!et&&Nt>te&&bt+1>Dt&&Dt+1>=Di(I,y),C)if(!et&&(he||K)){var St=Gi(u,!0),At=Dt-Ft;Rp(u,Ee,St.top+(y===ke?At:0)+We,St.left+(y===ke?0:At)+We)}else Rp(u,vt);js(he||K?tt:it),Wt&&Nt<1&&he||Lt(ht+(Nt===1&&!K?yt:0))}}v&&!Rt.tween&&!un&&!hl&>.restart(!0),a&&(W||S&&Nt&&(Nt<1||!Gu))&&ma(a.targets).forEach(function(Xt){return Xt.classList[he||S?"add":"remove"](a.className)}),o&&!L&&!et&&o(R),z&&!un?(L&&($&&(E==="complete"?i.pause().totalProgress(1):E==="reset"?i.restart(!0).pause():E==="restart"?i.restart(!0):i[E]()),o&&o(R)),(W||!Gu)&&(c&&W&&Xu(R,c),H[ae]&&Xu(R,H[ae]),S&&(Nt===1?R.kill(!1,1):H[ae]=0),W||(ae=Nt===1?1:3,H[ae]&&Xu(R,H[ae]))),P&&!he&&Math.abs(R.getVelocity())>(aa(P)?P:2500)&&(ia(R.callbackAnimation),Q?Q.progress(1):ia(i,E==="reverse"?1:!Nt,1))):L&&o&&!un&&o(R)}if(Zt){var Pt=w?Dt/w.duration()*(w._caScrollDist||0):Dt;Tt(Pt+(Y._isFlipped?1:0)),Zt(Pt)}Mt&&Mt(-Dt/w.duration()*(w._caScrollDist||0))}},R.enable=function(et,wt){R.enabled||(R.enabled=!0,$e(I,"resize",la),O||$e(I,"scroll",Zs),at&&$e(r,"refreshInit",at),et!==!1&&(R.progress=xt=0,$t=It=q=ct()),wt!==!1&&R.refresh())},R.getTween=function(et){return et&&Rt?Rt.tween:Q},R.setPositions=function(et,wt,ft,Dt){if(w){var zt=w.scrollTrigger,Nt=w.duration(),te=zt.end-zt.start;et=zt.start+te*et/Nt,wt=zt.start+te*wt/Nt}R.refresh(!1,!1,{start:Sp(et,ft&&!!R._startClamp),end:Sp(wt,ft&&!!R._endClamp)},Dt),R.update()},R.adjustPinSpacing=function(et){if(ut&&et){var wt=ut.indexOf(y.d)+1;ut[wt]=parseFloat(ut[wt])+et+We,ut[1]=parseFloat(ut[1])+et+We,js(ut)}},R.disable=function(et,wt){if(R.enabled&&(et!==!1&&R.revert(!0,!0),R.enabled=R.isActive=!1,wt||Q&&Q.pause(),Bt=0,kt&&(kt.uncache=1),at&&Je(r,"refreshInit",at),gt&&(gt.pause(),Rt.tween&&Rt.tween.kill()&&(Rt.tween=0)),!O)){for(var ft=ce.length;ft--;)if(ce[ft].scroller===I&&ce[ft]!==R)return;Je(I,"resize",la),O||Je(I,"scroll",Zs)}},R.kill=function(et,wt){R.disable(et,wt),Q&&!wt&&Q.kill(),l&&delete Qu[l];var ft=ce.indexOf(R);ft>=0&&ce.splice(ft,1),ft===Mn&&Ml>0&&Mn--,ft=0,ce.forEach(function(Dt){return Dt.scroller===R.scroller&&(ft=1)}),ft||bn||(R.scroll.rec=0),i&&(i.scrollTrigger=null,et&&i.revert({kill:!1}),wt||i.kill()),Et&&[Et,Ht,Y,Kt].forEach(function(Dt){return Dt.parentNode&&Dt.parentNode.removeChild(Dt)}),pa===R&&(pa=0),u&&(kt&&(kt.uncache=1),ft=0,ce.forEach(function(Dt){return Dt.pin===u&&ft++}),ft||(kt.spacer=0)),n.onKill&&n.onKill(R)},ce.push(R),R.enable(!1,!1),F&&F(R),i&&i.add&&!N){var dt=R.update;R.update=function(){R.update=dt,Ft||bt||R.refresh()},Ot.delayedCall(.01,R.update),N=.01,Ft=bt=0}else R.refresh();u&&Lx()},r.register=function(n){return Js||(Ot=n||Vp(),zp()&&window.document&&r.enable(),Js=sa),Js},r.defaults=function(n){if(n)for(var i in n)ml[i]=n[i];return ml},r.disable=function(n,i){sa=0,ce.forEach(function(o){return o[i?"kill":"disable"](n)}),Je(de,"wheel",Zs),Je(Pe,"scroll",Zs),clearInterval(ul),Je(Pe,"touchcancel",Ai),Je(Ee,"touchstart",Ai),dl(Je,Pe,"pointerdown,touchstart,mousedown",Mp),dl(Je,Pe,"pointerup,touchend,mouseup",bp),El.kill(),fl(Je);for(var s=0;s<le.length;s+=3)pl(Je,le[s],le[s+1]),pl(Je,le[s],le[s+2])},r.enable=function(){if(de=window,Pe=document,li=Pe.documentElement,Ee=Pe.body,Ot&&(ma=Ot.utils.toArray,ca=Ot.utils.clamp,Ku=Ot.core.context||Ai,Hu=Ot.core.suppressOverwrites||Ai,nh=de.history.scrollRestoration||"auto",th=de.pageYOffset,Ot.core.globals("ScrollTrigger",r),Ee)){sa=1,Ks=document.createElement("div"),Ks.style.height="100vh",Ks.style.position="absolute",$p(),Tx(),Fe.register(Ot),r.isTouch=Fe.isTouch,xr=Fe.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),$u=Fe.isTouch===1,$e(de,"wheel",Zs),Np=[de,Pe,li,Ee],Ot.matchMedia?(r.matchMedia=function(l){var c=Ot.matchMedia(),h;for(h in l)c.add(h,l[h]);return c},Ot.addEventListener("matchMediaInit",function(){return lh()}),Ot.addEventListener("matchMediaRevert",function(){return Zp()}),Ot.addEventListener("matchMedia",function(){rs(0,1),us("matchMedia")}),Ot.matchMedia("(orientation: portrait)",function(){return Yu(),Yu})):console.warn("Requires GSAP 3.11.0 or later"),Yu(),$e(Pe,"scroll",Zs);var n=Ee.style,i=n.borderTopStyle,s=Ot.core.Animation.prototype,o,a;for(s.revert||Object.defineProperty(s,"revert",{value:function(){return this.time(-.01,!0)}}),n.borderTopStyle="solid",o=Gi(Ee),ke.m=Math.round(o.top+ke.sc())||0,cn.m=Math.round(o.left+cn.sc())||0,i?n.borderTopStyle=i:n.removeProperty("border-top-style"),ul=setInterval(Tp,250),Ot.delayedCall(.5,function(){return hl=0}),$e(Pe,"touchcancel",Ai),$e(Ee,"touchstart",Ai),dl($e,Pe,"pointerdown,touchstart,mousedown",Mp),dl($e,Pe,"pointerup,touchend,mouseup",bp),Ju=Ot.utils.checkPrefix("transform"),bl.push(Ju),Js=hn(),El=Ot.delayedCall(.2,rs).pause(),$s=[Pe,"visibilitychange",function(){var l=de.innerWidth,c=de.innerHeight;Pe.hidden?(xp=l,yp=c):(xp!==l||yp!==c)&&la()},Pe,"DOMContentLoaded",rs,de,"load",rs,de,"resize",la],fl($e),ce.forEach(function(l){return l.enable(0,1)}),a=0;a<le.length;a+=3)pl(Je,le[a],le[a+1]),pl(Je,le[a],le[a+2])}},r.config=function(n){"limitCallbacks"in n&&(Gu=!!n.limitCallbacks);var i=n.syncInterval;i&&clearInterval(ul)||(ul=i)&&setInterval(Tp,i),"ignoreMobileResize"in n&&($u=r.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(fl(Je)||fl($e,n.autoRefreshEvents||"none"),Op=(n.autoRefreshEvents+"").indexOf("resize")===-1)},r.scrollerProxy=function(n,i){var s=vn(n),o=le.indexOf(s),a=ls(s);~o&&le.splice(o,a?6:2),i&&(a?ai.unshift(de,i,Ee,i,li,i):ai.unshift(s,i))},r.clearMatchMedia=function(n){ce.forEach(function(i){return i._ctx&&i._ctx.query===n&&i._ctx.kill(!0,!0)})},r.isInViewport=function(n,i,s){var o=(kn(n)?vn(n):n).getBoundingClientRect(),a=o[s?ss:os]*i||0;return s?o.right-a>0&&o.left+a<de.innerWidth:o.bottom-a>0&&o.top+a<de.innerHeight},r.positionInViewport=function(n,i,s){kn(n)&&(n=vn(n));var o=n.getBoundingClientRect(),a=o[s?ss:os],l=i==null?a/2:i in Dl?Dl[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/de.innerWidth:(o.top+l)/de.innerHeight},r.killAll=function(n){if(ce.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var i=cs.killAll||[];cs={},i.forEach(function(s){return s()})}},r}();ne.version="3.12.5";ne.saveStyles=function(r){return r?ma(r).forEach(function(t){if(t&&t.style){var e=Bn.indexOf(t);e>=0&&Bn.splice(e,5),Bn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Ot.core.getCache(t),Ku())}}):Bn};ne.revert=function(r,t){return lh(!r,t)};ne.create=function(r,t){return new ne(r,t)};ne.refresh=function(r){return r?la():(Js||ne.register())&&rs(!0)};ne.update=function(r){return++le.cache&&Wi(r===!0?2:0)};ne.clearScrollMemory=Jp;ne.maxScroll=function(r,t){return Di(r,t?cn:ke)};ne.getScrollFunc=function(r,t){return Vi(vn(r),t?cn:ke)};ne.getById=function(r){return Qu[r]};ne.getAll=function(){return ce.filter(function(r){return r.vars.id!=="ScrollSmoother"})};ne.isScrolling=function(){return!!$n};ne.snapDirectional=ah;ne.addEventListener=function(r,t){var e=cs[r]||(cs[r]=[]);~e.indexOf(t)||e.push(t)};ne.removeEventListener=function(r,t){var e=cs[r],n=e&&e.indexOf(t);n>=0&&e.splice(n,1)};ne.batch=function(r,t){var e=[],n={},i=t.interval||.016,s=t.batchMax||1e9,o=function(c,h){var d=[],f=[],u=Ot.delayedCall(i,function(){h(d,f),d=[],f=[]}).pause();return function(_){d.length||u.restart(!0),d.push(_.trigger),f.push(_),s<=d.length&&u.progress(1)}},a;for(a in t)n[a]=a.substr(0,2)==="on"&&wn(t[a])&&a!=="onRefreshInit"?o(a,t[a]):t[a];return wn(s)&&(s=s(),$e(ne,"refresh",function(){return s=t.batchMax()})),ma(r).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,e.push(ne.create(c))}),e};var Ip=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},Zu=function r(t,e){e===!0?t.style.removeProperty("touch-action"):t.style.touchAction=e===!0?"auto":e?"pan-"+e+(Fe.isTouch?" pinch-zoom":""):"none",t===li&&r(Ee,e)},yl={auto:1,scroll:1},Bx=function(t){var e=t.event,n=t.target,i=t.axis,s=(e.changedTouches?e.changedTouches[0]:e).target,o=s._gsap||Ot.core.getCache(s),a=hn(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==Ee&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(yl[(l=Jn(s)).overflowY]||yl[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!ls(s)&&(yl[(l=Jn(s)).overflowY]||yl[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(e.stopPropagation(),e._gsapAllow=!0)},jp=function(t,e,n,i){return Fe.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&Bx,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return n&&$e(Pe,Fe.eventTypes[0],Fp,!1,!0)},onDisable:function(){return Je(Pe,Fe.eventTypes[0],Fp,!0)}})},kx=/(input|label|select|textarea)/i,Lp,Fp=function(t){var e=kx.test(t.target.tagName);(e||Lp)&&(t._gsapAllow=!0,Lp=e)},zx=function(t){is(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=vn(t.target)||li,h=Ot.core.globals().ScrollSmoother,d=h&&h.get(),f=xr&&(t.content&&vn(t.content)||d&&t.content!==!1&&!d.smooth()&&d.content()),u=Vi(c,ke),_=Vi(c,cn),g=1,p=(Fe.isTouch&&de.visualViewport?de.visualViewport.scale*de.visualViewport.width:de.outerWidth)/de.innerWidth,m=0,b=wn(i)?function(){return i(a)}:function(){return i||2.8},S,v,C=jp(c,t.type,!0,s),T=function(){return v=!1},w=Ai,P=Ai,M=function(){l=Di(c,ke),P=ca(xr?1:0,l),n&&(w=ca(0,Di(c,cn))),S=as},y=function(){f._gsap.y=oa(parseFloat(f._gsap.y)+u.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)",u.offset=u.cacheID=0},L=function(){if(v){requestAnimationFrame(T);var B=oa(a.deltaY/2),U=P(u.v-B);if(f&&U!==u.v+u.offset){u.offset=U-u.v;var R=oa((parseFloat(f&&f._gsap.y)||0)-u.offset);f.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+R+", 0, 1)",f._gsap.y=R+"px",u.cacheID=le.cache,Wi()}return!0}u.offset&&y(),v=!0},I,D,O,X,H=function(){M(),I.isActive()&&I.vars.scrollY>l&&(u()>l?I.progress(1)&&u(l):I.resetTo("scrollY",l))};return f&&Ot.set(f,{y:"+=0"}),t.ignoreCheck=function(G){return xr&&G.type==="touchmove"&&L(G)||g>1.05&&G.type!=="touchstart"||a.isGesturing||G.touches&&G.touches.length>1},t.onPress=function(){v=!1;var G=g;g=oa((de.visualViewport&&de.visualViewport.scale||1)/p),I.pause(),G!==g&&Zu(c,g>1.01?!0:n?!1:"x"),D=_(),O=u(),M(),S=as},t.onRelease=t.onGestureStart=function(G,B){if(u.offset&&y(),!B)X.restart(!0);else{le.cache++;var U=b(),R,at;n&&(R=_(),at=R+U*.05*-G.velocityX/.227,U*=Ip(_,R,at,Di(c,cn)),I.vars.scrollX=w(at)),R=u(),at=R+U*.05*-G.velocityY/.227,U*=Ip(u,R,at,Di(c,ke)),I.vars.scrollY=P(at),I.invalidate().duration(U).play(.01),(xr&&I.vars.scrollY>=l||R>=l-1)&&Ot.to({},{onUpdate:H,duration:U})}o&&o(G)},t.onWheel=function(){I._ts&&I.pause(),hn()-m>1e3&&(S=0,m=hn())},t.onChange=function(G,B,U,R,at){if(as!==S&&M(),B&&n&&_(w(R[2]===B?D+(G.startX-G.x):_()+B-R[1])),U){u.offset&&y();var _t=at[2]===U,Ut=_t?O+G.startY-G.y:u()+U-at[1],q=P(Ut);_t&&Ut!==q&&(O+=q-Ut),u(q)}(U||B)&&Wi()},t.onEnable=function(){Zu(c,n?!1:"x"),ne.addEventListener("refresh",H),$e(de,"resize",H),u.smooth&&(u.target.style.scrollBehavior="auto",u.smooth=_.smooth=!1),C.enable()},t.onDisable=function(){Zu(c,!0),Je(de,"resize",H),ne.removeEventListener("refresh",H),C.kill()},t.lockAxis=t.lockAxis!==!1,a=new Fe(t),a.iOS=xr,xr&&!u()&&u(1),xr&&Ot.ticker.add(Ai),X=a._dc,I=Ot.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:Kp(u,u(),function(){return I.pause()})},onUpdate:Wi,onComplete:X.vars.onComplete}),a};ne.sort=function(r){return ce.sort(r||function(t,e){return(t.vars.refreshPriority||0)*-1e6+t.start-(e.start+(e.vars.refreshPriority||0)*-1e6)})};ne.observe=function(r){return new Fe(r)};ne.normalizeScroll=function(r){if(typeof r>"u")return Sn;if(r===!0&&Sn)return Sn.enable();if(r===!1){Sn&&Sn.kill(),Sn=r;return}var t=r instanceof Fe?r:zx(r);return Sn&&Sn.target===t.target&&Sn.kill(),ls(t.target)&&(Sn=t),t};ne.core={_getVelocityProp:cl,_inputObserver:jp,_scrollers:le,_proxies:ai,bridge:{ss:function(){$n||us("scrollStart"),$n=hn()},ref:function(){return un}}};Vp()&&Ot.registerPlugin(ne);var Vx=/(?:^\s+|\s+$)/g,ch=/([\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 to(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+=to(r)}else if(t===3||t===4)return r.nodeValue;return e}function ci(r,t,e,n){if(r+="",e&&(r=r.trim?r.trim():r.replace(Vx,"")),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(ch)||[])[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 eo,hh,em,_a,nm,Rl,Hx=/(?:\r|\n|\t\t)/g,Gx=/(?:\s\s+)/g,Wx="\xA0",im=function(t){eo=document,hh=window,_a=_a||t||hh.gsap||console.warn("Please gsap.registerPlugin(SplitText)"),_a&&(Rl=_a.utils.toArray,nm=_a.core.context||function(){},em=1)},Xx=1,rm=function(t){return hh.getComputedStyle(t)},fh=function(t){return t.position==="absolute"||t.absolute===!0},Yx=function(t,e){for(var n=e.length,i;--n>-1;)if(i=e[n],t.substr(0,i.length)===i)return i.length},qx=" style='position:relative;display:inline-block;'",Qp=function(t,e){t===void 0&&(t="");var n=~t.indexOf("++"),i=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+qx+(t?" class='"+t+(n?i++:"")+"'>":">")}},sm=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))},uh=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},tm=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}},Zx=function r(t){var e=Rl(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))},Ci=function(t,e){return parseFloat(e[t])||0},Jx=function(t,e,n,i,s,o,a){var l=rm(t),c=Ci("paddingLeft",l),h=-999,d=Ci("borderBottomWidth",l)+Ci("borderTopWidth",l),f=Ci("borderLeftWidth",l)+Ci("borderRightWidth",l),u=Ci("paddingTop",l)+Ci("paddingBottom",l),_=Ci("paddingLeft",l)+Ci("paddingRight",l),g=Ci("fontSize",l)*(e.lineThreshold||.2),p=l.textAlign,m=[],b=[],S=[],v=e.wordDelimiter||" ",C=e.tag?e.tag:e.span?"span":"div",T=e.type||e.split||"chars,words,lines",w=s&&~T.indexOf("lines")?[]:null,P=~T.indexOf("words"),M=~T.indexOf("chars"),y=fh(e),L=e.linesClass,I=~(L||"").indexOf("++"),D=[],O=l.display==="flex",X=t.style.display,H,G,B,U,R,at,_t,Ut,q,ot,xt,ct;for(I&&(L=L.split("++").join("")),O&&(t.style.display="block"),G=t.getElementsByTagName("*"),B=G.length,R=[],H=0;H<B;H++)R[H]=G[H];if(w||y)for(H=0;H<B;H++)U=R[H],at=U.parentNode===t,(at||y||M&&!P)&&(ct=U.offsetTop,w&&at&&Math.abs(ct-h)>g&&(U.nodeName!=="BR"||H===0)&&(_t=[],w.push(_t),h=ct),y&&(U._x=U.offsetLeft,U._y=ct,U._w=U.offsetWidth,U._h=U.offsetHeight),w&&((U._isSplit&&at||!M&&at||P&&at||!P&&U.parentNode.parentNode===t&&!U.parentNode._isSplit)&&(_t.push(U),U._x-=c,tm(U,t,v)&&(U._wordEnd=!0)),U.nodeName==="BR"&&(U.nextSibling&&U.nextSibling.nodeName==="BR"||H===0)&&w.push([])));for(H=0;H<B;H++){if(U=R[H],at=U.parentNode===t,U.nodeName==="BR"){w||y?(U.parentNode&&U.parentNode.removeChild(U),R.splice(H--,1),B--):P||t.appendChild(U);continue}if(y&&(q=U.style,!P&&!at&&(U._x+=U.parentNode._x,U._y+=U.parentNode._y),q.left=U._x+"px",q.top=U._y+"px",q.position="absolute",q.display="block",q.width=U._w+1+"px",q.height=U._h+"px"),!P&&M)if(U._isSplit)for(U._next=G=U.nextSibling,U.parentNode.appendChild(U);G&&G.nodeType===3&&G.textContent===" ";)U._next=G.nextSibling,U.parentNode.appendChild(G),G=G.nextSibling;else U.parentNode._isSplit?(U._parent=U.parentNode,!U.previousSibling&&U.firstChild&&(U.firstChild._isFirst=!0),U.nextSibling&&U.nextSibling.textContent===" "&&!U.nextSibling.nextSibling&&D.push(U.nextSibling),U._next=U.nextSibling&&U.nextSibling._isFirst?null:U.nextSibling,U.parentNode.removeChild(U),R.splice(H--,1),B--):at||(ct=!U.nextSibling&&tm(U.parentNode,t,v),U.parentNode._parent&&U.parentNode._parent.appendChild(U),ct&&U.parentNode.appendChild(eo.createTextNode(" ")),C==="span"&&(U.style.display="inline"),m.push(U));else U.parentNode._isSplit&&!U._isSplit&&U.innerHTML!==""?b.push(U):M&&!U._isSplit&&(C==="span"&&(U.style.display="inline"),m.push(U))}for(H=D.length;--H>-1;)D[H].parentNode.removeChild(D[H]);if(w){for(y&&(ot=eo.createElement(C),t.appendChild(ot),xt=ot.offsetWidth+"px",ct=ot.offsetParent===t?0:t.offsetLeft,t.removeChild(ot)),q=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(Ut=v===" "&&(!y||!P&&!M),H=0;H<w.length;H++){for(_t=w[H],ot=eo.createElement(C),ot.style.cssText="display:block;text-align:"+p+";position:"+(y?"absolute;":"relative;"),L&&(ot.className=L+(I?H+1:"")),S.push(ot),B=_t.length,G=0;G<B;G++)_t[G].nodeName!=="BR"&&(U=_t[G],ot.appendChild(U),Ut&&U._wordEnd&&ot.appendChild(eo.createTextNode(" ")),y&&(G===0&&(ot.style.top=U._y+"px",ot.style.left=c+ct+"px"),U.style.top="0px",ct&&(U.style.left=U._x-ct+"px")));B===0?ot.innerHTML=" ":!P&&!M&&(Zx(ot),sm(ot,"\xA0"," ")),y&&(ot.style.width=xt,ot.style.height=U._h+"px"),t.appendChild(ot)}t.style.cssText=q}y&&(a>t.clientHeight&&(t.style.height=a-u+"px",t.clientHeight<a&&(t.style.height=a+d+"px")),o>t.clientWidth&&(t.style.width=o-_+"px",t.clientWidth<o&&(t.style.width=o+f+"px"))),O&&(X?t.style.display=X:t.style.removeProperty("display")),uh(n,m),P&&uh(i,b),uh(s,S)},$x=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=fh(e),c=e.wordDelimiter||" ",h=function(y){return y===c||y===Wx&&c===" "},d=c!==" "?"":l?"­ ":" ",f="</"+s+">",u=1,_=e.specialChars?typeof e.specialChars=="function"?e.specialChars:Yx:null,g,p,m,b,S,v,C,T,w=eo.createElement("div"),P=t.parentNode;for(P.insertBefore(w,t),w.textContent=t.nodeValue,P.removeChild(t),t=w,g=to(t),C=g.indexOf("<")!==-1,e.reduceWhiteSpace!==!1&&(g=g.replace(Gx," ").replace(Hx,"")),C&&(g=g.split("<").join("{{LT}}")),S=g.length,p=(g.charAt(0)===" "?d:"")+n(),m=0;m<S;m++)if(v=g.charAt(m),_&&(T=_(g.substr(m),e.specialChars)))v=g.substr(m,T||1),p+=a&&v!==" "?i()+v+"</"+s+">":v,m+=T-1;else if(h(v)&&!h(g.charAt(m-1))&&m){for(p+=u?f:"",u=0;h(g.charAt(m+1));)p+=d,m++;m===S-1?p+=d:g.charAt(m+1)!==")"&&(p+=d+n(),u=1)}else v==="{"&&g.substr(m,6)==="{{LT}}"?(p+=a?i()+"{{LT}}</"+s+">":"{{LT}}",m+=5):v.charCodeAt(0)>=55296&&v.charCodeAt(0)<=56319||g.charCodeAt(m+1)>=65024&&g.charCodeAt(m+1)<=65039?(b=((g.substr(m,12).split(ch)||[])[1]||"").length||2,p+=a&&v!==" "?i()+g.substr(m,b)+"</"+s+">":g.substr(m,b),m+=b-1):p+=a&&v!==" "?i()+v+"</"+s+">":v;t.outerHTML=p+(u?f:""),C&&sm(P,"{{LT}}","<")},Kx=function r(t,e,n,i){var s=Rl(t.childNodes),o=s.length,a=fh(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&&rm(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}$x(t,e,n,i)},Ri=function(){function r(e,n){em||im(),this.elements=Rl(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},nm(this),Xx&&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=Qp(n.wordsClass,s),a=Qp(n.charsClass,s),l,c,h;--i>-1;)h=this.elements[i],this._originals[i]={html:h.innerHTML,style:h.getAttribute("style")},l=h.clientHeight,c=h.clientWidth,Kx(h,n,o,a),Jx(h,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}();Ri.version="3.12.5";Ri.register=im;var om=()=>{Yt.registerPlugin(ne,Ri),document.querySelectorAll("[data-header-animation]").forEach(t=>{let e=t.querySelector("h2");if(e.classList.contains("is-all-strong")&&(e=e.querySelector("strong")),!e)return;let n=new Ri(e,{type:"lines",tag:"span"}),i=new Ri(e,{type:"lines",linesClass:"header_line"});n.lines=i.chars.concat(n.lines);let s=Yt.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")})};var am=()=>{if(Yt.registerPlugin(ne,Ri),document.querySelector(".hero_grid")){let r=document.querySelector(".hero_grid"),t=r.querySelector(".hero_holo"),e=r.querySelector("h1"),n=r.querySelector(".paragraph-big"),i=new Ri(e,{type:"lines",tag:"span"}),s=new Ri(e,{type:"lines",linesClass:"header_line"});i.lines=s.chars.concat(i.lines),Yt.timeline({scrollTrigger:{trigger:r,start:"top bottom",toggleActions:"play none none reset"}}).fromTo(n,{autoAlpha:0},{autoAlpha:1,duration:.35,ease:"circ.out"},"+=1.75").fromTo(i.lines,{y:"100%"},{y:0,duration:.75,stagger:.05,ease:"circ.out"},"-=0.25").fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.75,ease:"circ.out"},"+-=0.25")}};var lm=()=>{let r=document.querySelector(".is-section-loader");if(!r)return;let t=r.querySelector(".loader_line"),e=r.querySelector(".loader_value");!t||!e||Yt.to(t,{width:"100%",duration:1.5,onUpdate:function(){let n=Math.round(this.progress()*100);e.innerHTML=`${n}%`},onComplete:function(){Yt.to(r,{y:"-100dvh",duration:.75})}},"<")};var Pl=function(){function r(e){this.chars=ci(e),this.sets=[],this.length=50;for(var n=0;n<20;n++)this.sets[n]=um(80,this.chars)}var t=r.prototype;return t.grow=function(n){for(var i=0;i<20;i++)this.sets[i]+=um(n-this.length,this.chars);this.length=n},r}(),hs,dm,pm=function(){return hs||typeof window<"u"&&(hs=window.gsap)&&hs.registerPlugin&&hs},jx=1,cm=/\s+/g,um=function(t,e){for(var n=e.length,i="";--t>-1;)i+=e[~~(Math.random()*n)];return i},dh="ABCDEFGHIJKLMNOPQRSTUVWXYZ",hm=dh.toLowerCase(),Qx={upperCase:new Pl(dh),lowerCase:new Pl(hm),upperAndLowerCase:new Pl(dh+hm)},fm=function(){dm=hs=pm()},xa={version:"3.12.5",name:"scrambleText",register:function(t,e,n){hs=t,fm()},init:function(t,e,n,i,s){if(dm||fm(),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,h,d,f;return l.delimiter=c=e.delimiter||"",l.original=ci(to(t).replace(cm," ").split(" ").join(""),c,a),(o==="{original}"||o===!0||o==null)&&(o=l.original.join(c)),l.text=ci((o||"").replace(cm," "),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&&!!ci(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=d=Qx[e.chars||"upperCase"]||new Pl(e.chars),l.speed=.05/(e.speed||1),l.prevScrambleTime=0,l.setIndex=Math.random()*20|0,h=l.length+Math.max(l.lengthDif,0),h>d.length&&d.grow(h),l.chars=d.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"),jx}},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,h=e.setIndex,d=e.chars,f=e.charSet,u=e.length,_=e.textHasEmoji,g=e.charsHaveEmoji,p=e.lengthDif,m=e.tweenLength,b=e.oldClass,S=e.newClass,v=e.rightToLeft,C=e.fillChar,T=e.speed,w=e.original,P=e.hasClass,M=s.length,y=a._time,L=y-l,I,D,O,X,H,G,B,U,R,at,_t;c&&(a._from&&(y=a._dur-y),t=y===0?0:y<c?1e-6:y===a._dur?1:a._ease((y-c)/(a._dur-c))),t<0?t=0:t>1&&(t=1),v&&(t=1-t),I=~~(t*M+.5),t?((L>T||L<-T)&&(e.setIndex=h=(h+(Math.random()*19|0))%20,e.chars=f.sets[h],e.prevScrambleTime+=L),X=d):X=w.join(o),_t=a._from?t:1-t,at=u+(m?a._from?_t*_t*_t:1-_t*_t*_t:1)*p,v?t===1&&(a._from||a.data==="isFromStart")?(O="",X=w.join(o)):(B=s.slice(I).join(o),g?O=ci(X).slice(0,at-(_?ci(B):B).length+.5|0).join(""):O=X.substr(0,at-(_?ci(B):B).length+.5|0),X=B):(O=s.slice(0,I).join(o),D=(_?ci(O):O).length,g?X=ci(X).slice(D,at+.5|0).join(""):X=X.substr(D,at-D+.5|0)),P?(U=v?b:S,R=v?S:b,H=U&&I!==0,G=R&&I!==M,B=(H?"<span class='"+U+"'>":"")+O+(H?"</span>":"")+(G?"<span class='"+R+"'>":"")+o+X+(G?"</span>":"")):B=O+o+X,n[i]=C===" "&&~B.indexOf(" ")?B.split(" ").join(" "):B}};xa.emojiSafeSplit=ci;xa.getText=to;pm()&&hs.registerPlugin(xa);Yt.registerPlugin(xa);var mm=()=>{document.querySelectorAll("[data-scramble-link]").forEach(t=>{let e=t.querySelector("[data-scramble-text]");if(!e)return;let n=e.textContent;t.addEventListener("mouseenter",()=>{Yt.matchMedia().add("(min-width: 768px)",()=>{Yt.to(e,{duration:1,scrambleText:{text:n,chars:"10"}})})})})};function gm(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 ty(r,t,e){return t&&gm(r.prototype,t),e&&gm(r,e),r}var ye,Il,nn,ds,no,ui,ey,fs,_m,re,Pi,Ll,xm,ym,vm,Sm,Mm=function(){return typeof window<"u"},bm=function(){return ye||Mm()&&(ye=window.gsap)&&ye.registerPlugin&&ye};var ny=function(t){return Math.round(t*1e5)/1e5||0},yr=function(t){return re.maxScroll(t||nn)},iy=function(t,e){var n=t.parentNode||no,i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),o=s.top-i.top,a=s.bottom-i.bottom,l=(Math.abs(o)>Math.abs(a)?o:a)/(1-e),c=-l*e,h,d;return l>0&&(h=s.height/(nn.innerHeight+s.height),d=h===.5?s.height*2:Math.min(s.height,Math.abs(-l*h/(2*h-1)))*2*(e||1),c+=e?-d*e:-d/2,l+=d),{change:l,offset:c}},ry=function(t){var e=ds.querySelector(".ScrollSmoother-wrapper");return e||(e=ds.createElement("div"),e.classList.add("ScrollSmoother-wrapper"),t.parentNode.insertBefore(e,t),e.appendChild(t)),e},Xi=function(){function r(t){var e=this;Il||r.register(ye)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},Pi&&Pi.kill(),Pi=this,vm(this);var n=t,i=n.smoothTouch,s=n.onUpdate,o=n.onStop,a=n.smooth,l=n.onFocusIn,c=n.normalizeScroll,h=n.wholePixels,d,f,u,_,g,p,m,b,S,v,C,T,w,P,M=this,y=t.effectsPrefix||"",L=re.getScrollFunc(nn),I=re.isTouch===1?i===!0?.8:parseFloat(i)||0:a===0||a===!1?0:parseFloat(a)||.8,D=I&&+t.speed||1,O=0,X=0,H=1,G=xm(0),B=function(){return G.update(-O)},U={y:0},R=function(){return d.style.overflow="visible"},at,_t=function(x){x.update();var N=x.getTween();N&&(N.pause(),N._time=N._dur,N._tTime=N._tDur),at=!1,x.animation.progress(x.progress,!0)},Ut=function(x,N){(x!==O&&!v||N)&&(h&&(x=Math.round(x)),I&&(d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+x+", 0, 1)",d._gsap.y=x+"px"),X=x-O,O=x,re.isUpdating||r.isRefreshing||re.update())},q=function(x){return arguments.length?(x<0&&(x=0),U.y=-x,at=!0,v?O=-x:Ut(-x),re.isRefreshing?_.update():L(x/D),this):-O},ot=typeof ResizeObserver<"u"&&t.autoResize!==!1&&new ResizeObserver(function(){if(!re.isRefreshing){var A=yr(f)*D;A<-O&&q(A),Sm.restart(!0)}}),xt,ct=function(x){f.scrollTop=0,!(x.target.contains&&x.target.contains(f)||l&&l(e,x)===!1)&&(re.isInViewport(x.target)||x.target===xt||e.scrollTo(x.target,!1,"center center"),xt=x.target)},Rt=function(x,N){if(x<N.start)return x;var Z=isNaN(N.ratio)?1:N.ratio,tt=N.end-N.start,it=x-N.start,vt=N.offset||0,pt=N.pins||[],lt=pt.offset||0,Lt=N._startClamp&&N.start<=0||N.pins&&N.pins.offset?0:N._endClamp&&N.end===yr()?1:.5;return pt.forEach(function(ht){tt-=ht.distance,ht.nativeStart<=x&&(it-=ht.distance)}),lt&&(it*=(tt-lt/Z)/tt),x+(it-vt*Lt)/Z-it},kt=function A(x,N,Z){Z||(x.pins.length=x.pins.offset=0);var tt=x.pins,it=x.markers,vt,pt,lt,Lt,ht,yt,qt,ut;for(qt=0;qt<N.length;qt++)if(ut=N[qt],x.trigger&&ut.trigger&&x!==ut&&(ut.trigger===x.trigger||ut.pinnedContainer===x.trigger||x.trigger.contains(ut.trigger))&&(ht=ut._startNative||ut._startClamp||ut.start,yt=ut._endNative||ut._endClamp||ut.end,lt=Rt(ht,x),Lt=ut.pin&&yt>0?lt+(yt-ht):Rt(yt,x),ut.setPositions(lt,Lt,!0,(ut._startClamp?Math.max(0,lt):lt)-ht),ut.markerStart&&it.push(ye.quickSetter([ut.markerStart,ut.markerEnd],"y","px")),ut.pin&&ut.end>0&&!Z)){if(vt=ut.end-ut.start,pt=x._startClamp&&ut.start<0,pt){if(x.start>0){x.setPositions(0,x.end+(x._startNative-x.start),!0),A(x,N);return}vt+=ut.start,tt.offset=-ut.start}tt.push({start:ut.start,nativeStart:ht,end:ut.end,distance:vt,trig:ut}),x.setPositions(x.start,x.end+(pt?-ut.start:vt),!0)}},J=function(x,N){g.forEach(function(Z){return kt(Z,x,N)})},$t=function(){R(),requestAnimationFrame(R),g&&(re.getAll().forEach(function(x){x._startNative=x.start,x._endNative=x.end}),g.forEach(function(x){var N=x._startClamp||x.start,Z=x.autoSpeed?Math.min(yr(),x.end):N+Math.abs((x.end-N)/x.ratio),tt=Z-x.end;if(N-=tt/2,Z-=tt/2,N>Z){var it=N;N=Z,Z=it}x._startClamp&&N<0?(Z=x.ratio<0?yr():x.end/x.ratio,tt=Z-x.end,N=0):(x.ratio<0||x._endClamp&&Z>=yr())&&(Z=yr(),N=x.ratio<0||x.ratio>1?0:Z-(Z-x.start)/x.ratio,tt=(Z-N)*x.ratio-(x.end-x.start)),x.offset=tt||1e-4,x.pins.length=x.pins.offset=0,x.setPositions(N,Z,!0)}),J(re.sort())),G.reset()},It=function(){return re.addEventListener("refresh",$t)},Ft=function(){return g&&g.forEach(function(x){return x.vars.onRefresh(x)})},bt=function(){return g&&g.forEach(function(x){return x.vars.onRefreshInit(x)}),Ft},Et=function(x,N,Z,tt){return function(){var it=typeof N=="function"?N(Z,tt):N;it||it===0||(it=tt.getAttribute("data-"+y+x)||(x==="speed"?1:0)),tt.setAttribute("data-"+y+x,it);var vt=(it+"").substr(0,6)==="clamp(";return{clamp:vt,value:vt?it.substr(6,it.length-7):it}}},Ht=function(x,N,Z,tt,it){it=(typeof it=="function"?it(tt,x):it)||0;var vt=Et("speed",N,tt,x),pt=Et("lag",Z,tt,x),lt=ye.getProperty(x,"y"),Lt=x._gsap,ht,yt,qt,ut,Tt,Wt,Zt=[],ue=function(){N=vt(),Z=parseFloat(pt().value),ht=parseFloat(N.value)||1,qt=N.value==="auto",Tt=qt||yt&&yt._startClamp&&yt.start<=0||Zt.offset?0:yt&&yt._endClamp&&yt.end===yr()?1:.5,ut&&ut.kill(),ut=Z&&ye.to(x,{ease:Ll,overwrite:!1,y:"+=0",duration:Z}),yt&&(yt.ratio=ht,yt.autoSpeed=qt)},Jt=function(){Lt.y=lt+"px",Lt.renderTransform(1),ue()},V=[],Q=0,st=function(gt){if(qt){Jt();var Bt=iy(x,_m(0,1,-gt.start/(gt.end-gt.start)));Q=Bt.change,Wt=Bt.offset}else Wt=Zt.offset||0,Q=(gt.end-gt.start-Wt)*(1-ht);Zt.forEach(function(ee){return Q-=ee.distance*(1-ht)}),gt.offset=Q||.001,gt.vars.onUpdate(gt),ut&&ut.progress(1)};return ue(),(ht!==1||qt||ut)&&(yt=re.create({trigger:qt?x.parentNode:x,start:function(){return N.clamp?"clamp(top bottom+="+it+")":"top bottom+="+it},end:function(){return N.value<0?"max":N.clamp?"clamp(bottom top-="+it+")":"bottom top-="+it},scroller:f,scrub:!0,refreshPriority:-999,onRefreshInit:Jt,onRefresh:st,onKill:function(gt){var Bt=g.indexOf(gt);Bt>=0&&g.splice(Bt,1),Jt()},onUpdate:function(gt){var Bt=lt+Q*(gt.progress-Tt),ee=Zt.length,Mt=0,F,rt,k;if(gt.offset){if(ee){for(rt=-O,k=gt.end;ee--;){if(F=Zt[ee],F.trig.isActive||rt>=F.start&&rt<=F.end){ut&&(F.trig.progress+=F.trig.direction<0?.001:-.001,F.trig.update(0,0,1),ut.resetTo("y",parseFloat(Lt.y),-X,!0),H&&ut.progress(1));return}rt>F.end&&(Mt+=F.distance),k-=F.distance}Bt=lt+Mt+Q*((ye.utils.clamp(gt.start,gt.end,rt)-gt.start-Mt)/(k-gt.start)-Tt)}V.length&&!qt&&V.forEach(function(j){return j(Bt-Mt)}),Bt=ny(Bt+Wt),ut?(ut.resetTo("y",Bt,-X,!0),H&&ut.progress(1)):(Lt.y=Bt+"px",Lt.renderTransform(1))}}}),st(yt),ye.core.getCache(yt.trigger).stRevert=bt,yt.startY=lt,yt.pins=Zt,yt.markers=V,yt.ratio=ht,yt.autoSpeed=qt,x.style.willChange="transform"),yt};It(),re.addEventListener("killAll",It),ye.delayedCall(.5,function(){return H=0}),this.scrollTop=q,this.scrollTo=function(A,x,N){var Z=ye.utils.clamp(0,yr(),isNaN(A)?e.offset(A,N,!!x&&!v):+A);x?v?ye.to(e,{duration:I,scrollTop:Z,overwrite:"auto",ease:Ll}):L(Z):q(Z)},this.offset=function(A,x,N){A=fs(A)[0];var Z=A.style.cssText,tt=re.create({trigger:A,start:x||"top top"}),it;return g&&(H?re.refresh():J([tt],!0)),it=tt.start/(N?D:1),tt.kill(!1),A.style.cssText=Z,ye.core.getCache(A).uncache=1,it};function Y(){return u=d.clientHeight,d.style.overflow="visible",ui.style.height=nn.innerHeight+(u-nn.innerHeight)/D+"px",u-nn.innerHeight}this.content=function(A){if(arguments.length){var x=fs(A||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||ui.children[0];return x!==d&&(d=x,S=d.getAttribute("style")||"",ot&&ot.observe(d),ye.set(d,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),I||ye.set(d,{clearProps:"transform"})),this}return d},this.wrapper=function(A){return arguments.length?(f=fs(A||"#smooth-wrapper")[0]||ry(d),b=f.getAttribute("style")||"",Y(),ye.set(f,I?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):f},this.effects=function(A,x){var N;if(g||(g=[]),!A)return g.slice(0);A=fs(A),A.forEach(function(ht){for(var yt=g.length;yt--;)g[yt].trigger===ht&&g[yt].kill()}),x=x||{};var Z=x,tt=Z.speed,it=Z.lag,vt=Z.effectsPadding,pt=[],lt,Lt;for(lt=0;lt<A.length;lt++)Lt=Ht(A[lt],tt,it,lt,vt),Lt&&pt.push(Lt);return(N=g).push.apply(N,pt),x.refresh!==!1&&re.refresh(),pt},this.sections=function(A,x){var N;if(p||(p=[]),!A)return p.slice(0);var Z=fs(A).map(function(tt){return re.create({trigger:tt,start:"top 120%",end:"bottom -20%",onToggle:function(vt){tt.style.opacity=vt.isActive?"1":"0",tt.style.pointerEvents=vt.isActive?"all":"none"}})});return x&&x.add?(N=p).push.apply(N,Z):p=Z.slice(0),Z},this.content(t.content),this.wrapper(t.wrapper),this.render=function(A){return Ut(A||A===0?A:O)},this.getVelocity=function(){return G.getVelocity(-O)},re.scrollerProxy(f,{scrollTop:q,scrollHeight:function(){return Y()&&ui.scrollHeight},fixedMarkers:t.fixedMarkers!==!1&&!!I,content:d,getBoundingClientRect:function(){return{top:0,left:0,width:nn.innerWidth,height:nn.innerHeight}}}),re.defaults({scroller:f});var Kt=re.getAll().filter(function(A){return A.scroller===nn||A.scroller===f});Kt.forEach(function(A){return A.revert(!0,!0)}),_=re.create({animation:ye.fromTo(U,{y:function(){return P=0,0}},{y:function(){return P=1,-Y()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(P){var x=at;x&&(_t(_),U.y=O),Ut(U.y,x),B(),s&&!v&&s(M)}}}),onRefreshInit:function(x){if(!r.isRefreshing){if(r.isRefreshing=!0,g){var N=re.getAll().filter(function(tt){return!!tt.pin});g.forEach(function(tt){tt.vars.pinnedContainer||N.forEach(function(it){if(it.pin.contains(tt.trigger)){var vt=tt.vars;vt.pinnedContainer=it.pin,tt.vars=null,tt.init(vt,tt.animation)}})})}var Z=x.getTween();w=Z&&Z._end>Z._dp._time,T=O,U.y=0,I&&(re.isTouch===1&&(f.style.position="absolute"),f.scrollTop=0,re.isTouch===1&&(f.style.position="fixed"))}},onRefresh:function(x){x.animation.invalidate(),x.setPositions(x.start,Y()/D),w||_t(x),U.y=-L()*D,Ut(U.y),H||(w&&(at=!1),x.animation.progress(ye.utils.clamp(0,1,T/D/-x.end))),w&&(x.progress-=.001,x.update()),r.isRefreshing=!1},id:"ScrollSmoother",scroller:nn,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return Y()/D},onScrubComplete:function(){G.reset(),o&&o(e)},scrub:I||!0}),this.smooth=function(A){return arguments.length&&(I=A||0,D=I&&+t.speed||1,_.scrubDuration(A)),_.getTween()?_.getTween().duration():0},_.getTween()&&(_.getTween().vars.ease=t.ease||Ll),this.scrollTrigger=_,t.effects&&this.effects(t.effects===!0?"[data-"+y+"speed], [data-"+y+"lag]":t.effects,{effectsPadding:t.effectsPadding,refresh:!1}),t.sections&&this.sections(t.sections===!0?"[data-section]":t.sections),Kt.forEach(function(A){A.vars.scroller=f,A.revert(!1,!0),A.init(A.vars,A.animation)}),this.paused=function(A,x){return arguments.length?(!!v!==A&&(A?(_.getTween()&&_.getTween().pause(),L(-O/D),G.reset(),C=re.normalizeScroll(),C&&C.disable(),v=re.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return q(-O)}}),v.nested=ym(no,"wheel,touch,scroll",!0,x!==!1)):(v.nested.kill(),v.kill(),v=0,C&&C.enable(),_.progress=(-O/D-_.start)/(_.end-_.start),_t(_))),this):!!v},this.kill=this.revert=function(){e.paused(!1),_t(_),_.kill();for(var A=(g||[]).concat(p||[]),x=A.length;x--;)A[x].kill();re.scrollerProxy(f),re.removeEventListener("killAll",It),re.removeEventListener("refresh",$t),f.style.cssText=b,d.style.cssText=S;var N=re.defaults({});N&&N.scroller===f&&re.defaults({scroller:nn}),e.normalizer&&re.normalizeScroll(!1),clearInterval(m),Pi=null,ot&&ot.disconnect(),ui.style.removeProperty("height"),nn.removeEventListener("focusin",ct)},this.refresh=function(A,x){return _.refresh(A,x)},c&&(this.normalizer=re.normalizeScroll(c===!0?{debounce:!0,content:!I&&d}:c)),re.config(t),"overscrollBehavior"in nn.getComputedStyle(ui)&&ye.set([ui,no],{overscrollBehavior:"none"}),"scrollBehavior"in nn.getComputedStyle(ui)&&ye.set([ui,no],{scrollBehavior:"auto"}),nn.addEventListener("focusin",ct),m=setInterval(B,250),ds.readyState==="loading"||requestAnimationFrame(function(){return re.refresh()})}return r.register=function(e){return Il||(ye=e||bm(),Mm()&&window.document&&(nn=window,ds=document,no=ds.documentElement,ui=ds.body),ye&&(fs=ye.utils.toArray,_m=ye.utils.clamp,Ll=ye.parseEase("expo"),vm=ye.core.context||function(){},re=ye.core.globals().ScrollTrigger,ye.core.globals("ScrollSmoother",r),ui&&re&&(Sm=ye.delayedCall(.2,function(){return re.isRefreshing||Pi&&Pi.refresh()}).pause(),ey=[nn,ds,no,ui],xm=re.core._getVelocityProp,ym=re.core._inputObserver,r.refresh=re.refresh,Il=1))),Il},ty(r,[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}]),r}();Xi.version="3.12.5";Xi.create=function(r){return Pi&&r&&Pi.content()===fs(r.content)[0]?Pi:new Xi(r)};Xi.get=function(){return Pi};bm()&&ye.registerPlugin(Xi);Yt.registerPlugin(Xi,ne);var wm=()=>{Yt.registerPlugin(Xi),Xi.create({smooth:1.5,effects:!0}),ne.refresh()};var If="164";var sy=0,Em=1,oy=2;var Kg=1,Lf=2,Ki=3,Ir=0,Fn=1,Qi=2,Cr=0,Rr=1,Tm=2,Am=3,Dm=4,ay=5,Ss=100,ly=101,cy=102,uy=103,hy=104,fy=200,dy=201,py=202,my=203,Zh=204,Jh=205,gy=206,_y=207,xy=208,yy=209,vy=210,Sy=211,My=212,by=213,wy=214,Ey=0,Ty=1,Ay=2,sc=3,Dy=4,Cy=5,Ry=6,Py=7,jg=0,Iy=1,Ly=2,Pr=0,Fy=1,Ny=2,Uy=3,Oy=4,By=5,ky=6,zy=7;var Qg=300,To=301,Ao=302,$h=303,Kh=304,Ic=306,jh=1e3,bs=1001,Qh=1002,Qn=1003,Vy=1004;var Fl=1005;var pi=1006,ph=1007;var ws=1008;var Lr=1009,Hy=1010,Gy=1011,t_=1012,e_=1013,Do=1014,Ar=1015,Lc=1016,n_=1017,i_=1018,Ra=1020,Wy=35902,Xy=1021,Yy=1022,Li=1023,qy=1024,Zy=1025,bo=1026,Ta=1027,Jy=1028,r_=1029,$y=1030,s_=1031,o_=1033,mh=33776,gh=33777,_h=33778,xh=33779,Cm=35840,Rm=35841,Pm=35842,Im=35843,Lm=36196,Fm=37492,Nm=37496,Um=37808,Om=37809,Bm=37810,km=37811,zm=37812,Vm=37813,Hm=37814,Gm=37815,Wm=37816,Xm=37817,Ym=37818,qm=37819,Zm=37820,Jm=37821,yh=36492,$m=36494,Km=36495,Ky=36283,jm=36284,Qm=36285,tg=36286;var oc=2300,ac=2301,vh=2302,eg=2400,ng=2401,ig=2402;var jy=3200,Qy=3201,tv=0,ev=1,Tr="",jn="srgb",Ur="srgb-linear",Ff="display-p3",Fc="display-p3-linear",lc="linear",Te="srgb",cc="rec709",uc="p3";var io=7680;var rg=519,nv=512,iv=513,rv=514,a_=515,sv=516,ov=517,av=518,lv=519,sg=35044;var og="300 es",tr=2e3,hc=2001,Fr=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}}},fn=["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 Sh=Math.PI/180,tf=180/Math.PI;function Pa(){let r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(fn[r&255]+fn[r>>8&255]+fn[r>>16&255]+fn[r>>24&255]+"-"+fn[t&255]+fn[t>>8&255]+"-"+fn[t>>16&15|64]+fn[t>>24&255]+"-"+fn[e&63|128]+fn[e>>8&255]+"-"+fn[e>>16&255]+fn[e>>24&255]+fn[n&255]+fn[n>>8&255]+fn[n>>16&255]+fn[n>>24&255]).toLowerCase()}function Ln(r,t,e){return Math.max(t,Math.min(e,r))}function cv(r,t){return(r%t+t)%t}function Mh(r,t,e){return(1-e)*r+e*t}function ya(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 In(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 _e=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(Ln(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}},oe=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 h=this.elements;return h[0]=t,h[1]=i,h[2]=a,h[3]=e,h[4]=s,h[5]=l,h[6]=n,h[7]=o,h[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],h=n[4],d=n[7],f=n[2],u=n[5],_=n[8],g=i[0],p=i[3],m=i[6],b=i[1],S=i[4],v=i[7],C=i[2],T=i[5],w=i[8];return s[0]=o*g+a*b+l*C,s[3]=o*p+a*S+l*T,s[6]=o*m+a*v+l*w,s[1]=c*g+h*b+d*C,s[4]=c*p+h*S+d*T,s[7]=c*m+h*v+d*w,s[2]=f*g+u*b+_*C,s[5]=f*p+u*S+_*T,s[8]=f*m+u*v+_*w,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],h=t[8];return e*o*h-e*a*c-n*s*h+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],h=t[8],d=h*o-a*c,f=a*l-h*s,u=c*s-o*l,_=e*d+n*f+i*u;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/_;return t[0]=d*g,t[1]=(i*c-h*n)*g,t[2]=(a*n-i*o)*g,t[3]=f*g,t[4]=(h*e-i*l)*g,t[5]=(i*s-a*e)*g,t[6]=u*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(bh.makeScale(t,e)),this}rotate(t){return this.premultiply(bh.makeRotation(-t)),this}translate(t,e){return this.premultiply(bh.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)}},bh=new oe;function l_(r){for(let t=r.length-1;t>=0;--t)if(r[t]>=65535)return!0;return!1}function fc(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function uv(){let r=fc("canvas");return r.style.display="block",r}var ag={};function hv(r){r in ag||(ag[r]=!0,console.warn(r))}var lg=new oe().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),cg=new oe().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Nl={[Ur]:{transfer:lc,primaries:cc,toReference:r=>r,fromReference:r=>r},[jn]:{transfer:Te,primaries:cc,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Fc]:{transfer:lc,primaries:uc,toReference:r=>r.applyMatrix3(cg),fromReference:r=>r.applyMatrix3(lg)},[Ff]:{transfer:Te,primaries:uc,toReference:r=>r.convertSRGBToLinear().applyMatrix3(cg),fromReference:r=>r.applyMatrix3(lg).convertLinearToSRGB()}},fv=new Set([Ur,Fc]),Se={enabled:!0,_workingColorSpace:Ur,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!fv.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=Nl[t].toReference,i=Nl[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 Nl[r].primaries},getTransfer:function(r){return r===Tr?lc:Nl[r].transfer}};function wo(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function wh(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var ro,ef=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{ro===void 0&&(ro=fc("canvas")),ro.width=t.width,ro.height=t.height;let n=ro.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ro}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=fc("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]=wo(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(wo(e[n]/255)*255):e[n]=wo(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}},dv=0,dc=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:dv++}),this.uuid=Pa(),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(Eh(i[o].image)):s.push(Eh(i[o]))}else s=Eh(i);n.url=s}return e||(t.images[this.uuid]=n),n}};function Eh(r){return typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap?ef.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 pv=0,ni=class r extends Fr{constructor(t=r.DEFAULT_IMAGE,e=r.DEFAULT_MAPPING,n=bs,i=bs,s=pi,o=ws,a=Li,l=Lr,c=r.DEFAULT_ANISOTROPY,h=Tr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:pv++}),this.uuid=Pa(),this.name="",this.source=new dc(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 _e(0,0),this.repeat=new _e(1,1),this.center=new _e(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new oe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,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!==Qg)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case jh:t.x=t.x-Math.floor(t.x);break;case bs:t.x=t.x<0?0:1;break;case Qh: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 jh:t.y=t.y-Math.floor(t.y);break;case bs:t.y=t.y<0?0:1;break;case Qh: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++}};ni.DEFAULT_IMAGE=null;ni.DEFAULT_MAPPING=Qg;ni.DEFAULT_ANISOTROPY=1;var je=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],h=l[4],d=l[8],f=l[1],u=l[5],_=l[9],g=l[2],p=l[6],m=l[10];if(Math.abs(h-f)<.01&&Math.abs(d-g)<.01&&Math.abs(_-p)<.01){if(Math.abs(h+f)<.1&&Math.abs(d+g)<.1&&Math.abs(_+p)<.1&&Math.abs(c+u+m-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let S=(c+1)/2,v=(u+1)/2,C=(m+1)/2,T=(h+f)/4,w=(d+g)/4,P=(_+p)/4;return S>v&&S>C?S<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(S),i=T/n,s=w/n):v>C?v<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(v),n=T/i,s=P/i):C<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(C),n=w/s,i=P/s),this.set(n,i,s,e),this}let b=Math.sqrt((p-_)*(p-_)+(d-g)*(d-g)+(f-h)*(f-h));return Math.abs(b)<.001&&(b=1),this.x=(p-_)/b,this.y=(d-g)/b,this.z=(f-h)/b,this.w=Math.acos((c+u+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}},nf=class extends Fr{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new je(0,0,t,e),this.scissorTest=!1,this.viewport=new je(0,0,t,e);let i={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:pi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let s=new ni(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 dc(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"})}},er=class extends nf{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},pc=class extends ni{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=Qn,this.minFilter=Qn,this.wrapR=bs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var rf=class extends ni{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=Qn,this.minFilter=Qn,this.wrapR=bs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Nr=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],h=n[i+2],d=n[i+3],f=s[o+0],u=s[o+1],_=s[o+2],g=s[o+3];if(a===0){t[e+0]=l,t[e+1]=c,t[e+2]=h,t[e+3]=d;return}if(a===1){t[e+0]=f,t[e+1]=u,t[e+2]=_,t[e+3]=g;return}if(d!==g||l!==f||c!==u||h!==_){let p=1-a,m=l*f+c*u+h*_+d*g,b=m>=0?1:-1,S=1-m*m;if(S>Number.EPSILON){let C=Math.sqrt(S),T=Math.atan2(C,m*b);p=Math.sin(p*T)/C,a=Math.sin(a*T)/C}let v=a*b;if(l=l*p+f*v,c=c*p+u*v,h=h*p+_*v,d=d*p+g*v,p===1-a){let C=1/Math.sqrt(l*l+c*c+h*h+d*d);l*=C,c*=C,h*=C,d*=C}}t[e]=l,t[e+1]=c,t[e+2]=h,t[e+3]=d}static multiplyQuaternionsFlat(t,e,n,i,s,o){let a=n[i],l=n[i+1],c=n[i+2],h=n[i+3],d=s[o],f=s[o+1],u=s[o+2],_=s[o+3];return t[e]=a*_+h*d+l*u-c*f,t[e+1]=l*_+h*f+c*d-a*u,t[e+2]=c*_+h*u+a*f-l*d,t[e+3]=h*_-a*d-l*f-c*u,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),h=a(i/2),d=a(s/2),f=l(n/2),u=l(i/2),_=l(s/2);switch(o){case"XYZ":this._x=f*h*d+c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d-f*u*_;break;case"YXZ":this._x=f*h*d+c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d+f*u*_;break;case"ZXY":this._x=f*h*d-c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d-f*u*_;break;case"ZYX":this._x=f*h*d-c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d+f*u*_;break;case"YZX":this._x=f*h*d+c*u*_,this._y=c*u*d+f*h*_,this._z=c*h*_-f*u*d,this._w=c*h*d-f*u*_;break;case"XZY":this._x=f*h*d-c*u*_,this._y=c*u*d-f*h*_,this._z=c*h*_+f*u*d,this._w=c*h*d+f*u*_;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],h=e[6],d=e[10],f=n+a+d;if(f>0){let u=.5/Math.sqrt(f+1);this._w=.25/u,this._x=(h-l)*u,this._y=(s-c)*u,this._z=(o-i)*u}else if(n>a&&n>d){let u=2*Math.sqrt(1+n-a-d);this._w=(h-l)/u,this._x=.25*u,this._y=(i+o)/u,this._z=(s+c)/u}else if(a>d){let u=2*Math.sqrt(1+a-n-d);this._w=(s-c)/u,this._x=(i+o)/u,this._y=.25*u,this._z=(l+h)/u}else{let u=2*Math.sqrt(1+d-n-a);this._w=(o-i)/u,this._x=(s+c)/u,this._y=(l+h)/u,this._z=.25*u}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(Ln(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,h=e._w;return this._x=n*h+o*a+i*c-s*l,this._y=i*h+o*l+s*a-n*c,this._z=s*h+o*c+n*l-i*a,this._w=o*h-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 u=1-e;return this._w=u*o+e*this._w,this._x=u*n+e*this._x,this._y=u*i+e*this._y,this._z=u*s+e*this._z,this.normalize(),this}let c=Math.sqrt(l),h=Math.atan2(c,a),d=Math.sin((1-e)*h)/c,f=Math.sin(e*h)/c;return this._w=o*d+this._w*f,this._x=n*d+this._x*f,this._y=i*d+this._y*f,this._z=s*d+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}},nt=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(ug.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ug.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),h=2*(a*e-s*i),d=2*(s*n-o*e);return this.x=e+l*c+o*d-a*h,this.y=n+l*h+a*c-s*d,this.z=i+l*d+s*h-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 Th.copy(this).projectOnVector(t),this.sub(Th)}reflect(t){return this.sub(Th.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(Ln(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}},Th=new nt,ug=new Nr,Es=class{constructor(t=new nt(1/0,1/0,1/0),e=new nt(-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(hi.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(hi.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=hi.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,hi):hi.fromBufferAttribute(s,o),hi.applyMatrix4(t.matrixWorld),this.expandByPoint(hi);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Ul.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Ul.copy(n.boundingBox)),Ul.applyMatrix4(t.matrixWorld),this.union(Ul)}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,hi),hi.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(va),Ol.subVectors(this.max,va),so.subVectors(t.a,va),oo.subVectors(t.b,va),ao.subVectors(t.c,va),vr.subVectors(oo,so),Sr.subVectors(ao,oo),ps.subVectors(so,ao);let e=[0,-vr.z,vr.y,0,-Sr.z,Sr.y,0,-ps.z,ps.y,vr.z,0,-vr.x,Sr.z,0,-Sr.x,ps.z,0,-ps.x,-vr.y,vr.x,0,-Sr.y,Sr.x,0,-ps.y,ps.x,0];return!Ah(e,so,oo,ao,Ol)||(e=[1,0,0,0,1,0,0,0,1],!Ah(e,so,oo,ao,Ol))?!1:(Bl.crossVectors(vr,Sr),e=[Bl.x,Bl.y,Bl.z],Ah(e,so,oo,ao,Ol))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,hi).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(hi).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:(Yi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Yi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Yi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Yi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Yi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Yi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Yi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Yi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Yi),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)}},Yi=[new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt],hi=new nt,Ul=new Es,so=new nt,oo=new nt,ao=new nt,vr=new nt,Sr=new nt,ps=new nt,va=new nt,Ol=new nt,Bl=new nt,ms=new nt;function Ah(r,t,e,n,i){for(let s=0,o=r.length-3;s<=o;s+=3){ms.fromArray(r,s);let a=i.x*Math.abs(ms.x)+i.y*Math.abs(ms.y)+i.z*Math.abs(ms.z),l=t.dot(ms),c=e.dot(ms),h=n.dot(ms);if(Math.max(-Math.max(l,c,h),Math.min(l,c,h))>a)return!1}return!0}var mv=new Es,Sa=new nt,Dh=new nt,Co=class{constructor(t=new nt,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):mv.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;Sa.subVectors(t,this.center);let e=Sa.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),i=(n-this.radius)*.5;this.center.addScaledVector(Sa,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):(Dh.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Sa.copy(t.center).add(Dh)),this.expandByPoint(Sa.copy(t.center).sub(Dh))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},qi=new nt,Ch=new nt,kl=new nt,Mr=new nt,Rh=new nt,zl=new nt,Ph=new nt,mc=class{constructor(t=new nt,e=new nt(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,qi)),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=qi.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(qi.copy(this.origin).addScaledVector(this.direction,e),qi.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){Ch.copy(t).add(e).multiplyScalar(.5),kl.copy(e).sub(t).normalize(),Mr.copy(this.origin).sub(Ch);let s=t.distanceTo(e)*.5,o=-this.direction.dot(kl),a=Mr.dot(this.direction),l=-Mr.dot(kl),c=Mr.lengthSq(),h=Math.abs(1-o*o),d,f,u,_;if(h>0)if(d=o*l-a,f=o*a-l,_=s*h,d>=0)if(f>=-_)if(f<=_){let g=1/h;d*=g,f*=g,u=d*(d+o*f+2*a)+f*(o*d+f+2*l)+c}else f=s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;else f=-s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;else f<=-_?(d=Math.max(0,-(-o*s+a)),f=d>0?-s:Math.min(Math.max(-s,-l),s),u=-d*d+f*(f+2*l)+c):f<=_?(d=0,f=Math.min(Math.max(-s,-l),s),u=f*(f+2*l)+c):(d=Math.max(0,-(o*s+a)),f=d>0?s:Math.min(Math.max(-s,-l),s),u=-d*d+f*(f+2*l)+c);else f=o>0?-s:s,d=Math.max(0,-(o*f+a)),u=-d*d+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(Ch).addScaledVector(kl,f),u}intersectSphere(t,e){qi.subVectors(t.center,this.origin);let n=qi.dot(this.direction),i=qi.dot(qi)-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,h=1/this.direction.y,d=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),h>=0?(s=(t.min.y-f.y)*h,o=(t.max.y-f.y)*h):(s=(t.max.y-f.y)*h,o=(t.min.y-f.y)*h),n>o||s>i||((s>n||isNaN(n))&&(n=s),(o<i||isNaN(i))&&(i=o),d>=0?(a=(t.min.z-f.z)*d,l=(t.max.z-f.z)*d):(a=(t.max.z-f.z)*d,l=(t.min.z-f.z)*d),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,qi)!==null}intersectTriangle(t,e,n,i,s){Rh.subVectors(e,t),zl.subVectors(n,t),Ph.crossVectors(Rh,zl);let o=this.direction.dot(Ph),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Mr.subVectors(this.origin,t);let l=a*this.direction.dot(zl.crossVectors(Mr,zl));if(l<0)return null;let c=a*this.direction.dot(Rh.cross(Mr));if(c<0||l+c>o)return null;let h=-a*Mr.dot(Ph);return h<0?null:this.at(h/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)}},Ue=class r{constructor(t,e,n,i,s,o,a,l,c,h,d,f,u,_,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,h,d,f,u,_,g,p)}set(t,e,n,i,s,o,a,l,c,h,d,f,u,_,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]=h,m[10]=d,m[14]=f,m[3]=u,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/lo.setFromMatrixColumn(t,0).length(),s=1/lo.setFromMatrixColumn(t,1).length(),o=1/lo.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),h=Math.cos(s),d=Math.sin(s);if(t.order==="XYZ"){let f=o*h,u=o*d,_=a*h,g=a*d;e[0]=l*h,e[4]=-l*d,e[8]=c,e[1]=u+_*c,e[5]=f-g*c,e[9]=-a*l,e[2]=g-f*c,e[6]=_+u*c,e[10]=o*l}else if(t.order==="YXZ"){let f=l*h,u=l*d,_=c*h,g=c*d;e[0]=f+g*a,e[4]=_*a-u,e[8]=o*c,e[1]=o*d,e[5]=o*h,e[9]=-a,e[2]=u*a-_,e[6]=g+f*a,e[10]=o*l}else if(t.order==="ZXY"){let f=l*h,u=l*d,_=c*h,g=c*d;e[0]=f-g*a,e[4]=-o*d,e[8]=_+u*a,e[1]=u+_*a,e[5]=o*h,e[9]=g-f*a,e[2]=-o*c,e[6]=a,e[10]=o*l}else if(t.order==="ZYX"){let f=o*h,u=o*d,_=a*h,g=a*d;e[0]=l*h,e[4]=_*c-u,e[8]=f*c+g,e[1]=l*d,e[5]=g*c+f,e[9]=u*c-_,e[2]=-c,e[6]=a*l,e[10]=o*l}else if(t.order==="YZX"){let f=o*l,u=o*c,_=a*l,g=a*c;e[0]=l*h,e[4]=g-f*d,e[8]=_*d+u,e[1]=d,e[5]=o*h,e[9]=-a*h,e[2]=-c*h,e[6]=u*d+_,e[10]=f-g*d}else if(t.order==="XZY"){let f=o*l,u=o*c,_=a*l,g=a*c;e[0]=l*h,e[4]=-d,e[8]=c*h,e[1]=f*d+g,e[5]=o*h,e[9]=u*d-_,e[2]=_*d-u,e[6]=a*h,e[10]=g*d+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(gv,t,_v)}lookAt(t,e,n){let i=this.elements;return zn.subVectors(t,e),zn.lengthSq()===0&&(zn.z=1),zn.normalize(),br.crossVectors(n,zn),br.lengthSq()===0&&(Math.abs(n.z)===1?zn.x+=1e-4:zn.z+=1e-4,zn.normalize(),br.crossVectors(n,zn)),br.normalize(),Vl.crossVectors(zn,br),i[0]=br.x,i[4]=Vl.x,i[8]=zn.x,i[1]=br.y,i[5]=Vl.y,i[9]=zn.y,i[2]=br.z,i[6]=Vl.z,i[10]=zn.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],h=n[1],d=n[5],f=n[9],u=n[13],_=n[2],g=n[6],p=n[10],m=n[14],b=n[3],S=n[7],v=n[11],C=n[15],T=i[0],w=i[4],P=i[8],M=i[12],y=i[1],L=i[5],I=i[9],D=i[13],O=i[2],X=i[6],H=i[10],G=i[14],B=i[3],U=i[7],R=i[11],at=i[15];return s[0]=o*T+a*y+l*O+c*B,s[4]=o*w+a*L+l*X+c*U,s[8]=o*P+a*I+l*H+c*R,s[12]=o*M+a*D+l*G+c*at,s[1]=h*T+d*y+f*O+u*B,s[5]=h*w+d*L+f*X+u*U,s[9]=h*P+d*I+f*H+u*R,s[13]=h*M+d*D+f*G+u*at,s[2]=_*T+g*y+p*O+m*B,s[6]=_*w+g*L+p*X+m*U,s[10]=_*P+g*I+p*H+m*R,s[14]=_*M+g*D+p*G+m*at,s[3]=b*T+S*y+v*O+C*B,s[7]=b*w+S*L+v*X+C*U,s[11]=b*P+S*I+v*H+C*R,s[15]=b*M+S*D+v*G+C*at,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],h=t[2],d=t[6],f=t[10],u=t[14],_=t[3],g=t[7],p=t[11],m=t[15];return _*(+s*l*d-i*c*d-s*a*f+n*c*f+i*a*u-n*l*u)+g*(+e*l*u-e*c*f+s*o*f-i*o*u+i*c*h-s*l*h)+p*(+e*c*d-e*a*u-s*o*d+n*o*u+s*a*h-n*c*h)+m*(-i*a*h-e*l*d+e*a*f+i*o*d-n*o*f+n*l*h)}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],h=t[8],d=t[9],f=t[10],u=t[11],_=t[12],g=t[13],p=t[14],m=t[15],b=d*p*c-g*f*c+g*l*u-a*p*u-d*l*m+a*f*m,S=_*f*c-h*p*c-_*l*u+o*p*u+h*l*m-o*f*m,v=h*g*c-_*d*c+_*a*u-o*g*u-h*a*m+o*d*m,C=_*d*l-h*g*l-_*a*f+o*g*f+h*a*p-o*d*p,T=e*b+n*S+i*v+s*C;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let w=1/T;return t[0]=b*w,t[1]=(g*f*s-d*p*s-g*i*u+n*p*u+d*i*m-n*f*m)*w,t[2]=(a*p*s-g*l*s+g*i*c-n*p*c-a*i*m+n*l*m)*w,t[3]=(d*l*s-a*f*s-d*i*c+n*f*c+a*i*u-n*l*u)*w,t[4]=S*w,t[5]=(h*p*s-_*f*s+_*i*u-e*p*u-h*i*m+e*f*m)*w,t[6]=(_*l*s-o*p*s-_*i*c+e*p*c+o*i*m-e*l*m)*w,t[7]=(o*f*s-h*l*s+h*i*c-e*f*c-o*i*u+e*l*u)*w,t[8]=v*w,t[9]=(_*d*s-h*g*s-_*n*u+e*g*u+h*n*m-e*d*m)*w,t[10]=(o*g*s-_*a*s+_*n*c-e*g*c-o*n*m+e*a*m)*w,t[11]=(h*a*s-o*d*s-h*n*c+e*d*c+o*n*u-e*a*u)*w,t[12]=C*w,t[13]=(h*g*i-_*d*i+_*n*f-e*g*f-h*n*p+e*d*p)*w,t[14]=(_*a*i-o*g*i-_*n*l+e*g*l+o*n*p-e*a*p)*w,t[15]=(o*d*i-h*a*i+h*n*l-e*d*l-o*n*f+e*a*f)*w,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,h=s*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,h*a+n,h*l-i*o,0,c*l-i*a,h*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,h=o+o,d=a+a,f=s*c,u=s*h,_=s*d,g=o*h,p=o*d,m=a*d,b=l*c,S=l*h,v=l*d,C=n.x,T=n.y,w=n.z;return i[0]=(1-(g+m))*C,i[1]=(u+v)*C,i[2]=(_-S)*C,i[3]=0,i[4]=(u-v)*T,i[5]=(1-(f+m))*T,i[6]=(p+b)*T,i[7]=0,i[8]=(_+S)*w,i[9]=(p-b)*w,i[10]=(1-(f+g))*w,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=lo.set(i[0],i[1],i[2]).length(),o=lo.set(i[4],i[5],i[6]).length(),a=lo.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],fi.copy(this);let c=1/s,h=1/o,d=1/a;return fi.elements[0]*=c,fi.elements[1]*=c,fi.elements[2]*=c,fi.elements[4]*=h,fi.elements[5]*=h,fi.elements[6]*=h,fi.elements[8]*=d,fi.elements[9]*=d,fi.elements[10]*=d,e.setFromRotationMatrix(fi),n.x=s,n.y=o,n.z=a,this}makePerspective(t,e,n,i,s,o,a=tr){let l=this.elements,c=2*s/(e-t),h=2*s/(n-i),d=(e+t)/(e-t),f=(n+i)/(n-i),u,_;if(a===tr)u=-(o+s)/(o-s),_=-2*o*s/(o-s);else if(a===hc)u=-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]=d,l[12]=0,l[1]=0,l[5]=h,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=u,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,i,s,o,a=tr){let l=this.elements,c=1/(e-t),h=1/(n-i),d=1/(o-s),f=(e+t)*c,u=(n+i)*h,_,g;if(a===tr)_=(o+s)*d,g=-2*d;else if(a===hc)_=s*d,g=-1*d;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*h,l[9]=0,l[13]=-u,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}},lo=new nt,fi=new Ue,gv=new nt(0,0,0),_v=new nt(1,1,1),br=new nt,Vl=new nt,zn=new nt,hg=new Ue,fg=new Nr,nr=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],h=i[9],d=i[2],f=i[6],u=i[10];switch(e){case"XYZ":this._y=Math.asin(Ln(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,u),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ln(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,u),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ln(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,u),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-Ln(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,u),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Ln(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,u));break;case"XZY":this._z=Math.asin(-Ln(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,u),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 hg.makeRotationFromQuaternion(t),this.setFromRotationMatrix(hg,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return fg.setFromEuler(this),this.setFromQuaternion(fg,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}};nr.DEFAULT_ORDER="XYZ";var gc=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}},xv=0,dg=new nt,co=new Nr,Zi=new Ue,Hl=new nt,Ma=new nt,yv=new nt,vv=new Nr,pg=new nt(1,0,0),mg=new nt(0,1,0),gg=new nt(0,0,1),_g={type:"added"},Sv={type:"removed"},uo={type:"childadded",child:null},Ih={type:"childremoved",child:null},pn=class r extends Fr{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:xv++}),this.uuid=Pa(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new nt,e=new nr,n=new Nr,i=new nt(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 Ue},normalMatrix:{value:new oe}}),this.matrix=new Ue,this.matrixWorld=new Ue,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new gc,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 co.setFromAxisAngle(t,e),this.quaternion.multiply(co),this}rotateOnWorldAxis(t,e){return co.setFromAxisAngle(t,e),this.quaternion.premultiply(co),this}rotateX(t){return this.rotateOnAxis(pg,t)}rotateY(t){return this.rotateOnAxis(mg,t)}rotateZ(t){return this.rotateOnAxis(gg,t)}translateOnAxis(t,e){return dg.copy(t).applyQuaternion(this.quaternion),this.position.add(dg.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(pg,t)}translateY(t){return this.translateOnAxis(mg,t)}translateZ(t){return this.translateOnAxis(gg,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Zi.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?Hl.copy(t):Hl.set(t,e,n);let i=this.parent;this.updateWorldMatrix(!0,!1),Ma.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Zi.lookAt(Ma,Hl,this.up):Zi.lookAt(Hl,Ma,this.up),this.quaternion.setFromRotationMatrix(Zi),i&&(Zi.extractRotation(i.matrixWorld),co.setFromRotationMatrix(Zi),this.quaternion.premultiply(co.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(_g),uo.child=t,this.dispatchEvent(uo),uo.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(Sv),Ih.child=t,this.dispatchEvent(Ih),Ih.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),Zi.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Zi.multiply(t.parent.matrixWorld)),t.applyMatrix4(Zi),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(_g),uo.child=t,this.dispatchEvent(uo),uo.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(Ma,t,yv),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ma,vv,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,h=l.length;c<h;c++){let d=l[c];s(t.shapes,d)}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),h=o(t.images),d=o(t.shapes),f=o(t.skeletons),u=o(t.animations),_=o(t.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),h.length>0&&(n.images=h),d.length>0&&(n.shapes=d),f.length>0&&(n.skeletons=f),u.length>0&&(n.animations=u),_.length>0&&(n.nodes=_)}return n.object=i,n;function o(a){let l=[];for(let c in a){let h=a[c];delete h.metadata,l.push(h)}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}};pn.DEFAULT_UP=new nt(0,1,0);pn.DEFAULT_MATRIX_AUTO_UPDATE=!0;pn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var di=new nt,Ji=new nt,Lh=new nt,$i=new nt,ho=new nt,fo=new nt,xg=new nt,Fh=new nt,Nh=new nt,Uh=new nt,So=class r{constructor(t=new nt,e=new nt,n=new nt){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),di.subVectors(t,e),i.cross(di);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){di.subVectors(i,e),Ji.subVectors(n,e),Lh.subVectors(t,e);let o=di.dot(di),a=di.dot(Ji),l=di.dot(Lh),c=Ji.dot(Ji),h=Ji.dot(Lh),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;let f=1/d,u=(c*l-a*h)*f,_=(o*h-a*l)*f;return s.set(1-u-_,_,u)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,$i)===null?!1:$i.x>=0&&$i.y>=0&&$i.x+$i.y<=1}static getInterpolation(t,e,n,i,s,o,a,l){return this.getBarycoord(t,e,n,i,$i)===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,$i.x),l.addScaledVector(o,$i.y),l.addScaledVector(a,$i.z),l)}static isFrontFacing(t,e,n,i){return di.subVectors(n,e),Ji.subVectors(t,e),di.cross(Ji).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 di.subVectors(this.c,this.b),Ji.subVectors(this.a,this.b),di.cross(Ji).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;ho.subVectors(i,n),fo.subVectors(s,n),Fh.subVectors(t,n);let l=ho.dot(Fh),c=fo.dot(Fh);if(l<=0&&c<=0)return e.copy(n);Nh.subVectors(t,i);let h=ho.dot(Nh),d=fo.dot(Nh);if(h>=0&&d<=h)return e.copy(i);let f=l*d-h*c;if(f<=0&&l>=0&&h<=0)return o=l/(l-h),e.copy(n).addScaledVector(ho,o);Uh.subVectors(t,s);let u=ho.dot(Uh),_=fo.dot(Uh);if(_>=0&&u<=_)return e.copy(s);let g=u*c-l*_;if(g<=0&&c>=0&&_<=0)return a=c/(c-_),e.copy(n).addScaledVector(fo,a);let p=h*_-u*d;if(p<=0&&d-h>=0&&u-_>=0)return xg.subVectors(s,i),a=(d-h)/(d-h+(u-_)),e.copy(i).addScaledVector(xg,a);let m=1/(p+g+f);return o=g*m,a=f*m,e.copy(n).addScaledVector(ho,o).addScaledVector(fo,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},c_={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},wr={h:0,s:0,l:0},Gl={h:0,s:0,l:0};function Oh(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 ge=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=jn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Se.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Se.workingColorSpace){return this.r=t,this.g=e,this.b=n,Se.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Se.workingColorSpace){if(t=cv(t,1),e=Ln(e,0,1),n=Ln(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=Oh(o,s,t+1/3),this.g=Oh(o,s,t),this.b=Oh(o,s,t-1/3)}return Se.toWorkingColorSpace(this,i),this}setStyle(t,e=jn){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=jn){let n=c_[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=wo(t.r),this.g=wo(t.g),this.b=wo(t.b),this}copyLinearToSRGB(t){return this.r=wh(t.r),this.g=wh(t.g),this.b=wh(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=jn){return Se.fromWorkingColorSpace(dn.copy(this),t),Math.round(Ln(dn.r*255,0,255))*65536+Math.round(Ln(dn.g*255,0,255))*256+Math.round(Ln(dn.b*255,0,255))}getHexString(t=jn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Se.workingColorSpace){Se.fromWorkingColorSpace(dn.copy(this),e);let n=dn.r,i=dn.g,s=dn.b,o=Math.max(n,i,s),a=Math.min(n,i,s),l,c,h=(a+o)/2;if(a===o)l=0,c=0;else{let d=o-a;switch(c=h<=.5?d/(o+a):d/(2-o-a),o){case n:l=(i-s)/d+(i<s?6:0);break;case i:l=(s-n)/d+2;break;case s:l=(n-i)/d+4;break}l/=6}return t.h=l,t.s=c,t.l=h,t}getRGB(t,e=Se.workingColorSpace){return Se.fromWorkingColorSpace(dn.copy(this),e),t.r=dn.r,t.g=dn.g,t.b=dn.b,t}getStyle(t=jn){Se.fromWorkingColorSpace(dn.copy(this),t);let e=dn.r,n=dn.g,i=dn.b;return t!==jn?`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(wr),this.setHSL(wr.h+t,wr.s+e,wr.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(wr),t.getHSL(Gl);let n=Mh(wr.h,Gl.h,e),i=Mh(wr.s,Gl.s,e),s=Mh(wr.l,Gl.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}},dn=new ge;ge.NAMES=c_;var Mv=0,Ts=class extends Fr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Mv++}),this.uuid=Pa(),this.name="",this.type="Material",this.blending=Rr,this.side=Ir,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Zh,this.blendDst=Jh,this.blendEquation=Ss,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ge(0,0,0),this.blendAlpha=0,this.depthFunc=sc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=rg,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=io,this.stencilZFail=io,this.stencilZPass=io,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!==Rr&&(n.blending=this.blending),this.side!==Ir&&(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!==Zh&&(n.blendSrc=this.blendSrc),this.blendDst!==Jh&&(n.blendDst=this.blendDst),this.blendEquation!==Ss&&(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!==sc&&(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!==rg&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==io&&(n.stencilFail=this.stencilFail),this.stencilZFail!==io&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==io&&(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++}},_c=class extends Ts{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ge(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 nr,this.combine=jg,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 Ve=new nt,Wl=new _e,ti=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=sg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ar,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return hv("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++)Wl.fromBufferAttribute(this,e),Wl.applyMatrix3(t),this.setXY(e,Wl.x,Wl.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyMatrix3(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyMatrix4(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.applyNormalMatrix(t),this.setXYZ(e,Ve.x,Ve.y,Ve.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Ve.fromBufferAttribute(this,e),Ve.transformDirection(t),this.setXYZ(e,Ve.x,Ve.y,Ve.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=ya(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=In(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=ya(e,this.array)),e}setX(t,e){return this.normalized&&(e=In(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=ya(e,this.array)),e}setY(t,e){return this.normalized&&(e=In(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=ya(e,this.array)),e}setZ(t,e){return this.normalized&&(e=In(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=ya(e,this.array)),e}setW(t,e){return this.normalized&&(e=In(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=In(e,this.array),n=In(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=In(e,this.array),n=In(n,this.array),i=In(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=In(e,this.array),n=In(n,this.array),i=In(i,this.array),s=In(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!==sg&&(t.usage=this.usage),t}};var xc=class extends ti{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var yc=class extends ti{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var ei=class extends ti{constructor(t,e,n){super(new Float32Array(t),e,n)}},bv=0,Kn=new Ue,Bh=new pn,po=new nt,Vn=new Es,ba=new Es,Ke=new nt,Fi=class r extends Fr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bv++}),this.uuid=Pa(),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(l_(t)?yc:xc)(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 oe().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 Kn.makeRotationFromQuaternion(t),this.applyMatrix4(Kn),this}rotateX(t){return Kn.makeRotationX(t),this.applyMatrix4(Kn),this}rotateY(t){return Kn.makeRotationY(t),this.applyMatrix4(Kn),this}rotateZ(t){return Kn.makeRotationZ(t),this.applyMatrix4(Kn),this}translate(t,e,n){return Kn.makeTranslation(t,e,n),this.applyMatrix4(Kn),this}scale(t,e,n){return Kn.makeScale(t,e,n),this.applyMatrix4(Kn),this}lookAt(t){return Bh.lookAt(t),Bh.updateMatrix(),this.applyMatrix4(Bh.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(po).negate(),this.translate(po.x,po.y,po.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 ei(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Es);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 nt(-1/0,-1/0,-1/0),new nt(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];Vn.setFromBufferAttribute(s),this.morphTargetsRelative?(Ke.addVectors(this.boundingBox.min,Vn.min),this.boundingBox.expandByPoint(Ke),Ke.addVectors(this.boundingBox.max,Vn.max),this.boundingBox.expandByPoint(Ke)):(this.boundingBox.expandByPoint(Vn.min),this.boundingBox.expandByPoint(Vn.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 Co);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 nt,1/0);return}if(t){let n=this.boundingSphere.center;if(Vn.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){let a=e[s];ba.setFromBufferAttribute(a),this.morphTargetsRelative?(Ke.addVectors(Vn.min,ba.min),Vn.expandByPoint(Ke),Ke.addVectors(Vn.max,ba.max),Vn.expandByPoint(Ke)):(Vn.expandByPoint(ba.min),Vn.expandByPoint(ba.max))}Vn.getCenter(n);let i=0;for(let s=0,o=t.count;s<o;s++)Ke.fromBufferAttribute(t,s),i=Math.max(i,n.distanceToSquared(Ke));if(e)for(let s=0,o=e.length;s<o;s++){let a=e[s],l=this.morphTargetsRelative;for(let c=0,h=a.count;c<h;c++)Ke.fromBufferAttribute(a,c),l&&(po.fromBufferAttribute(t,c),Ke.add(po)),i=Math.max(i,n.distanceToSquared(Ke))}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 ti(new Float32Array(4*n.count),4));let o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new nt,l[P]=new nt;let c=new nt,h=new nt,d=new nt,f=new _e,u=new _e,_=new _e,g=new nt,p=new nt;function m(P,M,y){c.fromBufferAttribute(n,P),h.fromBufferAttribute(n,M),d.fromBufferAttribute(n,y),f.fromBufferAttribute(s,P),u.fromBufferAttribute(s,M),_.fromBufferAttribute(s,y),h.sub(c),d.sub(c),u.sub(f),_.sub(f);let L=1/(u.x*_.y-_.x*u.y);isFinite(L)&&(g.copy(h).multiplyScalar(_.y).addScaledVector(d,-u.y).multiplyScalar(L),p.copy(d).multiplyScalar(u.x).addScaledVector(h,-_.x).multiplyScalar(L),a[P].add(g),a[M].add(g),a[y].add(g),l[P].add(p),l[M].add(p),l[y].add(p))}let b=this.groups;b.length===0&&(b=[{start:0,count:t.count}]);for(let P=0,M=b.length;P<M;++P){let y=b[P],L=y.start,I=y.count;for(let D=L,O=L+I;D<O;D+=3)m(t.getX(D+0),t.getX(D+1),t.getX(D+2))}let S=new nt,v=new nt,C=new nt,T=new nt;function w(P){C.fromBufferAttribute(i,P),T.copy(C);let M=a[P];S.copy(M),S.sub(C.multiplyScalar(C.dot(M))).normalize(),v.crossVectors(T,M);let L=v.dot(l[P])<0?-1:1;o.setXYZW(P,S.x,S.y,S.z,L)}for(let P=0,M=b.length;P<M;++P){let y=b[P],L=y.start,I=y.count;for(let D=L,O=L+I;D<O;D+=3)w(t.getX(D+0)),w(t.getX(D+1)),w(t.getX(D+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 ti(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let f=0,u=n.count;f<u;f++)n.setXYZ(f,0,0,0);let i=new nt,s=new nt,o=new nt,a=new nt,l=new nt,c=new nt,h=new nt,d=new nt;if(t)for(let f=0,u=t.count;f<u;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),h.subVectors(o,s),d.subVectors(i,s),h.cross(d),a.fromBufferAttribute(n,_),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,p),a.add(h),l.add(h),c.add(h),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,u=e.count;f<u;f+=3)i.fromBufferAttribute(e,f+0),s.fromBufferAttribute(e,f+1),o.fromBufferAttribute(e,f+2),h.subVectors(o,s),d.subVectors(i,s),h.cross(d),n.setXYZ(f+0,h.x,h.y,h.z),n.setXYZ(f+1,h.x,h.y,h.z),n.setXYZ(f+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Ke.fromBufferAttribute(t,e),Ke.normalize(),t.setXYZ(e,Ke.x,Ke.y,Ke.z)}toNonIndexed(){function t(a,l){let c=a.array,h=a.itemSize,d=a.normalized,f=new c.constructor(l.length*h),u=0,_=0;for(let g=0,p=l.length;g<p;g++){a.isInterleavedBufferAttribute?u=l[g]*a.data.stride+a.offset:u=l[g]*h;for(let m=0;m<h;m++)f[_++]=c[u++]}return new ti(f,h,d)}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 h=0,d=c.length;h<d;h++){let f=c[h],u=t(f,n);l.push(u)}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],h=[];for(let d=0,f=c.length;d<f;d++){let u=c[d];h.push(u.toJSON(t.data))}h.length>0&&(i[l]=h,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 h=i[c];this.setAttribute(c,h.clone(e))}let s=t.morphAttributes;for(let c in s){let h=[],d=s[c];for(let f=0,u=d.length;f<u;f++)h.push(d[f].clone(e));this.morphAttributes[c]=h}this.morphTargetsRelative=t.morphTargetsRelative;let o=t.groups;for(let c=0,h=o.length;c<h;c++){let d=o[c];this.addGroup(d.start,d.count,d.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"})}},yg=new Ue,gs=new mc,Xl=new Co,vg=new nt,mo=new nt,go=new nt,_o=new nt,kh=new nt,Yl=new nt,ql=new _e,Zl=new _e,Jl=new _e,Sg=new nt,Mg=new nt,bg=new nt,$l=new nt,Kl=new nt,mi=class extends pn{constructor(t=new Fi,e=new _c){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){Yl.set(0,0,0);for(let l=0,c=s.length;l<c;l++){let h=a[l],d=s[l];h!==0&&(kh.fromBufferAttribute(d,t),o?Yl.addScaledVector(kh,h):Yl.addScaledVector(kh.sub(e),h))}e.add(Yl)}return e}raycast(t,e){let n=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Xl.copy(n.boundingSphere),Xl.applyMatrix4(s),gs.copy(t.ray).recast(t.near),!(Xl.containsPoint(gs.origin)===!1&&(gs.intersectSphere(Xl,vg)===null||gs.origin.distanceToSquared(vg)>(t.far-t.near)**2))&&(yg.copy(s).invert(),gs.copy(t.ray).applyMatrix4(yg),!(n.boundingBox!==null&&gs.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,gs)))}_computeIntersections(t,e,n){let i,s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,f=s.groups,u=s.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,g=f.length;_<g;_++){let p=f[_],m=o[p.materialIndex],b=Math.max(p.start,u.start),S=Math.min(a.count,Math.min(p.start+p.count,u.start+u.count));for(let v=b,C=S;v<C;v+=3){let T=a.getX(v),w=a.getX(v+1),P=a.getX(v+2);i=jl(this,m,t,n,c,h,d,T,w,P),i&&(i.faceIndex=Math.floor(v/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),g=Math.min(a.count,u.start+u.count);for(let p=_,m=g;p<m;p+=3){let b=a.getX(p),S=a.getX(p+1),v=a.getX(p+2);i=jl(this,o,t,n,c,h,d,b,S,v),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],b=Math.max(p.start,u.start),S=Math.min(l.count,Math.min(p.start+p.count,u.start+u.count));for(let v=b,C=S;v<C;v+=3){let T=v,w=v+1,P=v+2;i=jl(this,m,t,n,c,h,d,T,w,P),i&&(i.faceIndex=Math.floor(v/3),i.face.materialIndex=p.materialIndex,e.push(i))}}else{let _=Math.max(0,u.start),g=Math.min(l.count,u.start+u.count);for(let p=_,m=g;p<m;p+=3){let b=p,S=p+1,v=p+2;i=jl(this,o,t,n,c,h,d,b,S,v),i&&(i.faceIndex=Math.floor(p/3),e.push(i))}}}};function wv(r,t,e,n,i,s,o,a){let l;if(t.side===Fn?l=n.intersectTriangle(o,s,i,!0,a):l=n.intersectTriangle(i,s,o,t.side===Ir,a),l===null)return null;Kl.copy(a),Kl.applyMatrix4(r.matrixWorld);let c=e.ray.origin.distanceTo(Kl);return c<e.near||c>e.far?null:{distance:c,point:Kl.clone(),object:r}}function jl(r,t,e,n,i,s,o,a,l,c){r.getVertexPosition(a,mo),r.getVertexPosition(l,go),r.getVertexPosition(c,_o);let h=wv(r,t,e,n,mo,go,_o,$l);if(h){i&&(ql.fromBufferAttribute(i,a),Zl.fromBufferAttribute(i,l),Jl.fromBufferAttribute(i,c),h.uv=So.getInterpolation($l,mo,go,_o,ql,Zl,Jl,new _e)),s&&(ql.fromBufferAttribute(s,a),Zl.fromBufferAttribute(s,l),Jl.fromBufferAttribute(s,c),h.uv1=So.getInterpolation($l,mo,go,_o,ql,Zl,Jl,new _e)),o&&(Sg.fromBufferAttribute(o,a),Mg.fromBufferAttribute(o,l),bg.fromBufferAttribute(o,c),h.normal=So.getInterpolation($l,mo,go,_o,Sg,Mg,bg,new nt),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));let d={a,b:l,c,normal:new nt,materialIndex:0};So.getNormal(mo,go,_o,d.normal),h.face=d}return h}var Aa=class r extends Fi{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=[],h=[],d=[],f=0,u=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 ei(c,3)),this.setAttribute("normal",new ei(h,3)),this.setAttribute("uv",new ei(d,2));function _(g,p,m,b,S,v,C,T,w,P,M){let y=v/w,L=C/P,I=v/2,D=C/2,O=T/2,X=w+1,H=P+1,G=0,B=0,U=new nt;for(let R=0;R<H;R++){let at=R*L-D;for(let _t=0;_t<X;_t++){let Ut=_t*y-I;U[g]=Ut*b,U[p]=at*S,U[m]=O,c.push(U.x,U.y,U.z),U[g]=0,U[p]=0,U[m]=T>0?1:-1,h.push(U.x,U.y,U.z),d.push(_t/w),d.push(1-R/P),G+=1}}for(let R=0;R<P;R++)for(let at=0;at<w;at++){let _t=f+at+X*R,Ut=f+at+X*(R+1),q=f+(at+1)+X*(R+1),ot=f+(at+1)+X*R;l.push(_t,Ut,ot),l.push(Ut,q,ot),B+=6}a.addGroup(u,B,M),u+=B,f+=G}}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 Ro(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 En(r){let t={};for(let e=0;e<r.length;e++){let n=Ro(r[e]);for(let i in n)t[i]=n[i]}return t}function Ev(r){let t=[];for(let e=0;e<r.length;e++)t.push(r[e].clone());return t}function u_(r){let t=r.getRenderTarget();return t===null?r.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Se.workingColorSpace}var Tv={clone:Ro,merge:En},Av=`void main() {
|
|
2
2
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
3
3
|
}`,Dv=`void main() {
|
|
4
4
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
38
38
|
|
|
39
39
|
}
|
|
40
|
-
`},i=new Aa(5,5,5),s=new ii({name:"CubemapFromEquirect",uniforms:Ro(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Fn,blending:Cr});s.uniforms.tEquirect.value=e;let o=new mi(i,s),a=e.minFilter;return e.minFilter===ws&&(e.minFilter=pi),new sf(1,10,this).update(t,o),e.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let o=0;o<6;o++)t.setRenderTarget(this,o),t.clear(e,n,i);t.setRenderTarget(s)}},zh=new nt,Cv=new nt,Rv=new oe,ji=class{constructor(t=new nt(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=zh.subVectors(n,e).cross(Cv.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){let n=t.delta(zh),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(t.start).addScaledVector(n,s)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||Rv.getNormalMatrix(t),i=this.coplanarPoint(zh).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},_s=new Co,Ql=new nt,Da=class{constructor(t=new ji,e=new ji,n=new ji,i=new ji,s=new ji,o=new ji){this.planes=[t,e,n,i,s,o]}set(t,e,n,i,s,o){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=tr){let n=this.planes,i=t.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],h=i[5],d=i[6],f=i[7],u=i[8],_=i[9],g=i[10],p=i[11],m=i[12],b=i[13],S=i[14],v=i[15];if(n[0].setComponents(l-s,f-c,p-u,v-m).normalize(),n[1].setComponents(l+s,f+c,p+u,v+m).normalize(),n[2].setComponents(l+o,f+h,p+_,v+b).normalize(),n[3].setComponents(l-o,f-h,p-_,v-b).normalize(),n[4].setComponents(l-a,f-d,p-g,v-S).normalize(),e===tr)n[5].setComponents(l+a,f+d,p+g,v+S).normalize();else if(e===hc)n[5].setComponents(a,d,g,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),_s.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{let e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),_s.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(_s)}intersectsSprite(t){return _s.center.set(0,0,0),_s.radius=.7071067811865476,_s.applyMatrix4(t.matrixWorld),this.intersectsSphere(_s)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){let e=this.planes;for(let n=0;n<6;n++){let i=e[n];if(Ql.x=i.normal.x>0?t.max.x:t.min.x,Ql.y=i.normal.y>0?t.max.y:t.min.y,Ql.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Ql)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function h_(){let r=null,t=!1,e=null,n=null;function i(s,o){e(s,o),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Pv(r){let t=new WeakMap;function e(a,l){let c=a.array,h=a.usage,d=c.byteLength,f=r.createBuffer();r.bindBuffer(l,f),r.bufferData(l,c,h),a.onUploadCallback();let u;if(c instanceof Float32Array)u=r.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?u=r.HALF_FLOAT:u=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)u=r.SHORT;else if(c instanceof Uint32Array)u=r.UNSIGNED_INT;else if(c instanceof Int32Array)u=r.INT;else if(c instanceof Int8Array)u=r.BYTE;else if(c instanceof Uint8Array)u=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)u=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:f,type:u,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:d}}function n(a,l,c){let h=l.array,d=l._updateRange,f=l.updateRanges;if(r.bindBuffer(c,a),d.count===-1&&f.length===0&&r.bufferSubData(c,0,h),f.length!==0){for(let u=0,_=f.length;u<_;u++){let g=f[u];r.bufferSubData(c,g.start*h.BYTES_PER_ELEMENT,h,g.start,g.count)}l.clearUpdateRanges()}d.count!==-1&&(r.bufferSubData(c,d.offset*h.BYTES_PER_ELEMENT,h,d.offset,d.count),d.count=-1),l.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute&&(a=a.data),t.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);let l=t.get(a);l&&(r.deleteBuffer(l.buffer),t.delete(a))}function o(a,l){if(a.isGLBufferAttribute){let h=t.get(a);(!h||h.version<a.version)&&t.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}a.isInterleavedBufferAttribute&&(a=a.data);let c=t.get(a);if(c===void 0)t.set(a,e(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(c.buffer,a,l),c.version=a.version}}return{get:i,remove:s,update:o}}var Mc=class r extends Fi{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};let s=t/2,o=e/2,a=Math.floor(n),l=Math.floor(i),c=a+1,h=l+1,d=t/a,f=e/l,u=[],_=[],g=[],p=[];for(let m=0;m<h;m++){let b=m*f-o;for(let S=0;S<c;S++){let v=S*d-s;_.push(v,-b,0),g.push(0,0,1),p.push(S/a),p.push(1-m/l)}}for(let m=0;m<l;m++)for(let b=0;b<a;b++){let S=b+c*m,v=b+c*(m+1),
|
|
40
|
+
`},i=new Aa(5,5,5),s=new ii({name:"CubemapFromEquirect",uniforms:Ro(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Fn,blending:Cr});s.uniforms.tEquirect.value=e;let o=new mi(i,s),a=e.minFilter;return e.minFilter===ws&&(e.minFilter=pi),new sf(1,10,this).update(t,o),e.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,i){let s=t.getRenderTarget();for(let o=0;o<6;o++)t.setRenderTarget(this,o),t.clear(e,n,i);t.setRenderTarget(s)}},zh=new nt,Cv=new nt,Rv=new oe,ji=class{constructor(t=new nt(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let i=zh.subVectors(n,e).cross(Cv.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){let n=t.delta(zh),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let s=-(t.start.dot(this.normal)+this.constant)/i;return s<0||s>1?null:e.copy(t.start).addScaledVector(n,s)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||Rv.getNormalMatrix(t),i=this.coplanarPoint(zh).applyMatrix4(t),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}},_s=new Co,Ql=new nt,Da=class{constructor(t=new ji,e=new ji,n=new ji,i=new ji,s=new ji,o=new ji){this.planes=[t,e,n,i,s,o]}set(t,e,n,i,s,o){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=tr){let n=this.planes,i=t.elements,s=i[0],o=i[1],a=i[2],l=i[3],c=i[4],h=i[5],d=i[6],f=i[7],u=i[8],_=i[9],g=i[10],p=i[11],m=i[12],b=i[13],S=i[14],v=i[15];if(n[0].setComponents(l-s,f-c,p-u,v-m).normalize(),n[1].setComponents(l+s,f+c,p+u,v+m).normalize(),n[2].setComponents(l+o,f+h,p+_,v+b).normalize(),n[3].setComponents(l-o,f-h,p-_,v-b).normalize(),n[4].setComponents(l-a,f-d,p-g,v-S).normalize(),e===tr)n[5].setComponents(l+a,f+d,p+g,v+S).normalize();else if(e===hc)n[5].setComponents(a,d,g,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),_s.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{let e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),_s.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(_s)}intersectsSprite(t){return _s.center.set(0,0,0),_s.radius=.7071067811865476,_s.applyMatrix4(t.matrixWorld),this.intersectsSphere(_s)}intersectsSphere(t){let e=this.planes,n=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){let e=this.planes;for(let n=0;n<6;n++){let i=e[n];if(Ql.x=i.normal.x>0?t.max.x:t.min.x,Ql.y=i.normal.y>0?t.max.y:t.min.y,Ql.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Ql)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function h_(){let r=null,t=!1,e=null,n=null;function i(s,o){e(s,o),n=r.requestAnimationFrame(i)}return{start:function(){t!==!0&&e!==null&&(n=r.requestAnimationFrame(i),t=!0)},stop:function(){r.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(s){e=s},setContext:function(s){r=s}}}function Pv(r){let t=new WeakMap;function e(a,l){let c=a.array,h=a.usage,d=c.byteLength,f=r.createBuffer();r.bindBuffer(l,f),r.bufferData(l,c,h),a.onUploadCallback();let u;if(c instanceof Float32Array)u=r.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?u=r.HALF_FLOAT:u=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)u=r.SHORT;else if(c instanceof Uint32Array)u=r.UNSIGNED_INT;else if(c instanceof Int32Array)u=r.INT;else if(c instanceof Int8Array)u=r.BYTE;else if(c instanceof Uint8Array)u=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)u=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:f,type:u,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:d}}function n(a,l,c){let h=l.array,d=l._updateRange,f=l.updateRanges;if(r.bindBuffer(c,a),d.count===-1&&f.length===0&&r.bufferSubData(c,0,h),f.length!==0){for(let u=0,_=f.length;u<_;u++){let g=f[u];r.bufferSubData(c,g.start*h.BYTES_PER_ELEMENT,h,g.start,g.count)}l.clearUpdateRanges()}d.count!==-1&&(r.bufferSubData(c,d.offset*h.BYTES_PER_ELEMENT,h,d.offset,d.count),d.count=-1),l.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute&&(a=a.data),t.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);let l=t.get(a);l&&(r.deleteBuffer(l.buffer),t.delete(a))}function o(a,l){if(a.isGLBufferAttribute){let h=t.get(a);(!h||h.version<a.version)&&t.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}a.isInterleavedBufferAttribute&&(a=a.data);let c=t.get(a);if(c===void 0)t.set(a,e(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(c.buffer,a,l),c.version=a.version}}return{get:i,remove:s,update:o}}var Mc=class r extends Fi{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};let s=t/2,o=e/2,a=Math.floor(n),l=Math.floor(i),c=a+1,h=l+1,d=t/a,f=e/l,u=[],_=[],g=[],p=[];for(let m=0;m<h;m++){let b=m*f-o;for(let S=0;S<c;S++){let v=S*d-s;_.push(v,-b,0),g.push(0,0,1),p.push(S/a),p.push(1-m/l)}}for(let m=0;m<l;m++)for(let b=0;b<a;b++){let S=b+c*m,v=b+c*(m+1),C=b+1+c*(m+1),T=b+1+c*m;u.push(S,v,T),u.push(v,C,T)}this.setIndex(u),this.setAttribute("position",new ei(_,3)),this.setAttribute("normal",new ei(g,3)),this.setAttribute("uv",new ei(p,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new r(t.width,t.height,t.widthSegments,t.heightSegments)}},Iv=`#ifdef USE_ALPHAHASH
|
|
41
41
|
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
|
|
42
42
|
#endif`,Lv=`#ifdef USE_ALPHAHASH
|
|
43
43
|
const float ALPHA_HASH_SCALE = 0.05;
|
|
@@ -3567,7 +3567,7 @@ void main() {
|
|
|
3567
3567
|
#include <tonemapping_fragment>
|
|
3568
3568
|
#include <colorspace_fragment>
|
|
3569
3569
|
#include <fog_fragment>
|
|
3570
|
-
}`,se={alphahash_fragment:Iv,alphahash_pars_fragment:Lv,alphamap_fragment:Fv,alphamap_pars_fragment:Nv,alphatest_fragment:Uv,alphatest_pars_fragment:Ov,aomap_fragment:Bv,aomap_pars_fragment:kv,batching_pars_vertex:zv,batching_vertex:Vv,begin_vertex:Hv,beginnormal_vertex:Gv,bsdfs:Wv,iridescence_fragment:Xv,bumpmap_pars_fragment:Yv,clipping_planes_fragment:qv,clipping_planes_pars_fragment:Zv,clipping_planes_pars_vertex:Jv,clipping_planes_vertex:$v,color_fragment:Kv,color_pars_fragment:jv,color_pars_vertex:Qv,color_vertex:tS,common:eS,cube_uv_reflection_fragment:nS,defaultnormal_vertex:iS,displacementmap_pars_vertex:rS,displacementmap_vertex:sS,emissivemap_fragment:oS,emissivemap_pars_fragment:aS,colorspace_fragment:lS,colorspace_pars_fragment:cS,envmap_fragment:uS,envmap_common_pars_fragment:hS,envmap_pars_fragment:fS,envmap_pars_vertex:dS,envmap_physical_pars_fragment:wS,envmap_vertex:pS,fog_vertex:mS,fog_pars_vertex:gS,fog_fragment:_S,fog_pars_fragment:xS,gradientmap_pars_fragment:yS,lightmap_pars_fragment:vS,lights_lambert_fragment:SS,lights_lambert_pars_fragment:MS,lights_pars_begin:bS,lights_toon_fragment:ES,lights_toon_pars_fragment:TS,lights_phong_fragment:AS,lights_phong_pars_fragment:DS,lights_physical_fragment:CS,lights_physical_pars_fragment:RS,lights_fragment_begin:PS,lights_fragment_maps:IS,lights_fragment_end:LS,logdepthbuf_fragment:FS,logdepthbuf_pars_fragment:NS,logdepthbuf_pars_vertex:US,logdepthbuf_vertex:OS,map_fragment:BS,map_pars_fragment:kS,map_particle_fragment:zS,map_particle_pars_fragment:VS,metalnessmap_fragment:HS,metalnessmap_pars_fragment:GS,morphinstance_vertex:WS,morphcolor_vertex:XS,morphnormal_vertex:YS,morphtarget_pars_vertex:qS,morphtarget_vertex:ZS,normal_fragment_begin:JS,normal_fragment_maps:$S,normal_pars_fragment:KS,normal_pars_vertex:jS,normal_vertex:QS,normalmap_pars_fragment:tM,clearcoat_normal_fragment_begin:eM,clearcoat_normal_fragment_maps:nM,clearcoat_pars_fragment:iM,iridescence_pars_fragment:rM,opaque_fragment:sM,packing:oM,premultiplied_alpha_fragment:aM,project_vertex:lM,dithering_fragment:cM,dithering_pars_fragment:uM,roughnessmap_fragment:hM,roughnessmap_pars_fragment:fM,shadowmap_pars_fragment:dM,shadowmap_pars_vertex:pM,shadowmap_vertex:mM,shadowmask_pars_fragment:gM,skinbase_vertex:_M,skinning_pars_vertex:xM,skinning_vertex:yM,skinnormal_vertex:vM,specularmap_fragment:SM,specularmap_pars_fragment:MM,tonemapping_fragment:bM,tonemapping_pars_fragment:wM,transmission_fragment:EM,transmission_pars_fragment:TM,uv_pars_fragment:AM,uv_pars_vertex:DM,uv_vertex:CM,worldpos_vertex:RM,background_vert:PM,background_frag:IM,backgroundCube_vert:LM,backgroundCube_frag:FM,cube_vert:NM,cube_frag:UM,depth_vert:OM,depth_frag:BM,distanceRGBA_vert:kM,distanceRGBA_frag:zM,equirect_vert:VM,equirect_frag:HM,linedashed_vert:GM,linedashed_frag:WM,meshbasic_vert:XM,meshbasic_frag:YM,meshlambert_vert:qM,meshlambert_frag:ZM,meshmatcap_vert:JM,meshmatcap_frag:$M,meshnormal_vert:KM,meshnormal_frag:jM,meshphong_vert:QM,meshphong_frag:tb,meshphysical_vert:eb,meshphysical_frag:nb,meshtoon_vert:ib,meshtoon_frag:rb,points_vert:sb,points_frag:ob,shadow_vert:ab,shadow_frag:lb,sprite_vert:cb,sprite_frag:ub},Ct={common:{diffuse:{value:new ge(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new oe},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new oe}},envmap:{envMap:{value:null},envMapRotation:{value:new oe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new oe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new oe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new oe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new oe},normalScale:{value:new _e(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new oe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new oe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new oe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new oe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ge(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ge(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0},uvTransform:{value:new oe}},sprite:{diffuse:{value:new ge(16777215)},opacity:{value:1},center:{value:new _e(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new oe},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0}}},Ii={basic:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.fog]),vertexShader:se.meshbasic_vert,fragmentShader:se.meshbasic_frag},lambert:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)}}]),vertexShader:se.meshlambert_vert,fragmentShader:se.meshlambert_frag},phong:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)},specular:{value:new ge(1118481)},shininess:{value:30}}]),vertexShader:se.meshphong_vert,fragmentShader:se.meshphong_frag},standard:{uniforms:En([Ct.common,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.roughnessmap,Ct.metalnessmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:se.meshphysical_vert,fragmentShader:se.meshphysical_frag},toon:{uniforms:En([Ct.common,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.gradientmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)}}]),vertexShader:se.meshtoon_vert,fragmentShader:se.meshtoon_frag},matcap:{uniforms:En([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,{matcap:{value:null}}]),vertexShader:se.meshmatcap_vert,fragmentShader:se.meshmatcap_frag},points:{uniforms:En([Ct.points,Ct.fog]),vertexShader:se.points_vert,fragmentShader:se.points_frag},dashed:{uniforms:En([Ct.common,Ct.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:se.linedashed_vert,fragmentShader:se.linedashed_frag},depth:{uniforms:En([Ct.common,Ct.displacementmap]),vertexShader:se.depth_vert,fragmentShader:se.depth_frag},normal:{uniforms:En([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,{opacity:{value:1}}]),vertexShader:se.meshnormal_vert,fragmentShader:se.meshnormal_frag},sprite:{uniforms:En([Ct.sprite,Ct.fog]),vertexShader:se.sprite_vert,fragmentShader:se.sprite_frag},background:{uniforms:{uvTransform:{value:new oe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:se.background_vert,fragmentShader:se.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new oe}},vertexShader:se.backgroundCube_vert,fragmentShader:se.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:se.cube_vert,fragmentShader:se.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:se.equirect_vert,fragmentShader:se.equirect_frag},distanceRGBA:{uniforms:En([Ct.common,Ct.displacementmap,{referencePosition:{value:new nt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:se.distanceRGBA_vert,fragmentShader:se.distanceRGBA_frag},shadow:{uniforms:En([Ct.lights,Ct.fog,{color:{value:new ge(0)},opacity:{value:1}}]),vertexShader:se.shadow_vert,fragmentShader:se.shadow_frag}};Ii.physical={uniforms:En([Ii.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new oe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new oe},clearcoatNormalScale:{value:new _e(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new oe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new oe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new oe},sheen:{value:0},sheenColor:{value:new ge(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new oe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new oe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new oe},transmissionSamplerSize:{value:new _e},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new oe},attenuationDistance:{value:0},attenuationColor:{value:new ge(0)},specularColor:{value:new ge(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new oe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new oe},anisotropyVector:{value:new _e},anisotropyMap:{value:null},anisotropyMapTransform:{value:new oe}}]),vertexShader:se.meshphysical_vert,fragmentShader:se.meshphysical_frag};var tc={r:0,b:0,g:0},xs=new nr,hb=new Ue;function fb(r,t,e,n,i,s,o){let a=new ge(0),l=s===!0?0:1,c,h,d=null,f=0,u=null;function _(b){let S=b.isScene===!0?b.background:null;return S&&S.isTexture&&(S=(b.backgroundBlurriness>0?e:t).get(S)),S}function g(b){let S=!1,v=_(b);v===null?m(a,l):v&&v.isColor&&(m(v,1),S=!0);let D=r.xr.getEnvironmentBlendMode();D==="additive"?n.buffers.color.setClear(0,0,0,1,o):D==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(r.autoClear||S)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil)}function p(b,S){let v=_(S);v&&(v.isCubeTexture||v.mapping===Ic)?(h===void 0&&(h=new mi(new Aa(1,1,1),new ii({name:"BackgroundCubeMaterial",uniforms:Ro(Ii.backgroundCube.uniforms),vertexShader:Ii.backgroundCube.vertexShader,fragmentShader:Ii.backgroundCube.fragmentShader,side:Fn,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(D,T,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),xs.copy(S.backgroundRotation),xs.x*=-1,xs.y*=-1,xs.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(xs.y*=-1,xs.z*=-1),h.material.uniforms.envMap.value=v,h.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(hb.makeRotationFromEuler(xs)),h.material.toneMapped=Se.getTransfer(v.colorSpace)!==Te,(d!==v||f!==v.version||u!==r.toneMapping)&&(h.material.needsUpdate=!0,d=v,f=v.version,u=r.toneMapping),h.layers.enableAll(),b.unshift(h,h.geometry,h.material,0,0,null)):v&&v.isTexture&&(c===void 0&&(c=new mi(new Mc(2,2),new ii({name:"BackgroundMaterial",uniforms:Ro(Ii.background.uniforms),vertexShader:Ii.background.vertexShader,fragmentShader:Ii.background.fragmentShader,side:Ir,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=v,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Se.getTransfer(v.colorSpace)!==Te,v.matrixAutoUpdate===!0&&v.updateMatrix(),c.material.uniforms.uvTransform.value.copy(v.matrix),(d!==v||f!==v.version||u!==r.toneMapping)&&(c.material.needsUpdate=!0,d=v,f=v.version,u=r.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,S){b.getRGB(tc,u_(r)),n.buffers.color.setClear(tc.r,tc.g,tc.b,S,o)}return{getClearColor:function(){return a},setClearColor:function(b,S=1){a.set(b),l=S,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:g,addToRenderList:p}}function db(r,t){let e=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=f(null),s=i,o=!1;function a(y,P,L,C,B){let J=!1,O=d(C,L,P);s!==O&&(s=O,c(s.object)),J=u(y,C,L,B),J&&_(y,C,L,B),B!==null&&t.update(B,r.ELEMENT_ARRAY_BUFFER),(J||o)&&(o=!1,v(y,P,L,C),B!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.get(B).buffer))}function l(){return r.createVertexArray()}function c(y){return r.bindVertexArray(y)}function h(y){return r.deleteVertexArray(y)}function d(y,P,L){let C=L.wireframe===!0,B=n[y.id];B===void 0&&(B={},n[y.id]=B);let J=B[P.id];J===void 0&&(J={},B[P.id]=J);let O=J[C];return O===void 0&&(O=f(l()),J[C]=O),O}function f(y){let P=[],L=[],C=[];for(let B=0;B<e;B++)P[B]=0,L[B]=0,C[B]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:P,enabledAttributes:L,attributeDivisors:C,object:y,attributes:{},index:null}}function u(y,P,L,C){let B=s.attributes,J=P.attributes,O=0,Y=L.getAttributes();for(let H in Y)if(Y[H].location>=0){let R=B[H],at=J[H];if(at===void 0&&(H==="instanceMatrix"&&y.instanceMatrix&&(at=y.instanceMatrix),H==="instanceColor"&&y.instanceColor&&(at=y.instanceColor)),R===void 0||R.attribute!==at||at&&R.data!==at.data)return!0;O++}return s.attributesNum!==O||s.index!==C}function _(y,P,L,C){let B={},J=P.attributes,O=0,Y=L.getAttributes();for(let H in Y)if(Y[H].location>=0){let R=J[H];R===void 0&&(H==="instanceMatrix"&&y.instanceMatrix&&(R=y.instanceMatrix),H==="instanceColor"&&y.instanceColor&&(R=y.instanceColor));let at={};at.attribute=R,R&&R.data&&(at.data=R.data),B[H]=at,O++}s.attributes=B,s.attributesNum=O,s.index=C}function g(){let y=s.newAttributes;for(let P=0,L=y.length;P<L;P++)y[P]=0}function p(y){m(y,0)}function m(y,P){let L=s.newAttributes,C=s.enabledAttributes,B=s.attributeDivisors;L[y]=1,C[y]===0&&(r.enableVertexAttribArray(y),C[y]=1),B[y]!==P&&(r.vertexAttribDivisor(y,P),B[y]=P)}function b(){let y=s.newAttributes,P=s.enabledAttributes;for(let L=0,C=P.length;L<C;L++)P[L]!==y[L]&&(r.disableVertexAttribArray(L),P[L]=0)}function S(y,P,L,C,B,J,O){O===!0?r.vertexAttribIPointer(y,P,L,B,J):r.vertexAttribPointer(y,P,L,C,B,J)}function v(y,P,L,C){g();let B=C.attributes,J=L.getAttributes(),O=P.defaultAttributeValues;for(let Y in J){let H=J[Y];if(H.location>=0){let U=B[Y];if(U===void 0&&(Y==="instanceMatrix"&&y.instanceMatrix&&(U=y.instanceMatrix),Y==="instanceColor"&&y.instanceColor&&(U=y.instanceColor)),U!==void 0){let R=U.normalized,at=U.itemSize,_t=t.get(U);if(_t===void 0)continue;let Ut=_t.buffer,X=_t.type,ot=_t.bytesPerElement,xt=X===r.INT||X===r.UNSIGNED_INT||U.gpuType===e_;if(U.isInterleavedBufferAttribute){let ct=U.data,Rt=ct.stride,kt=U.offset;if(ct.isInstancedInterleavedBuffer){for(let Z=0;Z<H.locationSize;Z++)m(H.location+Z,ct.meshPerAttribute);y.isInstancedMesh!==!0&&C._maxInstanceCount===void 0&&(C._maxInstanceCount=ct.meshPerAttribute*ct.count)}else for(let Z=0;Z<H.locationSize;Z++)p(H.location+Z);r.bindBuffer(r.ARRAY_BUFFER,Ut);for(let Z=0;Z<H.locationSize;Z++)S(H.location+Z,at/H.locationSize,X,R,Rt*ot,(kt+at/H.locationSize*Z)*ot,xt)}else{if(U.isInstancedBufferAttribute){for(let ct=0;ct<H.locationSize;ct++)m(H.location+ct,U.meshPerAttribute);y.isInstancedMesh!==!0&&C._maxInstanceCount===void 0&&(C._maxInstanceCount=U.meshPerAttribute*U.count)}else for(let ct=0;ct<H.locationSize;ct++)p(H.location+ct);r.bindBuffer(r.ARRAY_BUFFER,Ut);for(let ct=0;ct<H.locationSize;ct++)S(H.location+ct,at/H.locationSize,X,R,at*ot,at/H.locationSize*ct*ot,xt)}}else if(O!==void 0){let R=O[Y];if(R!==void 0)switch(R.length){case 2:r.vertexAttrib2fv(H.location,R);break;case 3:r.vertexAttrib3fv(H.location,R);break;case 4:r.vertexAttrib4fv(H.location,R);break;default:r.vertexAttrib1fv(H.location,R)}}}}b()}function D(){I();for(let y in n){let P=n[y];for(let L in P){let C=P[L];for(let B in C)h(C[B].object),delete C[B];delete P[L]}delete n[y]}}function T(y){if(n[y.id]===void 0)return;let P=n[y.id];for(let L in P){let C=P[L];for(let B in C)h(C[B].object),delete C[B];delete P[L]}delete n[y.id]}function w(y){for(let P in n){let L=n[P];if(L[y.id]===void 0)continue;let C=L[y.id];for(let B in C)h(C[B].object),delete C[B];delete L[y.id]}}function I(){M(),o=!0,s!==i&&(s=i,c(s.object))}function M(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:I,resetDefaultState:M,dispose:D,releaseStatesOfGeometry:T,releaseStatesOfProgram:w,initAttributes:g,enableAttribute:p,disableUnusedAttributes:b}}function pb(r,t,e){let n;function i(c){n=c}function s(c,h){r.drawArrays(n,c,h),e.update(h,n,1)}function o(c,h,d){d!==0&&(r.drawArraysInstanced(n,c,h,d),e.update(h,n,d))}function a(c,h,d){if(d===0)return;let f=t.get("WEBGL_multi_draw");if(f===null)for(let u=0;u<d;u++)this.render(c[u],h[u]);else{f.multiDrawArraysWEBGL(n,c,0,h,0,d);let u=0;for(let _=0;_<d;_++)u+=h[_];e.update(u,n,1)}}function l(c,h,d,f){if(d===0)return;let u=t.get("WEBGL_multi_draw");if(u===null)for(let _=0;_<c.length;_++)o(c[_],h[_],f[_]);else{u.multiDrawArraysInstancedWEBGL(n,c,0,h,0,f,0,d);let _=0;for(let g=0;g<d;g++)_+=h[g];for(let g=0;g<f.length;g++)e.update(_,n,f[g])}}this.setMode=i,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function mb(r,t,e,n){let i;function s(){if(i!==void 0)return i;if(t.has("EXT_texture_filter_anisotropic")===!0){let T=t.get("EXT_texture_filter_anisotropic");i=r.getParameter(T.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(T){return!(T!==Li&&n.convert(T)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(T){let w=T===Lc&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(T!==Lr&&n.convert(T)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)&&T!==Ar&&!w)}function l(T){if(T==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=e.precision!==void 0?e.precision:"highp",h=l(c);h!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",h,"instead."),c=h);let d=e.logarithmicDepthBuffer===!0,f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),u=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=r.getParameter(r.MAX_TEXTURE_SIZE),g=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),m=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),b=r.getParameter(r.MAX_VARYING_VECTORS),S=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,D=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,maxTextures:f,maxVertexTextures:u,maxTextureSize:_,maxCubemapSize:g,maxAttributes:p,maxVertexUniforms:m,maxVaryings:b,maxFragmentUniforms:S,vertexTextures:v,maxSamples:D}}function gb(r){let t=this,e=null,n=0,i=!1,s=!1,o=new ji,a=new oe,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){let u=d.length!==0||f||n!==0||i;return i=f,n=d.length,u},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,f){e=h(d,f,0)},this.setState=function(d,f,u){let _=d.clippingPlanes,g=d.clipIntersection,p=d.clipShadows,m=r.get(d);if(!i||_===null||_.length===0||s&&!p)s?h(null):c();else{let b=s?0:n,S=b*4,v=m.clippingState||null;l.value=v,v=h(_,f,S,u);for(let D=0;D!==S;++D)v[D]=e[D];m.clippingState=v,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==e&&(l.value=e,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(d,f,u,_){let g=d!==null?d.length:0,p=null;if(g!==0){if(p=l.value,_!==!0||p===null){let m=u+g*4,b=f.matrixWorldInverse;a.getNormalMatrix(b),(p===null||p.length<m)&&(p=new Float32Array(m));for(let S=0,v=u;S!==g;++S,v+=4)o.copy(d[S]).applyMatrix4(b,a),o.normal.toArray(p,v),p[v+3]=o.constant}l.value=p,l.needsUpdate=!0}return t.numPlanes=g,t.numIntersection=0,p}}function _b(r){let t=new WeakMap;function e(o,a){return a===$h?o.mapping=To:a===Kh&&(o.mapping=Ao),o}function n(o){if(o&&o.isTexture){let a=o.mapping;if(a===$h||a===Kh)if(t.has(o)){let l=t.get(o).texture;return e(l,o.mapping)}else{let l=o.image;if(l&&l.height>0){let c=new of(l.height);return c.fromEquirectangularTexture(r,o),t.set(o,c),o.addEventListener("dispose",i),e(c.texture,o.mapping)}else return null}}return o}function i(o){let a=o.target;a.removeEventListener("dispose",i);let l=t.get(a);l!==void 0&&(t.delete(a),l.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var bc=class extends vc{constructor(t=-1,e=1,n=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,o=n+t,a=i+e,l=i-e;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},Mo=4,Tg=[.125,.215,.35,.446,.526,.582],Ms=20,Vh=new bc,Ag=new ge,Hh=null,Gh=0,Wh=0,Xh=!1,vs=(1+Math.sqrt(5))/2,vo=1/vs,Dg=[new nt(-vs,vo,0),new nt(vs,vo,0),new nt(-vo,0,vs),new nt(vo,0,vs),new nt(0,vs,-vo),new nt(0,vs,vo),new nt(-1,1,-1),new nt(1,1,-1),new nt(-1,1,1),new nt(1,1,1)],wc=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Hh=this._renderer.getRenderTarget(),Gh=this._renderer.getActiveCubeFace(),Wh=this._renderer.getActiveMipmapLevel(),Xh=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Pg(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Rg(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodPlanes.length;t++)this._lodPlanes[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(Hh,Gh,Wh),this._renderer.xr.enabled=Xh,t.scissorTest=!1,ec(t,0,0,t.width,t.height)}_fromTexture(t,e){t.mapping===To||t.mapping===Ao?this._setSize(t.image.length===0?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),Hh=this._renderer.getRenderTarget(),Gh=this._renderer.getActiveCubeFace(),Wh=this._renderer.getActiveMipmapLevel(),Xh=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=e||this._allocateTargets();return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,n={magFilter:pi,minFilter:pi,generateMipmaps:!1,type:Lc,format:Li,colorSpace:Ur,depthBuffer:!1},i=Cg(t,e,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==e){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Cg(t,e,n);let{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=xb(s)),this._blurMaterial=yb(s,t,e)}return i}_compileMaterial(t){let e=new mi(this._lodPlanes[0],t);this._renderer.compile(e,Vh)}_sceneToCubeUV(t,e,n,i){let a=new Tn(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],h=this._renderer,d=h.autoClear,f=h.toneMapping;h.getClearColor(Ag),h.toneMapping=Pr,h.autoClear=!1;let u=new _c({name:"PMREM.Background",side:Fn,depthWrite:!1,depthTest:!1}),_=new mi(new Aa,u),g=!1,p=t.background;p?p.isColor&&(u.color.copy(p),t.background=null,g=!0):(u.color.copy(Ag),g=!0);for(let m=0;m<6;m++){let b=m%3;b===0?(a.up.set(0,l[m],0),a.lookAt(c[m],0,0)):b===1?(a.up.set(0,0,l[m]),a.lookAt(0,c[m],0)):(a.up.set(0,l[m],0),a.lookAt(0,0,c[m]));let S=this._cubeSize;ec(i,b*S,m>2?S:0,S,S),h.setRenderTarget(i),g&&h.render(_,a),h.render(t,a)}_.geometry.dispose(),_.material.dispose(),h.toneMapping=f,h.autoClear=d,t.background=p}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===To||t.mapping===Ao;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Pg()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Rg());let s=i?this._cubemapMaterial:this._equirectMaterial,o=new mi(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=t;let l=this._cubeSize;ec(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,Vh)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;let i=this._lodPlanes.length;for(let s=1;s<i;s++){let o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=Dg[(i-s-1)%Dg.length];this._blur(t,s-1,s,o,a)}e.autoClear=n}_blur(t,e,n,i,s){let o=this._pingPongRenderTarget;this._halfBlur(t,o,e,n,i,"latitudinal",s),this._halfBlur(o,t,n,n,i,"longitudinal",s)}_halfBlur(t,e,n,i,s,o,a){let l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");let h=3,d=new mi(this._lodPlanes[i],c),f=c.uniforms,u=this._sizeLods[n]-1,_=isFinite(s)?Math.PI/(2*u):2*Math.PI/(2*Ms-1),g=s/_,p=isFinite(s)?1+Math.floor(h*g):Ms;p>Ms&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${Ms}`);let m=[],b=0;for(let w=0;w<Ms;++w){let I=w/g,M=Math.exp(-I*I/2);m.push(M),w===0?b+=M:w<p&&(b+=2*M)}for(let w=0;w<m.length;w++)m[w]=m[w]/b;f.envMap.value=t.texture,f.samples.value=p,f.weights.value=m,f.latitudinal.value=o==="latitudinal",a&&(f.poleAxis.value=a);let{_lodMax:S}=this;f.dTheta.value=_,f.mipInt.value=S-n;let v=this._sizeLods[i],D=3*v*(i>S-Mo?i-S+Mo:0),T=4*(this._cubeSize-v);ec(e,D,T,3*v,2*v),l.setRenderTarget(e),l.render(d,Vh)}};function xb(r){let t=[],e=[],n=[],i=r,s=r-Mo+1+Tg.length;for(let o=0;o<s;o++){let a=Math.pow(2,i);e.push(a);let l=1/a;o>r-Mo?l=Tg[o-r+Mo-1]:o===0&&(l=0),n.push(l);let c=1/(a-2),h=-c,d=1+c,f=[h,h,d,h,d,d,h,h,d,d,h,d],u=6,_=6,g=3,p=2,m=1,b=new Float32Array(g*_*u),S=new Float32Array(p*_*u),v=new Float32Array(m*_*u);for(let T=0;T<u;T++){let w=T%3*2/3-1,I=T>2?0:-1,M=[w,I,0,w+2/3,I,0,w+2/3,I+1,0,w,I,0,w+2/3,I+1,0,w,I+1,0];b.set(M,g*_*T),S.set(f,p*_*T);let y=[T,T,T,T,T,T];v.set(y,m*_*T)}let D=new Fi;D.setAttribute("position",new ti(b,g)),D.setAttribute("uv",new ti(S,p)),D.setAttribute("faceIndex",new ti(v,m)),t.push(D),i>Mo&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Cg(r,t,e){let n=new er(r,t,e);return n.texture.mapping=Ic,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ec(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function yb(r,t,e){let n=new Float32Array(Ms),i=new nt(0,1,0);return new ii({name:"SphericalGaussianBlur",defines:{n:Ms,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Nf(),fragmentShader:`
|
|
3570
|
+
}`,se={alphahash_fragment:Iv,alphahash_pars_fragment:Lv,alphamap_fragment:Fv,alphamap_pars_fragment:Nv,alphatest_fragment:Uv,alphatest_pars_fragment:Ov,aomap_fragment:Bv,aomap_pars_fragment:kv,batching_pars_vertex:zv,batching_vertex:Vv,begin_vertex:Hv,beginnormal_vertex:Gv,bsdfs:Wv,iridescence_fragment:Xv,bumpmap_pars_fragment:Yv,clipping_planes_fragment:qv,clipping_planes_pars_fragment:Zv,clipping_planes_pars_vertex:Jv,clipping_planes_vertex:$v,color_fragment:Kv,color_pars_fragment:jv,color_pars_vertex:Qv,color_vertex:tS,common:eS,cube_uv_reflection_fragment:nS,defaultnormal_vertex:iS,displacementmap_pars_vertex:rS,displacementmap_vertex:sS,emissivemap_fragment:oS,emissivemap_pars_fragment:aS,colorspace_fragment:lS,colorspace_pars_fragment:cS,envmap_fragment:uS,envmap_common_pars_fragment:hS,envmap_pars_fragment:fS,envmap_pars_vertex:dS,envmap_physical_pars_fragment:wS,envmap_vertex:pS,fog_vertex:mS,fog_pars_vertex:gS,fog_fragment:_S,fog_pars_fragment:xS,gradientmap_pars_fragment:yS,lightmap_pars_fragment:vS,lights_lambert_fragment:SS,lights_lambert_pars_fragment:MS,lights_pars_begin:bS,lights_toon_fragment:ES,lights_toon_pars_fragment:TS,lights_phong_fragment:AS,lights_phong_pars_fragment:DS,lights_physical_fragment:CS,lights_physical_pars_fragment:RS,lights_fragment_begin:PS,lights_fragment_maps:IS,lights_fragment_end:LS,logdepthbuf_fragment:FS,logdepthbuf_pars_fragment:NS,logdepthbuf_pars_vertex:US,logdepthbuf_vertex:OS,map_fragment:BS,map_pars_fragment:kS,map_particle_fragment:zS,map_particle_pars_fragment:VS,metalnessmap_fragment:HS,metalnessmap_pars_fragment:GS,morphinstance_vertex:WS,morphcolor_vertex:XS,morphnormal_vertex:YS,morphtarget_pars_vertex:qS,morphtarget_vertex:ZS,normal_fragment_begin:JS,normal_fragment_maps:$S,normal_pars_fragment:KS,normal_pars_vertex:jS,normal_vertex:QS,normalmap_pars_fragment:tM,clearcoat_normal_fragment_begin:eM,clearcoat_normal_fragment_maps:nM,clearcoat_pars_fragment:iM,iridescence_pars_fragment:rM,opaque_fragment:sM,packing:oM,premultiplied_alpha_fragment:aM,project_vertex:lM,dithering_fragment:cM,dithering_pars_fragment:uM,roughnessmap_fragment:hM,roughnessmap_pars_fragment:fM,shadowmap_pars_fragment:dM,shadowmap_pars_vertex:pM,shadowmap_vertex:mM,shadowmask_pars_fragment:gM,skinbase_vertex:_M,skinning_pars_vertex:xM,skinning_vertex:yM,skinnormal_vertex:vM,specularmap_fragment:SM,specularmap_pars_fragment:MM,tonemapping_fragment:bM,tonemapping_pars_fragment:wM,transmission_fragment:EM,transmission_pars_fragment:TM,uv_pars_fragment:AM,uv_pars_vertex:DM,uv_vertex:CM,worldpos_vertex:RM,background_vert:PM,background_frag:IM,backgroundCube_vert:LM,backgroundCube_frag:FM,cube_vert:NM,cube_frag:UM,depth_vert:OM,depth_frag:BM,distanceRGBA_vert:kM,distanceRGBA_frag:zM,equirect_vert:VM,equirect_frag:HM,linedashed_vert:GM,linedashed_frag:WM,meshbasic_vert:XM,meshbasic_frag:YM,meshlambert_vert:qM,meshlambert_frag:ZM,meshmatcap_vert:JM,meshmatcap_frag:$M,meshnormal_vert:KM,meshnormal_frag:jM,meshphong_vert:QM,meshphong_frag:tb,meshphysical_vert:eb,meshphysical_frag:nb,meshtoon_vert:ib,meshtoon_frag:rb,points_vert:sb,points_frag:ob,shadow_vert:ab,shadow_frag:lb,sprite_vert:cb,sprite_frag:ub},Ct={common:{diffuse:{value:new ge(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new oe},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new oe}},envmap:{envMap:{value:null},envMapRotation:{value:new oe},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new oe}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new oe}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new oe},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new oe},normalScale:{value:new _e(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new oe},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new oe}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new oe}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new oe}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ge(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ge(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0},uvTransform:{value:new oe}},sprite:{diffuse:{value:new ge(16777215)},opacity:{value:1},center:{value:new _e(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new oe},alphaMap:{value:null},alphaMapTransform:{value:new oe},alphaTest:{value:0}}},Ii={basic:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.fog]),vertexShader:se.meshbasic_vert,fragmentShader:se.meshbasic_frag},lambert:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)}}]),vertexShader:se.meshlambert_vert,fragmentShader:se.meshlambert_frag},phong:{uniforms:En([Ct.common,Ct.specularmap,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)},specular:{value:new ge(1118481)},shininess:{value:30}}]),vertexShader:se.meshphong_vert,fragmentShader:se.meshphong_frag},standard:{uniforms:En([Ct.common,Ct.envmap,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.roughnessmap,Ct.metalnessmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:se.meshphysical_vert,fragmentShader:se.meshphysical_frag},toon:{uniforms:En([Ct.common,Ct.aomap,Ct.lightmap,Ct.emissivemap,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.gradientmap,Ct.fog,Ct.lights,{emissive:{value:new ge(0)}}]),vertexShader:se.meshtoon_vert,fragmentShader:se.meshtoon_frag},matcap:{uniforms:En([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,Ct.fog,{matcap:{value:null}}]),vertexShader:se.meshmatcap_vert,fragmentShader:se.meshmatcap_frag},points:{uniforms:En([Ct.points,Ct.fog]),vertexShader:se.points_vert,fragmentShader:se.points_frag},dashed:{uniforms:En([Ct.common,Ct.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:se.linedashed_vert,fragmentShader:se.linedashed_frag},depth:{uniforms:En([Ct.common,Ct.displacementmap]),vertexShader:se.depth_vert,fragmentShader:se.depth_frag},normal:{uniforms:En([Ct.common,Ct.bumpmap,Ct.normalmap,Ct.displacementmap,{opacity:{value:1}}]),vertexShader:se.meshnormal_vert,fragmentShader:se.meshnormal_frag},sprite:{uniforms:En([Ct.sprite,Ct.fog]),vertexShader:se.sprite_vert,fragmentShader:se.sprite_frag},background:{uniforms:{uvTransform:{value:new oe},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:se.background_vert,fragmentShader:se.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new oe}},vertexShader:se.backgroundCube_vert,fragmentShader:se.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:se.cube_vert,fragmentShader:se.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:se.equirect_vert,fragmentShader:se.equirect_frag},distanceRGBA:{uniforms:En([Ct.common,Ct.displacementmap,{referencePosition:{value:new nt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:se.distanceRGBA_vert,fragmentShader:se.distanceRGBA_frag},shadow:{uniforms:En([Ct.lights,Ct.fog,{color:{value:new ge(0)},opacity:{value:1}}]),vertexShader:se.shadow_vert,fragmentShader:se.shadow_frag}};Ii.physical={uniforms:En([Ii.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new oe},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new oe},clearcoatNormalScale:{value:new _e(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new oe},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new oe},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new oe},sheen:{value:0},sheenColor:{value:new ge(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new oe},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new oe},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new oe},transmissionSamplerSize:{value:new _e},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new oe},attenuationDistance:{value:0},attenuationColor:{value:new ge(0)},specularColor:{value:new ge(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new oe},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new oe},anisotropyVector:{value:new _e},anisotropyMap:{value:null},anisotropyMapTransform:{value:new oe}}]),vertexShader:se.meshphysical_vert,fragmentShader:se.meshphysical_frag};var tc={r:0,b:0,g:0},xs=new nr,hb=new Ue;function fb(r,t,e,n,i,s,o){let a=new ge(0),l=s===!0?0:1,c,h,d=null,f=0,u=null;function _(b){let S=b.isScene===!0?b.background:null;return S&&S.isTexture&&(S=(b.backgroundBlurriness>0?e:t).get(S)),S}function g(b){let S=!1,v=_(b);v===null?m(a,l):v&&v.isColor&&(m(v,1),S=!0);let C=r.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,o):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(r.autoClear||S)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil)}function p(b,S){let v=_(S);v&&(v.isCubeTexture||v.mapping===Ic)?(h===void 0&&(h=new mi(new Aa(1,1,1),new ii({name:"BackgroundCubeMaterial",uniforms:Ro(Ii.backgroundCube.uniforms),vertexShader:Ii.backgroundCube.vertexShader,fragmentShader:Ii.backgroundCube.fragmentShader,side:Fn,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(C,T,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(h)),xs.copy(S.backgroundRotation),xs.x*=-1,xs.y*=-1,xs.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(xs.y*=-1,xs.z*=-1),h.material.uniforms.envMap.value=v,h.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(hb.makeRotationFromEuler(xs)),h.material.toneMapped=Se.getTransfer(v.colorSpace)!==Te,(d!==v||f!==v.version||u!==r.toneMapping)&&(h.material.needsUpdate=!0,d=v,f=v.version,u=r.toneMapping),h.layers.enableAll(),b.unshift(h,h.geometry,h.material,0,0,null)):v&&v.isTexture&&(c===void 0&&(c=new mi(new Mc(2,2),new ii({name:"BackgroundMaterial",uniforms:Ro(Ii.background.uniforms),vertexShader:Ii.background.vertexShader,fragmentShader:Ii.background.fragmentShader,side:Ir,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=v,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Se.getTransfer(v.colorSpace)!==Te,v.matrixAutoUpdate===!0&&v.updateMatrix(),c.material.uniforms.uvTransform.value.copy(v.matrix),(d!==v||f!==v.version||u!==r.toneMapping)&&(c.material.needsUpdate=!0,d=v,f=v.version,u=r.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,S){b.getRGB(tc,u_(r)),n.buffers.color.setClear(tc.r,tc.g,tc.b,S,o)}return{getClearColor:function(){return a},setClearColor:function(b,S=1){a.set(b),l=S,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:g,addToRenderList:p}}function db(r,t){let e=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=f(null),s=i,o=!1;function a(y,L,I,D,O){let X=!1,H=d(D,I,L);s!==H&&(s=H,c(s.object)),X=u(y,D,I,O),X&&_(y,D,I,O),O!==null&&t.update(O,r.ELEMENT_ARRAY_BUFFER),(X||o)&&(o=!1,v(y,L,I,D),O!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.get(O).buffer))}function l(){return r.createVertexArray()}function c(y){return r.bindVertexArray(y)}function h(y){return r.deleteVertexArray(y)}function d(y,L,I){let D=I.wireframe===!0,O=n[y.id];O===void 0&&(O={},n[y.id]=O);let X=O[L.id];X===void 0&&(X={},O[L.id]=X);let H=X[D];return H===void 0&&(H=f(l()),X[D]=H),H}function f(y){let L=[],I=[],D=[];for(let O=0;O<e;O++)L[O]=0,I[O]=0,D[O]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:I,attributeDivisors:D,object:y,attributes:{},index:null}}function u(y,L,I,D){let O=s.attributes,X=L.attributes,H=0,G=I.getAttributes();for(let B in G)if(G[B].location>=0){let R=O[B],at=X[B];if(at===void 0&&(B==="instanceMatrix"&&y.instanceMatrix&&(at=y.instanceMatrix),B==="instanceColor"&&y.instanceColor&&(at=y.instanceColor)),R===void 0||R.attribute!==at||at&&R.data!==at.data)return!0;H++}return s.attributesNum!==H||s.index!==D}function _(y,L,I,D){let O={},X=L.attributes,H=0,G=I.getAttributes();for(let B in G)if(G[B].location>=0){let R=X[B];R===void 0&&(B==="instanceMatrix"&&y.instanceMatrix&&(R=y.instanceMatrix),B==="instanceColor"&&y.instanceColor&&(R=y.instanceColor));let at={};at.attribute=R,R&&R.data&&(at.data=R.data),O[B]=at,H++}s.attributes=O,s.attributesNum=H,s.index=D}function g(){let y=s.newAttributes;for(let L=0,I=y.length;L<I;L++)y[L]=0}function p(y){m(y,0)}function m(y,L){let I=s.newAttributes,D=s.enabledAttributes,O=s.attributeDivisors;I[y]=1,D[y]===0&&(r.enableVertexAttribArray(y),D[y]=1),O[y]!==L&&(r.vertexAttribDivisor(y,L),O[y]=L)}function b(){let y=s.newAttributes,L=s.enabledAttributes;for(let I=0,D=L.length;I<D;I++)L[I]!==y[I]&&(r.disableVertexAttribArray(I),L[I]=0)}function S(y,L,I,D,O,X,H){H===!0?r.vertexAttribIPointer(y,L,I,O,X):r.vertexAttribPointer(y,L,I,D,O,X)}function v(y,L,I,D){g();let O=D.attributes,X=I.getAttributes(),H=L.defaultAttributeValues;for(let G in X){let B=X[G];if(B.location>=0){let U=O[G];if(U===void 0&&(G==="instanceMatrix"&&y.instanceMatrix&&(U=y.instanceMatrix),G==="instanceColor"&&y.instanceColor&&(U=y.instanceColor)),U!==void 0){let R=U.normalized,at=U.itemSize,_t=t.get(U);if(_t===void 0)continue;let Ut=_t.buffer,q=_t.type,ot=_t.bytesPerElement,xt=q===r.INT||q===r.UNSIGNED_INT||U.gpuType===e_;if(U.isInterleavedBufferAttribute){let ct=U.data,Rt=ct.stride,kt=U.offset;if(ct.isInstancedInterleavedBuffer){for(let J=0;J<B.locationSize;J++)m(B.location+J,ct.meshPerAttribute);y.isInstancedMesh!==!0&&D._maxInstanceCount===void 0&&(D._maxInstanceCount=ct.meshPerAttribute*ct.count)}else for(let J=0;J<B.locationSize;J++)p(B.location+J);r.bindBuffer(r.ARRAY_BUFFER,Ut);for(let J=0;J<B.locationSize;J++)S(B.location+J,at/B.locationSize,q,R,Rt*ot,(kt+at/B.locationSize*J)*ot,xt)}else{if(U.isInstancedBufferAttribute){for(let ct=0;ct<B.locationSize;ct++)m(B.location+ct,U.meshPerAttribute);y.isInstancedMesh!==!0&&D._maxInstanceCount===void 0&&(D._maxInstanceCount=U.meshPerAttribute*U.count)}else for(let ct=0;ct<B.locationSize;ct++)p(B.location+ct);r.bindBuffer(r.ARRAY_BUFFER,Ut);for(let ct=0;ct<B.locationSize;ct++)S(B.location+ct,at/B.locationSize,q,R,at*ot,at/B.locationSize*ct*ot,xt)}}else if(H!==void 0){let R=H[G];if(R!==void 0)switch(R.length){case 2:r.vertexAttrib2fv(B.location,R);break;case 3:r.vertexAttrib3fv(B.location,R);break;case 4:r.vertexAttrib4fv(B.location,R);break;default:r.vertexAttrib1fv(B.location,R)}}}}b()}function C(){P();for(let y in n){let L=n[y];for(let I in L){let D=L[I];for(let O in D)h(D[O].object),delete D[O];delete L[I]}delete n[y]}}function T(y){if(n[y.id]===void 0)return;let L=n[y.id];for(let I in L){let D=L[I];for(let O in D)h(D[O].object),delete D[O];delete L[I]}delete n[y.id]}function w(y){for(let L in n){let I=n[L];if(I[y.id]===void 0)continue;let D=I[y.id];for(let O in D)h(D[O].object),delete D[O];delete I[y.id]}}function P(){M(),o=!0,s!==i&&(s=i,c(s.object))}function M(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:P,resetDefaultState:M,dispose:C,releaseStatesOfGeometry:T,releaseStatesOfProgram:w,initAttributes:g,enableAttribute:p,disableUnusedAttributes:b}}function pb(r,t,e){let n;function i(c){n=c}function s(c,h){r.drawArrays(n,c,h),e.update(h,n,1)}function o(c,h,d){d!==0&&(r.drawArraysInstanced(n,c,h,d),e.update(h,n,d))}function a(c,h,d){if(d===0)return;let f=t.get("WEBGL_multi_draw");if(f===null)for(let u=0;u<d;u++)this.render(c[u],h[u]);else{f.multiDrawArraysWEBGL(n,c,0,h,0,d);let u=0;for(let _=0;_<d;_++)u+=h[_];e.update(u,n,1)}}function l(c,h,d,f){if(d===0)return;let u=t.get("WEBGL_multi_draw");if(u===null)for(let _=0;_<c.length;_++)o(c[_],h[_],f[_]);else{u.multiDrawArraysInstancedWEBGL(n,c,0,h,0,f,0,d);let _=0;for(let g=0;g<d;g++)_+=h[g];for(let g=0;g<f.length;g++)e.update(_,n,f[g])}}this.setMode=i,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function mb(r,t,e,n){let i;function s(){if(i!==void 0)return i;if(t.has("EXT_texture_filter_anisotropic")===!0){let T=t.get("EXT_texture_filter_anisotropic");i=r.getParameter(T.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(T){return!(T!==Li&&n.convert(T)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(T){let w=T===Lc&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return!(T!==Lr&&n.convert(T)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)&&T!==Ar&&!w)}function l(T){if(T==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=e.precision!==void 0?e.precision:"highp",h=l(c);h!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",h,"instead."),c=h);let d=e.logarithmicDepthBuffer===!0,f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),u=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=r.getParameter(r.MAX_TEXTURE_SIZE),g=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),m=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),b=r.getParameter(r.MAX_VARYING_VECTORS),S=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,C=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,maxTextures:f,maxVertexTextures:u,maxTextureSize:_,maxCubemapSize:g,maxAttributes:p,maxVertexUniforms:m,maxVaryings:b,maxFragmentUniforms:S,vertexTextures:v,maxSamples:C}}function gb(r){let t=this,e=null,n=0,i=!1,s=!1,o=new ji,a=new oe,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){let u=d.length!==0||f||n!==0||i;return i=f,n=d.length,u},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,f){e=h(d,f,0)},this.setState=function(d,f,u){let _=d.clippingPlanes,g=d.clipIntersection,p=d.clipShadows,m=r.get(d);if(!i||_===null||_.length===0||s&&!p)s?h(null):c();else{let b=s?0:n,S=b*4,v=m.clippingState||null;l.value=v,v=h(_,f,S,u);for(let C=0;C!==S;++C)v[C]=e[C];m.clippingState=v,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=b}};function c(){l.value!==e&&(l.value=e,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function h(d,f,u,_){let g=d!==null?d.length:0,p=null;if(g!==0){if(p=l.value,_!==!0||p===null){let m=u+g*4,b=f.matrixWorldInverse;a.getNormalMatrix(b),(p===null||p.length<m)&&(p=new Float32Array(m));for(let S=0,v=u;S!==g;++S,v+=4)o.copy(d[S]).applyMatrix4(b,a),o.normal.toArray(p,v),p[v+3]=o.constant}l.value=p,l.needsUpdate=!0}return t.numPlanes=g,t.numIntersection=0,p}}function _b(r){let t=new WeakMap;function e(o,a){return a===$h?o.mapping=To:a===Kh&&(o.mapping=Ao),o}function n(o){if(o&&o.isTexture){let a=o.mapping;if(a===$h||a===Kh)if(t.has(o)){let l=t.get(o).texture;return e(l,o.mapping)}else{let l=o.image;if(l&&l.height>0){let c=new of(l.height);return c.fromEquirectangularTexture(r,o),t.set(o,c),o.addEventListener("dispose",i),e(c.texture,o.mapping)}else return null}}return o}function i(o){let a=o.target;a.removeEventListener("dispose",i);let l=t.get(a);l!==void 0&&(t.delete(a),l.dispose())}function s(){t=new WeakMap}return{get:n,dispose:s}}var bc=class extends vc{constructor(t=-1,e=1,n=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,s=n-t,o=n+t,a=i+e,l=i-e;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}},Mo=4,Tg=[.125,.215,.35,.446,.526,.582],Ms=20,Vh=new bc,Ag=new ge,Hh=null,Gh=0,Wh=0,Xh=!1,vs=(1+Math.sqrt(5))/2,vo=1/vs,Dg=[new nt(-vs,vo,0),new nt(vs,vo,0),new nt(-vo,0,vs),new nt(vo,0,vs),new nt(0,vs,-vo),new nt(0,vs,vo),new nt(-1,1,-1),new nt(1,1,-1),new nt(-1,1,1),new nt(1,1,1)],wc=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Hh=this._renderer.getRenderTarget(),Gh=this._renderer.getActiveCubeFace(),Wh=this._renderer.getActiveMipmapLevel(),Xh=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(t,n,i,s),e>0&&this._blur(s,0,0,e),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Pg(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Rg(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodPlanes.length;t++)this._lodPlanes[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(Hh,Gh,Wh),this._renderer.xr.enabled=Xh,t.scissorTest=!1,ec(t,0,0,t.width,t.height)}_fromTexture(t,e){t.mapping===To||t.mapping===Ao?this._setSize(t.image.length===0?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),Hh=this._renderer.getRenderTarget(),Gh=this._renderer.getActiveCubeFace(),Wh=this._renderer.getActiveMipmapLevel(),Xh=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=e||this._allocateTargets();return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,n={magFilter:pi,minFilter:pi,generateMipmaps:!1,type:Lc,format:Li,colorSpace:Ur,depthBuffer:!1},i=Cg(t,e,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==e){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Cg(t,e,n);let{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=xb(s)),this._blurMaterial=yb(s,t,e)}return i}_compileMaterial(t){let e=new mi(this._lodPlanes[0],t);this._renderer.compile(e,Vh)}_sceneToCubeUV(t,e,n,i){let a=new Tn(90,1,e,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],h=this._renderer,d=h.autoClear,f=h.toneMapping;h.getClearColor(Ag),h.toneMapping=Pr,h.autoClear=!1;let u=new _c({name:"PMREM.Background",side:Fn,depthWrite:!1,depthTest:!1}),_=new mi(new Aa,u),g=!1,p=t.background;p?p.isColor&&(u.color.copy(p),t.background=null,g=!0):(u.color.copy(Ag),g=!0);for(let m=0;m<6;m++){let b=m%3;b===0?(a.up.set(0,l[m],0),a.lookAt(c[m],0,0)):b===1?(a.up.set(0,0,l[m]),a.lookAt(0,c[m],0)):(a.up.set(0,l[m],0),a.lookAt(0,0,c[m]));let S=this._cubeSize;ec(i,b*S,m>2?S:0,S,S),h.setRenderTarget(i),g&&h.render(_,a),h.render(t,a)}_.geometry.dispose(),_.material.dispose(),h.toneMapping=f,h.autoClear=d,t.background=p}_textureToCubeUV(t,e){let n=this._renderer,i=t.mapping===To||t.mapping===Ao;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Pg()),this._cubemapMaterial.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Rg());let s=i?this._cubemapMaterial:this._equirectMaterial,o=new mi(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=t;let l=this._cubeSize;ec(e,0,0,3*l,2*l),n.setRenderTarget(e),n.render(o,Vh)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;let i=this._lodPlanes.length;for(let s=1;s<i;s++){let o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]),a=Dg[(i-s-1)%Dg.length];this._blur(t,s-1,s,o,a)}e.autoClear=n}_blur(t,e,n,i,s){let o=this._pingPongRenderTarget;this._halfBlur(t,o,e,n,i,"latitudinal",s),this._halfBlur(o,t,n,n,i,"longitudinal",s)}_halfBlur(t,e,n,i,s,o,a){let l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");let h=3,d=new mi(this._lodPlanes[i],c),f=c.uniforms,u=this._sizeLods[n]-1,_=isFinite(s)?Math.PI/(2*u):2*Math.PI/(2*Ms-1),g=s/_,p=isFinite(s)?1+Math.floor(h*g):Ms;p>Ms&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${Ms}`);let m=[],b=0;for(let w=0;w<Ms;++w){let P=w/g,M=Math.exp(-P*P/2);m.push(M),w===0?b+=M:w<p&&(b+=2*M)}for(let w=0;w<m.length;w++)m[w]=m[w]/b;f.envMap.value=t.texture,f.samples.value=p,f.weights.value=m,f.latitudinal.value=o==="latitudinal",a&&(f.poleAxis.value=a);let{_lodMax:S}=this;f.dTheta.value=_,f.mipInt.value=S-n;let v=this._sizeLods[i],C=3*v*(i>S-Mo?i-S+Mo:0),T=4*(this._cubeSize-v);ec(e,C,T,3*v,2*v),l.setRenderTarget(e),l.render(d,Vh)}};function xb(r){let t=[],e=[],n=[],i=r,s=r-Mo+1+Tg.length;for(let o=0;o<s;o++){let a=Math.pow(2,i);e.push(a);let l=1/a;o>r-Mo?l=Tg[o-r+Mo-1]:o===0&&(l=0),n.push(l);let c=1/(a-2),h=-c,d=1+c,f=[h,h,d,h,d,d,h,h,d,d,h,d],u=6,_=6,g=3,p=2,m=1,b=new Float32Array(g*_*u),S=new Float32Array(p*_*u),v=new Float32Array(m*_*u);for(let T=0;T<u;T++){let w=T%3*2/3-1,P=T>2?0:-1,M=[w,P,0,w+2/3,P,0,w+2/3,P+1,0,w,P,0,w+2/3,P+1,0,w,P+1,0];b.set(M,g*_*T),S.set(f,p*_*T);let y=[T,T,T,T,T,T];v.set(y,m*_*T)}let C=new Fi;C.setAttribute("position",new ti(b,g)),C.setAttribute("uv",new ti(S,p)),C.setAttribute("faceIndex",new ti(v,m)),t.push(C),i>Mo&&i--}return{lodPlanes:t,sizeLods:e,sigmas:n}}function Cg(r,t,e){let n=new er(r,t,e);return n.texture.mapping=Ic,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ec(r,t,e,n,i){r.viewport.set(t,e,n,i),r.scissor.set(t,e,n,i)}function yb(r,t,e){let n=new Float32Array(Ms),i=new nt(0,1,0);return new ii({name:"SphericalGaussianBlur",defines:{n:Ms,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/e,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Nf(),fragmentShader:`
|
|
3571
3571
|
|
|
3572
3572
|
precision mediump float;
|
|
3573
3573
|
precision mediump int;
|
|
@@ -3717,7 +3717,7 @@ void main() {
|
|
|
3717
3717
|
gl_Position = vec4( position, 1.0 );
|
|
3718
3718
|
|
|
3719
3719
|
}
|
|
3720
|
-
`}function vb(r){let t=new WeakMap,e=null;function n(a){if(a&&a.isTexture){let l=a.mapping,c=l===$h||l===Kh,h=l===To||l===Ao;if(c||h){let d=t.get(a),f=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==f)return e===null&&(e=new wc(r)),d=c?e.fromEquirectangular(a,d):e.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,t.set(a,d),d.texture;if(d!==void 0)return d.texture;{let u=a.image;return c&&u&&u.height>0||h&&u&&i(u)?(e===null&&(e=new wc(r)),d=c?e.fromEquirectangular(a):e.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,t.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function i(a){let l=0,c=6;for(let h=0;h<c;h++)a[h]!==void 0&&l++;return l===c}function s(a){let l=a.target;l.removeEventListener("dispose",s);let c=t.get(l);c!==void 0&&(t.delete(l),c.dispose())}function o(){t=new WeakMap,e!==null&&(e.dispose(),e=null)}return{get:n,dispose:o}}function Sb(r){let t={};function e(n){if(t[n]!==void 0)return t[n];let i;switch(n){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=r.getExtension(n)}return t[n]=i,i}return{has:function(n){return e(n)!==null},init:function(){e("EXT_color_buffer_float"),e("WEBGL_clip_cull_distance"),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture"),e("WEBGL_render_shared_exponent")},get:function(n){let i=e(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function Mb(r,t,e,n){let i={},s=new WeakMap;function o(d){let f=d.target;f.index!==null&&t.remove(f.index);for(let _ in f.attributes)t.remove(f.attributes[_]);for(let _ in f.morphAttributes){let g=f.morphAttributes[_];for(let p=0,m=g.length;p<m;p++)t.remove(g[p])}f.removeEventListener("dispose",o),delete i[f.id];let u=s.get(f);u&&(t.remove(u),s.delete(f)),n.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,e.memory.geometries--}function a(d,f){return i[f.id]===!0||(f.addEventListener("dispose",o),i[f.id]=!0,e.memory.geometries++),f}function l(d){let f=d.attributes;for(let _ in f)t.update(f[_],r.ARRAY_BUFFER);let u=d.morphAttributes;for(let _ in u){let g=u[_];for(let p=0,m=g.length;p<m;p++)t.update(g[p],r.ARRAY_BUFFER)}}function c(d){let f=[],u=d.index,_=d.attributes.position,g=0;if(u!==null){let b=u.array;g=u.version;for(let S=0,v=b.length;S<v;S+=3){let D=b[S+0],T=b[S+1],w=b[S+2];f.push(D,T,T,w,w,D)}}else if(_!==void 0){let b=_.array;g=_.version;for(let S=0,v=b.length/3-1;S<v;S+=3){let D=S+0,T=S+1,w=S+2;f.push(D,T,T,w,w,D)}}else return;let p=new(l_(f)?yc:xc)(f,1);p.version=g;let m=s.get(d);m&&t.remove(m),s.set(d,p)}function h(d){let f=s.get(d);if(f){let u=d.index;u!==null&&f.version<u.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:h}}function bb(r,t,e){let n;function i(f){n=f}let s,o;function a(f){s=f.type,o=f.bytesPerElement}function l(f,u){r.drawElements(n,u,s,f*o),e.update(u,n,1)}function c(f,u,_){_!==0&&(r.drawElementsInstanced(n,u,s,f*o,_),e.update(u,n,_))}function h(f,u,_){if(_===0)return;let g=t.get("WEBGL_multi_draw");if(g===null)for(let p=0;p<_;p++)this.render(f[p]/o,u[p]);else{g.multiDrawElementsWEBGL(n,u,0,s,f,0,_);let p=0;for(let m=0;m<_;m++)p+=u[m];e.update(p,n,1)}}function d(f,u,_,g){if(_===0)return;let p=t.get("WEBGL_multi_draw");if(p===null)for(let m=0;m<f.length;m++)c(f[m]/o,u[m],g[m]);else{p.multiDrawElementsInstancedWEBGL(n,u,0,s,f,0,g,0,_);let m=0;for(let b=0;b<_;b++)m+=u[b];for(let b=0;b<g.length;b++)e.update(m,n,g[b])}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=h,this.renderMultiDrawInstances=d}function wb(r){let t={geometries:0,textures:0},e={frame:0,calls:0,triangles:0,points:0,lines:0};function n(s,o,a){switch(e.calls++,o){case r.TRIANGLES:e.triangles+=a*(s/3);break;case r.LINES:e.lines+=a*(s/2);break;case r.LINE_STRIP:e.lines+=a*(s-1);break;case r.LINE_LOOP:e.lines+=a*s;break;case r.POINTS:e.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){e.calls=0,e.triangles=0,e.points=0,e.lines=0}return{memory:t,render:e,programs:null,autoReset:!0,reset:i,update:n}}function Eb(r,t,e){let n=new WeakMap,i=new je;function s(o,a,l){let c=o.morphTargetInfluences,h=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,d=h!==void 0?h.length:0,f=n.get(a);if(f===void 0||f.count!==d){let M=function(){w.dispose(),n.delete(a),a.removeEventListener("dispose",M)};f!==void 0&&f.texture.dispose();let u=a.morphAttributes.position!==void 0,_=a.morphAttributes.normal!==void 0,g=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],m=a.morphAttributes.normal||[],b=a.morphAttributes.color||[],S=0;u===!0&&(S=1),_===!0&&(S=2),g===!0&&(S=3);let v=a.attributes.position.count*S,D=1;v>t.maxTextureSize&&(D=Math.ceil(v/t.maxTextureSize),v=t.maxTextureSize);let T=new Float32Array(v*D*4*d),w=new pc(T,v,D,d);w.type=Ar,w.needsUpdate=!0;let I=S*4;for(let y=0;y<d;y++){let P=p[y],L=m[y],C=b[y],B=v*D*4*y;for(let J=0;J<P.count;J++){let O=J*I;u===!0&&(i.fromBufferAttribute(P,J),T[B+O+0]=i.x,T[B+O+1]=i.y,T[B+O+2]=i.z,T[B+O+3]=0),_===!0&&(i.fromBufferAttribute(L,J),T[B+O+4]=i.x,T[B+O+5]=i.y,T[B+O+6]=i.z,T[B+O+7]=0),g===!0&&(i.fromBufferAttribute(C,J),T[B+O+8]=i.x,T[B+O+9]=i.y,T[B+O+10]=i.z,T[B+O+11]=C.itemSize===4?i.w:1)}}f={count:d,texture:w,size:new _e(v,D)},n.set(a,f),a.addEventListener("dispose",M)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(r,"morphTexture",o.morphTexture,e);else{let u=0;for(let g=0;g<c.length;g++)u+=c[g];let _=a.morphTargetsRelative?1:1-u;l.getUniforms().setValue(r,"morphTargetBaseInfluence",_),l.getUniforms().setValue(r,"morphTargetInfluences",c)}l.getUniforms().setValue(r,"morphTargetsTexture",f.texture,e),l.getUniforms().setValue(r,"morphTargetsTextureSize",f.size)}return{update:s}}function Tb(r,t,e,n){let i=new WeakMap;function s(l){let c=n.render.frame,h=l.geometry,d=t.get(l,h);if(i.get(d)!==c&&(t.update(d),i.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(e.update(l.instanceMatrix,r.ARRAY_BUFFER),l.instanceColor!==null&&e.update(l.instanceColor,r.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){let f=l.skeleton;i.get(f)!==c&&(f.update(),i.set(f,c))}return d}function o(){i=new WeakMap}function a(l){let c=l.target;c.removeEventListener("dispose",a),e.remove(c.instanceMatrix),c.instanceColor!==null&&e.remove(c.instanceColor)}return{update:s,dispose:o}}var Ec=class extends ni{constructor(t,e,n,i,s,o,a,l,c,h){if(h=h!==void 0?h:bo,h!==bo&&h!==Ta)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===bo&&(n=Do),n===void 0&&h===Ta&&(n=Ra),super(null,i,s,o,a,l,h,n,c),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=a!==void 0?a:Qn,this.minFilter=l!==void 0?l:Qn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.compareFunction=t.compareFunction,this}toJSON(t){let e=super.toJSON(t);return this.compareFunction!==null&&(e.compareFunction=this.compareFunction),e}},f_=new ni,d_=new Ec(1,1);d_.compareFunction=a_;var p_=new pc,m_=new rf,g_=new Sc,Ig=[],Lg=[],Fg=new Float32Array(16),Ng=new Float32Array(9),Ug=new Float32Array(4);function Io(r,t,e){let n=r[0];if(n<=0||n>0)return r;let i=t*e,s=Ig[i];if(s===void 0&&(s=new Float32Array(i),Ig[i]=s),t!==0){n.toArray(s,0);for(let o=1,a=0;o!==t;++o)a+=e,r[o].toArray(s,a)}return s}function Xe(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e<n;e++)if(r[e]!==t[e])return!1;return!0}function Ye(r,t){for(let e=0,n=t.length;e<n;e++)r[e]=t[e]}function Nc(r,t){let e=Lg[t];e===void 0&&(e=new Int32Array(t),Lg[t]=e);for(let n=0;n!==t;++n)e[n]=r.allocateTextureUnit();return e}function Ab(r,t){let e=this.cache;e[0]!==t&&(r.uniform1f(this.addr,t),e[0]=t)}function Db(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2f(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2fv(this.addr,t),Ye(e,t)}}function Cb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3f(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else if(t.r!==void 0)(e[0]!==t.r||e[1]!==t.g||e[2]!==t.b)&&(r.uniform3f(this.addr,t.r,t.g,t.b),e[0]=t.r,e[1]=t.g,e[2]=t.b);else{if(Xe(e,t))return;r.uniform3fv(this.addr,t),Ye(e,t)}}function Rb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4f(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4fv(this.addr,t),Ye(e,t)}}function Pb(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix2fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Ug.set(n),r.uniformMatrix2fv(this.addr,!1,Ug),Ye(e,n)}}function Ib(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix3fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Ng.set(n),r.uniformMatrix3fv(this.addr,!1,Ng),Ye(e,n)}}function Lb(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix4fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Fg.set(n),r.uniformMatrix4fv(this.addr,!1,Fg),Ye(e,n)}}function Fb(r,t){let e=this.cache;e[0]!==t&&(r.uniform1i(this.addr,t),e[0]=t)}function Nb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2i(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2iv(this.addr,t),Ye(e,t)}}function Ub(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3i(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Xe(e,t))return;r.uniform3iv(this.addr,t),Ye(e,t)}}function Ob(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4i(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4iv(this.addr,t),Ye(e,t)}}function Bb(r,t){let e=this.cache;e[0]!==t&&(r.uniform1ui(this.addr,t),e[0]=t)}function kb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2ui(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2uiv(this.addr,t),Ye(e,t)}}function zb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3ui(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Xe(e,t))return;r.uniform3uiv(this.addr,t),Ye(e,t)}}function Vb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4ui(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4uiv(this.addr,t),Ye(e,t)}}function Hb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i);let s=this.type===r.SAMPLER_2D_SHADOW?d_:f_;e.setTexture2D(t||s,i)}function Gb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTexture3D(t||m_,i)}function Wb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTextureCube(t||g_,i)}function Xb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTexture2DArray(t||p_,i)}function Yb(r){switch(r){case 5126:return Ab;case 35664:return Db;case 35665:return Cb;case 35666:return Rb;case 35674:return Pb;case 35675:return Ib;case 35676:return Lb;case 5124:case 35670:return Fb;case 35667:case 35671:return Nb;case 35668:case 35672:return Ub;case 35669:case 35673:return Ob;case 5125:return Bb;case 36294:return kb;case 36295:return zb;case 36296:return Vb;case 35678:case 36198:case 36298:case 36306:case 35682:return Hb;case 35679:case 36299:case 36307:return Gb;case 35680:case 36300:case 36308:case 36293:return Wb;case 36289:case 36303:case 36311:case 36292:return Xb}}function qb(r,t){r.uniform1fv(this.addr,t)}function Zb(r,t){let e=Io(t,this.size,2);r.uniform2fv(this.addr,e)}function Jb(r,t){let e=Io(t,this.size,3);r.uniform3fv(this.addr,e)}function $b(r,t){let e=Io(t,this.size,4);r.uniform4fv(this.addr,e)}function Kb(r,t){let e=Io(t,this.size,4);r.uniformMatrix2fv(this.addr,!1,e)}function jb(r,t){let e=Io(t,this.size,9);r.uniformMatrix3fv(this.addr,!1,e)}function Qb(r,t){let e=Io(t,this.size,16);r.uniformMatrix4fv(this.addr,!1,e)}function tw(r,t){r.uniform1iv(this.addr,t)}function ew(r,t){r.uniform2iv(this.addr,t)}function nw(r,t){r.uniform3iv(this.addr,t)}function iw(r,t){r.uniform4iv(this.addr,t)}function rw(r,t){r.uniform1uiv(this.addr,t)}function sw(r,t){r.uniform2uiv(this.addr,t)}function ow(r,t){r.uniform3uiv(this.addr,t)}function aw(r,t){r.uniform4uiv(this.addr,t)}function lw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture2D(t[o]||f_,s[o])}function cw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture3D(t[o]||m_,s[o])}function uw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTextureCube(t[o]||g_,s[o])}function hw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture2DArray(t[o]||p_,s[o])}function fw(r){switch(r){case 5126:return qb;case 35664:return Zb;case 35665:return Jb;case 35666:return $b;case 35674:return Kb;case 35675:return jb;case 35676:return Qb;case 5124:case 35670:return tw;case 35667:case 35671:return ew;case 35668:case 35672:return nw;case 35669:case 35673:return iw;case 5125:return rw;case 36294:return sw;case 36295:return ow;case 36296:return aw;case 35678:case 36198:case 36298:case 36306:case 35682:return lw;case 35679:case 36299:case 36307:return cw;case 35680:case 36300:case 36308:case 36293:return uw;case 36289:case 36303:case 36311:case 36292:return hw}}var af=class{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.setValue=Yb(e.type)}},lf=class{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.size=e.size,this.setValue=fw(e.type)}},cf=class{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,n){let i=this.seq;for(let s=0,o=i.length;s!==o;++s){let a=i[s];a.setValue(t,e[a.id],n)}}},Yh=/(\w+)(\])?(\[|\.)?/g;function Og(r,t){r.seq.push(t),r.map[t.id]=t}function dw(r,t,e){let n=r.name,i=n.length;for(Yh.lastIndex=0;;){let s=Yh.exec(n),o=Yh.lastIndex,a=s[1],l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Og(e,c===void 0?new af(a,r,t):new lf(a,r,t));break}else{let d=e.map[a];d===void 0&&(d=new cf(a),Og(e,d)),e=d}}}var Eo=class{constructor(t,e){this.seq=[],this.map={};let n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){let s=t.getActiveUniform(e,i),o=t.getUniformLocation(e,s.name);dw(s,o,this)}}setValue(t,e,n,i){let s=this.map[e];s!==void 0&&s.setValue(t,n,i)}setOptional(t,e,n){let i=e[n];i!==void 0&&this.setValue(t,n,i)}static upload(t,e,n,i){for(let s=0,o=e.length;s!==o;++s){let a=e[s],l=n[a.id];l.needsUpdate!==!1&&a.setValue(t,l.value,i)}}static seqWithValue(t,e){let n=[];for(let i=0,s=t.length;i!==s;++i){let o=t[i];o.id in e&&n.push(o)}return n}};function Bg(r,t,e){let n=r.createShader(t);return r.shaderSource(n,e),r.compileShader(n),n}var pw=37297,mw=0;function gw(r,t){let e=r.split(`
|
|
3720
|
+
`}function vb(r){let t=new WeakMap,e=null;function n(a){if(a&&a.isTexture){let l=a.mapping,c=l===$h||l===Kh,h=l===To||l===Ao;if(c||h){let d=t.get(a),f=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==f)return e===null&&(e=new wc(r)),d=c?e.fromEquirectangular(a,d):e.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,t.set(a,d),d.texture;if(d!==void 0)return d.texture;{let u=a.image;return c&&u&&u.height>0||h&&u&&i(u)?(e===null&&(e=new wc(r)),d=c?e.fromEquirectangular(a):e.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,t.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function i(a){let l=0,c=6;for(let h=0;h<c;h++)a[h]!==void 0&&l++;return l===c}function s(a){let l=a.target;l.removeEventListener("dispose",s);let c=t.get(l);c!==void 0&&(t.delete(l),c.dispose())}function o(){t=new WeakMap,e!==null&&(e.dispose(),e=null)}return{get:n,dispose:o}}function Sb(r){let t={};function e(n){if(t[n]!==void 0)return t[n];let i;switch(n){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=r.getExtension(n)}return t[n]=i,i}return{has:function(n){return e(n)!==null},init:function(){e("EXT_color_buffer_float"),e("WEBGL_clip_cull_distance"),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture"),e("WEBGL_render_shared_exponent")},get:function(n){let i=e(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function Mb(r,t,e,n){let i={},s=new WeakMap;function o(d){let f=d.target;f.index!==null&&t.remove(f.index);for(let _ in f.attributes)t.remove(f.attributes[_]);for(let _ in f.morphAttributes){let g=f.morphAttributes[_];for(let p=0,m=g.length;p<m;p++)t.remove(g[p])}f.removeEventListener("dispose",o),delete i[f.id];let u=s.get(f);u&&(t.remove(u),s.delete(f)),n.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,e.memory.geometries--}function a(d,f){return i[f.id]===!0||(f.addEventListener("dispose",o),i[f.id]=!0,e.memory.geometries++),f}function l(d){let f=d.attributes;for(let _ in f)t.update(f[_],r.ARRAY_BUFFER);let u=d.morphAttributes;for(let _ in u){let g=u[_];for(let p=0,m=g.length;p<m;p++)t.update(g[p],r.ARRAY_BUFFER)}}function c(d){let f=[],u=d.index,_=d.attributes.position,g=0;if(u!==null){let b=u.array;g=u.version;for(let S=0,v=b.length;S<v;S+=3){let C=b[S+0],T=b[S+1],w=b[S+2];f.push(C,T,T,w,w,C)}}else if(_!==void 0){let b=_.array;g=_.version;for(let S=0,v=b.length/3-1;S<v;S+=3){let C=S+0,T=S+1,w=S+2;f.push(C,T,T,w,w,C)}}else return;let p=new(l_(f)?yc:xc)(f,1);p.version=g;let m=s.get(d);m&&t.remove(m),s.set(d,p)}function h(d){let f=s.get(d);if(f){let u=d.index;u!==null&&f.version<u.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:h}}function bb(r,t,e){let n;function i(f){n=f}let s,o;function a(f){s=f.type,o=f.bytesPerElement}function l(f,u){r.drawElements(n,u,s,f*o),e.update(u,n,1)}function c(f,u,_){_!==0&&(r.drawElementsInstanced(n,u,s,f*o,_),e.update(u,n,_))}function h(f,u,_){if(_===0)return;let g=t.get("WEBGL_multi_draw");if(g===null)for(let p=0;p<_;p++)this.render(f[p]/o,u[p]);else{g.multiDrawElementsWEBGL(n,u,0,s,f,0,_);let p=0;for(let m=0;m<_;m++)p+=u[m];e.update(p,n,1)}}function d(f,u,_,g){if(_===0)return;let p=t.get("WEBGL_multi_draw");if(p===null)for(let m=0;m<f.length;m++)c(f[m]/o,u[m],g[m]);else{p.multiDrawElementsInstancedWEBGL(n,u,0,s,f,0,g,0,_);let m=0;for(let b=0;b<_;b++)m+=u[b];for(let b=0;b<g.length;b++)e.update(m,n,g[b])}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=h,this.renderMultiDrawInstances=d}function wb(r){let t={geometries:0,textures:0},e={frame:0,calls:0,triangles:0,points:0,lines:0};function n(s,o,a){switch(e.calls++,o){case r.TRIANGLES:e.triangles+=a*(s/3);break;case r.LINES:e.lines+=a*(s/2);break;case r.LINE_STRIP:e.lines+=a*(s-1);break;case r.LINE_LOOP:e.lines+=a*s;break;case r.POINTS:e.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){e.calls=0,e.triangles=0,e.points=0,e.lines=0}return{memory:t,render:e,programs:null,autoReset:!0,reset:i,update:n}}function Eb(r,t,e){let n=new WeakMap,i=new je;function s(o,a,l){let c=o.morphTargetInfluences,h=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,d=h!==void 0?h.length:0,f=n.get(a);if(f===void 0||f.count!==d){let M=function(){w.dispose(),n.delete(a),a.removeEventListener("dispose",M)};f!==void 0&&f.texture.dispose();let u=a.morphAttributes.position!==void 0,_=a.morphAttributes.normal!==void 0,g=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],m=a.morphAttributes.normal||[],b=a.morphAttributes.color||[],S=0;u===!0&&(S=1),_===!0&&(S=2),g===!0&&(S=3);let v=a.attributes.position.count*S,C=1;v>t.maxTextureSize&&(C=Math.ceil(v/t.maxTextureSize),v=t.maxTextureSize);let T=new Float32Array(v*C*4*d),w=new pc(T,v,C,d);w.type=Ar,w.needsUpdate=!0;let P=S*4;for(let y=0;y<d;y++){let L=p[y],I=m[y],D=b[y],O=v*C*4*y;for(let X=0;X<L.count;X++){let H=X*P;u===!0&&(i.fromBufferAttribute(L,X),T[O+H+0]=i.x,T[O+H+1]=i.y,T[O+H+2]=i.z,T[O+H+3]=0),_===!0&&(i.fromBufferAttribute(I,X),T[O+H+4]=i.x,T[O+H+5]=i.y,T[O+H+6]=i.z,T[O+H+7]=0),g===!0&&(i.fromBufferAttribute(D,X),T[O+H+8]=i.x,T[O+H+9]=i.y,T[O+H+10]=i.z,T[O+H+11]=D.itemSize===4?i.w:1)}}f={count:d,texture:w,size:new _e(v,C)},n.set(a,f),a.addEventListener("dispose",M)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(r,"morphTexture",o.morphTexture,e);else{let u=0;for(let g=0;g<c.length;g++)u+=c[g];let _=a.morphTargetsRelative?1:1-u;l.getUniforms().setValue(r,"morphTargetBaseInfluence",_),l.getUniforms().setValue(r,"morphTargetInfluences",c)}l.getUniforms().setValue(r,"morphTargetsTexture",f.texture,e),l.getUniforms().setValue(r,"morphTargetsTextureSize",f.size)}return{update:s}}function Tb(r,t,e,n){let i=new WeakMap;function s(l){let c=n.render.frame,h=l.geometry,d=t.get(l,h);if(i.get(d)!==c&&(t.update(d),i.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(e.update(l.instanceMatrix,r.ARRAY_BUFFER),l.instanceColor!==null&&e.update(l.instanceColor,r.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){let f=l.skeleton;i.get(f)!==c&&(f.update(),i.set(f,c))}return d}function o(){i=new WeakMap}function a(l){let c=l.target;c.removeEventListener("dispose",a),e.remove(c.instanceMatrix),c.instanceColor!==null&&e.remove(c.instanceColor)}return{update:s,dispose:o}}var Ec=class extends ni{constructor(t,e,n,i,s,o,a,l,c,h){if(h=h!==void 0?h:bo,h!==bo&&h!==Ta)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===bo&&(n=Do),n===void 0&&h===Ta&&(n=Ra),super(null,i,s,o,a,l,h,n,c),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=a!==void 0?a:Qn,this.minFilter=l!==void 0?l:Qn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.compareFunction=t.compareFunction,this}toJSON(t){let e=super.toJSON(t);return this.compareFunction!==null&&(e.compareFunction=this.compareFunction),e}},f_=new ni,d_=new Ec(1,1);d_.compareFunction=a_;var p_=new pc,m_=new rf,g_=new Sc,Ig=[],Lg=[],Fg=new Float32Array(16),Ng=new Float32Array(9),Ug=new Float32Array(4);function Io(r,t,e){let n=r[0];if(n<=0||n>0)return r;let i=t*e,s=Ig[i];if(s===void 0&&(s=new Float32Array(i),Ig[i]=s),t!==0){n.toArray(s,0);for(let o=1,a=0;o!==t;++o)a+=e,r[o].toArray(s,a)}return s}function Xe(r,t){if(r.length!==t.length)return!1;for(let e=0,n=r.length;e<n;e++)if(r[e]!==t[e])return!1;return!0}function Ye(r,t){for(let e=0,n=t.length;e<n;e++)r[e]=t[e]}function Nc(r,t){let e=Lg[t];e===void 0&&(e=new Int32Array(t),Lg[t]=e);for(let n=0;n!==t;++n)e[n]=r.allocateTextureUnit();return e}function Ab(r,t){let e=this.cache;e[0]!==t&&(r.uniform1f(this.addr,t),e[0]=t)}function Db(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2f(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2fv(this.addr,t),Ye(e,t)}}function Cb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3f(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else if(t.r!==void 0)(e[0]!==t.r||e[1]!==t.g||e[2]!==t.b)&&(r.uniform3f(this.addr,t.r,t.g,t.b),e[0]=t.r,e[1]=t.g,e[2]=t.b);else{if(Xe(e,t))return;r.uniform3fv(this.addr,t),Ye(e,t)}}function Rb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4f(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4fv(this.addr,t),Ye(e,t)}}function Pb(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix2fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Ug.set(n),r.uniformMatrix2fv(this.addr,!1,Ug),Ye(e,n)}}function Ib(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix3fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Ng.set(n),r.uniformMatrix3fv(this.addr,!1,Ng),Ye(e,n)}}function Lb(r,t){let e=this.cache,n=t.elements;if(n===void 0){if(Xe(e,t))return;r.uniformMatrix4fv(this.addr,!1,t),Ye(e,t)}else{if(Xe(e,n))return;Fg.set(n),r.uniformMatrix4fv(this.addr,!1,Fg),Ye(e,n)}}function Fb(r,t){let e=this.cache;e[0]!==t&&(r.uniform1i(this.addr,t),e[0]=t)}function Nb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2i(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2iv(this.addr,t),Ye(e,t)}}function Ub(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3i(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Xe(e,t))return;r.uniform3iv(this.addr,t),Ye(e,t)}}function Ob(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4i(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4iv(this.addr,t),Ye(e,t)}}function Bb(r,t){let e=this.cache;e[0]!==t&&(r.uniform1ui(this.addr,t),e[0]=t)}function kb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y)&&(r.uniform2ui(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(Xe(e,t))return;r.uniform2uiv(this.addr,t),Ye(e,t)}}function zb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(r.uniform3ui(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else{if(Xe(e,t))return;r.uniform3uiv(this.addr,t),Ye(e,t)}}function Vb(r,t){let e=this.cache;if(t.x!==void 0)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(r.uniform4ui(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(Xe(e,t))return;r.uniform4uiv(this.addr,t),Ye(e,t)}}function Hb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i);let s=this.type===r.SAMPLER_2D_SHADOW?d_:f_;e.setTexture2D(t||s,i)}function Gb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTexture3D(t||m_,i)}function Wb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTextureCube(t||g_,i)}function Xb(r,t,e){let n=this.cache,i=e.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),e.setTexture2DArray(t||p_,i)}function Yb(r){switch(r){case 5126:return Ab;case 35664:return Db;case 35665:return Cb;case 35666:return Rb;case 35674:return Pb;case 35675:return Ib;case 35676:return Lb;case 5124:case 35670:return Fb;case 35667:case 35671:return Nb;case 35668:case 35672:return Ub;case 35669:case 35673:return Ob;case 5125:return Bb;case 36294:return kb;case 36295:return zb;case 36296:return Vb;case 35678:case 36198:case 36298:case 36306:case 35682:return Hb;case 35679:case 36299:case 36307:return Gb;case 35680:case 36300:case 36308:case 36293:return Wb;case 36289:case 36303:case 36311:case 36292:return Xb}}function qb(r,t){r.uniform1fv(this.addr,t)}function Zb(r,t){let e=Io(t,this.size,2);r.uniform2fv(this.addr,e)}function Jb(r,t){let e=Io(t,this.size,3);r.uniform3fv(this.addr,e)}function $b(r,t){let e=Io(t,this.size,4);r.uniform4fv(this.addr,e)}function Kb(r,t){let e=Io(t,this.size,4);r.uniformMatrix2fv(this.addr,!1,e)}function jb(r,t){let e=Io(t,this.size,9);r.uniformMatrix3fv(this.addr,!1,e)}function Qb(r,t){let e=Io(t,this.size,16);r.uniformMatrix4fv(this.addr,!1,e)}function tw(r,t){r.uniform1iv(this.addr,t)}function ew(r,t){r.uniform2iv(this.addr,t)}function nw(r,t){r.uniform3iv(this.addr,t)}function iw(r,t){r.uniform4iv(this.addr,t)}function rw(r,t){r.uniform1uiv(this.addr,t)}function sw(r,t){r.uniform2uiv(this.addr,t)}function ow(r,t){r.uniform3uiv(this.addr,t)}function aw(r,t){r.uniform4uiv(this.addr,t)}function lw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture2D(t[o]||f_,s[o])}function cw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture3D(t[o]||m_,s[o])}function uw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTextureCube(t[o]||g_,s[o])}function hw(r,t,e){let n=this.cache,i=t.length,s=Nc(e,i);Xe(n,s)||(r.uniform1iv(this.addr,s),Ye(n,s));for(let o=0;o!==i;++o)e.setTexture2DArray(t[o]||p_,s[o])}function fw(r){switch(r){case 5126:return qb;case 35664:return Zb;case 35665:return Jb;case 35666:return $b;case 35674:return Kb;case 35675:return jb;case 35676:return Qb;case 5124:case 35670:return tw;case 35667:case 35671:return ew;case 35668:case 35672:return nw;case 35669:case 35673:return iw;case 5125:return rw;case 36294:return sw;case 36295:return ow;case 36296:return aw;case 35678:case 36198:case 36298:case 36306:case 35682:return lw;case 35679:case 36299:case 36307:return cw;case 35680:case 36300:case 36308:case 36293:return uw;case 36289:case 36303:case 36311:case 36292:return hw}}var af=class{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.setValue=Yb(e.type)}},lf=class{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.size=e.size,this.setValue=fw(e.type)}},cf=class{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,n){let i=this.seq;for(let s=0,o=i.length;s!==o;++s){let a=i[s];a.setValue(t,e[a.id],n)}}},Yh=/(\w+)(\])?(\[|\.)?/g;function Og(r,t){r.seq.push(t),r.map[t.id]=t}function dw(r,t,e){let n=r.name,i=n.length;for(Yh.lastIndex=0;;){let s=Yh.exec(n),o=Yh.lastIndex,a=s[1],l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Og(e,c===void 0?new af(a,r,t):new lf(a,r,t));break}else{let d=e.map[a];d===void 0&&(d=new cf(a),Og(e,d)),e=d}}}var Eo=class{constructor(t,e){this.seq=[],this.map={};let n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){let s=t.getActiveUniform(e,i),o=t.getUniformLocation(e,s.name);dw(s,o,this)}}setValue(t,e,n,i){let s=this.map[e];s!==void 0&&s.setValue(t,n,i)}setOptional(t,e,n){let i=e[n];i!==void 0&&this.setValue(t,n,i)}static upload(t,e,n,i){for(let s=0,o=e.length;s!==o;++s){let a=e[s],l=n[a.id];l.needsUpdate!==!1&&a.setValue(t,l.value,i)}}static seqWithValue(t,e){let n=[];for(let i=0,s=t.length;i!==s;++i){let o=t[i];o.id in e&&n.push(o)}return n}};function Bg(r,t,e){let n=r.createShader(t);return r.shaderSource(n,e),r.compileShader(n),n}var pw=37297,mw=0;function gw(r,t){let e=r.split(`
|
|
3721
3721
|
`),n=[],i=Math.max(t-6,0),s=Math.min(t+6,e.length);for(let o=i;o<s;o++){let a=o+1;n.push(`${a===t?">":" "} ${a}: ${e[o]}`)}return n.join(`
|
|
3722
3722
|
`)}function _w(r){let t=Se.getPrimaries(Se.workingColorSpace),e=Se.getPrimaries(r),n;switch(t===e?n="":t===uc&&e===cc?n="LinearDisplayP3ToLinearSRGB":t===cc&&e===uc&&(n="LinearSRGBToLinearDisplayP3"),r){case Ur:case Fc:return[n,"LinearTransferOETF"];case jn:case Ff:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",r),[n,"LinearTransferOETF"]}}function kg(r,t,e){let n=r.getShaderParameter(t,r.COMPILE_STATUS),i=r.getShaderInfoLog(t).trim();if(n&&i==="")return"";let s=/ERROR: 0:(\d+)/.exec(i);if(s){let o=parseInt(s[1]);return e.toUpperCase()+`
|
|
3723
3723
|
|
|
@@ -3759,14 +3759,14 @@ void main() {
|
|
|
3759
3759
|
`)+`
|
|
3760
3760
|
`+p,m=["#define varying in",e.glslVersion===og?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===og?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
|
|
3761
3761
|
`)+`
|
|
3762
|
-
`+m);let S=b+p+o,v=b+m+a,
|
|
3762
|
+
`+m);let S=b+p+o,v=b+m+a,C=Bg(i,i.VERTEX_SHADER,S),T=Bg(i,i.FRAGMENT_SHADER,v);i.attachShader(g,C),i.attachShader(g,T),e.index0AttributeName!==void 0?i.bindAttribLocation(g,0,e.index0AttributeName):e.morphTargets===!0&&i.bindAttribLocation(g,0,"position"),i.linkProgram(g);function w(L){if(r.debug.checkShaderErrors){let I=i.getProgramInfoLog(g).trim(),D=i.getShaderInfoLog(C).trim(),O=i.getShaderInfoLog(T).trim(),X=!0,H=!0;if(i.getProgramParameter(g,i.LINK_STATUS)===!1)if(X=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(i,g,C,T);else{let G=kg(i,C,"vertex"),B=kg(i,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(g,i.VALIDATE_STATUS)+`
|
|
3763
3763
|
|
|
3764
|
-
Material Name: `+
|
|
3765
|
-
Material Type: `+
|
|
3764
|
+
Material Name: `+L.name+`
|
|
3765
|
+
Material Type: `+L.type+`
|
|
3766
3766
|
|
|
3767
|
-
Program Info Log: `+
|
|
3768
|
-
`+
|
|
3769
|
-
`+H)}else L!==""?console.warn("THREE.WebGLProgram: Program Info Log:",L):(C===""||B==="")&&(O=!1);O&&(P.diagnostics={runnable:J,programLog:L,vertexShader:{log:C,prefix:p},fragmentShader:{log:B,prefix:m}})}i.deleteShader(D),i.deleteShader(T),I=new Eo(i,g),M=Mw(i,g)}let I;this.getUniforms=function(){return I===void 0&&w(this),I};let M;this.getAttributes=function(){return M===void 0&&w(this),M};let y=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return y===!1&&(y=i.getProgramParameter(g,pw)),y},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=mw++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=D,this.fragmentShader=T,this}var Fw=0,hf=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 ff(t),e.set(t,n)),n}},ff=class{constructor(t){this.id=Fw++,this.code=t,this.usedTimes=0}};function Nw(r,t,e,n,i,s,o){let a=new gc,l=new hf,c=new Set,h=[],d=i.logarithmicDepthBuffer,f=i.vertexTextures,u=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(M){return c.add(M),M===0?"uv":`uv${M}`}function p(M,y,P,L,C){let B=L.fog,J=C.geometry,O=M.isMeshStandardMaterial?L.environment:null,Y=(M.isMeshStandardMaterial?e:t).get(M.envMap||O),H=Y&&Y.mapping===Ic?Y.image.height:null,U=_[M.type];M.precision!==null&&(u=i.getMaxPrecision(M.precision),u!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",u,"instead."));let R=J.morphAttributes.position||J.morphAttributes.normal||J.morphAttributes.color,at=R!==void 0?R.length:0,_t=0;J.morphAttributes.position!==void 0&&(_t=1),J.morphAttributes.normal!==void 0&&(_t=2),J.morphAttributes.color!==void 0&&(_t=3);let Ut,X,ot,xt;if(U){let rt=Ii[U];Ut=rt.vertexShader,X=rt.fragmentShader}else Ut=M.vertexShader,X=M.fragmentShader,l.update(M),ot=l.getVertexShaderID(M),xt=l.getFragmentShaderID(M);let ct=r.getRenderTarget(),Rt=C.isInstancedMesh===!0,kt=C.isBatchedMesh===!0,Z=!!M.map,Jt=!!M.matcap,It=!!Y,Ft=!!M.aoMap,bt=!!M.lightMap,Et=!!M.bumpMap,Ht=!!M.normalMap,W=!!M.displacementMap,$t=!!M.emissiveMap,A=!!M.metalnessMap,x=!!M.roughnessMap,N=M.anisotropy>0,q=M.clearcoat>0,tt=M.dispersion>0,it=M.iridescence>0,vt=M.sheen>0,pt=M.transmission>0,lt=N&&!!M.anisotropyMap,Lt=q&&!!M.clearcoatMap,ht=q&&!!M.clearcoatNormalMap,yt=q&&!!M.clearcoatRoughnessMap,Yt=it&&!!M.iridescenceMap,ut=it&&!!M.iridescenceThicknessMap,Tt=vt&&!!M.sheenColorMap,Wt=vt&&!!M.sheenRoughnessMap,qt=!!M.specularMap,ue=!!M.specularColorMap,Zt=!!M.specularIntensityMap,V=pt&&!!M.transmissionMap,Q=pt&&!!M.thicknessMap,st=!!M.gradientMap,mt=!!M.alphaMap,gt=M.alphaTest>0,Bt=!!M.alphaHash,ee=!!M.extensions,Mt=Pr;M.toneMapped&&(ct===null||ct.isXRRenderTarget===!0)&&(Mt=r.toneMapping);let F={shaderID:U,shaderType:M.type,shaderName:M.name,vertexShader:Ut,fragmentShader:X,defines:M.defines,customVertexShaderID:ot,customFragmentShaderID:xt,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:u,batching:kt,instancing:Rt,instancingColor:Rt&&C.instanceColor!==null,instancingMorph:Rt&&C.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:ct===null?r.outputColorSpace:ct.isXRRenderTarget===!0?ct.texture.colorSpace:Ur,alphaToCoverage:!!M.alphaToCoverage,map:Z,matcap:Jt,envMap:It,envMapMode:It&&Y.mapping,envMapCubeUVHeight:H,aoMap:Ft,lightMap:bt,bumpMap:Et,normalMap:Ht,displacementMap:f&&W,emissiveMap:$t,normalMapObjectSpace:Ht&&M.normalMapType===ev,normalMapTangentSpace:Ht&&M.normalMapType===tv,metalnessMap:A,roughnessMap:x,anisotropy:N,anisotropyMap:lt,clearcoat:q,clearcoatMap:Lt,clearcoatNormalMap:ht,clearcoatRoughnessMap:yt,dispersion:tt,iridescence:it,iridescenceMap:Yt,iridescenceThicknessMap:ut,sheen:vt,sheenColorMap:Tt,sheenRoughnessMap:Wt,specularMap:qt,specularColorMap:ue,specularIntensityMap:Zt,transmission:pt,transmissionMap:V,thicknessMap:Q,gradientMap:st,opaque:M.transparent===!1&&M.blending===Rr&&M.alphaToCoverage===!1,alphaMap:mt,alphaTest:gt,alphaHash:Bt,combine:M.combine,mapUv:Z&&g(M.map.channel),aoMapUv:Ft&&g(M.aoMap.channel),lightMapUv:bt&&g(M.lightMap.channel),bumpMapUv:Et&&g(M.bumpMap.channel),normalMapUv:Ht&&g(M.normalMap.channel),displacementMapUv:W&&g(M.displacementMap.channel),emissiveMapUv:$t&&g(M.emissiveMap.channel),metalnessMapUv:A&&g(M.metalnessMap.channel),roughnessMapUv:x&&g(M.roughnessMap.channel),anisotropyMapUv:lt&&g(M.anisotropyMap.channel),clearcoatMapUv:Lt&&g(M.clearcoatMap.channel),clearcoatNormalMapUv:ht&&g(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:yt&&g(M.clearcoatRoughnessMap.channel),iridescenceMapUv:Yt&&g(M.iridescenceMap.channel),iridescenceThicknessMapUv:ut&&g(M.iridescenceThicknessMap.channel),sheenColorMapUv:Tt&&g(M.sheenColorMap.channel),sheenRoughnessMapUv:Wt&&g(M.sheenRoughnessMap.channel),specularMapUv:qt&&g(M.specularMap.channel),specularColorMapUv:ue&&g(M.specularColorMap.channel),specularIntensityMapUv:Zt&&g(M.specularIntensityMap.channel),transmissionMapUv:V&&g(M.transmissionMap.channel),thicknessMapUv:Q&&g(M.thicknessMap.channel),alphaMapUv:mt&&g(M.alphaMap.channel),vertexTangents:!!J.attributes.tangent&&(Ht||N),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!J.attributes.color&&J.attributes.color.itemSize===4,pointsUvs:C.isPoints===!0&&!!J.attributes.uv&&(Z||mt),fog:!!B,useFog:M.fog===!0,fogExp2:!!B&&B.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:C.isSkinnedMesh===!0,morphTargets:J.morphAttributes.position!==void 0,morphNormals:J.morphAttributes.normal!==void 0,morphColors:J.morphAttributes.color!==void 0,morphTargetsCount:at,morphTextureStride:_t,numDirLights:y.directional.length,numPointLights:y.point.length,numSpotLights:y.spot.length,numSpotLightMaps:y.spotLightMap.length,numRectAreaLights:y.rectArea.length,numHemiLights:y.hemi.length,numDirLightShadows:y.directionalShadowMap.length,numPointLightShadows:y.pointShadowMap.length,numSpotLightShadows:y.spotShadowMap.length,numSpotLightShadowsWithMaps:y.numSpotLightShadowsWithMaps,numLightProbes:y.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:r.shadowMap.enabled&&P.length>0,shadowMapType:r.shadowMap.type,toneMapping:Mt,useLegacyLights:r._useLegacyLights,decodeVideoTexture:Z&&M.map.isVideoTexture===!0&&Se.getTransfer(M.map.colorSpace)===Te,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Qi,flipSided:M.side===Fn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:ee&&M.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:ee&&M.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return F.vertexUv1s=c.has(1),F.vertexUv2s=c.has(2),F.vertexUv3s=c.has(3),c.clear(),F}function m(M){let y=[];if(M.shaderID?y.push(M.shaderID):(y.push(M.customVertexShaderID),y.push(M.customFragmentShaderID)),M.defines!==void 0)for(let P in M.defines)y.push(P),y.push(M.defines[P]);return M.isRawShaderMaterial===!1&&(b(y,M),S(y,M),y.push(r.outputColorSpace)),y.push(M.customProgramCacheKey),y.join()}function b(M,y){M.push(y.precision),M.push(y.outputColorSpace),M.push(y.envMapMode),M.push(y.envMapCubeUVHeight),M.push(y.mapUv),M.push(y.alphaMapUv),M.push(y.lightMapUv),M.push(y.aoMapUv),M.push(y.bumpMapUv),M.push(y.normalMapUv),M.push(y.displacementMapUv),M.push(y.emissiveMapUv),M.push(y.metalnessMapUv),M.push(y.roughnessMapUv),M.push(y.anisotropyMapUv),M.push(y.clearcoatMapUv),M.push(y.clearcoatNormalMapUv),M.push(y.clearcoatRoughnessMapUv),M.push(y.iridescenceMapUv),M.push(y.iridescenceThicknessMapUv),M.push(y.sheenColorMapUv),M.push(y.sheenRoughnessMapUv),M.push(y.specularMapUv),M.push(y.specularColorMapUv),M.push(y.specularIntensityMapUv),M.push(y.transmissionMapUv),M.push(y.thicknessMapUv),M.push(y.combine),M.push(y.fogExp2),M.push(y.sizeAttenuation),M.push(y.morphTargetsCount),M.push(y.morphAttributeCount),M.push(y.numDirLights),M.push(y.numPointLights),M.push(y.numSpotLights),M.push(y.numSpotLightMaps),M.push(y.numHemiLights),M.push(y.numRectAreaLights),M.push(y.numDirLightShadows),M.push(y.numPointLightShadows),M.push(y.numSpotLightShadows),M.push(y.numSpotLightShadowsWithMaps),M.push(y.numLightProbes),M.push(y.shadowMapType),M.push(y.toneMapping),M.push(y.numClippingPlanes),M.push(y.numClipIntersection),M.push(y.depthPacking)}function S(M,y){a.disableAll(),y.supportsVertexTextures&&a.enable(0),y.instancing&&a.enable(1),y.instancingColor&&a.enable(2),y.instancingMorph&&a.enable(3),y.matcap&&a.enable(4),y.envMap&&a.enable(5),y.normalMapObjectSpace&&a.enable(6),y.normalMapTangentSpace&&a.enable(7),y.clearcoat&&a.enable(8),y.iridescence&&a.enable(9),y.alphaTest&&a.enable(10),y.vertexColors&&a.enable(11),y.vertexAlphas&&a.enable(12),y.vertexUv1s&&a.enable(13),y.vertexUv2s&&a.enable(14),y.vertexUv3s&&a.enable(15),y.vertexTangents&&a.enable(16),y.anisotropy&&a.enable(17),y.alphaHash&&a.enable(18),y.batching&&a.enable(19),y.dispersion&&a.enable(20),M.push(a.mask),a.disableAll(),y.fog&&a.enable(0),y.useFog&&a.enable(1),y.flatShading&&a.enable(2),y.logarithmicDepthBuffer&&a.enable(3),y.skinning&&a.enable(4),y.morphTargets&&a.enable(5),y.morphNormals&&a.enable(6),y.morphColors&&a.enable(7),y.premultipliedAlpha&&a.enable(8),y.shadowMapEnabled&&a.enable(9),y.useLegacyLights&&a.enable(10),y.doubleSided&&a.enable(11),y.flipSided&&a.enable(12),y.useDepthPacking&&a.enable(13),y.dithering&&a.enable(14),y.transmission&&a.enable(15),y.sheen&&a.enable(16),y.opaque&&a.enable(17),y.pointsUvs&&a.enable(18),y.decodeVideoTexture&&a.enable(19),y.alphaToCoverage&&a.enable(20),M.push(a.mask)}function v(M){let y=_[M.type],P;if(y){let L=Ii[y];P=Tv.clone(L.uniforms)}else P=M.uniforms;return P}function D(M,y){let P;for(let L=0,C=h.length;L<C;L++){let B=h[L];if(B.cacheKey===y){P=B,++P.usedTimes;break}}return P===void 0&&(P=new Lw(r,y,M,s),h.push(P)),P}function T(M){if(--M.usedTimes===0){let y=h.indexOf(M);h[y]=h[h.length-1],h.pop(),M.destroy()}}function w(M){l.remove(M)}function I(){l.dispose()}return{getParameters:p,getProgramCacheKey:m,getUniforms:v,acquireProgram:D,releaseProgram:T,releaseShaderCache:w,programs:h,dispose:I}}function Uw(){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 Ow(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 Wg(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 Xg(){let r=[],t=0,e=[],n=[],i=[];function s(){t=0,e.length=0,n.length=0,i.length=0}function o(d,f,u,_,g,p){let m=r[t];return m===void 0?(m={id:d.id,object:d,geometry:f,material:u,groupOrder:_,renderOrder:d.renderOrder,z:g,group:p},r[t]=m):(m.id=d.id,m.object=d,m.geometry=f,m.material=u,m.groupOrder=_,m.renderOrder=d.renderOrder,m.z=g,m.group=p),t++,m}function a(d,f,u,_,g,p){let m=o(d,f,u,_,g,p);u.transmission>0?n.push(m):u.transparent===!0?i.push(m):e.push(m)}function l(d,f,u,_,g,p){let m=o(d,f,u,_,g,p);u.transmission>0?n.unshift(m):u.transparent===!0?i.unshift(m):e.unshift(m)}function c(d,f){e.length>1&&e.sort(d||Ow),n.length>1&&n.sort(f||Wg),i.length>1&&i.sort(f||Wg)}function h(){for(let d=t,f=r.length;d<f;d++){let u=r[d];if(u.id===null)break;u.id=null,u.object=null,u.geometry=null,u.material=null,u.group=null}}return{opaque:e,transmissive:n,transparent:i,init:s,push:a,unshift:l,finish:h,sort:c}}function Bw(){let r=new WeakMap;function t(n,i){let s=r.get(n),o;return s===void 0?(o=new Xg,r.set(n,[o])):i>=s.length?(o=new Xg,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function kw(){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 nt,color:new ge};break;case"SpotLight":e={position:new nt,direction:new nt,color:new ge,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new nt,color:new ge,distance:0,decay:0};break;case"HemisphereLight":e={direction:new nt,skyColor:new ge,groundColor:new ge};break;case"RectAreaLight":e={color:new ge,position:new nt,halfWidth:new nt,halfHeight:new nt};break}return r[t.id]=e,e}}}function zw(){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 _e};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var Vw=0;function Hw(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function Gw(r){let t=new kw,e=zw(),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 nt);let i=new nt,s=new Ue,o=new Ue;function a(c,h){let d=0,f=0,u=0;for(let P=0;P<9;P++)n.probe[P].set(0,0,0);let _=0,g=0,p=0,m=0,b=0,S=0,v=0,D=0,T=0,w=0,I=0;c.sort(Hw);let M=h===!0?Math.PI:1;for(let P=0,L=c.length;P<L;P++){let C=c[P],B=C.color,J=C.intensity,O=C.distance,Y=C.shadow&&C.shadow.map?C.shadow.map.texture:null;if(C.isAmbientLight)d+=B.r*J*M,f+=B.g*J*M,u+=B.b*J*M;else if(C.isLightProbe){for(let H=0;H<9;H++)n.probe[H].addScaledVector(C.sh.coefficients[H],J);I++}else if(C.isDirectionalLight){let H=t.get(C);if(H.color.copy(C.color).multiplyScalar(C.intensity*M),C.castShadow){let U=C.shadow,R=e.get(C);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,n.directionalShadow[_]=R,n.directionalShadowMap[_]=Y,n.directionalShadowMatrix[_]=C.shadow.matrix,S++}n.directional[_]=H,_++}else if(C.isSpotLight){let H=t.get(C);H.position.setFromMatrixPosition(C.matrixWorld),H.color.copy(B).multiplyScalar(J*M),H.distance=O,H.coneCos=Math.cos(C.angle),H.penumbraCos=Math.cos(C.angle*(1-C.penumbra)),H.decay=C.decay,n.spot[p]=H;let U=C.shadow;if(C.map&&(n.spotLightMap[T]=C.map,T++,U.updateMatrices(C),C.castShadow&&w++),n.spotLightMatrix[p]=U.matrix,C.castShadow){let R=e.get(C);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,n.spotShadow[p]=R,n.spotShadowMap[p]=Y,D++}p++}else if(C.isRectAreaLight){let H=t.get(C);H.color.copy(B).multiplyScalar(J),H.halfWidth.set(C.width*.5,0,0),H.halfHeight.set(0,C.height*.5,0),n.rectArea[m]=H,m++}else if(C.isPointLight){let H=t.get(C);if(H.color.copy(C.color).multiplyScalar(C.intensity*M),H.distance=C.distance,H.decay=C.decay,C.castShadow){let U=C.shadow,R=e.get(C);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,R.shadowCameraNear=U.camera.near,R.shadowCameraFar=U.camera.far,n.pointShadow[g]=R,n.pointShadowMap[g]=Y,n.pointShadowMatrix[g]=C.shadow.matrix,v++}n.point[g]=H,g++}else if(C.isHemisphereLight){let H=t.get(C);H.skyColor.copy(C.color).multiplyScalar(J*M),H.groundColor.copy(C.groundColor).multiplyScalar(J*M),n.hemi[b]=H,b++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ct.LTC_FLOAT_1,n.rectAreaLTC2=Ct.LTC_FLOAT_2):(n.rectAreaLTC1=Ct.LTC_HALF_1,n.rectAreaLTC2=Ct.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=f,n.ambient[2]=u;let y=n.hash;(y.directionalLength!==_||y.pointLength!==g||y.spotLength!==p||y.rectAreaLength!==m||y.hemiLength!==b||y.numDirectionalShadows!==S||y.numPointShadows!==v||y.numSpotShadows!==D||y.numSpotMaps!==T||y.numLightProbes!==I)&&(n.directional.length=_,n.spot.length=p,n.rectArea.length=m,n.point.length=g,n.hemi.length=b,n.directionalShadow.length=S,n.directionalShadowMap.length=S,n.pointShadow.length=v,n.pointShadowMap.length=v,n.spotShadow.length=D,n.spotShadowMap.length=D,n.directionalShadowMatrix.length=S,n.pointShadowMatrix.length=v,n.spotLightMatrix.length=D+T-w,n.spotLightMap.length=T,n.numSpotLightShadowsWithMaps=w,n.numLightProbes=I,y.directionalLength=_,y.pointLength=g,y.spotLength=p,y.rectAreaLength=m,y.hemiLength=b,y.numDirectionalShadows=S,y.numPointShadows=v,y.numSpotShadows=D,y.numSpotMaps=T,y.numLightProbes=I,n.version=Vw++)}function l(c,h){let d=0,f=0,u=0,_=0,g=0,p=h.matrixWorldInverse;for(let m=0,b=c.length;m<b;m++){let S=c[m];if(S.isDirectionalLight){let v=n.directional[d];v.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),v.direction.sub(i),v.direction.transformDirection(p),d++}else if(S.isSpotLight){let v=n.spot[u];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),v.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),v.direction.sub(i),v.direction.transformDirection(p),u++}else if(S.isRectAreaLight){let v=n.rectArea[_];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),o.identity(),s.copy(S.matrixWorld),s.premultiply(p),o.extractRotation(s),v.halfWidth.set(S.width*.5,0,0),v.halfHeight.set(0,S.height*.5,0),v.halfWidth.applyMatrix4(o),v.halfHeight.applyMatrix4(o),_++}else if(S.isPointLight){let v=n.point[f];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),f++}else if(S.isHemisphereLight){let v=n.hemi[g];v.direction.setFromMatrixPosition(S.matrixWorld),v.direction.transformDirection(p),g++}}}return{setup:a,setupView:l,state:n}}function Yg(r){let t=new Gw(r),e=[],n=[];function i(h){c.camera=h,e.length=0,n.length=0}function s(h){e.push(h)}function o(h){n.push(h)}function a(h){t.setup(e,h)}function l(h){t.setupView(e,h)}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 Ww(r){let t=new WeakMap;function e(i,s=0){let o=t.get(i),a;return o===void 0?(a=new Yg(r),t.set(i,[a])):s>=o.length?(a=new Yg(r),o.push(a)):a=o[s],a}function n(){t=new WeakMap}return{get:e,dispose:n}}var df=class extends Ts{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=jy,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}},pf=class extends Ts{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}},Xw=`void main() {
|
|
3767
|
+
Program Info Log: `+I+`
|
|
3768
|
+
`+G+`
|
|
3769
|
+
`+B)}else I!==""?console.warn("THREE.WebGLProgram: Program Info Log:",I):(D===""||O==="")&&(H=!1);H&&(L.diagnostics={runnable:X,programLog:I,vertexShader:{log:D,prefix:p},fragmentShader:{log:O,prefix:m}})}i.deleteShader(C),i.deleteShader(T),P=new Eo(i,g),M=Mw(i,g)}let P;this.getUniforms=function(){return P===void 0&&w(this),P};let M;this.getAttributes=function(){return M===void 0&&w(this),M};let y=e.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return y===!1&&(y=i.getProgramParameter(g,pw)),y},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(g),this.program=void 0},this.type=e.shaderType,this.name=e.shaderName,this.id=mw++,this.cacheKey=t,this.usedTimes=1,this.program=g,this.vertexShader=C,this.fragmentShader=T,this}var Fw=0,hf=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 ff(t),e.set(t,n)),n}},ff=class{constructor(t){this.id=Fw++,this.code=t,this.usedTimes=0}};function Nw(r,t,e,n,i,s,o){let a=new gc,l=new hf,c=new Set,h=[],d=i.logarithmicDepthBuffer,f=i.vertexTextures,u=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(M){return c.add(M),M===0?"uv":`uv${M}`}function p(M,y,L,I,D){let O=I.fog,X=D.geometry,H=M.isMeshStandardMaterial?I.environment:null,G=(M.isMeshStandardMaterial?e:t).get(M.envMap||H),B=G&&G.mapping===Ic?G.image.height:null,U=_[M.type];M.precision!==null&&(u=i.getMaxPrecision(M.precision),u!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",u,"instead."));let R=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,at=R!==void 0?R.length:0,_t=0;X.morphAttributes.position!==void 0&&(_t=1),X.morphAttributes.normal!==void 0&&(_t=2),X.morphAttributes.color!==void 0&&(_t=3);let Ut,q,ot,xt;if(U){let rt=Ii[U];Ut=rt.vertexShader,q=rt.fragmentShader}else Ut=M.vertexShader,q=M.fragmentShader,l.update(M),ot=l.getVertexShaderID(M),xt=l.getFragmentShaderID(M);let ct=r.getRenderTarget(),Rt=D.isInstancedMesh===!0,kt=D.isBatchedMesh===!0,J=!!M.map,$t=!!M.matcap,It=!!G,Ft=!!M.aoMap,bt=!!M.lightMap,Et=!!M.bumpMap,Ht=!!M.normalMap,Y=!!M.displacementMap,Kt=!!M.emissiveMap,A=!!M.metalnessMap,x=!!M.roughnessMap,N=M.anisotropy>0,Z=M.clearcoat>0,tt=M.dispersion>0,it=M.iridescence>0,vt=M.sheen>0,pt=M.transmission>0,lt=N&&!!M.anisotropyMap,Lt=Z&&!!M.clearcoatMap,ht=Z&&!!M.clearcoatNormalMap,yt=Z&&!!M.clearcoatRoughnessMap,qt=it&&!!M.iridescenceMap,ut=it&&!!M.iridescenceThicknessMap,Tt=vt&&!!M.sheenColorMap,Wt=vt&&!!M.sheenRoughnessMap,Zt=!!M.specularMap,ue=!!M.specularColorMap,Jt=!!M.specularIntensityMap,V=pt&&!!M.transmissionMap,Q=pt&&!!M.thicknessMap,st=!!M.gradientMap,mt=!!M.alphaMap,gt=M.alphaTest>0,Bt=!!M.alphaHash,ee=!!M.extensions,Mt=Pr;M.toneMapped&&(ct===null||ct.isXRRenderTarget===!0)&&(Mt=r.toneMapping);let F={shaderID:U,shaderType:M.type,shaderName:M.name,vertexShader:Ut,fragmentShader:q,defines:M.defines,customVertexShaderID:ot,customFragmentShaderID:xt,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:u,batching:kt,instancing:Rt,instancingColor:Rt&&D.instanceColor!==null,instancingMorph:Rt&&D.morphTexture!==null,supportsVertexTextures:f,outputColorSpace:ct===null?r.outputColorSpace:ct.isXRRenderTarget===!0?ct.texture.colorSpace:Ur,alphaToCoverage:!!M.alphaToCoverage,map:J,matcap:$t,envMap:It,envMapMode:It&&G.mapping,envMapCubeUVHeight:B,aoMap:Ft,lightMap:bt,bumpMap:Et,normalMap:Ht,displacementMap:f&&Y,emissiveMap:Kt,normalMapObjectSpace:Ht&&M.normalMapType===ev,normalMapTangentSpace:Ht&&M.normalMapType===tv,metalnessMap:A,roughnessMap:x,anisotropy:N,anisotropyMap:lt,clearcoat:Z,clearcoatMap:Lt,clearcoatNormalMap:ht,clearcoatRoughnessMap:yt,dispersion:tt,iridescence:it,iridescenceMap:qt,iridescenceThicknessMap:ut,sheen:vt,sheenColorMap:Tt,sheenRoughnessMap:Wt,specularMap:Zt,specularColorMap:ue,specularIntensityMap:Jt,transmission:pt,transmissionMap:V,thicknessMap:Q,gradientMap:st,opaque:M.transparent===!1&&M.blending===Rr&&M.alphaToCoverage===!1,alphaMap:mt,alphaTest:gt,alphaHash:Bt,combine:M.combine,mapUv:J&&g(M.map.channel),aoMapUv:Ft&&g(M.aoMap.channel),lightMapUv:bt&&g(M.lightMap.channel),bumpMapUv:Et&&g(M.bumpMap.channel),normalMapUv:Ht&&g(M.normalMap.channel),displacementMapUv:Y&&g(M.displacementMap.channel),emissiveMapUv:Kt&&g(M.emissiveMap.channel),metalnessMapUv:A&&g(M.metalnessMap.channel),roughnessMapUv:x&&g(M.roughnessMap.channel),anisotropyMapUv:lt&&g(M.anisotropyMap.channel),clearcoatMapUv:Lt&&g(M.clearcoatMap.channel),clearcoatNormalMapUv:ht&&g(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:yt&&g(M.clearcoatRoughnessMap.channel),iridescenceMapUv:qt&&g(M.iridescenceMap.channel),iridescenceThicknessMapUv:ut&&g(M.iridescenceThicknessMap.channel),sheenColorMapUv:Tt&&g(M.sheenColorMap.channel),sheenRoughnessMapUv:Wt&&g(M.sheenRoughnessMap.channel),specularMapUv:Zt&&g(M.specularMap.channel),specularColorMapUv:ue&&g(M.specularColorMap.channel),specularIntensityMapUv:Jt&&g(M.specularIntensityMap.channel),transmissionMapUv:V&&g(M.transmissionMap.channel),thicknessMapUv:Q&&g(M.thicknessMap.channel),alphaMapUv:mt&&g(M.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(Ht||N),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,pointsUvs:D.isPoints===!0&&!!X.attributes.uv&&(J||mt),fog:!!O,useFog:M.fog===!0,fogExp2:!!O&&O.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:D.isSkinnedMesh===!0,morphTargets:X.morphAttributes.position!==void 0,morphNormals:X.morphAttributes.normal!==void 0,morphColors:X.morphAttributes.color!==void 0,morphTargetsCount:at,morphTextureStride:_t,numDirLights:y.directional.length,numPointLights:y.point.length,numSpotLights:y.spot.length,numSpotLightMaps:y.spotLightMap.length,numRectAreaLights:y.rectArea.length,numHemiLights:y.hemi.length,numDirLightShadows:y.directionalShadowMap.length,numPointLightShadows:y.pointShadowMap.length,numSpotLightShadows:y.spotShadowMap.length,numSpotLightShadowsWithMaps:y.numSpotLightShadowsWithMaps,numLightProbes:y.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:r.shadowMap.enabled&&L.length>0,shadowMapType:r.shadowMap.type,toneMapping:Mt,useLegacyLights:r._useLegacyLights,decodeVideoTexture:J&&M.map.isVideoTexture===!0&&Se.getTransfer(M.map.colorSpace)===Te,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Qi,flipSided:M.side===Fn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:ee&&M.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:ee&&M.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return F.vertexUv1s=c.has(1),F.vertexUv2s=c.has(2),F.vertexUv3s=c.has(3),c.clear(),F}function m(M){let y=[];if(M.shaderID?y.push(M.shaderID):(y.push(M.customVertexShaderID),y.push(M.customFragmentShaderID)),M.defines!==void 0)for(let L in M.defines)y.push(L),y.push(M.defines[L]);return M.isRawShaderMaterial===!1&&(b(y,M),S(y,M),y.push(r.outputColorSpace)),y.push(M.customProgramCacheKey),y.join()}function b(M,y){M.push(y.precision),M.push(y.outputColorSpace),M.push(y.envMapMode),M.push(y.envMapCubeUVHeight),M.push(y.mapUv),M.push(y.alphaMapUv),M.push(y.lightMapUv),M.push(y.aoMapUv),M.push(y.bumpMapUv),M.push(y.normalMapUv),M.push(y.displacementMapUv),M.push(y.emissiveMapUv),M.push(y.metalnessMapUv),M.push(y.roughnessMapUv),M.push(y.anisotropyMapUv),M.push(y.clearcoatMapUv),M.push(y.clearcoatNormalMapUv),M.push(y.clearcoatRoughnessMapUv),M.push(y.iridescenceMapUv),M.push(y.iridescenceThicknessMapUv),M.push(y.sheenColorMapUv),M.push(y.sheenRoughnessMapUv),M.push(y.specularMapUv),M.push(y.specularColorMapUv),M.push(y.specularIntensityMapUv),M.push(y.transmissionMapUv),M.push(y.thicknessMapUv),M.push(y.combine),M.push(y.fogExp2),M.push(y.sizeAttenuation),M.push(y.morphTargetsCount),M.push(y.morphAttributeCount),M.push(y.numDirLights),M.push(y.numPointLights),M.push(y.numSpotLights),M.push(y.numSpotLightMaps),M.push(y.numHemiLights),M.push(y.numRectAreaLights),M.push(y.numDirLightShadows),M.push(y.numPointLightShadows),M.push(y.numSpotLightShadows),M.push(y.numSpotLightShadowsWithMaps),M.push(y.numLightProbes),M.push(y.shadowMapType),M.push(y.toneMapping),M.push(y.numClippingPlanes),M.push(y.numClipIntersection),M.push(y.depthPacking)}function S(M,y){a.disableAll(),y.supportsVertexTextures&&a.enable(0),y.instancing&&a.enable(1),y.instancingColor&&a.enable(2),y.instancingMorph&&a.enable(3),y.matcap&&a.enable(4),y.envMap&&a.enable(5),y.normalMapObjectSpace&&a.enable(6),y.normalMapTangentSpace&&a.enable(7),y.clearcoat&&a.enable(8),y.iridescence&&a.enable(9),y.alphaTest&&a.enable(10),y.vertexColors&&a.enable(11),y.vertexAlphas&&a.enable(12),y.vertexUv1s&&a.enable(13),y.vertexUv2s&&a.enable(14),y.vertexUv3s&&a.enable(15),y.vertexTangents&&a.enable(16),y.anisotropy&&a.enable(17),y.alphaHash&&a.enable(18),y.batching&&a.enable(19),y.dispersion&&a.enable(20),M.push(a.mask),a.disableAll(),y.fog&&a.enable(0),y.useFog&&a.enable(1),y.flatShading&&a.enable(2),y.logarithmicDepthBuffer&&a.enable(3),y.skinning&&a.enable(4),y.morphTargets&&a.enable(5),y.morphNormals&&a.enable(6),y.morphColors&&a.enable(7),y.premultipliedAlpha&&a.enable(8),y.shadowMapEnabled&&a.enable(9),y.useLegacyLights&&a.enable(10),y.doubleSided&&a.enable(11),y.flipSided&&a.enable(12),y.useDepthPacking&&a.enable(13),y.dithering&&a.enable(14),y.transmission&&a.enable(15),y.sheen&&a.enable(16),y.opaque&&a.enable(17),y.pointsUvs&&a.enable(18),y.decodeVideoTexture&&a.enable(19),y.alphaToCoverage&&a.enable(20),M.push(a.mask)}function v(M){let y=_[M.type],L;if(y){let I=Ii[y];L=Tv.clone(I.uniforms)}else L=M.uniforms;return L}function C(M,y){let L;for(let I=0,D=h.length;I<D;I++){let O=h[I];if(O.cacheKey===y){L=O,++L.usedTimes;break}}return L===void 0&&(L=new Lw(r,y,M,s),h.push(L)),L}function T(M){if(--M.usedTimes===0){let y=h.indexOf(M);h[y]=h[h.length-1],h.pop(),M.destroy()}}function w(M){l.remove(M)}function P(){l.dispose()}return{getParameters:p,getProgramCacheKey:m,getUniforms:v,acquireProgram:C,releaseProgram:T,releaseShaderCache:w,programs:h,dispose:P}}function Uw(){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 Ow(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 Wg(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 Xg(){let r=[],t=0,e=[],n=[],i=[];function s(){t=0,e.length=0,n.length=0,i.length=0}function o(d,f,u,_,g,p){let m=r[t];return m===void 0?(m={id:d.id,object:d,geometry:f,material:u,groupOrder:_,renderOrder:d.renderOrder,z:g,group:p},r[t]=m):(m.id=d.id,m.object=d,m.geometry=f,m.material=u,m.groupOrder=_,m.renderOrder=d.renderOrder,m.z=g,m.group=p),t++,m}function a(d,f,u,_,g,p){let m=o(d,f,u,_,g,p);u.transmission>0?n.push(m):u.transparent===!0?i.push(m):e.push(m)}function l(d,f,u,_,g,p){let m=o(d,f,u,_,g,p);u.transmission>0?n.unshift(m):u.transparent===!0?i.unshift(m):e.unshift(m)}function c(d,f){e.length>1&&e.sort(d||Ow),n.length>1&&n.sort(f||Wg),i.length>1&&i.sort(f||Wg)}function h(){for(let d=t,f=r.length;d<f;d++){let u=r[d];if(u.id===null)break;u.id=null,u.object=null,u.geometry=null,u.material=null,u.group=null}}return{opaque:e,transmissive:n,transparent:i,init:s,push:a,unshift:l,finish:h,sort:c}}function Bw(){let r=new WeakMap;function t(n,i){let s=r.get(n),o;return s===void 0?(o=new Xg,r.set(n,[o])):i>=s.length?(o=new Xg,s.push(o)):o=s[i],o}function e(){r=new WeakMap}return{get:t,dispose:e}}function kw(){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 nt,color:new ge};break;case"SpotLight":e={position:new nt,direction:new nt,color:new ge,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new nt,color:new ge,distance:0,decay:0};break;case"HemisphereLight":e={direction:new nt,skyColor:new ge,groundColor:new ge};break;case"RectAreaLight":e={color:new ge,position:new nt,halfWidth:new nt,halfHeight:new nt};break}return r[t.id]=e,e}}}function zw(){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 _e};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new _e,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[t.id]=e,e}}}var Vw=0;function Hw(r,t){return(t.castShadow?2:0)-(r.castShadow?2:0)+(t.map?1:0)-(r.map?1:0)}function Gw(r){let t=new kw,e=zw(),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 nt);let i=new nt,s=new Ue,o=new Ue;function a(c,h){let d=0,f=0,u=0;for(let L=0;L<9;L++)n.probe[L].set(0,0,0);let _=0,g=0,p=0,m=0,b=0,S=0,v=0,C=0,T=0,w=0,P=0;c.sort(Hw);let M=h===!0?Math.PI:1;for(let L=0,I=c.length;L<I;L++){let D=c[L],O=D.color,X=D.intensity,H=D.distance,G=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)d+=O.r*X*M,f+=O.g*X*M,u+=O.b*X*M;else if(D.isLightProbe){for(let B=0;B<9;B++)n.probe[B].addScaledVector(D.sh.coefficients[B],X);P++}else if(D.isDirectionalLight){let B=t.get(D);if(B.color.copy(D.color).multiplyScalar(D.intensity*M),D.castShadow){let U=D.shadow,R=e.get(D);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,n.directionalShadow[_]=R,n.directionalShadowMap[_]=G,n.directionalShadowMatrix[_]=D.shadow.matrix,S++}n.directional[_]=B,_++}else if(D.isSpotLight){let B=t.get(D);B.position.setFromMatrixPosition(D.matrixWorld),B.color.copy(O).multiplyScalar(X*M),B.distance=H,B.coneCos=Math.cos(D.angle),B.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),B.decay=D.decay,n.spot[p]=B;let U=D.shadow;if(D.map&&(n.spotLightMap[T]=D.map,T++,U.updateMatrices(D),D.castShadow&&w++),n.spotLightMatrix[p]=U.matrix,D.castShadow){let R=e.get(D);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,n.spotShadow[p]=R,n.spotShadowMap[p]=G,C++}p++}else if(D.isRectAreaLight){let B=t.get(D);B.color.copy(O).multiplyScalar(X),B.halfWidth.set(D.width*.5,0,0),B.halfHeight.set(0,D.height*.5,0),n.rectArea[m]=B,m++}else if(D.isPointLight){let B=t.get(D);if(B.color.copy(D.color).multiplyScalar(D.intensity*M),B.distance=D.distance,B.decay=D.decay,D.castShadow){let U=D.shadow,R=e.get(D);R.shadowBias=U.bias,R.shadowNormalBias=U.normalBias,R.shadowRadius=U.radius,R.shadowMapSize=U.mapSize,R.shadowCameraNear=U.camera.near,R.shadowCameraFar=U.camera.far,n.pointShadow[g]=R,n.pointShadowMap[g]=G,n.pointShadowMatrix[g]=D.shadow.matrix,v++}n.point[g]=B,g++}else if(D.isHemisphereLight){let B=t.get(D);B.skyColor.copy(D.color).multiplyScalar(X*M),B.groundColor.copy(D.groundColor).multiplyScalar(X*M),n.hemi[b]=B,b++}}m>0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ct.LTC_FLOAT_1,n.rectAreaLTC2=Ct.LTC_FLOAT_2):(n.rectAreaLTC1=Ct.LTC_HALF_1,n.rectAreaLTC2=Ct.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=f,n.ambient[2]=u;let y=n.hash;(y.directionalLength!==_||y.pointLength!==g||y.spotLength!==p||y.rectAreaLength!==m||y.hemiLength!==b||y.numDirectionalShadows!==S||y.numPointShadows!==v||y.numSpotShadows!==C||y.numSpotMaps!==T||y.numLightProbes!==P)&&(n.directional.length=_,n.spot.length=p,n.rectArea.length=m,n.point.length=g,n.hemi.length=b,n.directionalShadow.length=S,n.directionalShadowMap.length=S,n.pointShadow.length=v,n.pointShadowMap.length=v,n.spotShadow.length=C,n.spotShadowMap.length=C,n.directionalShadowMatrix.length=S,n.pointShadowMatrix.length=v,n.spotLightMatrix.length=C+T-w,n.spotLightMap.length=T,n.numSpotLightShadowsWithMaps=w,n.numLightProbes=P,y.directionalLength=_,y.pointLength=g,y.spotLength=p,y.rectAreaLength=m,y.hemiLength=b,y.numDirectionalShadows=S,y.numPointShadows=v,y.numSpotShadows=C,y.numSpotMaps=T,y.numLightProbes=P,n.version=Vw++)}function l(c,h){let d=0,f=0,u=0,_=0,g=0,p=h.matrixWorldInverse;for(let m=0,b=c.length;m<b;m++){let S=c[m];if(S.isDirectionalLight){let v=n.directional[d];v.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),v.direction.sub(i),v.direction.transformDirection(p),d++}else if(S.isSpotLight){let v=n.spot[u];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),v.direction.setFromMatrixPosition(S.matrixWorld),i.setFromMatrixPosition(S.target.matrixWorld),v.direction.sub(i),v.direction.transformDirection(p),u++}else if(S.isRectAreaLight){let v=n.rectArea[_];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),o.identity(),s.copy(S.matrixWorld),s.premultiply(p),o.extractRotation(s),v.halfWidth.set(S.width*.5,0,0),v.halfHeight.set(0,S.height*.5,0),v.halfWidth.applyMatrix4(o),v.halfHeight.applyMatrix4(o),_++}else if(S.isPointLight){let v=n.point[f];v.position.setFromMatrixPosition(S.matrixWorld),v.position.applyMatrix4(p),f++}else if(S.isHemisphereLight){let v=n.hemi[g];v.direction.setFromMatrixPosition(S.matrixWorld),v.direction.transformDirection(p),g++}}}return{setup:a,setupView:l,state:n}}function Yg(r){let t=new Gw(r),e=[],n=[];function i(h){c.camera=h,e.length=0,n.length=0}function s(h){e.push(h)}function o(h){n.push(h)}function a(h){t.setup(e,h)}function l(h){t.setupView(e,h)}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 Ww(r){let t=new WeakMap;function e(i,s=0){let o=t.get(i),a;return o===void 0?(a=new Yg(r),t.set(i,[a])):s>=o.length?(a=new Yg(r),o.push(a)):a=o[s],a}function n(){t=new WeakMap}return{get:e,dispose:n}}var df=class extends Ts{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=jy,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}},pf=class extends Ts{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}},Xw=`void main() {
|
|
3770
3770
|
gl_Position = vec4( position, 1.0 );
|
|
3771
3771
|
}`,Yw=`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 qw(r,t,e){let n=new Da,i=new _e,s=new _e,o=new je,a=new df({depthPacking:Qy}),l=new pf,c={},h=e.maxTextureSize,d={[Ir]:Fn,[Fn]:Ir,[Qi]:Qi},f=new ii({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new _e},radius:{value:4}},vertexShader:Xw,fragmentShader:Yw}),u=f.clone();u.defines.HORIZONTAL_PASS=1;let _=new Fi;_.setAttribute("position",new ti(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new mi(_,f),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Kg;let m=this.type;this.render=function(T,w,I){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||T.length===0)return;let M=r.getRenderTarget(),y=r.getActiveCubeFace(),P=r.getActiveMipmapLevel(),L=r.state;L.setBlending(Cr),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);let C=m!==Ki&&this.type===Ki,B=m===Ki&&this.type!==Ki;for(let J=0,O=T.length;J<O;J++){let Y=T[J],H=Y.shadow;if(H===void 0){console.warn("THREE.WebGLShadowMap:",Y,"has no shadow.");continue}if(H.autoUpdate===!1&&H.needsUpdate===!1)continue;i.copy(H.mapSize);let U=H.getFrameExtents();if(i.multiply(U),s.copy(H.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/U.x),i.x=s.x*U.x,H.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/U.y),i.y=s.y*U.y,H.mapSize.y=s.y)),H.map===null||C===!0||B===!0){let at=this.type!==Ki?{minFilter:Qn,magFilter:Qn}:{};H.map!==null&&H.map.dispose(),H.map=new er(i.x,i.y,at),H.map.texture.name=Y.name+".shadowMap",H.camera.updateProjectionMatrix()}r.setRenderTarget(H.map),r.clear();let R=H.getViewportCount();for(let at=0;at<R;at++){let _t=H.getViewport(at);o.set(s.x*_t.x,s.y*_t.y,s.x*_t.z,s.y*_t.w),L.viewport(o),H.updateMatrices(Y,at),n=H.getFrustum(),v(w,I,H.camera,Y,this.type)}H.isPointLightShadow!==!0&&this.type===Ki&&b(H,I),H.needsUpdate=!1}m=this.type,p.needsUpdate=!1,r.setRenderTarget(M,y,P)};function b(T,w){let I=t.update(g);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,u.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,u.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new er(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(w,null,I,f,g,null),u.uniforms.shadow_pass.value=T.mapPass.texture,u.uniforms.resolution.value=T.mapSize,u.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(w,null,I,u,g,null)}function S(T,w,I,M){let y=null,P=I.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(P!==void 0)y=P;else if(y=I.isPointLight===!0?l:a,r.localClippingEnabled&&w.clipShadows===!0&&Array.isArray(w.clippingPlanes)&&w.clippingPlanes.length!==0||w.displacementMap&&w.displacementScale!==0||w.alphaMap&&w.alphaTest>0||w.map&&w.alphaTest>0){let L=y.uuid,C=w.uuid,B=c[L];B===void 0&&(B={},c[L]=B);let J=B[C];J===void 0&&(J=y.clone(),B[C]=J,w.addEventListener("dispose",D)),y=J}if(y.visible=w.visible,y.wireframe=w.wireframe,M===Ki?y.side=w.shadowSide!==null?w.shadowSide:w.side:y.side=w.shadowSide!==null?w.shadowSide:d[w.side],y.alphaMap=w.alphaMap,y.alphaTest=w.alphaTest,y.map=w.map,y.clipShadows=w.clipShadows,y.clippingPlanes=w.clippingPlanes,y.clipIntersection=w.clipIntersection,y.displacementMap=w.displacementMap,y.displacementScale=w.displacementScale,y.displacementBias=w.displacementBias,y.wireframeLinewidth=w.wireframeLinewidth,y.linewidth=w.linewidth,I.isPointLight===!0&&y.isMeshDistanceMaterial===!0){let L=r.properties.get(y);L.light=I}return y}function v(T,w,I,M,y){if(T.visible===!1)return;if(T.layers.test(w.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&y===Ki)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,T.matrixWorld);let C=t.update(T),B=T.material;if(Array.isArray(B)){let J=C.groups;for(let O=0,Y=J.length;O<Y;O++){let H=J[O],U=B[H.materialIndex];if(U&&U.visible){let R=S(T,U,M,y);T.onBeforeShadow(r,T,w,I,C,R,H),r.renderBufferDirect(I,null,C,R,T,H),T.onAfterShadow(r,T,w,I,C,R,H)}}}else if(B.visible){let J=S(T,B,M,y);T.onBeforeShadow(r,T,w,I,C,J,null),r.renderBufferDirect(I,null,C,J,T,null),T.onAfterShadow(r,T,w,I,C,J,null)}}let L=T.children;for(let C=0,B=L.length;C<B;C++)v(L[C],w,I,M,y)}function D(T){T.target.removeEventListener("dispose",D);for(let I in c){let M=c[I],y=T.target.uuid;y in M&&(M[y].dispose(),delete M[y])}}}function Zw(r){function t(){let V=!1,Q=new je,st=null,mt=new je(0,0,0,0);return{setMask:function(gt){st!==gt&&!V&&(r.colorMask(gt,gt,gt,gt),st=gt)},setLocked:function(gt){V=gt},setClear:function(gt,Bt,ee,Mt,F){F===!0&&(gt*=Mt,Bt*=Mt,ee*=Mt),Q.set(gt,Bt,ee,Mt),mt.equals(Q)===!1&&(r.clearColor(gt,Bt,ee,Mt),mt.copy(Q))},reset:function(){V=!1,st=null,mt.set(-1,0,0,0)}}}function e(){let V=!1,Q=null,st=null,mt=null;return{setTest:function(gt){gt?xt(r.DEPTH_TEST):ct(r.DEPTH_TEST)},setMask:function(gt){Q!==gt&&!V&&(r.depthMask(gt),Q=gt)},setFunc:function(gt){if(st!==gt){switch(gt){case Ey:r.depthFunc(r.NEVER);break;case Ty:r.depthFunc(r.ALWAYS);break;case Ay:r.depthFunc(r.LESS);break;case sc:r.depthFunc(r.LEQUAL);break;case Dy:r.depthFunc(r.EQUAL);break;case Cy:r.depthFunc(r.GEQUAL);break;case Ry:r.depthFunc(r.GREATER);break;case Py:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}st=gt}},setLocked:function(gt){V=gt},setClear:function(gt){mt!==gt&&(r.clearDepth(gt),mt=gt)},reset:function(){V=!1,Q=null,st=null,mt=null}}}function n(){let V=!1,Q=null,st=null,mt=null,gt=null,Bt=null,ee=null,Mt=null,F=null;return{setTest:function(rt){V||(rt?xt(r.STENCIL_TEST):ct(r.STENCIL_TEST))},setMask:function(rt){Q!==rt&&!V&&(r.stencilMask(rt),Q=rt)},setFunc:function(rt,k,j){(st!==rt||mt!==k||gt!==j)&&(r.stencilFunc(rt,k,j),st=rt,mt=k,gt=j)},setOp:function(rt,k,j){(Bt!==rt||ee!==k||Mt!==j)&&(r.stencilOp(rt,k,j),Bt=rt,ee=k,Mt=j)},setLocked:function(rt){V=rt},setClear:function(rt){F!==rt&&(r.clearStencil(rt),F=rt)},reset:function(){V=!1,Q=null,st=null,mt=null,gt=null,Bt=null,ee=null,Mt=null,F=null}}}let i=new t,s=new e,o=new n,a=new WeakMap,l=new WeakMap,c={},h={},d=new WeakMap,f=[],u=null,_=!1,g=null,p=null,m=null,b=null,S=null,v=null,D=null,T=new ge(0,0,0),w=0,I=!1,M=null,y=null,P=null,L=null,C=null,B=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS),J=!1,O=0,Y=r.getParameter(r.VERSION);Y.indexOf("WebGL")!==-1?(O=parseFloat(/^WebGL (\d)/.exec(Y)[1]),J=O>=1):Y.indexOf("OpenGL ES")!==-1&&(O=parseFloat(/^OpenGL ES (\d)/.exec(Y)[1]),J=O>=2);let H=null,U={},R=r.getParameter(r.SCISSOR_BOX),at=r.getParameter(r.VIEWPORT),_t=new je().fromArray(R),Ut=new je().fromArray(at);function X(V,Q,st,mt){let gt=new Uint8Array(4),Bt=r.createTexture();r.bindTexture(V,Bt),r.texParameteri(V,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(V,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let ee=0;ee<st;ee++)V===r.TEXTURE_3D||V===r.TEXTURE_2D_ARRAY?r.texImage3D(Q,0,r.RGBA,1,1,mt,0,r.RGBA,r.UNSIGNED_BYTE,gt):r.texImage2D(Q+ee,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,gt);return Bt}let ot={};ot[r.TEXTURE_2D]=X(r.TEXTURE_2D,r.TEXTURE_2D,1),ot[r.TEXTURE_CUBE_MAP]=X(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),ot[r.TEXTURE_2D_ARRAY]=X(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),ot[r.TEXTURE_3D]=X(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),xt(r.DEPTH_TEST),s.setFunc(sc),Et(!1),Ht(Em),xt(r.CULL_FACE),Ft(Cr);function xt(V){c[V]!==!0&&(r.enable(V),c[V]=!0)}function ct(V){c[V]!==!1&&(r.disable(V),c[V]=!1)}function Rt(V,Q){return h[V]!==Q?(r.bindFramebuffer(V,Q),h[V]=Q,V===r.DRAW_FRAMEBUFFER&&(h[r.FRAMEBUFFER]=Q),V===r.FRAMEBUFFER&&(h[r.DRAW_FRAMEBUFFER]=Q),!0):!1}function kt(V,Q){let st=f,mt=!1;if(V){st=d.get(Q),st===void 0&&(st=[],d.set(Q,st));let gt=V.textures;if(st.length!==gt.length||st[0]!==r.COLOR_ATTACHMENT0){for(let Bt=0,ee=gt.length;Bt<ee;Bt++)st[Bt]=r.COLOR_ATTACHMENT0+Bt;st.length=gt.length,mt=!0}}else st[0]!==r.BACK&&(st[0]=r.BACK,mt=!0);mt&&r.drawBuffers(st)}function Z(V){return u!==V?(r.useProgram(V),u=V,!0):!1}let Jt={[Ss]:r.FUNC_ADD,[ly]:r.FUNC_SUBTRACT,[cy]:r.FUNC_REVERSE_SUBTRACT};Jt[uy]=r.MIN,Jt[hy]=r.MAX;let It={[fy]:r.ZERO,[dy]:r.ONE,[py]:r.SRC_COLOR,[Zh]:r.SRC_ALPHA,[vy]:r.SRC_ALPHA_SATURATE,[xy]:r.DST_COLOR,[gy]:r.DST_ALPHA,[my]:r.ONE_MINUS_SRC_COLOR,[Jh]:r.ONE_MINUS_SRC_ALPHA,[yy]:r.ONE_MINUS_DST_COLOR,[_y]:r.ONE_MINUS_DST_ALPHA,[Sy]:r.CONSTANT_COLOR,[My]:r.ONE_MINUS_CONSTANT_COLOR,[by]:r.CONSTANT_ALPHA,[wy]:r.ONE_MINUS_CONSTANT_ALPHA};function Ft(V,Q,st,mt,gt,Bt,ee,Mt,F,rt){if(V===Cr){_===!0&&(ct(r.BLEND),_=!1);return}if(_===!1&&(xt(r.BLEND),_=!0),V!==ay){if(V!==g||rt!==I){if((p!==Ss||S!==Ss)&&(r.blendEquation(r.FUNC_ADD),p=Ss,S=Ss),rt)switch(V){case Rr:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Tm:r.blendFunc(r.ONE,r.ONE);break;case Am:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Dm:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",V);break}else switch(V){case Rr:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Tm:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Am:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Dm:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",V);break}m=null,b=null,v=null,D=null,T.set(0,0,0),w=0,g=V,I=rt}return}gt=gt||Q,Bt=Bt||st,ee=ee||mt,(Q!==p||gt!==S)&&(r.blendEquationSeparate(Jt[Q],Jt[gt]),p=Q,S=gt),(st!==m||mt!==b||Bt!==v||ee!==D)&&(r.blendFuncSeparate(It[st],It[mt],It[Bt],It[ee]),m=st,b=mt,v=Bt,D=ee),(Mt.equals(T)===!1||F!==w)&&(r.blendColor(Mt.r,Mt.g,Mt.b,F),T.copy(Mt),w=F),g=V,I=!1}function bt(V,Q){V.side===Qi?ct(r.CULL_FACE):xt(r.CULL_FACE);let st=V.side===Fn;Q&&(st=!st),Et(st),V.blending===Rr&&V.transparent===!1?Ft(Cr):Ft(V.blending,V.blendEquation,V.blendSrc,V.blendDst,V.blendEquationAlpha,V.blendSrcAlpha,V.blendDstAlpha,V.blendColor,V.blendAlpha,V.premultipliedAlpha),s.setFunc(V.depthFunc),s.setTest(V.depthTest),s.setMask(V.depthWrite),i.setMask(V.colorWrite);let mt=V.stencilWrite;o.setTest(mt),mt&&(o.setMask(V.stencilWriteMask),o.setFunc(V.stencilFunc,V.stencilRef,V.stencilFuncMask),o.setOp(V.stencilFail,V.stencilZFail,V.stencilZPass)),$t(V.polygonOffset,V.polygonOffsetFactor,V.polygonOffsetUnits),V.alphaToCoverage===!0?xt(r.SAMPLE_ALPHA_TO_COVERAGE):ct(r.SAMPLE_ALPHA_TO_COVERAGE)}function Et(V){M!==V&&(V?r.frontFace(r.CW):r.frontFace(r.CCW),M=V)}function Ht(V){V!==sy?(xt(r.CULL_FACE),V!==y&&(V===Em?r.cullFace(r.BACK):V===oy?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):ct(r.CULL_FACE),y=V}function W(V){V!==P&&(J&&r.lineWidth(V),P=V)}function $t(V,Q,st){V?(xt(r.POLYGON_OFFSET_FILL),(L!==Q||C!==st)&&(r.polygonOffset(Q,st),L=Q,C=st)):ct(r.POLYGON_OFFSET_FILL)}function A(V){V?xt(r.SCISSOR_TEST):ct(r.SCISSOR_TEST)}function x(V){V===void 0&&(V=r.TEXTURE0+B-1),H!==V&&(r.activeTexture(V),H=V)}function N(V,Q,st){st===void 0&&(H===null?st=r.TEXTURE0+B-1:st=H);let mt=U[st];mt===void 0&&(mt={type:void 0,texture:void 0},U[st]=mt),(mt.type!==V||mt.texture!==Q)&&(H!==st&&(r.activeTexture(st),H=st),r.bindTexture(V,Q||ot[V]),mt.type=V,mt.texture=Q)}function q(){let V=U[H];V!==void 0&&V.type!==void 0&&(r.bindTexture(V.type,null),V.type=void 0,V.texture=void 0)}function tt(){try{r.compressedTexImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function it(){try{r.compressedTexImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function vt(){try{r.texSubImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function pt(){try{r.texSubImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function lt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function Lt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function ht(){try{r.texStorage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function yt(){try{r.texStorage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function Yt(){try{r.texImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function ut(){try{r.texImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function Tt(V){_t.equals(V)===!1&&(r.scissor(V.x,V.y,V.z,V.w),_t.copy(V))}function Wt(V){Ut.equals(V)===!1&&(r.viewport(V.x,V.y,V.z,V.w),Ut.copy(V))}function qt(V,Q){let st=l.get(Q);st===void 0&&(st=new WeakMap,l.set(Q,st));let mt=st.get(V);mt===void 0&&(mt=r.getUniformBlockIndex(Q,V.name),st.set(V,mt))}function ue(V,Q){let mt=l.get(Q).get(V);a.get(Q)!==mt&&(r.uniformBlockBinding(Q,mt,V.__bindingPointIndex),a.set(Q,mt))}function Zt(){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={},H=null,U={},h={},d=new WeakMap,f=[],u=null,_=!1,g=null,p=null,m=null,b=null,S=null,v=null,D=null,T=new ge(0,0,0),w=0,I=!1,M=null,y=null,P=null,L=null,C=null,_t.set(0,0,r.canvas.width,r.canvas.height),Ut.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:xt,disable:ct,bindFramebuffer:Rt,drawBuffers:kt,useProgram:Z,setBlending:Ft,setMaterial:bt,setFlipSided:Et,setCullFace:Ht,setLineWidth:W,setPolygonOffset:$t,setScissorTest:A,activeTexture:x,bindTexture:N,unbindTexture:q,compressedTexImage2D:tt,compressedTexImage3D:it,texImage2D:Yt,texImage3D:ut,updateUBOMapping:qt,uniformBlockBinding:ue,texStorage2D:ht,texStorage3D:yt,texSubImage2D:vt,texSubImage3D:pt,compressedTexSubImage2D:lt,compressedTexSubImage3D:Lt,scissor:Tt,viewport:Wt,reset:Zt}}function Jw(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 _e,h=new WeakMap,d,f=new WeakMap,u=!1;try{u=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(A,x){return u?new OffscreenCanvas(A,x):fc("canvas")}function g(A,x,N){let q=1,tt=$t(A);if((tt.width>N||tt.height>N)&&(q=N/Math.max(tt.width,tt.height)),q<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){let it=Math.floor(q*tt.width),vt=Math.floor(q*tt.height);d===void 0&&(d=_(it,vt));let pt=x?_(it,vt):d;return pt.width=it,pt.height=vt,pt.getContext("2d").drawImage(A,0,0,it,vt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+tt.width+"x"+tt.height+") to ("+it+"x"+vt+")."),pt}else return"data"in A&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+tt.width+"x"+tt.height+")."),A;return A}function p(A){return A.generateMipmaps&&A.minFilter!==Qn&&A.minFilter!==pi}function m(A){r.generateMipmap(A)}function b(A,x,N,q,tt=!1){if(A!==null){if(r[A]!==void 0)return r[A];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let it=x;if(x===r.RED&&(N===r.FLOAT&&(it=r.R32F),N===r.HALF_FLOAT&&(it=r.R16F),N===r.UNSIGNED_BYTE&&(it=r.R8)),x===r.RED_INTEGER&&(N===r.UNSIGNED_BYTE&&(it=r.R8UI),N===r.UNSIGNED_SHORT&&(it=r.R16UI),N===r.UNSIGNED_INT&&(it=r.R32UI),N===r.BYTE&&(it=r.R8I),N===r.SHORT&&(it=r.R16I),N===r.INT&&(it=r.R32I)),x===r.RG&&(N===r.FLOAT&&(it=r.RG32F),N===r.HALF_FLOAT&&(it=r.RG16F),N===r.UNSIGNED_BYTE&&(it=r.RG8)),x===r.RG_INTEGER&&(N===r.UNSIGNED_BYTE&&(it=r.RG8UI),N===r.UNSIGNED_SHORT&&(it=r.RG16UI),N===r.UNSIGNED_INT&&(it=r.RG32UI),N===r.BYTE&&(it=r.RG8I),N===r.SHORT&&(it=r.RG16I),N===r.INT&&(it=r.RG32I)),x===r.RGB&&N===r.UNSIGNED_INT_5_9_9_9_REV&&(it=r.RGB9_E5),x===r.RGBA){let vt=tt?lc:Se.getTransfer(q);N===r.FLOAT&&(it=r.RGBA32F),N===r.HALF_FLOAT&&(it=r.RGBA16F),N===r.UNSIGNED_BYTE&&(it=vt===Te?r.SRGB8_ALPHA8:r.RGBA8),N===r.UNSIGNED_SHORT_4_4_4_4&&(it=r.RGBA4),N===r.UNSIGNED_SHORT_5_5_5_1&&(it=r.RGB5_A1)}return(it===r.R16F||it===r.R32F||it===r.RG16F||it===r.RG32F||it===r.RGBA16F||it===r.RGBA32F)&&t.get("EXT_color_buffer_float"),it}function S(A,x){return p(A)===!0||A.isFramebufferTexture&&A.minFilter!==Qn&&A.minFilter!==pi?Math.log2(Math.max(x.width,x.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?x.mipmaps.length:1}function v(A){let x=A.target;x.removeEventListener("dispose",v),T(x),x.isVideoTexture&&h.delete(x)}function D(A){let x=A.target;x.removeEventListener("dispose",D),I(x)}function T(A){let x=n.get(A);if(x.__webglInit===void 0)return;let N=A.source,q=f.get(N);if(q){let tt=q[x.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&w(A),Object.keys(q).length===0&&f.delete(N)}n.remove(A)}function w(A){let x=n.get(A);r.deleteTexture(x.__webglTexture);let N=A.source,q=f.get(N);delete q[x.__cacheKey],o.memory.textures--}function I(A){let x=n.get(A);if(A.depthTexture&&A.depthTexture.dispose(),A.isWebGLCubeRenderTarget)for(let q=0;q<6;q++){if(Array.isArray(x.__webglFramebuffer[q]))for(let tt=0;tt<x.__webglFramebuffer[q].length;tt++)r.deleteFramebuffer(x.__webglFramebuffer[q][tt]);else r.deleteFramebuffer(x.__webglFramebuffer[q]);x.__webglDepthbuffer&&r.deleteRenderbuffer(x.__webglDepthbuffer[q])}else{if(Array.isArray(x.__webglFramebuffer))for(let q=0;q<x.__webglFramebuffer.length;q++)r.deleteFramebuffer(x.__webglFramebuffer[q]);else r.deleteFramebuffer(x.__webglFramebuffer);if(x.__webglDepthbuffer&&r.deleteRenderbuffer(x.__webglDepthbuffer),x.__webglMultisampledFramebuffer&&r.deleteFramebuffer(x.__webglMultisampledFramebuffer),x.__webglColorRenderbuffer)for(let q=0;q<x.__webglColorRenderbuffer.length;q++)x.__webglColorRenderbuffer[q]&&r.deleteRenderbuffer(x.__webglColorRenderbuffer[q]);x.__webglDepthRenderbuffer&&r.deleteRenderbuffer(x.__webglDepthRenderbuffer)}let N=A.textures;for(let q=0,tt=N.length;q<tt;q++){let it=n.get(N[q]);it.__webglTexture&&(r.deleteTexture(it.__webglTexture),o.memory.textures--),n.remove(N[q])}n.remove(A)}let M=0;function y(){M=0}function P(){let A=M;return A>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+i.maxTextures),M+=1,A}function L(A){let x=[];return x.push(A.wrapS),x.push(A.wrapT),x.push(A.wrapR||0),x.push(A.magFilter),x.push(A.minFilter),x.push(A.anisotropy),x.push(A.internalFormat),x.push(A.format),x.push(A.type),x.push(A.generateMipmaps),x.push(A.premultiplyAlpha),x.push(A.flipY),x.push(A.unpackAlignment),x.push(A.colorSpace),x.join()}function C(A,x){let N=n.get(A);if(A.isVideoTexture&&Ht(A),A.isRenderTargetTexture===!1&&A.version>0&&N.__version!==A.version){let q=A.image;if(q===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(q.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{_t(N,A,x);return}}e.bindTexture(r.TEXTURE_2D,N.__webglTexture,r.TEXTURE0+x)}function B(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){_t(N,A,x);return}e.bindTexture(r.TEXTURE_2D_ARRAY,N.__webglTexture,r.TEXTURE0+x)}function J(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){_t(N,A,x);return}e.bindTexture(r.TEXTURE_3D,N.__webglTexture,r.TEXTURE0+x)}function O(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){Ut(N,A,x);return}e.bindTexture(r.TEXTURE_CUBE_MAP,N.__webglTexture,r.TEXTURE0+x)}let Y={[jh]:r.REPEAT,[bs]:r.CLAMP_TO_EDGE,[Qh]:r.MIRRORED_REPEAT},H={[Qn]:r.NEAREST,[Vy]:r.NEAREST_MIPMAP_NEAREST,[Fl]:r.NEAREST_MIPMAP_LINEAR,[pi]:r.LINEAR,[ph]:r.LINEAR_MIPMAP_NEAREST,[ws]:r.LINEAR_MIPMAP_LINEAR},U={[nv]:r.NEVER,[lv]:r.ALWAYS,[iv]:r.LESS,[a_]:r.LEQUAL,[rv]:r.EQUAL,[av]:r.GEQUAL,[sv]:r.GREATER,[ov]:r.NOTEQUAL};function R(A,x){if(x.type===Ar&&t.has("OES_texture_float_linear")===!1&&(x.magFilter===pi||x.magFilter===ph||x.magFilter===Fl||x.magFilter===ws||x.minFilter===pi||x.minFilter===ph||x.minFilter===Fl||x.minFilter===ws)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(A,r.TEXTURE_WRAP_S,Y[x.wrapS]),r.texParameteri(A,r.TEXTURE_WRAP_T,Y[x.wrapT]),(A===r.TEXTURE_3D||A===r.TEXTURE_2D_ARRAY)&&r.texParameteri(A,r.TEXTURE_WRAP_R,Y[x.wrapR]),r.texParameteri(A,r.TEXTURE_MAG_FILTER,H[x.magFilter]),r.texParameteri(A,r.TEXTURE_MIN_FILTER,H[x.minFilter]),x.compareFunction&&(r.texParameteri(A,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(A,r.TEXTURE_COMPARE_FUNC,U[x.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===Qn||x.minFilter!==Fl&&x.minFilter!==ws||x.type===Ar&&t.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||n.get(x).__currentAnisotropy){let N=t.get("EXT_texture_filter_anisotropic");r.texParameterf(A,N.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,i.getMaxAnisotropy())),n.get(x).__currentAnisotropy=x.anisotropy}}}function at(A,x){let N=!1;A.__webglInit===void 0&&(A.__webglInit=!0,x.addEventListener("dispose",v));let q=x.source,tt=f.get(q);tt===void 0&&(tt={},f.set(q,tt));let it=L(x);if(it!==A.__cacheKey){tt[it]===void 0&&(tt[it]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,N=!0),tt[it].usedTimes++;let vt=tt[A.__cacheKey];vt!==void 0&&(tt[A.__cacheKey].usedTimes--,vt.usedTimes===0&&w(x)),A.__cacheKey=it,A.__webglTexture=tt[it].texture}return N}function _t(A,x,N){let q=r.TEXTURE_2D;(x.isDataArrayTexture||x.isCompressedArrayTexture)&&(q=r.TEXTURE_2D_ARRAY),x.isData3DTexture&&(q=r.TEXTURE_3D);let tt=at(A,x),it=x.source;e.bindTexture(q,A.__webglTexture,r.TEXTURE0+N);let vt=n.get(it);if(it.version!==vt.__version||tt===!0){e.activeTexture(r.TEXTURE0+N);let pt=Se.getPrimaries(Se.workingColorSpace),lt=x.colorSpace===Tr?null:Se.getPrimaries(x.colorSpace),Lt=x.colorSpace===Tr||pt===lt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,x.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Lt);let ht=g(x.image,!1,i.maxTextureSize);ht=W(x,ht);let yt=s.convert(x.format,x.colorSpace),Yt=s.convert(x.type),ut=b(x.internalFormat,yt,Yt,x.colorSpace,x.isVideoTexture);R(q,x);let Tt,Wt=x.mipmaps,qt=x.isVideoTexture!==!0,ue=vt.__version===void 0||tt===!0,Zt=it.dataReady,V=S(x,ht);if(x.isDepthTexture)ut=r.DEPTH_COMPONENT16,x.type===Ar?ut=r.DEPTH_COMPONENT32F:x.type===Do?ut=r.DEPTH_COMPONENT24:x.type===Ra&&(ut=r.DEPTH24_STENCIL8),ue&&(qt?e.texStorage2D(r.TEXTURE_2D,1,ut,ht.width,ht.height):e.texImage2D(r.TEXTURE_2D,0,ut,ht.width,ht.height,0,yt,Yt,null));else if(x.isDataTexture)if(Wt.length>0){qt&&ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,Wt[0].width,Wt[0].height);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],qt?Zt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,Yt,Tt.data):e.texImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,yt,Yt,Tt.data);x.generateMipmaps=!1}else qt?(ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,ht.width,ht.height),Zt&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,ht.width,ht.height,yt,Yt,ht.data)):e.texImage2D(r.TEXTURE_2D,0,ut,ht.width,ht.height,0,yt,Yt,ht.data);else if(x.isCompressedTexture)if(x.isCompressedArrayTexture){qt&&ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,V,ut,Wt[0].width,Wt[0].height,ht.depth);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],x.format!==Li?yt!==null?qt?Zt&&e.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,Q,0,0,0,Tt.width,Tt.height,ht.depth,yt,Tt.data,0,0):e.compressedTexImage3D(r.TEXTURE_2D_ARRAY,Q,ut,Tt.width,Tt.height,ht.depth,0,Tt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):qt?Zt&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,Q,0,0,0,Tt.width,Tt.height,ht.depth,yt,Yt,Tt.data):e.texImage3D(r.TEXTURE_2D_ARRAY,Q,ut,Tt.width,Tt.height,ht.depth,0,yt,Yt,Tt.data)}else{qt&&ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,Wt[0].width,Wt[0].height);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],x.format!==Li?yt!==null?qt?Zt&&e.compressedTexSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,Tt.data):e.compressedTexImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,Tt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):qt?Zt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,Yt,Tt.data):e.texImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,yt,Yt,Tt.data)}else if(x.isDataArrayTexture)qt?(ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,V,ut,ht.width,ht.height,ht.depth),Zt&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,ht.width,ht.height,ht.depth,yt,Yt,ht.data)):e.texImage3D(r.TEXTURE_2D_ARRAY,0,ut,ht.width,ht.height,ht.depth,0,yt,Yt,ht.data);else if(x.isData3DTexture)qt?(ue&&e.texStorage3D(r.TEXTURE_3D,V,ut,ht.width,ht.height,ht.depth),Zt&&e.texSubImage3D(r.TEXTURE_3D,0,0,0,0,ht.width,ht.height,ht.depth,yt,Yt,ht.data)):e.texImage3D(r.TEXTURE_3D,0,ut,ht.width,ht.height,ht.depth,0,yt,Yt,ht.data);else if(x.isFramebufferTexture){if(ue)if(qt)e.texStorage2D(r.TEXTURE_2D,V,ut,ht.width,ht.height);else{let Q=ht.width,st=ht.height;for(let mt=0;mt<V;mt++)e.texImage2D(r.TEXTURE_2D,mt,ut,Q,st,0,yt,Yt,null),Q>>=1,st>>=1}}else if(Wt.length>0){if(qt&&ue){let Q=$t(Wt[0]);e.texStorage2D(r.TEXTURE_2D,V,ut,Q.width,Q.height)}for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],qt?Zt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,yt,Yt,Tt):e.texImage2D(r.TEXTURE_2D,Q,ut,yt,Yt,Tt);x.generateMipmaps=!1}else if(qt){if(ue){let Q=$t(ht);e.texStorage2D(r.TEXTURE_2D,V,ut,Q.width,Q.height)}Zt&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,yt,Yt,ht)}else e.texImage2D(r.TEXTURE_2D,0,ut,yt,Yt,ht);p(x)&&m(q),vt.__version=it.version,x.onUpdate&&x.onUpdate(x)}A.__version=x.version}function Ut(A,x,N){if(x.image.length!==6)return;let q=at(A,x),tt=x.source;e.bindTexture(r.TEXTURE_CUBE_MAP,A.__webglTexture,r.TEXTURE0+N);let it=n.get(tt);if(tt.version!==it.__version||q===!0){e.activeTexture(r.TEXTURE0+N);let vt=Se.getPrimaries(Se.workingColorSpace),pt=x.colorSpace===Tr?null:Se.getPrimaries(x.colorSpace),lt=x.colorSpace===Tr||vt===pt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,x.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);let Lt=x.isCompressedTexture||x.image[0].isCompressedTexture,ht=x.image[0]&&x.image[0].isDataTexture,yt=[];for(let st=0;st<6;st++)!Lt&&!ht?yt[st]=g(x.image[st],!0,i.maxCubemapSize):yt[st]=ht?x.image[st].image:x.image[st],yt[st]=W(x,yt[st]);let Yt=yt[0],ut=s.convert(x.format,x.colorSpace),Tt=s.convert(x.type),Wt=b(x.internalFormat,ut,Tt,x.colorSpace),qt=x.isVideoTexture!==!0,ue=it.__version===void 0||q===!0,Zt=tt.dataReady,V=S(x,Yt);R(r.TEXTURE_CUBE_MAP,x);let Q;if(Lt){qt&&ue&&e.texStorage2D(r.TEXTURE_CUBE_MAP,V,Wt,Yt.width,Yt.height);for(let st=0;st<6;st++){Q=yt[st].mipmaps;for(let mt=0;mt<Q.length;mt++){let gt=Q[mt];x.format!==Li?ut!==null?qt?Zt&&e.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,0,0,gt.width,gt.height,ut,gt.data):e.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,Wt,gt.width,gt.height,0,gt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):qt?Zt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,0,0,gt.width,gt.height,ut,Tt,gt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,Wt,gt.width,gt.height,0,ut,Tt,gt.data)}}}else{if(Q=x.mipmaps,qt&&ue){Q.length>0&&V++;let st=$t(yt[0]);e.texStorage2D(r.TEXTURE_CUBE_MAP,V,Wt,st.width,st.height)}for(let st=0;st<6;st++)if(ht){qt?Zt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,0,0,yt[st].width,yt[st].height,ut,Tt,yt[st].data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,Wt,yt[st].width,yt[st].height,0,ut,Tt,yt[st].data);for(let mt=0;mt<Q.length;mt++){let Bt=Q[mt].image[st].image;qt?Zt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,0,0,Bt.width,Bt.height,ut,Tt,Bt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,Wt,Bt.width,Bt.height,0,ut,Tt,Bt.data)}}else{qt?Zt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,0,0,ut,Tt,yt[st]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,Wt,ut,Tt,yt[st]);for(let mt=0;mt<Q.length;mt++){let gt=Q[mt];qt?Zt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,0,0,ut,Tt,gt.image[st]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,Wt,ut,Tt,gt.image[st])}}}p(x)&&m(r.TEXTURE_CUBE_MAP),it.__version=tt.version,x.onUpdate&&x.onUpdate(x)}A.__version=x.version}function X(A,x,N,q,tt,it){let vt=s.convert(N.format,N.colorSpace),pt=s.convert(N.type),lt=b(N.internalFormat,vt,pt,N.colorSpace);if(!n.get(x).__hasExternalTextures){let ht=Math.max(1,x.width>>it),yt=Math.max(1,x.height>>it);tt===r.TEXTURE_3D||tt===r.TEXTURE_2D_ARRAY?e.texImage3D(tt,it,lt,ht,yt,x.depth,0,vt,pt,null):e.texImage2D(tt,it,lt,ht,yt,0,vt,pt,null)}e.bindFramebuffer(r.FRAMEBUFFER,A),Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,q,tt,n.get(N).__webglTexture,0,bt(x)):(tt===r.TEXTURE_2D||tt>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&tt<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,q,tt,n.get(N).__webglTexture,it),e.bindFramebuffer(r.FRAMEBUFFER,null)}function ot(A,x,N){if(r.bindRenderbuffer(r.RENDERBUFFER,A),x.depthBuffer&&!x.stencilBuffer){let q=r.DEPTH_COMPONENT24;if(N||Et(x)){let tt=x.depthTexture;tt&&tt.isDepthTexture&&(tt.type===Ar?q=r.DEPTH_COMPONENT32F:tt.type===Do&&(q=r.DEPTH_COMPONENT24));let it=bt(x);Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,it,q,x.width,x.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,it,q,x.width,x.height)}else r.renderbufferStorage(r.RENDERBUFFER,q,x.width,x.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,A)}else if(x.depthBuffer&&x.stencilBuffer){let q=bt(x);N&&Et(x)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,q,r.DEPTH24_STENCIL8,x.width,x.height):Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,q,r.DEPTH24_STENCIL8,x.width,x.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,x.width,x.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,A)}else{let q=x.textures;for(let tt=0;tt<q.length;tt++){let it=q[tt],vt=s.convert(it.format,it.colorSpace),pt=s.convert(it.type),lt=b(it.internalFormat,vt,pt,it.colorSpace),Lt=bt(x);N&&Et(x)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Lt,lt,x.width,x.height):Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Lt,lt,x.width,x.height):r.renderbufferStorage(r.RENDERBUFFER,lt,x.width,x.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function xt(A,x){if(x&&x.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(r.FRAMEBUFFER,A),!(x.depthTexture&&x.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(x.depthTexture).__webglTexture||x.depthTexture.image.width!==x.width||x.depthTexture.image.height!==x.height)&&(x.depthTexture.image.width=x.width,x.depthTexture.image.height=x.height,x.depthTexture.needsUpdate=!0),C(x.depthTexture,0);let q=n.get(x.depthTexture).__webglTexture,tt=bt(x);if(x.depthTexture.format===bo)Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,q,0,tt):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,q,0);else if(x.depthTexture.format===Ta)Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,q,0,tt):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,q,0);else throw new Error("Unknown depthTexture format")}function ct(A){let x=n.get(A),N=A.isWebGLCubeRenderTarget===!0;if(A.depthTexture&&!x.__autoAllocateDepthBuffer){if(N)throw new Error("target.depthTexture not supported in Cube render targets");xt(x.__webglFramebuffer,A)}else if(N){x.__webglDepthbuffer=[];for(let q=0;q<6;q++)e.bindFramebuffer(r.FRAMEBUFFER,x.__webglFramebuffer[q]),x.__webglDepthbuffer[q]=r.createRenderbuffer(),ot(x.__webglDepthbuffer[q],A,!1)}else e.bindFramebuffer(r.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer=r.createRenderbuffer(),ot(x.__webglDepthbuffer,A,!1);e.bindFramebuffer(r.FRAMEBUFFER,null)}function Rt(A,x,N){let q=n.get(A);x!==void 0&&X(q.__webglFramebuffer,A,A.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),N!==void 0&&ct(A)}function kt(A){let x=A.texture,N=n.get(A),q=n.get(x);A.addEventListener("dispose",D);let tt=A.textures,it=A.isWebGLCubeRenderTarget===!0,vt=tt.length>1;if(vt||(q.__webglTexture===void 0&&(q.__webglTexture=r.createTexture()),q.__version=x.version,o.memory.textures++),it){N.__webglFramebuffer=[];for(let pt=0;pt<6;pt++)if(x.mipmaps&&x.mipmaps.length>0){N.__webglFramebuffer[pt]=[];for(let lt=0;lt<x.mipmaps.length;lt++)N.__webglFramebuffer[pt][lt]=r.createFramebuffer()}else N.__webglFramebuffer[pt]=r.createFramebuffer()}else{if(x.mipmaps&&x.mipmaps.length>0){N.__webglFramebuffer=[];for(let pt=0;pt<x.mipmaps.length;pt++)N.__webglFramebuffer[pt]=r.createFramebuffer()}else N.__webglFramebuffer=r.createFramebuffer();if(vt)for(let pt=0,lt=tt.length;pt<lt;pt++){let Lt=n.get(tt[pt]);Lt.__webglTexture===void 0&&(Lt.__webglTexture=r.createTexture(),o.memory.textures++)}if(A.samples>0&&Et(A)===!1){N.__webglMultisampledFramebuffer=r.createFramebuffer(),N.__webglColorRenderbuffer=[],e.bindFramebuffer(r.FRAMEBUFFER,N.__webglMultisampledFramebuffer);for(let pt=0;pt<tt.length;pt++){let lt=tt[pt];N.__webglColorRenderbuffer[pt]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,N.__webglColorRenderbuffer[pt]);let Lt=s.convert(lt.format,lt.colorSpace),ht=s.convert(lt.type),yt=b(lt.internalFormat,Lt,ht,lt.colorSpace,A.isXRRenderTarget===!0),Yt=bt(A);r.renderbufferStorageMultisample(r.RENDERBUFFER,Yt,yt,A.width,A.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+pt,r.RENDERBUFFER,N.__webglColorRenderbuffer[pt])}r.bindRenderbuffer(r.RENDERBUFFER,null),A.depthBuffer&&(N.__webglDepthRenderbuffer=r.createRenderbuffer(),ot(N.__webglDepthRenderbuffer,A,!0)),e.bindFramebuffer(r.FRAMEBUFFER,null)}}if(it){e.bindTexture(r.TEXTURE_CUBE_MAP,q.__webglTexture),R(r.TEXTURE_CUBE_MAP,x);for(let pt=0;pt<6;pt++)if(x.mipmaps&&x.mipmaps.length>0)for(let lt=0;lt<x.mipmaps.length;lt++)X(N.__webglFramebuffer[pt][lt],A,x,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+pt,lt);else X(N.__webglFramebuffer[pt],A,x,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+pt,0);p(x)&&m(r.TEXTURE_CUBE_MAP),e.unbindTexture()}else if(vt){for(let pt=0,lt=tt.length;pt<lt;pt++){let Lt=tt[pt],ht=n.get(Lt);e.bindTexture(r.TEXTURE_2D,ht.__webglTexture),R(r.TEXTURE_2D,Lt),X(N.__webglFramebuffer,A,Lt,r.COLOR_ATTACHMENT0+pt,r.TEXTURE_2D,0),p(Lt)&&m(r.TEXTURE_2D)}e.unbindTexture()}else{let pt=r.TEXTURE_2D;if((A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(pt=A.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),e.bindTexture(pt,q.__webglTexture),R(pt,x),x.mipmaps&&x.mipmaps.length>0)for(let lt=0;lt<x.mipmaps.length;lt++)X(N.__webglFramebuffer[lt],A,x,r.COLOR_ATTACHMENT0,pt,lt);else X(N.__webglFramebuffer,A,x,r.COLOR_ATTACHMENT0,pt,0);p(x)&&m(pt),e.unbindTexture()}A.depthBuffer&&ct(A)}function Z(A){let x=A.textures;for(let N=0,q=x.length;N<q;N++){let tt=x[N];if(p(tt)){let it=A.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,vt=n.get(tt).__webglTexture;e.bindTexture(it,vt),m(it),e.unbindTexture()}}}let Jt=[],It=[];function Ft(A){if(A.samples>0){if(Et(A)===!1){let x=A.textures,N=A.width,q=A.height,tt=r.COLOR_BUFFER_BIT,it=A.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,vt=n.get(A),pt=x.length>1;if(pt)for(let lt=0;lt<x.length;lt++)e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,null),e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,null,0);e.bindFramebuffer(r.READ_FRAMEBUFFER,vt.__webglMultisampledFramebuffer),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,vt.__webglFramebuffer);for(let lt=0;lt<x.length;lt++){if(A.resolveDepthBuffer&&(A.depthBuffer&&(tt|=r.DEPTH_BUFFER_BIT),A.stencilBuffer&&A.resolveStencilBuffer&&(tt|=r.STENCIL_BUFFER_BIT)),pt){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,vt.__webglColorRenderbuffer[lt]);let Lt=n.get(x[lt]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,Lt,0)}r.blitFramebuffer(0,0,N,q,0,0,N,q,tt,r.NEAREST),l===!0&&(Jt.length=0,It.length=0,Jt.push(r.COLOR_ATTACHMENT0+lt),A.depthBuffer&&A.resolveDepthBuffer===!1&&(Jt.push(it),It.push(it),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,It)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,Jt))}if(e.bindFramebuffer(r.READ_FRAMEBUFFER,null),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),pt)for(let lt=0;lt<x.length;lt++){e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,vt.__webglColorRenderbuffer[lt]);let Lt=n.get(x[lt]).__webglTexture;e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,Lt,0)}e.bindFramebuffer(r.DRAW_FRAMEBUFFER,vt.__webglMultisampledFramebuffer)}else if(A.depthBuffer&&A.resolveDepthBuffer===!1&&l){let x=A.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[x])}}}function bt(A){return Math.min(i.maxSamples,A.samples)}function Et(A){let x=n.get(A);return A.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function Ht(A){let x=o.render.frame;h.get(A)!==x&&(h.set(A,x),A.update())}function W(A,x){let N=A.colorSpace,q=A.format,tt=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||N!==Ur&&N!==Tr&&(Se.getTransfer(N)===Te?(q!==Li||tt!==Lr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",N)),x}function $t(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(c.width=A.naturalWidth||A.width,c.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(c.width=A.displayWidth,c.height=A.displayHeight):(c.width=A.width,c.height=A.height),c}this.allocateTextureUnit=P,this.resetTextureUnits=y,this.setTexture2D=C,this.setTexture2DArray=B,this.setTexture3D=J,this.setTextureCube=O,this.rebindTextures=Rt,this.setupRenderTarget=kt,this.updateRenderTargetMipmap=Z,this.updateMultisampleRenderTarget=Ft,this.setupDepthRenderbuffer=ct,this.setupFrameBufferTexture=X,this.useMultisampledRTT=Et}function $w(r,t){function e(n,i=Tr){let s,o=Se.getTransfer(i);if(n===Lr)return r.UNSIGNED_BYTE;if(n===n_)return r.UNSIGNED_SHORT_4_4_4_4;if(n===i_)return r.UNSIGNED_SHORT_5_5_5_1;if(n===Wy)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===Hy)return r.BYTE;if(n===Gy)return r.SHORT;if(n===t_)return r.UNSIGNED_SHORT;if(n===e_)return r.INT;if(n===Do)return r.UNSIGNED_INT;if(n===Ar)return r.FLOAT;if(n===Lc)return r.HALF_FLOAT;if(n===Xy)return r.ALPHA;if(n===Yy)return r.RGB;if(n===Li)return r.RGBA;if(n===qy)return r.LUMINANCE;if(n===Zy)return r.LUMINANCE_ALPHA;if(n===bo)return r.DEPTH_COMPONENT;if(n===Ta)return r.DEPTH_STENCIL;if(n===Jy)return r.RED;if(n===r_)return r.RED_INTEGER;if(n===$y)return r.RG;if(n===s_)return r.RG_INTEGER;if(n===o_)return r.RGBA_INTEGER;if(n===mh||n===gh||n===_h||n===xh)if(o===Te)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===mh)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===gh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===_h)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===xh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===mh)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===gh)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===_h)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===xh)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Cm||n===Rm||n===Pm||n===Im)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Cm)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Rm)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Pm)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Im)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Lm||n===Fm||n===Nm)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Lm||n===Fm)return o===Te?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Nm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Um||n===Om||n===Bm||n===km||n===zm||n===Vm||n===Hm||n===Gm||n===Wm||n===Xm||n===Ym||n===qm||n===Zm||n===Jm)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Um)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Om)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Bm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===km)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===zm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Vm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Hm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Gm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Wm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Xm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Ym)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===qm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Zm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Jm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===yh||n===$m||n===Km)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(n===yh)return o===Te?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===$m)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Km)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Ky||n===jm||n===Qm||n===tg)if(s=t.get("EXT_texture_compression_rgtc"),s!==null){if(n===yh)return s.COMPRESSED_RED_RGTC1_EXT;if(n===jm)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Qm)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===tg)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Ra?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:e}}var mf=class extends Tn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},Dr=class extends pn{constructor(){super(),this.isGroup=!0,this.type="Group"}},Kw={type:"move"},Ea=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Dr,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 Dr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new nt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new nt),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Dr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new nt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new nt),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 h=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],f=h.position.distanceTo(d.position),u=.02,_=.005;c.inputState.pinching&&f>u+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=u-_&&(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(Kw)))}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 Dr;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},jw=`
|
|
3797
|
+
}`;function qw(r,t,e){let n=new Da,i=new _e,s=new _e,o=new je,a=new df({depthPacking:Qy}),l=new pf,c={},h=e.maxTextureSize,d={[Ir]:Fn,[Fn]:Ir,[Qi]:Qi},f=new ii({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new _e},radius:{value:4}},vertexShader:Xw,fragmentShader:Yw}),u=f.clone();u.defines.HORIZONTAL_PASS=1;let _=new Fi;_.setAttribute("position",new ti(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new mi(_,f),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Kg;let m=this.type;this.render=function(T,w,P){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||T.length===0)return;let M=r.getRenderTarget(),y=r.getActiveCubeFace(),L=r.getActiveMipmapLevel(),I=r.state;I.setBlending(Cr),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);let D=m!==Ki&&this.type===Ki,O=m===Ki&&this.type!==Ki;for(let X=0,H=T.length;X<H;X++){let G=T[X],B=G.shadow;if(B===void 0){console.warn("THREE.WebGLShadowMap:",G,"has no shadow.");continue}if(B.autoUpdate===!1&&B.needsUpdate===!1)continue;i.copy(B.mapSize);let U=B.getFrameExtents();if(i.multiply(U),s.copy(B.mapSize),(i.x>h||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/U.x),i.x=s.x*U.x,B.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/U.y),i.y=s.y*U.y,B.mapSize.y=s.y)),B.map===null||D===!0||O===!0){let at=this.type!==Ki?{minFilter:Qn,magFilter:Qn}:{};B.map!==null&&B.map.dispose(),B.map=new er(i.x,i.y,at),B.map.texture.name=G.name+".shadowMap",B.camera.updateProjectionMatrix()}r.setRenderTarget(B.map),r.clear();let R=B.getViewportCount();for(let at=0;at<R;at++){let _t=B.getViewport(at);o.set(s.x*_t.x,s.y*_t.y,s.x*_t.z,s.y*_t.w),I.viewport(o),B.updateMatrices(G,at),n=B.getFrustum(),v(w,P,B.camera,G,this.type)}B.isPointLightShadow!==!0&&this.type===Ki&&b(B,P),B.needsUpdate=!1}m=this.type,p.needsUpdate=!1,r.setRenderTarget(M,y,L)};function b(T,w){let P=t.update(g);f.defines.VSM_SAMPLES!==T.blurSamples&&(f.defines.VSM_SAMPLES=T.blurSamples,u.defines.VSM_SAMPLES=T.blurSamples,f.needsUpdate=!0,u.needsUpdate=!0),T.mapPass===null&&(T.mapPass=new er(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(w,null,P,f,g,null),u.uniforms.shadow_pass.value=T.mapPass.texture,u.uniforms.resolution.value=T.mapSize,u.uniforms.radius.value=T.radius,r.setRenderTarget(T.map),r.clear(),r.renderBufferDirect(w,null,P,u,g,null)}function S(T,w,P,M){let y=null,L=P.isPointLight===!0?T.customDistanceMaterial:T.customDepthMaterial;if(L!==void 0)y=L;else if(y=P.isPointLight===!0?l:a,r.localClippingEnabled&&w.clipShadows===!0&&Array.isArray(w.clippingPlanes)&&w.clippingPlanes.length!==0||w.displacementMap&&w.displacementScale!==0||w.alphaMap&&w.alphaTest>0||w.map&&w.alphaTest>0){let I=y.uuid,D=w.uuid,O=c[I];O===void 0&&(O={},c[I]=O);let X=O[D];X===void 0&&(X=y.clone(),O[D]=X,w.addEventListener("dispose",C)),y=X}if(y.visible=w.visible,y.wireframe=w.wireframe,M===Ki?y.side=w.shadowSide!==null?w.shadowSide:w.side:y.side=w.shadowSide!==null?w.shadowSide:d[w.side],y.alphaMap=w.alphaMap,y.alphaTest=w.alphaTest,y.map=w.map,y.clipShadows=w.clipShadows,y.clippingPlanes=w.clippingPlanes,y.clipIntersection=w.clipIntersection,y.displacementMap=w.displacementMap,y.displacementScale=w.displacementScale,y.displacementBias=w.displacementBias,y.wireframeLinewidth=w.wireframeLinewidth,y.linewidth=w.linewidth,P.isPointLight===!0&&y.isMeshDistanceMaterial===!0){let I=r.properties.get(y);I.light=P}return y}function v(T,w,P,M,y){if(T.visible===!1)return;if(T.layers.test(w.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&y===Ki)&&(!T.frustumCulled||n.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,T.matrixWorld);let D=t.update(T),O=T.material;if(Array.isArray(O)){let X=D.groups;for(let H=0,G=X.length;H<G;H++){let B=X[H],U=O[B.materialIndex];if(U&&U.visible){let R=S(T,U,M,y);T.onBeforeShadow(r,T,w,P,D,R,B),r.renderBufferDirect(P,null,D,R,T,B),T.onAfterShadow(r,T,w,P,D,R,B)}}}else if(O.visible){let X=S(T,O,M,y);T.onBeforeShadow(r,T,w,P,D,X,null),r.renderBufferDirect(P,null,D,X,T,null),T.onAfterShadow(r,T,w,P,D,X,null)}}let I=T.children;for(let D=0,O=I.length;D<O;D++)v(I[D],w,P,M,y)}function C(T){T.target.removeEventListener("dispose",C);for(let P in c){let M=c[P],y=T.target.uuid;y in M&&(M[y].dispose(),delete M[y])}}}function Zw(r){function t(){let V=!1,Q=new je,st=null,mt=new je(0,0,0,0);return{setMask:function(gt){st!==gt&&!V&&(r.colorMask(gt,gt,gt,gt),st=gt)},setLocked:function(gt){V=gt},setClear:function(gt,Bt,ee,Mt,F){F===!0&&(gt*=Mt,Bt*=Mt,ee*=Mt),Q.set(gt,Bt,ee,Mt),mt.equals(Q)===!1&&(r.clearColor(gt,Bt,ee,Mt),mt.copy(Q))},reset:function(){V=!1,st=null,mt.set(-1,0,0,0)}}}function e(){let V=!1,Q=null,st=null,mt=null;return{setTest:function(gt){gt?xt(r.DEPTH_TEST):ct(r.DEPTH_TEST)},setMask:function(gt){Q!==gt&&!V&&(r.depthMask(gt),Q=gt)},setFunc:function(gt){if(st!==gt){switch(gt){case Ey:r.depthFunc(r.NEVER);break;case Ty:r.depthFunc(r.ALWAYS);break;case Ay:r.depthFunc(r.LESS);break;case sc:r.depthFunc(r.LEQUAL);break;case Dy:r.depthFunc(r.EQUAL);break;case Cy:r.depthFunc(r.GEQUAL);break;case Ry:r.depthFunc(r.GREATER);break;case Py:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}st=gt}},setLocked:function(gt){V=gt},setClear:function(gt){mt!==gt&&(r.clearDepth(gt),mt=gt)},reset:function(){V=!1,Q=null,st=null,mt=null}}}function n(){let V=!1,Q=null,st=null,mt=null,gt=null,Bt=null,ee=null,Mt=null,F=null;return{setTest:function(rt){V||(rt?xt(r.STENCIL_TEST):ct(r.STENCIL_TEST))},setMask:function(rt){Q!==rt&&!V&&(r.stencilMask(rt),Q=rt)},setFunc:function(rt,k,j){(st!==rt||mt!==k||gt!==j)&&(r.stencilFunc(rt,k,j),st=rt,mt=k,gt=j)},setOp:function(rt,k,j){(Bt!==rt||ee!==k||Mt!==j)&&(r.stencilOp(rt,k,j),Bt=rt,ee=k,Mt=j)},setLocked:function(rt){V=rt},setClear:function(rt){F!==rt&&(r.clearStencil(rt),F=rt)},reset:function(){V=!1,Q=null,st=null,mt=null,gt=null,Bt=null,ee=null,Mt=null,F=null}}}let i=new t,s=new e,o=new n,a=new WeakMap,l=new WeakMap,c={},h={},d=new WeakMap,f=[],u=null,_=!1,g=null,p=null,m=null,b=null,S=null,v=null,C=null,T=new ge(0,0,0),w=0,P=!1,M=null,y=null,L=null,I=null,D=null,O=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS),X=!1,H=0,G=r.getParameter(r.VERSION);G.indexOf("WebGL")!==-1?(H=parseFloat(/^WebGL (\d)/.exec(G)[1]),X=H>=1):G.indexOf("OpenGL ES")!==-1&&(H=parseFloat(/^OpenGL ES (\d)/.exec(G)[1]),X=H>=2);let B=null,U={},R=r.getParameter(r.SCISSOR_BOX),at=r.getParameter(r.VIEWPORT),_t=new je().fromArray(R),Ut=new je().fromArray(at);function q(V,Q,st,mt){let gt=new Uint8Array(4),Bt=r.createTexture();r.bindTexture(V,Bt),r.texParameteri(V,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(V,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let ee=0;ee<st;ee++)V===r.TEXTURE_3D||V===r.TEXTURE_2D_ARRAY?r.texImage3D(Q,0,r.RGBA,1,1,mt,0,r.RGBA,r.UNSIGNED_BYTE,gt):r.texImage2D(Q+ee,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,gt);return Bt}let ot={};ot[r.TEXTURE_2D]=q(r.TEXTURE_2D,r.TEXTURE_2D,1),ot[r.TEXTURE_CUBE_MAP]=q(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),ot[r.TEXTURE_2D_ARRAY]=q(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),ot[r.TEXTURE_3D]=q(r.TEXTURE_3D,r.TEXTURE_3D,1,1),i.setClear(0,0,0,1),s.setClear(1),o.setClear(0),xt(r.DEPTH_TEST),s.setFunc(sc),Et(!1),Ht(Em),xt(r.CULL_FACE),Ft(Cr);function xt(V){c[V]!==!0&&(r.enable(V),c[V]=!0)}function ct(V){c[V]!==!1&&(r.disable(V),c[V]=!1)}function Rt(V,Q){return h[V]!==Q?(r.bindFramebuffer(V,Q),h[V]=Q,V===r.DRAW_FRAMEBUFFER&&(h[r.FRAMEBUFFER]=Q),V===r.FRAMEBUFFER&&(h[r.DRAW_FRAMEBUFFER]=Q),!0):!1}function kt(V,Q){let st=f,mt=!1;if(V){st=d.get(Q),st===void 0&&(st=[],d.set(Q,st));let gt=V.textures;if(st.length!==gt.length||st[0]!==r.COLOR_ATTACHMENT0){for(let Bt=0,ee=gt.length;Bt<ee;Bt++)st[Bt]=r.COLOR_ATTACHMENT0+Bt;st.length=gt.length,mt=!0}}else st[0]!==r.BACK&&(st[0]=r.BACK,mt=!0);mt&&r.drawBuffers(st)}function J(V){return u!==V?(r.useProgram(V),u=V,!0):!1}let $t={[Ss]:r.FUNC_ADD,[ly]:r.FUNC_SUBTRACT,[cy]:r.FUNC_REVERSE_SUBTRACT};$t[uy]=r.MIN,$t[hy]=r.MAX;let It={[fy]:r.ZERO,[dy]:r.ONE,[py]:r.SRC_COLOR,[Zh]:r.SRC_ALPHA,[vy]:r.SRC_ALPHA_SATURATE,[xy]:r.DST_COLOR,[gy]:r.DST_ALPHA,[my]:r.ONE_MINUS_SRC_COLOR,[Jh]:r.ONE_MINUS_SRC_ALPHA,[yy]:r.ONE_MINUS_DST_COLOR,[_y]:r.ONE_MINUS_DST_ALPHA,[Sy]:r.CONSTANT_COLOR,[My]:r.ONE_MINUS_CONSTANT_COLOR,[by]:r.CONSTANT_ALPHA,[wy]:r.ONE_MINUS_CONSTANT_ALPHA};function Ft(V,Q,st,mt,gt,Bt,ee,Mt,F,rt){if(V===Cr){_===!0&&(ct(r.BLEND),_=!1);return}if(_===!1&&(xt(r.BLEND),_=!0),V!==ay){if(V!==g||rt!==P){if((p!==Ss||S!==Ss)&&(r.blendEquation(r.FUNC_ADD),p=Ss,S=Ss),rt)switch(V){case Rr:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Tm:r.blendFunc(r.ONE,r.ONE);break;case Am:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Dm:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",V);break}else switch(V){case Rr:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Tm:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case Am:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case Dm:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",V);break}m=null,b=null,v=null,C=null,T.set(0,0,0),w=0,g=V,P=rt}return}gt=gt||Q,Bt=Bt||st,ee=ee||mt,(Q!==p||gt!==S)&&(r.blendEquationSeparate($t[Q],$t[gt]),p=Q,S=gt),(st!==m||mt!==b||Bt!==v||ee!==C)&&(r.blendFuncSeparate(It[st],It[mt],It[Bt],It[ee]),m=st,b=mt,v=Bt,C=ee),(Mt.equals(T)===!1||F!==w)&&(r.blendColor(Mt.r,Mt.g,Mt.b,F),T.copy(Mt),w=F),g=V,P=!1}function bt(V,Q){V.side===Qi?ct(r.CULL_FACE):xt(r.CULL_FACE);let st=V.side===Fn;Q&&(st=!st),Et(st),V.blending===Rr&&V.transparent===!1?Ft(Cr):Ft(V.blending,V.blendEquation,V.blendSrc,V.blendDst,V.blendEquationAlpha,V.blendSrcAlpha,V.blendDstAlpha,V.blendColor,V.blendAlpha,V.premultipliedAlpha),s.setFunc(V.depthFunc),s.setTest(V.depthTest),s.setMask(V.depthWrite),i.setMask(V.colorWrite);let mt=V.stencilWrite;o.setTest(mt),mt&&(o.setMask(V.stencilWriteMask),o.setFunc(V.stencilFunc,V.stencilRef,V.stencilFuncMask),o.setOp(V.stencilFail,V.stencilZFail,V.stencilZPass)),Kt(V.polygonOffset,V.polygonOffsetFactor,V.polygonOffsetUnits),V.alphaToCoverage===!0?xt(r.SAMPLE_ALPHA_TO_COVERAGE):ct(r.SAMPLE_ALPHA_TO_COVERAGE)}function Et(V){M!==V&&(V?r.frontFace(r.CW):r.frontFace(r.CCW),M=V)}function Ht(V){V!==sy?(xt(r.CULL_FACE),V!==y&&(V===Em?r.cullFace(r.BACK):V===oy?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):ct(r.CULL_FACE),y=V}function Y(V){V!==L&&(X&&r.lineWidth(V),L=V)}function Kt(V,Q,st){V?(xt(r.POLYGON_OFFSET_FILL),(I!==Q||D!==st)&&(r.polygonOffset(Q,st),I=Q,D=st)):ct(r.POLYGON_OFFSET_FILL)}function A(V){V?xt(r.SCISSOR_TEST):ct(r.SCISSOR_TEST)}function x(V){V===void 0&&(V=r.TEXTURE0+O-1),B!==V&&(r.activeTexture(V),B=V)}function N(V,Q,st){st===void 0&&(B===null?st=r.TEXTURE0+O-1:st=B);let mt=U[st];mt===void 0&&(mt={type:void 0,texture:void 0},U[st]=mt),(mt.type!==V||mt.texture!==Q)&&(B!==st&&(r.activeTexture(st),B=st),r.bindTexture(V,Q||ot[V]),mt.type=V,mt.texture=Q)}function Z(){let V=U[B];V!==void 0&&V.type!==void 0&&(r.bindTexture(V.type,null),V.type=void 0,V.texture=void 0)}function tt(){try{r.compressedTexImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function it(){try{r.compressedTexImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function vt(){try{r.texSubImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function pt(){try{r.texSubImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function lt(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function Lt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function ht(){try{r.texStorage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function yt(){try{r.texStorage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function qt(){try{r.texImage2D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function ut(){try{r.texImage3D.apply(r,arguments)}catch(V){console.error("THREE.WebGLState:",V)}}function Tt(V){_t.equals(V)===!1&&(r.scissor(V.x,V.y,V.z,V.w),_t.copy(V))}function Wt(V){Ut.equals(V)===!1&&(r.viewport(V.x,V.y,V.z,V.w),Ut.copy(V))}function Zt(V,Q){let st=l.get(Q);st===void 0&&(st=new WeakMap,l.set(Q,st));let mt=st.get(V);mt===void 0&&(mt=r.getUniformBlockIndex(Q,V.name),st.set(V,mt))}function ue(V,Q){let mt=l.get(Q).get(V);a.get(Q)!==mt&&(r.uniformBlockBinding(Q,mt,V.__bindingPointIndex),a.set(Q,mt))}function Jt(){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={},B=null,U={},h={},d=new WeakMap,f=[],u=null,_=!1,g=null,p=null,m=null,b=null,S=null,v=null,C=null,T=new ge(0,0,0),w=0,P=!1,M=null,y=null,L=null,I=null,D=null,_t.set(0,0,r.canvas.width,r.canvas.height),Ut.set(0,0,r.canvas.width,r.canvas.height),i.reset(),s.reset(),o.reset()}return{buffers:{color:i,depth:s,stencil:o},enable:xt,disable:ct,bindFramebuffer:Rt,drawBuffers:kt,useProgram:J,setBlending:Ft,setMaterial:bt,setFlipSided:Et,setCullFace:Ht,setLineWidth:Y,setPolygonOffset:Kt,setScissorTest:A,activeTexture:x,bindTexture:N,unbindTexture:Z,compressedTexImage2D:tt,compressedTexImage3D:it,texImage2D:qt,texImage3D:ut,updateUBOMapping:Zt,uniformBlockBinding:ue,texStorage2D:ht,texStorage3D:yt,texSubImage2D:vt,texSubImage3D:pt,compressedTexSubImage2D:lt,compressedTexSubImage3D:Lt,scissor:Tt,viewport:Wt,reset:Jt}}function Jw(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 _e,h=new WeakMap,d,f=new WeakMap,u=!1;try{u=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(A,x){return u?new OffscreenCanvas(A,x):fc("canvas")}function g(A,x,N){let Z=1,tt=Kt(A);if((tt.width>N||tt.height>N)&&(Z=N/Math.max(tt.width,tt.height)),Z<1)if(typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&A instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&A instanceof ImageBitmap||typeof VideoFrame<"u"&&A instanceof VideoFrame){let it=Math.floor(Z*tt.width),vt=Math.floor(Z*tt.height);d===void 0&&(d=_(it,vt));let pt=x?_(it,vt):d;return pt.width=it,pt.height=vt,pt.getContext("2d").drawImage(A,0,0,it,vt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+tt.width+"x"+tt.height+") to ("+it+"x"+vt+")."),pt}else return"data"in A&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+tt.width+"x"+tt.height+")."),A;return A}function p(A){return A.generateMipmaps&&A.minFilter!==Qn&&A.minFilter!==pi}function m(A){r.generateMipmap(A)}function b(A,x,N,Z,tt=!1){if(A!==null){if(r[A]!==void 0)return r[A];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+A+"'")}let it=x;if(x===r.RED&&(N===r.FLOAT&&(it=r.R32F),N===r.HALF_FLOAT&&(it=r.R16F),N===r.UNSIGNED_BYTE&&(it=r.R8)),x===r.RED_INTEGER&&(N===r.UNSIGNED_BYTE&&(it=r.R8UI),N===r.UNSIGNED_SHORT&&(it=r.R16UI),N===r.UNSIGNED_INT&&(it=r.R32UI),N===r.BYTE&&(it=r.R8I),N===r.SHORT&&(it=r.R16I),N===r.INT&&(it=r.R32I)),x===r.RG&&(N===r.FLOAT&&(it=r.RG32F),N===r.HALF_FLOAT&&(it=r.RG16F),N===r.UNSIGNED_BYTE&&(it=r.RG8)),x===r.RG_INTEGER&&(N===r.UNSIGNED_BYTE&&(it=r.RG8UI),N===r.UNSIGNED_SHORT&&(it=r.RG16UI),N===r.UNSIGNED_INT&&(it=r.RG32UI),N===r.BYTE&&(it=r.RG8I),N===r.SHORT&&(it=r.RG16I),N===r.INT&&(it=r.RG32I)),x===r.RGB&&N===r.UNSIGNED_INT_5_9_9_9_REV&&(it=r.RGB9_E5),x===r.RGBA){let vt=tt?lc:Se.getTransfer(Z);N===r.FLOAT&&(it=r.RGBA32F),N===r.HALF_FLOAT&&(it=r.RGBA16F),N===r.UNSIGNED_BYTE&&(it=vt===Te?r.SRGB8_ALPHA8:r.RGBA8),N===r.UNSIGNED_SHORT_4_4_4_4&&(it=r.RGBA4),N===r.UNSIGNED_SHORT_5_5_5_1&&(it=r.RGB5_A1)}return(it===r.R16F||it===r.R32F||it===r.RG16F||it===r.RG32F||it===r.RGBA16F||it===r.RGBA32F)&&t.get("EXT_color_buffer_float"),it}function S(A,x){return p(A)===!0||A.isFramebufferTexture&&A.minFilter!==Qn&&A.minFilter!==pi?Math.log2(Math.max(x.width,x.height))+1:A.mipmaps!==void 0&&A.mipmaps.length>0?A.mipmaps.length:A.isCompressedTexture&&Array.isArray(A.image)?x.mipmaps.length:1}function v(A){let x=A.target;x.removeEventListener("dispose",v),T(x),x.isVideoTexture&&h.delete(x)}function C(A){let x=A.target;x.removeEventListener("dispose",C),P(x)}function T(A){let x=n.get(A);if(x.__webglInit===void 0)return;let N=A.source,Z=f.get(N);if(Z){let tt=Z[x.__cacheKey];tt.usedTimes--,tt.usedTimes===0&&w(A),Object.keys(Z).length===0&&f.delete(N)}n.remove(A)}function w(A){let x=n.get(A);r.deleteTexture(x.__webglTexture);let N=A.source,Z=f.get(N);delete Z[x.__cacheKey],o.memory.textures--}function P(A){let x=n.get(A);if(A.depthTexture&&A.depthTexture.dispose(),A.isWebGLCubeRenderTarget)for(let Z=0;Z<6;Z++){if(Array.isArray(x.__webglFramebuffer[Z]))for(let tt=0;tt<x.__webglFramebuffer[Z].length;tt++)r.deleteFramebuffer(x.__webglFramebuffer[Z][tt]);else r.deleteFramebuffer(x.__webglFramebuffer[Z]);x.__webglDepthbuffer&&r.deleteRenderbuffer(x.__webglDepthbuffer[Z])}else{if(Array.isArray(x.__webglFramebuffer))for(let Z=0;Z<x.__webglFramebuffer.length;Z++)r.deleteFramebuffer(x.__webglFramebuffer[Z]);else r.deleteFramebuffer(x.__webglFramebuffer);if(x.__webglDepthbuffer&&r.deleteRenderbuffer(x.__webglDepthbuffer),x.__webglMultisampledFramebuffer&&r.deleteFramebuffer(x.__webglMultisampledFramebuffer),x.__webglColorRenderbuffer)for(let Z=0;Z<x.__webglColorRenderbuffer.length;Z++)x.__webglColorRenderbuffer[Z]&&r.deleteRenderbuffer(x.__webglColorRenderbuffer[Z]);x.__webglDepthRenderbuffer&&r.deleteRenderbuffer(x.__webglDepthRenderbuffer)}let N=A.textures;for(let Z=0,tt=N.length;Z<tt;Z++){let it=n.get(N[Z]);it.__webglTexture&&(r.deleteTexture(it.__webglTexture),o.memory.textures--),n.remove(N[Z])}n.remove(A)}let M=0;function y(){M=0}function L(){let A=M;return A>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+A+" texture units while this GPU supports only "+i.maxTextures),M+=1,A}function I(A){let x=[];return x.push(A.wrapS),x.push(A.wrapT),x.push(A.wrapR||0),x.push(A.magFilter),x.push(A.minFilter),x.push(A.anisotropy),x.push(A.internalFormat),x.push(A.format),x.push(A.type),x.push(A.generateMipmaps),x.push(A.premultiplyAlpha),x.push(A.flipY),x.push(A.unpackAlignment),x.push(A.colorSpace),x.join()}function D(A,x){let N=n.get(A);if(A.isVideoTexture&&Ht(A),A.isRenderTargetTexture===!1&&A.version>0&&N.__version!==A.version){let Z=A.image;if(Z===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Z.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{_t(N,A,x);return}}e.bindTexture(r.TEXTURE_2D,N.__webglTexture,r.TEXTURE0+x)}function O(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){_t(N,A,x);return}e.bindTexture(r.TEXTURE_2D_ARRAY,N.__webglTexture,r.TEXTURE0+x)}function X(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){_t(N,A,x);return}e.bindTexture(r.TEXTURE_3D,N.__webglTexture,r.TEXTURE0+x)}function H(A,x){let N=n.get(A);if(A.version>0&&N.__version!==A.version){Ut(N,A,x);return}e.bindTexture(r.TEXTURE_CUBE_MAP,N.__webglTexture,r.TEXTURE0+x)}let G={[jh]:r.REPEAT,[bs]:r.CLAMP_TO_EDGE,[Qh]:r.MIRRORED_REPEAT},B={[Qn]:r.NEAREST,[Vy]:r.NEAREST_MIPMAP_NEAREST,[Fl]:r.NEAREST_MIPMAP_LINEAR,[pi]:r.LINEAR,[ph]:r.LINEAR_MIPMAP_NEAREST,[ws]:r.LINEAR_MIPMAP_LINEAR},U={[nv]:r.NEVER,[lv]:r.ALWAYS,[iv]:r.LESS,[a_]:r.LEQUAL,[rv]:r.EQUAL,[av]:r.GEQUAL,[sv]:r.GREATER,[ov]:r.NOTEQUAL};function R(A,x){if(x.type===Ar&&t.has("OES_texture_float_linear")===!1&&(x.magFilter===pi||x.magFilter===ph||x.magFilter===Fl||x.magFilter===ws||x.minFilter===pi||x.minFilter===ph||x.minFilter===Fl||x.minFilter===ws)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(A,r.TEXTURE_WRAP_S,G[x.wrapS]),r.texParameteri(A,r.TEXTURE_WRAP_T,G[x.wrapT]),(A===r.TEXTURE_3D||A===r.TEXTURE_2D_ARRAY)&&r.texParameteri(A,r.TEXTURE_WRAP_R,G[x.wrapR]),r.texParameteri(A,r.TEXTURE_MAG_FILTER,B[x.magFilter]),r.texParameteri(A,r.TEXTURE_MIN_FILTER,B[x.minFilter]),x.compareFunction&&(r.texParameteri(A,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(A,r.TEXTURE_COMPARE_FUNC,U[x.compareFunction])),t.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===Qn||x.minFilter!==Fl&&x.minFilter!==ws||x.type===Ar&&t.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||n.get(x).__currentAnisotropy){let N=t.get("EXT_texture_filter_anisotropic");r.texParameterf(A,N.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,i.getMaxAnisotropy())),n.get(x).__currentAnisotropy=x.anisotropy}}}function at(A,x){let N=!1;A.__webglInit===void 0&&(A.__webglInit=!0,x.addEventListener("dispose",v));let Z=x.source,tt=f.get(Z);tt===void 0&&(tt={},f.set(Z,tt));let it=I(x);if(it!==A.__cacheKey){tt[it]===void 0&&(tt[it]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,N=!0),tt[it].usedTimes++;let vt=tt[A.__cacheKey];vt!==void 0&&(tt[A.__cacheKey].usedTimes--,vt.usedTimes===0&&w(x)),A.__cacheKey=it,A.__webglTexture=tt[it].texture}return N}function _t(A,x,N){let Z=r.TEXTURE_2D;(x.isDataArrayTexture||x.isCompressedArrayTexture)&&(Z=r.TEXTURE_2D_ARRAY),x.isData3DTexture&&(Z=r.TEXTURE_3D);let tt=at(A,x),it=x.source;e.bindTexture(Z,A.__webglTexture,r.TEXTURE0+N);let vt=n.get(it);if(it.version!==vt.__version||tt===!0){e.activeTexture(r.TEXTURE0+N);let pt=Se.getPrimaries(Se.workingColorSpace),lt=x.colorSpace===Tr?null:Se.getPrimaries(x.colorSpace),Lt=x.colorSpace===Tr||pt===lt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,x.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Lt);let ht=g(x.image,!1,i.maxTextureSize);ht=Y(x,ht);let yt=s.convert(x.format,x.colorSpace),qt=s.convert(x.type),ut=b(x.internalFormat,yt,qt,x.colorSpace,x.isVideoTexture);R(Z,x);let Tt,Wt=x.mipmaps,Zt=x.isVideoTexture!==!0,ue=vt.__version===void 0||tt===!0,Jt=it.dataReady,V=S(x,ht);if(x.isDepthTexture)ut=r.DEPTH_COMPONENT16,x.type===Ar?ut=r.DEPTH_COMPONENT32F:x.type===Do?ut=r.DEPTH_COMPONENT24:x.type===Ra&&(ut=r.DEPTH24_STENCIL8),ue&&(Zt?e.texStorage2D(r.TEXTURE_2D,1,ut,ht.width,ht.height):e.texImage2D(r.TEXTURE_2D,0,ut,ht.width,ht.height,0,yt,qt,null));else if(x.isDataTexture)if(Wt.length>0){Zt&&ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,Wt[0].width,Wt[0].height);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],Zt?Jt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,qt,Tt.data):e.texImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,yt,qt,Tt.data);x.generateMipmaps=!1}else Zt?(ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,ht.width,ht.height),Jt&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,ht.width,ht.height,yt,qt,ht.data)):e.texImage2D(r.TEXTURE_2D,0,ut,ht.width,ht.height,0,yt,qt,ht.data);else if(x.isCompressedTexture)if(x.isCompressedArrayTexture){Zt&&ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,V,ut,Wt[0].width,Wt[0].height,ht.depth);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],x.format!==Li?yt!==null?Zt?Jt&&e.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,Q,0,0,0,Tt.width,Tt.height,ht.depth,yt,Tt.data,0,0):e.compressedTexImage3D(r.TEXTURE_2D_ARRAY,Q,ut,Tt.width,Tt.height,ht.depth,0,Tt.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Zt?Jt&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,Q,0,0,0,Tt.width,Tt.height,ht.depth,yt,qt,Tt.data):e.texImage3D(r.TEXTURE_2D_ARRAY,Q,ut,Tt.width,Tt.height,ht.depth,0,yt,qt,Tt.data)}else{Zt&&ue&&e.texStorage2D(r.TEXTURE_2D,V,ut,Wt[0].width,Wt[0].height);for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],x.format!==Li?yt!==null?Zt?Jt&&e.compressedTexSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,Tt.data):e.compressedTexImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,Tt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Zt?Jt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,Tt.width,Tt.height,yt,qt,Tt.data):e.texImage2D(r.TEXTURE_2D,Q,ut,Tt.width,Tt.height,0,yt,qt,Tt.data)}else if(x.isDataArrayTexture)Zt?(ue&&e.texStorage3D(r.TEXTURE_2D_ARRAY,V,ut,ht.width,ht.height,ht.depth),Jt&&e.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,ht.width,ht.height,ht.depth,yt,qt,ht.data)):e.texImage3D(r.TEXTURE_2D_ARRAY,0,ut,ht.width,ht.height,ht.depth,0,yt,qt,ht.data);else if(x.isData3DTexture)Zt?(ue&&e.texStorage3D(r.TEXTURE_3D,V,ut,ht.width,ht.height,ht.depth),Jt&&e.texSubImage3D(r.TEXTURE_3D,0,0,0,0,ht.width,ht.height,ht.depth,yt,qt,ht.data)):e.texImage3D(r.TEXTURE_3D,0,ut,ht.width,ht.height,ht.depth,0,yt,qt,ht.data);else if(x.isFramebufferTexture){if(ue)if(Zt)e.texStorage2D(r.TEXTURE_2D,V,ut,ht.width,ht.height);else{let Q=ht.width,st=ht.height;for(let mt=0;mt<V;mt++)e.texImage2D(r.TEXTURE_2D,mt,ut,Q,st,0,yt,qt,null),Q>>=1,st>>=1}}else if(Wt.length>0){if(Zt&&ue){let Q=Kt(Wt[0]);e.texStorage2D(r.TEXTURE_2D,V,ut,Q.width,Q.height)}for(let Q=0,st=Wt.length;Q<st;Q++)Tt=Wt[Q],Zt?Jt&&e.texSubImage2D(r.TEXTURE_2D,Q,0,0,yt,qt,Tt):e.texImage2D(r.TEXTURE_2D,Q,ut,yt,qt,Tt);x.generateMipmaps=!1}else if(Zt){if(ue){let Q=Kt(ht);e.texStorage2D(r.TEXTURE_2D,V,ut,Q.width,Q.height)}Jt&&e.texSubImage2D(r.TEXTURE_2D,0,0,0,yt,qt,ht)}else e.texImage2D(r.TEXTURE_2D,0,ut,yt,qt,ht);p(x)&&m(Z),vt.__version=it.version,x.onUpdate&&x.onUpdate(x)}A.__version=x.version}function Ut(A,x,N){if(x.image.length!==6)return;let Z=at(A,x),tt=x.source;e.bindTexture(r.TEXTURE_CUBE_MAP,A.__webglTexture,r.TEXTURE0+N);let it=n.get(tt);if(tt.version!==it.__version||Z===!0){e.activeTexture(r.TEXTURE0+N);let vt=Se.getPrimaries(Se.workingColorSpace),pt=x.colorSpace===Tr?null:Se.getPrimaries(x.colorSpace),lt=x.colorSpace===Tr||vt===pt?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,x.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,x.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);let Lt=x.isCompressedTexture||x.image[0].isCompressedTexture,ht=x.image[0]&&x.image[0].isDataTexture,yt=[];for(let st=0;st<6;st++)!Lt&&!ht?yt[st]=g(x.image[st],!0,i.maxCubemapSize):yt[st]=ht?x.image[st].image:x.image[st],yt[st]=Y(x,yt[st]);let qt=yt[0],ut=s.convert(x.format,x.colorSpace),Tt=s.convert(x.type),Wt=b(x.internalFormat,ut,Tt,x.colorSpace),Zt=x.isVideoTexture!==!0,ue=it.__version===void 0||Z===!0,Jt=tt.dataReady,V=S(x,qt);R(r.TEXTURE_CUBE_MAP,x);let Q;if(Lt){Zt&&ue&&e.texStorage2D(r.TEXTURE_CUBE_MAP,V,Wt,qt.width,qt.height);for(let st=0;st<6;st++){Q=yt[st].mipmaps;for(let mt=0;mt<Q.length;mt++){let gt=Q[mt];x.format!==Li?ut!==null?Zt?Jt&&e.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,0,0,gt.width,gt.height,ut,gt.data):e.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,Wt,gt.width,gt.height,0,gt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Zt?Jt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,0,0,gt.width,gt.height,ut,Tt,gt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt,Wt,gt.width,gt.height,0,ut,Tt,gt.data)}}}else{if(Q=x.mipmaps,Zt&&ue){Q.length>0&&V++;let st=Kt(yt[0]);e.texStorage2D(r.TEXTURE_CUBE_MAP,V,Wt,st.width,st.height)}for(let st=0;st<6;st++)if(ht){Zt?Jt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,0,0,yt[st].width,yt[st].height,ut,Tt,yt[st].data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,Wt,yt[st].width,yt[st].height,0,ut,Tt,yt[st].data);for(let mt=0;mt<Q.length;mt++){let Bt=Q[mt].image[st].image;Zt?Jt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,0,0,Bt.width,Bt.height,ut,Tt,Bt.data):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,Wt,Bt.width,Bt.height,0,ut,Tt,Bt.data)}}else{Zt?Jt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,0,0,ut,Tt,yt[st]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,0,Wt,ut,Tt,yt[st]);for(let mt=0;mt<Q.length;mt++){let gt=Q[mt];Zt?Jt&&e.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,0,0,ut,Tt,gt.image[st]):e.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+st,mt+1,Wt,ut,Tt,gt.image[st])}}}p(x)&&m(r.TEXTURE_CUBE_MAP),it.__version=tt.version,x.onUpdate&&x.onUpdate(x)}A.__version=x.version}function q(A,x,N,Z,tt,it){let vt=s.convert(N.format,N.colorSpace),pt=s.convert(N.type),lt=b(N.internalFormat,vt,pt,N.colorSpace);if(!n.get(x).__hasExternalTextures){let ht=Math.max(1,x.width>>it),yt=Math.max(1,x.height>>it);tt===r.TEXTURE_3D||tt===r.TEXTURE_2D_ARRAY?e.texImage3D(tt,it,lt,ht,yt,x.depth,0,vt,pt,null):e.texImage2D(tt,it,lt,ht,yt,0,vt,pt,null)}e.bindFramebuffer(r.FRAMEBUFFER,A),Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,Z,tt,n.get(N).__webglTexture,0,bt(x)):(tt===r.TEXTURE_2D||tt>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&tt<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,Z,tt,n.get(N).__webglTexture,it),e.bindFramebuffer(r.FRAMEBUFFER,null)}function ot(A,x,N){if(r.bindRenderbuffer(r.RENDERBUFFER,A),x.depthBuffer&&!x.stencilBuffer){let Z=r.DEPTH_COMPONENT24;if(N||Et(x)){let tt=x.depthTexture;tt&&tt.isDepthTexture&&(tt.type===Ar?Z=r.DEPTH_COMPONENT32F:tt.type===Do&&(Z=r.DEPTH_COMPONENT24));let it=bt(x);Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,it,Z,x.width,x.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,it,Z,x.width,x.height)}else r.renderbufferStorage(r.RENDERBUFFER,Z,x.width,x.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,A)}else if(x.depthBuffer&&x.stencilBuffer){let Z=bt(x);N&&Et(x)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Z,r.DEPTH24_STENCIL8,x.width,x.height):Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Z,r.DEPTH24_STENCIL8,x.width,x.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,x.width,x.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,A)}else{let Z=x.textures;for(let tt=0;tt<Z.length;tt++){let it=Z[tt],vt=s.convert(it.format,it.colorSpace),pt=s.convert(it.type),lt=b(it.internalFormat,vt,pt,it.colorSpace),Lt=bt(x);N&&Et(x)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Lt,lt,x.width,x.height):Et(x)?a.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Lt,lt,x.width,x.height):r.renderbufferStorage(r.RENDERBUFFER,lt,x.width,x.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function xt(A,x){if(x&&x.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(r.FRAMEBUFFER,A),!(x.depthTexture&&x.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(x.depthTexture).__webglTexture||x.depthTexture.image.width!==x.width||x.depthTexture.image.height!==x.height)&&(x.depthTexture.image.width=x.width,x.depthTexture.image.height=x.height,x.depthTexture.needsUpdate=!0),D(x.depthTexture,0);let Z=n.get(x.depthTexture).__webglTexture,tt=bt(x);if(x.depthTexture.format===bo)Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,Z,0,tt):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,Z,0);else if(x.depthTexture.format===Ta)Et(x)?a.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,Z,0,tt):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,Z,0);else throw new Error("Unknown depthTexture format")}function ct(A){let x=n.get(A),N=A.isWebGLCubeRenderTarget===!0;if(A.depthTexture&&!x.__autoAllocateDepthBuffer){if(N)throw new Error("target.depthTexture not supported in Cube render targets");xt(x.__webglFramebuffer,A)}else if(N){x.__webglDepthbuffer=[];for(let Z=0;Z<6;Z++)e.bindFramebuffer(r.FRAMEBUFFER,x.__webglFramebuffer[Z]),x.__webglDepthbuffer[Z]=r.createRenderbuffer(),ot(x.__webglDepthbuffer[Z],A,!1)}else e.bindFramebuffer(r.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer=r.createRenderbuffer(),ot(x.__webglDepthbuffer,A,!1);e.bindFramebuffer(r.FRAMEBUFFER,null)}function Rt(A,x,N){let Z=n.get(A);x!==void 0&&q(Z.__webglFramebuffer,A,A.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),N!==void 0&&ct(A)}function kt(A){let x=A.texture,N=n.get(A),Z=n.get(x);A.addEventListener("dispose",C);let tt=A.textures,it=A.isWebGLCubeRenderTarget===!0,vt=tt.length>1;if(vt||(Z.__webglTexture===void 0&&(Z.__webglTexture=r.createTexture()),Z.__version=x.version,o.memory.textures++),it){N.__webglFramebuffer=[];for(let pt=0;pt<6;pt++)if(x.mipmaps&&x.mipmaps.length>0){N.__webglFramebuffer[pt]=[];for(let lt=0;lt<x.mipmaps.length;lt++)N.__webglFramebuffer[pt][lt]=r.createFramebuffer()}else N.__webglFramebuffer[pt]=r.createFramebuffer()}else{if(x.mipmaps&&x.mipmaps.length>0){N.__webglFramebuffer=[];for(let pt=0;pt<x.mipmaps.length;pt++)N.__webglFramebuffer[pt]=r.createFramebuffer()}else N.__webglFramebuffer=r.createFramebuffer();if(vt)for(let pt=0,lt=tt.length;pt<lt;pt++){let Lt=n.get(tt[pt]);Lt.__webglTexture===void 0&&(Lt.__webglTexture=r.createTexture(),o.memory.textures++)}if(A.samples>0&&Et(A)===!1){N.__webglMultisampledFramebuffer=r.createFramebuffer(),N.__webglColorRenderbuffer=[],e.bindFramebuffer(r.FRAMEBUFFER,N.__webglMultisampledFramebuffer);for(let pt=0;pt<tt.length;pt++){let lt=tt[pt];N.__webglColorRenderbuffer[pt]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,N.__webglColorRenderbuffer[pt]);let Lt=s.convert(lt.format,lt.colorSpace),ht=s.convert(lt.type),yt=b(lt.internalFormat,Lt,ht,lt.colorSpace,A.isXRRenderTarget===!0),qt=bt(A);r.renderbufferStorageMultisample(r.RENDERBUFFER,qt,yt,A.width,A.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+pt,r.RENDERBUFFER,N.__webglColorRenderbuffer[pt])}r.bindRenderbuffer(r.RENDERBUFFER,null),A.depthBuffer&&(N.__webglDepthRenderbuffer=r.createRenderbuffer(),ot(N.__webglDepthRenderbuffer,A,!0)),e.bindFramebuffer(r.FRAMEBUFFER,null)}}if(it){e.bindTexture(r.TEXTURE_CUBE_MAP,Z.__webglTexture),R(r.TEXTURE_CUBE_MAP,x);for(let pt=0;pt<6;pt++)if(x.mipmaps&&x.mipmaps.length>0)for(let lt=0;lt<x.mipmaps.length;lt++)q(N.__webglFramebuffer[pt][lt],A,x,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+pt,lt);else q(N.__webglFramebuffer[pt],A,x,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+pt,0);p(x)&&m(r.TEXTURE_CUBE_MAP),e.unbindTexture()}else if(vt){for(let pt=0,lt=tt.length;pt<lt;pt++){let Lt=tt[pt],ht=n.get(Lt);e.bindTexture(r.TEXTURE_2D,ht.__webglTexture),R(r.TEXTURE_2D,Lt),q(N.__webglFramebuffer,A,Lt,r.COLOR_ATTACHMENT0+pt,r.TEXTURE_2D,0),p(Lt)&&m(r.TEXTURE_2D)}e.unbindTexture()}else{let pt=r.TEXTURE_2D;if((A.isWebGL3DRenderTarget||A.isWebGLArrayRenderTarget)&&(pt=A.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY),e.bindTexture(pt,Z.__webglTexture),R(pt,x),x.mipmaps&&x.mipmaps.length>0)for(let lt=0;lt<x.mipmaps.length;lt++)q(N.__webglFramebuffer[lt],A,x,r.COLOR_ATTACHMENT0,pt,lt);else q(N.__webglFramebuffer,A,x,r.COLOR_ATTACHMENT0,pt,0);p(x)&&m(pt),e.unbindTexture()}A.depthBuffer&&ct(A)}function J(A){let x=A.textures;for(let N=0,Z=x.length;N<Z;N++){let tt=x[N];if(p(tt)){let it=A.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,vt=n.get(tt).__webglTexture;e.bindTexture(it,vt),m(it),e.unbindTexture()}}}let $t=[],It=[];function Ft(A){if(A.samples>0){if(Et(A)===!1){let x=A.textures,N=A.width,Z=A.height,tt=r.COLOR_BUFFER_BIT,it=A.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,vt=n.get(A),pt=x.length>1;if(pt)for(let lt=0;lt<x.length;lt++)e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,null),e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,null,0);e.bindFramebuffer(r.READ_FRAMEBUFFER,vt.__webglMultisampledFramebuffer),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,vt.__webglFramebuffer);for(let lt=0;lt<x.length;lt++){if(A.resolveDepthBuffer&&(A.depthBuffer&&(tt|=r.DEPTH_BUFFER_BIT),A.stencilBuffer&&A.resolveStencilBuffer&&(tt|=r.STENCIL_BUFFER_BIT)),pt){r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,vt.__webglColorRenderbuffer[lt]);let Lt=n.get(x[lt]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,Lt,0)}r.blitFramebuffer(0,0,N,Z,0,0,N,Z,tt,r.NEAREST),l===!0&&($t.length=0,It.length=0,$t.push(r.COLOR_ATTACHMENT0+lt),A.depthBuffer&&A.resolveDepthBuffer===!1&&($t.push(it),It.push(it),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,It)),r.invalidateFramebuffer(r.READ_FRAMEBUFFER,$t))}if(e.bindFramebuffer(r.READ_FRAMEBUFFER,null),e.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),pt)for(let lt=0;lt<x.length;lt++){e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.RENDERBUFFER,vt.__webglColorRenderbuffer[lt]);let Lt=n.get(x[lt]).__webglTexture;e.bindFramebuffer(r.FRAMEBUFFER,vt.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+lt,r.TEXTURE_2D,Lt,0)}e.bindFramebuffer(r.DRAW_FRAMEBUFFER,vt.__webglMultisampledFramebuffer)}else if(A.depthBuffer&&A.resolveDepthBuffer===!1&&l){let x=A.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT;r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[x])}}}function bt(A){return Math.min(i.maxSamples,A.samples)}function Et(A){let x=n.get(A);return A.samples>0&&t.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function Ht(A){let x=o.render.frame;h.get(A)!==x&&(h.set(A,x),A.update())}function Y(A,x){let N=A.colorSpace,Z=A.format,tt=A.type;return A.isCompressedTexture===!0||A.isVideoTexture===!0||N!==Ur&&N!==Tr&&(Se.getTransfer(N)===Te?(Z!==Li||tt!==Lr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",N)),x}function Kt(A){return typeof HTMLImageElement<"u"&&A instanceof HTMLImageElement?(c.width=A.naturalWidth||A.width,c.height=A.naturalHeight||A.height):typeof VideoFrame<"u"&&A instanceof VideoFrame?(c.width=A.displayWidth,c.height=A.displayHeight):(c.width=A.width,c.height=A.height),c}this.allocateTextureUnit=L,this.resetTextureUnits=y,this.setTexture2D=D,this.setTexture2DArray=O,this.setTexture3D=X,this.setTextureCube=H,this.rebindTextures=Rt,this.setupRenderTarget=kt,this.updateRenderTargetMipmap=J,this.updateMultisampleRenderTarget=Ft,this.setupDepthRenderbuffer=ct,this.setupFrameBufferTexture=q,this.useMultisampledRTT=Et}function $w(r,t){function e(n,i=Tr){let s,o=Se.getTransfer(i);if(n===Lr)return r.UNSIGNED_BYTE;if(n===n_)return r.UNSIGNED_SHORT_4_4_4_4;if(n===i_)return r.UNSIGNED_SHORT_5_5_5_1;if(n===Wy)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===Hy)return r.BYTE;if(n===Gy)return r.SHORT;if(n===t_)return r.UNSIGNED_SHORT;if(n===e_)return r.INT;if(n===Do)return r.UNSIGNED_INT;if(n===Ar)return r.FLOAT;if(n===Lc)return r.HALF_FLOAT;if(n===Xy)return r.ALPHA;if(n===Yy)return r.RGB;if(n===Li)return r.RGBA;if(n===qy)return r.LUMINANCE;if(n===Zy)return r.LUMINANCE_ALPHA;if(n===bo)return r.DEPTH_COMPONENT;if(n===Ta)return r.DEPTH_STENCIL;if(n===Jy)return r.RED;if(n===r_)return r.RED_INTEGER;if(n===$y)return r.RG;if(n===s_)return r.RG_INTEGER;if(n===o_)return r.RGBA_INTEGER;if(n===mh||n===gh||n===_h||n===xh)if(o===Te)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===mh)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===gh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===_h)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===xh)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===mh)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===gh)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===_h)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===xh)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Cm||n===Rm||n===Pm||n===Im)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Cm)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Rm)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Pm)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Im)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Lm||n===Fm||n===Nm)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Lm||n===Fm)return o===Te?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Nm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Um||n===Om||n===Bm||n===km||n===zm||n===Vm||n===Hm||n===Gm||n===Wm||n===Xm||n===Ym||n===qm||n===Zm||n===Jm)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Um)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Om)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Bm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===km)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===zm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Vm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Hm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Gm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Wm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Xm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Ym)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===qm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Zm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Jm)return o===Te?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===yh||n===$m||n===Km)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(n===yh)return o===Te?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===$m)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Km)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Ky||n===jm||n===Qm||n===tg)if(s=t.get("EXT_texture_compression_rgtc"),s!==null){if(n===yh)return s.COMPRESSED_RED_RGTC1_EXT;if(n===jm)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Qm)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===tg)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Ra?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:e}}var mf=class extends Tn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}},Dr=class extends pn{constructor(){super(),this.isGroup=!0,this.type="Group"}},Kw={type:"move"},Ea=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Dr,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 Dr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new nt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new nt),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Dr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new nt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new nt),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 h=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],f=h.position.distanceTo(d.position),u=.02,_=.005;c.inputState.pinching&&f>u+_?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=u-_&&(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(Kw)))}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 Dr;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}},jw=`
|
|
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
|
-
}`,gf=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 ni,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 ii({vertexShader:jw,fragmentShader:Qw,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new mi(new Mc(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},_f=class extends Fr{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,h=null,d=null,f=null,u=null,_=null,g=new gf,p=e.getContextAttributes(),m=null,b=null,S=[],v=[],D=new _e,T=null,w=new Tn;w.layers.enable(1),w.viewport=new je;let I=new Tn;I.layers.enable(2),I.viewport=new je;let M=[w,I],y=new mf;y.layers.enable(1),y.layers.enable(2);let P=null,L=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let ot=S[X];return ot===void 0&&(ot=new Ea,S[X]=ot),ot.getTargetRaySpace()},this.getControllerGrip=function(X){let ot=S[X];return ot===void 0&&(ot=new Ea,S[X]=ot),ot.getGripSpace()},this.getHand=function(X){let ot=S[X];return ot===void 0&&(ot=new Ea,S[X]=ot),ot.getHandSpace()};function C(X){let ot=v.indexOf(X.inputSource);if(ot===-1)return;let xt=S[ot];xt!==void 0&&(xt.update(X.inputSource,X.frame,c||o),xt.dispatchEvent({type:X.type,data:X.inputSource}))}function B(){i.removeEventListener("select",C),i.removeEventListener("selectstart",C),i.removeEventListener("selectend",C),i.removeEventListener("squeeze",C),i.removeEventListener("squeezestart",C),i.removeEventListener("squeezeend",C),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",J);for(let X=0;X<S.length;X++){let ot=v[X];ot!==null&&(v[X]=null,S[X].disconnect(ot))}P=null,L=null,g.reset(),t.setRenderTarget(m),u=null,f=null,d=null,i=null,b=null,Ut.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(D.width,D.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){s=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){a=X,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(X){c=X},this.getBaseLayer=function(){return f!==null?f:u},this.getBinding=function(){return d},this.getFrame=function(){return _},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(m=t.getRenderTarget(),i.addEventListener("select",C),i.addEventListener("selectstart",C),i.addEventListener("selectend",C),i.addEventListener("squeeze",C),i.addEventListener("squeezestart",C),i.addEventListener("squeezeend",C),i.addEventListener("end",B),i.addEventListener("inputsourceschange",J),p.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(D),i.renderState.layers===void 0){let ot={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:s};u=new XRWebGLLayer(i,e,ot),i.updateRenderState({baseLayer:u}),t.setPixelRatio(1),t.setSize(u.framebufferWidth,u.framebufferHeight,!1),b=new er(u.framebufferWidth,u.framebufferHeight,{format:Li,type:Lr,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let ot=null,xt=null,ct=null;p.depth&&(ct=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,ot=p.stencil?Ta:bo,xt=p.stencil?Ra:Do);let Rt={colorFormat:e.RGBA8,depthFormat:ct,scaleFactor:s};d=new XRWebGLBinding(i,e),f=d.createProjectionLayer(Rt),i.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),b=new er(f.textureWidth,f.textureHeight,{format:Li,type:Lr,depthTexture:new Ec(f.textureWidth,f.textureHeight,xt,void 0,void 0,void 0,void 0,void 0,void 0,ot),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Ut.setContext(i),Ut.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function J(X){for(let ot=0;ot<X.removed.length;ot++){let xt=X.removed[ot],ct=v.indexOf(xt);ct>=0&&(v[ct]=null,S[ct].disconnect(xt))}for(let ot=0;ot<X.added.length;ot++){let xt=X.added[ot],ct=v.indexOf(xt);if(ct===-1){for(let kt=0;kt<S.length;kt++)if(kt>=v.length){v.push(xt),ct=kt;break}else if(v[kt]===null){v[kt]=xt,ct=kt;break}if(ct===-1)break}let Rt=S[ct];Rt&&Rt.connect(xt)}}let O=new nt,Y=new nt;function H(X,ot,xt){O.setFromMatrixPosition(ot.matrixWorld),Y.setFromMatrixPosition(xt.matrixWorld);let ct=O.distanceTo(Y),Rt=ot.projectionMatrix.elements,kt=xt.projectionMatrix.elements,Z=Rt[14]/(Rt[10]-1),Jt=Rt[14]/(Rt[10]+1),It=(Rt[9]+1)/Rt[5],Ft=(Rt[9]-1)/Rt[5],bt=(Rt[8]-1)/Rt[0],Et=(kt[8]+1)/kt[0],Ht=Z*bt,W=Z*Et,$t=ct/(-bt+Et),A=$t*-bt;ot.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(A),X.translateZ($t),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();let x=Z+$t,N=Jt+$t,q=Ht-A,tt=W+(ct-A),it=It*Jt/N*x,vt=Ft*Jt/N*x;X.projectionMatrix.makePerspective(q,tt,it,vt,x,N),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function U(X,ot){ot===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices(ot.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;g.texture!==null&&(X.near=g.depthNear,X.far=g.depthFar),y.near=I.near=w.near=X.near,y.far=I.far=w.far=X.far,(P!==y.near||L!==y.far)&&(i.updateRenderState({depthNear:y.near,depthFar:y.far}),P=y.near,L=y.far,w.near=P,w.far=L,I.near=P,I.far=L,w.updateProjectionMatrix(),I.updateProjectionMatrix(),X.updateProjectionMatrix());let ot=X.parent,xt=y.cameras;U(y,ot);for(let ct=0;ct<xt.length;ct++)U(xt[ct],ot);xt.length===2?H(y,w,I):y.projectionMatrix.copy(w.projectionMatrix),R(X,y,ot)};function R(X,ot,xt){xt===null?X.matrix.copy(ot.matrixWorld):(X.matrix.copy(xt.matrixWorld),X.matrix.invert(),X.matrix.multiply(ot.matrixWorld)),X.matrix.decompose(X.position,X.quaternion,X.scale),X.updateMatrixWorld(!0),X.projectionMatrix.copy(ot.projectionMatrix),X.projectionMatrixInverse.copy(ot.projectionMatrixInverse),X.isPerspectiveCamera&&(X.fov=tf*2*Math.atan(1/X.projectionMatrix.elements[5]),X.zoom=1)}this.getCamera=function(){return y},this.getFoveation=function(){if(!(f===null&&u===null))return l},this.setFoveation=function(X){l=X,f!==null&&(f.fixedFoveation=X),u!==null&&u.fixedFoveation!==void 0&&(u.fixedFoveation=X)},this.hasDepthSensing=function(){return g.texture!==null};let at=null;function _t(X,ot){if(h=ot.getViewerPose(c||o),_=ot,h!==null){let xt=h.views;u!==null&&(t.setRenderTargetFramebuffer(b,u.framebuffer),t.setRenderTarget(b));let ct=!1;xt.length!==y.cameras.length&&(y.cameras.length=0,ct=!0);for(let kt=0;kt<xt.length;kt++){let Z=xt[kt],Jt=null;if(u!==null)Jt=u.getViewport(Z);else{let Ft=d.getViewSubImage(f,Z);Jt=Ft.viewport,kt===0&&(t.setRenderTargetTextures(b,Ft.colorTexture,f.ignoreDepthValues?void 0:Ft.depthStencilTexture),t.setRenderTarget(b))}let It=M[kt];It===void 0&&(It=new Tn,It.layers.enable(kt),It.viewport=new je,M[kt]=It),It.matrix.fromArray(Z.transform.matrix),It.matrix.decompose(It.position,It.quaternion,It.scale),It.projectionMatrix.fromArray(Z.projectionMatrix),It.projectionMatrixInverse.copy(It.projectionMatrix).invert(),It.viewport.set(Jt.x,Jt.y,Jt.width,Jt.height),kt===0&&(y.matrix.copy(It.matrix),y.matrix.decompose(y.position,y.quaternion,y.scale)),ct===!0&&y.cameras.push(It)}let Rt=i.enabledFeatures;if(Rt&&Rt.includes("depth-sensing")){let kt=d.getDepthInformation(xt[0]);kt&&kt.isValid&&kt.texture&&g.init(t,kt,i.renderState)}}for(let xt=0;xt<S.length;xt++){let ct=v[xt],Rt=S[xt];ct!==null&&Rt!==void 0&&Rt.update(ct,ot,c||o)}g.render(t,y),at&&at(X,ot),ot.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ot}),_=null}let Ut=new h_;Ut.setAnimationLoop(_t),this.setAnimationLoop=function(X){at=X},this.dispose=function(){}}},ys=new nr,t1=new Ue;function e1(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,u_(r)),m.isFog?(p.fogNear.value=m.near,p.fogFar.value=m.far):m.isFogExp2&&(p.fogDensity.value=m.density)}function i(p,m,b,S,v){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(p,m):m.isMeshToonMaterial?(s(p,m),d(p,m)):m.isMeshPhongMaterial?(s(p,m),h(p,m)):m.isMeshStandardMaterial?(s(p,m),f(p,m),m.isMeshPhysicalMaterial&&u(p,m,v)):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,b,S):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===Fn&&(p.bumpScale.value*=-1)),m.normalMap&&(p.normalMap.value=m.normalMap,e(m.normalMap,p.normalMapTransform),p.normalScale.value.copy(m.normalScale),m.side===Fn&&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 b=t.get(m),S=b.envMap,v=b.envMapRotation;if(S&&(p.envMap.value=S,ys.copy(v),ys.x*=-1,ys.y*=-1,ys.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(ys.y*=-1,ys.z*=-1),p.envMapRotation.value.setFromMatrix4(t1.makeRotationFromEuler(ys)),p.flipEnvMap.value=S.isCubeTexture&&S.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,b,S){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.size.value=m.size*b,p.scale.value=S*.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 h(p,m){p.specular.value.copy(m.specular),p.shininess.value=Math.max(m.shininess,1e-4)}function d(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 u(p,m,b){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===Fn&&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=b.texture,p.transmissionSamplerSize.value.set(b.width,b.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 b=t.get(m).light;p.referencePosition.value.setFromMatrixPosition(b.matrixWorld),p.nearDistance.value=b.shadow.camera.near,p.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function n1(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,S){let v=S.program;n.uniformBlockBinding(b,v)}function c(b,S){let v=i[b.id];v===void 0&&(_(b),v=h(b),i[b.id]=v,b.addEventListener("dispose",p));let D=S.program;n.updateUBOMapping(b,D);let T=t.render.frame;s[b.id]!==T&&(f(b),s[b.id]=T)}function h(b){let S=d();b.__bindingPointIndex=S;let v=r.createBuffer(),D=b.__size,T=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,v),r.bufferData(r.UNIFORM_BUFFER,D,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,S,v),v}function d(){for(let b=0;b<a;b++)if(o.indexOf(b)===-1)return o.push(b),b;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(b){let S=i[b.id],v=b.uniforms,D=b.__cache;r.bindBuffer(r.UNIFORM_BUFFER,S);for(let T=0,w=v.length;T<w;T++){let I=Array.isArray(v[T])?v[T]:[v[T]];for(let M=0,y=I.length;M<y;M++){let P=I[M];if(u(P,T,M,D)===!0){let L=P.__offset,C=Array.isArray(P.value)?P.value:[P.value],B=0;for(let J=0;J<C.length;J++){let O=C[J],Y=g(O);typeof O=="number"||typeof O=="boolean"?(P.__data[0]=O,r.bufferSubData(r.UNIFORM_BUFFER,L+B,P.__data)):O.isMatrix3?(P.__data[0]=O.elements[0],P.__data[1]=O.elements[1],P.__data[2]=O.elements[2],P.__data[3]=0,P.__data[4]=O.elements[3],P.__data[5]=O.elements[4],P.__data[6]=O.elements[5],P.__data[7]=0,P.__data[8]=O.elements[6],P.__data[9]=O.elements[7],P.__data[10]=O.elements[8],P.__data[11]=0):(O.toArray(P.__data,B),B+=Y.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,L,P.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function u(b,S,v,D){let T=b.value,w=S+"_"+v;if(D[w]===void 0)return typeof T=="number"||typeof T=="boolean"?D[w]=T:D[w]=T.clone(),!0;{let I=D[w];if(typeof T=="number"||typeof T=="boolean"){if(I!==T)return D[w]=T,!0}else if(I.equals(T)===!1)return I.copy(T),!0}return!1}function _(b){let S=b.uniforms,v=0,D=16;for(let w=0,I=S.length;w<I;w++){let M=Array.isArray(S[w])?S[w]:[S[w]];for(let y=0,P=M.length;y<P;y++){let L=M[y],C=Array.isArray(L.value)?L.value:[L.value];for(let B=0,J=C.length;B<J;B++){let O=C[B],Y=g(O),H=v%D;H!==0&&D-H<Y.boundary&&(v+=D-H),L.__data=new Float32Array(Y.storage/Float32Array.BYTES_PER_ELEMENT),L.__offset=v,v+=Y.storage}}}let T=v%D;return T>0&&(v+=D-T),b.__size=v,b.__cache={},this}function g(b){let S={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(S.boundary=4,S.storage=4):b.isVector2?(S.boundary=8,S.storage=8):b.isVector3||b.isColor?(S.boundary=16,S.storage=12):b.isVector4?(S.boundary=16,S.storage=16):b.isMatrix3?(S.boundary=48,S.storage=48):b.isMatrix4?(S.boundary=64,S.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),S}function p(b){let S=b.target;S.removeEventListener("dispose",p);let v=o.indexOf(S.__bindingPointIndex);o.splice(v,1),r.deleteBuffer(i[S.id]),delete i[S.id],delete s[S.id]}function m(){for(let b in i)r.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:m}}var Tc=class{constructor(t={}){let{canvas:e=uv(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!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 u=new Uint32Array(4),_=new Int32Array(4),g=null,p=null,m=[],b=[];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=jn,this._useLegacyLights=!1,this.toneMapping=Pr,this.toneMappingExposure=1;let S=this,v=!1,D=0,T=0,w=null,I=-1,M=null,y=new je,P=new je,L=null,C=new ge(0),B=0,J=e.width,O=e.height,Y=1,H=null,U=null,R=new je(0,0,J,O),at=new je(0,0,J,O),_t=!1,Ut=new Da,X=!1,ot=!1,xt=new Ue,ct=new nt,Rt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function kt(){return w===null?Y:1}let Z=n;function Jt(E,z){return e.getContext(E,z)}try{let E={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${If}`),e.addEventListener("webglcontextlost",V,!1),e.addEventListener("webglcontextrestored",Q,!1),e.addEventListener("webglcontextcreationerror",st,!1),Z===null){let z="webgl2";if(Z=Jt(z,E),Z===null)throw Jt(z)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}let It,Ft,bt,Et,Ht,W,$t,A,x,N,q,tt,it,vt,pt,lt,Lt,ht,yt,Yt,ut,Tt,Wt,qt;function ue(){It=new Sb(Z),It.init(),Tt=new $w(Z,It),Ft=new mb(Z,It,t,Tt),bt=new Zw(Z),Et=new wb(Z),Ht=new Uw,W=new Jw(Z,It,bt,Ht,Ft,Tt,Et),$t=new _b(S),A=new vb(S),x=new Pv(Z),Wt=new db(Z,x),N=new Mb(Z,x,Et,Wt),q=new Tb(Z,N,x,Et),yt=new Eb(Z,Ft,W),lt=new gb(Ht),tt=new Nw(S,$t,A,It,Ft,Wt,lt),it=new e1(S,Ht),vt=new Bw,pt=new Ww(It),ht=new fb(S,$t,A,bt,q,f,l),Lt=new qw(S,q,Ft),qt=new n1(Z,Et,Ft,bt),Yt=new pb(Z,It,Et),ut=new bb(Z,It,Et),Et.programs=tt.programs,S.capabilities=Ft,S.extensions=It,S.properties=Ht,S.renderLists=vt,S.shadowMap=Lt,S.state=bt,S.info=Et}ue();let Zt=new _f(S,Z);this.xr=Zt,this.getContext=function(){return Z},this.getContextAttributes=function(){return Z.getContextAttributes()},this.forceContextLoss=function(){let E=It.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=It.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return Y},this.setPixelRatio=function(E){E!==void 0&&(Y=E,this.setSize(J,O,!1))},this.getSize=function(E){return E.set(J,O)},this.setSize=function(E,z,G=!0){if(Zt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}J=E,O=z,e.width=Math.floor(E*Y),e.height=Math.floor(z*Y),G===!0&&(e.style.width=E+"px",e.style.height=z+"px"),this.setViewport(0,0,E,z)},this.getDrawingBufferSize=function(E){return E.set(J*Y,O*Y).floor()},this.setDrawingBufferSize=function(E,z,G){J=E,O=z,Y=G,e.width=Math.floor(E*G),e.height=Math.floor(z*G),this.setViewport(0,0,E,z)},this.getCurrentViewport=function(E){return E.copy(y)},this.getViewport=function(E){return E.copy(R)},this.setViewport=function(E,z,G,K){E.isVector4?R.set(E.x,E.y,E.z,E.w):R.set(E,z,G,K),bt.viewport(y.copy(R).multiplyScalar(Y).round())},this.getScissor=function(E){return E.copy(at)},this.setScissor=function(E,z,G,K){E.isVector4?at.set(E.x,E.y,E.z,E.w):at.set(E,z,G,K),bt.scissor(P.copy(at).multiplyScalar(Y).round())},this.getScissorTest=function(){return _t},this.setScissorTest=function(E){bt.setScissorTest(_t=E)},this.setOpaqueSort=function(E){H=E},this.setTransparentSort=function(E){U=E},this.getClearColor=function(E){return E.copy(ht.getClearColor())},this.setClearColor=function(){ht.setClearColor.apply(ht,arguments)},this.getClearAlpha=function(){return ht.getClearAlpha()},this.setClearAlpha=function(){ht.setClearAlpha.apply(ht,arguments)},this.clear=function(E=!0,z=!0,G=!0){let K=0;if(E){let $=!1;if(w!==null){let St=w.texture.format;$=St===o_||St===s_||St===r_}if($){let St=w.texture.type,At=St===Lr||St===Do||St===t_||St===Ra||St===n_||St===i_,Pt=ht.getClearColor(),Xt=ht.getClearAlpha(),Qt=Pt.r,Gt=Pt.g,Vt=Pt.b;At?(u[0]=Qt,u[1]=Gt,u[2]=Vt,u[3]=Xt,Z.clearBufferuiv(Z.COLOR,0,u)):(_[0]=Qt,_[1]=Gt,_[2]=Vt,_[3]=Xt,Z.clearBufferiv(Z.COLOR,0,_))}else K|=Z.COLOR_BUFFER_BIT}z&&(K|=Z.DEPTH_BUFFER_BIT),G&&(K|=Z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),Z.clear(K)},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",V,!1),e.removeEventListener("webglcontextrestored",Q,!1),e.removeEventListener("webglcontextcreationerror",st,!1),vt.dispose(),pt.dispose(),Ht.dispose(),$t.dispose(),A.dispose(),q.dispose(),Wt.dispose(),qt.dispose(),tt.dispose(),Zt.dispose(),Zt.removeEventListener("sessionstart",rt),Zt.removeEventListener("sessionend",k),j.stop()};function V(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function Q(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1;let E=Et.autoReset,z=Lt.enabled,G=Lt.autoUpdate,K=Lt.needsUpdate,$=Lt.type;ue(),Et.autoReset=E,Lt.enabled=z,Lt.autoUpdate=G,Lt.needsUpdate=K,Lt.type=$}function st(E){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",E.statusMessage)}function mt(E){let z=E.target;z.removeEventListener("dispose",mt),gt(z)}function gt(E){Bt(E),Ht.remove(E)}function Bt(E){let z=Ht.get(E).programs;z!==void 0&&(z.forEach(function(G){tt.releaseProgram(G)}),E.isShaderMaterial&&tt.releaseShaderCache(E))}this.renderBufferDirect=function(E,z,G,K,$,St){z===null&&(z=Rt);let At=$.isMesh&&$.matrixWorld.determinant()<0,Pt=he(E,z,G,K,$);bt.setMaterial(K,At);let Xt=G.index,Qt=1;if(K.wireframe===!0){if(Xt=N.getWireframeAttribute(G),Xt===void 0)return;Qt=2}let Gt=G.drawRange,Vt=G.attributes.position,xe=Gt.start*Qt,Be=(Gt.start+Gt.count)*Qt;St!==null&&(xe=Math.max(xe,St.start*Qt),Be=Math.min(Be,(St.start+St.count)*Qt)),Xt!==null?(xe=Math.max(xe,0),Be=Math.min(Be,Xt.count)):Vt!=null&&(xe=Math.max(xe,0),Be=Math.min(Be,Vt.count));let rn=Be-xe;if(rn<0||rn===1/0)return;Wt.setup($,K,Pt,G,Xt);let mn,ie=Yt;if(Xt!==null&&(mn=x.get(Xt),ie=ut,ie.setIndex(mn)),$.isMesh)K.wireframe===!0?(bt.setLineWidth(K.wireframeLinewidth*kt()),ie.setMode(Z.LINES)):ie.setMode(Z.TRIANGLES);else if($.isLine){let jt=K.linewidth;jt===void 0&&(jt=1),bt.setLineWidth(jt*kt()),$.isLineSegments?ie.setMode(Z.LINES):$.isLineLoop?ie.setMode(Z.LINE_LOOP):ie.setMode(Z.LINE_STRIP)}else $.isPoints?ie.setMode(Z.POINTS):$.isSprite&&ie.setMode(Z.TRIANGLES);if($.isBatchedMesh)$._multiDrawInstances!==null?ie.renderMultiDrawInstances($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount,$._multiDrawInstances):ie.renderMultiDraw($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount);else if($.isInstancedMesh)ie.renderInstances(xe,rn,$.count);else if(G.isInstancedBufferGeometry){let jt=G._maxInstanceCount!==void 0?G._maxInstanceCount:1/0,Si=Math.min(G.instanceCount,jt);ie.renderInstances(xe,rn,Si)}else ie.render(xe,rn)};function ee(E,z,G){E.transparent===!0&&E.side===Qi&&E.forceSinglePass===!1?(E.side=Fn,E.needsUpdate=!0,zt(E,z,G),E.side=Ir,E.needsUpdate=!0,zt(E,z,G),E.side=Qi):zt(E,z,G)}this.compile=function(E,z,G=null){G===null&&(G=E),p=pt.get(G),p.init(z),b.push(p),G.traverseVisible(function($){$.isLight&&$.layers.test(z.layers)&&(p.pushLight($),$.castShadow&&p.pushShadow($))}),E!==G&&E.traverseVisible(function($){$.isLight&&$.layers.test(z.layers)&&(p.pushLight($),$.castShadow&&p.pushShadow($))}),p.setupLights(S._useLegacyLights);let K=new Set;return E.traverse(function($){let St=$.material;if(St)if(Array.isArray(St))for(let At=0;At<St.length;At++){let Pt=St[At];ee(Pt,G,$),K.add(Pt)}else ee(St,G,$),K.add(St)}),b.pop(),p=null,K},this.compileAsync=function(E,z,G=null){let K=this.compile(E,z,G);return new Promise($=>{function St(){if(K.forEach(function(At){Ht.get(At).currentProgram.isReady()&&K.delete(At)}),K.size===0){$(E);return}setTimeout(St,10)}It.get("KHR_parallel_shader_compile")!==null?St():setTimeout(St,10)})};let Mt=null;function F(E){Mt&&Mt(E)}function rt(){j.stop()}function k(){j.start()}let j=new h_;j.setAnimationLoop(F),typeof self<"u"&&j.setContext(self),this.setAnimationLoop=function(E){Mt=E,Zt.setAnimationLoop(E),E===null?j.stop():j.start()},Zt.addEventListener("sessionstart",rt),Zt.addEventListener("sessionend",k),this.render=function(E,z){if(z!==void 0&&z.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;E.matrixWorldAutoUpdate===!0&&E.updateMatrixWorld(),z.parent===null&&z.matrixWorldAutoUpdate===!0&&z.updateMatrixWorld(),Zt.enabled===!0&&Zt.isPresenting===!0&&(Zt.cameraAutoUpdate===!0&&Zt.updateCamera(z),z=Zt.getCamera()),E.isScene===!0&&E.onBeforeRender(S,E,z,w),p=pt.get(E,b.length),p.init(z),b.push(p),xt.multiplyMatrices(z.projectionMatrix,z.matrixWorldInverse),Ut.setFromProjectionMatrix(xt),ot=this.localClippingEnabled,X=lt.init(this.clippingPlanes,ot),g=vt.get(E,m.length),g.init(),m.push(g),dt(E,z,0,S.sortObjects),g.finish(),S.sortObjects===!0&&g.sort(H,U);let G=Zt.enabled===!1||Zt.isPresenting===!1||Zt.hasDepthSensing()===!1;G&&ht.addToRenderList(g,E),this.info.render.frame++,X===!0&<.beginShadows();let K=p.state.shadowsArray;Lt.render(K,E,z),X===!0&<.endShadows(),this.info.autoReset===!0&&this.info.reset();let $=g.opaque,St=g.transmissive;if(p.setupLights(S._useLegacyLights),z.isArrayCamera){let At=z.cameras;if(St.length>0)for(let Pt=0,Xt=At.length;Pt<Xt;Pt++){let Qt=At[Pt];wt($,St,E,Qt)}G&&ht.render(E);for(let Pt=0,Xt=At.length;Pt<Xt;Pt++){let Qt=At[Pt];et(g,E,Qt,Qt.viewport)}}else St.length>0&&wt($,St,E,z),G&&ht.render(E),et(g,E,z);w!==null&&(W.updateMultisampleRenderTarget(w),W.updateRenderTargetMipmap(w)),E.isScene===!0&&E.onAfterRender(S,E,z),Wt.resetDefaultState(),I=-1,M=null,b.pop(),b.length>0?(p=b[b.length-1],X===!0&<.setGlobalState(S.clippingPlanes,p.state.camera)):p=null,m.pop(),m.length>0?g=m[m.length-1]:g=null};function dt(E,z,G,K){if(E.visible===!1)return;if(E.layers.test(z.layers)){if(E.isGroup)G=E.renderOrder;else if(E.isLOD)E.autoUpdate===!0&&E.update(z);else if(E.isLight)p.pushLight(E),E.castShadow&&p.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||Ut.intersectsSprite(E)){K&&ct.setFromMatrixPosition(E.matrixWorld).applyMatrix4(xt);let At=q.update(E),Pt=E.material;Pt.visible&&g.push(E,At,Pt,G,ct.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(!E.frustumCulled||Ut.intersectsObject(E))){let At=q.update(E),Pt=E.material;if(K&&(E.boundingSphere!==void 0?(E.boundingSphere===null&&E.computeBoundingSphere(),ct.copy(E.boundingSphere.center)):(At.boundingSphere===null&&At.computeBoundingSphere(),ct.copy(At.boundingSphere.center)),ct.applyMatrix4(E.matrixWorld).applyMatrix4(xt)),Array.isArray(Pt)){let Xt=At.groups;for(let Qt=0,Gt=Xt.length;Qt<Gt;Qt++){let Vt=Xt[Qt],xe=Pt[Vt.materialIndex];xe&&xe.visible&&g.push(E,At,xe,G,ct.z,Vt)}}else Pt.visible&&g.push(E,At,Pt,G,ct.z,null)}}let St=E.children;for(let At=0,Pt=St.length;At<Pt;At++)dt(St[At],z,G,K)}function et(E,z,G,K){let $=E.opaque,St=E.transmissive,At=E.transparent;p.setupLightsView(G),X===!0&<.setGlobalState(S.clippingPlanes,G),K&&bt.viewport(y.copy(K)),$.length>0&&ft($,z,G),St.length>0&&ft(St,z,G),At.length>0&&ft(At,z,G),bt.buffers.depth.setTest(!0),bt.buffers.depth.setMask(!0),bt.buffers.color.setMask(!0),bt.setPolygonOffset(!1)}function wt(E,z,G,K){if((G.isScene===!0?G.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[K.id]===void 0&&(p.state.transmissionRenderTarget[K.id]=new er(1,1,{generateMipmaps:!0,type:It.has("EXT_color_buffer_half_float")||It.has("EXT_color_buffer_float")?Lc:Lr,minFilter:ws,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let St=p.state.transmissionRenderTarget[K.id],At=K.viewport||y;St.setSize(At.z,At.w);let Pt=S.getRenderTarget();S.setRenderTarget(St),S.getClearColor(C),B=S.getClearAlpha(),B<1&&S.setClearColor(16777215,.5),S.clear();let Xt=S.toneMapping;S.toneMapping=Pr;let Qt=K.viewport;if(K.viewport!==void 0&&(K.viewport=void 0),p.setupLightsView(K),X===!0&<.setGlobalState(S.clippingPlanes,K),ft(E,G,K),W.updateMultisampleRenderTarget(St),W.updateRenderTargetMipmap(St),It.has("WEBGL_multisampled_render_to_texture")===!1){let Gt=!1;for(let Vt=0,xe=z.length;Vt<xe;Vt++){let Be=z[Vt],rn=Be.object,mn=Be.geometry,ie=Be.material,jt=Be.group;if(ie.side===Qi&&rn.layers.test(K.layers)){let Si=ie.side;ie.side=Fn,ie.needsUpdate=!0,Dt(rn,G,K,mn,ie,jt),ie.side=Si,ie.needsUpdate=!0,Gt=!0}}Gt===!0&&(W.updateMultisampleRenderTarget(St),W.updateRenderTargetMipmap(St))}S.setRenderTarget(Pt),S.setClearColor(C,B),Qt!==void 0&&(K.viewport=Qt),S.toneMapping=Xt}function ft(E,z,G){let K=z.isScene===!0?z.overrideMaterial:null;for(let $=0,St=E.length;$<St;$++){let At=E[$],Pt=At.object,Xt=At.geometry,Qt=K===null?At.material:K,Gt=At.group;Pt.layers.test(G.layers)&&Dt(Pt,z,G,Xt,Qt,Gt)}}function Dt(E,z,G,K,$,St){E.onBeforeRender(S,z,G,K,$,St),E.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),$.onBeforeRender(S,z,G,K,E,St),$.transparent===!0&&$.side===Qi&&$.forceSinglePass===!1?($.side=Fn,$.needsUpdate=!0,S.renderBufferDirect(G,z,K,$,E,St),$.side=Ir,$.needsUpdate=!0,S.renderBufferDirect(G,z,K,$,E,St),$.side=Qi):S.renderBufferDirect(G,z,K,$,E,St),E.onAfterRender(S,z,G,K,$,St)}function zt(E,z,G){z.isScene!==!0&&(z=Rt);let K=Ht.get(E),$=p.state.lights,St=p.state.shadowsArray,At=$.state.version,Pt=tt.getParameters(E,$.state,St,z,G),Xt=tt.getProgramCacheKey(Pt),Qt=K.programs;K.environment=E.isMeshStandardMaterial?z.environment:null,K.fog=z.fog,K.envMap=(E.isMeshStandardMaterial?A:$t).get(E.envMap||K.environment),K.envMapRotation=K.environment!==null&&E.envMap===null?z.environmentRotation:E.envMapRotation,Qt===void 0&&(E.addEventListener("dispose",mt),Qt=new Map,K.programs=Qt);let Gt=Qt.get(Xt);if(Gt!==void 0){if(K.currentProgram===Gt&&K.lightsStateVersion===At)return te(E,Pt),Gt}else Pt.uniforms=tt.getUniforms(E),E.onBuild(G,Pt,S),E.onBeforeCompile(Pt,S),Gt=tt.acquireProgram(Pt,Xt),Qt.set(Xt,Gt),K.uniforms=Pt.uniforms;let Vt=K.uniforms;return(!E.isShaderMaterial&&!E.isRawShaderMaterial||E.clipping===!0)&&(Vt.clippingPlanes=lt.uniform),te(E,Pt),K.needsLights=ae(E),K.lightsStateVersion=At,K.needsLights&&(Vt.ambientLightColor.value=$.state.ambient,Vt.lightProbe.value=$.state.probe,Vt.directionalLights.value=$.state.directional,Vt.directionalLightShadows.value=$.state.directionalShadow,Vt.spotLights.value=$.state.spot,Vt.spotLightShadows.value=$.state.spotShadow,Vt.rectAreaLights.value=$.state.rectArea,Vt.ltc_1.value=$.state.rectAreaLTC1,Vt.ltc_2.value=$.state.rectAreaLTC2,Vt.pointLights.value=$.state.point,Vt.pointLightShadows.value=$.state.pointShadow,Vt.hemisphereLights.value=$.state.hemi,Vt.directionalShadowMap.value=$.state.directionalShadowMap,Vt.directionalShadowMatrix.value=$.state.directionalShadowMatrix,Vt.spotShadowMap.value=$.state.spotShadowMap,Vt.spotLightMatrix.value=$.state.spotLightMatrix,Vt.spotLightMap.value=$.state.spotLightMap,Vt.pointShadowMap.value=$.state.pointShadowMap,Vt.pointShadowMatrix.value=$.state.pointShadowMatrix),K.currentProgram=Gt,K.uniformsList=null,Gt}function Nt(E){if(E.uniformsList===null){let z=E.currentProgram.getUniforms();E.uniformsList=Eo.seqWithValue(z.seq,E.uniforms)}return E.uniformsList}function te(E,z){let G=Ht.get(E);G.outputColorSpace=z.outputColorSpace,G.batching=z.batching,G.instancing=z.instancing,G.instancingColor=z.instancingColor,G.instancingMorph=z.instancingMorph,G.skinning=z.skinning,G.morphTargets=z.morphTargets,G.morphNormals=z.morphNormals,G.morphColors=z.morphColors,G.morphTargetsCount=z.morphTargetsCount,G.numClippingPlanes=z.numClippingPlanes,G.numIntersection=z.numClipIntersection,G.vertexAlphas=z.vertexAlphas,G.vertexTangents=z.vertexTangents,G.toneMapping=z.toneMapping}function he(E,z,G,K,$){z.isScene!==!0&&(z=Rt),W.resetTextureUnits();let St=z.fog,At=K.isMeshStandardMaterial?z.environment:null,Pt=w===null?S.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:Ur,Xt=(K.isMeshStandardMaterial?A:$t).get(K.envMap||At),Qt=K.vertexColors===!0&&!!G.attributes.color&&G.attributes.color.itemSize===4,Gt=!!G.attributes.tangent&&(!!K.normalMap||K.anisotropy>0),Vt=!!G.morphAttributes.position,xe=!!G.morphAttributes.normal,Be=!!G.morphAttributes.color,rn=Pr;K.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(rn=S.toneMapping);let mn=G.morphAttributes.position||G.morphAttributes.normal||G.morphAttributes.color,ie=mn!==void 0?mn.length:0,jt=Ht.get(K),Si=p.state.lights;if(X===!0&&(ot===!0||E!==M)){let Gn=E===M&&K.id===I;lt.setState(K,E,Gn)}let ve=!1;K.version===jt.__version?(jt.needsLights&&jt.lightsStateVersion!==Si.state.version||jt.outputColorSpace!==Pt||$.isBatchedMesh&&jt.batching===!1||!$.isBatchedMesh&&jt.batching===!0||$.isInstancedMesh&&jt.instancing===!1||!$.isInstancedMesh&&jt.instancing===!0||$.isSkinnedMesh&&jt.skinning===!1||!$.isSkinnedMesh&&jt.skinning===!0||$.isInstancedMesh&&jt.instancingColor===!0&&$.instanceColor===null||$.isInstancedMesh&&jt.instancingColor===!1&&$.instanceColor!==null||$.isInstancedMesh&&jt.instancingMorph===!0&&$.morphTexture===null||$.isInstancedMesh&&jt.instancingMorph===!1&&$.morphTexture!==null||jt.envMap!==Xt||K.fog===!0&&jt.fog!==St||jt.numClippingPlanes!==void 0&&(jt.numClippingPlanes!==lt.numPlanes||jt.numIntersection!==lt.numIntersection)||jt.vertexAlphas!==Qt||jt.vertexTangents!==Gt||jt.morphTargets!==Vt||jt.morphNormals!==xe||jt.morphColors!==Be||jt.toneMapping!==rn||jt.morphTargetsCount!==ie)&&(ve=!0):(ve=!0,jt.__version=K.version);let Gr=jt.currentProgram;ve===!0&&(Gr=zt(K,z,$));let td=!1,ko=!1,Wc=!1,sn=Gr.getUniforms(),ar=jt.uniforms;if(bt.useProgram(Gr.program)&&(td=!0,ko=!0,Wc=!0),K.id!==I&&(I=K.id,ko=!0),td||M!==E){sn.setValue(Z,"projectionMatrix",E.projectionMatrix),sn.setValue(Z,"viewMatrix",E.matrixWorldInverse);let Gn=sn.map.cameraPosition;Gn!==void 0&&Gn.setValue(Z,ct.setFromMatrixPosition(E.matrixWorld)),Ft.logarithmicDepthBuffer&&sn.setValue(Z,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),(K.isMeshPhongMaterial||K.isMeshToonMaterial||K.isMeshLambertMaterial||K.isMeshBasicMaterial||K.isMeshStandardMaterial||K.isShaderMaterial)&&sn.setValue(Z,"isOrthographic",E.isOrthographicCamera===!0),M!==E&&(M=E,ko=!0,Wc=!0)}if($.isSkinnedMesh){sn.setOptional(Z,$,"bindMatrix"),sn.setOptional(Z,$,"bindMatrixInverse");let Gn=$.skeleton;Gn&&(Gn.boneTexture===null&&Gn.computeBoneTexture(),sn.setValue(Z,"boneTexture",Gn.boneTexture,W))}$.isBatchedMesh&&(sn.setOptional(Z,$,"batchingTexture"),sn.setValue(Z,"batchingTexture",$._matricesTexture,W));let Xc=G.morphAttributes;if((Xc.position!==void 0||Xc.normal!==void 0||Xc.color!==void 0)&&yt.update($,G,Gr),(ko||jt.receiveShadow!==$.receiveShadow)&&(jt.receiveShadow=$.receiveShadow,sn.setValue(Z,"receiveShadow",$.receiveShadow)),K.isMeshGouraudMaterial&&K.envMap!==null&&(ar.envMap.value=Xt,ar.flipEnvMap.value=Xt.isCubeTexture&&Xt.isRenderTargetTexture===!1?-1:1),K.isMeshStandardMaterial&&K.envMap===null&&z.environment!==null&&(ar.envMapIntensity.value=z.environmentIntensity),ko&&(sn.setValue(Z,"toneMappingExposure",S.toneMappingExposure),jt.needsLights&&me(ar,Wc),St&&K.fog===!0&&it.refreshFogUniforms(ar,St),it.refreshMaterialUniforms(ar,K,Y,O,p.state.transmissionRenderTarget[E.id]),Eo.upload(Z,Nt(jt),ar,W)),K.isShaderMaterial&&K.uniformsNeedUpdate===!0&&(Eo.upload(Z,Nt(jt),ar,W),K.uniformsNeedUpdate=!1),K.isSpriteMaterial&&sn.setValue(Z,"center",$.center),sn.setValue(Z,"modelViewMatrix",$.modelViewMatrix),sn.setValue(Z,"normalMatrix",$.normalMatrix),sn.setValue(Z,"modelMatrix",$.matrixWorld),K.isShaderMaterial||K.isRawShaderMaterial){let Gn=K.uniformsGroups;for(let Yc=0,G_=Gn.length;Yc<G_;Yc++){let ed=Gn[Yc];qt.update(ed,Gr),qt.bind(ed,Gr)}}return Gr}function me(E,z){E.ambientLightColor.needsUpdate=z,E.lightProbe.needsUpdate=z,E.directionalLights.needsUpdate=z,E.directionalLightShadows.needsUpdate=z,E.pointLights.needsUpdate=z,E.pointLightShadows.needsUpdate=z,E.spotLights.needsUpdate=z,E.spotLightShadows.needsUpdate=z,E.rectAreaLights.needsUpdate=z,E.hemisphereLights.needsUpdate=z}function ae(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&E.lights===!0}this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(E,z,G){Ht.get(E.texture).__webglTexture=z,Ht.get(E.depthTexture).__webglTexture=G;let K=Ht.get(E);K.__hasExternalTextures=!0,K.__autoAllocateDepthBuffer=G===void 0,K.__autoAllocateDepthBuffer||It.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),K.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(E,z){let G=Ht.get(E);G.__webglFramebuffer=z,G.__useDefaultFramebuffer=z===void 0},this.setRenderTarget=function(E,z=0,G=0){w=E,D=z,T=G;let K=!0,$=null,St=!1,At=!1;if(E){let Xt=Ht.get(E);Xt.__useDefaultFramebuffer!==void 0?(bt.bindFramebuffer(Z.FRAMEBUFFER,null),K=!1):Xt.__webglFramebuffer===void 0?W.setupRenderTarget(E):Xt.__hasExternalTextures&&W.rebindTextures(E,Ht.get(E.texture).__webglTexture,Ht.get(E.depthTexture).__webglTexture);let Qt=E.texture;(Qt.isData3DTexture||Qt.isDataArrayTexture||Qt.isCompressedArrayTexture)&&(At=!0);let Gt=Ht.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(Array.isArray(Gt[z])?$=Gt[z][G]:$=Gt[z],St=!0):E.samples>0&&W.useMultisampledRTT(E)===!1?$=Ht.get(E).__webglMultisampledFramebuffer:Array.isArray(Gt)?$=Gt[G]:$=Gt,y.copy(E.viewport),P.copy(E.scissor),L=E.scissorTest}else y.copy(R).multiplyScalar(Y).floor(),P.copy(at).multiplyScalar(Y).floor(),L=_t;if(bt.bindFramebuffer(Z.FRAMEBUFFER,$)&&K&&bt.drawBuffers(E,$),bt.viewport(y),bt.scissor(P),bt.setScissorTest(L),St){let Xt=Ht.get(E.texture);Z.framebufferTexture2D(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Z.TEXTURE_CUBE_MAP_POSITIVE_X+z,Xt.__webglTexture,G)}else if(At){let Xt=Ht.get(E.texture),Qt=z||0;Z.framebufferTextureLayer(Z.FRAMEBUFFER,Z.COLOR_ATTACHMENT0,Xt.__webglTexture,G||0,Qt)}I=-1},this.readRenderTargetPixels=function(E,z,G,K,$,St,At){if(!(E&&E.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Pt=Ht.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&At!==void 0&&(Pt=Pt[At]),Pt){bt.bindFramebuffer(Z.FRAMEBUFFER,Pt);try{let Xt=E.texture,Qt=Xt.format,Gt=Xt.type;if(!Ft.textureFormatReadable(Qt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ft.textureTypeReadable(Gt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}z>=0&&z<=E.width-K&&G>=0&&G<=E.height-$&&Z.readPixels(z,G,K,$,Tt.convert(Qt),Tt.convert(Gt),St)}finally{let Xt=w!==null?Ht.get(w).__webglFramebuffer:null;bt.bindFramebuffer(Z.FRAMEBUFFER,Xt)}}},this.copyFramebufferToTexture=function(E,z,G=0){let K=Math.pow(2,-G),$=Math.floor(z.image.width*K),St=Math.floor(z.image.height*K);W.setTexture2D(z,0),Z.copyTexSubImage2D(Z.TEXTURE_2D,G,0,0,E.x,E.y,$,St),bt.unbindTexture()},this.copyTextureToTexture=function(E,z,G,K=0){let $=z.image.width,St=z.image.height,At=Tt.convert(G.format),Pt=Tt.convert(G.type);W.setTexture2D(G,0),Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL,G.flipY),Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,G.premultiplyAlpha),Z.pixelStorei(Z.UNPACK_ALIGNMENT,G.unpackAlignment),z.isDataTexture?Z.texSubImage2D(Z.TEXTURE_2D,K,E.x,E.y,$,St,At,Pt,z.image.data):z.isCompressedTexture?Z.compressedTexSubImage2D(Z.TEXTURE_2D,K,E.x,E.y,z.mipmaps[0].width,z.mipmaps[0].height,At,z.mipmaps[0].data):Z.texSubImage2D(Z.TEXTURE_2D,K,E.x,E.y,At,Pt,z.image),K===0&&G.generateMipmaps&&Z.generateMipmap(Z.TEXTURE_2D),bt.unbindTexture()},this.copyTextureToTexture3D=function(E,z,G,K,$=0){let St=E.max.x-E.min.x,At=E.max.y-E.min.y,Pt=E.max.z-E.min.z,Xt=Tt.convert(K.format),Qt=Tt.convert(K.type),Gt;if(K.isData3DTexture)W.setTexture3D(K,0),Gt=Z.TEXTURE_3D;else if(K.isDataArrayTexture||K.isCompressedArrayTexture)W.setTexture2DArray(K,0),Gt=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,K.flipY),Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),Z.pixelStorei(Z.UNPACK_ALIGNMENT,K.unpackAlignment);let Vt=Z.getParameter(Z.UNPACK_ROW_LENGTH),xe=Z.getParameter(Z.UNPACK_IMAGE_HEIGHT),Be=Z.getParameter(Z.UNPACK_SKIP_PIXELS),rn=Z.getParameter(Z.UNPACK_SKIP_ROWS),mn=Z.getParameter(Z.UNPACK_SKIP_IMAGES),ie=G.isCompressedTexture?G.mipmaps[$]:G.image;Z.pixelStorei(Z.UNPACK_ROW_LENGTH,ie.width),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,ie.height),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,E.min.x),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,E.min.y),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,E.min.z),G.isDataTexture||G.isData3DTexture?Z.texSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,Qt,ie.data):K.isCompressedArrayTexture?Z.compressedTexSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,ie.data):Z.texSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,Qt,ie),Z.pixelStorei(Z.UNPACK_ROW_LENGTH,Vt),Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT,xe),Z.pixelStorei(Z.UNPACK_SKIP_PIXELS,Be),Z.pixelStorei(Z.UNPACK_SKIP_ROWS,rn),Z.pixelStorei(Z.UNPACK_SKIP_IMAGES,mn),$===0&&K.generateMipmaps&&Z.generateMipmap(Gt),bt.unbindTexture()},this.initTexture=function(E){E.isCubeTexture?W.setTextureCube(E,0):E.isData3DTexture?W.setTexture3D(E,0):E.isDataArrayTexture||E.isCompressedArrayTexture?W.setTexture2DArray(E,0):W.setTexture2D(E,0),bt.unbindTexture()},this.resetState=function(){D=0,T=0,w=null,bt.reset(),Wt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return tr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Ff?"display-p3":"srgb",e.unpackColorSpace=Se.workingColorSpace===Fc?"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 Ac=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new ge(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}}},Dc=class extends pn{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 nr,this.environmentIntensity=1,this.environmentRotation=new nr,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 xf=class extends Ts{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new ge(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}},qg=new Ue,yf=new mc,nc=new Co,ic=new nt,Cc=class extends pn{constructor(t=new Fi,e=new xf){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(),nc.copy(n.boundingSphere),nc.applyMatrix4(i),nc.radius+=s,t.ray.intersectsSphere(nc)===!1)return;qg.copy(i).invert(),yf.copy(t.ray).applyMatrix4(qg);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,d=n.attributes.position;if(c!==null){let f=Math.max(0,o.start),u=Math.min(c.count,o.start+o.count);for(let _=f,g=u;_<g;_++){let p=c.getX(_);ic.fromBufferAttribute(d,p),Zg(ic,p,l,i,t,e,this)}}else{let f=Math.max(0,o.start),u=Math.min(d.count,o.start+o.count);for(let _=f,g=u;_<g;_++)ic.fromBufferAttribute(d,_),Zg(ic,_,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 Zg(r,t,e,n,i,s,o){let a=yf.distanceSqToPoint(r);if(a<e){let l=new nt;yf.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 rc(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 i1(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Po=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_(){}},vf=class extends Po{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:eg,endingEnd:eg}}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 ng:s=t,a=2*e-n;break;case ig: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 ng:o=t,l=2*n-e;break;case ig:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,h=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*h,this._offsetNext=o*h}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=this._offsetPrev,d=this._offsetNext,f=this._weightPrev,u=this._weightNext,_=(n-e)/(i-e),g=_*_,p=g*_,m=-f*p+2*f*g-f*_,b=(1+f)*p+(-1.5-2*f)*g+(-.5+f)*_+1,S=(-1-u)*p+(1.5+u)*g+.5*_,v=u*p-u*g;for(let D=0;D!==a;++D)s[D]=m*o[h+D]+b*o[c+D]+S*o[l+D]+v*o[d+D];return s}},Sf=class extends Po{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,h=(n-e)/(i-e),d=1-h;for(let f=0;f!==a;++f)s[f]=o[c+f]*d+o[l+f]*h;return s}},Mf=class extends Po{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},gi=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=rc(e,this.TimeBufferType),this.values=rc(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:rc(t.times,Array),values:rc(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new Mf(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Sf(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new vf(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case oc:e=this.InterpolantFactoryMethodDiscrete;break;case ac:e=this.InterpolantFactoryMethodLinear;break;case vh: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 oc;case this.InterpolantFactoryMethodLinear:return ac;case this.InterpolantFactoryMethodSmooth:return vh}}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&&i1(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()===vh,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],h=t[a+1];if(c!==h&&(a!==1||c!==t[0]))if(i)l=!0;else{let d=a*n,f=d-n,u=d+n;for(let _=0;_!==n;++_){let g=e[d+_];if(g!==e[f+_]||g!==e[u+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let d=a*n,f=o*n;for(let u=0;u!==n;++u)e[f+u]=e[d+u]}++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}};gi.prototype.TimeBufferType=Float32Array;gi.prototype.ValueBufferType=Float32Array;gi.prototype.DefaultInterpolation=ac;var As=class extends gi{};As.prototype.ValueTypeName="bool";As.prototype.ValueBufferType=Array;As.prototype.DefaultInterpolation=oc;As.prototype.InterpolantFactoryMethodLinear=void 0;As.prototype.InterpolantFactoryMethodSmooth=void 0;var bf=class extends gi{};bf.prototype.ValueTypeName="color";var wf=class extends gi{};wf.prototype.ValueTypeName="number";var Ef=class extends Po{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 h=c+a;c!==h;c+=4)Nr.slerpFlat(s,0,o,c-a,o,c,l);return s}},Ca=class extends gi{InterpolantFactoryMethodLinear(t){return new Ef(this.times,this.values,this.getValueSize(),t)}};Ca.prototype.ValueTypeName="quaternion";Ca.prototype.DefaultInterpolation=ac;Ca.prototype.InterpolantFactoryMethodSmooth=void 0;var Ds=class extends gi{};Ds.prototype.ValueTypeName="string";Ds.prototype.ValueBufferType=Array;Ds.prototype.DefaultInterpolation=oc;Ds.prototype.InterpolantFactoryMethodLinear=void 0;Ds.prototype.InterpolantFactoryMethodSmooth=void 0;var Tf=class extends gi{};Tf.prototype.ValueTypeName="vector";var Af=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(h){a++,s===!1&&i.onStart!==void 0&&i.onStart(h,o,a),s=!0},this.itemEnd=function(h){o++,i.onProgress!==void 0&&i.onProgress(h,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return l?l(h):h},this.setURLModifier=function(h){return l=h,this},this.addHandler=function(h,d){return c.push(h,d),this},this.removeHandler=function(h){let d=c.indexOf(h);return d!==-1&&c.splice(d,2),this},this.getHandler=function(h){for(let d=0,f=c.length;d<f;d+=2){let u=c[d],_=c[d+1];if(u.global&&(u.lastIndex=0),u.test(h))return _}return null}}},r1=new Af,Df=class{constructor(t){this.manager=t!==void 0?t:r1,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}};Df.DEFAULT_MATERIAL_NAME="__DEFAULT";var Rc=class extends pn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new ge(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}},Pc=class extends Rc{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(pn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new ge(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},qh=new Ue,Jg=new nt,$g=new nt,Cf=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new _e(512,512),this.map=null,this.mapPass=null,this.matrix=new Ue,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Da,this._frameExtents=new _e(1,1),this._viewportCount=1,this._viewports=[new je(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;Jg.setFromMatrixPosition(t.matrixWorld),e.position.copy(Jg),$g.setFromMatrixPosition(t.target.matrixWorld),e.lookAt($g),e.updateMatrixWorld(),qh.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(qh),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(qh)}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 Rf=class extends Cf{constructor(){super(new bc(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Cs=class extends Rc{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(pn.DEFAULT_UP),this.updateMatrix(),this.target=new pn,this.shadow=new Rf}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var Uf="\\[\\]\\.:\\/",s1=new RegExp("["+Uf+"]","g"),Of="[^"+Uf+"]",o1="[^"+Uf.replace("\\.","")+"]",a1=/((?:WC+[\/:])*)/.source.replace("WC",Of),l1=/(WCOD+)?/.source.replace("WCOD",o1),c1=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Of),u1=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Of),h1=new RegExp("^"+a1+l1+c1+u1+"$"),f1=["material","materials","bones","map"],Pf=class{constructor(t,e,n){let i=n||De.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()}},De=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(s1,"")}static parseTrackName(t){let e=h1.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);f1.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 h=0;h<t.length;h++)if(t[h].name===c){c=h;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}};De.Composite=Pf;De.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};De.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};De.prototype.GetterByBindingType=[De.prototype._getValue_direct,De.prototype._getValue_array,De.prototype._getValue_arrayElement,De.prototype._getValue_toArray];De.prototype.SetterByBindingTypeAndVersioning=[[De.prototype._setValue_direct,De.prototype._setValue_direct_setNeedsUpdate,De.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[De.prototype._setValue_array,De.prototype._setValue_array_setNeedsUpdate,De.prototype._setValue_array_setMatrixWorldNeedsUpdate],[De.prototype._setValue_arrayElement,De.prototype._setValue_arrayElement_setNeedsUpdate,De.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[De.prototype._setValue_fromArray,De.prototype._setValue_fromArray_setNeedsUpdate,De.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var CE=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:If}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=If);var __=()=>{var r=new Dr;function t(){let e=document.querySelector("#canvas"),n=new Tc({canvas:e,antialias:!0,alpha:!0}),i=new Dc,s=new Tn(18);s.near=1,s.far=2e3,s.position.z=-10,n.outputColorSpace=jn,n.shadowMap.enabled=!0,n.shadowMap.type=Lf,i.fog=new Ac(3741705,9,15),i.add(r);function o(){let h=new Pc(16777215,41378,1),d=new Cs(3355443,4);d.position.set(5,5,5),d.lookAt(0,0,0),d.castShadow=!0,d.shadow.mapSize.width=512,d.shadow.mapSize.height=512,d.shadow.camera.near=.5,d.shadow.camera.far=500,i.add(d),i.add(h);let f=[];f[0]=new Cs(16777215,1),f[0].position.set(1,0,0),f[1]=new Cs(11460838,1),f[1].position.set(.75,1,.5),f[2]=new Cs(14277490,1),f[2].position.set(-.75,-1,.5),i.add(f[0]),i.add(f[1]),i.add(f[2])}function a(h,d){let f=new Fi,u=[],_=[],g=d||25,p=g/2;for(let S=0;S<(h||7e3);S++){let v=Math.random()*g-p,D=Math.random()*g-p,T=Math.random()*g-p;u.push(v,D,T),_.push(Math.random()*.9+.1)}f.setAttribute("position",new ei(u,3)),f.setAttribute("opacity",new ei(_,1)),f.computeBoundingSphere();let m=new ii({vertexShader:`
|
|
3821
|
+
}`,gf=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 ni,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 ii({vertexShader:jw,fragmentShader:Qw,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new mi(new Mc(20,20),i)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}},_f=class extends Fr{constructor(t,e){super();let n=this,i=null,s=1,o=null,a="local-floor",l=1,c=null,h=null,d=null,f=null,u=null,_=null,g=new gf,p=e.getContextAttributes(),m=null,b=null,S=[],v=[],C=new _e,T=null,w=new Tn;w.layers.enable(1),w.viewport=new je;let P=new Tn;P.layers.enable(2),P.viewport=new je;let M=[w,P],y=new mf;y.layers.enable(1),y.layers.enable(2);let L=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(q){let ot=S[q];return ot===void 0&&(ot=new Ea,S[q]=ot),ot.getTargetRaySpace()},this.getControllerGrip=function(q){let ot=S[q];return ot===void 0&&(ot=new Ea,S[q]=ot),ot.getGripSpace()},this.getHand=function(q){let ot=S[q];return ot===void 0&&(ot=new Ea,S[q]=ot),ot.getHandSpace()};function D(q){let ot=v.indexOf(q.inputSource);if(ot===-1)return;let xt=S[ot];xt!==void 0&&(xt.update(q.inputSource,q.frame,c||o),xt.dispatchEvent({type:q.type,data:q.inputSource}))}function O(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",O),i.removeEventListener("inputsourceschange",X);for(let q=0;q<S.length;q++){let ot=v[q];ot!==null&&(v[q]=null,S[q].disconnect(ot))}L=null,I=null,g.reset(),t.setRenderTarget(m),u=null,f=null,d=null,i=null,b=null,Ut.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(C.width,C.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:u},this.getBinding=function(){return d},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",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",O),i.addEventListener("inputsourceschange",X),p.xrCompatible!==!0&&await e.makeXRCompatible(),T=t.getPixelRatio(),t.getSize(C),i.renderState.layers===void 0){let ot={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:s};u=new XRWebGLLayer(i,e,ot),i.updateRenderState({baseLayer:u}),t.setPixelRatio(1),t.setSize(u.framebufferWidth,u.framebufferHeight,!1),b=new er(u.framebufferWidth,u.framebufferHeight,{format:Li,type:Lr,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let ot=null,xt=null,ct=null;p.depth&&(ct=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,ot=p.stencil?Ta:bo,xt=p.stencil?Ra:Do);let Rt={colorFormat:e.RGBA8,depthFormat:ct,scaleFactor:s};d=new XRWebGLBinding(i,e),f=d.createProjectionLayer(Rt),i.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),b=new er(f.textureWidth,f.textureHeight,{format:Li,type:Lr,depthTexture:new Ec(f.textureWidth,f.textureHeight,xt,void 0,void 0,void 0,void 0,void 0,void 0,ot),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1})}b.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),Ut.setContext(i),Ut.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function X(q){for(let ot=0;ot<q.removed.length;ot++){let xt=q.removed[ot],ct=v.indexOf(xt);ct>=0&&(v[ct]=null,S[ct].disconnect(xt))}for(let ot=0;ot<q.added.length;ot++){let xt=q.added[ot],ct=v.indexOf(xt);if(ct===-1){for(let kt=0;kt<S.length;kt++)if(kt>=v.length){v.push(xt),ct=kt;break}else if(v[kt]===null){v[kt]=xt,ct=kt;break}if(ct===-1)break}let Rt=S[ct];Rt&&Rt.connect(xt)}}let H=new nt,G=new nt;function B(q,ot,xt){H.setFromMatrixPosition(ot.matrixWorld),G.setFromMatrixPosition(xt.matrixWorld);let ct=H.distanceTo(G),Rt=ot.projectionMatrix.elements,kt=xt.projectionMatrix.elements,J=Rt[14]/(Rt[10]-1),$t=Rt[14]/(Rt[10]+1),It=(Rt[9]+1)/Rt[5],Ft=(Rt[9]-1)/Rt[5],bt=(Rt[8]-1)/Rt[0],Et=(kt[8]+1)/kt[0],Ht=J*bt,Y=J*Et,Kt=ct/(-bt+Et),A=Kt*-bt;ot.matrixWorld.decompose(q.position,q.quaternion,q.scale),q.translateX(A),q.translateZ(Kt),q.matrixWorld.compose(q.position,q.quaternion,q.scale),q.matrixWorldInverse.copy(q.matrixWorld).invert();let x=J+Kt,N=$t+Kt,Z=Ht-A,tt=Y+(ct-A),it=It*$t/N*x,vt=Ft*$t/N*x;q.projectionMatrix.makePerspective(Z,tt,it,vt,x,N),q.projectionMatrixInverse.copy(q.projectionMatrix).invert()}function U(q,ot){ot===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(ot.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),y.near=P.near=w.near=q.near,y.far=P.far=w.far=q.far,(L!==y.near||I!==y.far)&&(i.updateRenderState({depthNear:y.near,depthFar:y.far}),L=y.near,I=y.far,w.near=L,w.far=I,P.near=L,P.far=I,w.updateProjectionMatrix(),P.updateProjectionMatrix(),q.updateProjectionMatrix());let ot=q.parent,xt=y.cameras;U(y,ot);for(let ct=0;ct<xt.length;ct++)U(xt[ct],ot);xt.length===2?B(y,w,P):y.projectionMatrix.copy(w.projectionMatrix),R(q,y,ot)};function R(q,ot,xt){xt===null?q.matrix.copy(ot.matrixWorld):(q.matrix.copy(xt.matrixWorld),q.matrix.invert(),q.matrix.multiply(ot.matrixWorld)),q.matrix.decompose(q.position,q.quaternion,q.scale),q.updateMatrixWorld(!0),q.projectionMatrix.copy(ot.projectionMatrix),q.projectionMatrixInverse.copy(ot.projectionMatrixInverse),q.isPerspectiveCamera&&(q.fov=tf*2*Math.atan(1/q.projectionMatrix.elements[5]),q.zoom=1)}this.getCamera=function(){return y},this.getFoveation=function(){if(!(f===null&&u===null))return l},this.setFoveation=function(q){l=q,f!==null&&(f.fixedFoveation=q),u!==null&&u.fixedFoveation!==void 0&&(u.fixedFoveation=q)},this.hasDepthSensing=function(){return g.texture!==null};let at=null;function _t(q,ot){if(h=ot.getViewerPose(c||o),_=ot,h!==null){let xt=h.views;u!==null&&(t.setRenderTargetFramebuffer(b,u.framebuffer),t.setRenderTarget(b));let ct=!1;xt.length!==y.cameras.length&&(y.cameras.length=0,ct=!0);for(let kt=0;kt<xt.length;kt++){let J=xt[kt],$t=null;if(u!==null)$t=u.getViewport(J);else{let Ft=d.getViewSubImage(f,J);$t=Ft.viewport,kt===0&&(t.setRenderTargetTextures(b,Ft.colorTexture,f.ignoreDepthValues?void 0:Ft.depthStencilTexture),t.setRenderTarget(b))}let It=M[kt];It===void 0&&(It=new Tn,It.layers.enable(kt),It.viewport=new je,M[kt]=It),It.matrix.fromArray(J.transform.matrix),It.matrix.decompose(It.position,It.quaternion,It.scale),It.projectionMatrix.fromArray(J.projectionMatrix),It.projectionMatrixInverse.copy(It.projectionMatrix).invert(),It.viewport.set($t.x,$t.y,$t.width,$t.height),kt===0&&(y.matrix.copy(It.matrix),y.matrix.decompose(y.position,y.quaternion,y.scale)),ct===!0&&y.cameras.push(It)}let Rt=i.enabledFeatures;if(Rt&&Rt.includes("depth-sensing")){let kt=d.getDepthInformation(xt[0]);kt&&kt.isValid&&kt.texture&&g.init(t,kt,i.renderState)}}for(let xt=0;xt<S.length;xt++){let ct=v[xt],Rt=S[xt];ct!==null&&Rt!==void 0&&Rt.update(ct,ot,c||o)}g.render(t,y),at&&at(q,ot),ot.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:ot}),_=null}let Ut=new h_;Ut.setAnimationLoop(_t),this.setAnimationLoop=function(q){at=q},this.dispose=function(){}}},ys=new nr,t1=new Ue;function e1(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,u_(r)),m.isFog?(p.fogNear.value=m.near,p.fogFar.value=m.far):m.isFogExp2&&(p.fogDensity.value=m.density)}function i(p,m,b,S,v){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(p,m):m.isMeshToonMaterial?(s(p,m),d(p,m)):m.isMeshPhongMaterial?(s(p,m),h(p,m)):m.isMeshStandardMaterial?(s(p,m),f(p,m),m.isMeshPhysicalMaterial&&u(p,m,v)):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,b,S):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===Fn&&(p.bumpScale.value*=-1)),m.normalMap&&(p.normalMap.value=m.normalMap,e(m.normalMap,p.normalMapTransform),p.normalScale.value.copy(m.normalScale),m.side===Fn&&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 b=t.get(m),S=b.envMap,v=b.envMapRotation;if(S&&(p.envMap.value=S,ys.copy(v),ys.x*=-1,ys.y*=-1,ys.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(ys.y*=-1,ys.z*=-1),p.envMapRotation.value.setFromMatrix4(t1.makeRotationFromEuler(ys)),p.flipEnvMap.value=S.isCubeTexture&&S.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 C=r._useLegacyLights===!0?Math.PI:1;p.lightMapIntensity.value=m.lightMapIntensity*C,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,b,S){p.diffuse.value.copy(m.color),p.opacity.value=m.opacity,p.size.value=m.size*b,p.scale.value=S*.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 h(p,m){p.specular.value.copy(m.specular),p.shininess.value=Math.max(m.shininess,1e-4)}function d(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 u(p,m,b){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===Fn&&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=b.texture,p.transmissionSamplerSize.value.set(b.width,b.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 b=t.get(m).light;p.referencePosition.value.setFromMatrixPosition(b.matrixWorld),p.nearDistance.value=b.shadow.camera.near,p.farDistance.value=b.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function n1(r,t,e,n){let i={},s={},o=[],a=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(b,S){let v=S.program;n.uniformBlockBinding(b,v)}function c(b,S){let v=i[b.id];v===void 0&&(_(b),v=h(b),i[b.id]=v,b.addEventListener("dispose",p));let C=S.program;n.updateUBOMapping(b,C);let T=t.render.frame;s[b.id]!==T&&(f(b),s[b.id]=T)}function h(b){let S=d();b.__bindingPointIndex=S;let v=r.createBuffer(),C=b.__size,T=b.usage;return r.bindBuffer(r.UNIFORM_BUFFER,v),r.bufferData(r.UNIFORM_BUFFER,C,T),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,S,v),v}function d(){for(let b=0;b<a;b++)if(o.indexOf(b)===-1)return o.push(b),b;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(b){let S=i[b.id],v=b.uniforms,C=b.__cache;r.bindBuffer(r.UNIFORM_BUFFER,S);for(let T=0,w=v.length;T<w;T++){let P=Array.isArray(v[T])?v[T]:[v[T]];for(let M=0,y=P.length;M<y;M++){let L=P[M];if(u(L,T,M,C)===!0){let I=L.__offset,D=Array.isArray(L.value)?L.value:[L.value],O=0;for(let X=0;X<D.length;X++){let H=D[X],G=g(H);typeof H=="number"||typeof H=="boolean"?(L.__data[0]=H,r.bufferSubData(r.UNIFORM_BUFFER,I+O,L.__data)):H.isMatrix3?(L.__data[0]=H.elements[0],L.__data[1]=H.elements[1],L.__data[2]=H.elements[2],L.__data[3]=0,L.__data[4]=H.elements[3],L.__data[5]=H.elements[4],L.__data[6]=H.elements[5],L.__data[7]=0,L.__data[8]=H.elements[6],L.__data[9]=H.elements[7],L.__data[10]=H.elements[8],L.__data[11]=0):(H.toArray(L.__data,O),O+=G.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,I,L.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function u(b,S,v,C){let T=b.value,w=S+"_"+v;if(C[w]===void 0)return typeof T=="number"||typeof T=="boolean"?C[w]=T:C[w]=T.clone(),!0;{let P=C[w];if(typeof T=="number"||typeof T=="boolean"){if(P!==T)return C[w]=T,!0}else if(P.equals(T)===!1)return P.copy(T),!0}return!1}function _(b){let S=b.uniforms,v=0,C=16;for(let w=0,P=S.length;w<P;w++){let M=Array.isArray(S[w])?S[w]:[S[w]];for(let y=0,L=M.length;y<L;y++){let I=M[y],D=Array.isArray(I.value)?I.value:[I.value];for(let O=0,X=D.length;O<X;O++){let H=D[O],G=g(H),B=v%C;B!==0&&C-B<G.boundary&&(v+=C-B),I.__data=new Float32Array(G.storage/Float32Array.BYTES_PER_ELEMENT),I.__offset=v,v+=G.storage}}}let T=v%C;return T>0&&(v+=C-T),b.__size=v,b.__cache={},this}function g(b){let S={boundary:0,storage:0};return typeof b=="number"||typeof b=="boolean"?(S.boundary=4,S.storage=4):b.isVector2?(S.boundary=8,S.storage=8):b.isVector3||b.isColor?(S.boundary=16,S.storage=12):b.isVector4?(S.boundary=16,S.storage=16):b.isMatrix3?(S.boundary=48,S.storage=48):b.isMatrix4?(S.boundary=64,S.storage=64):b.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",b),S}function p(b){let S=b.target;S.removeEventListener("dispose",p);let v=o.indexOf(S.__bindingPointIndex);o.splice(v,1),r.deleteBuffer(i[S.id]),delete i[S.id],delete s[S.id]}function m(){for(let b in i)r.deleteBuffer(i[b]);o=[],i={},s={}}return{bind:l,update:c,dispose:m}}var Tc=class{constructor(t={}){let{canvas:e=uv(),context:n=null,depth:i=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!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 u=new Uint32Array(4),_=new Int32Array(4),g=null,p=null,m=[],b=[];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=jn,this._useLegacyLights=!1,this.toneMapping=Pr,this.toneMappingExposure=1;let S=this,v=!1,C=0,T=0,w=null,P=-1,M=null,y=new je,L=new je,I=null,D=new ge(0),O=0,X=e.width,H=e.height,G=1,B=null,U=null,R=new je(0,0,X,H),at=new je(0,0,X,H),_t=!1,Ut=new Da,q=!1,ot=!1,xt=new Ue,ct=new nt,Rt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function kt(){return w===null?G:1}let J=n;function $t(E,z){return e.getContext(E,z)}try{let E={alpha:!0,depth:i,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${If}`),e.addEventListener("webglcontextlost",V,!1),e.addEventListener("webglcontextrestored",Q,!1),e.addEventListener("webglcontextcreationerror",st,!1),J===null){let z="webgl2";if(J=$t(z,E),J===null)throw $t(z)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}let It,Ft,bt,Et,Ht,Y,Kt,A,x,N,Z,tt,it,vt,pt,lt,Lt,ht,yt,qt,ut,Tt,Wt,Zt;function ue(){It=new Sb(J),It.init(),Tt=new $w(J,It),Ft=new mb(J,It,t,Tt),bt=new Zw(J),Et=new wb(J),Ht=new Uw,Y=new Jw(J,It,bt,Ht,Ft,Tt,Et),Kt=new _b(S),A=new vb(S),x=new Pv(J),Wt=new db(J,x),N=new Mb(J,x,Et,Wt),Z=new Tb(J,N,x,Et),yt=new Eb(J,Ft,Y),lt=new gb(Ht),tt=new Nw(S,Kt,A,It,Ft,Wt,lt),it=new e1(S,Ht),vt=new Bw,pt=new Ww(It),ht=new fb(S,Kt,A,bt,Z,f,l),Lt=new qw(S,Z,Ft),Zt=new n1(J,Et,Ft,bt),qt=new pb(J,It,Et),ut=new bb(J,It,Et),Et.programs=tt.programs,S.capabilities=Ft,S.extensions=It,S.properties=Ht,S.renderLists=vt,S.shadowMap=Lt,S.state=bt,S.info=Et}ue();let Jt=new _f(S,J);this.xr=Jt,this.getContext=function(){return J},this.getContextAttributes=function(){return J.getContextAttributes()},this.forceContextLoss=function(){let E=It.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=It.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return G},this.setPixelRatio=function(E){E!==void 0&&(G=E,this.setSize(X,H,!1))},this.getSize=function(E){return E.set(X,H)},this.setSize=function(E,z,W=!0){if(Jt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}X=E,H=z,e.width=Math.floor(E*G),e.height=Math.floor(z*G),W===!0&&(e.style.width=E+"px",e.style.height=z+"px"),this.setViewport(0,0,E,z)},this.getDrawingBufferSize=function(E){return E.set(X*G,H*G).floor()},this.setDrawingBufferSize=function(E,z,W){X=E,H=z,G=W,e.width=Math.floor(E*W),e.height=Math.floor(z*W),this.setViewport(0,0,E,z)},this.getCurrentViewport=function(E){return E.copy(y)},this.getViewport=function(E){return E.copy(R)},this.setViewport=function(E,z,W,K){E.isVector4?R.set(E.x,E.y,E.z,E.w):R.set(E,z,W,K),bt.viewport(y.copy(R).multiplyScalar(G).round())},this.getScissor=function(E){return E.copy(at)},this.setScissor=function(E,z,W,K){E.isVector4?at.set(E.x,E.y,E.z,E.w):at.set(E,z,W,K),bt.scissor(L.copy(at).multiplyScalar(G).round())},this.getScissorTest=function(){return _t},this.setScissorTest=function(E){bt.setScissorTest(_t=E)},this.setOpaqueSort=function(E){B=E},this.setTransparentSort=function(E){U=E},this.getClearColor=function(E){return E.copy(ht.getClearColor())},this.setClearColor=function(){ht.setClearColor.apply(ht,arguments)},this.getClearAlpha=function(){return ht.getClearAlpha()},this.setClearAlpha=function(){ht.setClearAlpha.apply(ht,arguments)},this.clear=function(E=!0,z=!0,W=!0){let K=0;if(E){let $=!1;if(w!==null){let St=w.texture.format;$=St===o_||St===s_||St===r_}if($){let St=w.texture.type,At=St===Lr||St===Do||St===t_||St===Ra||St===n_||St===i_,Pt=ht.getClearColor(),Xt=ht.getClearAlpha(),Qt=Pt.r,Gt=Pt.g,Vt=Pt.b;At?(u[0]=Qt,u[1]=Gt,u[2]=Vt,u[3]=Xt,J.clearBufferuiv(J.COLOR,0,u)):(_[0]=Qt,_[1]=Gt,_[2]=Vt,_[3]=Xt,J.clearBufferiv(J.COLOR,0,_))}else K|=J.COLOR_BUFFER_BIT}z&&(K|=J.DEPTH_BUFFER_BIT),W&&(K|=J.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),J.clear(K)},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",V,!1),e.removeEventListener("webglcontextrestored",Q,!1),e.removeEventListener("webglcontextcreationerror",st,!1),vt.dispose(),pt.dispose(),Ht.dispose(),Kt.dispose(),A.dispose(),Z.dispose(),Wt.dispose(),Zt.dispose(),tt.dispose(),Jt.dispose(),Jt.removeEventListener("sessionstart",rt),Jt.removeEventListener("sessionend",k),j.stop()};function V(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function Q(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1;let E=Et.autoReset,z=Lt.enabled,W=Lt.autoUpdate,K=Lt.needsUpdate,$=Lt.type;ue(),Et.autoReset=E,Lt.enabled=z,Lt.autoUpdate=W,Lt.needsUpdate=K,Lt.type=$}function st(E){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",E.statusMessage)}function mt(E){let z=E.target;z.removeEventListener("dispose",mt),gt(z)}function gt(E){Bt(E),Ht.remove(E)}function Bt(E){let z=Ht.get(E).programs;z!==void 0&&(z.forEach(function(W){tt.releaseProgram(W)}),E.isShaderMaterial&&tt.releaseShaderCache(E))}this.renderBufferDirect=function(E,z,W,K,$,St){z===null&&(z=Rt);let At=$.isMesh&&$.matrixWorld.determinant()<0,Pt=he(E,z,W,K,$);bt.setMaterial(K,At);let Xt=W.index,Qt=1;if(K.wireframe===!0){if(Xt=N.getWireframeAttribute(W),Xt===void 0)return;Qt=2}let Gt=W.drawRange,Vt=W.attributes.position,xe=Gt.start*Qt,Be=(Gt.start+Gt.count)*Qt;St!==null&&(xe=Math.max(xe,St.start*Qt),Be=Math.min(Be,(St.start+St.count)*Qt)),Xt!==null?(xe=Math.max(xe,0),Be=Math.min(Be,Xt.count)):Vt!=null&&(xe=Math.max(xe,0),Be=Math.min(Be,Vt.count));let rn=Be-xe;if(rn<0||rn===1/0)return;Wt.setup($,K,Pt,W,Xt);let mn,ie=qt;if(Xt!==null&&(mn=x.get(Xt),ie=ut,ie.setIndex(mn)),$.isMesh)K.wireframe===!0?(bt.setLineWidth(K.wireframeLinewidth*kt()),ie.setMode(J.LINES)):ie.setMode(J.TRIANGLES);else if($.isLine){let jt=K.linewidth;jt===void 0&&(jt=1),bt.setLineWidth(jt*kt()),$.isLineSegments?ie.setMode(J.LINES):$.isLineLoop?ie.setMode(J.LINE_LOOP):ie.setMode(J.LINE_STRIP)}else $.isPoints?ie.setMode(J.POINTS):$.isSprite&&ie.setMode(J.TRIANGLES);if($.isBatchedMesh)$._multiDrawInstances!==null?ie.renderMultiDrawInstances($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount,$._multiDrawInstances):ie.renderMultiDraw($._multiDrawStarts,$._multiDrawCounts,$._multiDrawCount);else if($.isInstancedMesh)ie.renderInstances(xe,rn,$.count);else if(W.isInstancedBufferGeometry){let jt=W._maxInstanceCount!==void 0?W._maxInstanceCount:1/0,Si=Math.min(W.instanceCount,jt);ie.renderInstances(xe,rn,Si)}else ie.render(xe,rn)};function ee(E,z,W){E.transparent===!0&&E.side===Qi&&E.forceSinglePass===!1?(E.side=Fn,E.needsUpdate=!0,zt(E,z,W),E.side=Ir,E.needsUpdate=!0,zt(E,z,W),E.side=Qi):zt(E,z,W)}this.compile=function(E,z,W=null){W===null&&(W=E),p=pt.get(W),p.init(z),b.push(p),W.traverseVisible(function($){$.isLight&&$.layers.test(z.layers)&&(p.pushLight($),$.castShadow&&p.pushShadow($))}),E!==W&&E.traverseVisible(function($){$.isLight&&$.layers.test(z.layers)&&(p.pushLight($),$.castShadow&&p.pushShadow($))}),p.setupLights(S._useLegacyLights);let K=new Set;return E.traverse(function($){let St=$.material;if(St)if(Array.isArray(St))for(let At=0;At<St.length;At++){let Pt=St[At];ee(Pt,W,$),K.add(Pt)}else ee(St,W,$),K.add(St)}),b.pop(),p=null,K},this.compileAsync=function(E,z,W=null){let K=this.compile(E,z,W);return new Promise($=>{function St(){if(K.forEach(function(At){Ht.get(At).currentProgram.isReady()&&K.delete(At)}),K.size===0){$(E);return}setTimeout(St,10)}It.get("KHR_parallel_shader_compile")!==null?St():setTimeout(St,10)})};let Mt=null;function F(E){Mt&&Mt(E)}function rt(){j.stop()}function k(){j.start()}let j=new h_;j.setAnimationLoop(F),typeof self<"u"&&j.setContext(self),this.setAnimationLoop=function(E){Mt=E,Jt.setAnimationLoop(E),E===null?j.stop():j.start()},Jt.addEventListener("sessionstart",rt),Jt.addEventListener("sessionend",k),this.render=function(E,z){if(z!==void 0&&z.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;E.matrixWorldAutoUpdate===!0&&E.updateMatrixWorld(),z.parent===null&&z.matrixWorldAutoUpdate===!0&&z.updateMatrixWorld(),Jt.enabled===!0&&Jt.isPresenting===!0&&(Jt.cameraAutoUpdate===!0&&Jt.updateCamera(z),z=Jt.getCamera()),E.isScene===!0&&E.onBeforeRender(S,E,z,w),p=pt.get(E,b.length),p.init(z),b.push(p),xt.multiplyMatrices(z.projectionMatrix,z.matrixWorldInverse),Ut.setFromProjectionMatrix(xt),ot=this.localClippingEnabled,q=lt.init(this.clippingPlanes,ot),g=vt.get(E,m.length),g.init(),m.push(g),dt(E,z,0,S.sortObjects),g.finish(),S.sortObjects===!0&&g.sort(B,U);let W=Jt.enabled===!1||Jt.isPresenting===!1||Jt.hasDepthSensing()===!1;W&&ht.addToRenderList(g,E),this.info.render.frame++,q===!0&<.beginShadows();let K=p.state.shadowsArray;Lt.render(K,E,z),q===!0&<.endShadows(),this.info.autoReset===!0&&this.info.reset();let $=g.opaque,St=g.transmissive;if(p.setupLights(S._useLegacyLights),z.isArrayCamera){let At=z.cameras;if(St.length>0)for(let Pt=0,Xt=At.length;Pt<Xt;Pt++){let Qt=At[Pt];wt($,St,E,Qt)}W&&ht.render(E);for(let Pt=0,Xt=At.length;Pt<Xt;Pt++){let Qt=At[Pt];et(g,E,Qt,Qt.viewport)}}else St.length>0&&wt($,St,E,z),W&&ht.render(E),et(g,E,z);w!==null&&(Y.updateMultisampleRenderTarget(w),Y.updateRenderTargetMipmap(w)),E.isScene===!0&&E.onAfterRender(S,E,z),Wt.resetDefaultState(),P=-1,M=null,b.pop(),b.length>0?(p=b[b.length-1],q===!0&<.setGlobalState(S.clippingPlanes,p.state.camera)):p=null,m.pop(),m.length>0?g=m[m.length-1]:g=null};function dt(E,z,W,K){if(E.visible===!1)return;if(E.layers.test(z.layers)){if(E.isGroup)W=E.renderOrder;else if(E.isLOD)E.autoUpdate===!0&&E.update(z);else if(E.isLight)p.pushLight(E),E.castShadow&&p.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||Ut.intersectsSprite(E)){K&&ct.setFromMatrixPosition(E.matrixWorld).applyMatrix4(xt);let At=Z.update(E),Pt=E.material;Pt.visible&&g.push(E,At,Pt,W,ct.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(!E.frustumCulled||Ut.intersectsObject(E))){let At=Z.update(E),Pt=E.material;if(K&&(E.boundingSphere!==void 0?(E.boundingSphere===null&&E.computeBoundingSphere(),ct.copy(E.boundingSphere.center)):(At.boundingSphere===null&&At.computeBoundingSphere(),ct.copy(At.boundingSphere.center)),ct.applyMatrix4(E.matrixWorld).applyMatrix4(xt)),Array.isArray(Pt)){let Xt=At.groups;for(let Qt=0,Gt=Xt.length;Qt<Gt;Qt++){let Vt=Xt[Qt],xe=Pt[Vt.materialIndex];xe&&xe.visible&&g.push(E,At,xe,W,ct.z,Vt)}}else Pt.visible&&g.push(E,At,Pt,W,ct.z,null)}}let St=E.children;for(let At=0,Pt=St.length;At<Pt;At++)dt(St[At],z,W,K)}function et(E,z,W,K){let $=E.opaque,St=E.transmissive,At=E.transparent;p.setupLightsView(W),q===!0&<.setGlobalState(S.clippingPlanes,W),K&&bt.viewport(y.copy(K)),$.length>0&&ft($,z,W),St.length>0&&ft(St,z,W),At.length>0&&ft(At,z,W),bt.buffers.depth.setTest(!0),bt.buffers.depth.setMask(!0),bt.buffers.color.setMask(!0),bt.setPolygonOffset(!1)}function wt(E,z,W,K){if((W.isScene===!0?W.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[K.id]===void 0&&(p.state.transmissionRenderTarget[K.id]=new er(1,1,{generateMipmaps:!0,type:It.has("EXT_color_buffer_half_float")||It.has("EXT_color_buffer_float")?Lc:Lr,minFilter:ws,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));let St=p.state.transmissionRenderTarget[K.id],At=K.viewport||y;St.setSize(At.z,At.w);let Pt=S.getRenderTarget();S.setRenderTarget(St),S.getClearColor(D),O=S.getClearAlpha(),O<1&&S.setClearColor(16777215,.5),S.clear();let Xt=S.toneMapping;S.toneMapping=Pr;let Qt=K.viewport;if(K.viewport!==void 0&&(K.viewport=void 0),p.setupLightsView(K),q===!0&<.setGlobalState(S.clippingPlanes,K),ft(E,W,K),Y.updateMultisampleRenderTarget(St),Y.updateRenderTargetMipmap(St),It.has("WEBGL_multisampled_render_to_texture")===!1){let Gt=!1;for(let Vt=0,xe=z.length;Vt<xe;Vt++){let Be=z[Vt],rn=Be.object,mn=Be.geometry,ie=Be.material,jt=Be.group;if(ie.side===Qi&&rn.layers.test(K.layers)){let Si=ie.side;ie.side=Fn,ie.needsUpdate=!0,Dt(rn,W,K,mn,ie,jt),ie.side=Si,ie.needsUpdate=!0,Gt=!0}}Gt===!0&&(Y.updateMultisampleRenderTarget(St),Y.updateRenderTargetMipmap(St))}S.setRenderTarget(Pt),S.setClearColor(D,O),Qt!==void 0&&(K.viewport=Qt),S.toneMapping=Xt}function ft(E,z,W){let K=z.isScene===!0?z.overrideMaterial:null;for(let $=0,St=E.length;$<St;$++){let At=E[$],Pt=At.object,Xt=At.geometry,Qt=K===null?At.material:K,Gt=At.group;Pt.layers.test(W.layers)&&Dt(Pt,z,W,Xt,Qt,Gt)}}function Dt(E,z,W,K,$,St){E.onBeforeRender(S,z,W,K,$,St),E.modelViewMatrix.multiplyMatrices(W.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),$.onBeforeRender(S,z,W,K,E,St),$.transparent===!0&&$.side===Qi&&$.forceSinglePass===!1?($.side=Fn,$.needsUpdate=!0,S.renderBufferDirect(W,z,K,$,E,St),$.side=Ir,$.needsUpdate=!0,S.renderBufferDirect(W,z,K,$,E,St),$.side=Qi):S.renderBufferDirect(W,z,K,$,E,St),E.onAfterRender(S,z,W,K,$,St)}function zt(E,z,W){z.isScene!==!0&&(z=Rt);let K=Ht.get(E),$=p.state.lights,St=p.state.shadowsArray,At=$.state.version,Pt=tt.getParameters(E,$.state,St,z,W),Xt=tt.getProgramCacheKey(Pt),Qt=K.programs;K.environment=E.isMeshStandardMaterial?z.environment:null,K.fog=z.fog,K.envMap=(E.isMeshStandardMaterial?A:Kt).get(E.envMap||K.environment),K.envMapRotation=K.environment!==null&&E.envMap===null?z.environmentRotation:E.envMapRotation,Qt===void 0&&(E.addEventListener("dispose",mt),Qt=new Map,K.programs=Qt);let Gt=Qt.get(Xt);if(Gt!==void 0){if(K.currentProgram===Gt&&K.lightsStateVersion===At)return te(E,Pt),Gt}else Pt.uniforms=tt.getUniforms(E),E.onBuild(W,Pt,S),E.onBeforeCompile(Pt,S),Gt=tt.acquireProgram(Pt,Xt),Qt.set(Xt,Gt),K.uniforms=Pt.uniforms;let Vt=K.uniforms;return(!E.isShaderMaterial&&!E.isRawShaderMaterial||E.clipping===!0)&&(Vt.clippingPlanes=lt.uniform),te(E,Pt),K.needsLights=ae(E),K.lightsStateVersion=At,K.needsLights&&(Vt.ambientLightColor.value=$.state.ambient,Vt.lightProbe.value=$.state.probe,Vt.directionalLights.value=$.state.directional,Vt.directionalLightShadows.value=$.state.directionalShadow,Vt.spotLights.value=$.state.spot,Vt.spotLightShadows.value=$.state.spotShadow,Vt.rectAreaLights.value=$.state.rectArea,Vt.ltc_1.value=$.state.rectAreaLTC1,Vt.ltc_2.value=$.state.rectAreaLTC2,Vt.pointLights.value=$.state.point,Vt.pointLightShadows.value=$.state.pointShadow,Vt.hemisphereLights.value=$.state.hemi,Vt.directionalShadowMap.value=$.state.directionalShadowMap,Vt.directionalShadowMatrix.value=$.state.directionalShadowMatrix,Vt.spotShadowMap.value=$.state.spotShadowMap,Vt.spotLightMatrix.value=$.state.spotLightMatrix,Vt.spotLightMap.value=$.state.spotLightMap,Vt.pointShadowMap.value=$.state.pointShadowMap,Vt.pointShadowMatrix.value=$.state.pointShadowMatrix),K.currentProgram=Gt,K.uniformsList=null,Gt}function Nt(E){if(E.uniformsList===null){let z=E.currentProgram.getUniforms();E.uniformsList=Eo.seqWithValue(z.seq,E.uniforms)}return E.uniformsList}function te(E,z){let W=Ht.get(E);W.outputColorSpace=z.outputColorSpace,W.batching=z.batching,W.instancing=z.instancing,W.instancingColor=z.instancingColor,W.instancingMorph=z.instancingMorph,W.skinning=z.skinning,W.morphTargets=z.morphTargets,W.morphNormals=z.morphNormals,W.morphColors=z.morphColors,W.morphTargetsCount=z.morphTargetsCount,W.numClippingPlanes=z.numClippingPlanes,W.numIntersection=z.numClipIntersection,W.vertexAlphas=z.vertexAlphas,W.vertexTangents=z.vertexTangents,W.toneMapping=z.toneMapping}function he(E,z,W,K,$){z.isScene!==!0&&(z=Rt),Y.resetTextureUnits();let St=z.fog,At=K.isMeshStandardMaterial?z.environment:null,Pt=w===null?S.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:Ur,Xt=(K.isMeshStandardMaterial?A:Kt).get(K.envMap||At),Qt=K.vertexColors===!0&&!!W.attributes.color&&W.attributes.color.itemSize===4,Gt=!!W.attributes.tangent&&(!!K.normalMap||K.anisotropy>0),Vt=!!W.morphAttributes.position,xe=!!W.morphAttributes.normal,Be=!!W.morphAttributes.color,rn=Pr;K.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(rn=S.toneMapping);let mn=W.morphAttributes.position||W.morphAttributes.normal||W.morphAttributes.color,ie=mn!==void 0?mn.length:0,jt=Ht.get(K),Si=p.state.lights;if(q===!0&&(ot===!0||E!==M)){let Gn=E===M&&K.id===P;lt.setState(K,E,Gn)}let ve=!1;K.version===jt.__version?(jt.needsLights&&jt.lightsStateVersion!==Si.state.version||jt.outputColorSpace!==Pt||$.isBatchedMesh&&jt.batching===!1||!$.isBatchedMesh&&jt.batching===!0||$.isInstancedMesh&&jt.instancing===!1||!$.isInstancedMesh&&jt.instancing===!0||$.isSkinnedMesh&&jt.skinning===!1||!$.isSkinnedMesh&&jt.skinning===!0||$.isInstancedMesh&&jt.instancingColor===!0&&$.instanceColor===null||$.isInstancedMesh&&jt.instancingColor===!1&&$.instanceColor!==null||$.isInstancedMesh&&jt.instancingMorph===!0&&$.morphTexture===null||$.isInstancedMesh&&jt.instancingMorph===!1&&$.morphTexture!==null||jt.envMap!==Xt||K.fog===!0&&jt.fog!==St||jt.numClippingPlanes!==void 0&&(jt.numClippingPlanes!==lt.numPlanes||jt.numIntersection!==lt.numIntersection)||jt.vertexAlphas!==Qt||jt.vertexTangents!==Gt||jt.morphTargets!==Vt||jt.morphNormals!==xe||jt.morphColors!==Be||jt.toneMapping!==rn||jt.morphTargetsCount!==ie)&&(ve=!0):(ve=!0,jt.__version=K.version);let Gr=jt.currentProgram;ve===!0&&(Gr=zt(K,z,$));let td=!1,ko=!1,Wc=!1,sn=Gr.getUniforms(),ar=jt.uniforms;if(bt.useProgram(Gr.program)&&(td=!0,ko=!0,Wc=!0),K.id!==P&&(P=K.id,ko=!0),td||M!==E){sn.setValue(J,"projectionMatrix",E.projectionMatrix),sn.setValue(J,"viewMatrix",E.matrixWorldInverse);let Gn=sn.map.cameraPosition;Gn!==void 0&&Gn.setValue(J,ct.setFromMatrixPosition(E.matrixWorld)),Ft.logarithmicDepthBuffer&&sn.setValue(J,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),(K.isMeshPhongMaterial||K.isMeshToonMaterial||K.isMeshLambertMaterial||K.isMeshBasicMaterial||K.isMeshStandardMaterial||K.isShaderMaterial)&&sn.setValue(J,"isOrthographic",E.isOrthographicCamera===!0),M!==E&&(M=E,ko=!0,Wc=!0)}if($.isSkinnedMesh){sn.setOptional(J,$,"bindMatrix"),sn.setOptional(J,$,"bindMatrixInverse");let Gn=$.skeleton;Gn&&(Gn.boneTexture===null&&Gn.computeBoneTexture(),sn.setValue(J,"boneTexture",Gn.boneTexture,Y))}$.isBatchedMesh&&(sn.setOptional(J,$,"batchingTexture"),sn.setValue(J,"batchingTexture",$._matricesTexture,Y));let Xc=W.morphAttributes;if((Xc.position!==void 0||Xc.normal!==void 0||Xc.color!==void 0)&&yt.update($,W,Gr),(ko||jt.receiveShadow!==$.receiveShadow)&&(jt.receiveShadow=$.receiveShadow,sn.setValue(J,"receiveShadow",$.receiveShadow)),K.isMeshGouraudMaterial&&K.envMap!==null&&(ar.envMap.value=Xt,ar.flipEnvMap.value=Xt.isCubeTexture&&Xt.isRenderTargetTexture===!1?-1:1),K.isMeshStandardMaterial&&K.envMap===null&&z.environment!==null&&(ar.envMapIntensity.value=z.environmentIntensity),ko&&(sn.setValue(J,"toneMappingExposure",S.toneMappingExposure),jt.needsLights&&me(ar,Wc),St&&K.fog===!0&&it.refreshFogUniforms(ar,St),it.refreshMaterialUniforms(ar,K,G,H,p.state.transmissionRenderTarget[E.id]),Eo.upload(J,Nt(jt),ar,Y)),K.isShaderMaterial&&K.uniformsNeedUpdate===!0&&(Eo.upload(J,Nt(jt),ar,Y),K.uniformsNeedUpdate=!1),K.isSpriteMaterial&&sn.setValue(J,"center",$.center),sn.setValue(J,"modelViewMatrix",$.modelViewMatrix),sn.setValue(J,"normalMatrix",$.normalMatrix),sn.setValue(J,"modelMatrix",$.matrixWorld),K.isShaderMaterial||K.isRawShaderMaterial){let Gn=K.uniformsGroups;for(let Yc=0,G_=Gn.length;Yc<G_;Yc++){let ed=Gn[Yc];Zt.update(ed,Gr),Zt.bind(ed,Gr)}}return Gr}function me(E,z){E.ambientLightColor.needsUpdate=z,E.lightProbe.needsUpdate=z,E.directionalLights.needsUpdate=z,E.directionalLightShadows.needsUpdate=z,E.pointLights.needsUpdate=z,E.pointLightShadows.needsUpdate=z,E.spotLights.needsUpdate=z,E.spotLightShadows.needsUpdate=z,E.rectAreaLights.needsUpdate=z,E.hemisphereLights.needsUpdate=z}function ae(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&E.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(E,z,W){Ht.get(E.texture).__webglTexture=z,Ht.get(E.depthTexture).__webglTexture=W;let K=Ht.get(E);K.__hasExternalTextures=!0,K.__autoAllocateDepthBuffer=W===void 0,K.__autoAllocateDepthBuffer||It.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),K.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(E,z){let W=Ht.get(E);W.__webglFramebuffer=z,W.__useDefaultFramebuffer=z===void 0},this.setRenderTarget=function(E,z=0,W=0){w=E,C=z,T=W;let K=!0,$=null,St=!1,At=!1;if(E){let Xt=Ht.get(E);Xt.__useDefaultFramebuffer!==void 0?(bt.bindFramebuffer(J.FRAMEBUFFER,null),K=!1):Xt.__webglFramebuffer===void 0?Y.setupRenderTarget(E):Xt.__hasExternalTextures&&Y.rebindTextures(E,Ht.get(E.texture).__webglTexture,Ht.get(E.depthTexture).__webglTexture);let Qt=E.texture;(Qt.isData3DTexture||Qt.isDataArrayTexture||Qt.isCompressedArrayTexture)&&(At=!0);let Gt=Ht.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(Array.isArray(Gt[z])?$=Gt[z][W]:$=Gt[z],St=!0):E.samples>0&&Y.useMultisampledRTT(E)===!1?$=Ht.get(E).__webglMultisampledFramebuffer:Array.isArray(Gt)?$=Gt[W]:$=Gt,y.copy(E.viewport),L.copy(E.scissor),I=E.scissorTest}else y.copy(R).multiplyScalar(G).floor(),L.copy(at).multiplyScalar(G).floor(),I=_t;if(bt.bindFramebuffer(J.FRAMEBUFFER,$)&&K&&bt.drawBuffers(E,$),bt.viewport(y),bt.scissor(L),bt.setScissorTest(I),St){let Xt=Ht.get(E.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_CUBE_MAP_POSITIVE_X+z,Xt.__webglTexture,W)}else if(At){let Xt=Ht.get(E.texture),Qt=z||0;J.framebufferTextureLayer(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,Xt.__webglTexture,W||0,Qt)}P=-1},this.readRenderTargetPixels=function(E,z,W,K,$,St,At){if(!(E&&E.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Pt=Ht.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&At!==void 0&&(Pt=Pt[At]),Pt){bt.bindFramebuffer(J.FRAMEBUFFER,Pt);try{let Xt=E.texture,Qt=Xt.format,Gt=Xt.type;if(!Ft.textureFormatReadable(Qt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Ft.textureTypeReadable(Gt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}z>=0&&z<=E.width-K&&W>=0&&W<=E.height-$&&J.readPixels(z,W,K,$,Tt.convert(Qt),Tt.convert(Gt),St)}finally{let Xt=w!==null?Ht.get(w).__webglFramebuffer:null;bt.bindFramebuffer(J.FRAMEBUFFER,Xt)}}},this.copyFramebufferToTexture=function(E,z,W=0){let K=Math.pow(2,-W),$=Math.floor(z.image.width*K),St=Math.floor(z.image.height*K);Y.setTexture2D(z,0),J.copyTexSubImage2D(J.TEXTURE_2D,W,0,0,E.x,E.y,$,St),bt.unbindTexture()},this.copyTextureToTexture=function(E,z,W,K=0){let $=z.image.width,St=z.image.height,At=Tt.convert(W.format),Pt=Tt.convert(W.type);Y.setTexture2D(W,0),J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,W.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,W.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,W.unpackAlignment),z.isDataTexture?J.texSubImage2D(J.TEXTURE_2D,K,E.x,E.y,$,St,At,Pt,z.image.data):z.isCompressedTexture?J.compressedTexSubImage2D(J.TEXTURE_2D,K,E.x,E.y,z.mipmaps[0].width,z.mipmaps[0].height,At,z.mipmaps[0].data):J.texSubImage2D(J.TEXTURE_2D,K,E.x,E.y,At,Pt,z.image),K===0&&W.generateMipmaps&&J.generateMipmap(J.TEXTURE_2D),bt.unbindTexture()},this.copyTextureToTexture3D=function(E,z,W,K,$=0){let St=E.max.x-E.min.x,At=E.max.y-E.min.y,Pt=E.max.z-E.min.z,Xt=Tt.convert(K.format),Qt=Tt.convert(K.type),Gt;if(K.isData3DTexture)Y.setTexture3D(K,0),Gt=J.TEXTURE_3D;else if(K.isDataArrayTexture||K.isCompressedArrayTexture)Y.setTexture2DArray(K,0),Gt=J.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,K.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,K.unpackAlignment);let Vt=J.getParameter(J.UNPACK_ROW_LENGTH),xe=J.getParameter(J.UNPACK_IMAGE_HEIGHT),Be=J.getParameter(J.UNPACK_SKIP_PIXELS),rn=J.getParameter(J.UNPACK_SKIP_ROWS),mn=J.getParameter(J.UNPACK_SKIP_IMAGES),ie=W.isCompressedTexture?W.mipmaps[$]:W.image;J.pixelStorei(J.UNPACK_ROW_LENGTH,ie.width),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,ie.height),J.pixelStorei(J.UNPACK_SKIP_PIXELS,E.min.x),J.pixelStorei(J.UNPACK_SKIP_ROWS,E.min.y),J.pixelStorei(J.UNPACK_SKIP_IMAGES,E.min.z),W.isDataTexture||W.isData3DTexture?J.texSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,Qt,ie.data):K.isCompressedArrayTexture?J.compressedTexSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,ie.data):J.texSubImage3D(Gt,$,z.x,z.y,z.z,St,At,Pt,Xt,Qt,ie),J.pixelStorei(J.UNPACK_ROW_LENGTH,Vt),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,xe),J.pixelStorei(J.UNPACK_SKIP_PIXELS,Be),J.pixelStorei(J.UNPACK_SKIP_ROWS,rn),J.pixelStorei(J.UNPACK_SKIP_IMAGES,mn),$===0&&K.generateMipmaps&&J.generateMipmap(Gt),bt.unbindTexture()},this.initTexture=function(E){E.isCubeTexture?Y.setTextureCube(E,0):E.isData3DTexture?Y.setTexture3D(E,0):E.isDataArrayTexture||E.isCompressedArrayTexture?Y.setTexture2DArray(E,0):Y.setTexture2D(E,0),bt.unbindTexture()},this.resetState=function(){C=0,T=0,w=null,bt.reset(),Wt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return tr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;let e=this.getContext();e.drawingBufferColorSpace=t===Ff?"display-p3":"srgb",e.unpackColorSpace=Se.workingColorSpace===Fc?"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 Ac=class r{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new ge(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}}},Dc=class extends pn{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 nr,this.environmentIntensity=1,this.environmentRotation=new nr,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 xf=class extends Ts{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new ge(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}},qg=new Ue,yf=new mc,nc=new Co,ic=new nt,Cc=class extends pn{constructor(t=new Fi,e=new xf){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(),nc.copy(n.boundingSphere),nc.applyMatrix4(i),nc.radius+=s,t.ray.intersectsSphere(nc)===!1)return;qg.copy(i).invert(),yf.copy(t.ray).applyMatrix4(qg);let a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,d=n.attributes.position;if(c!==null){let f=Math.max(0,o.start),u=Math.min(c.count,o.start+o.count);for(let _=f,g=u;_<g;_++){let p=c.getX(_);ic.fromBufferAttribute(d,p),Zg(ic,p,l,i,t,e,this)}}else{let f=Math.max(0,o.start),u=Math.min(d.count,o.start+o.count);for(let _=f,g=u;_<g;_++)ic.fromBufferAttribute(d,_),Zg(ic,_,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 Zg(r,t,e,n,i,s,o){let a=yf.distanceSqToPoint(r);if(a<e){let l=new nt;yf.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 rc(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 i1(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}var Po=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_(){}},vf=class extends Po{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:eg,endingEnd:eg}}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 ng:s=t,a=2*e-n;break;case ig: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 ng:o=t,l=2*n-e;break;case ig:o=1,l=n+i[1]-i[0];break;default:o=t-1,l=e}let c=(n-e)*.5,h=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-n),this._offsetPrev=s*h,this._offsetNext=o*h}interpolate_(t,e,n,i){let s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,h=this._offsetPrev,d=this._offsetNext,f=this._weightPrev,u=this._weightNext,_=(n-e)/(i-e),g=_*_,p=g*_,m=-f*p+2*f*g-f*_,b=(1+f)*p+(-1.5-2*f)*g+(-.5+f)*_+1,S=(-1-u)*p+(1.5+u)*g+.5*_,v=u*p-u*g;for(let C=0;C!==a;++C)s[C]=m*o[h+C]+b*o[c+C]+S*o[l+C]+v*o[d+C];return s}},Sf=class extends Po{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,h=(n-e)/(i-e),d=1-h;for(let f=0;f!==a;++f)s[f]=o[c+f]*d+o[l+f]*h;return s}},Mf=class extends Po{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},gi=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=rc(e,this.TimeBufferType),this.values=rc(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:rc(t.times,Array),values:rc(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new Mf(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Sf(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new vf(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case oc:e=this.InterpolantFactoryMethodDiscrete;break;case ac:e=this.InterpolantFactoryMethodLinear;break;case vh: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 oc;case this.InterpolantFactoryMethodLinear:return ac;case this.InterpolantFactoryMethodSmooth:return vh}}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&&i1(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()===vh,s=t.length-1,o=1;for(let a=1;a<s;++a){let l=!1,c=t[a],h=t[a+1];if(c!==h&&(a!==1||c!==t[0]))if(i)l=!0;else{let d=a*n,f=d-n,u=d+n;for(let _=0;_!==n;++_){let g=e[d+_];if(g!==e[f+_]||g!==e[u+_]){l=!0;break}}}if(l){if(a!==o){t[o]=t[a];let d=a*n,f=o*n;for(let u=0;u!==n;++u)e[f+u]=e[d+u]}++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}};gi.prototype.TimeBufferType=Float32Array;gi.prototype.ValueBufferType=Float32Array;gi.prototype.DefaultInterpolation=ac;var As=class extends gi{};As.prototype.ValueTypeName="bool";As.prototype.ValueBufferType=Array;As.prototype.DefaultInterpolation=oc;As.prototype.InterpolantFactoryMethodLinear=void 0;As.prototype.InterpolantFactoryMethodSmooth=void 0;var bf=class extends gi{};bf.prototype.ValueTypeName="color";var wf=class extends gi{};wf.prototype.ValueTypeName="number";var Ef=class extends Po{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 h=c+a;c!==h;c+=4)Nr.slerpFlat(s,0,o,c-a,o,c,l);return s}},Ca=class extends gi{InterpolantFactoryMethodLinear(t){return new Ef(this.times,this.values,this.getValueSize(),t)}};Ca.prototype.ValueTypeName="quaternion";Ca.prototype.DefaultInterpolation=ac;Ca.prototype.InterpolantFactoryMethodSmooth=void 0;var Ds=class extends gi{};Ds.prototype.ValueTypeName="string";Ds.prototype.ValueBufferType=Array;Ds.prototype.DefaultInterpolation=oc;Ds.prototype.InterpolantFactoryMethodLinear=void 0;Ds.prototype.InterpolantFactoryMethodSmooth=void 0;var Tf=class extends gi{};Tf.prototype.ValueTypeName="vector";var Af=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(h){a++,s===!1&&i.onStart!==void 0&&i.onStart(h,o,a),s=!0},this.itemEnd=function(h){o++,i.onProgress!==void 0&&i.onProgress(h,o,a),o===a&&(s=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(h){i.onError!==void 0&&i.onError(h)},this.resolveURL=function(h){return l?l(h):h},this.setURLModifier=function(h){return l=h,this},this.addHandler=function(h,d){return c.push(h,d),this},this.removeHandler=function(h){let d=c.indexOf(h);return d!==-1&&c.splice(d,2),this},this.getHandler=function(h){for(let d=0,f=c.length;d<f;d+=2){let u=c[d],_=c[d+1];if(u.global&&(u.lastIndex=0),u.test(h))return _}return null}}},r1=new Af,Df=class{constructor(t){this.manager=t!==void 0?t:r1,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}};Df.DEFAULT_MATERIAL_NAME="__DEFAULT";var Rc=class extends pn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new ge(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}},Pc=class extends Rc{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(pn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new ge(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}},qh=new Ue,Jg=new nt,$g=new nt,Cf=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new _e(512,512),this.map=null,this.mapPass=null,this.matrix=new Ue,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Da,this._frameExtents=new _e(1,1),this._viewportCount=1,this._viewports=[new je(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,n=this.matrix;Jg.setFromMatrixPosition(t.matrixWorld),e.position.copy(Jg),$g.setFromMatrixPosition(t.target.matrixWorld),e.lookAt($g),e.updateMatrixWorld(),qh.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(qh),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(qh)}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 Rf=class extends Cf{constructor(){super(new bc(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},Cs=class extends Rc{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(pn.DEFAULT_UP),this.updateMatrix(),this.target=new pn,this.shadow=new Rf}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};var Uf="\\[\\]\\.:\\/",s1=new RegExp("["+Uf+"]","g"),Of="[^"+Uf+"]",o1="[^"+Uf.replace("\\.","")+"]",a1=/((?:WC+[\/:])*)/.source.replace("WC",Of),l1=/(WCOD+)?/.source.replace("WCOD",o1),c1=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Of),u1=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Of),h1=new RegExp("^"+a1+l1+c1+u1+"$"),f1=["material","materials","bones","map"],Pf=class{constructor(t,e,n){let i=n||De.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()}},De=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(s1,"")}static parseTrackName(t){let e=h1.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);f1.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 h=0;h<t.length;h++)if(t[h].name===c){c=h;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}};De.Composite=Pf;De.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};De.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};De.prototype.GetterByBindingType=[De.prototype._getValue_direct,De.prototype._getValue_array,De.prototype._getValue_arrayElement,De.prototype._getValue_toArray];De.prototype.SetterByBindingTypeAndVersioning=[[De.prototype._setValue_direct,De.prototype._setValue_direct_setNeedsUpdate,De.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[De.prototype._setValue_array,De.prototype._setValue_array_setNeedsUpdate,De.prototype._setValue_array_setMatrixWorldNeedsUpdate],[De.prototype._setValue_arrayElement,De.prototype._setValue_arrayElement_setNeedsUpdate,De.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[De.prototype._setValue_fromArray,De.prototype._setValue_fromArray_setNeedsUpdate,De.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var CE=new Float32Array(1);typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:If}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=If);var __=()=>{var r=new Dr;function t(){let e=document.querySelector("#canvas"),n=new Tc({canvas:e,antialias:!0,alpha:!0}),i=new Dc,s=new Tn(18);s.near=1,s.far=2e3,s.position.z=-10,n.outputColorSpace=jn,n.shadowMap.enabled=!0,n.shadowMap.type=Lf,i.fog=new Ac(3741705,9,15),i.add(r);function o(){let h=new Pc(16777215,41378,1),d=new Cs(3355443,4);d.position.set(5,5,5),d.lookAt(0,0,0),d.castShadow=!0,d.shadow.mapSize.width=512,d.shadow.mapSize.height=512,d.shadow.camera.near=.5,d.shadow.camera.far=500,i.add(d),i.add(h);let f=[];f[0]=new Cs(16777215,1),f[0].position.set(1,0,0),f[1]=new Cs(11460838,1),f[1].position.set(.75,1,.5),f[2]=new Cs(14277490,1),f[2].position.set(-.75,-1,.5),i.add(f[0]),i.add(f[1]),i.add(f[2])}function a(h,d){let f=new Fi,u=[],_=[],g=d||25,p=g/2;for(let S=0;S<(h||7e3);S++){let v=Math.random()*g-p,C=Math.random()*g-p,T=Math.random()*g-p;u.push(v,C,T),_.push(Math.random()*.9+.1)}f.setAttribute("position",new ei(u,3)),f.setAttribute("opacity",new ei(_,1)),f.computeBoundingSphere();let m=new ii({vertexShader:`
|
|
3822
3822
|
attribute float opacity; // Custom attribute for opacity
|
|
3823
3823
|
varying float vOpacity; // Varying to pass opacity to fragment shader
|
|
3824
3824
|
varying float distanceToCamera; // Varying to pass distance to camera
|
|
@@ -3843,7 +3843,7 @@ void main() {
|
|
|
3843
3843
|
// Combine alpha with opacity and distance factor
|
|
3844
3844
|
gl_FragColor = vec4(1.0, 1.0, 1.0, alpha * vOpacity * opacityFactor);
|
|
3845
3845
|
}
|
|
3846
|
-
`,blending:Rr,transparent:!0});m.needsUpdate=!0;let b=new Cc(f,m);r.add(b)}function l(){requestAnimationFrame(l);let h=Date.now()*.003;r.rotation.z+=.001/4,r.rotation.y+=5e-4/4,r.position.y=Math.sin(h*.05)*.05,s.lookAt(i.position),s.updateMatrixWorld(),n.render(i,s)}function c(){let h=window.innerWidth,d=window.innerHeight;s.aspect=h/d,s.updateProjectionMatrix(),n.setSize(h,d)}a(),o(),c(),n.compile(i,s),l(),window.addEventListener("resize",c,!1)}window.addEventListener("load",t,!1)};var ir,Rs,Vf,Bc,Ia,Uc,Oc,La,_i="transform",zf=_i+"Origin",x_,y_=function(t){var e=t.ownerDocument||t;for(!(_i in t.style)&&("msTransform"in t.style)&&(_i="msTransform",zf=_i+"Origin");e.parentNode&&(e=e.parentNode););if(Rs=window,Oc=new Or,e){ir=e,Vf=e.documentElement,Bc=e.body,La=ir.createElementNS("http://www.w3.org/2000/svg","g"),La.style.transform="none";var n=e.createElement("div"),i=e.createElement("div"),s=e&&(e.body||e.firstElementChild);s&&s.appendChild&&(s.appendChild(n),n.appendChild(i),n.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),x_=i.offsetParent!==n,s.removeChild(n))}return e},p1=function(t){for(var e,n;t&&t!==Bc;)n=t._gsap,n&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e},v_=[],S_=[],m1=function(){return Rs.pageYOffset||ir.scrollTop||Vf.scrollTop||Bc.scrollTop||0},g1=function(){return Rs.pageXOffset||ir.scrollLeft||Vf.scrollLeft||Bc.scrollLeft||0},Hf=function(t){return t.ownerSVGElement||((t.tagName+"").toLowerCase()==="svg"?t:null)},_1=function r(t){if(Rs.getComputedStyle(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},Bf=function r(t,e){if(t.parentNode&&(ir||y_(t))){var n=Hf(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s=n?e?"rect":"g":"div",o=e!==2?0:100,a=e===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",c=ir.createElementNS?ir.createElementNS(i.replace(/^https/,"http"),s):ir.createElement(s);return e&&(n?(Uc||(Uc=r(t)),c.setAttribute("width",.01),c.setAttribute("height",.01),c.setAttribute("transform","translate("+o+","+a+")"),Uc.appendChild(c)):(Ia||(Ia=r(t),Ia.style.cssText=l),c.style.cssText=l+"width:0.1px;height:0.1px;top:"+a+"px;left:"+o+"px",Ia.appendChild(c))),c}throw"Need document and parent."},x1=function(t){for(var e=new Or,n=0;n<t.numberOfItems;n++)e.multiply(t.getItem(n).matrix);return e},y1=function(t){var e=t.getCTM(),n;return e||(n=t.style[_i],t.style[_i]="none",t.appendChild(La),e=La.getCTM(),t.removeChild(La),n?t.style[_i]=n:t.style.removeProperty(_i.replace(/([A-Z])/g,"-$1").toLowerCase())),e||Oc.clone()},v1=function(t,e){var n=Hf(t),i=t===n,s=n?v_:S_,o=t.parentNode,a,l,c,h,d,f;if(t===Rs)return t;if(s.length||s.push(Bf(t,1),Bf(t,2),Bf(t,3)),a=n?Uc:Ia,n)i?(c=y1(t),h=-c.e/c.a,d=-c.f/c.d,l=Oc):t.getBBox?(c=t.getBBox(),l=t.transform?t.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?x1(l):l.getItem(0).matrix:Oc,h=l.a*c.x+l.c*c.y,d=l.b*c.x+l.d*c.y):(l=new Or,h=d=0),e&&t.tagName.toLowerCase()==="g"&&(h=d=0),(i?n:o).appendChild(a),a.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+h)+","+(l.f+d)+")");else{if(h=d=0,x_)for(l=t.offsetParent,c=t;c&&(c=c.parentNode)&&c!==l&&c.parentNode;)(Rs.getComputedStyle(c)[_i]+"").length>4&&(h=c.offsetLeft,d=c.offsetTop,c=0);if(f=Rs.getComputedStyle(t),f.position!=="absolute"&&f.position!=="fixed")for(l=t.offsetParent;o&&o!==l;)h+=o.scrollLeft||0,d+=o.scrollTop||0,o=o.parentNode;c=a.style,c.top=t.offsetTop-d+"px",c.left=t.offsetLeft-h+"px",c[_i]=f[_i],c[zf]=f[zf],c.position=f.position==="fixed"?"fixed":"absolute",t.parentNode.appendChild(a)}return a},kf=function(t,e,n,i,s,o,a){return t.a=e,t.b=n,t.c=i,t.d=s,t.e=o,t.f=a,t},Or=function(){function r(e,n,i,s,o,a){e===void 0&&(e=1),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=1),o===void 0&&(o=0),a===void 0&&(a=0),kf(this,e,n,i,s,o,a)}var t=r.prototype;return t.inverse=function(){var n=this.a,i=this.b,s=this.c,o=this.d,a=this.e,l=this.f,c=n*o-i*s||1e-10;return kf(this,o/c,-i/c,-s/c,n/c,(s*l-o*a)/c,-(n*l-i*a)/c)},t.multiply=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f,h=n.a,d=n.c,f=n.b,u=n.d,_=n.e,g=n.f;return kf(this,h*i+f*o,h*s+f*a,d*i+u*o,d*s+u*a,l+_*i+g*o,c+_*s+g*a)},t.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f;return i===n.a&&s===n.b&&o===n.c&&a===n.d&&l===n.e&&c===n.f},t.apply=function(n,i){i===void 0&&(i={});var s=n.x,o=n.y,a=this.a,l=this.b,c=this.c,h=this.d,d=this.e,f=this.f;return i.x=s*a+o*c+d||0,i.y=s*l+o*h+f||0,i},r}();function Br(r,t,e,n){if(!r||!r.parentNode||(ir||y_(r)).documentElement===r)return new Or;var i=p1(r),s=Hf(r),o=s?v_:S_,a=v1(r,e),l=o[0].getBoundingClientRect(),c=o[1].getBoundingClientRect(),h=o[2].getBoundingClientRect(),d=a.parentNode,f=!n&&_1(r),u=new Or((c.left-l.left)/100,(c.top-l.top)/100,(h.left-l.left)/100,(h.top-l.top)/100,l.left+(f?0:g1()),l.top+(f?0:m1()));if(d.removeChild(a),i)for(l=i.length;l--;)c=i[l],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?u.inverse():u}function M_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function S1(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var pe,be,Hn,vi,or,Gf,sr,Zf,Na,Hr,L_,Jf,za,Qf,Ua,xi,Oa,Vc,F_,$f,Gc=0,N_=function(){return typeof window<"u"},U_=function(){return pe||N_()&&(pe=window.gsap)&&pe.registerPlugin&&pe},Vr=function(t){return typeof t=="function"},Ba=function(t){return typeof t=="object"},yi=function(t){return typeof t>"u"},Hc=function(){return!1},ka="transform",Kf="transformOrigin",kr=function(t){return Math.round(t*1e4)/1e4},Fa=Array.isArray,kc=function(t,e){var n=Hn.createElementNS?Hn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hn.createElement(t);return n.style?n:Hn.createElement(t)},b_=180/Math.PI,Ps=1e20,M1=new Or,zr=Date.now||function(){return new Date().getTime()},Ls=[],No={},b1=0,w1=/^(?:a|input|textarea|button|select)$/i,w_=0,Lo={},rr={},O_=function(t,e){var n={},i;for(i in t)n[i]=e?t[i]*e:t[i];return n},E1=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},E_=function r(t,e){for(var n=t.length,i;n--;)e?t[n].style.touchAction=e:t[n].style.removeProperty("touch-action"),i=t[n].children,i&&i.length&&r(i,e)},B_=function(){return Ls.forEach(function(t){return t()})},T1=function(t){Ls.push(t),Ls.length===1&&pe.ticker.add(B_)},T_=function(){return!Ls.length&&pe.ticker.remove(B_)},A_=function(t){for(var e=Ls.length;e--;)Ls[e]===t&&Ls.splice(e,1);pe.to(T_,{overwrite:!0,delay:15,duration:0,onComplete:T_,data:"_draggable"})},A1=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},qe=function(t,e,n,i){if(t.addEventListener){var s=za[e];i=i||(L_?{passive:!1}:null),t.addEventListener(s||e,n,i),s&&e!==s&&t.addEventListener(e,n,i)}},He=function(t,e,n,i){if(t.removeEventListener){var s=za[e];t.removeEventListener(s||e,n,i),s&&e!==s&&t.removeEventListener(e,n,i)}},ri=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},D1=function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0},C1=function r(t){Qf=t.touches&&Gc<t.touches.length,He(t.target,"touchend",r)},D_=function(t){Qf=t.touches&&Gc<t.touches.length,qe(t.target,"touchend",C1)},Uo=function(t){return be.pageYOffset||t.scrollTop||t.documentElement.scrollTop||t.body.scrollTop||0},Oo=function(t){return be.pageXOffset||t.scrollLeft||t.documentElement.scrollLeft||t.body.scrollLeft||0},C_=function r(t,e){qe(t,"scroll",e),Bo(t.parentNode)||r(t.parentNode,e)},R_=function r(t,e){He(t,"scroll",e),Bo(t.parentNode)||r(t.parentNode,e)},Bo=function(t){return!t||t===vi||t.nodeType===9||t===Hn.body||t===be||!t.nodeType||!t.parentNode},P_=function(t,e){var n=e==="x"?"Width":"Height",i="scroll"+n,s="client"+n;return Math.max(0,Bo(t)?Math.max(vi[i],or[i])-(be["inner"+n]||vi[s]||or[s]):t[i]-t[s])},Wf=function r(t,e){var n=P_(t,"x"),i=P_(t,"y");Bo(t)?t=rr:r(t.parentNode,e),t._gsMaxScrollX=n,t._gsMaxScrollY=i,e||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},Xf=function(t,e,n){var i=t.style;i&&(yi(i[e])&&(e=Na(e,t)||e),n==null?i.removeProperty&&i.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):i[e]=n)},Va=function(t){return be.getComputedStyle(t instanceof Element?t:t.host||(t.parentNode||{}).host||t)},Is={},Fo=function(t){if(t===be)return Is.left=Is.top=0,Is.width=Is.right=vi.clientWidth||t.innerWidth||or.clientWidth||0,Is.height=Is.bottom=(t.innerHeight||0)-20<vi.clientHeight?vi.clientHeight:t.innerHeight||or.clientHeight||0,Is;var e=t.ownerDocument||Hn,n=yi(t.pageX)?!t.nodeType&&!yi(t.left)&&!yi(t.top)?t:Hr(t)[0].getBoundingClientRect():{left:t.pageX-Oo(e),top:t.pageY-Uo(e),right:t.pageX-Oo(e)+1,bottom:t.pageY-Uo(e)+1};return yi(n.right)&&!yi(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):yi(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},Oe=function(t,e,n){var i=t.vars,s=i[n],o=t._listeners[e],a;return Vr(s)&&(a=s.apply(i.callbackScope||t,i[n+"Params"]||[t.pointerEvent])),o&&t.dispatchEvent(e)===!1&&(a=!1),a},I_=function(t,e){var n=Hr(t)[0],i,s,o;return!n.nodeType&&n!==be?yi(t.left)?(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i}):(o={x:0,y:0},{left:t.left-o.x,top:t.top-o.y,width:t.width,height:t.height}):R1(n,e)},si={},R1=function(t,e){e=Hr(e)[0];var n=t.getBBox&&t.ownerSVGElement,i=t.ownerDocument||Hn,s,o,a,l,c,h,d,f,u,_,g,p,m;if(t===be)a=Uo(i),s=Oo(i),o=s+(i.documentElement.clientWidth||t.innerWidth||i.body.clientWidth||0),l=a+((t.innerHeight||0)-20<i.documentElement.clientHeight?i.documentElement.clientHeight:t.innerHeight||i.body.clientHeight||0);else{if(e===be||yi(e))return t.getBoundingClientRect();s=a=0,n?(_=t.getBBox(),g=_.width,p=_.height):(t.viewBox&&(_=t.viewBox.baseVal)&&(s=_.x||0,a=_.y||0,g=_.width,p=_.height),g||(m=Va(t),_=m.boxSizing==="border-box",g=(parseFloat(m.width)||t.clientWidth||0)+(_?0:parseFloat(m.borderLeftWidth)+parseFloat(m.borderRightWidth)),p=(parseFloat(m.height)||t.clientHeight||0)+(_?0:parseFloat(m.borderTopWidth)+parseFloat(m.borderBottomWidth)))),o=g,l=p}return t===e?{left:s,top:a,width:o-s,height:l-a}:(c=Br(e,!0).multiply(Br(t)),h=c.apply({x:s,y:a}),d=c.apply({x:o,y:a}),f=c.apply({x:o,y:l}),u=c.apply({x:s,y:l}),s=Math.min(h.x,d.x,f.x,u.x),a=Math.min(h.y,d.y,f.y,u.y),{left:s,top:a,width:Math.max(h.x,d.x,f.x,u.x)-s,height:Math.max(h.y,d.y,f.y,u.y)-a})},Yf=function(t,e,n,i,s,o){var a={},l,c,h;if(e)if(s!==1&&e instanceof Array){if(a.end=l=[],h=e.length,Ba(e[0]))for(c=0;c<h;c++)l[c]=O_(e[c],s);else for(c=0;c<h;c++)l[c]=e[c]*s;n+=1.1,i-=1.1}else Vr(e)?a.end=function(d){var f=e.call(t,d),u,_;if(s!==1)if(Ba(f)){u={};for(_ in f)u[_]=f[_]*s;f=u}else f*=s;return f}:a.end=e;return(n||n===0)&&(a.max=n),(i||i===0)&&(a.min=i),o&&(a.velocity=0),a},P1=function r(t){var e;return!t||!t.getAttribute||t===or?!1:(e=t.getAttribute("data-clickable"))==="true"||e!=="false"&&(w1.test(t.nodeName+"")||t.getAttribute("contentEditable")==="true")?!0:r(t.parentNode)},zc=function(t,e){for(var n=t.length,i;n--;)i=t[n],i.ondragstart=i.onselectstart=e?null:Hc,pe.set(i,{lazy:!0,userSelect:e?"text":"none"})},I1=function r(t){if(Va(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},k_,jf,L1=function(t,e){t=pe.utils.toArray(t)[0],e=e||{};var n=document.createElement("div"),i=n.style,s=t.firstChild,o=0,a=0,l=t.scrollTop,c=t.scrollLeft,h=t.scrollWidth,d=t.scrollHeight,f=0,u=0,_=0,g,p,m,b,S,v;k_&&e.force3D!==!1?(S="translate3d(",v="px,0px)"):ka&&(S="translate(",v="px)"),this.scrollTop=function(D,T){if(!arguments.length)return-this.top();this.top(-D,T)},this.scrollLeft=function(D,T){if(!arguments.length)return-this.left();this.left(-D,T)},this.left=function(D,T){if(!arguments.length)return-(t.scrollLeft+a);var w=t.scrollLeft-c,I=a;if((w>2||w<-2)&&!T){c=t.scrollLeft,pe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-c),e.onKill&&e.onKill();return}D=-D,D<0?(a=D-.5|0,D=0):D>u?(a=D-u|0,D=u):a=0,(a||I)&&(this._skip||(i[ka]=S+-a+"px,"+-o+v),a+f>=0&&(i.paddingRight=a+f+"px")),t.scrollLeft=D|0,c=t.scrollLeft},this.top=function(D,T){if(!arguments.length)return-(t.scrollTop+o);var w=t.scrollTop-l,I=o;if((w>2||w<-2)&&!T){l=t.scrollTop,pe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),e.onKill&&e.onKill();return}D=-D,D<0?(o=D-.5|0,D=0):D>_?(o=D-_|0,D=_):o=0,(o||I)&&(this._skip||(i[ka]=S+-a+"px,"+-o+v)),t.scrollTop=D|0,l=t.scrollTop},this.maxScrollTop=function(){return _},this.maxScrollLeft=function(){return u},this.disable=function(){for(s=n.firstChild;s;)b=s.nextSibling,t.appendChild(s),s=b;t===n.parentNode&&t.removeChild(n)},this.enable=function(){if(s=t.firstChild,s!==n){for(;s;)b=s.nextSibling,n.appendChild(s),s=b;t.appendChild(n),this.calibrate()}},this.calibrate=function(D){var T=t.clientWidth===g,w,I,M;l=t.scrollTop,c=t.scrollLeft,!(T&&t.clientHeight===p&&n.offsetHeight===m&&h===t.scrollWidth&&d===t.scrollHeight&&!D)&&((o||a)&&(I=this.left(),M=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),w=Va(t),(!T||D)&&(i.display="block",i.width="auto",i.paddingRight="0px",f=Math.max(0,t.scrollWidth-t.clientWidth),f&&(f+=parseFloat(w.paddingLeft)+(jf?parseFloat(w.paddingRight):0))),i.display="inline-block",i.position="relative",i.overflow="visible",i.verticalAlign="top",i.boxSizing="content-box",i.width="100%",i.paddingRight=f+"px",jf&&(i.paddingBottom=w.paddingBottom),g=t.clientWidth,p=t.clientHeight,h=t.scrollWidth,d=t.scrollHeight,u=t.scrollWidth-g,_=t.scrollHeight-p,m=n.offsetHeight,i.display="block",(I||M)&&(this.left(I),this.top(M)))},this.content=n,this.element=t,this._skip=!1,this.enable()},qf=function(t){if(N_()&&document.body){var e=window&&window.navigator;be=window,Hn=document,vi=Hn.documentElement,or=Hn.body,Gf=kc("div"),Vc=!!window.PointerEvent,sr=kc("div"),sr.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Oa=sr.style.cursor==="grab"?"grab":"move",Ua=e&&e.userAgent.toLowerCase().indexOf("android")!==-1,Jf="ontouchstart"in vi&&"orientation"in be||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),jf=function(){var n=kc("div"),i=kc("div"),s=i.style,o=or,a;return s.display="inline-block",s.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),o.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,o.removeChild(n),a}(),za=function(n){for(var i=n.split(","),s=("onpointerdown"in Gf?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Gf?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),o={},a=4;--a>-1;)o[i[a]]=s[a],o[s[a]]=i[a];try{vi.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){L_=1}}))}catch{}return o}("touchstart,touchmove,touchend,touchcancel"),qe(Hn,"touchcancel",Hc),qe(be,"touchmove",Hc),or&&or.addEventListener("touchstart",Hc),qe(Hn,"contextmenu",function(){for(var n in No)No[n].isPressed&&No[n].endDrag()}),pe=Zf=U_()}pe?(xi=pe.plugins.inertia,F_=pe.core.context||function(){},Na=pe.utils.checkPrefix,ka=Na(ka),Kf=Na(Kf),Hr=pe.utils.toArray,$f=pe.core.getStyleSaver,k_=!!Na("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},F1=function(){function r(e){this._listeners={},this.target=e||this}var t=r.prototype;return t.addEventListener=function(n,i){var s=this._listeners[n]||(this._listeners[n]=[]);~s.indexOf(i)||s.push(i)},t.removeEventListener=function(n,i){var s=this._listeners[n],o=s&&s.indexOf(i);o>=0&&s.splice(o,1)},t.dispatchEvent=function(n){var i=this,s;return(this._listeners[n]||[]).forEach(function(o){return o.call(i,{type:n,target:i.target})===!1&&(s=!1)}),s},r}(),Fs=function(r){S1(t,r);function t(e,n){var i;i=r.call(this)||this,Zf||qf(1),e=Hr(e)[0],i.styles=$f&&$f(e,"transform,left,top"),xi||(xi=pe.plugins.inertia),i.vars=n=O_(n||{}),i.target=e,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(n.dragResistance)||0,i.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,i.lockAxis=n.lockAxis,i.autoScroll=n.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!n.allowEventDefault,pe.getProperty(e,"x");var s=(n.type||"x,y").toLowerCase(),o=~s.indexOf("x")||~s.indexOf("y"),a=s.indexOf("rotation")!==-1,l=a?"rotation":o?"x":"left",c=o?"y":"top",h=!!(~s.indexOf("x")||~s.indexOf("left")||s==="scroll"),d=!!(~s.indexOf("y")||~s.indexOf("top")||s==="scroll"),f=n.minimumMovement||2,u=M_(i),_=Hr(n.trigger||n.handle||e),g={},p=0,m=!1,b=n.autoScrollMarginTop||40,S=n.autoScrollMarginRight||40,v=n.autoScrollMarginBottom||40,D=n.autoScrollMarginLeft||40,T=n.clickableTest||P1,w=0,I=e._gsap||pe.core.getCache(e),M=I1(e),y=function(F,rt){return parseFloat(I.get(e,F,rt))},P=e.ownerDocument||Hn,L,C,B,J,O,Y,H,U,R,at,_t,Ut,X,ot,xt,ct,Rt,kt,Z,Jt,It,Ft,bt,Et,Ht,W,$t,A,x,N,q,tt,it,vt=function(F){return ri(F),F.stopImmediatePropagation&&F.stopImmediatePropagation(),!1},pt=function Mt(F){if(u.autoScroll&&u.isDragging&&(m||Rt)){var rt=e,k=u.autoScroll*15,j,dt,et,wt,ft,Dt,zt,Nt;for(m=!1,rr.scrollTop=be.pageYOffset!=null?be.pageYOffset:P.documentElement.scrollTop!=null?P.documentElement.scrollTop:P.body.scrollTop,rr.scrollLeft=be.pageXOffset!=null?be.pageXOffset:P.documentElement.scrollLeft!=null?P.documentElement.scrollLeft:P.body.scrollLeft,wt=u.pointerX-rr.scrollLeft,ft=u.pointerY-rr.scrollTop;rt&&!dt;)dt=Bo(rt.parentNode),j=dt?rr:rt.parentNode,et=dt?{bottom:Math.max(vi.clientHeight,be.innerHeight||0),right:Math.max(vi.clientWidth,be.innerWidth||0),left:0,top:0}:j.getBoundingClientRect(),Dt=zt=0,d&&(Nt=j._gsMaxScrollY-j.scrollTop,Nt<0?zt=Nt:ft>et.bottom-v&&Nt?(m=!0,zt=Math.min(Nt,k*(1-Math.max(0,et.bottom-ft)/v)|0)):ft<et.top+b&&j.scrollTop&&(m=!0,zt=-Math.min(j.scrollTop,k*(1-Math.max(0,ft-et.top)/b)|0)),zt&&(j.scrollTop+=zt)),h&&(Nt=j._gsMaxScrollX-j.scrollLeft,Nt<0?Dt=Nt:wt>et.right-S&&Nt?(m=!0,Dt=Math.min(Nt,k*(1-Math.max(0,et.right-wt)/S)|0)):wt<et.left+D&&j.scrollLeft&&(m=!0,Dt=-Math.min(j.scrollLeft,k*(1-Math.max(0,wt-et.left)/D)|0)),Dt&&(j.scrollLeft+=Dt)),dt&&(Dt||zt)&&(be.scrollTo(j.scrollLeft,j.scrollTop),st(u.pointerX+Dt,u.pointerY+zt)),rt=j}if(Rt){var te=u.x,he=u.y;a?(u.deltaX=te-parseFloat(I.rotation),u.rotation=te,I.rotation=te+"deg",I.renderTransform(1,I)):C?(d&&(u.deltaY=he-C.top(),C.top(he)),h&&(u.deltaX=te-C.left(),C.left(te))):o?(d&&(u.deltaY=he-parseFloat(I.y),I.y=he+"px"),h&&(u.deltaX=te-parseFloat(I.x),I.x=te+"px"),I.renderTransform(1,I)):(d&&(u.deltaY=he-parseFloat(e.style.top||0),e.style.top=he+"px"),h&&(u.deltaX=te-parseFloat(e.style.left||0),e.style.left=te+"px")),U&&!F&&!A&&(A=!0,Oe(u,"drag","onDrag")===!1&&(h&&(u.x-=u.deltaX),d&&(u.y-=u.deltaY),Mt(!0)),A=!1)}Rt=!1},lt=function(F,rt){var k=u.x,j=u.y,dt,et;e._gsap||(I=pe.core.getCache(e)),I.uncache&&pe.getProperty(e,"x"),o?(u.x=parseFloat(I.x),u.y=parseFloat(I.y)):a?u.x=u.rotation=parseFloat(I.rotation):C?(u.y=C.top(),u.x=C.left()):(u.y=parseFloat(e.style.top||(et=Va(e))&&et.top)||0,u.x=parseFloat(e.style.left||(et||{}).left)||0),(Z||Jt||It)&&!rt&&(u.isDragging||u.isThrowing)&&(It&&(Lo.x=u.x,Lo.y=u.y,dt=It(Lo),dt.x!==u.x&&(u.x=dt.x,Rt=!0),dt.y!==u.y&&(u.y=dt.y,Rt=!0)),Z&&(dt=Z(u.x),dt!==u.x&&(u.x=dt,a&&(u.rotation=dt),Rt=!0)),Jt&&(dt=Jt(u.y),dt!==u.y&&(u.y=dt),Rt=!0)),Rt&&pt(!0),F||(u.deltaX=u.x-k,u.deltaY=u.y-j,Oe(u,"throwupdate","onThrowUpdate"))},Lt=function(F,rt,k,j){return rt==null&&(rt=-Ps),k==null&&(k=Ps),Vr(F)?function(dt){var et=u.isPressed?1-u.edgeResistance:1;return F.call(u,(dt>k?k+(dt-k)*et:dt<rt?rt+(dt-rt)*et:dt)*j)*j}:Fa(F)?function(dt){for(var et=F.length,wt=0,ft=Ps,Dt,zt;--et>-1;)Dt=F[et],zt=Dt-dt,zt<0&&(zt=-zt),zt<ft&&Dt>=rt&&Dt<=k&&(wt=et,ft=zt);return F[wt]}:isNaN(F)?function(dt){return dt}:function(){return F*j}},ht=function(F,rt,k,j,dt,et,wt){return et=et&&et<Ps?et*et:Ps,Vr(F)?function(ft){var Dt=u.isPressed?1-u.edgeResistance:1,zt=ft.x,Nt=ft.y,te,he,me;return ft.x=zt=zt>k?k+(zt-k)*Dt:zt<rt?rt+(zt-rt)*Dt:zt,ft.y=Nt=Nt>dt?dt+(Nt-dt)*Dt:Nt<j?j+(Nt-j)*Dt:Nt,te=F.call(u,ft),te!==ft&&(ft.x=te.x,ft.y=te.y),wt!==1&&(ft.x*=wt,ft.y*=wt),et<Ps&&(he=ft.x-zt,me=ft.y-Nt,he*he+me*me>et&&(ft.x=zt,ft.y=Nt)),ft}:Fa(F)?function(ft){for(var Dt=F.length,zt=0,Nt=Ps,te,he,me,ae;--Dt>-1;)me=F[Dt],te=me.x-ft.x,he=me.y-ft.y,ae=te*te+he*he,ae<Nt&&(zt=Dt,Nt=ae);return Nt<=et?F[zt]:ft}:function(ft){return ft}},yt=function(){var F,rt,k,j;H=!1,C?(C.calibrate(),u.minX=_t=-C.maxScrollLeft(),u.minY=X=-C.maxScrollTop(),u.maxX=at=u.maxY=Ut=0,H=!0):n.bounds&&(F=I_(n.bounds,e.parentNode),a?(u.minX=_t=F.left,u.maxX=at=F.left+F.width,u.minY=X=u.maxY=Ut=0):!yi(n.bounds.maxX)||!yi(n.bounds.maxY)?(F=n.bounds,u.minX=_t=F.minX,u.minY=X=F.minY,u.maxX=at=F.maxX,u.maxY=Ut=F.maxY):(rt=I_(e,e.parentNode),u.minX=_t=Math.round(y(l,"px")+F.left-rt.left),u.minY=X=Math.round(y(c,"px")+F.top-rt.top),u.maxX=at=Math.round(_t+(F.width-rt.width)),u.maxY=Ut=Math.round(X+(F.height-rt.height))),_t>at&&(u.minX=at,u.maxX=at=_t,_t=u.minX),X>Ut&&(u.minY=Ut,u.maxY=Ut=X,X=u.minY),a&&(u.minRotation=_t,u.maxRotation=at),H=!0),n.liveSnap&&(k=n.liveSnap===!0?n.snap||{}:n.liveSnap,j=Fa(k)||Vr(k),a?(Z=Lt(j?k:k.rotation,_t,at,1),Jt=null):k.points?It=ht(j?k:k.points,_t,at,X,Ut,k.radius,C?-1:1):(h&&(Z=Lt(j?k:k.x||k.left||k.scrollLeft,_t,at,C?-1:1)),d&&(Jt=Lt(j?k:k.y||k.top||k.scrollTop,X,Ut,C?-1:1))))},Yt=function(){u.isThrowing=!1,Oe(u,"throwcomplete","onThrowComplete")},ut=function(){u.isThrowing=!1},Tt=function(F,rt){var k,j,dt,et;F&&xi?(F===!0&&(k=n.snap||n.liveSnap||{},j=Fa(k)||Vr(k),F={resistance:(n.throwResistance||n.resistance||1e3)/(a?10:1)},a?F.rotation=Yf(u,j?k:k.rotation,at,_t,1,rt):(h&&(F[l]=Yf(u,j?k:k.points||k.x||k.left,at,_t,C?-1:1,rt||u.lockedAxis==="x")),d&&(F[c]=Yf(u,j?k:k.points||k.y||k.top,Ut,X,C?-1:1,rt||u.lockedAxis==="y")),(k.points||Fa(k)&&Ba(k[0]))&&(F.linkedProps=l+","+c,F.radius=k.radius))),u.isThrowing=!0,et=isNaN(n.overshootTolerance)?n.edgeResistance===1?0:1-u.edgeResistance+.2:n.overshootTolerance,F.duration||(F.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?et===0||Ba(F)&&F.resistance>1e3?0:.5:n.minDuration,overshoot:et}),u.tween=dt=pe.to(C||e,{inertia:F,data:"_draggable",inherit:!1,onComplete:Yt,onInterrupt:ut,onUpdate:n.fastMode?Oe:lt,onUpdateParams:n.fastMode?[u,"onthrowupdate","onThrowUpdate"]:k&&k.radius?[!1,!0]:[]}),n.fastMode||(C&&(C._skip=!0),dt.render(1e9,!0,!0),lt(!0,!0),u.endX=u.x,u.endY=u.y,a&&(u.endRotation=u.x),dt.play(0),lt(!0,!0),C&&(C._skip=!1))):H&&u.applyBounds()},Wt=function(F){var rt=Et,k;Et=Br(e.parentNode,!0),F&&u.isPressed&&!Et.equals(rt||new Or)&&(k=rt.inverse().apply({x:B,y:J}),Et.apply(k,k),B=k.x,J=k.y),Et.equals(M1)&&(Et=null)},qt=function(){var F=1-u.edgeResistance,rt=M?Oo(P):0,k=M?Uo(P):0,j,dt,et;o&&(I.x=y(l,"px")+"px",I.y=y(c,"px")+"px",I.renderTransform()),Wt(!1),si.x=u.pointerX-rt,si.y=u.pointerY-k,Et&&Et.apply(si,si),B=si.x,J=si.y,Rt&&(st(u.pointerX,u.pointerY),pt(!0)),tt=Br(e),C?(yt(),Y=C.top(),O=C.left()):(ue()?(lt(!0,!0),yt()):u.applyBounds(),a?(j=e.ownerSVGElement?[I.xOrigin-e.getBBox().x,I.yOrigin-e.getBBox().y]:(Va(e)[Kf]||"0 0").split(" "),ct=u.rotationOrigin=Br(e).apply({x:parseFloat(j[0])||0,y:parseFloat(j[1])||0}),lt(!0,!0),dt=u.pointerX-ct.x-rt,et=ct.y-u.pointerY+k,O=u.x,Y=u.y=Math.atan2(et,dt)*b_):(Y=y(c,"px"),O=y(l,"px"))),H&&F&&(O>at?O=at+(O-at)/F:O<_t&&(O=_t-(_t-O)/F),a||(Y>Ut?Y=Ut+(Y-Ut)/F:Y<X&&(Y=X-(X-Y)/F))),u.startX=O=kr(O),u.startY=Y=kr(Y)},ue=function(){return u.tween&&u.tween.isActive()},Zt=function(){sr.parentNode&&!ue()&&!u.isDragging&&sr.parentNode.removeChild(sr)},V=function(F,rt){var k;if(!L||u.isPressed||!F||(F.type==="mousedown"||F.type==="pointerdown")&&!rt&&zr()-w<30&&za[u.pointerEvent.type]){q&&F&&L&&ri(F);return}if(Ht=ue(),it=!1,u.pointerEvent=F,za[F.type]?(bt=~F.type.indexOf("touch")?F.currentTarget||F.target:P,qe(bt,"touchend",mt),qe(bt,"touchmove",Q),qe(bt,"touchcancel",mt),qe(P,"touchstart",D_)):(bt=null,qe(P,"mousemove",Q)),$t=null,(!Vc||!bt)&&(qe(P,"mouseup",mt),F&&F.target&&qe(F.target,"mouseup",mt)),Ft=T.call(u,F.target)&&n.dragClickables===!1&&!rt,Ft){qe(F.target,"change",mt),Oe(u,"pressInit","onPressInit"),Oe(u,"press","onPress"),zc(_,!0),q=!1;return}if(W=!bt||h===d||u.vars.allowNativeTouchScrolling===!1||u.vars.allowContextMenu&&F&&(F.ctrlKey||F.which>2)?!1:h?"y":"x",q=!W&&!u.allowEventDefault,q&&(ri(F),qe(be,"touchforcechange",ri)),F.changedTouches?(F=ot=F.changedTouches[0],xt=F.identifier):F.pointerId?xt=F.pointerId:ot=xt=null,Gc++,T1(pt),J=u.pointerY=F.pageY,B=u.pointerX=F.pageX,Oe(u,"pressInit","onPressInit"),(W||u.autoScroll)&&Wf(e.parentNode),e.parentNode&&u.autoScroll&&!C&&!a&&e.parentNode._gsMaxScrollX&&!sr.parentNode&&!e.getBBox&&(sr.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(sr)),qt(),u.tween&&u.tween.kill(),u.isThrowing=!1,pe.killTweensOf(C||e,g,!0),C&&pe.killTweensOf(e,{scrollTo:1},!0),u.tween=u.lockedAxis=null,(n.zIndexBoost||!a&&!C&&n.zIndexBoost!==!1)&&(e.style.zIndex=t.zIndex++),u.isPressed=!0,U=!!(n.onDrag||u._listeners.drag),R=!!(n.onMove||u._listeners.move),n.cursor!==!1||n.activeCursor)for(k=_.length;--k>-1;)pe.set(_[k],{cursor:n.activeCursor||n.cursor||(Oa==="grab"?"grabbing":Oa)});Oe(u,"press","onPress")},Q=function(F){var rt=F,k,j,dt,et,wt,ft;if(!L||Qf||!u.isPressed||!F){q&&F&&L&&ri(F);return}if(u.pointerEvent=F,k=F.changedTouches,k){if(F=k[0],F!==ot&&F.identifier!==xt){for(et=k.length;--et>-1&&(F=k[et]).identifier!==xt&&F.target!==e;);if(et<0)return}}else if(F.pointerId&&xt&&F.pointerId!==xt)return;if(bt&&W&&!$t&&(si.x=F.pageX-(M?Oo(P):0),si.y=F.pageY-(M?Uo(P):0),Et&&Et.apply(si,si),j=si.x,dt=si.y,wt=Math.abs(j-B),ft=Math.abs(dt-J),(wt!==ft&&(wt>f||ft>f)||Ua&&W===$t)&&($t=wt>ft&&h?"x":"y",W&&$t!==W&&qe(be,"touchforcechange",ri),u.vars.lockAxisOnTouchScroll!==!1&&h&&d&&(u.lockedAxis=$t==="x"?"y":"x",Vr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,rt)),Ua&&W===$t))){mt(rt);return}!u.allowEventDefault&&(!W||$t&&W!==$t)&&rt.cancelable!==!1?(ri(rt),q=!0):q&&(q=!1),u.autoScroll&&(m=!0),st(F.pageX,F.pageY,R)},st=function(F,rt,k){var j=1-u.dragResistance,dt=1-u.edgeResistance,et=u.pointerX,wt=u.pointerY,ft=Y,Dt=u.x,zt=u.y,Nt=u.endX,te=u.endY,he=u.endRotation,me=Rt,ae,E,z,G,K,$;u.pointerX=F,u.pointerY=rt,M&&(F-=Oo(P),rt-=Uo(P)),a?(G=Math.atan2(ct.y-rt,F-ct.x)*b_,K=u.y-G,K>180?(Y-=360,u.y=G):K<-180&&(Y+=360,u.y=G),u.x!==O||Math.abs(Y-G)>f?(u.y=G,z=O+(Y-G)*j):z=O):(Et&&($=F*Et.a+rt*Et.c+Et.e,rt=F*Et.b+rt*Et.d+Et.f,F=$),E=rt-J,ae=F-B,E<f&&E>-f&&(E=0),ae<f&&ae>-f&&(ae=0),(u.lockAxis||u.lockedAxis)&&(ae||E)&&($=u.lockedAxis,$||(u.lockedAxis=$=h&&Math.abs(ae)>Math.abs(E)?"y":d?"x":null,$&&Vr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,u.pointerEvent)),$==="y"?E=0:$==="x"&&(ae=0)),z=kr(O+ae*j),G=kr(Y+E*j)),(Z||Jt||It)&&(u.x!==z||u.y!==G&&!a)&&(It&&(Lo.x=z,Lo.y=G,$=It(Lo),z=kr($.x),G=kr($.y)),Z&&(z=kr(Z(z))),Jt&&(G=kr(Jt(G)))),H&&(z>at?z=at+Math.round((z-at)*dt):z<_t&&(z=_t+Math.round((z-_t)*dt)),a||(G>Ut?G=Math.round(Ut+(G-Ut)*dt):G<X&&(G=Math.round(X+(G-X)*dt)))),(u.x!==z||u.y!==G&&!a)&&(a?(u.endRotation=u.x=u.endX=z,Rt=!0):(d&&(u.y=u.endY=G,Rt=!0),h&&(u.x=u.endX=z,Rt=!0)),!k||Oe(u,"move","onMove")!==!1?!u.isDragging&&u.isPressed&&(u.isDragging=it=!0,Oe(u,"dragstart","onDragStart")):(u.pointerX=et,u.pointerY=wt,Y=ft,u.x=Dt,u.y=zt,u.endX=Nt,u.endY=te,u.endRotation=he,Rt=me))},mt=function Mt(F,rt){if(!L||!u.isPressed||F&&xt!=null&&!rt&&(F.pointerId&&F.pointerId!==xt&&F.target!==e||F.changedTouches&&!D1(F.changedTouches,xt))){q&&F&&L&&ri(F);return}u.isPressed=!1;var k=F,j=u.isDragging,dt=u.vars.allowContextMenu&&F&&(F.ctrlKey||F.which>2),et=pe.delayedCall(.001,Zt),wt,ft,Dt,zt,Nt;if(bt?(He(bt,"touchend",Mt),He(bt,"touchmove",Q),He(bt,"touchcancel",Mt),He(P,"touchstart",D_)):He(P,"mousemove",Q),He(be,"touchforcechange",ri),(!Vc||!bt)&&(He(P,"mouseup",Mt),F&&F.target&&He(F.target,"mouseup",Mt)),Rt=!1,j&&(p=w_=zr(),u.isDragging=!1),A_(pt),Ft&&!dt){F&&(He(F.target,"change",Mt),u.pointerEvent=k),zc(_,!1),Oe(u,"release","onRelease"),Oe(u,"click","onClick"),Ft=!1;return}for(ft=_.length;--ft>-1;)Xf(_[ft],"cursor",n.cursor||(n.cursor!==!1?Oa:null));if(Gc--,F){if(wt=F.changedTouches,wt&&(F=wt[0],F!==ot&&F.identifier!==xt)){for(ft=wt.length;--ft>-1&&(F=wt[ft]).identifier!==xt&&F.target!==e;);if(ft<0&&!rt)return}u.pointerEvent=k,u.pointerX=F.pageX,u.pointerY=F.pageY}return dt&&k?(ri(k),q=!0,Oe(u,"release","onRelease")):k&&!j?(q=!1,Ht&&(n.snap||n.bounds)&&Tt(n.inertia||n.throwProps),Oe(u,"release","onRelease"),(!Ua||k.type!=="touchmove")&&k.type.indexOf("cancel")===-1&&(Oe(u,"click","onClick"),zr()-w<300&&Oe(u,"doubleclick","onDoubleClick"),zt=k.target||e,w=zr(),Nt=function(){w!==x&&u.enabled()&&!u.isPressed&&!k.defaultPrevented&&(zt.click?zt.click():P.createEvent&&(Dt=P.createEvent("MouseEvents"),Dt.initMouseEvent("click",!0,!0,be,1,u.pointerEvent.screenX,u.pointerEvent.screenY,u.pointerX,u.pointerY,!1,!1,!1,!1,0,null),zt.dispatchEvent(Dt)))},!Ua&&!k.defaultPrevented&&pe.delayedCall(.05,Nt))):(Tt(n.inertia||n.throwProps),!u.allowEventDefault&&k&&(n.dragClickables!==!1||!T.call(u,k.target))&&j&&(!W||$t&&W===$t)&&k.cancelable!==!1?(q=!0,ri(k)):q=!1,Oe(u,"release","onRelease")),ue()&&et.duration(u.tween.duration()),j&&Oe(u,"dragend","onDragEnd"),!0},gt=function(F){if(F&&u.isDragging&&!C){var rt=F.target||e.parentNode,k=rt.scrollLeft-rt._gsScrollX,j=rt.scrollTop-rt._gsScrollY;(k||j)&&(Et?(B-=k*Et.a+j*Et.c,J-=j*Et.d+k*Et.b):(B-=k,J-=j),rt._gsScrollX+=k,rt._gsScrollY+=j,st(u.pointerX,u.pointerY))}},Bt=function(F){var rt=zr(),k=rt-w<100,j=rt-p<50,dt=k&&x===w,et=u.pointerEvent&&u.pointerEvent.defaultPrevented,wt=k&&N===w,ft=F.isTrusted||F.isTrusted==null&&k&&dt;if((dt||j&&u.vars.suppressClickOnDrag!==!1)&&F.stopImmediatePropagation&&F.stopImmediatePropagation(),k&&!(u.pointerEvent&&u.pointerEvent.defaultPrevented)&&(!dt||ft&&!wt)){ft&&dt&&(N=w),x=w;return}(u.isPressed||j||k)&&(!ft||!F.detail||!k||et)&&ri(F),!k&&!j&&!it&&(F&&F.target&&(u.pointerEvent=F),Oe(u,"click","onClick"))},ee=function(F){return Et?{x:F.x*Et.a+F.y*Et.c+Et.e,y:F.x*Et.b+F.y*Et.d+Et.f}:{x:F.x,y:F.y}};return kt=t.get(e),kt&&kt.kill(),i.startDrag=function(Mt,F){var rt,k,j,dt;V(Mt||u.pointerEvent,!0),F&&!u.hitTest(Mt||u.pointerEvent)&&(rt=Fo(Mt||u.pointerEvent),k=Fo(e),j=ee({x:rt.left+rt.width/2,y:rt.top+rt.height/2}),dt=ee({x:k.left+k.width/2,y:k.top+k.height/2}),B-=j.x-dt.x,J-=j.y-dt.y),u.isDragging||(u.isDragging=it=!0,Oe(u,"dragstart","onDragStart"))},i.drag=Q,i.endDrag=function(Mt){return mt(Mt||u.pointerEvent,!0)},i.timeSinceDrag=function(){return u.isDragging?0:(zr()-p)/1e3},i.timeSinceClick=function(){return(zr()-w)/1e3},i.hitTest=function(Mt,F){return t.hitTest(u.target,Mt,F)},i.getDirection=function(Mt,F){var rt=Mt==="velocity"&&xi?Mt:Ba(Mt)&&!a?"element":"start",k,j,dt,et,wt,ft;return rt==="element"&&(wt=Fo(u.target),ft=Fo(Mt)),k=rt==="start"?u.x-O:rt==="velocity"?xi.getVelocity(e,l):wt.left+wt.width/2-(ft.left+ft.width/2),a?k<0?"counter-clockwise":"clockwise":(F=F||2,j=rt==="start"?u.y-Y:rt==="velocity"?xi.getVelocity(e,c):wt.top+wt.height/2-(ft.top+ft.height/2),dt=Math.abs(k/j),et=dt<1/F?"":k<0?"left":"right",dt<F&&(et!==""&&(et+="-"),et+=j<0?"up":"down"),et)},i.applyBounds=function(Mt,F){var rt,k,j,dt,et,wt;if(Mt&&n.bounds!==Mt)return n.bounds=Mt,u.update(!0,F);if(lt(!0),yt(),H&&!ue()){if(rt=u.x,k=u.y,rt>at?rt=at:rt<_t&&(rt=_t),k>Ut?k=Ut:k<X&&(k=X),(u.x!==rt||u.y!==k)&&(j=!0,u.x=u.endX=rt,a?u.endRotation=rt:u.y=u.endY=k,Rt=!0,pt(!0),u.autoScroll&&!u.isDragging))for(Wf(e.parentNode),dt=e,rr.scrollTop=be.pageYOffset!=null?be.pageYOffset:P.documentElement.scrollTop!=null?P.documentElement.scrollTop:P.body.scrollTop,rr.scrollLeft=be.pageXOffset!=null?be.pageXOffset:P.documentElement.scrollLeft!=null?P.documentElement.scrollLeft:P.body.scrollLeft;dt&&!wt;)wt=Bo(dt.parentNode),et=wt?rr:dt.parentNode,d&&et.scrollTop>et._gsMaxScrollY&&(et.scrollTop=et._gsMaxScrollY),h&&et.scrollLeft>et._gsMaxScrollX&&(et.scrollLeft=et._gsMaxScrollX),dt=et;u.isThrowing&&(j||u.endX>at||u.endX<_t||u.endY>Ut||u.endY<X)&&Tt(n.inertia||n.throwProps,j)}return u},i.update=function(Mt,F,rt){if(F&&u.isPressed){var k=Br(e),j=tt.apply({x:u.x-O,y:u.y-Y}),dt=Br(e.parentNode,!0);dt.apply({x:k.e-j.x,y:k.f-j.y},j),u.x-=j.x-dt.e,u.y-=j.y-dt.f,pt(!0),qt()}var et=u.x,wt=u.y;return Wt(!F),Mt?u.applyBounds():(Rt&&rt&&pt(!0),lt(!0)),F&&(st(u.pointerX,u.pointerY),Rt&&pt(!0)),u.isPressed&&!F&&(h&&Math.abs(et-u.x)>.01||d&&Math.abs(wt-u.y)>.01&&!a)&&qt(),u.autoScroll&&(Wf(e.parentNode,u.isDragging),m=u.isDragging,pt(!0),R_(e,gt),C_(e,gt)),u},i.enable=function(Mt){var F={lazy:!0},rt,k,j;if(n.cursor!==!1&&(F.cursor=n.cursor||Oa),pe.utils.checkPrefix("touchCallout")&&(F.touchCallout="none"),Mt!=="soft"){for(E_(_,h===d?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"),k=_.length;--k>-1;)j=_[k],Vc||qe(j,"mousedown",V),qe(j,"touchstart",V),qe(j,"click",Bt,!0),pe.set(j,F),j.getBBox&&j.ownerSVGElement&&h!==d&&pe.set(j.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"}),n.allowContextMenu||qe(j,"contextmenu",vt);zc(_,!1)}return C_(e,gt),L=!0,xi&&Mt!=="soft"&&xi.track(C||e,o?"x,y":a?"rotation":"top,left"),e._gsDragID=rt="d"+b1++,No[rt]=u,C&&(C.enable(),C.element._gsDragID=rt),(n.bounds||a)&&qt(),n.bounds&&u.applyBounds(),u},i.disable=function(Mt){for(var F=u.isDragging,rt=_.length,k;--rt>-1;)Xf(_[rt],"cursor",null);if(Mt!=="soft"){for(E_(_,null),rt=_.length;--rt>-1;)k=_[rt],Xf(k,"touchCallout",null),He(k,"mousedown",V),He(k,"touchstart",V),He(k,"click",Bt,!0),He(k,"contextmenu",vt);zc(_,!0),bt&&(He(bt,"touchcancel",mt),He(bt,"touchend",mt),He(bt,"touchmove",Q)),He(P,"mouseup",mt),He(P,"mousemove",Q)}return R_(e,gt),L=!1,xi&&Mt!=="soft"&&(xi.untrack(C||e,o?"x,y":a?"rotation":"top,left"),u.tween&&u.tween.kill()),C&&C.disable(),A_(pt),u.isDragging=u.isPressed=Ft=!1,F&&Oe(u,"dragend","onDragEnd"),u},i.enabled=function(Mt,F){return arguments.length?Mt?u.enable(F):u.disable(F):L},i.kill=function(){return u.isThrowing=!1,u.tween&&u.tween.kill(),u.disable(),pe.set(_,{clearProps:"userSelect"}),delete No[e._gsDragID],u},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~s.indexOf("scroll")&&(C=i.scrollProxy=new L1(e,E1({onKill:function(){u.isPressed&&mt(null)}},n)),e.style.overflowY=d&&!Jf?"auto":"hidden",e.style.overflowX=h&&!Jf?"auto":"hidden",e=C.content),a?g.rotation=1:(h&&(g[l]=1),d&&(g[c]=1)),I.force3D="force3D"in n?n.force3D:!0,F_(M_(i)),i.enable(),i}return t.register=function(n){pe=n,qf()},t.create=function(n,i){return Zf||qf(!0),Hr(n).map(function(s){return new t(s,i)})},t.get=function(n){return No[(Hr(n)[0]||{})._gsDragID]},t.timeSinceDrag=function(){return(zr()-w_)/1e3},t.hitTest=function(n,i,s){if(n===i)return!1;var o=Fo(n),a=Fo(i),l=o.top,c=o.left,h=o.right,d=o.bottom,f=o.width,u=o.height,_=a.left>h||a.right<c||a.top>d||a.bottom<l,g,p,m;return _||!s?!_:(m=(s+"").indexOf("%")!==-1,s=parseFloat(s)||0,g={left:Math.max(c,a.left),top:Math.max(l,a.top)},g.width=Math.min(h,a.right)-g.left,g.height=Math.min(d,a.bottom)-g.top,g.width<0||g.height<0?!1:m?(s*=.01,p=g.width*g.height,p>=f*u*s||p>=a.width*a.height*s):g.width>s&&g.height>s)},t}(F1);A1(Fs.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});Fs.zIndex=1e3;Fs.version="3.12.5";U_()&&pe.registerPlugin(Fs);var z_=()=>{let r=document.querySelector(".team-operations-wrapper"),t=document.querySelectorAll(".team-operations-wrap"),e=document.querySelector(".team-circle_wrapper:not(.is-mobile-circle-wrapper)"),n=document.querySelector(".is-mobile-circle-wrapper"),i=window.innerWidth<=768,s=i?n:e,o=document.querySelectorAll(".team-circle_item"),a=document.querySelector(".team-arrow-left"),l=document.querySelector(".team-arrow-right"),c=document.querySelector(".team-arrow-left-mobile"),h=document.querySelector(".team-arrow-right-mobile");if(!r||!s||!(i?c:a)||!(i?h:l)){console.warn("Team slider elements not found");return}Kt.registerPlugin(Fs);let u=0,_=t.length,g=0,p=i?16:48,m=()=>(g=t[0]?.offsetWidth||300,g),b=P=>{let L=m(),B=-(P*(L+(i?16:48)));Kt.to(r,{x:B,duration:.5,ease:"power2.out"}),i&&t.forEach((J,O)=>{O===P?Kt.to(J,{opacity:1,duration:.3,ease:"power2.out"}):Kt.to(J,{opacity:.5,duration:.3,ease:"power2.out"})})},S=P=>{u=P,b(P);let L=(O,Y)=>{Y?(O.classList.add("active"),Kt.to(O,{scale:1.1,opacity:1,duration:.3,ease:"power2.out"}),O.style.border="0.1025em solid #EEAA55",O.style.borderRadius="200px"):(O.classList.remove("active"),Kt.to(O,{scale:1,opacity:.75,duration:.3,ease:"power2.out"}),O.style.border="2px solid transparent",O.style.borderRadius="50%",O.style.boxShadow="none")};o.forEach((O,Y)=>{L(O,Y===P)}),n&&n.querySelectorAll(".team-circle_item").forEach((Y,H)=>{L(Y,H===P)});let C=(O,Y)=>{O&&(Kt.to(O,{opacity:Y?.5:1,duration:.3,ease:"power2.out"}),O.style.pointerEvents=Y?"none":"auto")},B=i?c:a,J=i?h:l;C(B,P===0),C(J,P===_-1)},v=()=>{u<_-1&&S(u+1)},D=()=>{u>0&&S(u-1)};a&&a.addEventListener("click",D),l&&l.addEventListener("click",v),c&&c.addEventListener("click",D),h&&h.addEventListener("click",v);let T=P=>{P.forEach((L,C)=>{L.addEventListener("click",()=>{S(C)}),i||(L.addEventListener("mouseenter",()=>{L.classList.contains("active")||(Kt.to(L,{scale:1.05,opacity:.8,duration:.2,ease:"power2.out"}),L.style.boxShadow="0 0 10px rgba(238, 170, 85, 0.2)")}),L.addEventListener("mouseleave",()=>{L.classList.contains("active")||(Kt.to(L,{scale:1,opacity:.75,duration:.2,ease:"power2.out"}),L.style.boxShadow="none")}))})};if(T(o),n){let P=n.querySelectorAll(".team-circle_item");T(P)}t.forEach((P,L)=>{P.style.display="block",i&&(L===0?Kt.set(P,{opacity:1}):Kt.set(P,{opacity:.5}))});let w=P=>{P.forEach((L,C)=>{C===0?(L.classList.add("active"),Kt.set(L,{scale:1.1,opacity:1}),L.style.border="0.1025em solid #EEAA55",L.style.borderRadius="200px"):(L.classList.remove("active"),Kt.set(L,{scale:1,opacity:.75}),L.style.border="2px solid transparent",L.style.borderRadius="50%",L.style.boxShadow="none")})};if(w(o),n){let P=n.querySelectorAll(".team-circle_item");w(P)}a&&(Kt.set(a,{opacity:.5}),a.style.pointerEvents="none"),c&&(Kt.set(c,{opacity:.5}),c.style.pointerEvents="none"),Fs.create(r,{type:"x",bounds:function(){let P=m(),L=i?16:48;return{minX:-(_-1)*(P+L),maxX:0}},inertia:!0,onDragEnd:function(){let P=Math.abs(this.x),L=m(),B=Math.round(P/(L+(i?16:48)));S(Math.min(B,_-1))}}),document.addEventListener("keydown",P=>{P.key==="ArrowLeft"?D():P.key==="ArrowRight"&&v()});let I=0,M=0;r.addEventListener("touchstart",P=>{I=P.touches[0].clientX}),r.addEventListener("touchend",P=>{M=P.changedTouches[0].clientX,y()});let y=()=>{let L=I-M;Math.abs(L)>50&&(L>0?v():D())};return window.addEventListener("resize",()=>{b(u);let P=window.innerWidth<=768;P!==i&&(i=P,i||t.forEach(L=>{Kt.to(L,{opacity:1,duration:.3,ease:"power2.out"})}),S(u))}),{nextSlide:v,prevSlide:D,updateActiveSlide:S,currentSlide:()=>u,totalSlides:()=>_}};var V_=()=>{let r=document.querySelectorAll(".pirxey-teams-name"),t=document.querySelectorAll(".pirxey-teams-item-box"),e=document.querySelectorAll(".pirxey-teams-box-bottom");if(!r.length||!t.length)return;let n=window.innerWidth>768;if(!n)return;let i=-1,s,o=!1,a=f=>{let u=e[f];u&&Kt.to(u,{x:-17,y:17,opacity:1,duration:.6,ease:"power2.out",delay:.1})},l=f=>{i===f||o||(o=!0,i!==-1&&t[i]?Kt.to(t[i],{opacity:0,scale:.95,duration:.2,ease:"power2.out",onComplete:()=>{t[i].style.display="none",t[i].style.visibility="hidden",f!==-1&&t[f]?(t[f].style.display="block",t[f].style.visibility="visible",Kt.fromTo(t[f],{opacity:0,scale:.95},{opacity:1,scale:1,duration:.3,ease:"power2.out",onComplete:()=>{o=!1,a(f)}})):o=!1}}):f!==-1&&t[f]?(t[f].style.display="block",t[f].style.visibility="visible",Kt.fromTo(t[f],{opacity:0,scale:.95},{opacity:1,scale:1,duration:.3,ease:"power2.out",onComplete:()=>{o=!1,a(f)}})):o=!1,i=f)},c=()=>{i!==-1&&t[i]&&(Kt.to(t[i],{opacity:0,scale:.95,duration:.2,ease:"power2.out",onComplete:()=>{t[i].style.display="none",t[i].style.visibility="hidden"}}),i=-1)},h=()=>{e.forEach(f=>{Kt.set(f,{x:0,y:0,opacity:0})})};t.forEach((f,u)=>{u===0?(f.style.display="block",f.style.opacity="1",f.style.visibility="visible",i=0):(f.style.display="none",f.style.opacity="0",f.style.visibility="hidden"),f.style.pointerEvents="auto"}),e.forEach(f=>{Kt.set(f,{x:0,y:0,opacity:0})}),setTimeout(()=>{a(0)},100),r.forEach((f,u)=>{f.addEventListener("mouseenter",_=>{clearTimeout(s),l(u)}),f.addEventListener("mouseleave",_=>{let g=_.relatedTarget;!g||!g.closest(".pirxey-teams-item-box")&&g.closest(".pirxey-teams-name")})}),t.forEach(f=>{f.addEventListener("mouseenter",()=>{clearTimeout(s)}),f.addEventListener("mouseleave",u=>{let _=u.relatedTarget;_&&_.closest(".pirxey-teams-name")})});let d=document.querySelector(".pirxey-teams-wrapper");return d&&d.addEventListener("mouseleave",()=>{}),window.addEventListener("resize",()=>{!(window.innerWidth>768)&&n&&(c(),h())}),{showBox:l,hideAllBoxes:c,currentActiveIndex:()=>i}};var H_=()=>{let r=document.querySelectorAll(".pixey-teams-arrow-mobile"),t=document.querySelectorAll(".pirxey-teams-item-mobile-unwrap");if(!r.length||!t.length)return;let e=window.innerWidth<=991;if(!e)return;let n=new Set,i=s=>{let o=r[s],a=t[s];if(!o||!a)return;if(n.has(s))n.delete(s),Kt.to(a,{height:0,opacity:0,duration:.3,ease:"power2.out",onComplete:()=>{a.style.display="none"}}),Kt.to(o,{rotation:0,duration:.3,ease:"power2.out"});else{n.add(s),a.style.display="block",a.style.height="auto",a.style.opacity="0";let c=a.scrollHeight;a.style.height="0px",Kt.to(a,{height:c,opacity:1,duration:.3,ease:"power2.out",onComplete:()=>{a.style.height="auto"}}),Kt.to(o,{rotation:90,duration:.3,ease:"power2.out"})}};return t.forEach(s=>{s.style.display="none",s.style.height="0px",s.style.opacity="0",s.style.overflow="hidden"}),r.forEach(s=>{Kt.set(s,{rotation:0})}),r.forEach((s,o)=>{s.addEventListener("click",a=>{a.preventDefault(),i(o)})}),window.addEventListener("resize",()=>{!(window.innerWidth<=991)&&e&&(n.clear(),t.forEach(o=>{o.style.display="none",o.style.height="0px",o.style.opacity="0"}),r.forEach(o=>{Kt.set(o,{rotation:0})}))}),{toggleSection:i,activeSections:()=>n}};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{wm(),lm(),nd(),__(),mm(),am(),om(),z_(),V_(),H_()});})();
|
|
3846
|
+
`,blending:Rr,transparent:!0});m.needsUpdate=!0;let b=new Cc(f,m);r.add(b)}function l(){requestAnimationFrame(l);let h=Date.now()*.003;r.rotation.z+=.001/4,r.rotation.y+=5e-4/4,r.position.y=Math.sin(h*.05)*.05,s.lookAt(i.position),s.updateMatrixWorld(),n.render(i,s)}function c(){let h=window.innerWidth,d=window.innerHeight;s.aspect=h/d,s.updateProjectionMatrix(),n.setSize(h,d)}a(),o(),c(),n.compile(i,s),l(),window.addEventListener("resize",c,!1)}window.addEventListener("load",t,!1)};var ir,Rs,Vf,Bc,Ia,Uc,Oc,La,_i="transform",zf=_i+"Origin",x_,y_=function(t){var e=t.ownerDocument||t;for(!(_i in t.style)&&("msTransform"in t.style)&&(_i="msTransform",zf=_i+"Origin");e.parentNode&&(e=e.parentNode););if(Rs=window,Oc=new Or,e){ir=e,Vf=e.documentElement,Bc=e.body,La=ir.createElementNS("http://www.w3.org/2000/svg","g"),La.style.transform="none";var n=e.createElement("div"),i=e.createElement("div"),s=e&&(e.body||e.firstElementChild);s&&s.appendChild&&(s.appendChild(n),n.appendChild(i),n.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),x_=i.offsetParent!==n,s.removeChild(n))}return e},p1=function(t){for(var e,n;t&&t!==Bc;)n=t._gsap,n&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e},v_=[],S_=[],m1=function(){return Rs.pageYOffset||ir.scrollTop||Vf.scrollTop||Bc.scrollTop||0},g1=function(){return Rs.pageXOffset||ir.scrollLeft||Vf.scrollLeft||Bc.scrollLeft||0},Hf=function(t){return t.ownerSVGElement||((t.tagName+"").toLowerCase()==="svg"?t:null)},_1=function r(t){if(Rs.getComputedStyle(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},Bf=function r(t,e){if(t.parentNode&&(ir||y_(t))){var n=Hf(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s=n?e?"rect":"g":"div",o=e!==2?0:100,a=e===3?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",c=ir.createElementNS?ir.createElementNS(i.replace(/^https/,"http"),s):ir.createElement(s);return e&&(n?(Uc||(Uc=r(t)),c.setAttribute("width",.01),c.setAttribute("height",.01),c.setAttribute("transform","translate("+o+","+a+")"),Uc.appendChild(c)):(Ia||(Ia=r(t),Ia.style.cssText=l),c.style.cssText=l+"width:0.1px;height:0.1px;top:"+a+"px;left:"+o+"px",Ia.appendChild(c))),c}throw"Need document and parent."},x1=function(t){for(var e=new Or,n=0;n<t.numberOfItems;n++)e.multiply(t.getItem(n).matrix);return e},y1=function(t){var e=t.getCTM(),n;return e||(n=t.style[_i],t.style[_i]="none",t.appendChild(La),e=La.getCTM(),t.removeChild(La),n?t.style[_i]=n:t.style.removeProperty(_i.replace(/([A-Z])/g,"-$1").toLowerCase())),e||Oc.clone()},v1=function(t,e){var n=Hf(t),i=t===n,s=n?v_:S_,o=t.parentNode,a,l,c,h,d,f;if(t===Rs)return t;if(s.length||s.push(Bf(t,1),Bf(t,2),Bf(t,3)),a=n?Uc:Ia,n)i?(c=y1(t),h=-c.e/c.a,d=-c.f/c.d,l=Oc):t.getBBox?(c=t.getBBox(),l=t.transform?t.transform.baseVal:{},l=l.numberOfItems?l.numberOfItems>1?x1(l):l.getItem(0).matrix:Oc,h=l.a*c.x+l.c*c.y,d=l.b*c.x+l.d*c.y):(l=new Or,h=d=0),e&&t.tagName.toLowerCase()==="g"&&(h=d=0),(i?n:o).appendChild(a),a.setAttribute("transform","matrix("+l.a+","+l.b+","+l.c+","+l.d+","+(l.e+h)+","+(l.f+d)+")");else{if(h=d=0,x_)for(l=t.offsetParent,c=t;c&&(c=c.parentNode)&&c!==l&&c.parentNode;)(Rs.getComputedStyle(c)[_i]+"").length>4&&(h=c.offsetLeft,d=c.offsetTop,c=0);if(f=Rs.getComputedStyle(t),f.position!=="absolute"&&f.position!=="fixed")for(l=t.offsetParent;o&&o!==l;)h+=o.scrollLeft||0,d+=o.scrollTop||0,o=o.parentNode;c=a.style,c.top=t.offsetTop-d+"px",c.left=t.offsetLeft-h+"px",c[_i]=f[_i],c[zf]=f[zf],c.position=f.position==="fixed"?"fixed":"absolute",t.parentNode.appendChild(a)}return a},kf=function(t,e,n,i,s,o,a){return t.a=e,t.b=n,t.c=i,t.d=s,t.e=o,t.f=a,t},Or=function(){function r(e,n,i,s,o,a){e===void 0&&(e=1),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=1),o===void 0&&(o=0),a===void 0&&(a=0),kf(this,e,n,i,s,o,a)}var t=r.prototype;return t.inverse=function(){var n=this.a,i=this.b,s=this.c,o=this.d,a=this.e,l=this.f,c=n*o-i*s||1e-10;return kf(this,o/c,-i/c,-s/c,n/c,(s*l-o*a)/c,-(n*l-i*a)/c)},t.multiply=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f,h=n.a,d=n.c,f=n.b,u=n.d,_=n.e,g=n.f;return kf(this,h*i+f*o,h*s+f*a,d*i+u*o,d*s+u*a,l+_*i+g*o,c+_*s+g*a)},t.clone=function(){return new r(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(n){var i=this.a,s=this.b,o=this.c,a=this.d,l=this.e,c=this.f;return i===n.a&&s===n.b&&o===n.c&&a===n.d&&l===n.e&&c===n.f},t.apply=function(n,i){i===void 0&&(i={});var s=n.x,o=n.y,a=this.a,l=this.b,c=this.c,h=this.d,d=this.e,f=this.f;return i.x=s*a+o*c+d||0,i.y=s*l+o*h+f||0,i},r}();function Br(r,t,e,n){if(!r||!r.parentNode||(ir||y_(r)).documentElement===r)return new Or;var i=p1(r),s=Hf(r),o=s?v_:S_,a=v1(r,e),l=o[0].getBoundingClientRect(),c=o[1].getBoundingClientRect(),h=o[2].getBoundingClientRect(),d=a.parentNode,f=!n&&_1(r),u=new Or((c.left-l.left)/100,(c.top-l.top)/100,(h.left-l.left)/100,(h.top-l.top)/100,l.left+(f?0:g1()),l.top+(f?0:m1()));if(d.removeChild(a),i)for(l=i.length;l--;)c=i[l],c.scaleX=c.scaleY=0,c.renderTransform(1,c);return t?u.inverse():u}function M_(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function S1(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t}var pe,be,Hn,vi,or,Gf,sr,Zf,Na,Hr,L_,Jf,za,Qf,Ua,xi,Oa,Vc,F_,$f,Gc=0,N_=function(){return typeof window<"u"},U_=function(){return pe||N_()&&(pe=window.gsap)&&pe.registerPlugin&&pe},Vr=function(t){return typeof t=="function"},Ba=function(t){return typeof t=="object"},yi=function(t){return typeof t>"u"},Hc=function(){return!1},ka="transform",Kf="transformOrigin",kr=function(t){return Math.round(t*1e4)/1e4},Fa=Array.isArray,kc=function(t,e){var n=Hn.createElementNS?Hn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Hn.createElement(t);return n.style?n:Hn.createElement(t)},b_=180/Math.PI,Ps=1e20,M1=new Or,zr=Date.now||function(){return new Date().getTime()},Ls=[],No={},b1=0,w1=/^(?:a|input|textarea|button|select)$/i,w_=0,Lo={},rr={},O_=function(t,e){var n={},i;for(i in t)n[i]=e?t[i]*e:t[i];return n},E1=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},E_=function r(t,e){for(var n=t.length,i;n--;)e?t[n].style.touchAction=e:t[n].style.removeProperty("touch-action"),i=t[n].children,i&&i.length&&r(i,e)},B_=function(){return Ls.forEach(function(t){return t()})},T1=function(t){Ls.push(t),Ls.length===1&&pe.ticker.add(B_)},T_=function(){return!Ls.length&&pe.ticker.remove(B_)},A_=function(t){for(var e=Ls.length;e--;)Ls[e]===t&&Ls.splice(e,1);pe.to(T_,{overwrite:!0,delay:15,duration:0,onComplete:T_,data:"_draggable"})},A1=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},qe=function(t,e,n,i){if(t.addEventListener){var s=za[e];i=i||(L_?{passive:!1}:null),t.addEventListener(s||e,n,i),s&&e!==s&&t.addEventListener(e,n,i)}},He=function(t,e,n,i){if(t.removeEventListener){var s=za[e];t.removeEventListener(s||e,n,i),s&&e!==s&&t.removeEventListener(e,n,i)}},ri=function(t){t.preventDefault&&t.preventDefault(),t.preventManipulation&&t.preventManipulation()},D1=function(t,e){for(var n=t.length;n--;)if(t[n].identifier===e)return!0},C1=function r(t){Qf=t.touches&&Gc<t.touches.length,He(t.target,"touchend",r)},D_=function(t){Qf=t.touches&&Gc<t.touches.length,qe(t.target,"touchend",C1)},Uo=function(t){return be.pageYOffset||t.scrollTop||t.documentElement.scrollTop||t.body.scrollTop||0},Oo=function(t){return be.pageXOffset||t.scrollLeft||t.documentElement.scrollLeft||t.body.scrollLeft||0},C_=function r(t,e){qe(t,"scroll",e),Bo(t.parentNode)||r(t.parentNode,e)},R_=function r(t,e){He(t,"scroll",e),Bo(t.parentNode)||r(t.parentNode,e)},Bo=function(t){return!t||t===vi||t.nodeType===9||t===Hn.body||t===be||!t.nodeType||!t.parentNode},P_=function(t,e){var n=e==="x"?"Width":"Height",i="scroll"+n,s="client"+n;return Math.max(0,Bo(t)?Math.max(vi[i],or[i])-(be["inner"+n]||vi[s]||or[s]):t[i]-t[s])},Wf=function r(t,e){var n=P_(t,"x"),i=P_(t,"y");Bo(t)?t=rr:r(t.parentNode,e),t._gsMaxScrollX=n,t._gsMaxScrollY=i,e||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},Xf=function(t,e,n){var i=t.style;i&&(yi(i[e])&&(e=Na(e,t)||e),n==null?i.removeProperty&&i.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):i[e]=n)},Va=function(t){return be.getComputedStyle(t instanceof Element?t:t.host||(t.parentNode||{}).host||t)},Is={},Fo=function(t){if(t===be)return Is.left=Is.top=0,Is.width=Is.right=vi.clientWidth||t.innerWidth||or.clientWidth||0,Is.height=Is.bottom=(t.innerHeight||0)-20<vi.clientHeight?vi.clientHeight:t.innerHeight||or.clientHeight||0,Is;var e=t.ownerDocument||Hn,n=yi(t.pageX)?!t.nodeType&&!yi(t.left)&&!yi(t.top)?t:Hr(t)[0].getBoundingClientRect():{left:t.pageX-Oo(e),top:t.pageY-Uo(e),right:t.pageX-Oo(e)+1,bottom:t.pageY-Uo(e)+1};return yi(n.right)&&!yi(n.width)?(n.right=n.left+n.width,n.bottom=n.top+n.height):yi(n.width)&&(n={width:n.right-n.left,height:n.bottom-n.top,right:n.right,left:n.left,bottom:n.bottom,top:n.top}),n},Oe=function(t,e,n){var i=t.vars,s=i[n],o=t._listeners[e],a;return Vr(s)&&(a=s.apply(i.callbackScope||t,i[n+"Params"]||[t.pointerEvent])),o&&t.dispatchEvent(e)===!1&&(a=!1),a},I_=function(t,e){var n=Hr(t)[0],i,s,o;return!n.nodeType&&n!==be?yi(t.left)?(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i}):(o={x:0,y:0},{left:t.left-o.x,top:t.top-o.y,width:t.width,height:t.height}):R1(n,e)},si={},R1=function(t,e){e=Hr(e)[0];var n=t.getBBox&&t.ownerSVGElement,i=t.ownerDocument||Hn,s,o,a,l,c,h,d,f,u,_,g,p,m;if(t===be)a=Uo(i),s=Oo(i),o=s+(i.documentElement.clientWidth||t.innerWidth||i.body.clientWidth||0),l=a+((t.innerHeight||0)-20<i.documentElement.clientHeight?i.documentElement.clientHeight:t.innerHeight||i.body.clientHeight||0);else{if(e===be||yi(e))return t.getBoundingClientRect();s=a=0,n?(_=t.getBBox(),g=_.width,p=_.height):(t.viewBox&&(_=t.viewBox.baseVal)&&(s=_.x||0,a=_.y||0,g=_.width,p=_.height),g||(m=Va(t),_=m.boxSizing==="border-box",g=(parseFloat(m.width)||t.clientWidth||0)+(_?0:parseFloat(m.borderLeftWidth)+parseFloat(m.borderRightWidth)),p=(parseFloat(m.height)||t.clientHeight||0)+(_?0:parseFloat(m.borderTopWidth)+parseFloat(m.borderBottomWidth)))),o=g,l=p}return t===e?{left:s,top:a,width:o-s,height:l-a}:(c=Br(e,!0).multiply(Br(t)),h=c.apply({x:s,y:a}),d=c.apply({x:o,y:a}),f=c.apply({x:o,y:l}),u=c.apply({x:s,y:l}),s=Math.min(h.x,d.x,f.x,u.x),a=Math.min(h.y,d.y,f.y,u.y),{left:s,top:a,width:Math.max(h.x,d.x,f.x,u.x)-s,height:Math.max(h.y,d.y,f.y,u.y)-a})},Yf=function(t,e,n,i,s,o){var a={},l,c,h;if(e)if(s!==1&&e instanceof Array){if(a.end=l=[],h=e.length,Ba(e[0]))for(c=0;c<h;c++)l[c]=O_(e[c],s);else for(c=0;c<h;c++)l[c]=e[c]*s;n+=1.1,i-=1.1}else Vr(e)?a.end=function(d){var f=e.call(t,d),u,_;if(s!==1)if(Ba(f)){u={};for(_ in f)u[_]=f[_]*s;f=u}else f*=s;return f}:a.end=e;return(n||n===0)&&(a.max=n),(i||i===0)&&(a.min=i),o&&(a.velocity=0),a},P1=function r(t){var e;return!t||!t.getAttribute||t===or?!1:(e=t.getAttribute("data-clickable"))==="true"||e!=="false"&&(w1.test(t.nodeName+"")||t.getAttribute("contentEditable")==="true")?!0:r(t.parentNode)},zc=function(t,e){for(var n=t.length,i;n--;)i=t[n],i.ondragstart=i.onselectstart=e?null:Hc,pe.set(i,{lazy:!0,userSelect:e?"text":"none"})},I1=function r(t){if(Va(t).position==="fixed")return!0;if(t=t.parentNode,t&&t.nodeType===1)return r(t)},k_,jf,L1=function(t,e){t=pe.utils.toArray(t)[0],e=e||{};var n=document.createElement("div"),i=n.style,s=t.firstChild,o=0,a=0,l=t.scrollTop,c=t.scrollLeft,h=t.scrollWidth,d=t.scrollHeight,f=0,u=0,_=0,g,p,m,b,S,v;k_&&e.force3D!==!1?(S="translate3d(",v="px,0px)"):ka&&(S="translate(",v="px)"),this.scrollTop=function(C,T){if(!arguments.length)return-this.top();this.top(-C,T)},this.scrollLeft=function(C,T){if(!arguments.length)return-this.left();this.left(-C,T)},this.left=function(C,T){if(!arguments.length)return-(t.scrollLeft+a);var w=t.scrollLeft-c,P=a;if((w>2||w<-2)&&!T){c=t.scrollLeft,pe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-c),e.onKill&&e.onKill();return}C=-C,C<0?(a=C-.5|0,C=0):C>u?(a=C-u|0,C=u):a=0,(a||P)&&(this._skip||(i[ka]=S+-a+"px,"+-o+v),a+f>=0&&(i.paddingRight=a+f+"px")),t.scrollLeft=C|0,c=t.scrollLeft},this.top=function(C,T){if(!arguments.length)return-(t.scrollTop+o);var w=t.scrollTop-l,P=o;if((w>2||w<-2)&&!T){l=t.scrollTop,pe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-l),e.onKill&&e.onKill();return}C=-C,C<0?(o=C-.5|0,C=0):C>_?(o=C-_|0,C=_):o=0,(o||P)&&(this._skip||(i[ka]=S+-a+"px,"+-o+v)),t.scrollTop=C|0,l=t.scrollTop},this.maxScrollTop=function(){return _},this.maxScrollLeft=function(){return u},this.disable=function(){for(s=n.firstChild;s;)b=s.nextSibling,t.appendChild(s),s=b;t===n.parentNode&&t.removeChild(n)},this.enable=function(){if(s=t.firstChild,s!==n){for(;s;)b=s.nextSibling,n.appendChild(s),s=b;t.appendChild(n),this.calibrate()}},this.calibrate=function(C){var T=t.clientWidth===g,w,P,M;l=t.scrollTop,c=t.scrollLeft,!(T&&t.clientHeight===p&&n.offsetHeight===m&&h===t.scrollWidth&&d===t.scrollHeight&&!C)&&((o||a)&&(P=this.left(),M=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),w=Va(t),(!T||C)&&(i.display="block",i.width="auto",i.paddingRight="0px",f=Math.max(0,t.scrollWidth-t.clientWidth),f&&(f+=parseFloat(w.paddingLeft)+(jf?parseFloat(w.paddingRight):0))),i.display="inline-block",i.position="relative",i.overflow="visible",i.verticalAlign="top",i.boxSizing="content-box",i.width="100%",i.paddingRight=f+"px",jf&&(i.paddingBottom=w.paddingBottom),g=t.clientWidth,p=t.clientHeight,h=t.scrollWidth,d=t.scrollHeight,u=t.scrollWidth-g,_=t.scrollHeight-p,m=n.offsetHeight,i.display="block",(P||M)&&(this.left(P),this.top(M)))},this.content=n,this.element=t,this._skip=!1,this.enable()},qf=function(t){if(N_()&&document.body){var e=window&&window.navigator;be=window,Hn=document,vi=Hn.documentElement,or=Hn.body,Gf=kc("div"),Vc=!!window.PointerEvent,sr=kc("div"),sr.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",Oa=sr.style.cursor==="grab"?"grab":"move",Ua=e&&e.userAgent.toLowerCase().indexOf("android")!==-1,Jf="ontouchstart"in vi&&"orientation"in be||e&&(e.MaxTouchPoints>0||e.msMaxTouchPoints>0),jf=function(){var n=kc("div"),i=kc("div"),s=i.style,o=or,a;return s.display="inline-block",s.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),o.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,o.removeChild(n),a}(),za=function(n){for(var i=n.split(","),s=("onpointerdown"in Gf?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in Gf?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),o={},a=4;--a>-1;)o[i[a]]=s[a],o[s[a]]=i[a];try{vi.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){L_=1}}))}catch{}return o}("touchstart,touchmove,touchend,touchcancel"),qe(Hn,"touchcancel",Hc),qe(be,"touchmove",Hc),or&&or.addEventListener("touchstart",Hc),qe(Hn,"contextmenu",function(){for(var n in No)No[n].isPressed&&No[n].endDrag()}),pe=Zf=U_()}pe?(xi=pe.plugins.inertia,F_=pe.core.context||function(){},Na=pe.utils.checkPrefix,ka=Na(ka),Kf=Na(Kf),Hr=pe.utils.toArray,$f=pe.core.getStyleSaver,k_=!!Na("perspective")):t&&console.warn("Please gsap.registerPlugin(Draggable)")},F1=function(){function r(e){this._listeners={},this.target=e||this}var t=r.prototype;return t.addEventListener=function(n,i){var s=this._listeners[n]||(this._listeners[n]=[]);~s.indexOf(i)||s.push(i)},t.removeEventListener=function(n,i){var s=this._listeners[n],o=s&&s.indexOf(i);o>=0&&s.splice(o,1)},t.dispatchEvent=function(n){var i=this,s;return(this._listeners[n]||[]).forEach(function(o){return o.call(i,{type:n,target:i.target})===!1&&(s=!1)}),s},r}(),Fs=function(r){S1(t,r);function t(e,n){var i;i=r.call(this)||this,Zf||qf(1),e=Hr(e)[0],i.styles=$f&&$f(e,"transform,left,top"),xi||(xi=pe.plugins.inertia),i.vars=n=O_(n||{}),i.target=e,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(n.dragResistance)||0,i.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,i.lockAxis=n.lockAxis,i.autoScroll=n.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!n.allowEventDefault,pe.getProperty(e,"x");var s=(n.type||"x,y").toLowerCase(),o=~s.indexOf("x")||~s.indexOf("y"),a=s.indexOf("rotation")!==-1,l=a?"rotation":o?"x":"left",c=o?"y":"top",h=!!(~s.indexOf("x")||~s.indexOf("left")||s==="scroll"),d=!!(~s.indexOf("y")||~s.indexOf("top")||s==="scroll"),f=n.minimumMovement||2,u=M_(i),_=Hr(n.trigger||n.handle||e),g={},p=0,m=!1,b=n.autoScrollMarginTop||40,S=n.autoScrollMarginRight||40,v=n.autoScrollMarginBottom||40,C=n.autoScrollMarginLeft||40,T=n.clickableTest||P1,w=0,P=e._gsap||pe.core.getCache(e),M=I1(e),y=function(F,rt){return parseFloat(P.get(e,F,rt))},L=e.ownerDocument||Hn,I,D,O,X,H,G,B,U,R,at,_t,Ut,q,ot,xt,ct,Rt,kt,J,$t,It,Ft,bt,Et,Ht,Y,Kt,A,x,N,Z,tt,it,vt=function(F){return ri(F),F.stopImmediatePropagation&&F.stopImmediatePropagation(),!1},pt=function Mt(F){if(u.autoScroll&&u.isDragging&&(m||Rt)){var rt=e,k=u.autoScroll*15,j,dt,et,wt,ft,Dt,zt,Nt;for(m=!1,rr.scrollTop=be.pageYOffset!=null?be.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,rr.scrollLeft=be.pageXOffset!=null?be.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft,wt=u.pointerX-rr.scrollLeft,ft=u.pointerY-rr.scrollTop;rt&&!dt;)dt=Bo(rt.parentNode),j=dt?rr:rt.parentNode,et=dt?{bottom:Math.max(vi.clientHeight,be.innerHeight||0),right:Math.max(vi.clientWidth,be.innerWidth||0),left:0,top:0}:j.getBoundingClientRect(),Dt=zt=0,d&&(Nt=j._gsMaxScrollY-j.scrollTop,Nt<0?zt=Nt:ft>et.bottom-v&&Nt?(m=!0,zt=Math.min(Nt,k*(1-Math.max(0,et.bottom-ft)/v)|0)):ft<et.top+b&&j.scrollTop&&(m=!0,zt=-Math.min(j.scrollTop,k*(1-Math.max(0,ft-et.top)/b)|0)),zt&&(j.scrollTop+=zt)),h&&(Nt=j._gsMaxScrollX-j.scrollLeft,Nt<0?Dt=Nt:wt>et.right-S&&Nt?(m=!0,Dt=Math.min(Nt,k*(1-Math.max(0,et.right-wt)/S)|0)):wt<et.left+C&&j.scrollLeft&&(m=!0,Dt=-Math.min(j.scrollLeft,k*(1-Math.max(0,wt-et.left)/C)|0)),Dt&&(j.scrollLeft+=Dt)),dt&&(Dt||zt)&&(be.scrollTo(j.scrollLeft,j.scrollTop),st(u.pointerX+Dt,u.pointerY+zt)),rt=j}if(Rt){var te=u.x,he=u.y;a?(u.deltaX=te-parseFloat(P.rotation),u.rotation=te,P.rotation=te+"deg",P.renderTransform(1,P)):D?(d&&(u.deltaY=he-D.top(),D.top(he)),h&&(u.deltaX=te-D.left(),D.left(te))):o?(d&&(u.deltaY=he-parseFloat(P.y),P.y=he+"px"),h&&(u.deltaX=te-parseFloat(P.x),P.x=te+"px"),P.renderTransform(1,P)):(d&&(u.deltaY=he-parseFloat(e.style.top||0),e.style.top=he+"px"),h&&(u.deltaX=te-parseFloat(e.style.left||0),e.style.left=te+"px")),U&&!F&&!A&&(A=!0,Oe(u,"drag","onDrag")===!1&&(h&&(u.x-=u.deltaX),d&&(u.y-=u.deltaY),Mt(!0)),A=!1)}Rt=!1},lt=function(F,rt){var k=u.x,j=u.y,dt,et;e._gsap||(P=pe.core.getCache(e)),P.uncache&&pe.getProperty(e,"x"),o?(u.x=parseFloat(P.x),u.y=parseFloat(P.y)):a?u.x=u.rotation=parseFloat(P.rotation):D?(u.y=D.top(),u.x=D.left()):(u.y=parseFloat(e.style.top||(et=Va(e))&&et.top)||0,u.x=parseFloat(e.style.left||(et||{}).left)||0),(J||$t||It)&&!rt&&(u.isDragging||u.isThrowing)&&(It&&(Lo.x=u.x,Lo.y=u.y,dt=It(Lo),dt.x!==u.x&&(u.x=dt.x,Rt=!0),dt.y!==u.y&&(u.y=dt.y,Rt=!0)),J&&(dt=J(u.x),dt!==u.x&&(u.x=dt,a&&(u.rotation=dt),Rt=!0)),$t&&(dt=$t(u.y),dt!==u.y&&(u.y=dt),Rt=!0)),Rt&&pt(!0),F||(u.deltaX=u.x-k,u.deltaY=u.y-j,Oe(u,"throwupdate","onThrowUpdate"))},Lt=function(F,rt,k,j){return rt==null&&(rt=-Ps),k==null&&(k=Ps),Vr(F)?function(dt){var et=u.isPressed?1-u.edgeResistance:1;return F.call(u,(dt>k?k+(dt-k)*et:dt<rt?rt+(dt-rt)*et:dt)*j)*j}:Fa(F)?function(dt){for(var et=F.length,wt=0,ft=Ps,Dt,zt;--et>-1;)Dt=F[et],zt=Dt-dt,zt<0&&(zt=-zt),zt<ft&&Dt>=rt&&Dt<=k&&(wt=et,ft=zt);return F[wt]}:isNaN(F)?function(dt){return dt}:function(){return F*j}},ht=function(F,rt,k,j,dt,et,wt){return et=et&&et<Ps?et*et:Ps,Vr(F)?function(ft){var Dt=u.isPressed?1-u.edgeResistance:1,zt=ft.x,Nt=ft.y,te,he,me;return ft.x=zt=zt>k?k+(zt-k)*Dt:zt<rt?rt+(zt-rt)*Dt:zt,ft.y=Nt=Nt>dt?dt+(Nt-dt)*Dt:Nt<j?j+(Nt-j)*Dt:Nt,te=F.call(u,ft),te!==ft&&(ft.x=te.x,ft.y=te.y),wt!==1&&(ft.x*=wt,ft.y*=wt),et<Ps&&(he=ft.x-zt,me=ft.y-Nt,he*he+me*me>et&&(ft.x=zt,ft.y=Nt)),ft}:Fa(F)?function(ft){for(var Dt=F.length,zt=0,Nt=Ps,te,he,me,ae;--Dt>-1;)me=F[Dt],te=me.x-ft.x,he=me.y-ft.y,ae=te*te+he*he,ae<Nt&&(zt=Dt,Nt=ae);return Nt<=et?F[zt]:ft}:function(ft){return ft}},yt=function(){var F,rt,k,j;B=!1,D?(D.calibrate(),u.minX=_t=-D.maxScrollLeft(),u.minY=q=-D.maxScrollTop(),u.maxX=at=u.maxY=Ut=0,B=!0):n.bounds&&(F=I_(n.bounds,e.parentNode),a?(u.minX=_t=F.left,u.maxX=at=F.left+F.width,u.minY=q=u.maxY=Ut=0):!yi(n.bounds.maxX)||!yi(n.bounds.maxY)?(F=n.bounds,u.minX=_t=F.minX,u.minY=q=F.minY,u.maxX=at=F.maxX,u.maxY=Ut=F.maxY):(rt=I_(e,e.parentNode),u.minX=_t=Math.round(y(l,"px")+F.left-rt.left),u.minY=q=Math.round(y(c,"px")+F.top-rt.top),u.maxX=at=Math.round(_t+(F.width-rt.width)),u.maxY=Ut=Math.round(q+(F.height-rt.height))),_t>at&&(u.minX=at,u.maxX=at=_t,_t=u.minX),q>Ut&&(u.minY=Ut,u.maxY=Ut=q,q=u.minY),a&&(u.minRotation=_t,u.maxRotation=at),B=!0),n.liveSnap&&(k=n.liveSnap===!0?n.snap||{}:n.liveSnap,j=Fa(k)||Vr(k),a?(J=Lt(j?k:k.rotation,_t,at,1),$t=null):k.points?It=ht(j?k:k.points,_t,at,q,Ut,k.radius,D?-1:1):(h&&(J=Lt(j?k:k.x||k.left||k.scrollLeft,_t,at,D?-1:1)),d&&($t=Lt(j?k:k.y||k.top||k.scrollTop,q,Ut,D?-1:1))))},qt=function(){u.isThrowing=!1,Oe(u,"throwcomplete","onThrowComplete")},ut=function(){u.isThrowing=!1},Tt=function(F,rt){var k,j,dt,et;F&&xi?(F===!0&&(k=n.snap||n.liveSnap||{},j=Fa(k)||Vr(k),F={resistance:(n.throwResistance||n.resistance||1e3)/(a?10:1)},a?F.rotation=Yf(u,j?k:k.rotation,at,_t,1,rt):(h&&(F[l]=Yf(u,j?k:k.points||k.x||k.left,at,_t,D?-1:1,rt||u.lockedAxis==="x")),d&&(F[c]=Yf(u,j?k:k.points||k.y||k.top,Ut,q,D?-1:1,rt||u.lockedAxis==="y")),(k.points||Fa(k)&&Ba(k[0]))&&(F.linkedProps=l+","+c,F.radius=k.radius))),u.isThrowing=!0,et=isNaN(n.overshootTolerance)?n.edgeResistance===1?0:1-u.edgeResistance+.2:n.overshootTolerance,F.duration||(F.duration={max:Math.max(n.minDuration||0,"maxDuration"in n?n.maxDuration:2),min:isNaN(n.minDuration)?et===0||Ba(F)&&F.resistance>1e3?0:.5:n.minDuration,overshoot:et}),u.tween=dt=pe.to(D||e,{inertia:F,data:"_draggable",inherit:!1,onComplete:qt,onInterrupt:ut,onUpdate:n.fastMode?Oe:lt,onUpdateParams:n.fastMode?[u,"onthrowupdate","onThrowUpdate"]:k&&k.radius?[!1,!0]:[]}),n.fastMode||(D&&(D._skip=!0),dt.render(1e9,!0,!0),lt(!0,!0),u.endX=u.x,u.endY=u.y,a&&(u.endRotation=u.x),dt.play(0),lt(!0,!0),D&&(D._skip=!1))):B&&u.applyBounds()},Wt=function(F){var rt=Et,k;Et=Br(e.parentNode,!0),F&&u.isPressed&&!Et.equals(rt||new Or)&&(k=rt.inverse().apply({x:O,y:X}),Et.apply(k,k),O=k.x,X=k.y),Et.equals(M1)&&(Et=null)},Zt=function(){var F=1-u.edgeResistance,rt=M?Oo(L):0,k=M?Uo(L):0,j,dt,et;o&&(P.x=y(l,"px")+"px",P.y=y(c,"px")+"px",P.renderTransform()),Wt(!1),si.x=u.pointerX-rt,si.y=u.pointerY-k,Et&&Et.apply(si,si),O=si.x,X=si.y,Rt&&(st(u.pointerX,u.pointerY),pt(!0)),tt=Br(e),D?(yt(),G=D.top(),H=D.left()):(ue()?(lt(!0,!0),yt()):u.applyBounds(),a?(j=e.ownerSVGElement?[P.xOrigin-e.getBBox().x,P.yOrigin-e.getBBox().y]:(Va(e)[Kf]||"0 0").split(" "),ct=u.rotationOrigin=Br(e).apply({x:parseFloat(j[0])||0,y:parseFloat(j[1])||0}),lt(!0,!0),dt=u.pointerX-ct.x-rt,et=ct.y-u.pointerY+k,H=u.x,G=u.y=Math.atan2(et,dt)*b_):(G=y(c,"px"),H=y(l,"px"))),B&&F&&(H>at?H=at+(H-at)/F:H<_t&&(H=_t-(_t-H)/F),a||(G>Ut?G=Ut+(G-Ut)/F:G<q&&(G=q-(q-G)/F))),u.startX=H=kr(H),u.startY=G=kr(G)},ue=function(){return u.tween&&u.tween.isActive()},Jt=function(){sr.parentNode&&!ue()&&!u.isDragging&&sr.parentNode.removeChild(sr)},V=function(F,rt){var k;if(!I||u.isPressed||!F||(F.type==="mousedown"||F.type==="pointerdown")&&!rt&&zr()-w<30&&za[u.pointerEvent.type]){Z&&F&&I&&ri(F);return}if(Ht=ue(),it=!1,u.pointerEvent=F,za[F.type]?(bt=~F.type.indexOf("touch")?F.currentTarget||F.target:L,qe(bt,"touchend",mt),qe(bt,"touchmove",Q),qe(bt,"touchcancel",mt),qe(L,"touchstart",D_)):(bt=null,qe(L,"mousemove",Q)),Kt=null,(!Vc||!bt)&&(qe(L,"mouseup",mt),F&&F.target&&qe(F.target,"mouseup",mt)),Ft=T.call(u,F.target)&&n.dragClickables===!1&&!rt,Ft){qe(F.target,"change",mt),Oe(u,"pressInit","onPressInit"),Oe(u,"press","onPress"),zc(_,!0),Z=!1;return}if(Y=!bt||h===d||u.vars.allowNativeTouchScrolling===!1||u.vars.allowContextMenu&&F&&(F.ctrlKey||F.which>2)?!1:h?"y":"x",Z=!Y&&!u.allowEventDefault,Z&&(ri(F),qe(be,"touchforcechange",ri)),F.changedTouches?(F=ot=F.changedTouches[0],xt=F.identifier):F.pointerId?xt=F.pointerId:ot=xt=null,Gc++,T1(pt),X=u.pointerY=F.pageY,O=u.pointerX=F.pageX,Oe(u,"pressInit","onPressInit"),(Y||u.autoScroll)&&Wf(e.parentNode),e.parentNode&&u.autoScroll&&!D&&!a&&e.parentNode._gsMaxScrollX&&!sr.parentNode&&!e.getBBox&&(sr.style.width=e.parentNode.scrollWidth+"px",e.parentNode.appendChild(sr)),Zt(),u.tween&&u.tween.kill(),u.isThrowing=!1,pe.killTweensOf(D||e,g,!0),D&&pe.killTweensOf(e,{scrollTo:1},!0),u.tween=u.lockedAxis=null,(n.zIndexBoost||!a&&!D&&n.zIndexBoost!==!1)&&(e.style.zIndex=t.zIndex++),u.isPressed=!0,U=!!(n.onDrag||u._listeners.drag),R=!!(n.onMove||u._listeners.move),n.cursor!==!1||n.activeCursor)for(k=_.length;--k>-1;)pe.set(_[k],{cursor:n.activeCursor||n.cursor||(Oa==="grab"?"grabbing":Oa)});Oe(u,"press","onPress")},Q=function(F){var rt=F,k,j,dt,et,wt,ft;if(!I||Qf||!u.isPressed||!F){Z&&F&&I&&ri(F);return}if(u.pointerEvent=F,k=F.changedTouches,k){if(F=k[0],F!==ot&&F.identifier!==xt){for(et=k.length;--et>-1&&(F=k[et]).identifier!==xt&&F.target!==e;);if(et<0)return}}else if(F.pointerId&&xt&&F.pointerId!==xt)return;if(bt&&Y&&!Kt&&(si.x=F.pageX-(M?Oo(L):0),si.y=F.pageY-(M?Uo(L):0),Et&&Et.apply(si,si),j=si.x,dt=si.y,wt=Math.abs(j-O),ft=Math.abs(dt-X),(wt!==ft&&(wt>f||ft>f)||Ua&&Y===Kt)&&(Kt=wt>ft&&h?"x":"y",Y&&Kt!==Y&&qe(be,"touchforcechange",ri),u.vars.lockAxisOnTouchScroll!==!1&&h&&d&&(u.lockedAxis=Kt==="x"?"y":"x",Vr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,rt)),Ua&&Y===Kt))){mt(rt);return}!u.allowEventDefault&&(!Y||Kt&&Y!==Kt)&&rt.cancelable!==!1?(ri(rt),Z=!0):Z&&(Z=!1),u.autoScroll&&(m=!0),st(F.pageX,F.pageY,R)},st=function(F,rt,k){var j=1-u.dragResistance,dt=1-u.edgeResistance,et=u.pointerX,wt=u.pointerY,ft=G,Dt=u.x,zt=u.y,Nt=u.endX,te=u.endY,he=u.endRotation,me=Rt,ae,E,z,W,K,$;u.pointerX=F,u.pointerY=rt,M&&(F-=Oo(L),rt-=Uo(L)),a?(W=Math.atan2(ct.y-rt,F-ct.x)*b_,K=u.y-W,K>180?(G-=360,u.y=W):K<-180&&(G+=360,u.y=W),u.x!==H||Math.abs(G-W)>f?(u.y=W,z=H+(G-W)*j):z=H):(Et&&($=F*Et.a+rt*Et.c+Et.e,rt=F*Et.b+rt*Et.d+Et.f,F=$),E=rt-X,ae=F-O,E<f&&E>-f&&(E=0),ae<f&&ae>-f&&(ae=0),(u.lockAxis||u.lockedAxis)&&(ae||E)&&($=u.lockedAxis,$||(u.lockedAxis=$=h&&Math.abs(ae)>Math.abs(E)?"y":d?"x":null,$&&Vr(u.vars.onLockAxis)&&u.vars.onLockAxis.call(u,u.pointerEvent)),$==="y"?E=0:$==="x"&&(ae=0)),z=kr(H+ae*j),W=kr(G+E*j)),(J||$t||It)&&(u.x!==z||u.y!==W&&!a)&&(It&&(Lo.x=z,Lo.y=W,$=It(Lo),z=kr($.x),W=kr($.y)),J&&(z=kr(J(z))),$t&&(W=kr($t(W)))),B&&(z>at?z=at+Math.round((z-at)*dt):z<_t&&(z=_t+Math.round((z-_t)*dt)),a||(W>Ut?W=Math.round(Ut+(W-Ut)*dt):W<q&&(W=Math.round(q+(W-q)*dt)))),(u.x!==z||u.y!==W&&!a)&&(a?(u.endRotation=u.x=u.endX=z,Rt=!0):(d&&(u.y=u.endY=W,Rt=!0),h&&(u.x=u.endX=z,Rt=!0)),!k||Oe(u,"move","onMove")!==!1?!u.isDragging&&u.isPressed&&(u.isDragging=it=!0,Oe(u,"dragstart","onDragStart")):(u.pointerX=et,u.pointerY=wt,G=ft,u.x=Dt,u.y=zt,u.endX=Nt,u.endY=te,u.endRotation=he,Rt=me))},mt=function Mt(F,rt){if(!I||!u.isPressed||F&&xt!=null&&!rt&&(F.pointerId&&F.pointerId!==xt&&F.target!==e||F.changedTouches&&!D1(F.changedTouches,xt))){Z&&F&&I&&ri(F);return}u.isPressed=!1;var k=F,j=u.isDragging,dt=u.vars.allowContextMenu&&F&&(F.ctrlKey||F.which>2),et=pe.delayedCall(.001,Jt),wt,ft,Dt,zt,Nt;if(bt?(He(bt,"touchend",Mt),He(bt,"touchmove",Q),He(bt,"touchcancel",Mt),He(L,"touchstart",D_)):He(L,"mousemove",Q),He(be,"touchforcechange",ri),(!Vc||!bt)&&(He(L,"mouseup",Mt),F&&F.target&&He(F.target,"mouseup",Mt)),Rt=!1,j&&(p=w_=zr(),u.isDragging=!1),A_(pt),Ft&&!dt){F&&(He(F.target,"change",Mt),u.pointerEvent=k),zc(_,!1),Oe(u,"release","onRelease"),Oe(u,"click","onClick"),Ft=!1;return}for(ft=_.length;--ft>-1;)Xf(_[ft],"cursor",n.cursor||(n.cursor!==!1?Oa:null));if(Gc--,F){if(wt=F.changedTouches,wt&&(F=wt[0],F!==ot&&F.identifier!==xt)){for(ft=wt.length;--ft>-1&&(F=wt[ft]).identifier!==xt&&F.target!==e;);if(ft<0&&!rt)return}u.pointerEvent=k,u.pointerX=F.pageX,u.pointerY=F.pageY}return dt&&k?(ri(k),Z=!0,Oe(u,"release","onRelease")):k&&!j?(Z=!1,Ht&&(n.snap||n.bounds)&&Tt(n.inertia||n.throwProps),Oe(u,"release","onRelease"),(!Ua||k.type!=="touchmove")&&k.type.indexOf("cancel")===-1&&(Oe(u,"click","onClick"),zr()-w<300&&Oe(u,"doubleclick","onDoubleClick"),zt=k.target||e,w=zr(),Nt=function(){w!==x&&u.enabled()&&!u.isPressed&&!k.defaultPrevented&&(zt.click?zt.click():L.createEvent&&(Dt=L.createEvent("MouseEvents"),Dt.initMouseEvent("click",!0,!0,be,1,u.pointerEvent.screenX,u.pointerEvent.screenY,u.pointerX,u.pointerY,!1,!1,!1,!1,0,null),zt.dispatchEvent(Dt)))},!Ua&&!k.defaultPrevented&&pe.delayedCall(.05,Nt))):(Tt(n.inertia||n.throwProps),!u.allowEventDefault&&k&&(n.dragClickables!==!1||!T.call(u,k.target))&&j&&(!Y||Kt&&Y===Kt)&&k.cancelable!==!1?(Z=!0,ri(k)):Z=!1,Oe(u,"release","onRelease")),ue()&&et.duration(u.tween.duration()),j&&Oe(u,"dragend","onDragEnd"),!0},gt=function(F){if(F&&u.isDragging&&!D){var rt=F.target||e.parentNode,k=rt.scrollLeft-rt._gsScrollX,j=rt.scrollTop-rt._gsScrollY;(k||j)&&(Et?(O-=k*Et.a+j*Et.c,X-=j*Et.d+k*Et.b):(O-=k,X-=j),rt._gsScrollX+=k,rt._gsScrollY+=j,st(u.pointerX,u.pointerY))}},Bt=function(F){var rt=zr(),k=rt-w<100,j=rt-p<50,dt=k&&x===w,et=u.pointerEvent&&u.pointerEvent.defaultPrevented,wt=k&&N===w,ft=F.isTrusted||F.isTrusted==null&&k&&dt;if((dt||j&&u.vars.suppressClickOnDrag!==!1)&&F.stopImmediatePropagation&&F.stopImmediatePropagation(),k&&!(u.pointerEvent&&u.pointerEvent.defaultPrevented)&&(!dt||ft&&!wt)){ft&&dt&&(N=w),x=w;return}(u.isPressed||j||k)&&(!ft||!F.detail||!k||et)&&ri(F),!k&&!j&&!it&&(F&&F.target&&(u.pointerEvent=F),Oe(u,"click","onClick"))},ee=function(F){return Et?{x:F.x*Et.a+F.y*Et.c+Et.e,y:F.x*Et.b+F.y*Et.d+Et.f}:{x:F.x,y:F.y}};return kt=t.get(e),kt&&kt.kill(),i.startDrag=function(Mt,F){var rt,k,j,dt;V(Mt||u.pointerEvent,!0),F&&!u.hitTest(Mt||u.pointerEvent)&&(rt=Fo(Mt||u.pointerEvent),k=Fo(e),j=ee({x:rt.left+rt.width/2,y:rt.top+rt.height/2}),dt=ee({x:k.left+k.width/2,y:k.top+k.height/2}),O-=j.x-dt.x,X-=j.y-dt.y),u.isDragging||(u.isDragging=it=!0,Oe(u,"dragstart","onDragStart"))},i.drag=Q,i.endDrag=function(Mt){return mt(Mt||u.pointerEvent,!0)},i.timeSinceDrag=function(){return u.isDragging?0:(zr()-p)/1e3},i.timeSinceClick=function(){return(zr()-w)/1e3},i.hitTest=function(Mt,F){return t.hitTest(u.target,Mt,F)},i.getDirection=function(Mt,F){var rt=Mt==="velocity"&&xi?Mt:Ba(Mt)&&!a?"element":"start",k,j,dt,et,wt,ft;return rt==="element"&&(wt=Fo(u.target),ft=Fo(Mt)),k=rt==="start"?u.x-H:rt==="velocity"?xi.getVelocity(e,l):wt.left+wt.width/2-(ft.left+ft.width/2),a?k<0?"counter-clockwise":"clockwise":(F=F||2,j=rt==="start"?u.y-G:rt==="velocity"?xi.getVelocity(e,c):wt.top+wt.height/2-(ft.top+ft.height/2),dt=Math.abs(k/j),et=dt<1/F?"":k<0?"left":"right",dt<F&&(et!==""&&(et+="-"),et+=j<0?"up":"down"),et)},i.applyBounds=function(Mt,F){var rt,k,j,dt,et,wt;if(Mt&&n.bounds!==Mt)return n.bounds=Mt,u.update(!0,F);if(lt(!0),yt(),B&&!ue()){if(rt=u.x,k=u.y,rt>at?rt=at:rt<_t&&(rt=_t),k>Ut?k=Ut:k<q&&(k=q),(u.x!==rt||u.y!==k)&&(j=!0,u.x=u.endX=rt,a?u.endRotation=rt:u.y=u.endY=k,Rt=!0,pt(!0),u.autoScroll&&!u.isDragging))for(Wf(e.parentNode),dt=e,rr.scrollTop=be.pageYOffset!=null?be.pageYOffset:L.documentElement.scrollTop!=null?L.documentElement.scrollTop:L.body.scrollTop,rr.scrollLeft=be.pageXOffset!=null?be.pageXOffset:L.documentElement.scrollLeft!=null?L.documentElement.scrollLeft:L.body.scrollLeft;dt&&!wt;)wt=Bo(dt.parentNode),et=wt?rr:dt.parentNode,d&&et.scrollTop>et._gsMaxScrollY&&(et.scrollTop=et._gsMaxScrollY),h&&et.scrollLeft>et._gsMaxScrollX&&(et.scrollLeft=et._gsMaxScrollX),dt=et;u.isThrowing&&(j||u.endX>at||u.endX<_t||u.endY>Ut||u.endY<q)&&Tt(n.inertia||n.throwProps,j)}return u},i.update=function(Mt,F,rt){if(F&&u.isPressed){var k=Br(e),j=tt.apply({x:u.x-H,y:u.y-G}),dt=Br(e.parentNode,!0);dt.apply({x:k.e-j.x,y:k.f-j.y},j),u.x-=j.x-dt.e,u.y-=j.y-dt.f,pt(!0),Zt()}var et=u.x,wt=u.y;return Wt(!F),Mt?u.applyBounds():(Rt&&rt&&pt(!0),lt(!0)),F&&(st(u.pointerX,u.pointerY),Rt&&pt(!0)),u.isPressed&&!F&&(h&&Math.abs(et-u.x)>.01||d&&Math.abs(wt-u.y)>.01&&!a)&&Zt(),u.autoScroll&&(Wf(e.parentNode,u.isDragging),m=u.isDragging,pt(!0),R_(e,gt),C_(e,gt)),u},i.enable=function(Mt){var F={lazy:!0},rt,k,j;if(n.cursor!==!1&&(F.cursor=n.cursor||Oa),pe.utils.checkPrefix("touchCallout")&&(F.touchCallout="none"),Mt!=="soft"){for(E_(_,h===d?"none":n.allowNativeTouchScrolling&&e.scrollHeight===e.clientHeight==(e.scrollWidth===e.clientHeight)||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"),k=_.length;--k>-1;)j=_[k],Vc||qe(j,"mousedown",V),qe(j,"touchstart",V),qe(j,"click",Bt,!0),pe.set(j,F),j.getBBox&&j.ownerSVGElement&&h!==d&&pe.set(j.ownerSVGElement,{touchAction:n.allowNativeTouchScrolling||n.allowEventDefault?"manipulation":h?"pan-y":"pan-x"}),n.allowContextMenu||qe(j,"contextmenu",vt);zc(_,!1)}return C_(e,gt),I=!0,xi&&Mt!=="soft"&&xi.track(D||e,o?"x,y":a?"rotation":"top,left"),e._gsDragID=rt="d"+b1++,No[rt]=u,D&&(D.enable(),D.element._gsDragID=rt),(n.bounds||a)&&Zt(),n.bounds&&u.applyBounds(),u},i.disable=function(Mt){for(var F=u.isDragging,rt=_.length,k;--rt>-1;)Xf(_[rt],"cursor",null);if(Mt!=="soft"){for(E_(_,null),rt=_.length;--rt>-1;)k=_[rt],Xf(k,"touchCallout",null),He(k,"mousedown",V),He(k,"touchstart",V),He(k,"click",Bt,!0),He(k,"contextmenu",vt);zc(_,!0),bt&&(He(bt,"touchcancel",mt),He(bt,"touchend",mt),He(bt,"touchmove",Q)),He(L,"mouseup",mt),He(L,"mousemove",Q)}return R_(e,gt),I=!1,xi&&Mt!=="soft"&&(xi.untrack(D||e,o?"x,y":a?"rotation":"top,left"),u.tween&&u.tween.kill()),D&&D.disable(),A_(pt),u.isDragging=u.isPressed=Ft=!1,F&&Oe(u,"dragend","onDragEnd"),u},i.enabled=function(Mt,F){return arguments.length?Mt?u.enable(F):u.disable(F):I},i.kill=function(){return u.isThrowing=!1,u.tween&&u.tween.kill(),u.disable(),pe.set(_,{clearProps:"userSelect"}),delete No[e._gsDragID],u},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~s.indexOf("scroll")&&(D=i.scrollProxy=new L1(e,E1({onKill:function(){u.isPressed&&mt(null)}},n)),e.style.overflowY=d&&!Jf?"auto":"hidden",e.style.overflowX=h&&!Jf?"auto":"hidden",e=D.content),a?g.rotation=1:(h&&(g[l]=1),d&&(g[c]=1)),P.force3D="force3D"in n?n.force3D:!0,F_(M_(i)),i.enable(),i}return t.register=function(n){pe=n,qf()},t.create=function(n,i){return Zf||qf(!0),Hr(n).map(function(s){return new t(s,i)})},t.get=function(n){return No[(Hr(n)[0]||{})._gsDragID]},t.timeSinceDrag=function(){return(zr()-w_)/1e3},t.hitTest=function(n,i,s){if(n===i)return!1;var o=Fo(n),a=Fo(i),l=o.top,c=o.left,h=o.right,d=o.bottom,f=o.width,u=o.height,_=a.left>h||a.right<c||a.top>d||a.bottom<l,g,p,m;return _||!s?!_:(m=(s+"").indexOf("%")!==-1,s=parseFloat(s)||0,g={left:Math.max(c,a.left),top:Math.max(l,a.top)},g.width=Math.min(h,a.right)-g.left,g.height=Math.min(d,a.bottom)-g.top,g.width<0||g.height<0?!1:m?(s*=.01,p=g.width*g.height,p>=f*u*s||p>=a.width*a.height*s):g.width>s&&g.height>s)},t}(F1);A1(Fs.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1});Fs.zIndex=1e3;Fs.version="3.12.5";U_()&&pe.registerPlugin(Fs);var z_=()=>{let r=document.querySelector(".team-operations-wrapper"),t=document.querySelectorAll(".team-operations-wrap"),e=document.querySelector(".team-circle_wrapper:not(.is-mobile-circle-wrapper)"),n=document.querySelector(".is-mobile-circle-wrapper"),i=window.innerWidth<=768,s=i?n:e,o=document.querySelectorAll(".team-circle_item"),a=document.querySelector(".team-arrow-left"),l=document.querySelector(".team-arrow-right"),c=document.querySelector(".team-arrow-left-mobile"),h=document.querySelector(".team-arrow-right-mobile");if(!r||!s||!(i?c:a)||!(i?h:l)){console.warn("Team slider elements not found");return}Yt.registerPlugin(Fs);let u=0,_=t.length,g=0,p=i?16:48,m=()=>(g=t[0]?.offsetWidth||300,g),b=I=>{let D=m(),X=-(I*(D+(i?16:48)));i?Yt.set(r,{x:X}):Yt.to(r,{x:X,duration:.5,ease:"power2.out"}),i&&t.forEach((H,G)=>{G===I?Yt.to(H,{opacity:1,duration:.3,ease:"power2.out"}):Yt.to(H,{opacity:.5,duration:.3,ease:"power2.out"})})},S=I=>{u=I,b(I);let D=(G,B)=>{let U=G.querySelector(".team-circle_image");B?(G.classList.add("active"),Yt.to(G,{scale:1.1,opacity:1,duration:.3,ease:"power2.out",clearProps:"border,borderRadius,boxShadow"}),U&&(U.style.border="2px solid #EEAA55",U.style.borderRadius="50%")):(G.classList.remove("active"),Yt.to(G,{scale:1,opacity:.75,duration:.3,ease:"power2.out",clearProps:"border,borderRadius,boxShadow"}),U&&(U.style.border="2px solid transparent",U.style.borderRadius="50%"))};if(o.forEach((G,B)=>{D(G,B===I)}),n){let G=n.querySelectorAll(".team-circle_item");G.forEach((U,R)=>{D(U,R===I)});let B=n.querySelector(".team-circle_list");if(B&&i){let U=G[0]?.offsetWidth||60,at=-(I*(U+6));Yt.to(B,{x:at,duration:.5,ease:"power2.out"})}}let O=(G,B)=>{G&&(Yt.to(G,{opacity:B?.5:1,duration:.3,ease:"power2.out"}),G.style.pointerEvents=B?"none":"auto")},X=i?c:a,H=i?h:l;O(X,I===0),O(H,I===_-1)},v=()=>{u<_-1&&S(u+1)},C=()=>{u>0&&S(u-1)};a&&a.addEventListener("click",C),l&&l.addEventListener("click",v),c&&c.addEventListener("click",C),h&&h.addEventListener("click",v);let T=I=>{I.forEach((D,O)=>{D.addEventListener("click",()=>{S(O)}),i||(D.addEventListener("mouseenter",()=>{D.classList.contains("active")||Yt.to(D,{scale:1.05,opacity:.8,duration:.2,ease:"power2.out",clearProps:"border,borderRadius,boxShadow"})}),D.addEventListener("mouseleave",()=>{D.classList.contains("active")||Yt.to(D,{scale:1,opacity:.75,duration:.2,ease:"power2.out",clearProps:"border,borderRadius,boxShadow"})}))})};if(T(o),n){let I=n.querySelectorAll(".team-circle_item");T(I)}t.forEach((I,D)=>{I.style.display="block",i&&(D===0?Yt.set(I,{opacity:1}):Yt.set(I,{opacity:.5}))});let w=I=>{I.forEach((D,O)=>{let X=D.querySelector(".team-circle_image");O===0?(D.classList.add("active"),Yt.set(D,{scale:1.1,opacity:1,clearProps:"border,borderRadius,boxShadow"}),X&&(X.style.border="2px solid #EEAA55",X.style.borderRadius="50%")):(D.classList.remove("active"),Yt.set(D,{scale:1,opacity:.75,clearProps:"border,borderRadius,boxShadow"}),X&&(X.style.border="2px solid transparent",X.style.borderRadius="50%"))})};if(w(o),n){let I=n.querySelectorAll(".team-circle_item");w(I);let D=n.querySelector(".team-circle_list");D&&i&&(D.style.gap="6px",Yt.set(D,{x:0}))}a&&(Yt.set(a,{opacity:.5}),a.style.pointerEvents="none"),c&&(Yt.set(c,{opacity:.5}),c.style.pointerEvents="none"),i||Fs.create(r,{type:"x",bounds:function(){let I=m();return{minX:-(_-1)*(I+48),maxX:0}},inertia:!0,onDragEnd:function(){let I=Math.abs(this.x),D=m(),X=Math.round(I/(D+48)),H=Math.max(0,Math.min(X,_-1));S(H)}}),document.addEventListener("keydown",I=>{I.key==="ArrowLeft"?C():I.key==="ArrowRight"&&v()});let P=0,M=0,y=!1;r.addEventListener("touchstart",I=>{P=I.touches[0].clientX,y=!1}),r.addEventListener("touchmove",I=>{let D=I.touches[0].clientX;Math.abs(D-P)>10&&(y=!0)}),r.addEventListener("touchend",I=>{y&&(M=I.changedTouches[0].clientX,L(),y=!1)});let L=()=>{let D=P-M;Math.abs(D)>50&&(D>0?v():C())};return window.addEventListener("resize",()=>{b(u);let I=window.innerWidth<=768;I!==i&&(i=I,i||t.forEach(D=>{Yt.to(D,{opacity:1,duration:.3,ease:"power2.out"})}),S(u))}),{nextSlide:v,prevSlide:C,updateActiveSlide:S,currentSlide:()=>u,totalSlides:()=>_}};var V_=()=>{let r=document.querySelectorAll(".pirxey-teams-name"),t=document.querySelectorAll(".pirxey-teams-item-box"),e=document.querySelectorAll(".pirxey-teams-box-bottom");if(!r.length||!t.length)return;let n=window.innerWidth>768;if(!n)return;let i=-1,s,o=!1,a=f=>{let u=e[f];u&&Yt.to(u,{x:-17,y:17,opacity:1,duration:.6,ease:"power2.out",delay:.1})},l=f=>{i===f||o||(o=!0,r.forEach((u,_)=>{_===f?Yt.to(u,{color:"#EEAA55",duration:.3,ease:"power2.out"}):Yt.to(u,{color:"inherit",duration:.3,ease:"power2.out"})}),i!==-1&&t[i]?Yt.to(t[i],{opacity:0,scale:.95,duration:.2,ease:"power2.out",onComplete:()=>{t[i].style.display="none",t[i].style.visibility="hidden",f!==-1&&t[f]?(t[f].style.display="block",t[f].style.visibility="visible",Yt.fromTo(t[f],{opacity:0,scale:.95},{opacity:1,scale:1,duration:.3,ease:"power2.out",onComplete:()=>{o=!1,a(f)}})):o=!1}}):f!==-1&&t[f]?(t[f].style.display="block",t[f].style.visibility="visible",Yt.fromTo(t[f],{opacity:0,scale:.95},{opacity:1,scale:1,duration:.3,ease:"power2.out",onComplete:()=>{o=!1,a(f)}})):o=!1,i=f)},c=()=>{i!==-1&&t[i]&&(Yt.to(t[i],{opacity:0,scale:.95,duration:.2,ease:"power2.out",onComplete:()=>{t[i].style.display="none",t[i].style.visibility="hidden"}}),i=-1)},h=()=>{e.forEach(f=>{Yt.set(f,{x:0,y:0,opacity:0})})};t.forEach((f,u)=>{u===0?(f.style.display="block",f.style.opacity="1",f.style.visibility="visible",i=0):(f.style.display="none",f.style.opacity="0",f.style.visibility="hidden"),f.style.pointerEvents="auto"}),r.forEach((f,u)=>{u===0?Yt.set(f,{color:"#EEAA55"}):Yt.set(f,{color:"inherit"})}),e.forEach(f=>{Yt.set(f,{x:0,y:0,opacity:0})}),setTimeout(()=>{a(0)},100),r.forEach((f,u)=>{f.addEventListener("mouseenter",_=>{clearTimeout(s),l(u)}),f.addEventListener("mouseleave",_=>{let g=_.relatedTarget;!g||!g.closest(".pirxey-teams-item-box")&&g.closest(".pirxey-teams-name")})}),t.forEach(f=>{f.addEventListener("mouseenter",()=>{clearTimeout(s)}),f.addEventListener("mouseleave",u=>{let _=u.relatedTarget;_&&_.closest(".pirxey-teams-name")})});let d=document.querySelector(".pirxey-teams-wrapper");return d&&d.addEventListener("mouseleave",()=>{}),window.addEventListener("resize",()=>{!(window.innerWidth>768)&&n&&(c(),h())}),{showBox:l,hideAllBoxes:c,currentActiveIndex:()=>i}};var H_=()=>{let r=document.querySelectorAll(".pixey-teams-arrow-mobile"),t=document.querySelectorAll(".pirxey-teams-item-mobile-unwrap");if(!r.length||!t.length)return;let e=window.innerWidth<=991;if(!e)return;let n=new Set,i=s=>{let o=r[s],a=t[s];if(!o||!a)return;if(n.has(s))n.delete(s),Yt.to(a,{height:0,paddingTop:0,paddingBottom:0,opacity:0,duration:.3,ease:"power2.out",onComplete:()=>{a.style.display="none",a.style.paddingTop="",a.style.paddingBottom=""}}),Yt.to(o,{rotation:0,duration:.3,ease:"power2.out"});else{n.add(s),a.style.display="block",a.style.height="auto",a.style.opacity="0";let c=window.getComputedStyle(a),h=c.paddingTop,d=c.paddingBottom;a.style.paddingTop="0px",a.style.paddingBottom="0px",a.style.height="0px";let f=a.scrollHeight;Yt.to(a,{height:f,paddingTop:h,paddingBottom:d,opacity:1,duration:.3,ease:"power2.out",onComplete:()=>{a.style.height="auto"}}),Yt.to(o,{rotation:90,duration:.3,ease:"power2.out"})}};return t.forEach(s=>{s.style.display="none",s.style.height="0px",s.style.opacity="0",s.style.overflow="hidden",s.style.paddingTop="",s.style.paddingBottom=""}),r.forEach(s=>{Yt.set(s,{rotation:0})}),r.forEach((s,o)=>{s.addEventListener("click",a=>{a.preventDefault(),i(o)})}),window.addEventListener("resize",()=>{!(window.innerWidth<=991)&&e&&(n.clear(),t.forEach(o=>{o.style.display="none",o.style.height="0px",o.style.opacity="0"}),r.forEach(o=>{Yt.set(o,{rotation:0})}))}),{toggleSection:i,activeSections:()=>n}};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{wm(),lm(),nd(),__(),mm(),am(),om(),z_(),V_(),H_()});})();
|
|
3847
3847
|
/*! Bundled license information:
|
|
3848
3848
|
|
|
3849
3849
|
gsap/gsap-core.js:
|