qt-human 4.1.1 → 4.1.2
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/bundle.iife.js +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/esm/chunks/human-core-whM3ddVo.js +1 -0
- package/dist/esm/chunks/{index-D1Qxwegx.js → index-Ch_zO9Xs.js} +1 -1
- package/dist/esm/chunks/{render-DBcxrlBG.js → render-BIyvUAyR.js} +1 -1
- package/dist/esm/chunks/{shared-BdddkjbO.js → shared-CkWRiqE-.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/modules/components/degradedNotice.d.ts +10 -0
- package/dist/esm/types/modules/components/degradedNotice.d.ts.map +1 -0
- package/dist/esm/types/modules/human.d.ts +1 -0
- package/dist/esm/types/modules/human.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/chunks/human-core-CEf_olmM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"three";import{m as e,d as i,E as n,r}from"./shared-BdddkjbO.js";import{c as s,g as o,E as a}from"./human-core-CEf_olmM.js";import{OrbitControls as h}from"three/examples/jsm/controls/OrbitControls.js";import{RGBELoader as l}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFLoader as c}from"three/examples/jsm/loaders/GLTFLoader.js";import{KTX2Loader as d}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as u}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{DRACOLoader as p}from"three/examples/jsm/loaders/DRACOLoader.js";import{OrbitControls as m}from"three/addons/controls/OrbitControls.js";function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var _,v,y,w,b,A,x,M,C,E,S,k,T,L,O,R,F,P={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},D={duration:.5,overwrite:!1,delay:0},B=1e8,z=1e-8,G=2*Math.PI,I=G/4,H=0,N=Math.sqrt,V=Math.cos,j=Math.sin,W=function(t){return"string"==typeof t},Y=function(t){return"function"==typeof t},$=function(t){return"number"==typeof t},X=function(t){return void 0===t},U=function(t){return"object"==typeof t},q=function(t){return!1!==t},J=function(){return"undefined"!=typeof window},Q=function(t){return Y(t)||W(t)},Z="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,it=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rt=/[+-]=-?[.\d]+/,st=/[^,'"\[\]\s]+/gi,ot=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,at={},ht={},lt=function(t){return(ht=Gt(t,at))&&Ii},ct=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},dt=function(t,e){return!e&&console.warn(t)},ut=function(t,e){return t&&(at[t]=e)&&ht&&(ht[t]=e)||at},pt=function(){return 0},mt={suppressEvents:!0,isStart:!0,kill:!1},gt={suppressEvents:!0,kill:!1},ft={suppressEvents:!0},_t={},vt=[],yt={},wt={},bt={},At=30,xt=[],Mt="",Ct=function(t){var e,i,n=t[0];if(U(n)||Y(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(i=xt.length;i--&&!xt[i].targetTest(n););e=xt[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Ke(t[i],e)))||t.splice(i,1);return t},Et=function(t){return t._gsap||Ct(fe(t))[0]._gsap},St=function(t,e,i){return(i=t[e])&&Y(i)?t[e]():X(i)&&t.getAttribute&&t.getAttribute(e)||i},kt=function(t,e){return(t=t.split(",")).forEach(e)||t},Tt=function(t){return Math.round(1e5*t)/1e5||0},Lt=function(t){return Math.round(1e7*t)/1e7||0},Ot=function(t,e){var i=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===i?t+n:"-"===i?t-n:"*"===i?t*n:t/n},Rt=function(t,e){for(var i=e.length,n=0;t.indexOf(e[n])<0&&++n<i;);return n<i},Ft=function(){var t,e,i=vt.length,n=vt.slice(0);for(yt={},vt.length=0,t=0;t<i;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Pt=function(t,e,i,n){vt.length&&!v&&Ft(),t.render(e,i,v&&e<0&&(t._initted||t._startAt)),vt.length&&!v&&Ft()},Dt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(st).length<2?e:W(t)?t.trim():t},Bt=function(t){return t},zt=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},Gt=function(t,e){for(var i in e)t[i]=e[i];return t},It=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=U(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},Ht=function(t,e){var i,n={};for(i in t)i in e||(n[i]=t[i]);return n},Nt=function(t){var e,i=t.parent||w,n=t.keyframes?(e=K(t.keyframes),function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}):zt;if(q(t.inherit))for(;i;)n(t,i.vars.defaults),i=i.parent||i._dp;return t},Vt=function(t,e,i,n,r){var s,o=t[n];if(r)for(s=e[r];o&&o[r]>s;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[n]=e,e._prev=o,e.parent=e._dp=t,e},jt=function(t,e,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=e._prev,s=e._next;r?r._next=s:t[i]===e&&(t[i]=s),s?s._prev=r:t[n]===e&&(t[n]=r),e._next=e._prev=e.parent=null},Wt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Yt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},$t=function(t,e,i,n){return t._startAt&&(v?t._startAt.revert(gt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Xt=function t(e){return!e||e._ts&&t(e.parent)},Ut=function(t){return t._repeat?qt(t._tTime,t=t.duration()+t._rDelay)*t:0},qt=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},Jt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Qt=function(t){return t._end=Lt(t._start+(t._tDur/Math.abs(t._ts||t._rts||z)||0))},Zt=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Lt(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Qt(t),i._dirty||Yt(i,t)),t},Kt=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=Jt(t.rawTime(),e),(!e._dur||de(0,e.totalDuration(),i)-e._tTime>z)&&e.render(i,!0)),Yt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},te=function(t,e,i,n){return e.parent&&Wt(e),e._start=Lt(($(i)?i:i||t!==w?he(t,i,e):t._time)+e._delay),e._end=Lt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Vt(t,e,"_first","_last",t._sort?"_start":0),re(e)||(t._recent=e),n||Kt(t,e),t._ts<0&&Zt(t,t._tTime),t},ee=function(t,e){return(at.ScrollTrigger||ct("scrollTrigger",e))&&at.ScrollTrigger.create(e,t)},ie=function(t,e,i,n,r){return ai(t,e,r),t._initted?!i&&t._pt&&!v&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&C!==He.frame?(vt.push(t),t._lazy=[r,n],1):void 0:1},ne=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},re=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},se=function(t,e,i,n){var r=t._repeat,s=Lt(e)||0,o=t._tTime/t._tDur;return o&&!n&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:Lt(s*(r+1)+t._rDelay*r):s,o>0&&!n&&Zt(t,t._tTime=t._tDur*o),t.parent&&Qt(t),i||Yt(t.parent,t),t},oe=function(t){return t instanceof ei?Yt(t):se(t,t._dur)},ae={_start:0,endTime:pt,totalDuration:pt},he=function t(e,i,n){var r,s,o,a=e.labels,h=e._recent||ae,l=e.duration()>=B?h.endTime(!1):e._dur;return W(i)&&(isNaN(i)||i in a)?(s=i.charAt(0),o="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?h._start:h.endTime(h._repeat>=0))+(parseFloat(i.substr(1))||0)*(o?(r<0?h:n).totalDuration()/100:1)):r<0?(i in a||(a[i]=l),a[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),o&&n&&(s=s/100*(K(n)?n[0]:n).totalDuration()),r>1?t(e,i.substr(0,r-1),n)+s:l+s)):null==i?l:+i},le=function(t,e,i){var n,r,s=$(e[1]),o=(s?2:1)+(t<2?0:1),a=e[o];if(s&&(a.duration=e[1]),a.parent=i,t){for(n=a,r=i;r&&!("immediateRender"in n);)n=r.vars.defaults||{},r=q(r.vars.inherit)&&r.parent;a.immediateRender=q(n.immediateRender),t<2?a.runBackwards=1:a.startAt=e[o-1]}return new ui(e[0],a,e[o+1])},ce=function(t,e){return t||0===t?e(t):e},de=function(t,e,i){return i<t?t:i>e?e:i},ue=function(t,e){return W(t)&&(e=ot.exec(t))?e[1]:""},pe=[].slice,me=function(t,e){return t&&U(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&U(t[0]))&&!t.nodeType&&t!==b},ge=function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var n;return W(t)&&!e||me(t,1)?(n=i).push.apply(n,fe(t)):i.push(t)}))||i},fe=function(t,e,i){return y&&!e&&y.selector?y.selector(t):!W(t)||i||!A&&Ne()?K(t)?ge(t,i):me(t)?pe.call(t,0):t?[t]:[]:pe.call((e||x).querySelectorAll(t),0)},_e=function(t){return t=fe(t)[0]||dt("Invalid scope")||{},function(e){var i=t.current||t.nativeElement||t;return fe(e,i.querySelectorAll?i:i===t?dt("Invalid scope")||x.createElement("div"):t)}},ve=function(t){return t.sort((function(){return.5-Math.random()}))},ye=function(t){if(Y(t))return t;var e=U(t)?t:{each:t},i=Ue(e.ease),n=e.from||0,r=parseFloat(e.base)||0,s={},o=n>0&&n<1,a=isNaN(n)||o,h=e.axis,l=n,c=n;return W(n)?l=c={center:.5,edges:.5,end:1}[n]||0:!o&&a&&(l=n[0],c=n[1]),function(t,o,d){var u,p,m,g,f,_,v,y,w,b=(d||e).length,A=s[b];if(!A){if(!(w="auto"===e.grid?0:(e.grid||[1,B])[1])){for(v=-1e8;v<(v=d[w++].getBoundingClientRect().left)&&w<b;);w<b&&w--}for(A=s[b]=[],u=a?Math.min(w,b)*l-.5:n%w,p=w===B?0:a?b*c/w-.5:n/w|0,v=0,y=B,_=0;_<b;_++)m=_%w-u,g=p-(_/w|0),A[_]=f=h?Math.abs("y"===h?g:m):N(m*m+g*g),f>v&&(v=f),f<y&&(y=f);"random"===n&&ve(A),A.max=v-y,A.min=y,A.v=b=(parseFloat(e.amount)||parseFloat(e.each)*(w>b?b-1:h?"y"===h?b/w:w:Math.max(w,b/w))||0)*("edges"===n?-1:1),A.b=b<0?r-b:r,A.u=ue(e.amount||e.each)||0,i=i&&b<0?$e(i):i}return b=(A[t]-A.min)/A.max||0,Lt(A.b+(i?i(b):b)*A.v)+A.u}},we=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=Lt(Math.round(parseFloat(i)/t)*t*e);return(n-n%1)/e+($(i)?0:ue(i))}},be=function(t,e){var i,n,r=K(t);return!r&&U(t)&&(i=r=t.radius||B,t.values?(t=fe(t.values),(n=!$(t[0]))&&(i*=i)):t=we(t.increment)),ce(e,r?Y(t)?function(e){return n=t(e),Math.abs(n-e)<=i?n:e}:function(e){for(var r,s,o=parseFloat(n?e.x:e),a=parseFloat(n?e.y:0),h=B,l=0,c=t.length;c--;)(r=n?(r=t[c].x-o)*r+(s=t[c].y-a)*s:Math.abs(t[c]-o))<h&&(h=r,l=c);return l=!i||h<=i?t[l]:e,n||l===e||$(e)?l:l+ue(e)}:we(t))},Ae=function(t,e,i,n){return ce(K(t)?!e:!0===i?!!(i=0):!n,(function(){return K(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*n)/n}))},xe=function(t,e,i){return ce(i,(function(i){return t[~~e(i)]}))},Me=function(t){for(var e,i,n,r,s=0,o="";~(e=t.indexOf("random(",s));)n=t.indexOf(")",e),r="["===t.charAt(e+7),i=t.substr(e+7,n-e-7).match(r?st:tt),o+=t.substr(s,e-s)+Ae(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return o+t.substr(s,t.length-s)},Ce=function(t,e,i,n,r){var s=e-t,o=n-i;return ce(r,(function(e){return i+((e-t)/s*o||0)}))},Ee=function(t,e,i){var n,r,s,o=t.labels,a=B;for(n in o)(r=o[n]-e)<0==!!i&&r&&a>(r=Math.abs(r))&&(s=n,a=r);return s},Se=function(t,e,i){var n,r,s,o=t.vars,a=o[e],h=y,l=t._ctx;if(a)return n=o[e+"Params"],r=o.callbackScope||t,i&&vt.length&&Ft(),l&&(y=l),s=n?a.apply(r,n):a.call(r),y=h,s},ke=function(t){return Wt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!v),t.progress()<1&&Se(t,"onInterrupt"),t},Te=[],Le=function(t){if(t)if(t=!t.name&&t.default||t,J()||t.headless){var e=t.name,i=Y(t),n=e&&!i&&t.init?function(){this._props=[]}:t,r={init:pt,render:bi,add:si,kill:xi,modifier:Ai,rawVars:0},s={targetTest:0,get:0,getSetter:_i,aliases:{},register:0};if(Ne(),t!==n){if(wt[e])return;zt(n,zt(Ht(t,r),s)),Gt(n.prototype,Gt(r,Ht(t,s))),wt[n.prop=e]=n,t.targetTest&&(xt.push(n),_t[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}ut(e,n),t.register&&t.register(Ii,n,Ei)}else Te.push(t)},Oe=255,Re={aqua:[0,Oe,Oe],lime:[0,Oe,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Oe],navy:[0,0,128],white:[Oe,Oe,Oe],olive:[128,128,0],yellow:[Oe,Oe,0],orange:[Oe,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Oe,0,0],pink:[Oe,192,203],cyan:[0,Oe,Oe],transparent:[Oe,Oe,Oe,0]},Fe=function(t,e,i){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Oe+.5|0},Pe=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p=t?$(t)?[t>>16,t>>8&Oe,t&Oe]:0:Re.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Re[t])p=Re[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+n+n+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&Oe,p&Oe,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&Oe,t&Oe]}else if("hsl"===t.substr(0,3))if(p=u=t.match(tt),e){if(~t.indexOf("="))return p=t.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,a=+p[1]/100,n=2*(h=+p[2]/100)-(r=h<=.5?h*(a+1):h+a-h*a),p.length>3&&(p[3]*=1),p[0]=Fe(o+1/3,n,r),p[1]=Fe(o,n,r),p[2]=Fe(o-1/3,n,r);else p=t.match(tt)||Re.transparent;p=p.map(Number)}return e&&!u&&(n=p[0]/Oe,r=p[1]/Oe,s=p[2]/Oe,h=((l=Math.max(n,r,s))+(c=Math.min(n,r,s)))/2,l===c?o=a=0:(d=l-c,a=h>.5?d/(2-l-c):d/(l+c),o=l===n?(r-s)/d+(r<s?6:0):l===r?(s-n)/d+2:(n-r)/d+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*a+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p},De=function(t){var e=[],i=[],n=-1;return t.split(ze).forEach((function(t){var r=t.match(it)||[];e.push.apply(e,r),i.push(n+=r.length+1)})),e.c=i,e},Be=function(t,e,i){var n,r,s,o,a="",h=(t+a).match(ze),l=e?"hsla(":"rgba(",c=0;if(!h)return t;if(h=h.map((function(t){return(t=Pe(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=De(t),(n=i.c).join(a)!==s.c.join(a)))for(o=(r=t.replace(ze,"1").split(it)).length-1;c<o;c++)a+=r[c]+(~n.indexOf(c)?h.shift()||l+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!r)for(o=(r=t.split(ze)).length-1;c<o;c++)a+=r[c]+h[c];return a+r[o]},ze=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Re)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ge=/hsl[a]?\(/,Ie=function(t){var e,i=t.join(" ");if(ze.lastIndex=0,ze.test(i))return e=Ge.test(i),t[1]=Be(t[1],e),t[0]=Be(t[0],e,De(t[1])),!0},He=function(){var t,e,i,n,r,s,o=Date.now,a=500,h=33,l=o(),c=l,d=1e3/240,u=d,p=[],m=function i(m){var g,f,_,v,y=o()-c,w=!0===m;if((y>a||y<0)&&(l+=y-h),((g=(_=(c+=y)-l)-u)>0||w)&&(v=++n.frame,r=_-1e3*n.time,n.time=_/=1e3,u+=g+(g>=d?4:d-g),f=1),w||(t=e(i)),f)for(s=0;s<p.length;s++)p[s](_,r,v,m)};return n={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){M&&(!A&&J()&&(b=A=window,x=b.document||{},at.gsap=Ii,(b.gsapVersions||(b.gsapVersions=[])).push(Ii.version),lt(ht||b.GreenSockGlobals||!b.gsap&&b||{}),Te.forEach(Le)),i="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=i||function(t){return setTimeout(t,u-1e3*n.time+1|0)},S=1,m(2))},sleep:function(){(i?cancelAnimationFrame:clearTimeout)(t),S=0,e=pt},lagSmoothing:function(t,e){a=t||1/0,h=Math.min(e||33,a)},fps:function(t){d=1e3/(t||240),u=1e3*n.time+d},add:function(t,e,i){var r=e?function(e,i,s,o){t(e,i,s,o),n.remove(r)}:t;return n.remove(t),p[i?"unshift":"push"](r),Ne(),r},remove:function(t,e){~(e=p.indexOf(t))&&p.splice(e,1)&&s>=e&&s--},_listeners:p}}(),Ne=function(){return!S&&He.wake()},Ve={},je=/^[\d.\-M][\d.\-,\s]/,We=/["']/g,Ye=function(t){for(var e,i,n,r={},s=t.substr(1,t.length-3).split(":"),o=s[0],a=1,h=s.length;a<h;a++)i=s[a],e=a!==h-1?i.lastIndexOf(","):i.length,n=i.substr(0,e),r[o]=isNaN(n)?n.replace(We,"").trim():+n,o=i.substr(e+1).trim();return r},$e=function(t){return function(e){return 1-t(1-e)}},Xe=function t(e,i){for(var n,r=e._first;r;)r instanceof ei?t(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?t(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},Ue=function(t,e){return t&&(Y(t)?t:Ve[t]||function(t){var e,i,n,r,s=(t+"").split("("),o=Ve[s[0]];return o&&s.length>1&&o.config?o.config.apply(null,~t.indexOf("{")?[Ye(s[1])]:(e=t,i=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",i),e.substring(i,~r&&r<n?e.indexOf(")",n+1):n)).split(",").map(Dt)):Ve._CE&&je.test(t)?Ve._CE("",t):o}(t))||e},qe=function(t,e,i,n){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:i,easeInOut:n};return kt(t,(function(t){for(var e in Ve[t]=at[t]=s,Ve[r=t.toLowerCase()]=i,s)Ve[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ve[t+"."+e]=s[e]})),s},Je=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Qe=function t(e,i,n){var r=i>=1?i:1,s=(n||(e?.3:.45))/(i<1?i:1),o=s/G*(Math.asin(1/r)||0),a=function(t){return 1===t?1:r*Math.pow(2,-10*t)*j((t-o)*s)+1},h="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Je(a);return s=G/s,h.config=function(i,n){return t(e,i,n)},h},Ze=function t(e,i){void 0===i&&(i=1.70158);var n=function(t){return t?--t*t*((i+1)*t+i)+1:0},r="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:Je(n);return r.config=function(i){return t(e,i)},r};kt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;qe(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),Ve.Linear.easeNone=Ve.none=Ve.Linear.easeIn,qe("Elastic",Qe("in"),Qe("out"),Qe()),k=7.5625,O=2*(L=1/(T=2.75)),R=2.5*L,qe("Bounce",(function(t){return 1-F(1-t)}),F=function(t){return t<L?k*t*t:t<O?k*Math.pow(t-1.5/T,2)+.75:t<R?k*(t-=2.25/T)*t+.9375:k*Math.pow(t-2.625/T,2)+.984375}),qe("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),qe("Circ",(function(t){return-(N(1-t*t)-1)})),qe("Sine",(function(t){return 1===t?1:1-V(t*I)})),qe("Back",Ze("in"),Ze("out"),Ze()),Ve.SteppedEase=Ve.steps=at.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,n=t+(e?0:1),r=e?1:0;return function(t){return((n*de(0,.99999999,t)|0)+r)*i}}},D.ease=Ve["quad.out"],kt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return Mt+=t+","+t+"Params,"}));var Ke=function(t,e){this.id=H++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:St,this.set=e?e.getSetter:_i},ti=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,se(this,+t.duration,1,1),this.data=t.data,y&&(this._ctx=y,y.data.push(this)),S||He.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,se(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Ne(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Zt(this,t),!i._dp||i.parent||Kt(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&te(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===z||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Pt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ut(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ut(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?qt(this._tTime,i)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var i=this.parent&&this._ts?Jt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(de(-Math.abs(this._delay),this._tDur,i),!1!==e),Qt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ne(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==z&&(this._tTime-=z)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&te(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(q(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Jt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=ft);var e=v;return v=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),v=e,this},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,oe(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,oe(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(he(this,t),q(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,q(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-z))},e.eventCallback=function(t,e,i){var n=this.vars;return arguments.length>1?(e?(n[t]=e,i&&(n[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(i){var n=Y(t)?t:Bt,r=function(){var t=e.then;e.then=null,Y(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),i(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){ke(this)},t}();zt(ti.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:-1e-8,_prom:0,_ps:!1,_rts:1});var ei=function(t){function e(e,i){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=q(e.sortChildren),w&&te(e.parent||w,g(n),i),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&ee(g(n),e.scrollTrigger),n}f(e,t);var i=e.prototype;return i.to=function(t,e,i){return le(0,arguments,this),this},i.from=function(t,e,i){return le(1,arguments,this),this},i.fromTo=function(t,e,i,n){return le(2,arguments,this),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,Nt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new ui(t,e,he(this,i),1),this},i.call=function(t,e,i){return te(this,ui.delayedCall(0,t,e),i)},i.staggerTo=function(t,e,i,n,r,s,o){return i.duration=e,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=o,i.parent=this,new ui(t,i,he(this,r)),this},i.staggerFrom=function(t,e,i,n,r,s,o){return i.runBackwards=1,Nt(i).immediateRender=q(i.immediateRender),this.staggerTo(t,e,i,n,r,s,o)},i.staggerFromTo=function(t,e,i,n,r,s,o,a){return n.startAt=i,Nt(n).immediateRender=q(n.immediateRender),this.staggerTo(t,e,n,r,s,o,a)},i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p,m,g=this._time,f=this._dirty?this.totalDuration():this._tDur,_=this._dur,y=t<=0?0:Lt(t),b=this._zTime<0!=t<0&&(this._initted||!_);if(this!==w&&y>f&&t>=0&&(y=f),y!==this._tTime||i||b){if(g!==this._time&&_&&(y+=this._time-g,t+=this._time-g),n=y,d=this._start,h=!(c=this._ts),b&&(_||(g=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,a=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,i);if(n=Lt(y%a),y===f?(o=this._repeat,n=_):((o=~~(y/a))&&o===y/a&&(n=_,o--),n>_&&(n=_)),u=qt(this._tTime,a),!g&&this._tTime&&u!==o&&this._tTime-u*a-this._dur<=0&&(u=o),p&&1&o&&(n=_-n,m=1),o!==u&&!this._lock){var A=p&&1&u,x=A===(p&&1&o);if(o<u&&(A=!A),g=A?0:y%_?_:y,this._lock=1,this.render(g||(m?0:Lt(o*a)),e,!_)._lock=0,this._tTime=y,!e&&this.parent&&Se(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,f=this._tDur,x&&(this._lock=2,g=A?_:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;Xe(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(l=function(t,e,i){var n;if(i>e)for(n=t._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,Lt(g),Lt(n)),l&&(y-=n-(n=l._start))),this._tTime=y,this._time=n,this._act=!c,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,g=0),!g&&n&&!e&&!o&&(Se(this,"onStart"),this._tTime!==y))return this;if(n>=g&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,e,i),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var M=t<0?t:n;r;){if(s=r._prev,(r._act||M<=r._end)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(M-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(M-r._start)*r._ts,e,i||v&&(r._initted||r._startAt)),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=M?-1e-8:z);break}}r=s}}if(l&&!e&&(this.pause(),l.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=d,Qt(this),this.render(t,e,i);this._onUpdate&&!e&&Se(this,"onUpdate",!0),(y===f&&this._tTime>=this.totalDuration()||!y&&g)&&(d!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||((t||!_)&&(y===f&&this._ts>0||!y&&this._ts<0)&&Wt(this,1),e||t<0&&!g||!y&&!g&&f||(Se(this,y===f&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<f&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if($(e)||(e=he(this,e,t)),!(t instanceof ti)){if(K(t))return t.forEach((function(t){return i.add(t,e)})),this;if(W(t))return this.addLabel(t,e);if(!Y(t))return this;t=ui.delayedCall(0,t)}return this!==t?te(this,t,e):this},i.getChildren=function(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=-1e8);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof ui?e&&r.push(s):(i&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,i)))),s=s._next;return r},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return W(t)?this.removeLabel(t):Y(t)?this.killTweensOf(t):(jt(this,t),t===this._recent&&(this._recent=this._last),Yt(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Lt(He.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=he(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var n=ui.delayedCall(0,e||pt,i);return n.data="isPause",this._hasPause=1,te(this,n,he(this,t))},i.removePause=function(t){var e=this._first;for(t=he(this,t);e;)e._start===t&&"isPause"===e.data&&Wt(e),e=e._next},i.killTweensOf=function(t,e,i){for(var n=this.getTweensOf(t,i),r=n.length;r--;)ii!==n[r]&&n[r].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,n=[],r=fe(t),s=this._first,o=$(e);s;)s instanceof ui?Rt(s._targets,r)&&(o?(!ii||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&n.push(s):(i=s.getTweensOf(r,e)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(t,e){e=e||{};var i,n=this,r=he(n,t),s=e,o=s.startAt,a=s.onStart,h=s.onStartParams,l=s.immediateRender,c=ui.to(n,zt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale())||z,onStart:function(){if(n.pause(),!i){var t=e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale());c._dur!==t&&se(c,t,0,1).render(c._time,!0,!0),i=1}a&&a.apply(c,h||[])}},e));return l?c.render(0):c},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,zt({startAt:{time:he(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),Ee(this,he(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),Ee(this,he(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+z)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=t,r._end+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return Yt(this)},i.invalidate=function(e){var i=this._first;for(this._lock=0;i;)i.invalidate(e),i=i._next;return t.prototype.invalidate.call(this,e)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Yt(this)},i.totalDuration=function(t){var e,i,n,r=0,s=this,o=s._last,a=B;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(n=s.parent;o;)e=o._prev,o._dirty&&o.totalDuration(),(i=o._start)>a&&s._sort&&o._ts&&!s._lock?(s._lock=1,te(s,o,i-o._delay,1)._lock=0):a=i,i<0&&o._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),a=0),o._end>r&&o._ts&&(r=o._end),o=e;se(s,s===w&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(w._ts&&(Pt(w,Jt(t,w)),C=He.frame),He.frame>=At){At+=P.autoSleep||120;var e=w._first;if((!e||!e._ts)&&P.autoSleep&&He._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||He.sleep()}}},e}(ti);zt(ei.prototype,{_lock:0,_hasPause:0,_forcing:0});var ii,ni,ri=function(t,e,i,n,r,s,o){var a,h,l,c,d,u,p,m,g=new Ei(this._pt,t,e,0,1,wi,null,r),f=0,_=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=Me(n)),s&&(s(m=[i,n],t,e),i=m[0],n=m[1]),h=i.match(nt)||[];a=nt.exec(n);)c=a[0],d=n.substring(f,a.index),l?l=(l+1)%5:"rgba("===d.substr(-5)&&(l=1),c!==h[_++]&&(u=parseFloat(h[_-1])||0,g._pt={_next:g._pt,p:d||1===_?d:",",s:u,c:"="===c.charAt(1)?Ot(u,c)-u:parseFloat(c)-u,m:l&&l<4?Math.round:0},f=nt.lastIndex);return g.c=f<n.length?n.substring(f,n.length):"",g.fp=o,(rt.test(n)||p)&&(g.e=0),this._pt=g,g},si=function(t,e,i,n,r,s,o,a,h,l){Y(n)&&(n=n(r||0,t,s));var c,d=t[e],u="get"!==i?i:Y(d)?h?t[e.indexOf("set")||!Y(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():d,p=Y(d)?h?gi:mi:pi;if(W(n)&&(~n.indexOf("random(")&&(n=Me(n)),"="===n.charAt(1)&&((c=Ot(u,n)+(ue(u)||0))||0===c)&&(n=c)),!l||u!==n||ni)return isNaN(u*n)||""===n?(!d&&!(e in t)&&ct(e,n),ri.call(this,t,e,u,n,p,a||P.stringFilter,h)):(c=new Ei(this._pt,t,e,+u||0,n-(u||0),"boolean"==typeof d?yi:vi,0,p),h&&(c.fp=h),o&&c.modifier(o,this,t),this._pt=c)},oi=function(t,e,i,n,r,s){var o,a,h,l;if(wt[t]&&!1!==(o=new wt[t]).init(r,o.rawVars?e[t]:function(t,e,i,n,r){if(Y(t)&&(t=li(t,r,e,i,n)),!U(t)||t.style&&t.nodeType||K(t)||Z(t))return W(t)?li(t,r,e,i,n):t;var s,o={};for(s in t)o[s]=li(t[s],r,e,i,n);return o}(e[t],n,r,s,i),i,n,s)&&(i._pt=a=new Ei(i._pt,r,t,0,1,o.render,o,0,o.priority),i!==E))for(h=i._ptLookup[i._targets.indexOf(r)],l=o._props.length;l--;)h[o._props[l]]=a;return o},ai=function t(e,i,n){var r,s,o,a,h,l,c,d,u,p,m,g,f,y=e.vars,b=y.ease,A=y.startAt,x=y.immediateRender,M=y.lazy,C=y.onUpdate,E=y.runBackwards,S=y.yoyoEase,k=y.keyframes,T=y.autoRevert,L=e._dur,O=e._startAt,R=e._targets,F=e.parent,P=F&&"nested"===F.data?F.vars.targets:R,G="auto"===e._overwrite&&!_,I=e.timeline;if(I&&(!k||!b)&&(b="none"),e._ease=Ue(b,D.ease),e._yEase=S?$e(Ue(!0===S?b:S,D.ease)):0,S&&e._yoyo&&!e._repeat&&(S=e._yEase,e._yEase=e._ease,e._ease=S),e._from=!I&&!!y.runBackwards,!I||k&&!y.stagger){if(g=(d=R[0]?Et(R[0]).harness:0)&&y[d.prop],r=Ht(y,_t),O&&(O._zTime<0&&O.progress(1),i<0&&E&&x&&!T?O.render(-1,!0):O.revert(E&&L?gt:mt),O._lazy=0),A){if(Wt(e._startAt=ui.set(R,zt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!O&&q(M),startAt:null,delay:0,onUpdate:C&&function(){return Se(e,"onUpdate")},stagger:0},A))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v||!x&&!T)&&e._startAt.revert(gt),x&&L&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(E&&L&&!O)if(i&&(x=!1),o=zt({overwrite:!1,data:"isFromStart",lazy:x&&!O&&q(M),immediateRender:x,stagger:0,parent:F},r),g&&(o[d.prop]=g),Wt(e._startAt=ui.set(R,o)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v?e._startAt.revert(gt):e._startAt.render(-1,!0)),e._zTime=i,x){if(!i)return}else t(e._startAt,z,z);for(e._pt=e._ptCache=0,M=L&&q(M)||M&&!L,s=0;s<R.length;s++){if(c=(h=R[s])._gsap||Ct(R)[s]._gsap,e._ptLookup[s]=p={},yt[c.id]&&vt.length&&Ft(),m=P===R?s:P.indexOf(h),d&&!1!==(u=new d).init(h,g||r,e,m,P)&&(e._pt=a=new Ei(e._pt,h,u.name,0,1,u.render,u,0,u.priority),u._props.forEach((function(t){p[t]=a})),u.priority&&(l=1)),!d||g)for(o in r)wt[o]&&(u=oi(o,r,e,m,h,P))?u.priority&&(l=1):p[o]=a=si.call(e,h,o,"get",r[o],m,P,0,y.stringFilter);e._op&&e._op[s]&&e.kill(h,e._op[s]),G&&e._pt&&(ii=e,w.killTweensOf(h,p,e.globalTime(i)),f=!e.parent,ii=0),e._pt&&M&&(yt[c.id]=1)}l&&Ci(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!f,k&&i<=0&&I.render(B,!0,!0)},hi=function(t,e,i,n){var r,s,o=e.ease||n||"power1.inOut";if(K(e))s=i[t]||(i[t]=[]),e.forEach((function(t,i){return s.push({t:i/(e.length-1)*100,v:t,e:o})}));else for(r in e)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:o})},li=function(t,e,i,n,r){return Y(t)?t.call(e,i,n,r):W(t)&&~t.indexOf("random(")?Me(t):t},ci=Mt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",di={};kt(ci+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return di[t]=1}));var ui=function(t){function e(e,i,n,r){var s;"number"==typeof i&&(n.duration=i,i=n,n=null);var o,a,h,l,c,d,u,p,m=(s=t.call(this,r?i:Nt(i))||this).vars,f=m.duration,v=m.delay,y=m.immediateRender,b=m.stagger,A=m.overwrite,x=m.keyframes,M=m.defaults,C=m.scrollTrigger,E=m.yoyoEase,S=i.parent||w,k=(K(e)||Z(e)?$(e[0]):"length"in i)?[e]:fe(e);if(s._targets=k.length?Ct(k):dt("GSAP target "+e+" not found. https://gsap.com",!P.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=A,x||b||Q(f)||Q(v)){if(i=s.vars,(o=s.timeline=new ei({data:"nested",defaults:M||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),o.parent=o._dp=g(s),o._start=0,b||Q(f)||Q(v)){if(l=k.length,u=b&&ye(b),U(b))for(c in b)~ci.indexOf(c)&&(p||(p={}),p[c]=b[c]);for(a=0;a<l;a++)(h=Ht(i,di)).stagger=0,E&&(h.yoyoEase=E),p&&Gt(h,p),d=k[a],h.duration=+li(f,g(s),a,d,k),h.delay=(+li(v,g(s),a,d,k)||0)-s._delay,!b&&1===l&&h.delay&&(s._delay=v=h.delay,s._start+=v,h.delay=0),o.to(d,h,u?u(a,d,k):0),o._ease=Ve.none;o.duration()?f=v=0:s.timeline=0}else if(x){Nt(zt(o.vars.defaults,{ease:"none"})),o._ease=Ue(x.ease||i.ease||"none");var T,L,O,R=0;if(K(x))x.forEach((function(t){return o.to(k,t,">")})),o.duration();else{for(c in h={},x)"ease"===c||"easeEach"===c||hi(c,x[c],h,x.easeEach);for(c in h)for(T=h[c].sort((function(t,e){return t.t-e.t})),R=0,a=0;a<T.length;a++)(O={ease:(L=T[a]).e,duration:(L.t-(a?T[a-1].t:0))/100*f})[c]=L.v,o.to(k,O,R),R+=O.duration;o.duration()<f&&o.to({},{duration:f-o.duration()})}}f||s.duration(f=o.duration())}else s.timeline=0;return!0!==A||_||(ii=g(s),w.killTweensOf(k),ii=0),te(S,g(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(y||!f&&!x&&s._start===Lt(S._time)&&q(y)&&Xt(g(s))&&"nested"!==S.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-v)||0)),C&&ee(g(s),C),s}f(e,t);var i=e.prototype;return i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u=this._time,p=this._tDur,m=this._dur,g=t<0,f=t>p-z&&!g?p:t<z?0:t;if(m){if(f!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(n=f,c=this.timeline,this._repeat){if(o=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*o+t,e,i);if(n=Lt(f%o),f===p?(s=this._repeat,n=m):((s=~~(f/o))&&s===Lt(f/o)&&(n=m,s--),n>m&&(n=m)),(h=this._yoyo&&1&s)&&(d=this._yEase,n=m-n),a=qt(this._tTime,o),n===u&&!i&&this._initted&&s===a)return this._tTime=f,this;s!==a&&(c&&this._yEase&&Xe(c,h),this.vars.repeatRefresh&&!h&&!this._lock&&this._time!==o&&this._initted&&(this._lock=i=1,this.render(Lt(o*s),!0).invalidate()._lock=0))}if(!this._initted){if(ie(this,g?t:n,i,e,f))return this._tTime=0,this;if(!(u===this._time||i&&this.vars.repeatRefresh&&s!==a))return this;if(m!==this._dur)return this.render(t,e,i)}if(this._tTime=f,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(d||this._ease)(n/m),this._from&&(this.ratio=l=1-l),n&&!u&&!e&&!s&&(Se(this,"onStart"),this._tTime!==f))return this;for(r=this._pt;r;)r.r(l,r.d),r=r._next;c&&c.render(t<0?t:c._dur*c._ease(n/this._dur),e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&$t(this,t,0,i),Se(this,"onUpdate")),this._repeat&&s!==a&&this.vars.onRepeat&&!e&&this.parent&&Se(this,"onRepeat"),f!==this._tDur&&f||this._tTime!==f||(g&&!this._onUpdate&&$t(this,t,0,!0),(t||!m)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Wt(this,1),e||g&&!u||!(f||u||h)||(Se(this,f===p?"onComplete":"onReverseComplete",!0),this._prom&&!(f<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,n){var r,s,o,a=t.ratio,h=e<0||!e&&(!t._start&&ne(t)&&(t._initted||!re(t))||(t._ts<0||t._dp._ts<0)&&!re(t))?0:1,l=t._rDelay,c=0;if(l&&t._repeat&&(c=de(0,t._tDur,e),s=qt(c,l),t._yoyo&&1&s&&(h=1-h),s!==qt(t._tTime,l)&&(a=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==a||v||n||t._zTime===z||!e&&t._zTime){if(!t._initted&&ie(t,e,n,i,c))return;for(o=t._zTime,t._zTime=e||(i?z:0),i||(i=e&&!o),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=c,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&$t(t,e,0,!0),t._onUpdate&&!i&&Se(t,"onUpdate"),c&&t._repeat&&!i&&t.parent&&Se(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&Wt(t,1),i||v||(Se(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},i.resetTo=function(t,e,i,n,r){S||He.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ai(this,s),function(t,e,i,n,r,s,o,a){var h,l,c,d,u=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!u)for(u=t._ptCache[e]=[],c=t._ptLookup,d=t._targets.length;d--;){if((h=c[d][e])&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return ni=1,t.vars[e]="+=0",ai(t,o),ni=0,a?dt(e+" not eligible for reset"):1;u.push(h)}for(d=u.length;d--;)(h=(l=u[d])._pt||l).s=!n&&0!==n||r?h.s+(n||0)+s*h.c:n,h.c=i-h.s,l.e&&(l.e=Tt(i)+ue(l.e)),l.b&&(l.b=h.s+ue(l.b))}(this,t,e,i,n,this._ease(s/this._dur),s,r)?this.resetTo(t,e,i,n,1):(Zt(this,0),this.parent||Vt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?ke(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,ii&&!0!==ii.vars.overwrite)._first||ke(this),this.parent&&i!==this.timeline.totalDuration()&&se(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,o,a,h,l,c=this._targets,d=t?fe(t):c,u=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,n=i===e.length;n&&i--&&t[i]===e[i];);return i<0}(c,d))return"all"===e&&(this._pt=0),ke(this);for(n=this._op=this._op||[],"all"!==e&&(W(e)&&(a={},kt(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var i,n,r,s,o=t[0]?Et(t[0]).harness:0,a=o&&o.aliases;if(!a)return e;for(n in i=Gt({},e),a)if(n in i)for(r=(s=a[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(c,e)),l=c.length;l--;)if(~d.indexOf(c[l]))for(a in r=u[l],"all"===e?(n[l]=e,o=r,s={}):(s=n[l]=n[l]||{},o=e),o)(h=r&&r[a])&&("kill"in h.d&&!0!==h.d.kill(a)||jt(this,h,"_pt"),delete r[a]),"all"!==s&&(s[a]=1);return this._initted&&!this._pt&&p&&ke(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,e){return le(1,arguments)},e.delayedCall=function(t,i,n,r){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},e.fromTo=function(t,e,i){return le(2,arguments)},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return w.killTweensOf(t,e,i)},e}(ti);zt(ui.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),kt("staggerTo,staggerFrom,staggerFromTo",(function(t){ui[t]=function(){var e=new ei,i=pe.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var pi=function(t,e,i){return t[e]=i},mi=function(t,e,i){return t[e](i)},gi=function(t,e,i,n){return t[e](n.fp,i)},fi=function(t,e,i){return t.setAttribute(e,i)},_i=function(t,e){return Y(t[e])?mi:X(t[e])&&t.setAttribute?fi:pi},vi=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},yi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},wi=function(t,e){var i=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+n,i=i._next;n+=e.c}e.set(e.t,e.p,n,e)},bi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},Ai=function(t,e,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(t,e,i),s=r},xi=function(t){for(var e,i,n=this._pt;n;)i=n._next,n.p===t&&!n.op||n.op===t?jt(this,n,"_pt"):n.dep||(e=1),n=i;return!e},Mi=function(t,e,i,n){n.mSet(t,e,n.m.call(n.tween,i,n.mt),n)},Ci=function(t){for(var e,i,n,r,s=t._pt;s;){for(e=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=e}t._pt=n},Ei=function(){function t(t,e,i,n,r,s,o,a,h){this.t=e,this.s=n,this.c=r,this.p=i,this.r=s||vi,this.d=o||this,this.set=a||pi,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=Mi,this.m=t,this.mt=i,this.tween=e},t}();kt(Mt+"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(t){return _t[t]=1})),at.TweenMax=at.TweenLite=ui,at.TimelineLite=at.TimelineMax=ei,w=new ei({sortChildren:!1,defaults:D,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),P.stringFilter=Ie;var Si=[],ki={},Ti=[],Li=0,Oi=0,Ri=function(t){return(ki[t]||Ti).map((function(t){return t()}))},Fi=function(){var t=Date.now(),e=[];t-Li>2&&(Ri("matchMediaInit"),Si.forEach((function(t){var i,n,r,s,o=t.queries,a=t.conditions;for(n in o)(i=b.matchMedia(o[n]).matches)&&(r=1),i!==a[n]&&(a[n]=i,s=1);s&&(t.revert(),r&&e.push(t))})),Ri("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Li=t,Ri("matchMedia"))},Pi=function(){function t(t,e){this.selector=e&&_e(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Oi++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,i){Y(t)&&(i=e,e=t,t=Y);var n=this,r=function(){var t,r=y,s=n.selector;return r&&r!==n&&r.data.push(n),i&&(n.selector=_e(i)),y=n,t=e.apply(n,arguments),Y(t)&&n._r.push(t),y=r,n.selector=s,n.isReverted=!1,t};return n.last=r,t===Y?r(n,(function(t){return n.add(null,t)})):t?n[t]=r:r},e.ignore=function(t){var e=y;y=null,t(this),y=e},e.getTweens=function(){var e=[];return this.data.forEach((function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof ui&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var i=this;if(t?function(){for(var e,n=i.getTweens(),r=i.data.length;r--;)"isFlip"===(e=i.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=i.data.length;r--;)(e=i.data[r])instanceof ei?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof ui)&&e.revert&&e.revert(t);i._r.forEach((function(e){return e(t,i)})),i.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Si.length;n--;)Si[n].id===this.id&&Si.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),Di=function(){function t(t){this.contexts=[],this.scope=t,y&&y.data.push(this)}var e=t.prototype;return e.add=function(t,e,i){U(t)||(t={matches:t});var n,r,s,o=new Pi(0,i||this.scope),a=o.conditions={};for(r in y&&!o.selector&&(o.selector=y.selector),this.contexts.push(o),e=o.add("onMatch",e),o.queries=t,t)"all"===r?s=1:(n=b.matchMedia(t[r]))&&(Si.indexOf(o)<0&&Si.push(o),(a[r]=n.matches)&&(s=1),n.addListener?n.addListener(Fi):n.addEventListener("change",Fi));return s&&e(o,(function(t){return o.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Bi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Le(t)}))},timeline:function(t){return new ei(t)},getTweensOf:function(t,e){return w.getTweensOf(t,e)},getProperty:function(t,e,i,n){W(t)&&(t=fe(t)[0]);var r=Et(t||{}).get,s=i?Bt:Dt;return"native"===i&&(i=""),t?e?s((wt[e]&&wt[e].get||r)(t,e,i,n)):function(e,i,n){return s((wt[e]&&wt[e].get||r)(t,e,i,n))}:t},quickSetter:function(t,e,i){if((t=fe(t)).length>1){var n=t.map((function(t){return Ii.quickSetter(t,e,i)})),r=n.length;return function(t){for(var e=r;e--;)n[e](t)}}t=t[0]||{};var s=wt[e],o=Et(t),a=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(e){var n=new s;E._pt=0,n.init(t,i?e+i:e,E,0,[t]),n.render(1,n),E._pt&&bi(1,E)}:o.set(t,a);return s?h:function(e){return h(t,a,i?e+i:e,o,1)}},quickTo:function(t,e,i){var n,r=Ii.to(t,Gt(((n={})[e]="+=0.1",n.paused=!0,n),i||{})),s=function(t,i,n){return r.resetTo(e,t,i,n)};return s.tween=r,s},isTweening:function(t){return w.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Ue(t.ease,D.ease)),It(D,t||{})},config:function(t){return It(P,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,n=t.plugins,r=t.defaults,s=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!wt[t]&&!at[t]&&dt(e+" effect requires "+t+" plugin.")})),bt[e]=function(t,e,n){return i(fe(t),zt(e||{},r),n)},s&&(ei.prototype[e]=function(t,i,n){return this.add(bt[e](t,U(i)?i:(n=i)&&{},this),n)})},registerEase:function(t,e){Ve[t]=Ue(e)},parseEase:function(t,e){return arguments.length?Ue(t,e):Ve},getById:function(t){return w.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,n,r=new ei(t);for(r.smoothChildTiming=q(t.smoothChildTiming),w.remove(r),r._dp=0,r._time=r._tTime=w._time,i=w._first;i;)n=i._next,!e&&!i._dur&&i instanceof ui&&i.vars.onComplete===i._targets[0]||te(r,i,i._start-i._delay),i=n;return te(w,r,0),r},context:function(t,e){return t?new Pi(t,e):y},matchMedia:function(t){return new Di(t)},matchMediaRefresh:function(){return Si.forEach((function(t){var e,i,n=t.conditions;for(i in n)n[i]&&(n[i]=!1,e=1);e&&t.revert()}))||Fi()},addEventListener:function(t,e){var i=ki[t]||(ki[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=ki[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},utils:{wrap:function t(e,i,n){var r=i-e;return K(e)?xe(e,t(0,e.length),i):ce(n,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,i,n){var r=i-e,s=2*r;return K(e)?xe(e,t(0,e.length-1),i):ce(n,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:ye,random:Ae,snap:be,normalize:function(t,e,i){return Ce(t,e,0,1,i)},getUnit:ue,clamp:function(t,e,i){return ce(i,(function(i){return de(t,e,i)}))},splitColor:Pe,toArray:fe,selector:_e,mapRange:Ce,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||ue(i))}},interpolate:function t(e,i,n,r){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var o,a,h,l,c,d=W(e),u={};if(!0===n&&(r=1)&&(n=null),d)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(h=[],l=e.length,c=l-2,a=1;a<l;a++)h.push(t(e[a-1],e[a]));l--,s=function(t){t*=l;var e=Math.min(c,~~t);return h[e](t-e)},n=i}else r||(e=Gt(K(e)?[]:{},e));if(!h){for(o in i)si.call(u,e,o,"get",i[o]);s=function(t){return bi(t,u)||(d?e.p:e)}}}return ce(n,s)},shuffle:ve},install:lt,effects:bt,ticker:He,updateRoot:ei.updateRoot,plugins:wt,globalTimeline:w,core:{PropTween:Ei,globals:ut,Tween:ui,Timeline:ei,Animation:ti,getCache:Et,_removeLinkedListItem:jt,reverting:function(){return v},context:function(t){return t&&y&&(y.data.push(t),t._ctx=y),y},suppressOverwrites:function(t){return _=t}}};kt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Bi[t]=ui[t]})),He.add(ei.updateRoot),E=Bi.to({},{duration:0});var zi=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},Gi=function(t,e){return{name:t,rawVars:1,init:function(t,i,n){n._onInit=function(t){var n,r;if(W(i)&&(n={},kt(i,(function(t){return n[t]=1})),i=n),e){for(r in n={},i)n[r]=e(i[r]);i=n}!function(t,e){var i,n,r,s=t._targets;for(i in e)for(n=s.length;n--;)(r=t._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=zi(r,i)),r&&r.modifier&&r.modifier(e[i],t,s[n],i))}(t,i)}}}},Ii=Bi.registerPlugin({name:"attr",init:function(t,e,i,n,r){var s,o,a;for(s in this.tween=i,e)a=t.getAttribute(s)||"",(o=this.add(t,"setAttribute",(a||0)+"",e[s],n,r,0,0,s)).op=s,o.b=a,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)v?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},Gi("roundProps",we),Gi("modifiers"),Gi("snap",be))||Bi;ui.version=ei.version=Ii.version="3.12.5",M=1,J()&&Ne(),Ve.Power0,Ve.Power1,Ve.Power2,Ve.Power3,Ve.Power4,Ve.Linear,Ve.Quad,Ve.Cubic,Ve.Quart,Ve.Quint,Ve.Strong,Ve.Elastic,Ve.Back,Ve.SteppedEase,Ve.Bounce,Ve.Sine,Ve.Expo,Ve.Circ;var Hi,Ni,Vi,ji,Wi,Yi,$i,Xi,Ui={},qi=180/Math.PI,Ji=Math.PI/180,Qi=Math.atan2,Zi=/([A-Z])/g,Ki=/(left|right|width|margin|padding|x)/i,tn=/[\s,\(]\S/,en={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},nn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},rn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},sn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},on=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},an=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},hn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},ln=function(t,e,i){return t.style[e]=i},cn=function(t,e,i){return t.style.setProperty(e,i)},dn=function(t,e,i){return t._gsap[e]=i},un=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},pn=function(t,e,i,n,r){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},mn=function(t,e,i,n,r){var s=t._gsap;s[e]=i,s.renderTransform(r,s)},gn="transform",fn=gn+"Origin",_n=function t(e,i){var n=this,r=this.target,s=r.style,o=r._gsap;if(e in Ui&&s){if(this.tfm=this.tfm||{},"transform"===e)return en.transform.split(",").forEach((function(e){return t.call(n,e,i)}));if(~(e=en[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=Dn(r,t)})):this.tfm[e]=o.x?o[e]:Dn(r,e),e===fn&&(this.tfm.zOrigin=o.zOrigin),this.props.indexOf(gn)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(fn,i,"")),e=gn}(s||i)&&this.props.push(e,i,s[e])},vn=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},yn=function(){var t,e,i=this.props,n=this.target,r=n.style,s=n._gsap;for(t=0;t<i.length;t+=3)i[t+1]?n[i[t]]=i[t+2]:i[t+2]?r[i[t]]=i[t+2]:r.removeProperty("--"===i[t].substr(0,2)?i[t]:i[t].replace(Zi,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=$i())&&t.isStart||r[gn]||(vn(r),s.zOrigin&&r[fn]&&(r[fn]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},wn=function(t,e){var i={target:t,props:[],revert:yn,save:_n};return t._gsap||Ii.core.getCache(t),e&&e.split(",").forEach((function(t){return i.save(t)})),i},bn=function(t,e){var i=Ni.createElementNS?Ni.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Ni.createElement(t);return i&&i.style?i:Ni.createElement(t)},An=function t(e,i,n){var r=getComputedStyle(e);return r[i]||r.getPropertyValue(i.replace(Zi,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&t(e,Mn(i)||i,1)||""},xn="O,Moz,ms,Ms,Webkit".split(","),Mn=function(t,e,i){var n=(e||Wi).style,r=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(xn[r]+t in n););return r<0?null:(3===r?"ms":r>=0?xn[r]:"")+t},Cn=function(){"undefined"!=typeof window&&window.document&&(Hi=window,Ni=Hi.document,Vi=Ni.documentElement,Wi=bn("div")||{style:{}},bn("div"),gn=Mn(gn),fn=gn+"Origin",Wi.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Xi=!!Mn("perspective"),$i=Ii.core.reverting,ji=1)},En=function t(e){var i,n=bn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,o=this.style.cssText;if(Vi.appendChild(n),n.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),Vi.removeChild(n),this.style.cssText=o,i},Sn=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},kn=function(t){var e;try{e=t.getBBox()}catch(i){e=En.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===En||(e=En.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+Sn(t,["x","cx","x1"])||0,y:+Sn(t,["y","cy","y1"])||0,width:0,height:0}},Tn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!kn(t))},Ln=function(t,e){if(e){var i,n=t.style;e in Ui&&e!==fn&&(e=gn),n.removeProperty?("ms"!==(i=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===i?e:e.replace(Zi,"-$1").toLowerCase())):n.removeAttribute(e)}},On=function(t,e,i,n,r,s){var o=new Ei(t._pt,e,i,0,1,s?hn:an);return t._pt=o,o.b=n,o.e=r,t._props.push(i),o},Rn={deg:1,rad:1,turn:1},Fn={grid:1,flex:1},Pn=function t(e,i,n,r){var s,o,a,h,l=parseFloat(n)||0,c=(n+"").trim().substr((l+"").length)||"px",d=Wi.style,u=Ki.test(i),p="svg"===e.tagName.toLowerCase(),m=(p?"client":"offset")+(u?"Width":"Height"),g=100,f="px"===r,_="%"===r;if(r===c||!l||Rn[r]||Rn[c])return l;if("px"!==c&&!f&&(l=t(e,i,n,"px")),h=e.getCTM&&Tn(e),(_||"%"===c)&&(Ui[i]||~i.indexOf("adius")))return s=h?e.getBBox()[u?"width":"height"]:e[m],Tt(_?l/s*g:l/100*s);if(d[u?"width":"height"]=g+(f?c:r),o=~i.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,h&&(o=(e.ownerSVGElement||{}).parentNode),o&&o!==Ni&&o.appendChild||(o=Ni.body),(a=o._gsap)&&_&&a.width&&u&&a.time===He.time&&!a.uncache)return Tt(l/a.width*g);if(!_||"height"!==i&&"width"!==i)(_||"%"===c)&&!Fn[An(o,"display")]&&(d.position=An(e,"position")),o===e&&(d.position="static"),o.appendChild(Wi),s=Wi[m],o.removeChild(Wi),d.position="absolute";else{var v=e.style[i];e.style[i]=g+r,s=e[m],v?e.style[i]=v:Ln(e,i)}return u&&_&&((a=Et(o)).time=He.time,a.width=o[m]),Tt(f?s*l/g:s&&l?g/s*l:0)},Dn=function(t,e,i,n){var r;return ji||Cn(),e in en&&"transform"!==e&&~(e=en[e]).indexOf(",")&&(e=e.split(",")[0]),Ui[e]&&"transform"!==e?(r=$n(t,n),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Xn(An(t,fn))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=In[e]&&In[e](t,e,i)||An(t,e)||St(t,e)||("opacity"===e?1:0)),i&&!~(r+"").trim().indexOf(" ")?Pn(t,e,r,i)+i:r},Bn=function(t,e,i,n){if(!i||"none"===i){var r=Mn(e,t,1),s=r&&An(t,r,1);s&&s!==i?(e=r,i=s):"borderColor"===e&&(i=An(t,"borderTopColor"))}var o,a,h,l,c,d,u,p,m,g,f,_=new Ei(this._pt,t.style,e,0,1,wi),v=0,y=0;if(_.b=i,_.e=n,i+="","auto"===(n+="")&&(d=t.style[e],t.style[e]=n,n=An(t,e)||n,d?t.style[e]=d:Ln(t,e)),Ie(o=[i,n]),n=o[1],h=(i=o[0]).match(it)||[],(n.match(it)||[]).length){for(;a=it.exec(n);)u=a[0],m=n.substring(v,a.index),c?c=(c+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(c=1),u!==(d=h[y++]||"")&&(l=parseFloat(d)||0,f=d.substr((l+"").length),"="===u.charAt(1)&&(u=Ot(l,u)+f),p=parseFloat(u),g=u.substr((p+"").length),v=it.lastIndex-g.length,g||(g=g||P.units[e]||f,v===n.length&&(n+=g,_.e+=g)),f!==g&&(l=Pn(t,e,d,g)||0),_._pt={_next:_._pt,p:m||1===y?m:",",s:l,c:p-l,m:c&&c<4||"zIndex"===e?Math.round:0});_.c=v<n.length?n.substring(v,n.length):""}else _.r="display"===e&&"none"===n?hn:an;return rt.test(n)&&(_.e=0),this._pt=_,_},zn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Gn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,n,r,s=e.t,o=s.style,a=e.u,h=s._gsap;if("all"===a||!0===a)o.cssText="",n=1;else for(r=(a=a.split(",")).length;--r>-1;)i=a[r],Ui[i]&&(n=1,i="transformOrigin"===i?fn:gn),Ln(s,i);n&&(Ln(s,gn),h&&(h.svg&&s.removeAttribute("transform"),$n(s,1),h.uncache=1,vn(o)))}},In={clearProps:function(t,e,i,n,r){if("isFromStart"!==r.data){var s=t._pt=new Ei(t._pt,e,i,0,0,Gn);return s.u=n,s.pr=-10,s.tween=r,t._props.push(i),1}}},Hn=[1,0,0,1,0,0],Nn={},Vn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},jn=function(t){var e=An(t,gn);return Vn(e)?Hn:e.substr(7).match(et).map(Tt)},Wn=function(t,e){var i,n,r,s,o=t._gsap||Et(t),a=t.style,h=jn(t);return o.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Hn:h:(h!==Hn||t.offsetParent||t===Vi||o.svg||(r=a.display,a.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,n=t.nextElementSibling,Vi.appendChild(t)),h=jn(t),r?a.display=r:Ln(t,"display"),s&&(n?i.insertBefore(t,n):i?i.appendChild(t):Vi.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Yn=function(t,e,i,n,r,s){var o,a,h,l=t._gsap,c=r||Wn(t,!0),d=l.xOrigin||0,u=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=c[0],f=c[1],_=c[2],v=c[3],y=c[4],w=c[5],b=e.split(" "),A=parseFloat(b[0])||0,x=parseFloat(b[1])||0;i?c!==Hn&&(a=g*v-f*_)&&(h=A*(-f/a)+x*(g/a)-(g*w-f*y)/a,A=A*(v/a)+x*(-_/a)+(_*w-v*y)/a,x=h):(A=(o=kn(t)).x+(~b[0].indexOf("%")?A/100*o.width:A),x=o.y+(~(b[1]||b[0]).indexOf("%")?x/100*o.height:x)),n||!1!==n&&l.smooth?(y=A-d,w=x-u,l.xOffset=p+(y*g+w*_)-y,l.yOffset=m+(y*f+w*v)-w):l.xOffset=l.yOffset=0,l.xOrigin=A,l.yOrigin=x,l.smooth=!!n,l.origin=e,l.originIsAbsolute=!!i,t.style[fn]="0px 0px",s&&(On(s,l,"xOrigin",d,A),On(s,l,"yOrigin",u,x),On(s,l,"xOffset",p,l.xOffset),On(s,l,"yOffset",m,l.yOffset)),t.setAttribute("data-svg-origin",A+" "+x)},$n=function(t,e){var i=t._gsap||new Ke(t);if("x"in i&&!e&&!i.uncache)return i;var n,r,s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,w,b,A,x,M,C,E,S,k,T,L,O,R,F,D,B=t.style,z=i.scaleX<0,G="px",I="deg",H=getComputedStyle(t),N=An(t,fn)||"0";return n=r=s=h=l=c=d=u=p=0,o=a=1,i.svg=!(!t.getCTM||!Tn(t)),H.translate&&("none"===H.translate&&"none"===H.scale&&"none"===H.rotate||(B[gn]=("none"!==H.translate?"translate3d("+(H.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==H.rotate?"rotate("+H.rotate+") ":"")+("none"!==H.scale?"scale("+H.scale.split(" ").join(",")+") ":"")+("none"!==H[gn]?H[gn]:"")),B.scale=B.rotate=B.translate="none"),f=Wn(t,i.svg),i.svg&&(i.uncache?(S=t.getBBox(),N=i.xOrigin-S.x+"px "+(i.yOrigin-S.y)+"px",E=""):E=!e&&t.getAttribute("data-svg-origin"),Yn(t,E||N,!!E||i.originIsAbsolute,!1!==i.smooth,f)),m=i.xOrigin||0,g=i.yOrigin||0,f!==Hn&&(w=f[0],b=f[1],A=f[2],x=f[3],n=M=f[4],r=C=f[5],6===f.length?(o=Math.sqrt(w*w+b*b),a=Math.sqrt(x*x+A*A),h=w||b?Qi(b,w)*qi:0,(d=A||x?Qi(A,x)*qi+h:0)&&(a*=Math.abs(Math.cos(d*Ji))),i.svg&&(n-=m-(m*w+g*A),r-=g-(m*b+g*x))):(D=f[6],R=f[7],T=f[8],L=f[9],O=f[10],F=f[11],n=f[12],r=f[13],s=f[14],l=(_=Qi(D,O))*qi,_&&(E=M*(v=Math.cos(-_))+T*(y=Math.sin(-_)),S=C*v+L*y,k=D*v+O*y,T=M*-y+T*v,L=C*-y+L*v,O=D*-y+O*v,F=R*-y+F*v,M=E,C=S,D=k),c=(_=Qi(-A,O))*qi,_&&(v=Math.cos(-_),F=x*(y=Math.sin(-_))+F*v,w=E=w*v-T*y,b=S=b*v-L*y,A=k=A*v-O*y),h=(_=Qi(b,w))*qi,_&&(E=w*(v=Math.cos(_))+b*(y=Math.sin(_)),S=M*v+C*y,b=b*v-w*y,C=C*v-M*y,w=E,M=S),l&&Math.abs(l)+Math.abs(h)>359.9&&(l=h=0,c=180-c),o=Tt(Math.sqrt(w*w+b*b+A*A)),a=Tt(Math.sqrt(C*C+D*D)),_=Qi(M,C),d=Math.abs(_)>2e-4?_*qi:0,p=F?1/(F<0?-F:F):0),i.svg&&(E=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Vn(An(t,gn)),E&&t.setAttribute("transform",E))),Math.abs(d)>90&&Math.abs(d)<270&&(z?(o*=-1,d+=h<=0?180:-180,h+=h<=0?180:-180):(a*=-1,d+=d<=0?180:-180)),e=e||i.uncache,i.x=n-((i.xPercent=n&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+G,i.y=r-((i.yPercent=r&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+G,i.z=s+G,i.scaleX=Tt(o),i.scaleY=Tt(a),i.rotation=Tt(h)+I,i.rotationX=Tt(l)+I,i.rotationY=Tt(c)+I,i.skewX=d+I,i.skewY=u+I,i.transformPerspective=p+G,(i.zOrigin=parseFloat(N.split(" ")[2])||!e&&i.zOrigin||0)&&(B[fn]=Xn(N)),i.xOffset=i.yOffset=0,i.force3D=P.force3D,i.renderTransform=i.svg?tr:Xi?Kn:qn,i.uncache=0,i},Xn=function(t){return(t=t.split(" "))[0]+" "+t[1]},Un=function(t,e,i){var n=ue(e);return Tt(parseFloat(e)+parseFloat(Pn(t,"x",i+"px",n)))+n},qn=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Kn(t,e)},Jn="0deg",Qn="0px",Zn=") ",Kn=function(t,e){var i=e||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,a=i.z,h=i.rotation,l=i.rotationY,c=i.rotationX,d=i.skewX,u=i.skewY,p=i.scaleX,m=i.scaleY,g=i.transformPerspective,f=i.force3D,_=i.target,v=i.zOrigin,y="",w="auto"===f&&t&&1!==t||!0===f;if(v&&(c!==Jn||l!==Jn)){var b,A=parseFloat(l)*Ji,x=Math.sin(A),M=Math.cos(A);A=parseFloat(c)*Ji,b=Math.cos(A),s=Un(_,s,x*b*-v),o=Un(_,o,-Math.sin(A)*-v),a=Un(_,a,M*b*-v+v)}g!==Qn&&(y+="perspective("+g+Zn),(n||r)&&(y+="translate("+n+"%, "+r+"%) "),(w||s!==Qn||o!==Qn||a!==Qn)&&(y+=a!==Qn||w?"translate3d("+s+", "+o+", "+a+") ":"translate("+s+", "+o+Zn),h!==Jn&&(y+="rotate("+h+Zn),l!==Jn&&(y+="rotateY("+l+Zn),c!==Jn&&(y+="rotateX("+c+Zn),d===Jn&&u===Jn||(y+="skew("+d+", "+u+Zn),1===p&&1===m||(y+="scale("+p+", "+m+Zn),_.style[gn]=y||"translate(0, 0)"},tr=function(t,e){var i,n,r,s,o,a=e||this,h=a.xPercent,l=a.yPercent,c=a.x,d=a.y,u=a.rotation,p=a.skewX,m=a.skewY,g=a.scaleX,f=a.scaleY,_=a.target,v=a.xOrigin,y=a.yOrigin,w=a.xOffset,b=a.yOffset,A=a.forceCSS,x=parseFloat(c),M=parseFloat(d);u=parseFloat(u),p=parseFloat(p),(m=parseFloat(m))&&(p+=m=parseFloat(m),u+=m),u||p?(u*=Ji,p*=Ji,i=Math.cos(u)*g,n=Math.sin(u)*g,r=Math.sin(u-p)*-f,s=Math.cos(u-p)*f,p&&(m*=Ji,o=Math.tan(p-m),r*=o=Math.sqrt(1+o*o),s*=o,m&&(o=Math.tan(m),i*=o=Math.sqrt(1+o*o),n*=o)),i=Tt(i),n=Tt(n),r=Tt(r),s=Tt(s)):(i=g,s=f,n=r=0),(x&&!~(c+"").indexOf("px")||M&&!~(d+"").indexOf("px"))&&(x=Pn(_,"x",c,"px"),M=Pn(_,"y",d,"px")),(v||y||w||b)&&(x=Tt(x+v-(v*i+y*r)+w),M=Tt(M+y-(v*n+y*s)+b)),(h||l)&&(o=_.getBBox(),x=Tt(x+h/100*o.width),M=Tt(M+l/100*o.height)),o="matrix("+i+","+n+","+r+","+s+","+x+","+M+")",_.setAttribute("transform",o),A&&(_.style[gn]=o)},er=function(t,e,i,n,r){var s,o,a=360,h=W(r),l=parseFloat(r)*(h&&~r.indexOf("rad")?qi:1)-n,c=n+l+"deg";return h&&("short"===(s=r.split("_")[1])&&(l%=a)!==l%180&&(l+=l<0?a:-360),"cw"===s&&l<0?l=(l+36e9)%a-~~(l/a)*a:"ccw"===s&&l>0&&(l=(l-36e9)%a-~~(l/a)*a)),t._pt=o=new Ei(t._pt,e,i,n,l,rn),o.e=c,o.u="deg",t._props.push(i),o},ir=function(t,e){for(var i in e)t[i]=e[i];return t},nr=function(t,e,i){var n,r,s,o,a,h,l,c=ir({},i._gsap),d=i.style;for(r in c.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),d[gn]=e,n=$n(i,1),Ln(i,gn),i.setAttribute("transform",s)):(s=getComputedStyle(i)[gn],d[gn]=e,n=$n(i,1),d[gn]=s),Ui)(s=c[r])!==(o=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(a=ue(s)!==(l=ue(o))?Pn(i,r,s,l):parseFloat(s),h=parseFloat(o),t._pt=new Ei(t._pt,n,r,a,h-a,nn),t._pt.u=l||0,t._props.push(r));ir(n,c)};kt("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",r="Bottom",s="Left",o=(e<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return e<2?t+i:"border"+i+t}));In[e>1?"border"+t:t]=function(t,e,i,n,r){var s,a;if(arguments.length<4)return s=o.map((function(e){return Dn(t,e,i)})),5===(a=s.join(" ")).split(s[0]).length?s[0]:a;s=(n+"").split(" "),a={},o.forEach((function(t,e){return a[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,a,r)}}));var rr,sr,or,ar={name:"css",register:Cn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,n,r){var s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,w,b,A,x,M,C=this._props,E=t.style,S=i.vars.startAt;for(d in ji||Cn(),this.styles=this.styles||wn(t),w=this.styles.props,this.tween=i,e)if("autoRound"!==d&&(o=e[d],!wt[d]||!oi(d,e,i,n,t,r)))if(l=typeof o,c=In[d],"function"===l&&(l=typeof(o=o.call(i,n,t,r))),"string"===l&&~o.indexOf("random(")&&(o=Me(o)),c)c(this,t,d,o,i)&&(y=1);else if("--"===d.substr(0,2))s=(getComputedStyle(t).getPropertyValue(d)+"").trim(),o+="",ze.lastIndex=0,ze.test(s)||(u=ue(s),p=ue(o)),p?u!==p&&(s=Pn(t,d,s,p)+p):u&&(o+=u),this.add(E,"setProperty",s,o,n,r,0,0,d),C.push(d),w.push(d,0,E[d]);else if("undefined"!==l){if(S&&d in S?(s="function"==typeof S[d]?S[d].call(i,n,t,r):S[d],W(s)&&~s.indexOf("random(")&&(s=Me(s)),ue(s+"")||"auto"===s||(s+=P.units[d]||ue(Dn(t,d))||""),"="===(s+"").charAt(1)&&(s=Dn(t,d))):s=Dn(t,d),h=parseFloat(s),(m="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),a=parseFloat(o),d in en&&("autoAlpha"===d&&(1===h&&"hidden"===Dn(t,"visibility")&&a&&(h=0),w.push("visibility",0,E.visibility),On(this,E,"visibility",h?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==d&&"transform"!==d&&~(d=en[d]).indexOf(",")&&(d=d.split(",")[0])),g=d in Ui)if(this.styles.save(d),f||((_=t._gsap).renderTransform&&!e.parseTransform||$n(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(f=this._pt=new Ei(this._pt,E,gn,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===d)this._pt=new Ei(this._pt,_,"scaleY",_.scaleY,(m?Ot(_.scaleY,m+a):a)-_.scaleY||0,nn),this._pt.u=0,C.push("scaleY",d),d+="X";else{if("transformOrigin"===d){w.push(fn,0,E[fn]),A=void 0,x=void 0,M=void 0,A=(b=o).split(" "),x=A[0],M=A[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==M&&"right"!==M||(b=x,x=M,M=b),A[0]=zn[x]||x,A[1]=zn[M]||M,o=A.join(" "),_.svg?Yn(t,o,0,v,0,this):((p=parseFloat(o.split(" ")[2])||0)!==_.zOrigin&&On(this,_,"zOrigin",_.zOrigin,p),On(this,E,d,Xn(s),Xn(o)));continue}if("svgOrigin"===d){Yn(t,o,1,v,0,this);continue}if(d in Nn){er(this,_,d,h,m?Ot(h,m+o):o);continue}if("smoothOrigin"===d){On(this,_,"smooth",_.smooth,o);continue}if("force3D"===d){_[d]=o;continue}if("transform"===d){nr(this,o,t);continue}}else d in E||(d=Mn(d)||d);if(g||(a||0===a)&&(h||0===h)&&!tn.test(o)&&d in E)a||(a=0),(u=(s+"").substr((h+"").length))!==(p=ue(o)||(d in P.units?P.units[d]:u))&&(h=Pn(t,d,s,p)),this._pt=new Ei(this._pt,g?_:E,d,h,(m?Ot(h,m+a):a)-h,g||"px"!==p&&"zIndex"!==d||!1===e.autoRound?nn:on),this._pt.u=p||0,u!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=sn);else if(d in E)Bn.call(this,t,d,s,m?m+o:o);else if(d in t)this.add(t,d,s||t[d],m?m+o:o,n,r);else if("parseTransform"!==d){ct(d,o);continue}g||(d in E?w.push(d,0,E[d]):w.push(d,1,s||t[d])),C.push(d)}y&&Ci(this)},render:function(t,e){if(e.tween._time||!$i())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:Dn,aliases:en,getSetter:function(t,e,i){var n=en[e];return n&&n.indexOf(",")<0&&(e=n),e in Ui&&e!==fn&&(t._gsap.x||Dn(t,"x"))?i&&Yi===i?"scale"===e?un:dn:(Yi=i||{})&&("scale"===e?pn:mn):t.style&&!X(t.style[e])?ln:~e.indexOf("-")?cn:_i(t,e)},core:{_removeProperty:Ln,_getMatrix:Wn}};Ii.utils.checkPrefix=Mn,Ii.core.getStyleSaver=wn,or=kt((rr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(sr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Ui[t]=1})),kt(sr,(function(t){P.units[t]="deg",Nn[t]=1})),en[or[13]]=rr+","+sr,kt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");en[e[1]]=or[e[0]]})),kt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){P.units[t]="px"})),Ii.registerPlugin(ar);var hr=Ii.registerPlugin(ar)||Ii;hr.core.Tween;class lr{constructor(t,e,i,n,r="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),lr.nextNameID=lr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++lr.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(t=>t.stopPropagation())),this.domElement.addEventListener("keyup",(t=>t.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class cr extends lr{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function dr(t){let e,i;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!i&&"#"+i}const ur={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:dr,toHexString:dr},pr={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},mr={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,e,i=1){const n=pr.fromHexString(t);e[0]=(n>>16&255)/255*i,e[1]=(n>>8&255)/255*i,e[2]=(255&n)/255*i},toHexString:([t,e,i],n=1)=>pr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},gr={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,e,i=1){const n=pr.fromHexString(t);e.r=(n>>16&255)/255*i,e.g=(n>>8&255)/255*i,e.b=(255&n)/255*i},toHexString:({r:t,g:e,b:i},n=1)=>pr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},fr=[ur,pr,mr,gr];class _r extends lr{constructor(t,e,i,n){var r;super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,fr.find((t=>t.match(r)))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const t=dr(this.$text.value);t&&this._setValueFromHexString(t)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class vr extends lr{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class yr extends lr{constructor(t,e,i,n,r,s){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(r);const o=void 0!==s;this.step(o?s:this._getImplicitStep(),o),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const e=parseFloat(this.$input.value);isNaN(e)||(this._snapClampSetValue(e+t),this.$input.value=this.getValue())};let e,i,n,r,s,o=!1;const a=t=>{if(o){const n=t.clientX-e,r=t.clientY-i;Math.abs(r)>5?(t.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>5&&h()}if(!o){const e=t.clientY-n;s-=e*this._step*this._arrowKeyMultiplier(t),r+s>this._max?s=this._max-r:r+s<this._min&&(s=this._min-r),this._snapClampSetValue(r+s)}n=t.clientY},h=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",h)};this.$input.addEventListener("input",(()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.key&&this.$input.blur(),"ArrowUp"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e))),"ArrowDown"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e)*-1))})),this.$input.addEventListener("wheel",(e=>{this._inputFocused&&(e.preventDefault(),t(this._step*this._normalizeMouseWheel(e)))}),{passive:!1}),this.$input.addEventListener("mousedown",(t=>{e=t.clientX,i=n=t.clientY,o=!0,r=this.getValue(),s=0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",h)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const e=this.$slider.getBoundingClientRect();let i=((t,e,i,n,r)=>(t-e)/(i-e)*(r-n)+n)(t,e.left,e.right,this._min,this._max);this._snapClampSetValue(i)},e=e=>{t(e.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};let n,r,s=!1;const o=e=>{e.preventDefault(),this._setDraggingStyle(!0),t(e.touches[0].clientX),s=!1},a=e=>{if(s){const t=e.touches[0].clientX-n,i=e.touches[0].clientY-r;Math.abs(t)>Math.abs(i)?o(e):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h))}else e.preventDefault(),t(e.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h)},l=this._callOnFinishChange.bind(this);let c;this.$slider.addEventListener("mousedown",(n=>{this._setDraggingStyle(!0),t(n.clientX),window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)})),this.$slider.addEventListener("touchstart",(t=>{t.touches.length>1||(this._hasScrollBar?(n=t.touches[0].clientX,r=t.touches[0].clientY,s=!0):o(t),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",h))}),{passive:!1}),this.$slider.addEventListener("wheel",(t=>{if(Math.abs(t.deltaX)<Math.abs(t.deltaY)&&this._hasScrollBar)return;t.preventDefault();const e=this._normalizeMouseWheel(t)*this._step;this._snapClampSetValue(this.getValue()+e),this.$input.value=this.getValue(),clearTimeout(c),c=setTimeout(l,400)}),{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10);return e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class wr extends lr{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((t=>{const e=document.createElement("option");e.textContent=t,this.$select.appendChild(e)})),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}class br extends lr{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let Ar=!1;class xr{constructor({parent:t,autoPlace:e=void 0===t,container:i,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:o=!0,touchStyles:a=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!Ar&&o&&(!function(t){const e=document.createElement("style");e.innerHTML=t;const i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),Ar=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,e,i,n,r){if(Object(i)===i)return new wr(this,t,e,i);const s=t[e];switch(typeof s){case"number":return new yr(this,t,e,i,n,r);case"boolean":return new cr(this,t,e);case"string":return new br(this,t,e);case"function":return new vr(this,t,e)}console.error("gui.add failed\n\tproperty:",e,"\n\tobject:",t,"\n\tvalue:",s)}addColor(t,e,i=1){return new _r(this,t,e,i)}addFolder(t){const e=new xr({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach((e=>{e instanceof vr||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((e=>{e._title in t.folders&&e.load(t.folders[e._title])})),this}save(t=!0){const e={controllers:{},folders:{}};return this.controllers.forEach((t=>{if(!(t instanceof vr)){if(t._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((t=>{if(t._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);e.folders[t._title]=t.save()})),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");const i=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame((()=>{this.$children.style.height=n+"px"}))})),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach((t=>t.reset())),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((t=>t.destroy()))}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach((e=>{t=t.concat(e.controllersRecursive())})),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach((e=>{t=t.concat(e.foldersRecursive())})),t}}var Mr,Cr={exports:{}};Cr.exports=(Mr=function(){function t(t){return n.appendChild(t.dom),t}function e(t){for(var e=0;e<n.children.length;e++)n.children[e].style.display=e===t?"block":"none";i=t}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(t){t.preventDefault(),e(++i%n.children.length)}),!1);var r=(performance||Date).now(),s=r,o=0,a=t(new Mr.Panel("FPS","#0ff","#002")),h=t(new Mr.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=t(new Mr.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){r=(performance||Date).now()},end:function(){o++;var t=(performance||Date).now();if(h.update(t-r,200),t>s+1e3&&(a.update(1e3*o/(t-s),100),s=t,o=0,l)){var e=performance.memory;l.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function(){r=this.end()},domElement:n,setMode:e}},Mr.Panel=function(t,e,i){var n=1/0,r=0,s=Math.round,o=s(window.devicePixelRatio||1),a=80*o,h=48*o,l=3*o,c=2*o,d=3*o,u=15*o,p=74*o,m=30*o,g=document.createElement("canvas");g.width=a,g.height=h,g.style.cssText="width:80px;height:48px";var f=g.getContext("2d");return f.font="bold "+9*o+"px Helvetica,Arial,sans-serif",f.textBaseline="top",f.fillStyle=i,f.fillRect(0,0,a,h),f.fillStyle=e,f.fillText(t,l,c),f.fillRect(d,u,p,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d,u,p,m),{dom:g,update:function(h,_){n=Math.min(n,h),r=Math.max(r,h),f.fillStyle=i,f.globalAlpha=1,f.fillRect(0,0,a,u),f.fillStyle=e,f.fillText(s(h)+" "+t+" ("+s(n)+"-"+s(r)+")",l,c),f.drawImage(g,d+o,u,p-o,m,d,u,p-o,m),f.fillRect(d+p-o,u,o,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d+p-o,u,o,s((1-h/_)*m))}}},Mr);var Er=o(Cr.exports);class Sr{gui;scene;mixer;clips=[];gridHelper;helpers=[];stats;orbitControls;flyControls;memoryIntervalId;constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.scene=t,this.mixer=e,this.clips=i,this.orbitControls=n.orbitControls,this.flyControls=n.flyControls,this.gui=new xr({width:300}),this.addSceneFolder(),this.addLightsFolder(),this.addCamerasFolder(),this.addModelsFolder(),this.addAnimationsFolder(),this.addDisplayFolder(),this.addControlsFolder(),this.addPerformanceFolder()}addSceneFolder(){const e=this.gui.addFolder("Scene");e.close();const i={background:this.scene.background?.getHex?.()??0};e.addColor(i,"background").onChange((e=>{this.scene.background=new t.Color(e)})),this.scene.fog instanceof t.Fog&&(e.add(this.scene.fog,"near",.1,50).name("Fog Near"),e.add(this.scene.fog,"far",1,200).name("Fog Far"))}addLightsFolder(){const e=[];if(this.scene.traverse((t=>{t.isLight&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Lights");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(`${e.type} ${e.name||n}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");if(r.add({helper:!1},"helper").onChange((i=>{if(i){let i=null;e instanceof t.PointLight&&(i=new t.PointLightHelper(e)),e instanceof t.SpotLight&&(i=new t.SpotLightHelper(e)),e instanceof t.DirectionalLight&&(i=new t.DirectionalLightHelper(e)),e instanceof t.HemisphereLight&&(i=new t.HemisphereLightHelper(e,5)),i&&(this.scene.add(i),this.helpers.push(i))}else{const t=this.helpers.find((t=>t.light===e));t&&(this.scene.remove(t),this.helpers=this.helpers.filter((e=>e!==t)))}})),"intensity"in e&&r.add(e,"intensity",0,10,.01),"color"in e){const t={color:e.color.getHex()};r.addColor(t,"color").onChange((t=>{e.color.setHex(t)}))}"position"in e&&(r.add(e.position,"x",-50,50,.1),r.add(e.position,"y",-50,50,.1),r.add(e.position,"z",-50,50,.1))}))}addCamerasFolder(){const e=[];if(this.scene.traverse((t=>{t.isCamera&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Cameras");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Camera ${n+1}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.CameraHelper(e);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.CameraHelper&&i.camera===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e instanceof t.PerspectiveCamera&&(r.add(e,"fov",10,100).onChange((()=>e.updateProjectionMatrix())),r.add(e,"near",.1,10).onChange((()=>e.updateProjectionMatrix())),r.add(e,"far",10,2e3).onChange((()=>e.updateProjectionMatrix()))),e instanceof t.OrthographicCamera&&r.add(e,"zoom",.1,10).onChange((()=>e.updateProjectionMatrix()))}))}addModelsFolder(){const e=[];if(this.scene.traverse((t=>{t.isMesh&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Models");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Mesh ${n+1}`);r.close(),r.add(e.position,"x",-10,10,.1),r.add(e.position,"y",-10,10,.1),r.add(e.position,"z",-10,10,.1),r.add(e.rotation,"x",-Math.PI,Math.PI,.01),r.add(e.rotation,"y",-Math.PI,Math.PI,.01),r.add(e.rotation,"z",-Math.PI,Math.PI,.01),r.add(e.scale,"x",.1,10,.1),r.add(e.scale,"y",.1,10,.1),r.add(e.scale,"z",.1,10,.1);if(r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.BoxHelper(e,16711680);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.BoxHelper&&i.object===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e.morphTargetInfluences&&e.morphTargetDictionary){const t=r.addFolder("Morph Targets");Object.keys(e.morphTargetDictionary).forEach((i=>{const n=e.morphTargetDictionary[i];t.add(e.morphTargetInfluences,n,0,1,.01).name(i).listen()}))}}))}addAnimationsFolder(){if(!this.mixer||0===this.clips.length)return;const t=this.gui.addFolder("Animations");t.close();const e={};this.clips.forEach((t=>{e[t.name]=this.mixer.clipAction(t)}));const i={};Object.keys(e).forEach((n=>{i[n]=!1,t.add(i,n).listen().onChange((t=>{t?e[n].reset().play():e[n].stop()}))})),t.add({stopAll:()=>Object.values(e).forEach((t=>t.stop()))},"stopAll").name("Stop All")}addDisplayFolder(){const e=this.gui.addFolder("Display");e.close();const i={autoRotate:!!this.orbitControls&&this.orbitControls.autoRotate,wireframe:!1,grid:!1,skeleton:!1};this.orbitControls&&e.add(i,"autoRotate").onChange((t=>{this.orbitControls.autoRotate=t})),e.add(i,"grid").onChange((e=>{e?(this.gridHelper=new t.GridHelper(50,50),this.scene.add(this.gridHelper),this.helpers.push(this.gridHelper)):this.gridHelper&&(this.scene.remove(this.gridHelper),this.helpers=this.helpers.filter((t=>t!==this.gridHelper)))})),e.add(i,"wireframe").onChange((t=>{this.scene.traverse((e=>{if(e.isMesh){const i=e;Array.isArray(i.material)?i.material.forEach((e=>{"wireframe"in e&&(e.wireframe=t)})):"wireframe"in i.material&&(i.material.wireframe=t)}}))})),e.add(i,"skeleton").onChange((e=>{this.scene.traverse((i=>{if(i.isSkinnedMesh)if(e){const e=new t.SkeletonHelper(i);this.scene.add(e),this.helpers.push(e)}else{const e=this.helpers.find((e=>e instanceof t.SkeletonHelper&&e.root===i));e&&(this.scene.remove(e),this.helpers=this.helpers.filter((t=>t!==e)))}}))}))}addControlsFolder(){const t=this.gui.addFolder("Controls");t.close();const e={orbitControls:!!this.orbitControls,flyControls:!!this.flyControls};t.add(e,"orbitControls").listen().onChange((t=>{this.orbitControls&&(this.orbitControls.enabled=t)})),t.add(e,"flyControls").listen().onChange((t=>{this.flyControls&&(this.flyControls.enabled=t)}))}addPerformanceFolder(){this.stats=new Er,this.stats.showPanel(0),document.body.appendChild(this.stats.dom);const t=this.gui.addFolder("Performance");t.close();const e={fps:"0",memory:"0 MB"},i=t.add(e,"fps").name("FPS").listen(),n=t.add(e,"memory").name("Memory").listen();this.memoryIntervalId=setInterval((()=>{performance.memory&&(e.memory=`${Math.round(performance.memory.usedJSHeapSize/1048576)} MB`)}),1e3),this.update=()=>{this.stats&&this.stats.update(),e.fps=this.stats?this.stats.dom.innerText.split("\n")[0]:"0",i.updateDisplay(),n.updateDisplay()}}update(){this.stats&&this.stats.update()}dispose(){this.memoryIntervalId&&(clearInterval(this.memoryIntervalId),this.memoryIntervalId=void 0),this.gui.destroy(),this.helpers.forEach((t=>this.scene.remove(t))),this.helpers=[],this.stats&&this.stats.dom.parentElement&&document.body.removeChild(this.stats.dom)}exportScene(){return{lights:this.scene.children.filter((t=>t.isLight)).map((t=>t.toJSON())),cameras:this.scene.children.filter((t=>t.isCamera)).map((t=>t.toJSON())),scene:this.scene.toJSON()}}getGUI(){return this.gui}}class kr{config;_container;characterGroup;lightGroup;state;objectLoader=new t.ObjectLoader;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;isNotRender=!1;constructor(t){this.config=t.config,this._container=t.container,this.characterGroup=t.characterGroup,this.lightGroup=t.lightGroup,this.state=t.state}setConfig(t){this.config=t}setContainerRef(t){this._container=t}setGroups(t,e){this.characterGroup=t,this.lightGroup=e}getSnapshot(){return{container:this.container,scene:this.scene,camera:this.camera,renderer:this.renderer,controls:this.controls,width:this.width,height:this.height,isNotRender:this.isNotRender}}init(){if(this.resolveContainer(),!this.container)return;this.container.innerHTML="",this.syncContainerSize();const{scene:e,camera:i}=this.loadScene(this.config.scene);this.scene=e||new t.Scene,this.camera=this.loadCamera()||i||this.createDefaultCamera(),this.renderer=this.createRenderer(),this.setupRenderer(),this.setupGridHelper(),this.initLights(this.config.lights||[])}resolveContainer(){if(!this._container)return this.isNotRender=!0,void(this.container=null);this.isNotRender=!1,this.container="string"==typeof this._container?document.getElementById(this._container):this._container}handleResize(){this.resolveContainer(),this.container&&this.camera&&this.renderer&&(this.syncContainerSize(),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height))}createDefaultCamera(){const e="number"==typeof this.config.camera?.fov?this.config.camera.fov:45;return new t.PerspectiveCamera(e,this.width/this.height,.1,2e3)}createRenderer(){const e=new t.WebGLRenderer({antialias:!0,alpha:!0});return e.outputColorSpace=t.SRGBColorSpace,e.toneMapping=t.ACESFilmicToneMapping,e.toneMappingExposure=1,e}updateLight(){this.lightGroup.children.forEach((t=>{t.target&&(t.target.position.copy(this.characterGroup.position),t.updateMatrixWorld(!0))}))}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.scene&&(this.scene.add(this.lightGroup),t.forEach((t=>{if(t.metadata){const e=this.objectLoader.parse(t);this.lightGroup.add(e)}else this.setLight(t)})))}loadCamera(e){if(!e)return this.createDefaultCamera();if(e.metadata){const i=this.objectLoader.parse(e);return i instanceof t.PerspectiveCamera?i:void console.warn("未找到透视摄像机")}return this.camera||(this.camera=this.createDefaultCamera()),this.setCamera(this.camera,e),this.camera}loadScene(e){if(!e)return{};const i=this.objectLoader.parse(e);let n;return i.traverse((e=>{e instanceof t.PerspectiveCamera&&(n=e)})),{scene:i,camera:n}}degree2Euler(e){return e.map((e=>t.MathUtils.degToRad(e)))}dataToMatrix4(e){const i=[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]],n=new t.Matrix4;return n.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]),n}setLight(e){const i=t=>{this.lightGroup.add(t)};switch(e.type){case"AmbientLight":{const n=e,r=new t.AmbientLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}case"DirectionalLight":{const n=e,r=new t.DirectionalLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position);r.castShadow=n.castShadow??!1,i(r);break}case"SpotLight":{const n=e,r=new t.SpotLight(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);if(r.target=this.characterGroup,n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}n.up&&r.up.set(...n.up),n.shadow&&(r.castShadow=n.castShadow??!0,n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.assign(r.shadow.camera,n.shadow.camera)),i(r);break}case"PointLight":{const n=e,r=new t.PointLight(n.color,n.intensity,n.distance,n.decay);if(r.castShadow=n.castShadow??!1,n.castShadow&&(r.receiveShadow=!0),n.shadow&&(n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.keys(n.shadow.camera).forEach((t=>{r.shadow.camera[t]=n.shadow.camera[t]}))),n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale);i(r);break}case"RectAreaLight":{const n=e,r=new t.RectAreaLight(n.color,n.intensity,n.width,n.height);r.position.set(5,5,0),n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale),i(r);break}case"HemisphereLight":{const n=e,r=new t.HemisphereLight(n.color??n.skyColor,n.groundColor,n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}default:console.warn("未找到光源数据")}}setAngleView(e){var i=this;let{camera:n}=e;if(!this.camera)return;n.matrix&&function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=i.dataToMatrix4(e),s=new t.Vector3,o=new t.Quaternion,a=new t.Vector3;r.decompose(s,o,a),hr.to(i.camera.position,{x:s.x,y:s.y,z:s.z,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),hr.to(i.camera.quaternion,{x:o.x,y:o.y,z:o.z,w:o.w,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),hr.to(i.characterGroup.rotation,{x:0,y:0,z:0,duration:n,ease:"power2.inOut"})}(n.matrix,n.duration)}initOrbitControls(){if(this.config.orbitControls||(this.config.orbitControls={}),this.camera&&this.renderer&&!1!==this.config.orbitControls.useOrbitControl)if(this.controls=new h(this.camera,this.renderer.domElement),this.controls.enableZoom=this.config.orbitControls.enableZoom||!0,this.controls.enablePan=this.config.orbitControls.enablePan||!0,void 0!==this.config.orbitControls.minPolarAngle&&(this.controls.minPolarAngle=this.config.orbitControls.minPolarAngle),void 0!==this.config.orbitControls.maxPolarAngle&&(this.controls.maxPolarAngle=this.config.orbitControls.maxPolarAngle),void 0!==this.config.orbitControls.minAzimuthAngle&&(this.controls.minAzimuthAngle=this.config.orbitControls.minAzimuthAngle),void 0!==this.config.orbitControls.maxAzimuthAngle&&(this.controls.maxAzimuthAngle=this.config.orbitControls.maxAzimuthAngle),this.controls.minDistance=this.config.orbitControls.minDistance||1,this.controls.maxDistance=this.config.orbitControls.maxDistance||10,this.config.orbitControls.target)this.controls.target.fromArray(this.config.orbitControls.target);else{const e=(new t.Box3).setFromObject(this.characterGroup),i=new t.Vector3;e.getCenter(i),this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.controls.target.set(i.x,i.y+.5,i.z)}}setCamera(t,e){if(!t)return void console.warn("camera is null");const{position:i,rotation:n,matrix:r,fov:s}=e;if(this.state.updateCamera=!0,s&&(t.fov=s),r){const e=this.dataToMatrix4(r);t.matrixAutoUpdate=!1,t.matrix.copy(e),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.matrixAutoUpdate=!0}else i&&t.position.set(...i),n&&t.rotation.set(...this.degree2Euler(n));this.state.updateCamera=!1}syncContainerSize(){this.container&&(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight)}setupRenderer(){this.renderer&&this.container&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setClearColor(0,0),this.container.appendChild(this.renderer.domElement))}setupGridHelper(){if(!this.config.gridHelper)return;const{size:e=10,divisions:i=10,color1:n="",color2:r=""}=this.config.gridHelper,s=new t.GridHelper(e,i,n,r);this.characterGroup.add(s)}}class Tr{config;container;characterGroup;state;getAnimationFrameId;constructor(t){this.config=t.config,this.container=t.container,this.characterGroup=t.characterGroup,this.state=t.state,this.getAnimationFrameId=t.getAnimationFrameId}setConfig(t){this.config=t}setContainer(t){this.container=t}setCharacterGroup(t){this.characterGroup=t}registerListeners(){this.container&&this.config.model?.rotate&&!1===this.config.orbitControls?.useOrbitControl&&(this.container.addEventListener("mousedown",this.mousedown),this.container.addEventListener("mouseup",this.mouseup),this.container.addEventListener("mousemove",this.mousemove),this.container.addEventListener("touchstart",this.mousedown),this.container.addEventListener("touchend",this.mouseup),this.container.addEventListener("touchmove",this.mousemove))}removeEventListeners(){this.container&&(this.container.removeEventListener("mousedown",this.mousedown),this.container.removeEventListener("mouseup",this.mouseup),this.container.removeEventListener("mousemove",this.mousemove),this.container.removeEventListener("touchstart",this.mousedown),this.container.removeEventListener("touchend",this.mouseup),this.container.removeEventListener("touchmove",this.mousemove))}mousedown=t=>{this.state.isMouseDown=!0;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY),this.state.previousMousePosition={x:e,y:i}};mouseup=()=>{this.state.isMouseDown=!1,this.state.previousMousePosition={x:0,y:0}};mousemove=t=>{if(!this.state.isMouseDown||!this.getAnimationFrameId())return;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY);const n=e-this.state.previousMousePosition.x,r=i-this.state.previousMousePosition.y;this.characterGroup.rotation.y+=.01*n;const s=this.characterGroup.rotation.x+.01*r;if(r>0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.minPolarAngle&&this.config.orbitControls.minPolarAngle>=0){const t=Math.min(1*this.config.orbitControls.minPolarAngle,Math.PI);Math.PI/2-s>=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.min(s,Math.PI/2);else if(r<0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.maxPolarAngle&&this.config.orbitControls.maxPolarAngle>=0){const t=1*this.config.orbitControls.maxPolarAngle;Math.PI/2-s<=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.max(s,-Math.PI/2);this.state.previousMousePosition={x:e,y:i}}}class Lr{scene=null;camera=null;renderer=null;width=1;height=1;bgScene=null;bgCamera=null;videoElement=null;videoTexture=null;videoMesh=null;setRuntimeRefs(t){let{scene:e,camera:i,renderer:n,width:r,height:s}=t;this.scene=e,this.camera=i,this.renderer=n,this.width=r,this.height=s,this.videoMesh&&this.videoTexture&&this.updateVideoMesh()}renderBackground(){this.bgScene&&this.bgCamera&&this.renderer&&(this.renderer.autoClear=!1,this.renderer.clear(),this.renderer.render(this.bgScene,this.bgCamera))}prepareFrame(){this.videoMesh&&this.updateVideoMesh()}setBackground(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!this.scene)return;(new l).load(e,(e=>{e.mapping=t.EquirectangularReflectionMapping,this.scene&&(this.scene.background=e,this.scene.environment=e)}))}setVideoBackground(e){if(!this.scene||!this.camera)return;const i=document.createElement("video");i.crossOrigin="anonymous",i.src=e,i.loop=!0,i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.play();const n=new t.VideoTexture(i);n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter;const r=new t.PlaneGeometry(1,1),s=new t.MeshBasicMaterial({map:n}),o=new t.Mesh(r,s);this.videoElement=i,this.videoTexture=n,this.videoMesh=o,this.scene.add(o),this.updateVideoMesh()}loadCubeBackground(e){if(0===e.length)return void console.warn("没有传入天空盒图片");if(1===e.length)return void this.loadSingleBackground(e[0]);if(6!==e.length)return void console.error("需要传入6张图片,顺序为:右、左、上、下、前、后");const i=(new t.CubeTextureLoader).load(e);this.scene&&(this.scene.background=i)}updateBackgroundSize(t,e){if(!(this.bgScene&&this.bgCamera&&this.renderer&&t.image))return;this.renderer.setSize(this.width,this.height);const i=t.image.width/t.image.height,n=this.width/this.height,r=e.material;if(n>i){const t=n/i;r.map?.repeat.set(1,1/t),r.map?.offset.set(0,0)}else{const t=i/n;r.map?.repeat.set(1/t,1),r.map?.offset.set((1-1/t)/2,0)}e.scale.set(1,1,1),r.map&&(r.map.needsUpdate=!0)}setBackgroundColorOrGradient(e){this.scene&&(e.startsWith("linear-gradient")?this.setGradientBackground(e):this.scene.background=new t.Color(e))}destroy(){this.videoMesh&&this.scene&&this.scene.remove(this.videoMesh),this.videoMesh?.geometry&&this.videoMesh.geometry.dispose();const t=this.videoMesh?.material;t?.dispose(),this.videoTexture?.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.videoElement=null,this.videoTexture=null,this.videoMesh=null,this.bgScene=null,this.bgCamera=null}loadSingleBackground(e){const i=new t.TextureLoader;this.bgScene=new t.Scene,this.bgCamera=new t.OrthographicCamera(-1,1,1,-1,0,1),i.load(e,(e=>{e.colorSpace=t.SRGBColorSpace;const i=new t.MeshBasicMaterial({map:e,depthTest:!1,depthWrite:!1,transparent:!1,side:t.DoubleSide}),n=new t.Mesh(new t.PlaneGeometry(2,2),i);this.bgScene.add(n),this.updateBackgroundSize(e,n)}))}setGradientBackground(e){if(!this.scene)return;const i=document.createElement("canvas");i.width=this.width,i.height=this.height;const n=i.getContext("2d");if(!n)return;const r=e.match(/linear-gradient\(([^,]+),\s*(.+)\)/);if(!r)return void console.error("渐变格式不正确");const s=r[2].split(",").map((t=>t.trim())),o=n.createLinearGradient(0,0,i.width,i.height);s.forEach(((t,e)=>{o.addColorStop(e/(s.length-1),t)})),n.fillStyle=o,n.fillRect(0,0,i.width,i.height);const a=new t.CanvasTexture(i);this.scene.background=a}updateVideoMesh(){if(!this.videoMesh||!this.camera)return;const e=2*Math.tan(t.MathUtils.degToRad(this.camera.fov/2))*10,i=e*this.camera.aspect;this.videoMesh.geometry.dispose(),this.videoMesh.geometry=new t.PlaneGeometry(i,e);const n=new t.Vector3;this.camera.getWorldDirection(n),this.videoMesh.position.copy(this.camera.position).add(n.multiplyScalar(10)),this.videoMesh.lookAt(this.camera.position)}}class Or{action;listener={};config={};constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.action=t,this.listener={},this.config=e({timeBeforeFinished:1},i)}on(t,e){this.listener[t]=e}update(t){const{loop:e,time:i,_loopCount:n,repetitions:r}=this.action;if(2201===e&&(r===1/0||r-n!=1))return;const s=this.action.getClip().duration,o=s-this.config.timeBeforeFinished,a=this.listener.beforeFinished;a&&i>=o&&i<o+t&&(Reflect.deleteProperty(this.listener,"beforeFinished"),a(this.action));const h=this.listener.finished;h&&i>=s&&i<s+t&&(Reflect.deleteProperty(this.listener,"finished"),h(this.action))}}class Rr{config;emit;animationGroup=new t.AnimationObjectGroup;animations=[];actions=[];animationMixer=null;onAnimationFinishedBound=()=>{};actionDefaultMap=new Map;currentTalkAnimations=[];muteActionState=!1;actionNotifier=null;constructor(t){this.config=t.config,this.emit=t.emit}setConfig(t){this.config=t}addAnimationTarget(t){this.animationGroup.add(t)}addAnimations(t){t.forEach((t=>{this.animations.push(t),t.code.includes("_idle")?this.actionDefaultMap.has("idle")?this.actionDefaultMap.get("idle").push(t.code):this.actionDefaultMap.set("idle",[t.code]):t.code.includes("_talk")&&(this.actionDefaultMap.has("talk")?this.actionDefaultMap.get("talk").push(t.code):this.actionDefaultMap.set("talk",[t.code]))}))}initializeMixer(){this.animationMixer&&(this.animationMixer.stopAllAction(),this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound)),this.animationMixer=new t.AnimationMixer(this.animationGroup),this.actions=this.animations.map((t=>{const e=this.animationMixer.clipAction(t.animation);return{name:t.animation.name,code:t.code,action:e,animation:t.animation,type:t.type,text:t.text}})),this.onAnimationFinishedBound=this.animationFinished.bind(this),this.animationMixer.addEventListener("finished",this.onAnimationFinishedBound)}update(t){if(!this.animationMixer)return;this.animationMixer.update(t);(this.animationMixer._actions||[]).forEach((t=>{(0===t.weight||t.paused)&&t.stop()})),this.actionNotifier?.update(t)}playAction=i((()=>{var i=this;return function(n){let r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(n)){if(0===n.length)return void console.warn("playAction: empty array provided");n.some((t=>t.includes("talk")))&&(i.currentTalkAnimations=n),r=n[Math.floor(Math.random()*n.length)],i.muteActionState}else r=n,i.muteActionState;if(i.muteActionState&&"idle"!==r&&"talk"!==r)return;const o=e(s),a="idle"===r?i.getDefaultAniCode("idle"):"talk"===r?i.getDefaultAniCode("talk"):r,h=i.actions.find((t=>t.code===a));if(h)try{const{action:e}=h,s=i.actions.find((t=>t.action.isRunning()));if(s&&s.action===e)return;const a=r.includes("talk")&&void 0===o.loop;o.loop===t.LoopRepeat||a?e.loop=t.LoopRepeat:(e.loop=t.LoopOnce,e.clampWhenFinished=!0),o.repetitions?e.setLoop(o.loop,o.repetitions):a&&e.setLoop(t.LoopRepeat,Number.MAX_SAFE_INTEGER),e.timeScale=1;const l=o.fadeDuration||.5;s&&s.action!==e?(s.action.fadeOut(l),e.reset().fadeIn(l).play()):e.reset().fadeIn(l).play(),i.animationMixer?.update(0),i.actionNotifier=new Or(e),i.actionNotifier.on("beforeFinished",(s=>{h.code,i.emit("action.beforeFinished",n),r.includes("talk")||e.loop!==t.LoopOnce||r.includes("idle")||setTimeout((()=>{i.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER})}),100)}))}catch(t){console.error("Error playing action:",t)}else console.warn(`Action not found: ${a}`)}})(),50,{leading:!0});stopAllActionExcludeIdle(){}stopAllAction(){this.actions.forEach((t=>{t.action.stop(),t.action.reset()}))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.playAction("idle"),this.muteActionState=t}getModelInfo(t){const e=[],i=t=>{t.children.forEach((t=>{t.isGroup?i(t):e.push(t)}))};return i(t),{actor:t,scenes:e,animations:this.animations.map((t=>t.animation)),mixer:this.animationMixer,actions:this.actions}}getAnimations(){return this.animations}getMixer(){return this.animationMixer}destroy(){this.stopAllAction(),this.animationMixer&&(this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound),this.animationMixer=null),this.animations=[],this.actions=[],this.actionDefaultMap.clear(),this.currentTalkAnimations=[],this.actionNotifier=null,this.muteActionState=!1,this.animationGroup=new t.AnimationObjectGroup}getDefaultAniCode(t){const e=this.actionDefaultMap.get(t)||[];return 0===e.length?null:1===e.length?e[0]:e[Math.floor(Math.random()*e.length)]}animationFinished(t){const{action:e,type:i}=t;if(e._clip.name,"finished"===i&&e._clip?.name){if(e._clip.name.indexOf("idle")>=0)return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER});if(e._clip.name.indexOf("talk")>=0)return;return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER})}}}class Fr{getBody;serverShapes=[];isPlayingServerShapes=!1;mouthBlendWeight=0;constructor(t){this.getBody=t.getBody}playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.serverShapes=t,this.isPlayingServerShapes?this.mouthBlendWeight=1:(this.isPlayingServerShapes=!0,hr.to(this,{mouthBlendWeight:1,duration:.15,ease:"power2.out"}))}stopServerShapes(){this.isPlayingServerShapes&&hr.to(this,{mouthBlendWeight:0,duration:.3,ease:"power2.inOut",onComplete:()=>{this.isPlayingServerShapes=!1,this.serverShapes=[]}})}applyBlendShapes(){if(!this.isPlayingServerShapes||0===this.serverShapes.length)return;const t=this.getBody();Object.entries(t).forEach((t=>{let[,e]=t;if(!e.mesh||!e.mesh.morphTargetInfluences||!e.mesh.morphTargetDictionary)return;const i=e.mesh.morphTargetDictionary,{prefix:n="",suffix:r=""}=e;for(const[t,s]of Object.entries(i)){const i=t.replace(n,"").replace(r,"");if(i.includes("eyeBlink")||i.includes("eyeWide")||i.includes("eyeSquint"))continue;const o=e.mesh.morphTargetInfluences[s],a=this.getShapeIndex(i);if(a>=0&&a<this.serverShapes.length){const t=this.serverShapes[a];e.mesh.morphTargetInfluences[s]=o*(1-this.mouthBlendWeight)+t*this.mouthBlendWeight}}}))}destroy(){hr.killTweensOf(this),this.serverShapes=[],this.isPlayingServerShapes=!1,this.mouthBlendWeight=0}getShapeIndex(t){return["eyeBlinkLeft","eyeLookDownLeft","eyeLookInLeft","eyeLookOutLeft","eyeLookUpLeft","eyeSquintLeft","eyeWideLeft","eyeBlinkRight","eyeLookDownRight","eyeLookInRight","eyeLookOutRight","eyeLookUpRight","eyeSquintRight","eyeWideRight","jawForward","jawLeft","jawRight","jawOpen","mouthClose","mouthFunnel","mouthPucker","mouthLeft","mouthRight","mouthSmileLeft","mouthSmileRight","mouthFrownLeft","mouthFrownRight","mouthDimpleLeft","mouthDimpleRight","mouthStretchLeft","mouthStretchRight","mouthRollLower","mouthRollUpper","mouthShrugLower","mouthShrugUpper","mouthPressLeft","mouthPressRight","mouthLowerDownLeft","mouthLowerDownRight","mouthUpperUpLeft","mouthUpperUpRight","browDownLeft","browDownRight","browInnerUp","browOuterUpLeft","browOuterUpRight","cheekPuff","cheekSquintLeft","cheekSquintRight","noseSneerLeft","noseSneerRight","tongueOut"].indexOf(t)}}class Pr{config;animationManager;getScene;getCharacterGroup;getBody;setBody;loader;ktx2Loader;model=new Map;constructor(t){this.config=t.config,this.animationManager=t.animationManager,this.getScene=t.getScene,this.getCharacterGroup=t.getCharacterGroup,this.getBody=t.getBody,this.setBody=t.setBody,this.ktx2Loader=this.createKTX2Loader(),this.loader=this.createGLTFLoader()}setConfig(t){this.config=t}detectTextureSupport(t){this.ktx2Loader.detectSupport(t)}getModelMap(){return this.model}changeBundle(t){this.loader.parse(t.buffer,"",(t=>{this.getScene()?.add(t.scene)}),(t=>{console.error("error loading GLB model:",t)}))}loadBundles(t,e){const i=[],n={};return t.forEach((r=>{n[r.bundle]={url:r.bundle,progress:0,total:0},i.push(new Promise(((i,s)=>{this.loader.parse(r.buffer,"",(s=>{i({...r,gltf:s}),function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[i]={url:i,progress:r,total:s};let o=0,a=0;t.forEach((t=>{let{bundle:e}=t;o+=n[e].total,a+=n[e].progress}));const h=Math.floor(a/o*100);e(h)}(r.bundle,1,1)}),(t=>{console.error("error loading GLB model:",t),s("Error loading GLB model")}))})))})),Promise.all(i).then((t=>(t.forEach((t=>this.mountRecord(t))),this.animationManager.initializeMixer(),t)))}loadGLBModel(t){(new c).load(t,(t=>{this.getScene()?.add(t.scene)}))}loadLowResTexture(e){const i=new t.TextureLoader;return new Promise((n=>{i.load(e,(e=>{e.minFilter=t.LinearFilter,e.generateMipmaps=!1,n(e)}))}))}addModel(t,e){const i=new c,n=new p;this.config.dracoPath,n.setDecoderPath(`${this.config.dracoPath}`),n.setDecoderConfig({type:"js"}),i.setDRACOLoader(n),i.load(e,(e=>{const i=e.scene;i.name=t,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1);const n=this.getScene();n&&(n.traverse((t=>{t.isMesh&&t.name})),n.children[1]?.children[1]?.children[0]?.add(i.children[0]))}),void 0,(t=>{console.error("An error occurred while loading the model:",t)}))}destroyModel(t,e){const i=this.getScene();if(!i)return void console.error("Scene is not initialized.");const n=[];i.traverse((t=>{if(t.isMesh){-1!==t.name.toLowerCase().indexOf("cloth")&&(t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach((t=>{t&&t.isMaterial&&e(t)})):t.material&&t.material.isMaterial&&e(t.material),t.parent&&n.push(t))}})),n.forEach((t=>{t.parent?.remove(t)}));const r=t.indexOf("apose_cloth");-1!==r&&t.substring(r)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return new Promise(((i,n)=>{this.loader.load(t,(t=>i(t)),e,(t=>{console.error("Error loading GLB model:",t),n(t)}))}))}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.loadGlb(t,e).then((t=>(this.getScene()?.add(t.scene),t)))}destroy(){this.model.clear(),this.loader=null,this.ktx2Loader&&(this.ktx2Loader.dispose(),this.ktx2Loader=null)}createGLTFLoader(){const t=new c,e=new p;return e.setDecoderPath(this.config.dracoPath||"draco/"),t.setKTX2Loader(this.ktx2Loader),t.setMeshoptDecoder(u),t.setDRACOLoader(e),t}createKTX2Loader(){const t=new d;return t.setTranscoderPath("three/examples/jsm/libs/basis/"),t}cloneTrack(e,i){return new t.NumberKeyframeTrack(i,e.times.slice(),e.values.slice())}mountRecord(t){let{code:e,gltf:i,name:n,type:r}=t;if(!i)return;const s=i.scene;s.name=e,"apose"===r?this.mountAposeScene(s):"animation"!==r&&"animation_system"!==r||this.registerAnimationClips({code:e,name:n,type:r,gltf:i}),this.model.set(e,i),this.bindBodyMeshes(e,s)}mountAposeScene(e){this.getCharacterGroup()?.add(e),this.animationManager.addAnimationTarget(e),e.traverse((e=>{e.isMesh&&(e.material.side=t.DoubleSide)}))}registerAnimationClips(t){let{code:e,name:i,type:n,gltf:r}=t;r.animations.forEach((t=>{const e=t.tracks.findIndex((t=>"BS_Mod.morphTargetInfluences"===t.name));if(e>=0){const i=t.tracks[e],n=this.config.model?.body.options.find((t=>t.key.startsWith("Head_Mod"))),r=this.config.model?.body.options.find((t=>t.key.startsWith("Eyelashes_Mod")));if(n&&r){const s=this.cloneTrack(i,`${n.key}.morphTargetInfluences`),o=this.cloneTrack(i,`${r.key}.morphTargetInfluences`);t.tracks.splice(e,1),t.tracks.push(s,o)}}}));const s=r.animations.map((t=>({code:e,animation:t,type:n,text:i})));this.animationManager.addAnimations(s)}bindBodyMeshes(t,e){if(t!==this.config.model?.body.name&&!t.includes("_mesh_body"))return;const i={...this.getBody()};this.config.model?.body.options.forEach((t=>{i[t.key]={...t,mesh:e.getObjectByName(t.name)}})),this.setBody(i)}}class Dr{cleanMaterial(t){const e=t=>{["map","lightMap","bumpMap","normalMap","specularMap","envMap","aoMap","emissiveMap","metalnessMap","roughnessMap","alphaMap","displacementMap"].forEach((e=>{t[e]&&t[e].dispose()})),t.dispose()};Array.isArray(t)?t.forEach((t=>e(t))):e(t)}cleanupScene(t){t&&t.traverse((t=>{t.isMesh&&(t.geometry?.dispose(),t.material&&this.cleanMaterial(t.material))}))}}class Br extends n{animationFrameId=0;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;depth=10;config;isNotRender=!1;clock=null;body={};characterGroup=new t.Group;lightGroup=new t.Group;state={};onWindowResizeBound=null;rotationCenter=new t.Vector3(0,0,0);_container="";gui=null;humanObj;sceneManager;interactionManager;backgroundManager;animationManager;blendShapeManager;modelRuntime;resourceCleaner;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;super(),this.humanObj=n,this.config=i,this._container=e,this.sceneManager=new kr({config:this.config,container:this._container,characterGroup:this.characterGroup,lightGroup:this.lightGroup,state:this.state}),this.interactionManager=new Tr({config:this.config,container:this.container,characterGroup:this.characterGroup,state:this.state,getAnimationFrameId:()=>this.animationFrameId}),this.backgroundManager=new Lr,this.animationManager=new Rr({config:this.config,emit:(t,e)=>this.emit(t,e)}),this.blendShapeManager=new Fr({getBody:()=>this.body}),this.modelRuntime=new Pr({config:this.config,animationManager:this.animationManager,getScene:()=>this.scene,getCharacterGroup:()=>this.characterGroup,getBody:()=>this.body,setBody:t=>{this.body=t}}),this.resourceCleaner=new Dr,this.setContainer(),this.isNotRender||this.init(),this.config.debug&&(window.THREE=t)}syncSceneRuntime(){const t=this.sceneManager.getSnapshot();this.container=t.container,this.scene=t.scene,this.camera=t.camera,this.renderer=t.renderer,this.controls=t.controls,this.width=t.width,this.height=t.height,this.isNotRender=t.isNotRender,this.interactionManager.setContainer(this.container),this.interactionManager.setCharacterGroup(this.characterGroup),this.backgroundManager.setRuntimeRefs({scene:this.scene,camera:this.camera,renderer:this.renderer,width:this.width,height:this.height})}init(){this.sceneManager.setConfig(this.config),this.sceneManager.setContainerRef(this._container),this.sceneManager.setGroups(this.characterGroup,this.lightGroup),this.interactionManager.setConfig(this.config),this.interactionManager.setCharacterGroup(this.characterGroup),this.animationManager.setConfig(this.config),this.modelRuntime.setConfig(this.config),this.sceneManager.init(),this.syncSceneRuntime(),this.renderer&&(this.clock=new t.Clock,this.modelRuntime.detectTextureSupport(this.renderer),this.onWindowResizeBound=this.onWindowResize.bind(this),window.addEventListener("resize",this.onWindowResizeBound,!1))}createDefaultCamera(){return this.sceneManager.createDefaultCamera()}createRenderer(){return this.sceneManager.createRenderer()}setContainer(){this.sceneManager.setContainerRef(this._container),this.sceneManager.resolveContainer(),this.syncSceneRuntime()}updateLight(){this.sceneManager.updateLight()}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.sceneManager.initLights(t),this.syncSceneRuntime()}loadCamera(t){const e=this.sceneManager.loadCamera(t);return this.syncSceneRuntime(),e}loadScene(t){return this.sceneManager.loadScene(t)}degree2Euler(t){return this.sceneManager.degree2Euler(t)}dataToMatrix4(t){return this.sceneManager.dataToMatrix4(t)}setLight(t){this.sceneManager.setLight(t)}setAngleView(t){let{camera:e}=t;this.sceneManager.setAngleView({camera:e})}async gsapContainer(t){return new Promise((e=>this.container?t.attr?(cancelAnimationFrame(this.animationFrameId),this.container.offsetWidth,this.container.offsetHeight,void hr.to(this.container,{duration:1,ease:"power2.inOut",...t.attr,onUpdate:()=>{const t=hr.getProperty(this.container,"width"),e=hr.getProperty(this.container,"height");this.width=parseFloat(`${t}`),this.height=parseFloat(`${e}`),this.renderer?.setSize(this.width,this.height),this.renderer?.render(this.scene,this.camera)},onComplete:()=>{this.onWindowResize(),this.animate(),e(!0)}})):void e(!1):(console.warn("container is null"),e(!1))))}initOrbitControls(){this.sceneManager.initOrbitControls(),this.syncSceneRuntime()}setBackground(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.backgroundManager.setBackground(t)}loadGLBModel(t){this.modelRuntime.loadGLBModel(t)}loadLowResTexture(t){return this.modelRuntime.loadLowResTexture(t)}changeBundle(t){this.modelRuntime.changeBundle(t)}loadBundles(e,i){return this.modelRuntime.loadBundles(e,i).then((e=>{if(!this.isNotRender){const{scale:e,position:i,rotation:n}=this.config.model||{};e&&this.characterGroup.scale.set(...e),i&&this.characterGroup.position.set(...i),n&&this.characterGroup.rotation.set(t.MathUtils.degToRad(n[0]),t.MathUtils.degToRad(n[1]),t.MathUtils.degToRad(n[2])),this.initOrbitControls(),this.loadCamera(this.config.camera),this.onWindowResize(),this.interactionManager.registerListeners()}this.emit("core.bundles.loaded",e)})).then((()=>{const t=this.animationManager.getMixer();return this.config.debug&&t&&(this.gui=new Sr(this.scene,t,this.animationManager.getAnimations().map((t=>t.animation)))),!0})).catch((t=>(console.error("Error loading models:",t),!1)))}onWindowResize=i((()=>{this.sceneManager.handleResize(),this.syncSceneRuntime()}),300,{leading:!0});setCamera(t,e){this.sceneManager.setCamera(t,e)}animate(){if(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),!(this.clock&&this.renderer&&this.scene&&this.camera))return;const t=this.clock.getDelta();this.animationManager.update(t),this.blendShapeManager.applyBlendShapes(),this.controls?.update(),this.backgroundManager.prepareFrame(),this.backgroundManager.renderBackground(),this.renderer.render(this.scene,this.camera)}startRender(){this.characterGroup&&this.scene&&!this.animationFrameId&&(this.animationManager.getMixer()&&this.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER}),this.scene.remove(this.characterGroup),this.scene.add(this.characterGroup),this.animate())}stopRender(){this.animationFrameId&&this.characterGroup&&this.scene&&(this.scene.remove(this.characterGroup),this.animationManager.stopAllAction(),setTimeout((()=>{cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0}),100))}gsapMorph(t,e,i){const n={duration:.3,ease:"easy",onComplete:()=>{}};e.forEach(((t,e)=>{n[e]=t})),hr.to(t,n)}playAction=(()=>{var t=this;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.animationManager.playAction(e,i)}})();stopAllActionExcludeIdle(){this.animationManager.stopAllActionExcludeIdle()}stopAllAction(){this.animationManager.stopAllAction()}cleanMaterial(t){this.resourceCleaner.cleanMaterial(t)}destroy(){this.isNotRender||(this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.animationManager.destroy(),this.interactionManager.removeEventListeners(),this.onWindowResizeBound&&(window.removeEventListener("resize",this.onWindowResizeBound,!1),this.onWindowResizeBound=null),this.backgroundManager.destroy(),this.blendShapeManager.destroy(),this.modelRuntime.destroy(),this.controls&&(this.controls.dispose(),this.controls=null),this.resourceCleaner.cleanupScene(this.scene),this.gui?.dispose(),this.gui=null,this.renderer?.dispose(),this.renderer?.domElement?.parentNode&&this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.clearReferences())}clearReferences(){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.body={},this.characterGroup=new t.Group,this.lightGroup=new t.Group,this.interactionManager.setCharacterGroup(this.characterGroup),this.sceneManager.setGroups(this.characterGroup,this.lightGroup)}async playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.blendShapeManager.playByShapes(t,e)}stopServerShapes(){this.blendShapeManager.stopServerShapes()}addModel(t,e){this.modelRuntime.addModel(t,e)}destoryModel(t){this.modelRuntime.destroyModel(t,(t=>this.cleanMaterial(t)))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.animationManager.muteAction(t)}getModelInfo(){return this.animationManager.getModelInfo(this.characterGroup)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.loadGlb(t,e)}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.addGlb(t,e)}setCharacterCenter(){if(!this.characterGroup)return;const e=this.characterGroup.children.find((t=>t.name.includes("body")));if(!e)return;const i=(new t.Box3).setFromObject(e).getCenter(new t.Vector3);this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.characterGroup.position.add(i)}setVideoBackground(t){this.backgroundManager.setVideoBackground(t)}loadCubeBackground(t){this.backgroundManager.loadCubeBackground(t)}updateBackgroundSize(t,e){this.backgroundManager.updateBackgroundSize(t,e)}setBackgroundColorOrGradient(t){this.backgroundManager.setBackgroundColorOrGradient(t)}}class zr{hm;animationFrameId=0;container;scene;width;height;depth=1e3;zAxisNumber;camera;renderer;sphere;parameters=[];materials=[];particles_init_postion;zprogress;zprogress_second;particles_first=[];particles_second=[];constructor(e,i){this.hm=i,this.container="string"==typeof e?document.getElementById(e):e,this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4);const n=this.height/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.max(n-this.depth/2,this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0),this.initLight(),this.particles_init_postion=-this.zAxisNumber-this.depth/2,this.zprogress=this.particles_init_postion,this.zprogress_second=2*this.particles_init_postion,this.particles_first=this.initSceneStar(this.particles_init_postion),this.particles_second=this.initSceneStar(this.zprogress_second),this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement),this.initOrbitControls(),this.animate(),this.hm.on(a.HUMAN_LOAD_PROGRESS,this.onProgress),this.initProgressBar()}initProgressBar(){const t=document.createElement("div");t.id="loadingContainer",t.className="loading-container w-full h-full bg-[#000]",t.style.width="100%",t.style.height="100%";const e=document.createElement("div");e.className="bottom-20 flex justify-center left-0 absolute w-full items-center flex-col",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column",e.style.position="absolute",e.style.left="0px",e.style.bottom="5rem",e.style.width="100%";const i=document.createElement("div");i.className="qt-progress-wrap w-3/4 h-[0.375rem] bg-[rgba(255,249,249,0.2)] rounded-1 overflow-hidden",i.style.backgroundColor="rgba(255,249,249,0.2)",i.style.height="0.375rem",i.style.width="75%",i.style.overflow="hidden",i.style.borderRadius=".25rem";const n=document.createElement("div");n.className="qt-progress w-[10%] h-[0.375rem] bg-white rounded-1",n.id="qtprogress",n.style.backgroundColor="rgb(255,255,255,1)",n.style.height="0.375rem",n.style.width="0",n.style.transition="width linear 0.3s",n.style.borderRadius=".25rem",i.appendChild(n),e.appendChild(i),t.appendChild(e);const r=document.createElement("div");r.className="text-white mt-4 text-sm",r.textContent="正在加载...",r.id="qtprogresstext",r.style.color="rgb(255,255,255,1)",r.style.fontSize="0.875rem",r.style.lineHeight="1.25rem",r.style.marginTop="1rem",e.appendChild(r),this.container.appendChild(t)}initScene(){this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4)}initCamera(){const e=this.width/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.floor(e-this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0)}initRenderer(){this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement)}initOrbitControls(){const t=new m(this.camera,this.renderer.domElement);t.enabled=!1,t.update()}animate(){this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),this.renderStarMove(),this.renderer.render(this.scene,this.camera)}initLight(){const e=new t.AmbientLight(16777215);this.scene.add(e);const i=new t.PointLight(415229,5,0);i.position.set(50,50,50),this.scene.add(i)}renderSphereRotate(){this.sphere.rotateY(.01)}initSceneStar(e){const i=new t.BufferGeometry,n=[],s=new t.TextureLoader,o=s.load("data:image/png;base64,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"),a=s.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU9JREFUOBGlk0tLQzEQRm/qFav4AKUrQXEpgv//j4jLYtWVWJ/46K2N54RMudSdHTh0msw3mWTmpmbFcs4DlhL4K9qiklNK+kszsBhC/Q3YhCFsVZ+fpoNv+Kr+D4kyfjmpqeKW/9twAEdwCDugfcAUHuEFPmFuEkWaJysewQmcwTGYTHuFOxjDBB7ApPO23tmyDVZ8CRfV7ye4YW0PtBl0aBdW4N29s2V7smKTnMMuaO8Qyd7wn+raLF7aB/POln0Kivch9vVdc88YY9UMDLACr+CDeYrEybhLcy32jVWTTLCWmcB+2mdf1RaJd14112LfWDVl6pwsh2QK9+BrX4Otc0/0XXPPGGPVlC5YgRPmkIwhWvWM7501Eyi+AmOMVZNbZ5t+Wo7lTUCzVbfQT9AfJGM7tXZgrVEuCXpJ/vcxmSCsjraJ7VC0OR7zz+f8C54rgrcYdoUhAAAAAElFTkSuQmCC");this.parameters=[[[.6,100,.75],o,50],[[0,0,1],a,20]];for(let e=0;e<500;e++){const e=t.MathUtils.randFloatSpread(this.width),i=r(0,3*this.height/5),s=r(-this.depth/2,this.zAxisNumber);n.push(e,i,s)}i.setAttribute("position",new t.Float32BufferAttribute(n,3));const h=[];for(let n=0;n<this.parameters.length;n++){const r=this.parameters[n][0],s=this.parameters[n][1],o=this.parameters[n][2];this.materials[n]=new t.PointsMaterial({size:o,map:s,blending:t.AdditiveBlending,transparent:!0,depthTest:!1}),this.materials[n].color.setHSL(r[0],r[1],r[2]);const a=new t.Points(i,this.materials[n]);a.rotation.x=.2*Math.random()-.15,a.rotation.y=.2*Math.random()-.15,a.rotation.z=.2*Math.random()-.15,a.position.setZ(e),h.push(a),this.scene.add(a)}return h}renderStarMove(){const t=5e-5*Date.now();for(let e=0;e<this.parameters.length;e++){const i=this.parameters[e][0],n=360*(i[0]+t)%360/360;this.materials[e].color.setHSL(i[0],i[1],parseFloat(n.toFixed(2)))}this.zprogress+=10,this.zprogress_second+=10,this.zprogress>=this.zAxisNumber+this.depth/2?this.zprogress=this.particles_init_postion:this.particles_first.forEach((t=>{t.position.setZ(this.zprogress)})),this.zprogress_second>=this.zAxisNumber+this.depth/2?this.zprogress_second=this.particles_init_postion:this.particles_second.forEach((t=>{t.position.setZ(this.zprogress_second)}))}onProgress(t){let{progress:e,total:i}=t;document.getElementById("qtprogress").style.width=`${i}%`,document.getElementById("qtprogresstext").innerText=`正在加载:${i}%`}destroy(){cancelAnimationFrame(this.animationFrameId),this.renderer.dispose(),this.hm.off(a.HUMAN_LOAD_PROGRESS,this.onProgress),this.renderer.domElement.parentNode&&(this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.container.innerHTML="")}}export{zr as L,Br as T};
|
|
1
|
+
import*as t from"three";import{m as e,d as i,E as n,r}from"./shared-CkWRiqE-.js";import{c as s,g as o,E as a}from"./human-core-whM3ddVo.js";import{OrbitControls as h}from"three/examples/jsm/controls/OrbitControls.js";import{RGBELoader as l}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFLoader as c}from"three/examples/jsm/loaders/GLTFLoader.js";import{KTX2Loader as d}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as u}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{DRACOLoader as p}from"three/examples/jsm/loaders/DRACOLoader.js";import{OrbitControls as m}from"three/addons/controls/OrbitControls.js";function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var _,v,y,w,b,A,x,M,C,E,S,k,T,L,O,R,F,P={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},D={duration:.5,overwrite:!1,delay:0},B=1e8,z=1e-8,G=2*Math.PI,I=G/4,H=0,N=Math.sqrt,V=Math.cos,j=Math.sin,W=function(t){return"string"==typeof t},Y=function(t){return"function"==typeof t},$=function(t){return"number"==typeof t},X=function(t){return void 0===t},U=function(t){return"object"==typeof t},q=function(t){return!1!==t},J=function(){return"undefined"!=typeof window},Q=function(t){return Y(t)||W(t)},Z="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/(?:-?\.?\d|\.)+/gi,et=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,it=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rt=/[+-]=-?[.\d]+/,st=/[^,'"\[\]\s]+/gi,ot=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,at={},ht={},lt=function(t){return(ht=Gt(t,at))&&Ii},ct=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},dt=function(t,e){return!e&&console.warn(t)},ut=function(t,e){return t&&(at[t]=e)&&ht&&(ht[t]=e)||at},pt=function(){return 0},mt={suppressEvents:!0,isStart:!0,kill:!1},gt={suppressEvents:!0,kill:!1},ft={suppressEvents:!0},_t={},vt=[],yt={},wt={},bt={},At=30,xt=[],Mt="",Ct=function(t){var e,i,n=t[0];if(U(n)||Y(n)||(t=[t]),!(e=(n._gsap||{}).harness)){for(i=xt.length;i--&&!xt[i].targetTest(n););e=xt[i]}for(i=t.length;i--;)t[i]&&(t[i]._gsap||(t[i]._gsap=new Ke(t[i],e)))||t.splice(i,1);return t},Et=function(t){return t._gsap||Ct(fe(t))[0]._gsap},St=function(t,e,i){return(i=t[e])&&Y(i)?t[e]():X(i)&&t.getAttribute&&t.getAttribute(e)||i},kt=function(t,e){return(t=t.split(",")).forEach(e)||t},Tt=function(t){return Math.round(1e5*t)/1e5||0},Lt=function(t){return Math.round(1e7*t)/1e7||0},Ot=function(t,e){var i=e.charAt(0),n=parseFloat(e.substr(2));return t=parseFloat(t),"+"===i?t+n:"-"===i?t-n:"*"===i?t*n:t/n},Rt=function(t,e){for(var i=e.length,n=0;t.indexOf(e[n])<0&&++n<i;);return n<i},Ft=function(){var t,e,i=vt.length,n=vt.slice(0);for(yt={},vt.length=0,t=0;t<i;t++)(e=n[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},Pt=function(t,e,i,n){vt.length&&!v&&Ft(),t.render(e,i,v&&e<0&&(t._initted||t._startAt)),vt.length&&!v&&Ft()},Dt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(st).length<2?e:W(t)?t.trim():t},Bt=function(t){return t},zt=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},Gt=function(t,e){for(var i in e)t[i]=e[i];return t},It=function t(e,i){for(var n in i)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(e[n]=U(i[n])?t(e[n]||(e[n]={}),i[n]):i[n]);return e},Ht=function(t,e){var i,n={};for(i in t)i in e||(n[i]=t[i]);return n},Nt=function(t){var e,i=t.parent||w,n=t.keyframes?(e=K(t.keyframes),function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}):zt;if(q(t.inherit))for(;i;)n(t,i.vars.defaults),i=i.parent||i._dp;return t},Vt=function(t,e,i,n,r){var s,o=t[n];if(r)for(s=e[r];o&&o[r]>s;)o=o._prev;return o?(e._next=o._next,o._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[n]=e,e._prev=o,e.parent=e._dp=t,e},jt=function(t,e,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=e._prev,s=e._next;r?r._next=s:t[i]===e&&(t[i]=s),s?s._prev=r:t[n]===e&&(t[n]=r),e._next=e._prev=e.parent=null},Wt=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Yt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},$t=function(t,e,i,n){return t._startAt&&(v?t._startAt.revert(gt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,n))},Xt=function t(e){return!e||e._ts&&t(e.parent)},Ut=function(t){return t._repeat?qt(t._tTime,t=t.duration()+t._rDelay)*t:0},qt=function(t,e){var i=Math.floor(t/=e);return t&&i===t?i-1:i},Jt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Qt=function(t){return t._end=Lt(t._start+(t._tDur/Math.abs(t._ts||t._rts||z)||0))},Zt=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=Lt(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Qt(t),i._dirty||Yt(i,t)),t},Kt=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=Jt(t.rawTime(),e),(!e._dur||de(0,e.totalDuration(),i)-e._tTime>z)&&e.render(i,!0)),Yt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-1e-8}},te=function(t,e,i,n){return e.parent&&Wt(e),e._start=Lt(($(i)?i:i||t!==w?he(t,i,e):t._time)+e._delay),e._end=Lt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Vt(t,e,"_first","_last",t._sort?"_start":0),re(e)||(t._recent=e),n||Kt(t,e),t._ts<0&&Zt(t,t._tTime),t},ee=function(t,e){return(at.ScrollTrigger||ct("scrollTrigger",e))&&at.ScrollTrigger.create(e,t)},ie=function(t,e,i,n,r){return ai(t,e,r),t._initted?!i&&t._pt&&!v&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&C!==He.frame?(vt.push(t),t._lazy=[r,n],1):void 0:1},ne=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},re=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},se=function(t,e,i,n){var r=t._repeat,s=Lt(e)||0,o=t._tTime/t._tDur;return o&&!n&&(t._time*=s/t._dur),t._dur=s,t._tDur=r?r<0?1e10:Lt(s*(r+1)+t._rDelay*r):s,o>0&&!n&&Zt(t,t._tTime=t._tDur*o),t.parent&&Qt(t),i||Yt(t.parent,t),t},oe=function(t){return t instanceof ei?Yt(t):se(t,t._dur)},ae={_start:0,endTime:pt,totalDuration:pt},he=function t(e,i,n){var r,s,o,a=e.labels,h=e._recent||ae,l=e.duration()>=B?h.endTime(!1):e._dur;return W(i)&&(isNaN(i)||i in a)?(s=i.charAt(0),o="%"===i.substr(-1),r=i.indexOf("="),"<"===s||">"===s?(r>=0&&(i=i.replace(/=/,"")),("<"===s?h._start:h.endTime(h._repeat>=0))+(parseFloat(i.substr(1))||0)*(o?(r<0?h:n).totalDuration()/100:1)):r<0?(i in a||(a[i]=l),a[i]):(s=parseFloat(i.charAt(r-1)+i.substr(r+1)),o&&n&&(s=s/100*(K(n)?n[0]:n).totalDuration()),r>1?t(e,i.substr(0,r-1),n)+s:l+s)):null==i?l:+i},le=function(t,e,i){var n,r,s=$(e[1]),o=(s?2:1)+(t<2?0:1),a=e[o];if(s&&(a.duration=e[1]),a.parent=i,t){for(n=a,r=i;r&&!("immediateRender"in n);)n=r.vars.defaults||{},r=q(r.vars.inherit)&&r.parent;a.immediateRender=q(n.immediateRender),t<2?a.runBackwards=1:a.startAt=e[o-1]}return new ui(e[0],a,e[o+1])},ce=function(t,e){return t||0===t?e(t):e},de=function(t,e,i){return i<t?t:i>e?e:i},ue=function(t,e){return W(t)&&(e=ot.exec(t))?e[1]:""},pe=[].slice,me=function(t,e){return t&&U(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&U(t[0]))&&!t.nodeType&&t!==b},ge=function(t,e,i){return void 0===i&&(i=[]),t.forEach((function(t){var n;return W(t)&&!e||me(t,1)?(n=i).push.apply(n,fe(t)):i.push(t)}))||i},fe=function(t,e,i){return y&&!e&&y.selector?y.selector(t):!W(t)||i||!A&&Ne()?K(t)?ge(t,i):me(t)?pe.call(t,0):t?[t]:[]:pe.call((e||x).querySelectorAll(t),0)},_e=function(t){return t=fe(t)[0]||dt("Invalid scope")||{},function(e){var i=t.current||t.nativeElement||t;return fe(e,i.querySelectorAll?i:i===t?dt("Invalid scope")||x.createElement("div"):t)}},ve=function(t){return t.sort((function(){return.5-Math.random()}))},ye=function(t){if(Y(t))return t;var e=U(t)?t:{each:t},i=Ue(e.ease),n=e.from||0,r=parseFloat(e.base)||0,s={},o=n>0&&n<1,a=isNaN(n)||o,h=e.axis,l=n,c=n;return W(n)?l=c={center:.5,edges:.5,end:1}[n]||0:!o&&a&&(l=n[0],c=n[1]),function(t,o,d){var u,p,m,g,f,_,v,y,w,b=(d||e).length,A=s[b];if(!A){if(!(w="auto"===e.grid?0:(e.grid||[1,B])[1])){for(v=-1e8;v<(v=d[w++].getBoundingClientRect().left)&&w<b;);w<b&&w--}for(A=s[b]=[],u=a?Math.min(w,b)*l-.5:n%w,p=w===B?0:a?b*c/w-.5:n/w|0,v=0,y=B,_=0;_<b;_++)m=_%w-u,g=p-(_/w|0),A[_]=f=h?Math.abs("y"===h?g:m):N(m*m+g*g),f>v&&(v=f),f<y&&(y=f);"random"===n&&ve(A),A.max=v-y,A.min=y,A.v=b=(parseFloat(e.amount)||parseFloat(e.each)*(w>b?b-1:h?"y"===h?b/w:w:Math.max(w,b/w))||0)*("edges"===n?-1:1),A.b=b<0?r-b:r,A.u=ue(e.amount||e.each)||0,i=i&&b<0?$e(i):i}return b=(A[t]-A.min)/A.max||0,Lt(A.b+(i?i(b):b)*A.v)+A.u}},we=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=Lt(Math.round(parseFloat(i)/t)*t*e);return(n-n%1)/e+($(i)?0:ue(i))}},be=function(t,e){var i,n,r=K(t);return!r&&U(t)&&(i=r=t.radius||B,t.values?(t=fe(t.values),(n=!$(t[0]))&&(i*=i)):t=we(t.increment)),ce(e,r?Y(t)?function(e){return n=t(e),Math.abs(n-e)<=i?n:e}:function(e){for(var r,s,o=parseFloat(n?e.x:e),a=parseFloat(n?e.y:0),h=B,l=0,c=t.length;c--;)(r=n?(r=t[c].x-o)*r+(s=t[c].y-a)*s:Math.abs(t[c]-o))<h&&(h=r,l=c);return l=!i||h<=i?t[l]:e,n||l===e||$(e)?l:l+ue(e)}:we(t))},Ae=function(t,e,i,n){return ce(K(t)?!e:!0===i?!!(i=0):!n,(function(){return K(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+.99*i))/i)*i*n)/n}))},xe=function(t,e,i){return ce(i,(function(i){return t[~~e(i)]}))},Me=function(t){for(var e,i,n,r,s=0,o="";~(e=t.indexOf("random(",s));)n=t.indexOf(")",e),r="["===t.charAt(e+7),i=t.substr(e+7,n-e-7).match(r?st:tt),o+=t.substr(s,e-s)+Ae(r?i:+i[0],r?0:+i[1],+i[2]||1e-5),s=n+1;return o+t.substr(s,t.length-s)},Ce=function(t,e,i,n,r){var s=e-t,o=n-i;return ce(r,(function(e){return i+((e-t)/s*o||0)}))},Ee=function(t,e,i){var n,r,s,o=t.labels,a=B;for(n in o)(r=o[n]-e)<0==!!i&&r&&a>(r=Math.abs(r))&&(s=n,a=r);return s},Se=function(t,e,i){var n,r,s,o=t.vars,a=o[e],h=y,l=t._ctx;if(a)return n=o[e+"Params"],r=o.callbackScope||t,i&&vt.length&&Ft(),l&&(y=l),s=n?a.apply(r,n):a.call(r),y=h,s},ke=function(t){return Wt(t),t.scrollTrigger&&t.scrollTrigger.kill(!!v),t.progress()<1&&Se(t,"onInterrupt"),t},Te=[],Le=function(t){if(t)if(t=!t.name&&t.default||t,J()||t.headless){var e=t.name,i=Y(t),n=e&&!i&&t.init?function(){this._props=[]}:t,r={init:pt,render:bi,add:si,kill:xi,modifier:Ai,rawVars:0},s={targetTest:0,get:0,getSetter:_i,aliases:{},register:0};if(Ne(),t!==n){if(wt[e])return;zt(n,zt(Ht(t,r),s)),Gt(n.prototype,Gt(r,Ht(t,s))),wt[n.prop=e]=n,t.targetTest&&(xt.push(n),_t[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}ut(e,n),t.register&&t.register(Ii,n,Ei)}else Te.push(t)},Oe=255,Re={aqua:[0,Oe,Oe],lime:[0,Oe,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Oe],navy:[0,0,128],white:[Oe,Oe,Oe],olive:[128,128,0],yellow:[Oe,Oe,0],orange:[Oe,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Oe,0,0],pink:[Oe,192,203],cyan:[0,Oe,Oe],transparent:[Oe,Oe,Oe,0]},Fe=function(t,e,i){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)*Oe+.5|0},Pe=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p=t?$(t)?[t>>16,t>>8&Oe,t&Oe]:0:Re.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Re[t])p=Re[t];else if("#"===t.charAt(0)){if(t.length<6&&(n=t.charAt(1),r=t.charAt(2),s=t.charAt(3),t="#"+n+n+r+r+s+s+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&Oe,p&Oe,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&Oe,t&Oe]}else if("hsl"===t.substr(0,3))if(p=u=t.match(tt),e){if(~t.indexOf("="))return p=t.match(et),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,a=+p[1]/100,n=2*(h=+p[2]/100)-(r=h<=.5?h*(a+1):h+a-h*a),p.length>3&&(p[3]*=1),p[0]=Fe(o+1/3,n,r),p[1]=Fe(o,n,r),p[2]=Fe(o-1/3,n,r);else p=t.match(tt)||Re.transparent;p=p.map(Number)}return e&&!u&&(n=p[0]/Oe,r=p[1]/Oe,s=p[2]/Oe,h=((l=Math.max(n,r,s))+(c=Math.min(n,r,s)))/2,l===c?o=a=0:(d=l-c,a=h>.5?d/(2-l-c):d/(l+c),o=l===n?(r-s)/d+(r<s?6:0):l===r?(s-n)/d+2:(n-r)/d+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*a+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p},De=function(t){var e=[],i=[],n=-1;return t.split(ze).forEach((function(t){var r=t.match(it)||[];e.push.apply(e,r),i.push(n+=r.length+1)})),e.c=i,e},Be=function(t,e,i){var n,r,s,o,a="",h=(t+a).match(ze),l=e?"hsla(":"rgba(",c=0;if(!h)return t;if(h=h.map((function(t){return(t=Pe(t,e,1))&&l+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),i&&(s=De(t),(n=i.c).join(a)!==s.c.join(a)))for(o=(r=t.replace(ze,"1").split(it)).length-1;c<o;c++)a+=r[c]+(~n.indexOf(c)?h.shift()||l+"0,0,0,0)":(s.length?s:h.length?h:i).shift());if(!r)for(o=(r=t.split(ze)).length-1;c<o;c++)a+=r[c]+h[c];return a+r[o]},ze=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Re)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ge=/hsl[a]?\(/,Ie=function(t){var e,i=t.join(" ");if(ze.lastIndex=0,ze.test(i))return e=Ge.test(i),t[1]=Be(t[1],e),t[0]=Be(t[0],e,De(t[1])),!0},He=function(){var t,e,i,n,r,s,o=Date.now,a=500,h=33,l=o(),c=l,d=1e3/240,u=d,p=[],m=function i(m){var g,f,_,v,y=o()-c,w=!0===m;if((y>a||y<0)&&(l+=y-h),((g=(_=(c+=y)-l)-u)>0||w)&&(v=++n.frame,r=_-1e3*n.time,n.time=_/=1e3,u+=g+(g>=d?4:d-g),f=1),w||(t=e(i)),f)for(s=0;s<p.length;s++)p[s](_,r,v,m)};return n={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(t){return r/(1e3/(t||60))},wake:function(){M&&(!A&&J()&&(b=A=window,x=b.document||{},at.gsap=Ii,(b.gsapVersions||(b.gsapVersions=[])).push(Ii.version),lt(ht||b.GreenSockGlobals||!b.gsap&&b||{}),Te.forEach(Le)),i="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&n.sleep(),e=i||function(t){return setTimeout(t,u-1e3*n.time+1|0)},S=1,m(2))},sleep:function(){(i?cancelAnimationFrame:clearTimeout)(t),S=0,e=pt},lagSmoothing:function(t,e){a=t||1/0,h=Math.min(e||33,a)},fps:function(t){d=1e3/(t||240),u=1e3*n.time+d},add:function(t,e,i){var r=e?function(e,i,s,o){t(e,i,s,o),n.remove(r)}:t;return n.remove(t),p[i?"unshift":"push"](r),Ne(),r},remove:function(t,e){~(e=p.indexOf(t))&&p.splice(e,1)&&s>=e&&s--},_listeners:p}}(),Ne=function(){return!S&&He.wake()},Ve={},je=/^[\d.\-M][\d.\-,\s]/,We=/["']/g,Ye=function(t){for(var e,i,n,r={},s=t.substr(1,t.length-3).split(":"),o=s[0],a=1,h=s.length;a<h;a++)i=s[a],e=a!==h-1?i.lastIndexOf(","):i.length,n=i.substr(0,e),r[o]=isNaN(n)?n.replace(We,"").trim():+n,o=i.substr(e+1).trim();return r},$e=function(t){return function(e){return 1-t(1-e)}},Xe=function t(e,i){for(var n,r=e._first;r;)r instanceof ei?t(r,i):!r.vars.yoyoEase||r._yoyo&&r._repeat||r._yoyo===i||(r.timeline?t(r.timeline,i):(n=r._ease,r._ease=r._yEase,r._yEase=n,r._yoyo=i)),r=r._next},Ue=function(t,e){return t&&(Y(t)?t:Ve[t]||function(t){var e,i,n,r,s=(t+"").split("("),o=Ve[s[0]];return o&&s.length>1&&o.config?o.config.apply(null,~t.indexOf("{")?[Ye(s[1])]:(e=t,i=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",i),e.substring(i,~r&&r<n?e.indexOf(")",n+1):n)).split(",").map(Dt)):Ve._CE&&je.test(t)?Ve._CE("",t):o}(t))||e},qe=function(t,e,i,n){void 0===i&&(i=function(t){return 1-e(1-t)}),void 0===n&&(n=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var r,s={easeIn:e,easeOut:i,easeInOut:n};return kt(t,(function(t){for(var e in Ve[t]=at[t]=s,Ve[r=t.toLowerCase()]=i,s)Ve[r+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Ve[t+"."+e]=s[e]})),s},Je=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Qe=function t(e,i,n){var r=i>=1?i:1,s=(n||(e?.3:.45))/(i<1?i:1),o=s/G*(Math.asin(1/r)||0),a=function(t){return 1===t?1:r*Math.pow(2,-10*t)*j((t-o)*s)+1},h="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Je(a);return s=G/s,h.config=function(i,n){return t(e,i,n)},h},Ze=function t(e,i){void 0===i&&(i=1.70158);var n=function(t){return t?--t*t*((i+1)*t+i)+1:0},r="out"===e?n:"in"===e?function(t){return 1-n(1-t)}:Je(n);return r.config=function(i){return t(e,i)},r};kt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var i=e<5?e+1:e;qe(t+",Power"+(i-1),e?function(t){return Math.pow(t,i)}:function(t){return t},(function(t){return 1-Math.pow(1-t,i)}),(function(t){return t<.5?Math.pow(2*t,i)/2:1-Math.pow(2*(1-t),i)/2}))})),Ve.Linear.easeNone=Ve.none=Ve.Linear.easeIn,qe("Elastic",Qe("in"),Qe("out"),Qe()),k=7.5625,O=2*(L=1/(T=2.75)),R=2.5*L,qe("Bounce",(function(t){return 1-F(1-t)}),F=function(t){return t<L?k*t*t:t<O?k*Math.pow(t-1.5/T,2)+.75:t<R?k*(t-=2.25/T)*t+.9375:k*Math.pow(t-2.625/T,2)+.984375}),qe("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),qe("Circ",(function(t){return-(N(1-t*t)-1)})),qe("Sine",(function(t){return 1===t?1:1-V(t*I)})),qe("Back",Ze("in"),Ze("out"),Ze()),Ve.SteppedEase=Ve.steps=at.SteppedEase={config:function(t,e){void 0===t&&(t=1);var i=1/t,n=t+(e?0:1),r=e?1:0;return function(t){return((n*de(0,.99999999,t)|0)+r)*i}}},D.ease=Ve["quad.out"],kt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return Mt+=t+","+t+"Params,"}));var Ke=function(t,e){this.id=H++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:St,this.set=e?e.getSetter:_i},ti=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,se(this,+t.duration,1,1),this.data=t.data,y&&(this._ctx=y,y.data.push(this)),S||He.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,se(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Ne(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Zt(this,t),!i._dp||i.parent||Kt(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&te(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===z||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),Pt(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ut(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ut(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*i,e):this._repeat?qt(this._tTime,i)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var i=this.parent&&this._ts?Jt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(de(-Math.abs(this._delay),this._tDur,i),!1!==e),Qt(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ne(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==z&&(this._tTime-=z)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&te(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(q(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Jt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=ft);var e=v;return v=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),v=e,this},e.globalTime=function(t){for(var e=this,i=arguments.length?t:e.rawTime();e;)i=e._start+i/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):i},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,oe(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,oe(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(he(this,t),q(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,q(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,i=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<this.endTime(!0)-z))},e.eventCallback=function(t,e,i){var n=this.vars;return arguments.length>1?(e?(n[t]=e,i&&(n[t+"Params"]=i),"onUpdate"===t&&(this._onUpdate=e)):delete n[t],this):n[t]},e.then=function(t){var e=this;return new Promise((function(i){var n=Y(t)?t:Bt,r=function(){var t=e.then;e.then=null,Y(n)&&(n=n(e))&&(n.then||n===e)&&(e.then=t),i(n),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?r():e._prom=r}))},e.kill=function(){ke(this)},t}();zt(ti.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:-1e-8,_prom:0,_ps:!1,_rts:1});var ei=function(t){function e(e,i){var n;return void 0===e&&(e={}),(n=t.call(this,e)||this).labels={},n.smoothChildTiming=!!e.smoothChildTiming,n.autoRemoveChildren=!!e.autoRemoveChildren,n._sort=q(e.sortChildren),w&&te(e.parent||w,g(n),i),e.reversed&&n.reverse(),e.paused&&n.paused(!0),e.scrollTrigger&&ee(g(n),e.scrollTrigger),n}f(e,t);var i=e.prototype;return i.to=function(t,e,i){return le(0,arguments,this),this},i.from=function(t,e,i){return le(1,arguments,this),this},i.fromTo=function(t,e,i,n){return le(2,arguments,this),this},i.set=function(t,e,i){return e.duration=0,e.parent=this,Nt(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new ui(t,e,he(this,i),1),this},i.call=function(t,e,i){return te(this,ui.delayedCall(0,t,e),i)},i.staggerTo=function(t,e,i,n,r,s,o){return i.duration=e,i.stagger=i.stagger||n,i.onComplete=s,i.onCompleteParams=o,i.parent=this,new ui(t,i,he(this,r)),this},i.staggerFrom=function(t,e,i,n,r,s,o){return i.runBackwards=1,Nt(i).immediateRender=q(i.immediateRender),this.staggerTo(t,e,i,n,r,s,o)},i.staggerFromTo=function(t,e,i,n,r,s,o,a){return n.startAt=i,Nt(n).immediateRender=q(n.immediateRender),this.staggerTo(t,e,n,r,s,o,a)},i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u,p,m,g=this._time,f=this._dirty?this.totalDuration():this._tDur,_=this._dur,y=t<=0?0:Lt(t),b=this._zTime<0!=t<0&&(this._initted||!_);if(this!==w&&y>f&&t>=0&&(y=f),y!==this._tTime||i||b){if(g!==this._time&&_&&(y+=this._time-g,t+=this._time-g),n=y,d=this._start,h=!(c=this._ts),b&&(_||(g=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(p=this._yoyo,a=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*a+t,e,i);if(n=Lt(y%a),y===f?(o=this._repeat,n=_):((o=~~(y/a))&&o===y/a&&(n=_,o--),n>_&&(n=_)),u=qt(this._tTime,a),!g&&this._tTime&&u!==o&&this._tTime-u*a-this._dur<=0&&(u=o),p&&1&o&&(n=_-n,m=1),o!==u&&!this._lock){var A=p&&1&u,x=A===(p&&1&o);if(o<u&&(A=!A),g=A?0:y%_?_:y,this._lock=1,this.render(g||(m?0:Lt(o*a)),e,!_)._lock=0,this._tTime=y,!e&&this.parent&&Se(this,"onRepeat"),this.vars.repeatRefresh&&!m&&(this.invalidate()._lock=1),g&&g!==this._time||h!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,f=this._tDur,x&&(this._lock=2,g=A?_:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!m&&this.invalidate()),this._lock=0,!this._ts&&!h)return this;Xe(this,m)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(l=function(t,e,i){var n;if(i>e)for(n=t._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>e)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<e)return n;n=n._prev}}(this,Lt(g),Lt(n)),l&&(y-=n-(n=l._start))),this._tTime=y,this._time=n,this._act=!c,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,g=0),!g&&n&&!e&&!o&&(Se(this,"onStart"),this._tTime!==y))return this;if(n>=g&&t>=0)for(r=this._first;r;){if(s=r._next,(r._act||n>=r._start)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,e,i),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=-1e-8);break}}r=s}else{r=this._last;for(var M=t<0?t:n;r;){if(s=r._prev,(r._act||M<=r._end)&&r._ts&&l!==r){if(r.parent!==this)return this.render(t,e,i);if(r.render(r._ts>0?(M-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(M-r._start)*r._ts,e,i||v&&(r._initted||r._startAt)),n!==this._time||!this._ts&&!h){l=0,s&&(y+=this._zTime=M?-1e-8:z);break}}r=s}}if(l&&!e&&(this.pause(),l.render(n>=g?0:-1e-8)._zTime=n>=g?1:-1,this._ts))return this._start=d,Qt(this),this.render(t,e,i);this._onUpdate&&!e&&Se(this,"onUpdate",!0),(y===f&&this._tTime>=this.totalDuration()||!y&&g)&&(d!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||((t||!_)&&(y===f&&this._ts>0||!y&&this._ts<0)&&Wt(this,1),e||t<0&&!g||!y&&!g&&f||(Se(this,y===f&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<f&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(t,e){var i=this;if($(e)||(e=he(this,e,t)),!(t instanceof ti)){if(K(t))return t.forEach((function(t){return i.add(t,e)})),this;if(W(t))return this.addLabel(t,e);if(!Y(t))return this;t=ui.delayedCall(0,t)}return this!==t?te(this,t,e):this},i.getChildren=function(t,e,i,n){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=-1e8);for(var r=[],s=this._first;s;)s._start>=n&&(s instanceof ui?e&&r.push(s):(i&&r.push(s),t&&r.push.apply(r,s.getChildren(!0,e,i)))),s=s._next;return r},i.getById=function(t){for(var e=this.getChildren(1,1,1),i=e.length;i--;)if(e[i].vars.id===t)return e[i]},i.remove=function(t){return W(t)?this.removeLabel(t):Y(t)?this.killTweensOf(t):(jt(this,t),t===this._recent&&(this._recent=this._last),Yt(this))},i.totalTime=function(e,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Lt(He.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,i),this._forcing=0,this):this._tTime},i.addLabel=function(t,e){return this.labels[t]=he(this,e),this},i.removeLabel=function(t){return delete this.labels[t],this},i.addPause=function(t,e,i){var n=ui.delayedCall(0,e||pt,i);return n.data="isPause",this._hasPause=1,te(this,n,he(this,t))},i.removePause=function(t){var e=this._first;for(t=he(this,t);e;)e._start===t&&"isPause"===e.data&&Wt(e),e=e._next},i.killTweensOf=function(t,e,i){for(var n=this.getTweensOf(t,i),r=n.length;r--;)ii!==n[r]&&n[r].kill(t,e);return this},i.getTweensOf=function(t,e){for(var i,n=[],r=fe(t),s=this._first,o=$(e);s;)s instanceof ui?Rt(s._targets,r)&&(o?(!ii||s._initted&&s._ts)&&s.globalTime(0)<=e&&s.globalTime(s.totalDuration())>e:!e||s.isActive())&&n.push(s):(i=s.getTweensOf(r,e)).length&&n.push.apply(n,i),s=s._next;return n},i.tweenTo=function(t,e){e=e||{};var i,n=this,r=he(n,t),s=e,o=s.startAt,a=s.onStart,h=s.onStartParams,l=s.immediateRender,c=ui.to(n,zt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:r,overwrite:"auto",duration:e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale())||z,onStart:function(){if(n.pause(),!i){var t=e.duration||Math.abs((r-(o&&"time"in o?o.time:n._time))/n.timeScale());c._dur!==t&&se(c,t,0,1).render(c._time,!0,!0),i=1}a&&a.apply(c,h||[])}},e));return l?c.render(0):c},i.tweenFromTo=function(t,e,i){return this.tweenTo(e,zt({startAt:{time:he(this,t)}},i))},i.recent=function(){return this._recent},i.nextLabel=function(t){return void 0===t&&(t=this._time),Ee(this,he(this,t))},i.previousLabel=function(t){return void 0===t&&(t=this._time),Ee(this,he(this,t),1)},i.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+z)},i.shiftChildren=function(t,e,i){void 0===i&&(i=0);for(var n,r=this._first,s=this.labels;r;)r._start>=i&&(r._start+=t,r._end+=t),r=r._next;if(e)for(n in s)s[n]>=i&&(s[n]+=t);return Yt(this)},i.invalidate=function(e){var i=this._first;for(this._lock=0;i;)i.invalidate(e),i=i._next;return t.prototype.invalidate.call(this,e)},i.clear=function(t){void 0===t&&(t=!0);for(var e,i=this._first;i;)e=i._next,this.remove(i),i=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Yt(this)},i.totalDuration=function(t){var e,i,n,r=0,s=this,o=s._last,a=B;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-t:t));if(s._dirty){for(n=s.parent;o;)e=o._prev,o._dirty&&o.totalDuration(),(i=o._start)>a&&s._sort&&o._ts&&!s._lock?(s._lock=1,te(s,o,i-o._delay,1)._lock=0):a=i,i<0&&o._ts&&(r-=i,(!n&&!s._dp||n&&n.smoothChildTiming)&&(s._start+=i/s._ts,s._time-=i,s._tTime-=i),s.shiftChildren(-i,!1,-Infinity),a=0),o._end>r&&o._ts&&(r=o._end),o=e;se(s,s===w&&s._time>r?s._time:r,1,1),s._dirty=0}return s._tDur},e.updateRoot=function(t){if(w._ts&&(Pt(w,Jt(t,w)),C=He.frame),He.frame>=At){At+=P.autoSleep||120;var e=w._first;if((!e||!e._ts)&&P.autoSleep&&He._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||He.sleep()}}},e}(ti);zt(ei.prototype,{_lock:0,_hasPause:0,_forcing:0});var ii,ni,ri=function(t,e,i,n,r,s,o){var a,h,l,c,d,u,p,m,g=new Ei(this._pt,t,e,0,1,wi,null,r),f=0,_=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=Me(n)),s&&(s(m=[i,n],t,e),i=m[0],n=m[1]),h=i.match(nt)||[];a=nt.exec(n);)c=a[0],d=n.substring(f,a.index),l?l=(l+1)%5:"rgba("===d.substr(-5)&&(l=1),c!==h[_++]&&(u=parseFloat(h[_-1])||0,g._pt={_next:g._pt,p:d||1===_?d:",",s:u,c:"="===c.charAt(1)?Ot(u,c)-u:parseFloat(c)-u,m:l&&l<4?Math.round:0},f=nt.lastIndex);return g.c=f<n.length?n.substring(f,n.length):"",g.fp=o,(rt.test(n)||p)&&(g.e=0),this._pt=g,g},si=function(t,e,i,n,r,s,o,a,h,l){Y(n)&&(n=n(r||0,t,s));var c,d=t[e],u="get"!==i?i:Y(d)?h?t[e.indexOf("set")||!Y(t["get"+e.substr(3)])?e:"get"+e.substr(3)](h):t[e]():d,p=Y(d)?h?gi:mi:pi;if(W(n)&&(~n.indexOf("random(")&&(n=Me(n)),"="===n.charAt(1)&&((c=Ot(u,n)+(ue(u)||0))||0===c)&&(n=c)),!l||u!==n||ni)return isNaN(u*n)||""===n?(!d&&!(e in t)&&ct(e,n),ri.call(this,t,e,u,n,p,a||P.stringFilter,h)):(c=new Ei(this._pt,t,e,+u||0,n-(u||0),"boolean"==typeof d?yi:vi,0,p),h&&(c.fp=h),o&&c.modifier(o,this,t),this._pt=c)},oi=function(t,e,i,n,r,s){var o,a,h,l;if(wt[t]&&!1!==(o=new wt[t]).init(r,o.rawVars?e[t]:function(t,e,i,n,r){if(Y(t)&&(t=li(t,r,e,i,n)),!U(t)||t.style&&t.nodeType||K(t)||Z(t))return W(t)?li(t,r,e,i,n):t;var s,o={};for(s in t)o[s]=li(t[s],r,e,i,n);return o}(e[t],n,r,s,i),i,n,s)&&(i._pt=a=new Ei(i._pt,r,t,0,1,o.render,o,0,o.priority),i!==E))for(h=i._ptLookup[i._targets.indexOf(r)],l=o._props.length;l--;)h[o._props[l]]=a;return o},ai=function t(e,i,n){var r,s,o,a,h,l,c,d,u,p,m,g,f,y=e.vars,b=y.ease,A=y.startAt,x=y.immediateRender,M=y.lazy,C=y.onUpdate,E=y.runBackwards,S=y.yoyoEase,k=y.keyframes,T=y.autoRevert,L=e._dur,O=e._startAt,R=e._targets,F=e.parent,P=F&&"nested"===F.data?F.vars.targets:R,G="auto"===e._overwrite&&!_,I=e.timeline;if(I&&(!k||!b)&&(b="none"),e._ease=Ue(b,D.ease),e._yEase=S?$e(Ue(!0===S?b:S,D.ease)):0,S&&e._yoyo&&!e._repeat&&(S=e._yEase,e._yEase=e._ease,e._ease=S),e._from=!I&&!!y.runBackwards,!I||k&&!y.stagger){if(g=(d=R[0]?Et(R[0]).harness:0)&&y[d.prop],r=Ht(y,_t),O&&(O._zTime<0&&O.progress(1),i<0&&E&&x&&!T?O.render(-1,!0):O.revert(E&&L?gt:mt),O._lazy=0),A){if(Wt(e._startAt=ui.set(R,zt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!O&&q(M),startAt:null,delay:0,onUpdate:C&&function(){return Se(e,"onUpdate")},stagger:0},A))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v||!x&&!T)&&e._startAt.revert(gt),x&&L&&i<=0&&n<=0)return void(i&&(e._zTime=i))}else if(E&&L&&!O)if(i&&(x=!1),o=zt({overwrite:!1,data:"isFromStart",lazy:x&&!O&&q(M),immediateRender:x,stagger:0,parent:F},r),g&&(o[d.prop]=g),Wt(e._startAt=ui.set(R,o)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(v?e._startAt.revert(gt):e._startAt.render(-1,!0)),e._zTime=i,x){if(!i)return}else t(e._startAt,z,z);for(e._pt=e._ptCache=0,M=L&&q(M)||M&&!L,s=0;s<R.length;s++){if(c=(h=R[s])._gsap||Ct(R)[s]._gsap,e._ptLookup[s]=p={},yt[c.id]&&vt.length&&Ft(),m=P===R?s:P.indexOf(h),d&&!1!==(u=new d).init(h,g||r,e,m,P)&&(e._pt=a=new Ei(e._pt,h,u.name,0,1,u.render,u,0,u.priority),u._props.forEach((function(t){p[t]=a})),u.priority&&(l=1)),!d||g)for(o in r)wt[o]&&(u=oi(o,r,e,m,h,P))?u.priority&&(l=1):p[o]=a=si.call(e,h,o,"get",r[o],m,P,0,y.stringFilter);e._op&&e._op[s]&&e.kill(h,e._op[s]),G&&e._pt&&(ii=e,w.killTweensOf(h,p,e.globalTime(i)),f=!e.parent,ii=0),e._pt&&M&&(yt[c.id]=1)}l&&Ci(e),e._onInit&&e._onInit(e)}e._onUpdate=C,e._initted=(!e._op||e._pt)&&!f,k&&i<=0&&I.render(B,!0,!0)},hi=function(t,e,i,n){var r,s,o=e.ease||n||"power1.inOut";if(K(e))s=i[t]||(i[t]=[]),e.forEach((function(t,i){return s.push({t:i/(e.length-1)*100,v:t,e:o})}));else for(r in e)s=i[r]||(i[r]=[]),"ease"===r||s.push({t:parseFloat(t),v:e[r],e:o})},li=function(t,e,i,n,r){return Y(t)?t.call(e,i,n,r):W(t)&&~t.indexOf("random(")?Me(t):t},ci=Mt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",di={};kt(ci+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return di[t]=1}));var ui=function(t){function e(e,i,n,r){var s;"number"==typeof i&&(n.duration=i,i=n,n=null);var o,a,h,l,c,d,u,p,m=(s=t.call(this,r?i:Nt(i))||this).vars,f=m.duration,v=m.delay,y=m.immediateRender,b=m.stagger,A=m.overwrite,x=m.keyframes,M=m.defaults,C=m.scrollTrigger,E=m.yoyoEase,S=i.parent||w,k=(K(e)||Z(e)?$(e[0]):"length"in i)?[e]:fe(e);if(s._targets=k.length?Ct(k):dt("GSAP target "+e+" not found. https://gsap.com",!P.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=A,x||b||Q(f)||Q(v)){if(i=s.vars,(o=s.timeline=new ei({data:"nested",defaults:M||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),o.parent=o._dp=g(s),o._start=0,b||Q(f)||Q(v)){if(l=k.length,u=b&&ye(b),U(b))for(c in b)~ci.indexOf(c)&&(p||(p={}),p[c]=b[c]);for(a=0;a<l;a++)(h=Ht(i,di)).stagger=0,E&&(h.yoyoEase=E),p&&Gt(h,p),d=k[a],h.duration=+li(f,g(s),a,d,k),h.delay=(+li(v,g(s),a,d,k)||0)-s._delay,!b&&1===l&&h.delay&&(s._delay=v=h.delay,s._start+=v,h.delay=0),o.to(d,h,u?u(a,d,k):0),o._ease=Ve.none;o.duration()?f=v=0:s.timeline=0}else if(x){Nt(zt(o.vars.defaults,{ease:"none"})),o._ease=Ue(x.ease||i.ease||"none");var T,L,O,R=0;if(K(x))x.forEach((function(t){return o.to(k,t,">")})),o.duration();else{for(c in h={},x)"ease"===c||"easeEach"===c||hi(c,x[c],h,x.easeEach);for(c in h)for(T=h[c].sort((function(t,e){return t.t-e.t})),R=0,a=0;a<T.length;a++)(O={ease:(L=T[a]).e,duration:(L.t-(a?T[a-1].t:0))/100*f})[c]=L.v,o.to(k,O,R),R+=O.duration;o.duration()<f&&o.to({},{duration:f-o.duration()})}}f||s.duration(f=o.duration())}else s.timeline=0;return!0!==A||_||(ii=g(s),w.killTweensOf(k),ii=0),te(S,g(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(y||!f&&!x&&s._start===Lt(S._time)&&q(y)&&Xt(g(s))&&"nested"!==S.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-v)||0)),C&&ee(g(s),C),s}f(e,t);var i=e.prototype;return i.render=function(t,e,i){var n,r,s,o,a,h,l,c,d,u=this._time,p=this._tDur,m=this._dur,g=t<0,f=t>p-z&&!g?p:t<z?0:t;if(m){if(f!==this._tTime||!t||i||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(n=f,c=this.timeline,this._repeat){if(o=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*o+t,e,i);if(n=Lt(f%o),f===p?(s=this._repeat,n=m):((s=~~(f/o))&&s===Lt(f/o)&&(n=m,s--),n>m&&(n=m)),(h=this._yoyo&&1&s)&&(d=this._yEase,n=m-n),a=qt(this._tTime,o),n===u&&!i&&this._initted&&s===a)return this._tTime=f,this;s!==a&&(c&&this._yEase&&Xe(c,h),this.vars.repeatRefresh&&!h&&!this._lock&&this._time!==o&&this._initted&&(this._lock=i=1,this.render(Lt(o*s),!0).invalidate()._lock=0))}if(!this._initted){if(ie(this,g?t:n,i,e,f))return this._tTime=0,this;if(!(u===this._time||i&&this.vars.repeatRefresh&&s!==a))return this;if(m!==this._dur)return this.render(t,e,i)}if(this._tTime=f,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(d||this._ease)(n/m),this._from&&(this.ratio=l=1-l),n&&!u&&!e&&!s&&(Se(this,"onStart"),this._tTime!==f))return this;for(r=this._pt;r;)r.r(l,r.d),r=r._next;c&&c.render(t<0?t:c._dur*c._ease(n/this._dur),e,i)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&$t(this,t,0,i),Se(this,"onUpdate")),this._repeat&&s!==a&&this.vars.onRepeat&&!e&&this.parent&&Se(this,"onRepeat"),f!==this._tDur&&f||this._tTime!==f||(g&&!this._onUpdate&&$t(this,t,0,!0),(t||!m)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Wt(this,1),e||g&&!u||!(f||u||h)||(Se(this,f===p?"onComplete":"onReverseComplete",!0),this._prom&&!(f<p&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,i,n){var r,s,o,a=t.ratio,h=e<0||!e&&(!t._start&&ne(t)&&(t._initted||!re(t))||(t._ts<0||t._dp._ts<0)&&!re(t))?0:1,l=t._rDelay,c=0;if(l&&t._repeat&&(c=de(0,t._tDur,e),s=qt(c,l),t._yoyo&&1&s&&(h=1-h),s!==qt(t._tTime,l)&&(a=1-h,t.vars.repeatRefresh&&t._initted&&t.invalidate())),h!==a||v||n||t._zTime===z||!e&&t._zTime){if(!t._initted&&ie(t,e,n,i,c))return;for(o=t._zTime,t._zTime=e||(i?z:0),i||(i=e&&!o),t.ratio=h,t._from&&(h=1-h),t._time=0,t._tTime=c,r=t._pt;r;)r.r(h,r.d),r=r._next;e<0&&$t(t,e,0,!0),t._onUpdate&&!i&&Se(t,"onUpdate"),c&&t._repeat&&!i&&t.parent&&Se(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===h&&(h&&Wt(t,1),i||v||(Se(t,h?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,i);return this},i.targets=function(){return this._targets},i.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},i.resetTo=function(t,e,i,n,r){S||He.wake(),this._ts||this.play();var s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||ai(this,s),function(t,e,i,n,r,s,o,a){var h,l,c,d,u=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!u)for(u=t._ptCache[e]=[],c=t._ptLookup,d=t._targets.length;d--;){if((h=c[d][e])&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==e&&h.fp!==e;)h=h._next;if(!h)return ni=1,t.vars[e]="+=0",ai(t,o),ni=0,a?dt(e+" not eligible for reset"):1;u.push(h)}for(d=u.length;d--;)(h=(l=u[d])._pt||l).s=!n&&0!==n||r?h.s+(n||0)+s*h.c:n,h.c=i-h.s,l.e&&(l.e=Tt(i)+ue(l.e)),l.b&&(l.b=h.s+ue(l.b))}(this,t,e,i,n,this._ease(s/this._dur),s,r)?this.resetTo(t,e,i,n,1):(Zt(this,0),this.parent||Vt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?ke(this):this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,ii&&!0!==ii.vars.overwrite)._first||ke(this),this.parent&&i!==this.timeline.totalDuration()&&se(this,this._dur*this.timeline._tDur/i,0,1),this}var n,r,s,o,a,h,l,c=this._targets,d=t?fe(t):c,u=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var i=t.length,n=i===e.length;n&&i--&&t[i]===e[i];);return i<0}(c,d))return"all"===e&&(this._pt=0),ke(this);for(n=this._op=this._op||[],"all"!==e&&(W(e)&&(a={},kt(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var i,n,r,s,o=t[0]?Et(t[0]).harness:0,a=o&&o.aliases;if(!a)return e;for(n in i=Gt({},e),a)if(n in i)for(r=(s=a[n].split(",")).length;r--;)i[s[r]]=i[n];return i}(c,e)),l=c.length;l--;)if(~d.indexOf(c[l]))for(a in r=u[l],"all"===e?(n[l]=e,o=r,s={}):(s=n[l]=n[l]||{},o=e),o)(h=r&&r[a])&&("kill"in h.d&&!0!==h.d.kill(a)||jt(this,h,"_pt"),delete r[a]),"all"!==s&&(s[a]=1);return this._initted&&!this._pt&&p&&ke(this),this},e.to=function(t,i){return new e(t,i,arguments[2])},e.from=function(t,e){return le(1,arguments)},e.delayedCall=function(t,i,n,r){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:i,onReverseComplete:i,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:r})},e.fromTo=function(t,e,i){return le(2,arguments)},e.set=function(t,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(t,i)},e.killTweensOf=function(t,e,i){return w.killTweensOf(t,e,i)},e}(ti);zt(ui.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),kt("staggerTo,staggerFrom,staggerFromTo",(function(t){ui[t]=function(){var e=new ei,i=pe.call(arguments,0);return i.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,i)}}));var pi=function(t,e,i){return t[e]=i},mi=function(t,e,i){return t[e](i)},gi=function(t,e,i,n){return t[e](n.fp,i)},fi=function(t,e,i){return t.setAttribute(e,i)},_i=function(t,e){return Y(t[e])?mi:X(t[e])&&t.setAttribute?fi:pi},vi=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},yi=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},wi=function(t,e){var i=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round(1e4*(i.s+i.c*t))/1e4)+n,i=i._next;n+=e.c}e.set(e.t,e.p,n,e)},bi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},Ai=function(t,e,i,n){for(var r,s=this._pt;s;)r=s._next,s.p===n&&s.modifier(t,e,i),s=r},xi=function(t){for(var e,i,n=this._pt;n;)i=n._next,n.p===t&&!n.op||n.op===t?jt(this,n,"_pt"):n.dep||(e=1),n=i;return!e},Mi=function(t,e,i,n){n.mSet(t,e,n.m.call(n.tween,i,n.mt),n)},Ci=function(t){for(var e,i,n,r,s=t._pt;s;){for(e=s._next,i=n;i&&i.pr>s.pr;)i=i._next;(s._prev=i?i._prev:r)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:r=s,s=e}t._pt=n},Ei=function(){function t(t,e,i,n,r,s,o,a,h){this.t=e,this.s=n,this.c=r,this.p=i,this.r=s||vi,this.d=o||this,this.set=a||pi,this.pr=h||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,i){this.mSet=this.mSet||this.set,this.set=Mi,this.m=t,this.mt=i,this.tween=e},t}();kt(Mt+"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(t){return _t[t]=1})),at.TweenMax=at.TweenLite=ui,at.TimelineLite=at.TimelineMax=ei,w=new ei({sortChildren:!1,defaults:D,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),P.stringFilter=Ie;var Si=[],ki={},Ti=[],Li=0,Oi=0,Ri=function(t){return(ki[t]||Ti).map((function(t){return t()}))},Fi=function(){var t=Date.now(),e=[];t-Li>2&&(Ri("matchMediaInit"),Si.forEach((function(t){var i,n,r,s,o=t.queries,a=t.conditions;for(n in o)(i=b.matchMedia(o[n]).matches)&&(r=1),i!==a[n]&&(a[n]=i,s=1);s&&(t.revert(),r&&e.push(t))})),Ri("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),Li=t,Ri("matchMedia"))},Pi=function(){function t(t,e){this.selector=e&&_e(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Oi++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,i){Y(t)&&(i=e,e=t,t=Y);var n=this,r=function(){var t,r=y,s=n.selector;return r&&r!==n&&r.data.push(n),i&&(n.selector=_e(i)),y=n,t=e.apply(n,arguments),Y(t)&&n._r.push(t),y=r,n.selector=s,n.isReverted=!1,t};return n.last=r,t===Y?r(n,(function(t){return n.add(null,t)})):t?n[t]=r:r},e.ignore=function(t){var e=y;y=null,t(this),y=e},e.getTweens=function(){var e=[];return this.data.forEach((function(i){return i instanceof t?e.push.apply(e,i.getTweens()):i instanceof ui&&!(i.parent&&"nested"===i.parent.data)&&e.push(i)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var i=this;if(t?function(){for(var e,n=i.getTweens(),r=i.data.length;r--;)"isFlip"===(e=i.data[r]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return n.splice(n.indexOf(t),1)})));for(n.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),r=i.data.length;r--;)(e=i.data[r])instanceof ei?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof ui)&&e.revert&&e.revert(t);i._r.forEach((function(e){return e(t,i)})),i.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var n=Si.length;n--;)Si[n].id===this.id&&Si.splice(n,1)},e.revert=function(t){this.kill(t||{})},t}(),Di=function(){function t(t){this.contexts=[],this.scope=t,y&&y.data.push(this)}var e=t.prototype;return e.add=function(t,e,i){U(t)||(t={matches:t});var n,r,s,o=new Pi(0,i||this.scope),a=o.conditions={};for(r in y&&!o.selector&&(o.selector=y.selector),this.contexts.push(o),e=o.add("onMatch",e),o.queries=t,t)"all"===r?s=1:(n=b.matchMedia(t[r]))&&(Si.indexOf(o)<0&&Si.push(o),(a[r]=n.matches)&&(s=1),n.addListener?n.addListener(Fi):n.addEventListener("change",Fi));return s&&e(o,(function(t){return o.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Bi={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach((function(t){return Le(t)}))},timeline:function(t){return new ei(t)},getTweensOf:function(t,e){return w.getTweensOf(t,e)},getProperty:function(t,e,i,n){W(t)&&(t=fe(t)[0]);var r=Et(t||{}).get,s=i?Bt:Dt;return"native"===i&&(i=""),t?e?s((wt[e]&&wt[e].get||r)(t,e,i,n)):function(e,i,n){return s((wt[e]&&wt[e].get||r)(t,e,i,n))}:t},quickSetter:function(t,e,i){if((t=fe(t)).length>1){var n=t.map((function(t){return Ii.quickSetter(t,e,i)})),r=n.length;return function(t){for(var e=r;e--;)n[e](t)}}t=t[0]||{};var s=wt[e],o=Et(t),a=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(e){var n=new s;E._pt=0,n.init(t,i?e+i:e,E,0,[t]),n.render(1,n),E._pt&&bi(1,E)}:o.set(t,a);return s?h:function(e){return h(t,a,i?e+i:e,o,1)}},quickTo:function(t,e,i){var n,r=Ii.to(t,Gt(((n={})[e]="+=0.1",n.paused=!0,n),i||{})),s=function(t,i,n){return r.resetTo(e,t,i,n)};return s.tween=r,s},isTweening:function(t){return w.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Ue(t.ease,D.ease)),It(D,t||{})},config:function(t){return It(P,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,n=t.plugins,r=t.defaults,s=t.extendTimeline;(n||"").split(",").forEach((function(t){return t&&!wt[t]&&!at[t]&&dt(e+" effect requires "+t+" plugin.")})),bt[e]=function(t,e,n){return i(fe(t),zt(e||{},r),n)},s&&(ei.prototype[e]=function(t,i,n){return this.add(bt[e](t,U(i)?i:(n=i)&&{},this),n)})},registerEase:function(t,e){Ve[t]=Ue(e)},parseEase:function(t,e){return arguments.length?Ue(t,e):Ve},getById:function(t){return w.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var i,n,r=new ei(t);for(r.smoothChildTiming=q(t.smoothChildTiming),w.remove(r),r._dp=0,r._time=r._tTime=w._time,i=w._first;i;)n=i._next,!e&&!i._dur&&i instanceof ui&&i.vars.onComplete===i._targets[0]||te(r,i,i._start-i._delay),i=n;return te(w,r,0),r},context:function(t,e){return t?new Pi(t,e):y},matchMedia:function(t){return new Di(t)},matchMediaRefresh:function(){return Si.forEach((function(t){var e,i,n=t.conditions;for(i in n)n[i]&&(n[i]=!1,e=1);e&&t.revert()}))||Fi()},addEventListener:function(t,e){var i=ki[t]||(ki[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=ki[t],n=i&&i.indexOf(e);n>=0&&i.splice(n,1)},utils:{wrap:function t(e,i,n){var r=i-e;return K(e)?xe(e,t(0,e.length),i):ce(n,(function(t){return(r+(t-e)%r)%r+e}))},wrapYoyo:function t(e,i,n){var r=i-e,s=2*r;return K(e)?xe(e,t(0,e.length-1),i):ce(n,(function(t){return e+((t=(s+(t-e)%s)%s||0)>r?s-t:t)}))},distribute:ye,random:Ae,snap:be,normalize:function(t,e,i){return Ce(t,e,0,1,i)},getUnit:ue,clamp:function(t,e,i){return ce(i,(function(i){return de(t,e,i)}))},splitColor:Pe,toArray:fe,selector:_e,mapRange:Ce,pipe:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(i){return t(parseFloat(i))+(e||ue(i))}},interpolate:function t(e,i,n,r){var s=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!s){var o,a,h,l,c,d=W(e),u={};if(!0===n&&(r=1)&&(n=null),d)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(h=[],l=e.length,c=l-2,a=1;a<l;a++)h.push(t(e[a-1],e[a]));l--,s=function(t){t*=l;var e=Math.min(c,~~t);return h[e](t-e)},n=i}else r||(e=Gt(K(e)?[]:{},e));if(!h){for(o in i)si.call(u,e,o,"get",i[o]);s=function(t){return bi(t,u)||(d?e.p:e)}}}return ce(n,s)},shuffle:ve},install:lt,effects:bt,ticker:He,updateRoot:ei.updateRoot,plugins:wt,globalTimeline:w,core:{PropTween:Ei,globals:ut,Tween:ui,Timeline:ei,Animation:ti,getCache:Et,_removeLinkedListItem:jt,reverting:function(){return v},context:function(t){return t&&y&&(y.data.push(t),t._ctx=y),y},suppressOverwrites:function(t){return _=t}}};kt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Bi[t]=ui[t]})),He.add(ei.updateRoot),E=Bi.to({},{duration:0});var zi=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},Gi=function(t,e){return{name:t,rawVars:1,init:function(t,i,n){n._onInit=function(t){var n,r;if(W(i)&&(n={},kt(i,(function(t){return n[t]=1})),i=n),e){for(r in n={},i)n[r]=e(i[r]);i=n}!function(t,e){var i,n,r,s=t._targets;for(i in e)for(n=s.length;n--;)(r=t._ptLookup[n][i])&&(r=r.d)&&(r._pt&&(r=zi(r,i)),r&&r.modifier&&r.modifier(e[i],t,s[n],i))}(t,i)}}}},Ii=Bi.registerPlugin({name:"attr",init:function(t,e,i,n,r){var s,o,a;for(s in this.tween=i,e)a=t.getAttribute(s)||"",(o=this.add(t,"setAttribute",(a||0)+"",e[s],n,r,0,0,s)).op=s,o.b=a,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)v?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},Gi("roundProps",we),Gi("modifiers"),Gi("snap",be))||Bi;ui.version=ei.version=Ii.version="3.12.5",M=1,J()&&Ne(),Ve.Power0,Ve.Power1,Ve.Power2,Ve.Power3,Ve.Power4,Ve.Linear,Ve.Quad,Ve.Cubic,Ve.Quart,Ve.Quint,Ve.Strong,Ve.Elastic,Ve.Back,Ve.SteppedEase,Ve.Bounce,Ve.Sine,Ve.Expo,Ve.Circ;var Hi,Ni,Vi,ji,Wi,Yi,$i,Xi,Ui={},qi=180/Math.PI,Ji=Math.PI/180,Qi=Math.atan2,Zi=/([A-Z])/g,Ki=/(left|right|width|margin|padding|x)/i,tn=/[\s,\(]\S/,en={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},nn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},rn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},sn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},on=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},an=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},hn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},ln=function(t,e,i){return t.style[e]=i},cn=function(t,e,i){return t.style.setProperty(e,i)},dn=function(t,e,i){return t._gsap[e]=i},un=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},pn=function(t,e,i,n,r){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(r,s)},mn=function(t,e,i,n,r){var s=t._gsap;s[e]=i,s.renderTransform(r,s)},gn="transform",fn=gn+"Origin",_n=function t(e,i){var n=this,r=this.target,s=r.style,o=r._gsap;if(e in Ui&&s){if(this.tfm=this.tfm||{},"transform"===e)return en.transform.split(",").forEach((function(e){return t.call(n,e,i)}));if(~(e=en[e]||e).indexOf(",")?e.split(",").forEach((function(t){return n.tfm[t]=Dn(r,t)})):this.tfm[e]=o.x?o[e]:Dn(r,e),e===fn&&(this.tfm.zOrigin=o.zOrigin),this.props.indexOf(gn)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(fn,i,"")),e=gn}(s||i)&&this.props.push(e,i,s[e])},vn=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},yn=function(){var t,e,i=this.props,n=this.target,r=n.style,s=n._gsap;for(t=0;t<i.length;t+=3)i[t+1]?n[i[t]]=i[t+2]:i[t+2]?r[i[t]]=i[t+2]:r.removeProperty("--"===i[t].substr(0,2)?i[t]:i[t].replace(Zi,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)s[e]=this.tfm[e];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(t=$i())&&t.isStart||r[gn]||(vn(r),s.zOrigin&&r[fn]&&(r[fn]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},wn=function(t,e){var i={target:t,props:[],revert:yn,save:_n};return t._gsap||Ii.core.getCache(t),e&&e.split(",").forEach((function(t){return i.save(t)})),i},bn=function(t,e){var i=Ni.createElementNS?Ni.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Ni.createElement(t);return i&&i.style?i:Ni.createElement(t)},An=function t(e,i,n){var r=getComputedStyle(e);return r[i]||r.getPropertyValue(i.replace(Zi,"-$1").toLowerCase())||r.getPropertyValue(i)||!n&&t(e,Mn(i)||i,1)||""},xn="O,Moz,ms,Ms,Webkit".split(","),Mn=function(t,e,i){var n=(e||Wi).style,r=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);r--&&!(xn[r]+t in n););return r<0?null:(3===r?"ms":r>=0?xn[r]:"")+t},Cn=function(){"undefined"!=typeof window&&window.document&&(Hi=window,Ni=Hi.document,Vi=Ni.documentElement,Wi=bn("div")||{style:{}},bn("div"),gn=Mn(gn),fn=gn+"Origin",Wi.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Xi=!!Mn("perspective"),$i=Ii.core.reverting,ji=1)},En=function t(e){var i,n=bn("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,o=this.style.cssText;if(Vi.appendChild(n),n.appendChild(this),this.style.display="block",e)try{i=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(i=this._gsapBBox());return r&&(s?r.insertBefore(this,s):r.appendChild(this)),Vi.removeChild(n),this.style.cssText=o,i},Sn=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},kn=function(t){var e;try{e=t.getBBox()}catch(i){e=En.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===En||(e=En.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+Sn(t,["x","cx","x1"])||0,y:+Sn(t,["y","cy","y1"])||0,width:0,height:0}},Tn=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!kn(t))},Ln=function(t,e){if(e){var i,n=t.style;e in Ui&&e!==fn&&(e=gn),n.removeProperty?("ms"!==(i=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty("--"===i?e:e.replace(Zi,"-$1").toLowerCase())):n.removeAttribute(e)}},On=function(t,e,i,n,r,s){var o=new Ei(t._pt,e,i,0,1,s?hn:an);return t._pt=o,o.b=n,o.e=r,t._props.push(i),o},Rn={deg:1,rad:1,turn:1},Fn={grid:1,flex:1},Pn=function t(e,i,n,r){var s,o,a,h,l=parseFloat(n)||0,c=(n+"").trim().substr((l+"").length)||"px",d=Wi.style,u=Ki.test(i),p="svg"===e.tagName.toLowerCase(),m=(p?"client":"offset")+(u?"Width":"Height"),g=100,f="px"===r,_="%"===r;if(r===c||!l||Rn[r]||Rn[c])return l;if("px"!==c&&!f&&(l=t(e,i,n,"px")),h=e.getCTM&&Tn(e),(_||"%"===c)&&(Ui[i]||~i.indexOf("adius")))return s=h?e.getBBox()[u?"width":"height"]:e[m],Tt(_?l/s*g:l/100*s);if(d[u?"width":"height"]=g+(f?c:r),o=~i.indexOf("adius")||"em"===r&&e.appendChild&&!p?e:e.parentNode,h&&(o=(e.ownerSVGElement||{}).parentNode),o&&o!==Ni&&o.appendChild||(o=Ni.body),(a=o._gsap)&&_&&a.width&&u&&a.time===He.time&&!a.uncache)return Tt(l/a.width*g);if(!_||"height"!==i&&"width"!==i)(_||"%"===c)&&!Fn[An(o,"display")]&&(d.position=An(e,"position")),o===e&&(d.position="static"),o.appendChild(Wi),s=Wi[m],o.removeChild(Wi),d.position="absolute";else{var v=e.style[i];e.style[i]=g+r,s=e[m],v?e.style[i]=v:Ln(e,i)}return u&&_&&((a=Et(o)).time=He.time,a.width=o[m]),Tt(f?s*l/g:s&&l?g/s*l:0)},Dn=function(t,e,i,n){var r;return ji||Cn(),e in en&&"transform"!==e&&~(e=en[e]).indexOf(",")&&(e=e.split(",")[0]),Ui[e]&&"transform"!==e?(r=$n(t,n),r="transformOrigin"!==e?r[e]:r.svg?r.origin:Xn(An(t,fn))+" "+r.zOrigin+"px"):(!(r=t.style[e])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=In[e]&&In[e](t,e,i)||An(t,e)||St(t,e)||("opacity"===e?1:0)),i&&!~(r+"").trim().indexOf(" ")?Pn(t,e,r,i)+i:r},Bn=function(t,e,i,n){if(!i||"none"===i){var r=Mn(e,t,1),s=r&&An(t,r,1);s&&s!==i?(e=r,i=s):"borderColor"===e&&(i=An(t,"borderTopColor"))}var o,a,h,l,c,d,u,p,m,g,f,_=new Ei(this._pt,t.style,e,0,1,wi),v=0,y=0;if(_.b=i,_.e=n,i+="","auto"===(n+="")&&(d=t.style[e],t.style[e]=n,n=An(t,e)||n,d?t.style[e]=d:Ln(t,e)),Ie(o=[i,n]),n=o[1],h=(i=o[0]).match(it)||[],(n.match(it)||[]).length){for(;a=it.exec(n);)u=a[0],m=n.substring(v,a.index),c?c=(c+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(c=1),u!==(d=h[y++]||"")&&(l=parseFloat(d)||0,f=d.substr((l+"").length),"="===u.charAt(1)&&(u=Ot(l,u)+f),p=parseFloat(u),g=u.substr((p+"").length),v=it.lastIndex-g.length,g||(g=g||P.units[e]||f,v===n.length&&(n+=g,_.e+=g)),f!==g&&(l=Pn(t,e,d,g)||0),_._pt={_next:_._pt,p:m||1===y?m:",",s:l,c:p-l,m:c&&c<4||"zIndex"===e?Math.round:0});_.c=v<n.length?n.substring(v,n.length):""}else _.r="display"===e&&"none"===n?hn:an;return rt.test(n)&&(_.e=0),this._pt=_,_},zn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Gn=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i,n,r,s=e.t,o=s.style,a=e.u,h=s._gsap;if("all"===a||!0===a)o.cssText="",n=1;else for(r=(a=a.split(",")).length;--r>-1;)i=a[r],Ui[i]&&(n=1,i="transformOrigin"===i?fn:gn),Ln(s,i);n&&(Ln(s,gn),h&&(h.svg&&s.removeAttribute("transform"),$n(s,1),h.uncache=1,vn(o)))}},In={clearProps:function(t,e,i,n,r){if("isFromStart"!==r.data){var s=t._pt=new Ei(t._pt,e,i,0,0,Gn);return s.u=n,s.pr=-10,s.tween=r,t._props.push(i),1}}},Hn=[1,0,0,1,0,0],Nn={},Vn=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},jn=function(t){var e=An(t,gn);return Vn(e)?Hn:e.substr(7).match(et).map(Tt)},Wn=function(t,e){var i,n,r,s,o=t._gsap||Et(t),a=t.style,h=jn(t);return o.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(h=[(r=t.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?Hn:h:(h!==Hn||t.offsetParent||t===Vi||o.svg||(r=a.display,a.display="block",(i=t.parentNode)&&t.offsetParent||(s=1,n=t.nextElementSibling,Vi.appendChild(t)),h=jn(t),r?a.display=r:Ln(t,"display"),s&&(n?i.insertBefore(t,n):i?i.appendChild(t):Vi.removeChild(t))),e&&h.length>6?[h[0],h[1],h[4],h[5],h[12],h[13]]:h)},Yn=function(t,e,i,n,r,s){var o,a,h,l=t._gsap,c=r||Wn(t,!0),d=l.xOrigin||0,u=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=c[0],f=c[1],_=c[2],v=c[3],y=c[4],w=c[5],b=e.split(" "),A=parseFloat(b[0])||0,x=parseFloat(b[1])||0;i?c!==Hn&&(a=g*v-f*_)&&(h=A*(-f/a)+x*(g/a)-(g*w-f*y)/a,A=A*(v/a)+x*(-_/a)+(_*w-v*y)/a,x=h):(A=(o=kn(t)).x+(~b[0].indexOf("%")?A/100*o.width:A),x=o.y+(~(b[1]||b[0]).indexOf("%")?x/100*o.height:x)),n||!1!==n&&l.smooth?(y=A-d,w=x-u,l.xOffset=p+(y*g+w*_)-y,l.yOffset=m+(y*f+w*v)-w):l.xOffset=l.yOffset=0,l.xOrigin=A,l.yOrigin=x,l.smooth=!!n,l.origin=e,l.originIsAbsolute=!!i,t.style[fn]="0px 0px",s&&(On(s,l,"xOrigin",d,A),On(s,l,"yOrigin",u,x),On(s,l,"xOffset",p,l.xOffset),On(s,l,"yOffset",m,l.yOffset)),t.setAttribute("data-svg-origin",A+" "+x)},$n=function(t,e){var i=t._gsap||new Ke(t);if("x"in i&&!e&&!i.uncache)return i;var n,r,s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,w,b,A,x,M,C,E,S,k,T,L,O,R,F,D,B=t.style,z=i.scaleX<0,G="px",I="deg",H=getComputedStyle(t),N=An(t,fn)||"0";return n=r=s=h=l=c=d=u=p=0,o=a=1,i.svg=!(!t.getCTM||!Tn(t)),H.translate&&("none"===H.translate&&"none"===H.scale&&"none"===H.rotate||(B[gn]=("none"!==H.translate?"translate3d("+(H.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==H.rotate?"rotate("+H.rotate+") ":"")+("none"!==H.scale?"scale("+H.scale.split(" ").join(",")+") ":"")+("none"!==H[gn]?H[gn]:"")),B.scale=B.rotate=B.translate="none"),f=Wn(t,i.svg),i.svg&&(i.uncache?(S=t.getBBox(),N=i.xOrigin-S.x+"px "+(i.yOrigin-S.y)+"px",E=""):E=!e&&t.getAttribute("data-svg-origin"),Yn(t,E||N,!!E||i.originIsAbsolute,!1!==i.smooth,f)),m=i.xOrigin||0,g=i.yOrigin||0,f!==Hn&&(w=f[0],b=f[1],A=f[2],x=f[3],n=M=f[4],r=C=f[5],6===f.length?(o=Math.sqrt(w*w+b*b),a=Math.sqrt(x*x+A*A),h=w||b?Qi(b,w)*qi:0,(d=A||x?Qi(A,x)*qi+h:0)&&(a*=Math.abs(Math.cos(d*Ji))),i.svg&&(n-=m-(m*w+g*A),r-=g-(m*b+g*x))):(D=f[6],R=f[7],T=f[8],L=f[9],O=f[10],F=f[11],n=f[12],r=f[13],s=f[14],l=(_=Qi(D,O))*qi,_&&(E=M*(v=Math.cos(-_))+T*(y=Math.sin(-_)),S=C*v+L*y,k=D*v+O*y,T=M*-y+T*v,L=C*-y+L*v,O=D*-y+O*v,F=R*-y+F*v,M=E,C=S,D=k),c=(_=Qi(-A,O))*qi,_&&(v=Math.cos(-_),F=x*(y=Math.sin(-_))+F*v,w=E=w*v-T*y,b=S=b*v-L*y,A=k=A*v-O*y),h=(_=Qi(b,w))*qi,_&&(E=w*(v=Math.cos(_))+b*(y=Math.sin(_)),S=M*v+C*y,b=b*v-w*y,C=C*v-M*y,w=E,M=S),l&&Math.abs(l)+Math.abs(h)>359.9&&(l=h=0,c=180-c),o=Tt(Math.sqrt(w*w+b*b+A*A)),a=Tt(Math.sqrt(C*C+D*D)),_=Qi(M,C),d=Math.abs(_)>2e-4?_*qi:0,p=F?1/(F<0?-F:F):0),i.svg&&(E=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Vn(An(t,gn)),E&&t.setAttribute("transform",E))),Math.abs(d)>90&&Math.abs(d)<270&&(z?(o*=-1,d+=h<=0?180:-180,h+=h<=0?180:-180):(a*=-1,d+=d<=0?180:-180)),e=e||i.uncache,i.x=n-((i.xPercent=n&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-n)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+G,i.y=r-((i.yPercent=r&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-r)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+G,i.z=s+G,i.scaleX=Tt(o),i.scaleY=Tt(a),i.rotation=Tt(h)+I,i.rotationX=Tt(l)+I,i.rotationY=Tt(c)+I,i.skewX=d+I,i.skewY=u+I,i.transformPerspective=p+G,(i.zOrigin=parseFloat(N.split(" ")[2])||!e&&i.zOrigin||0)&&(B[fn]=Xn(N)),i.xOffset=i.yOffset=0,i.force3D=P.force3D,i.renderTransform=i.svg?tr:Xi?Kn:qn,i.uncache=0,i},Xn=function(t){return(t=t.split(" "))[0]+" "+t[1]},Un=function(t,e,i){var n=ue(e);return Tt(parseFloat(e)+parseFloat(Pn(t,"x",i+"px",n)))+n},qn=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Kn(t,e)},Jn="0deg",Qn="0px",Zn=") ",Kn=function(t,e){var i=e||this,n=i.xPercent,r=i.yPercent,s=i.x,o=i.y,a=i.z,h=i.rotation,l=i.rotationY,c=i.rotationX,d=i.skewX,u=i.skewY,p=i.scaleX,m=i.scaleY,g=i.transformPerspective,f=i.force3D,_=i.target,v=i.zOrigin,y="",w="auto"===f&&t&&1!==t||!0===f;if(v&&(c!==Jn||l!==Jn)){var b,A=parseFloat(l)*Ji,x=Math.sin(A),M=Math.cos(A);A=parseFloat(c)*Ji,b=Math.cos(A),s=Un(_,s,x*b*-v),o=Un(_,o,-Math.sin(A)*-v),a=Un(_,a,M*b*-v+v)}g!==Qn&&(y+="perspective("+g+Zn),(n||r)&&(y+="translate("+n+"%, "+r+"%) "),(w||s!==Qn||o!==Qn||a!==Qn)&&(y+=a!==Qn||w?"translate3d("+s+", "+o+", "+a+") ":"translate("+s+", "+o+Zn),h!==Jn&&(y+="rotate("+h+Zn),l!==Jn&&(y+="rotateY("+l+Zn),c!==Jn&&(y+="rotateX("+c+Zn),d===Jn&&u===Jn||(y+="skew("+d+", "+u+Zn),1===p&&1===m||(y+="scale("+p+", "+m+Zn),_.style[gn]=y||"translate(0, 0)"},tr=function(t,e){var i,n,r,s,o,a=e||this,h=a.xPercent,l=a.yPercent,c=a.x,d=a.y,u=a.rotation,p=a.skewX,m=a.skewY,g=a.scaleX,f=a.scaleY,_=a.target,v=a.xOrigin,y=a.yOrigin,w=a.xOffset,b=a.yOffset,A=a.forceCSS,x=parseFloat(c),M=parseFloat(d);u=parseFloat(u),p=parseFloat(p),(m=parseFloat(m))&&(p+=m=parseFloat(m),u+=m),u||p?(u*=Ji,p*=Ji,i=Math.cos(u)*g,n=Math.sin(u)*g,r=Math.sin(u-p)*-f,s=Math.cos(u-p)*f,p&&(m*=Ji,o=Math.tan(p-m),r*=o=Math.sqrt(1+o*o),s*=o,m&&(o=Math.tan(m),i*=o=Math.sqrt(1+o*o),n*=o)),i=Tt(i),n=Tt(n),r=Tt(r),s=Tt(s)):(i=g,s=f,n=r=0),(x&&!~(c+"").indexOf("px")||M&&!~(d+"").indexOf("px"))&&(x=Pn(_,"x",c,"px"),M=Pn(_,"y",d,"px")),(v||y||w||b)&&(x=Tt(x+v-(v*i+y*r)+w),M=Tt(M+y-(v*n+y*s)+b)),(h||l)&&(o=_.getBBox(),x=Tt(x+h/100*o.width),M=Tt(M+l/100*o.height)),o="matrix("+i+","+n+","+r+","+s+","+x+","+M+")",_.setAttribute("transform",o),A&&(_.style[gn]=o)},er=function(t,e,i,n,r){var s,o,a=360,h=W(r),l=parseFloat(r)*(h&&~r.indexOf("rad")?qi:1)-n,c=n+l+"deg";return h&&("short"===(s=r.split("_")[1])&&(l%=a)!==l%180&&(l+=l<0?a:-360),"cw"===s&&l<0?l=(l+36e9)%a-~~(l/a)*a:"ccw"===s&&l>0&&(l=(l-36e9)%a-~~(l/a)*a)),t._pt=o=new Ei(t._pt,e,i,n,l,rn),o.e=c,o.u="deg",t._props.push(i),o},ir=function(t,e){for(var i in e)t[i]=e[i];return t},nr=function(t,e,i){var n,r,s,o,a,h,l,c=ir({},i._gsap),d=i.style;for(r in c.svg?(s=i.getAttribute("transform"),i.setAttribute("transform",""),d[gn]=e,n=$n(i,1),Ln(i,gn),i.setAttribute("transform",s)):(s=getComputedStyle(i)[gn],d[gn]=e,n=$n(i,1),d[gn]=s),Ui)(s=c[r])!==(o=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(a=ue(s)!==(l=ue(o))?Pn(i,r,s,l):parseFloat(s),h=parseFloat(o),t._pt=new Ei(t._pt,n,r,a,h-a,nn),t._pt.u=l||0,t._props.push(r));ir(n,c)};kt("padding,margin,Width,Radius",(function(t,e){var i="Top",n="Right",r="Bottom",s="Left",o=(e<3?[i,n,r,s]:[i+s,i+n,r+n,r+s]).map((function(i){return e<2?t+i:"border"+i+t}));In[e>1?"border"+t:t]=function(t,e,i,n,r){var s,a;if(arguments.length<4)return s=o.map((function(e){return Dn(t,e,i)})),5===(a=s.join(" ")).split(s[0]).length?s[0]:a;s=(n+"").split(" "),a={},o.forEach((function(t,e){return a[t]=s[e]=s[e]||s[(e-1)/2|0]})),t.init(e,a,r)}}));var rr,sr,or,ar={name:"css",register:Cn,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,n,r){var s,o,a,h,l,c,d,u,p,m,g,f,_,v,y,w,b,A,x,M,C=this._props,E=t.style,S=i.vars.startAt;for(d in ji||Cn(),this.styles=this.styles||wn(t),w=this.styles.props,this.tween=i,e)if("autoRound"!==d&&(o=e[d],!wt[d]||!oi(d,e,i,n,t,r)))if(l=typeof o,c=In[d],"function"===l&&(l=typeof(o=o.call(i,n,t,r))),"string"===l&&~o.indexOf("random(")&&(o=Me(o)),c)c(this,t,d,o,i)&&(y=1);else if("--"===d.substr(0,2))s=(getComputedStyle(t).getPropertyValue(d)+"").trim(),o+="",ze.lastIndex=0,ze.test(s)||(u=ue(s),p=ue(o)),p?u!==p&&(s=Pn(t,d,s,p)+p):u&&(o+=u),this.add(E,"setProperty",s,o,n,r,0,0,d),C.push(d),w.push(d,0,E[d]);else if("undefined"!==l){if(S&&d in S?(s="function"==typeof S[d]?S[d].call(i,n,t,r):S[d],W(s)&&~s.indexOf("random(")&&(s=Me(s)),ue(s+"")||"auto"===s||(s+=P.units[d]||ue(Dn(t,d))||""),"="===(s+"").charAt(1)&&(s=Dn(t,d))):s=Dn(t,d),h=parseFloat(s),(m="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),a=parseFloat(o),d in en&&("autoAlpha"===d&&(1===h&&"hidden"===Dn(t,"visibility")&&a&&(h=0),w.push("visibility",0,E.visibility),On(this,E,"visibility",h?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==d&&"transform"!==d&&~(d=en[d]).indexOf(",")&&(d=d.split(",")[0])),g=d in Ui)if(this.styles.save(d),f||((_=t._gsap).renderTransform&&!e.parseTransform||$n(t,e.parseTransform),v=!1!==e.smoothOrigin&&_.smooth,(f=this._pt=new Ei(this._pt,E,gn,0,1,_.renderTransform,_,0,-1)).dep=1),"scale"===d)this._pt=new Ei(this._pt,_,"scaleY",_.scaleY,(m?Ot(_.scaleY,m+a):a)-_.scaleY||0,nn),this._pt.u=0,C.push("scaleY",d),d+="X";else{if("transformOrigin"===d){w.push(fn,0,E[fn]),A=void 0,x=void 0,M=void 0,A=(b=o).split(" "),x=A[0],M=A[1]||"50%","top"!==x&&"bottom"!==x&&"left"!==M&&"right"!==M||(b=x,x=M,M=b),A[0]=zn[x]||x,A[1]=zn[M]||M,o=A.join(" "),_.svg?Yn(t,o,0,v,0,this):((p=parseFloat(o.split(" ")[2])||0)!==_.zOrigin&&On(this,_,"zOrigin",_.zOrigin,p),On(this,E,d,Xn(s),Xn(o)));continue}if("svgOrigin"===d){Yn(t,o,1,v,0,this);continue}if(d in Nn){er(this,_,d,h,m?Ot(h,m+o):o);continue}if("smoothOrigin"===d){On(this,_,"smooth",_.smooth,o);continue}if("force3D"===d){_[d]=o;continue}if("transform"===d){nr(this,o,t);continue}}else d in E||(d=Mn(d)||d);if(g||(a||0===a)&&(h||0===h)&&!tn.test(o)&&d in E)a||(a=0),(u=(s+"").substr((h+"").length))!==(p=ue(o)||(d in P.units?P.units[d]:u))&&(h=Pn(t,d,s,p)),this._pt=new Ei(this._pt,g?_:E,d,h,(m?Ot(h,m+a):a)-h,g||"px"!==p&&"zIndex"!==d||!1===e.autoRound?nn:on),this._pt.u=p||0,u!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=sn);else if(d in E)Bn.call(this,t,d,s,m?m+o:o);else if(d in t)this.add(t,d,s||t[d],m?m+o:o,n,r);else if("parseTransform"!==d){ct(d,o);continue}g||(d in E?w.push(d,0,E[d]):w.push(d,1,s||t[d])),C.push(d)}y&&Ci(this)},render:function(t,e){if(e.tween._time||!$i())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:Dn,aliases:en,getSetter:function(t,e,i){var n=en[e];return n&&n.indexOf(",")<0&&(e=n),e in Ui&&e!==fn&&(t._gsap.x||Dn(t,"x"))?i&&Yi===i?"scale"===e?un:dn:(Yi=i||{})&&("scale"===e?pn:mn):t.style&&!X(t.style[e])?ln:~e.indexOf("-")?cn:_i(t,e)},core:{_removeProperty:Ln,_getMatrix:Wn}};Ii.utils.checkPrefix=Mn,Ii.core.getStyleSaver=wn,or=kt((rr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(sr="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Ui[t]=1})),kt(sr,(function(t){P.units[t]="deg",Nn[t]=1})),en[or[13]]=rr+","+sr,kt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");en[e[1]]=or[e[0]]})),kt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){P.units[t]="px"})),Ii.registerPlugin(ar);var hr=Ii.registerPlugin(ar)||Ii;hr.core.Tween;class lr{constructor(t,e,i,n,r="div"){this.parent=t,this.object=e,this.property=i,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),lr.nextNameID=lr.nextNameID||0,this.$name.id="lil-gui-name-"+ ++lr.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(t=>t.stopPropagation())),this.domElement.addEventListener("keyup",(t=>t.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(i)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const e=this.parent.add(this.object,this.property,t);return e.name(this._name),this.destroy(),e}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class cr extends lr{constructor(t,e,i){super(t,e,i,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function dr(t){let e,i;return(e=t.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),!!i&&"#"+i}const ur={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:dr,toHexString:dr},pr={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},mr={isPrimitive:!1,match:t=>Array.isArray(t),fromHexString(t,e,i=1){const n=pr.fromHexString(t);e[0]=(n>>16&255)/255*i,e[1]=(n>>8&255)/255*i,e[2]=(255&n)/255*i},toHexString:([t,e,i],n=1)=>pr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},gr={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,e,i=1){const n=pr.fromHexString(t);e.r=(n>>16&255)/255*i,e.g=(n>>8&255)/255*i,e.b=(255&n)/255*i},toHexString:({r:t,g:e,b:i},n=1)=>pr.toHexString(t*(n=255/n)<<16^e*n<<8^i*n)},fr=[ur,pr,mr,gr];class _r extends lr{constructor(t,e,i,n){var r;super(t,e,i,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(r=this.initialValue,fr.find((t=>t.match(r)))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const t=dr(this.$text.value);t&&this._setValueFromHexString(t)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const e=this._format.fromHexString(t);this.setValue(e)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class vr extends lr{constructor(t,e,i){super(t,e,i,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(t=>{t.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class yr extends lr{constructor(t,e,i,n,r,s){super(t,e,i,"number"),this._initInput(),this.min(n),this.max(r);const o=void 0!==s;this.step(o?s:this._getImplicitStep(),o),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,e=!0){return this._step=t,this._stepExplicit=e,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let e=(t-this._min)/(this._max-this._min);e=Math.max(0,Math.min(e,1)),this.$fill.style.width=100*e+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const e=parseFloat(this.$input.value);isNaN(e)||(this._snapClampSetValue(e+t),this.$input.value=this.getValue())};let e,i,n,r,s,o=!1;const a=t=>{if(o){const n=t.clientX-e,r=t.clientY-i;Math.abs(r)>5?(t.preventDefault(),this.$input.blur(),o=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>5&&h()}if(!o){const e=t.clientY-n;s-=e*this._step*this._arrowKeyMultiplier(t),r+s>this._max?s=this._max-r:r+s<this._min&&(s=this._min-r),this._snapClampSetValue(r+s)}n=t.clientY},h=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",h)};this.$input.addEventListener("input",(()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.key&&this.$input.blur(),"ArrowUp"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e))),"ArrowDown"===e.code&&(e.preventDefault(),t(this._step*this._arrowKeyMultiplier(e)*-1))})),this.$input.addEventListener("wheel",(e=>{this._inputFocused&&(e.preventDefault(),t(this._step*this._normalizeMouseWheel(e)))}),{passive:!1}),this.$input.addEventListener("mousedown",(t=>{e=t.clientX,i=n=t.clientY,o=!0,r=this.getValue(),s=0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",h)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const e=this.$slider.getBoundingClientRect();let i=((t,e,i,n,r)=>(t-e)/(i-e)*(r-n)+n)(t,e.left,e.right,this._min,this._max);this._snapClampSetValue(i)},e=e=>{t(e.clientX)},i=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};let n,r,s=!1;const o=e=>{e.preventDefault(),this._setDraggingStyle(!0),t(e.touches[0].clientX),s=!1},a=e=>{if(s){const t=e.touches[0].clientX-n,i=e.touches[0].clientY-r;Math.abs(t)>Math.abs(i)?o(e):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h))}else e.preventDefault(),t(e.touches[0].clientX)},h=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",h)},l=this._callOnFinishChange.bind(this);let c;this.$slider.addEventListener("mousedown",(n=>{this._setDraggingStyle(!0),t(n.clientX),window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)})),this.$slider.addEventListener("touchstart",(t=>{t.touches.length>1||(this._hasScrollBar?(n=t.touches[0].clientX,r=t.touches[0].clientY,s=!0):o(t),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",h))}),{passive:!1}),this.$slider.addEventListener("wheel",(t=>{if(Math.abs(t.deltaX)<Math.abs(t.deltaY)&&this._hasScrollBar)return;t.preventDefault();const e=this._normalizeMouseWheel(t)*this._step;this._snapClampSetValue(this.getValue()+e),this.$input.value=this.getValue(),clearTimeout(c),c=setTimeout(l,400)}),{passive:!1})}_setDraggingStyle(t,e="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${e}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:e,deltaY:i}=t;Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(e=0,i=-t.wheelDelta/120,i*=this._stepExplicit?1:10);return e+-i}_arrowKeyMultiplier(t){let e=this._stepExplicit?1:10;return t.shiftKey?e*=10:t.altKey&&(e/=10),e}_snap(t){let e=0;return this._hasMin?e=this._min:this._hasMax&&(e=this._max),t-=e,t=Math.round(t/this._step)*this._step,t+=e,t=parseFloat(t.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class wr extends lr{constructor(t,e,i,n){super(t,e,i,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach((t=>{const e=document.createElement("option");e.textContent=t,this.$select.appendChild(e)})),this.updateDisplay(),this}updateDisplay(){const t=this.getValue(),e=this._values.indexOf(t);return this.$select.selectedIndex=e,this.$display.textContent=-1===e?t:this._names[e],this}}class br extends lr{constructor(t,e,i){super(t,e,i,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let Ar=!1;class xr{constructor({parent:t,autoPlace:e=void 0===t,container:i,width:n,title:r="Controls",closeFolders:s=!1,injectStyles:o=!0,touchStyles:a=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("button"),this.$title.classList.add("title"),this.$title.setAttribute("aria-expanded",!0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(r),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!Ar&&o&&(!function(t){const e=document.createElement("style");e.innerHTML=t;const i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n font-weight: 600;\n padding: 0 var(--padding);\n width: 100%;\n text-align: left;\n background: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n border: none;\n}\n.lil-gui .controller button {\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n}\n@media (hover: hover) {\n .lil-gui .controller button:hover {\n background: var(--hover-color);\n }\n .lil-gui .controller button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui .controller button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),Ar=!0),i?i.appendChild(this.domElement):e&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=s}add(t,e,i,n,r){if(Object(i)===i)return new wr(this,t,e,i);const s=t[e];switch(typeof s){case"number":return new yr(this,t,e,i,n,r);case"boolean":return new cr(this,t,e);case"string":return new br(this,t,e);case"function":return new vr(this,t,e)}console.error("gui.add failed\n\tproperty:",e,"\n\tobject:",t,"\n\tvalue:",s)}addColor(t,e,i=1){return new _r(this,t,e,i)}addFolder(t){const e=new xr({parent:this,title:t});return this.root._closeFolders&&e.close(),e}load(t,e=!0){return t.controllers&&this.controllers.forEach((e=>{e instanceof vr||e._name in t.controllers&&e.load(t.controllers[e._name])})),e&&t.folders&&this.folders.forEach((e=>{e._title in t.folders&&e.load(t.folders[e._title])})),this}save(t=!0){const e={controllers:{},folders:{}};return this.controllers.forEach((t=>{if(!(t instanceof vr)){if(t._name in e.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);e.controllers[t._name]=t.save()}})),t&&this.folders.forEach((t=>{if(t._title in e.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);e.folders[t._title]=t.save()})),e}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const e=this.$children.clientHeight;this.$children.style.height=e+"px",this.domElement.classList.add("transition");const i=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",i))};this.$children.addEventListener("transitionend",i);const n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame((()=>{this.$children.style.height=n+"px"}))})),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach((t=>t.reset())),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),void 0!==this._onOpenClose&&this._onOpenClose.call(this,t)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((t=>t.destroy()))}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach((e=>{t=t.concat(e.controllersRecursive())})),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach((e=>{t=t.concat(e.foldersRecursive())})),t}}var Mr,Cr={exports:{}};Cr.exports=(Mr=function(){function t(t){return n.appendChild(t.dom),t}function e(t){for(var e=0;e<n.children.length;e++)n.children[e].style.display=e===t?"block":"none";i=t}var i=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(t){t.preventDefault(),e(++i%n.children.length)}),!1);var r=(performance||Date).now(),s=r,o=0,a=t(new Mr.Panel("FPS","#0ff","#002")),h=t(new Mr.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var l=t(new Mr.Panel("MB","#f08","#201"));return e(0),{REVISION:16,dom:n,addPanel:t,showPanel:e,begin:function(){r=(performance||Date).now()},end:function(){o++;var t=(performance||Date).now();if(h.update(t-r,200),t>s+1e3&&(a.update(1e3*o/(t-s),100),s=t,o=0,l)){var e=performance.memory;l.update(e.usedJSHeapSize/1048576,e.jsHeapSizeLimit/1048576)}return t},update:function(){r=this.end()},domElement:n,setMode:e}},Mr.Panel=function(t,e,i){var n=1/0,r=0,s=Math.round,o=s(window.devicePixelRatio||1),a=80*o,h=48*o,l=3*o,c=2*o,d=3*o,u=15*o,p=74*o,m=30*o,g=document.createElement("canvas");g.width=a,g.height=h,g.style.cssText="width:80px;height:48px";var f=g.getContext("2d");return f.font="bold "+9*o+"px Helvetica,Arial,sans-serif",f.textBaseline="top",f.fillStyle=i,f.fillRect(0,0,a,h),f.fillStyle=e,f.fillText(t,l,c),f.fillRect(d,u,p,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d,u,p,m),{dom:g,update:function(h,_){n=Math.min(n,h),r=Math.max(r,h),f.fillStyle=i,f.globalAlpha=1,f.fillRect(0,0,a,u),f.fillStyle=e,f.fillText(s(h)+" "+t+" ("+s(n)+"-"+s(r)+")",l,c),f.drawImage(g,d+o,u,p-o,m,d,u,p-o,m),f.fillRect(d+p-o,u,o,m),f.fillStyle=i,f.globalAlpha=.9,f.fillRect(d+p-o,u,o,s((1-h/_)*m))}}},Mr);var Er=o(Cr.exports);class Sr{gui;scene;mixer;clips=[];gridHelper;helpers=[];stats;orbitControls;flyControls;memoryIntervalId;constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.scene=t,this.mixer=e,this.clips=i,this.orbitControls=n.orbitControls,this.flyControls=n.flyControls,this.gui=new xr({width:300}),this.addSceneFolder(),this.addLightsFolder(),this.addCamerasFolder(),this.addModelsFolder(),this.addAnimationsFolder(),this.addDisplayFolder(),this.addControlsFolder(),this.addPerformanceFolder()}addSceneFolder(){const e=this.gui.addFolder("Scene");e.close();const i={background:this.scene.background?.getHex?.()??0};e.addColor(i,"background").onChange((e=>{this.scene.background=new t.Color(e)})),this.scene.fog instanceof t.Fog&&(e.add(this.scene.fog,"near",.1,50).name("Fog Near"),e.add(this.scene.fog,"far",1,200).name("Fog Far"))}addLightsFolder(){const e=[];if(this.scene.traverse((t=>{t.isLight&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Lights");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(`${e.type} ${e.name||n}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");if(r.add({helper:!1},"helper").onChange((i=>{if(i){let i=null;e instanceof t.PointLight&&(i=new t.PointLightHelper(e)),e instanceof t.SpotLight&&(i=new t.SpotLightHelper(e)),e instanceof t.DirectionalLight&&(i=new t.DirectionalLightHelper(e)),e instanceof t.HemisphereLight&&(i=new t.HemisphereLightHelper(e,5)),i&&(this.scene.add(i),this.helpers.push(i))}else{const t=this.helpers.find((t=>t.light===e));t&&(this.scene.remove(t),this.helpers=this.helpers.filter((e=>e!==t)))}})),"intensity"in e&&r.add(e,"intensity",0,10,.01),"color"in e){const t={color:e.color.getHex()};r.addColor(t,"color").onChange((t=>{e.color.setHex(t)}))}"position"in e&&(r.add(e.position,"x",-50,50,.1),r.add(e.position,"y",-50,50,.1),r.add(e.position,"z",-50,50,.1))}))}addCamerasFolder(){const e=[];if(this.scene.traverse((t=>{t.isCamera&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Cameras");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Camera ${n+1}`);r.close(),r.add(e.rotation,"x",-Math.PI,Math.PI,.01).name("rotX"),r.add(e.rotation,"y",-Math.PI,Math.PI,.01).name("rotY"),r.add(e.rotation,"z",-Math.PI,Math.PI,.01).name("rotZ");r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.CameraHelper(e);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.CameraHelper&&i.camera===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e instanceof t.PerspectiveCamera&&(r.add(e,"fov",10,100).onChange((()=>e.updateProjectionMatrix())),r.add(e,"near",.1,10).onChange((()=>e.updateProjectionMatrix())),r.add(e,"far",10,2e3).onChange((()=>e.updateProjectionMatrix()))),e instanceof t.OrthographicCamera&&r.add(e,"zoom",.1,10).onChange((()=>e.updateProjectionMatrix()))}))}addModelsFolder(){const e=[];if(this.scene.traverse((t=>{t.isMesh&&e.push(t)})),0===e.length)return;const i=this.gui.addFolder("Models");i.close(),e.forEach(((e,n)=>{const r=i.addFolder(e.name||`Mesh ${n+1}`);r.close(),r.add(e.position,"x",-10,10,.1),r.add(e.position,"y",-10,10,.1),r.add(e.position,"z",-10,10,.1),r.add(e.rotation,"x",-Math.PI,Math.PI,.01),r.add(e.rotation,"y",-Math.PI,Math.PI,.01),r.add(e.rotation,"z",-Math.PI,Math.PI,.01),r.add(e.scale,"x",.1,10,.1),r.add(e.scale,"y",.1,10,.1),r.add(e.scale,"z",.1,10,.1);if(r.add({helper:!1},"helper").onChange((i=>{if(i){const i=new t.BoxHelper(e,16711680);this.scene.add(i),this.helpers.push(i)}else{const i=this.helpers.find((i=>i instanceof t.BoxHelper&&i.object===e));i&&(this.scene.remove(i),this.helpers=this.helpers.filter((t=>t!==i)))}})),e.morphTargetInfluences&&e.morphTargetDictionary){const t=r.addFolder("Morph Targets");Object.keys(e.morphTargetDictionary).forEach((i=>{const n=e.morphTargetDictionary[i];t.add(e.morphTargetInfluences,n,0,1,.01).name(i).listen()}))}}))}addAnimationsFolder(){if(!this.mixer||0===this.clips.length)return;const t=this.gui.addFolder("Animations");t.close();const e={};this.clips.forEach((t=>{e[t.name]=this.mixer.clipAction(t)}));const i={};Object.keys(e).forEach((n=>{i[n]=!1,t.add(i,n).listen().onChange((t=>{t?e[n].reset().play():e[n].stop()}))})),t.add({stopAll:()=>Object.values(e).forEach((t=>t.stop()))},"stopAll").name("Stop All")}addDisplayFolder(){const e=this.gui.addFolder("Display");e.close();const i={autoRotate:!!this.orbitControls&&this.orbitControls.autoRotate,wireframe:!1,grid:!1,skeleton:!1};this.orbitControls&&e.add(i,"autoRotate").onChange((t=>{this.orbitControls.autoRotate=t})),e.add(i,"grid").onChange((e=>{e?(this.gridHelper=new t.GridHelper(50,50),this.scene.add(this.gridHelper),this.helpers.push(this.gridHelper)):this.gridHelper&&(this.scene.remove(this.gridHelper),this.helpers=this.helpers.filter((t=>t!==this.gridHelper)))})),e.add(i,"wireframe").onChange((t=>{this.scene.traverse((e=>{if(e.isMesh){const i=e;Array.isArray(i.material)?i.material.forEach((e=>{"wireframe"in e&&(e.wireframe=t)})):"wireframe"in i.material&&(i.material.wireframe=t)}}))})),e.add(i,"skeleton").onChange((e=>{this.scene.traverse((i=>{if(i.isSkinnedMesh)if(e){const e=new t.SkeletonHelper(i);this.scene.add(e),this.helpers.push(e)}else{const e=this.helpers.find((e=>e instanceof t.SkeletonHelper&&e.root===i));e&&(this.scene.remove(e),this.helpers=this.helpers.filter((t=>t!==e)))}}))}))}addControlsFolder(){const t=this.gui.addFolder("Controls");t.close();const e={orbitControls:!!this.orbitControls,flyControls:!!this.flyControls};t.add(e,"orbitControls").listen().onChange((t=>{this.orbitControls&&(this.orbitControls.enabled=t)})),t.add(e,"flyControls").listen().onChange((t=>{this.flyControls&&(this.flyControls.enabled=t)}))}addPerformanceFolder(){this.stats=new Er,this.stats.showPanel(0),document.body.appendChild(this.stats.dom);const t=this.gui.addFolder("Performance");t.close();const e={fps:"0",memory:"0 MB"},i=t.add(e,"fps").name("FPS").listen(),n=t.add(e,"memory").name("Memory").listen();this.memoryIntervalId=setInterval((()=>{performance.memory&&(e.memory=`${Math.round(performance.memory.usedJSHeapSize/1048576)} MB`)}),1e3),this.update=()=>{this.stats&&this.stats.update(),e.fps=this.stats?this.stats.dom.innerText.split("\n")[0]:"0",i.updateDisplay(),n.updateDisplay()}}update(){this.stats&&this.stats.update()}dispose(){this.memoryIntervalId&&(clearInterval(this.memoryIntervalId),this.memoryIntervalId=void 0),this.gui.destroy(),this.helpers.forEach((t=>this.scene.remove(t))),this.helpers=[],this.stats&&this.stats.dom.parentElement&&document.body.removeChild(this.stats.dom)}exportScene(){return{lights:this.scene.children.filter((t=>t.isLight)).map((t=>t.toJSON())),cameras:this.scene.children.filter((t=>t.isCamera)).map((t=>t.toJSON())),scene:this.scene.toJSON()}}getGUI(){return this.gui}}class kr{config;_container;characterGroup;lightGroup;state;objectLoader=new t.ObjectLoader;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;isNotRender=!1;constructor(t){this.config=t.config,this._container=t.container,this.characterGroup=t.characterGroup,this.lightGroup=t.lightGroup,this.state=t.state}setConfig(t){this.config=t}setContainerRef(t){this._container=t}setGroups(t,e){this.characterGroup=t,this.lightGroup=e}getSnapshot(){return{container:this.container,scene:this.scene,camera:this.camera,renderer:this.renderer,controls:this.controls,width:this.width,height:this.height,isNotRender:this.isNotRender}}init(){if(this.resolveContainer(),!this.container)return;this.container.innerHTML="",this.syncContainerSize();const{scene:e,camera:i}=this.loadScene(this.config.scene);this.scene=e||new t.Scene,this.camera=this.loadCamera()||i||this.createDefaultCamera(),this.renderer=this.createRenderer(),this.setupRenderer(),this.setupGridHelper(),this.initLights(this.config.lights||[])}resolveContainer(){if(!this._container)return this.isNotRender=!0,void(this.container=null);this.isNotRender=!1,this.container="string"==typeof this._container?document.getElementById(this._container):this._container}handleResize(){this.resolveContainer(),this.container&&this.camera&&this.renderer&&(this.syncContainerSize(),this.camera.aspect=this.width/this.height,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height))}createDefaultCamera(){const e="number"==typeof this.config.camera?.fov?this.config.camera.fov:45;return new t.PerspectiveCamera(e,this.width/this.height,.1,2e3)}createRenderer(){const e=new t.WebGLRenderer({antialias:!0,alpha:!0});return e.outputColorSpace=t.SRGBColorSpace,e.toneMapping=t.ACESFilmicToneMapping,e.toneMappingExposure=1,e}updateLight(){this.lightGroup.children.forEach((t=>{t.target&&(t.target.position.copy(this.characterGroup.position),t.updateMatrixWorld(!0))}))}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.scene&&(this.scene.add(this.lightGroup),t.forEach((t=>{if(t.metadata){const e=this.objectLoader.parse(t);this.lightGroup.add(e)}else this.setLight(t)})))}loadCamera(e){if(!e)return this.createDefaultCamera();if(e.metadata){const i=this.objectLoader.parse(e);return i instanceof t.PerspectiveCamera?i:void console.warn("未找到透视摄像机")}return this.camera||(this.camera=this.createDefaultCamera()),this.setCamera(this.camera,e),this.camera}loadScene(e){if(!e)return{};const i=this.objectLoader.parse(e);let n;return i.traverse((e=>{e instanceof t.PerspectiveCamera&&(n=e)})),{scene:i,camera:n}}degree2Euler(e){return e.map((e=>t.MathUtils.degToRad(e)))}dataToMatrix4(e){const i=[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]],n=new t.Matrix4;return n.set(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9],i[10],i[11],i[12],i[13],i[14],i[15]),n}setLight(e){const i=t=>{this.lightGroup.add(t)};switch(e.type){case"AmbientLight":{const n=e,r=new t.AmbientLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}case"DirectionalLight":{const n=e,r=new t.DirectionalLight(new t.Color(n.color||16777215),n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position);r.castShadow=n.castShadow??!1,i(r);break}case"SpotLight":{const n=e,r=new t.SpotLight(n.color,n.intensity,n.distance,n.angle,n.penumbra,n.decay);if(r.target=this.characterGroup,n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}n.up&&r.up.set(...n.up),n.shadow&&(r.castShadow=n.castShadow??!0,n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.assign(r.shadow.camera,n.shadow.camera)),i(r);break}case"PointLight":{const n=e,r=new t.PointLight(n.color,n.intensity,n.distance,n.decay);if(r.castShadow=n.castShadow??!1,n.castShadow&&(r.receiveShadow=!0),n.shadow&&(n.shadow.radius&&(r.shadow.radius=n.shadow.radius),n.shadow.camera&&Object.keys(n.shadow.camera).forEach((t=>{r.shadow.camera[t]=n.shadow.camera[t]}))),n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}else n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale);i(r);break}case"RectAreaLight":{const n=e,r=new t.RectAreaLight(n.color,n.intensity,n.width,n.height);r.position.set(5,5,0),n.position&&r.position.set(...n.position),n.rotation&&r.rotation.set(...this.degree2Euler(n.rotation)),n.scale&&r.scale.set(...n.scale),i(r);break}case"HemisphereLight":{const n=e,r=new t.HemisphereLight(n.color??n.skyColor,n.groundColor,n.intensity);if(n.matrix){const t=this.dataToMatrix4(n.matrix);r.matrixAutoUpdate=!1,r.matrix.copy(t),r.updateMatrixWorld(!0)}i(r);break}default:console.warn("未找到光源数据")}}setAngleView(e){var i=this;let{camera:n}=e;if(!this.camera)return;n.matrix&&function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=i.dataToMatrix4(e),s=new t.Vector3,o=new t.Quaternion,a=new t.Vector3;r.decompose(s,o,a),hr.to(i.camera.position,{x:s.x,y:s.y,z:s.z,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),hr.to(i.camera.quaternion,{x:o.x,y:o.y,z:o.z,w:o.w,duration:n,ease:"power2.inOut",onUpdate:()=>{i.camera.updateMatrixWorld()}}),hr.to(i.characterGroup.rotation,{x:0,y:0,z:0,duration:n,ease:"power2.inOut"})}(n.matrix,n.duration)}initOrbitControls(){if(this.config.orbitControls||(this.config.orbitControls={}),this.camera&&this.renderer&&!1!==this.config.orbitControls.useOrbitControl)if(this.controls=new h(this.camera,this.renderer.domElement),this.controls.enableZoom=this.config.orbitControls.enableZoom||!0,this.controls.enablePan=this.config.orbitControls.enablePan||!0,void 0!==this.config.orbitControls.minPolarAngle&&(this.controls.minPolarAngle=this.config.orbitControls.minPolarAngle),void 0!==this.config.orbitControls.maxPolarAngle&&(this.controls.maxPolarAngle=this.config.orbitControls.maxPolarAngle),void 0!==this.config.orbitControls.minAzimuthAngle&&(this.controls.minAzimuthAngle=this.config.orbitControls.minAzimuthAngle),void 0!==this.config.orbitControls.maxAzimuthAngle&&(this.controls.maxAzimuthAngle=this.config.orbitControls.maxAzimuthAngle),this.controls.minDistance=this.config.orbitControls.minDistance||1,this.controls.maxDistance=this.config.orbitControls.maxDistance||10,this.config.orbitControls.target)this.controls.target.fromArray(this.config.orbitControls.target);else{const e=(new t.Box3).setFromObject(this.characterGroup),i=new t.Vector3;e.getCenter(i),this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.controls.target.set(i.x,i.y+.5,i.z)}}setCamera(t,e){if(!t)return void console.warn("camera is null");const{position:i,rotation:n,matrix:r,fov:s}=e;if(this.state.updateCamera=!0,s&&(t.fov=s),r){const e=this.dataToMatrix4(r);t.matrixAutoUpdate=!1,t.matrix.copy(e),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.matrixAutoUpdate=!0}else i&&t.position.set(...i),n&&t.rotation.set(...this.degree2Euler(n));this.state.updateCamera=!1}syncContainerSize(){this.container&&(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight)}setupRenderer(){this.renderer&&this.container&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setClearColor(0,0),this.container.appendChild(this.renderer.domElement))}setupGridHelper(){if(!this.config.gridHelper)return;const{size:e=10,divisions:i=10,color1:n="",color2:r=""}=this.config.gridHelper,s=new t.GridHelper(e,i,n,r);this.characterGroup.add(s)}}class Tr{config;container;characterGroup;state;getAnimationFrameId;constructor(t){this.config=t.config,this.container=t.container,this.characterGroup=t.characterGroup,this.state=t.state,this.getAnimationFrameId=t.getAnimationFrameId}setConfig(t){this.config=t}setContainer(t){this.container=t}setCharacterGroup(t){this.characterGroup=t}registerListeners(){this.container&&this.config.model?.rotate&&!1===this.config.orbitControls?.useOrbitControl&&(this.container.addEventListener("mousedown",this.mousedown),this.container.addEventListener("mouseup",this.mouseup),this.container.addEventListener("mousemove",this.mousemove),this.container.addEventListener("touchstart",this.mousedown),this.container.addEventListener("touchend",this.mouseup),this.container.addEventListener("touchmove",this.mousemove))}removeEventListeners(){this.container&&(this.container.removeEventListener("mousedown",this.mousedown),this.container.removeEventListener("mouseup",this.mouseup),this.container.removeEventListener("mousemove",this.mousemove),this.container.removeEventListener("touchstart",this.mousedown),this.container.removeEventListener("touchend",this.mouseup),this.container.removeEventListener("touchmove",this.mousemove))}mousedown=t=>{this.state.isMouseDown=!0;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY),this.state.previousMousePosition={x:e,y:i}};mouseup=()=>{this.state.isMouseDown=!1,this.state.previousMousePosition={x:0,y:0}};mousemove=t=>{if(!this.state.isMouseDown||!this.getAnimationFrameId())return;let e=0,i=0;t instanceof MouseEvent?(e=t.clientX,i=t.clientY):t.touches.length>0&&(e=t.touches[0].clientX,i=t.touches[0].clientY);const n=e-this.state.previousMousePosition.x,r=i-this.state.previousMousePosition.y;this.characterGroup.rotation.y+=.01*n;const s=this.characterGroup.rotation.x+.01*r;if(r>0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.minPolarAngle&&this.config.orbitControls.minPolarAngle>=0){const t=Math.min(1*this.config.orbitControls.minPolarAngle,Math.PI);Math.PI/2-s>=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.min(s,Math.PI/2);else if(r<0)if(this.config.orbitControls&&void 0!==this.config.orbitControls.maxPolarAngle&&this.config.orbitControls.maxPolarAngle>=0){const t=1*this.config.orbitControls.maxPolarAngle;Math.PI/2-s<=t&&(this.characterGroup.rotation.x=s)}else this.characterGroup.rotation.x=Math.max(s,-Math.PI/2);this.state.previousMousePosition={x:e,y:i}}}class Lr{scene=null;camera=null;renderer=null;width=1;height=1;bgScene=null;bgCamera=null;videoElement=null;videoTexture=null;videoMesh=null;setRuntimeRefs(t){let{scene:e,camera:i,renderer:n,width:r,height:s}=t;this.scene=e,this.camera=i,this.renderer=n,this.width=r,this.height=s,this.videoMesh&&this.videoTexture&&this.updateVideoMesh()}renderBackground(){this.bgScene&&this.bgCamera&&this.renderer&&(this.renderer.autoClear=!1,this.renderer.clear(),this.renderer.render(this.bgScene,this.bgCamera))}prepareFrame(){this.videoMesh&&this.updateVideoMesh()}setBackground(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!this.scene)return;(new l).load(e,(e=>{e.mapping=t.EquirectangularReflectionMapping,this.scene&&(this.scene.background=e,this.scene.environment=e)}))}setVideoBackground(e){if(!this.scene||!this.camera)return;const i=document.createElement("video");i.crossOrigin="anonymous",i.src=e,i.loop=!0,i.muted=!0,i.autoplay=!0,i.playsInline=!0,i.play();const n=new t.VideoTexture(i);n.minFilter=t.LinearFilter,n.magFilter=t.LinearFilter;const r=new t.PlaneGeometry(1,1),s=new t.MeshBasicMaterial({map:n}),o=new t.Mesh(r,s);this.videoElement=i,this.videoTexture=n,this.videoMesh=o,this.scene.add(o),this.updateVideoMesh()}loadCubeBackground(e){if(0===e.length)return void console.warn("没有传入天空盒图片");if(1===e.length)return void this.loadSingleBackground(e[0]);if(6!==e.length)return void console.error("需要传入6张图片,顺序为:右、左、上、下、前、后");const i=(new t.CubeTextureLoader).load(e);this.scene&&(this.scene.background=i)}updateBackgroundSize(t,e){if(!(this.bgScene&&this.bgCamera&&this.renderer&&t.image))return;this.renderer.setSize(this.width,this.height);const i=t.image.width/t.image.height,n=this.width/this.height,r=e.material;if(n>i){const t=n/i;r.map?.repeat.set(1,1/t),r.map?.offset.set(0,0)}else{const t=i/n;r.map?.repeat.set(1/t,1),r.map?.offset.set((1-1/t)/2,0)}e.scale.set(1,1,1),r.map&&(r.map.needsUpdate=!0)}setBackgroundColorOrGradient(e){this.scene&&(e.startsWith("linear-gradient")?this.setGradientBackground(e):this.scene.background=new t.Color(e))}destroy(){this.videoMesh&&this.scene&&this.scene.remove(this.videoMesh),this.videoMesh?.geometry&&this.videoMesh.geometry.dispose();const t=this.videoMesh?.material;t?.dispose(),this.videoTexture?.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.videoElement=null,this.videoTexture=null,this.videoMesh=null,this.bgScene=null,this.bgCamera=null}loadSingleBackground(e){const i=new t.TextureLoader;this.bgScene=new t.Scene,this.bgCamera=new t.OrthographicCamera(-1,1,1,-1,0,1),i.load(e,(e=>{e.colorSpace=t.SRGBColorSpace;const i=new t.MeshBasicMaterial({map:e,depthTest:!1,depthWrite:!1,transparent:!1,side:t.DoubleSide}),n=new t.Mesh(new t.PlaneGeometry(2,2),i);this.bgScene.add(n),this.updateBackgroundSize(e,n)}))}setGradientBackground(e){if(!this.scene)return;const i=document.createElement("canvas");i.width=this.width,i.height=this.height;const n=i.getContext("2d");if(!n)return;const r=e.match(/linear-gradient\(([^,]+),\s*(.+)\)/);if(!r)return void console.error("渐变格式不正确");const s=r[2].split(",").map((t=>t.trim())),o=n.createLinearGradient(0,0,i.width,i.height);s.forEach(((t,e)=>{o.addColorStop(e/(s.length-1),t)})),n.fillStyle=o,n.fillRect(0,0,i.width,i.height);const a=new t.CanvasTexture(i);this.scene.background=a}updateVideoMesh(){if(!this.videoMesh||!this.camera)return;const e=2*Math.tan(t.MathUtils.degToRad(this.camera.fov/2))*10,i=e*this.camera.aspect;this.videoMesh.geometry.dispose(),this.videoMesh.geometry=new t.PlaneGeometry(i,e);const n=new t.Vector3;this.camera.getWorldDirection(n),this.videoMesh.position.copy(this.camera.position).add(n.multiplyScalar(10)),this.videoMesh.lookAt(this.camera.position)}}class Or{action;listener={};config={};constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.action=t,this.listener={},this.config=e({timeBeforeFinished:1},i)}on(t,e){this.listener[t]=e}update(t){const{loop:e,time:i,_loopCount:n,repetitions:r}=this.action;if(2201===e&&(r===1/0||r-n!=1))return;const s=this.action.getClip().duration,o=s-this.config.timeBeforeFinished,a=this.listener.beforeFinished;a&&i>=o&&i<o+t&&(Reflect.deleteProperty(this.listener,"beforeFinished"),a(this.action));const h=this.listener.finished;h&&i>=s&&i<s+t&&(Reflect.deleteProperty(this.listener,"finished"),h(this.action))}}class Rr{config;emit;animationGroup=new t.AnimationObjectGroup;animations=[];actions=[];animationMixer=null;onAnimationFinishedBound=()=>{};actionDefaultMap=new Map;currentTalkAnimations=[];muteActionState=!1;actionNotifier=null;constructor(t){this.config=t.config,this.emit=t.emit}setConfig(t){this.config=t}addAnimationTarget(t){this.animationGroup.add(t)}addAnimations(t){t.forEach((t=>{this.animations.push(t),t.code.includes("_idle")?this.actionDefaultMap.has("idle")?this.actionDefaultMap.get("idle").push(t.code):this.actionDefaultMap.set("idle",[t.code]):t.code.includes("_talk")&&(this.actionDefaultMap.has("talk")?this.actionDefaultMap.get("talk").push(t.code):this.actionDefaultMap.set("talk",[t.code]))}))}initializeMixer(){this.animationMixer&&(this.animationMixer.stopAllAction(),this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound)),this.animationMixer=new t.AnimationMixer(this.animationGroup),this.actions=this.animations.map((t=>{const e=this.animationMixer.clipAction(t.animation);return{name:t.animation.name,code:t.code,action:e,animation:t.animation,type:t.type,text:t.text}})),this.onAnimationFinishedBound=this.animationFinished.bind(this),this.animationMixer.addEventListener("finished",this.onAnimationFinishedBound)}update(t){if(!this.animationMixer)return;this.animationMixer.update(t);(this.animationMixer._actions||[]).forEach((t=>{(0===t.weight||t.paused)&&t.stop()})),this.actionNotifier?.update(t)}playAction=i((()=>{var i=this;return function(n){let r,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(n)){if(0===n.length)return void console.warn("playAction: empty array provided");n.some((t=>t.includes("talk")))&&(i.currentTalkAnimations=n),r=n[Math.floor(Math.random()*n.length)],i.muteActionState}else r=n,i.muteActionState;if(i.muteActionState&&"idle"!==r&&"talk"!==r)return;const o=e(s),a="idle"===r?i.getDefaultAniCode("idle"):"talk"===r?i.getDefaultAniCode("talk"):r,h=i.actions.find((t=>t.code===a));if(h)try{const{action:e}=h,s=i.actions.find((t=>t.action.isRunning()));if(s&&s.action===e)return;const a=r.includes("talk")&&void 0===o.loop;o.loop===t.LoopRepeat||a?e.loop=t.LoopRepeat:(e.loop=t.LoopOnce,e.clampWhenFinished=!0),o.repetitions?e.setLoop(o.loop,o.repetitions):a&&e.setLoop(t.LoopRepeat,Number.MAX_SAFE_INTEGER),e.timeScale=1;const l=o.fadeDuration||.5;s&&s.action!==e?(s.action.fadeOut(l),e.reset().fadeIn(l).play()):e.reset().fadeIn(l).play(),i.animationMixer?.update(0),i.actionNotifier=new Or(e),i.actionNotifier.on("beforeFinished",(s=>{h.code,i.emit("action.beforeFinished",n),r.includes("talk")||e.loop!==t.LoopOnce||r.includes("idle")||setTimeout((()=>{i.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER})}),100)}))}catch(t){console.error("Error playing action:",t)}else console.warn(`Action not found: ${a}`)}})(),50,{leading:!0});stopAllActionExcludeIdle(){}stopAllAction(){this.actions.forEach((t=>{t.action.stop(),t.action.reset()}))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.playAction("idle"),this.muteActionState=t}getModelInfo(t){const e=[],i=t=>{t.children.forEach((t=>{t.isGroup?i(t):e.push(t)}))};return i(t),{actor:t,scenes:e,animations:this.animations.map((t=>t.animation)),mixer:this.animationMixer,actions:this.actions}}getAnimations(){return this.animations}getMixer(){return this.animationMixer}destroy(){this.stopAllAction(),this.animationMixer&&(this.animationMixer.removeEventListener("finished",this.onAnimationFinishedBound),this.animationMixer=null),this.animations=[],this.actions=[],this.actionDefaultMap.clear(),this.currentTalkAnimations=[],this.actionNotifier=null,this.muteActionState=!1,this.animationGroup=new t.AnimationObjectGroup}getDefaultAniCode(t){const e=this.actionDefaultMap.get(t)||[];return 0===e.length?null:1===e.length?e[0]:e[Math.floor(Math.random()*e.length)]}animationFinished(t){const{action:e,type:i}=t;if(e._clip.name,"finished"===i&&e._clip?.name){if(e._clip.name.indexOf("idle")>=0)return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER});if(e._clip.name.indexOf("talk")>=0)return;return this.playAction("idle",{loop:2201,repetitions:Number.MAX_SAFE_INTEGER})}}}class Fr{getBody;serverShapes=[];isPlayingServerShapes=!1;mouthBlendWeight=0;constructor(t){this.getBody=t.getBody}playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.serverShapes=t,this.isPlayingServerShapes?this.mouthBlendWeight=1:(this.isPlayingServerShapes=!0,hr.to(this,{mouthBlendWeight:1,duration:.15,ease:"power2.out"}))}stopServerShapes(){this.isPlayingServerShapes&&hr.to(this,{mouthBlendWeight:0,duration:.3,ease:"power2.inOut",onComplete:()=>{this.isPlayingServerShapes=!1,this.serverShapes=[]}})}applyBlendShapes(){if(!this.isPlayingServerShapes||0===this.serverShapes.length)return;const t=this.getBody();Object.entries(t).forEach((t=>{let[,e]=t;if(!e.mesh||!e.mesh.morphTargetInfluences||!e.mesh.morphTargetDictionary)return;const i=e.mesh.morphTargetDictionary,{prefix:n="",suffix:r=""}=e;for(const[t,s]of Object.entries(i)){const i=t.replace(n,"").replace(r,"");if(i.includes("eyeBlink")||i.includes("eyeWide")||i.includes("eyeSquint"))continue;const o=e.mesh.morphTargetInfluences[s],a=this.getShapeIndex(i);if(a>=0&&a<this.serverShapes.length){const t=this.serverShapes[a];e.mesh.morphTargetInfluences[s]=o*(1-this.mouthBlendWeight)+t*this.mouthBlendWeight}}}))}destroy(){hr.killTweensOf(this),this.serverShapes=[],this.isPlayingServerShapes=!1,this.mouthBlendWeight=0}getShapeIndex(t){return["eyeBlinkLeft","eyeLookDownLeft","eyeLookInLeft","eyeLookOutLeft","eyeLookUpLeft","eyeSquintLeft","eyeWideLeft","eyeBlinkRight","eyeLookDownRight","eyeLookInRight","eyeLookOutRight","eyeLookUpRight","eyeSquintRight","eyeWideRight","jawForward","jawLeft","jawRight","jawOpen","mouthClose","mouthFunnel","mouthPucker","mouthLeft","mouthRight","mouthSmileLeft","mouthSmileRight","mouthFrownLeft","mouthFrownRight","mouthDimpleLeft","mouthDimpleRight","mouthStretchLeft","mouthStretchRight","mouthRollLower","mouthRollUpper","mouthShrugLower","mouthShrugUpper","mouthPressLeft","mouthPressRight","mouthLowerDownLeft","mouthLowerDownRight","mouthUpperUpLeft","mouthUpperUpRight","browDownLeft","browDownRight","browInnerUp","browOuterUpLeft","browOuterUpRight","cheekPuff","cheekSquintLeft","cheekSquintRight","noseSneerLeft","noseSneerRight","tongueOut"].indexOf(t)}}class Pr{config;animationManager;getScene;getCharacterGroup;getBody;setBody;loader;ktx2Loader;model=new Map;constructor(t){this.config=t.config,this.animationManager=t.animationManager,this.getScene=t.getScene,this.getCharacterGroup=t.getCharacterGroup,this.getBody=t.getBody,this.setBody=t.setBody,this.ktx2Loader=this.createKTX2Loader(),this.loader=this.createGLTFLoader()}setConfig(t){this.config=t}detectTextureSupport(t){this.ktx2Loader.detectSupport(t)}getModelMap(){return this.model}changeBundle(t){this.loader.parse(t.buffer,"",(t=>{this.getScene()?.add(t.scene)}),(t=>{console.error("error loading GLB model:",t)}))}loadBundles(t,e){const i=[],n={};return t.forEach((r=>{n[r.bundle]={url:r.bundle,progress:0,total:0},i.push(new Promise(((i,s)=>{this.loader.parse(r.buffer,"",(s=>{i({...r,gltf:s}),function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n[i]={url:i,progress:r,total:s};let o=0,a=0;t.forEach((t=>{let{bundle:e}=t;o+=n[e].total,a+=n[e].progress}));const h=Math.floor(a/o*100);e(h)}(r.bundle,1,1)}),(t=>{console.error("error loading GLB model:",t),s("Error loading GLB model")}))})))})),Promise.all(i).then((t=>(t.forEach((t=>this.mountRecord(t))),this.animationManager.initializeMixer(),t)))}loadGLBModel(t){(new c).load(t,(t=>{this.getScene()?.add(t.scene)}))}loadLowResTexture(e){const i=new t.TextureLoader;return new Promise((n=>{i.load(e,(e=>{e.minFilter=t.LinearFilter,e.generateMipmaps=!1,n(e)}))}))}addModel(t,e){const i=new c,n=new p;this.config.dracoPath,n.setDecoderPath(`${this.config.dracoPath}`),n.setDecoderConfig({type:"js"}),i.setDRACOLoader(n),i.load(e,(e=>{const i=e.scene;i.name=t,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1);const n=this.getScene();n&&(n.traverse((t=>{t.isMesh&&t.name})),n.children[1]?.children[1]?.children[0]?.add(i.children[0]))}),void 0,(t=>{console.error("An error occurred while loading the model:",t)}))}destroyModel(t,e){const i=this.getScene();if(!i)return void console.error("Scene is not initialized.");const n=[];i.traverse((t=>{if(t.isMesh){-1!==t.name.toLowerCase().indexOf("cloth")&&(t.geometry.dispose(),Array.isArray(t.material)?t.material.forEach((t=>{t&&t.isMaterial&&e(t)})):t.material&&t.material.isMaterial&&e(t.material),t.parent&&n.push(t))}})),n.forEach((t=>{t.parent?.remove(t)}));const r=t.indexOf("apose_cloth");-1!==r&&t.substring(r)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return new Promise(((i,n)=>{this.loader.load(t,(t=>i(t)),e,(t=>{console.error("Error loading GLB model:",t),n(t)}))}))}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.loadGlb(t,e).then((t=>(this.getScene()?.add(t.scene),t)))}destroy(){this.model.clear(),this.loader=null,this.ktx2Loader&&(this.ktx2Loader.dispose(),this.ktx2Loader=null)}createGLTFLoader(){const t=new c,e=new p;return e.setDecoderPath(this.config.dracoPath||"draco/"),t.setKTX2Loader(this.ktx2Loader),t.setMeshoptDecoder(u),t.setDRACOLoader(e),t}createKTX2Loader(){const t=new d;return t.setTranscoderPath("three/examples/jsm/libs/basis/"),t}cloneTrack(e,i){return new t.NumberKeyframeTrack(i,e.times.slice(),e.values.slice())}mountRecord(t){let{code:e,gltf:i,name:n,type:r}=t;if(!i)return;const s=i.scene;s.name=e,"apose"===r?this.mountAposeScene(s):"animation"!==r&&"animation_system"!==r||this.registerAnimationClips({code:e,name:n,type:r,gltf:i}),this.model.set(e,i),this.bindBodyMeshes(e,s)}mountAposeScene(e){this.getCharacterGroup()?.add(e),this.animationManager.addAnimationTarget(e),e.traverse((e=>{e.isMesh&&(e.material.side=t.DoubleSide)}))}registerAnimationClips(t){let{code:e,name:i,type:n,gltf:r}=t;r.animations.forEach((t=>{const e=t.tracks.findIndex((t=>"BS_Mod.morphTargetInfluences"===t.name));if(e>=0){const i=t.tracks[e],n=this.config.model?.body.options.find((t=>t.key.startsWith("Head_Mod"))),r=this.config.model?.body.options.find((t=>t.key.startsWith("Eyelashes_Mod")));if(n&&r){const s=this.cloneTrack(i,`${n.key}.morphTargetInfluences`),o=this.cloneTrack(i,`${r.key}.morphTargetInfluences`);t.tracks.splice(e,1),t.tracks.push(s,o)}}}));const s=r.animations.map((t=>({code:e,animation:t,type:n,text:i})));this.animationManager.addAnimations(s)}bindBodyMeshes(t,e){if(t!==this.config.model?.body.name&&!t.includes("_mesh_body"))return;const i={...this.getBody()};this.config.model?.body.options.forEach((t=>{i[t.key]={...t,mesh:e.getObjectByName(t.name)}})),this.setBody(i)}}class Dr{cleanMaterial(t){const e=t=>{["map","lightMap","bumpMap","normalMap","specularMap","envMap","aoMap","emissiveMap","metalnessMap","roughnessMap","alphaMap","displacementMap"].forEach((e=>{t[e]&&t[e].dispose()})),t.dispose()};Array.isArray(t)?t.forEach((t=>e(t))):e(t)}cleanupScene(t){t&&t.traverse((t=>{t.isMesh&&(t.geometry?.dispose(),t.material&&this.cleanMaterial(t.material))}))}}class Br extends n{animationFrameId=0;container=null;scene=null;camera=null;renderer=null;controls=null;width=1;height=1;depth=10;config;isNotRender=!1;clock=null;body={};characterGroup=new t.Group;lightGroup=new t.Group;state={};onWindowResizeBound=null;rotationCenter=new t.Vector3(0,0,0);_container="";gui=null;humanObj;sceneManager;interactionManager;backgroundManager;animationManager;blendShapeManager;modelRuntime;resourceCleaner;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;super(),this.humanObj=n,this.config=i,this._container=e,this.sceneManager=new kr({config:this.config,container:this._container,characterGroup:this.characterGroup,lightGroup:this.lightGroup,state:this.state}),this.interactionManager=new Tr({config:this.config,container:this.container,characterGroup:this.characterGroup,state:this.state,getAnimationFrameId:()=>this.animationFrameId}),this.backgroundManager=new Lr,this.animationManager=new Rr({config:this.config,emit:(t,e)=>this.emit(t,e)}),this.blendShapeManager=new Fr({getBody:()=>this.body}),this.modelRuntime=new Pr({config:this.config,animationManager:this.animationManager,getScene:()=>this.scene,getCharacterGroup:()=>this.characterGroup,getBody:()=>this.body,setBody:t=>{this.body=t}}),this.resourceCleaner=new Dr,this.setContainer(),this.isNotRender||this.init(),this.config.debug&&(window.THREE=t)}syncSceneRuntime(){const t=this.sceneManager.getSnapshot();this.container=t.container,this.scene=t.scene,this.camera=t.camera,this.renderer=t.renderer,this.controls=t.controls,this.width=t.width,this.height=t.height,this.isNotRender=t.isNotRender,this.interactionManager.setContainer(this.container),this.interactionManager.setCharacterGroup(this.characterGroup),this.backgroundManager.setRuntimeRefs({scene:this.scene,camera:this.camera,renderer:this.renderer,width:this.width,height:this.height})}init(){this.sceneManager.setConfig(this.config),this.sceneManager.setContainerRef(this._container),this.sceneManager.setGroups(this.characterGroup,this.lightGroup),this.interactionManager.setConfig(this.config),this.interactionManager.setCharacterGroup(this.characterGroup),this.animationManager.setConfig(this.config),this.modelRuntime.setConfig(this.config),this.sceneManager.init(),this.syncSceneRuntime(),this.renderer&&(this.clock=new t.Clock,this.modelRuntime.detectTextureSupport(this.renderer),this.onWindowResizeBound=this.onWindowResize.bind(this),window.addEventListener("resize",this.onWindowResizeBound,!1))}createDefaultCamera(){return this.sceneManager.createDefaultCamera()}createRenderer(){return this.sceneManager.createRenderer()}setContainer(){this.sceneManager.setContainerRef(this._container),this.sceneManager.resolveContainer(),this.syncSceneRuntime()}updateLight(){this.sceneManager.updateLight()}initLights(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.sceneManager.initLights(t),this.syncSceneRuntime()}loadCamera(t){const e=this.sceneManager.loadCamera(t);return this.syncSceneRuntime(),e}loadScene(t){return this.sceneManager.loadScene(t)}degree2Euler(t){return this.sceneManager.degree2Euler(t)}dataToMatrix4(t){return this.sceneManager.dataToMatrix4(t)}setLight(t){this.sceneManager.setLight(t)}setAngleView(t){let{camera:e}=t;this.sceneManager.setAngleView({camera:e})}async gsapContainer(t){return new Promise((e=>this.container?t.attr?(cancelAnimationFrame(this.animationFrameId),this.container.offsetWidth,this.container.offsetHeight,void hr.to(this.container,{duration:1,ease:"power2.inOut",...t.attr,onUpdate:()=>{const t=hr.getProperty(this.container,"width"),e=hr.getProperty(this.container,"height");this.width=parseFloat(`${t}`),this.height=parseFloat(`${e}`),this.renderer?.setSize(this.width,this.height),this.renderer?.render(this.scene,this.camera)},onComplete:()=>{this.onWindowResize(),this.animate(),e(!0)}})):void e(!1):(console.warn("container is null"),e(!1))))}initOrbitControls(){this.sceneManager.initOrbitControls(),this.syncSceneRuntime()}setBackground(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.backgroundManager.setBackground(t)}loadGLBModel(t){this.modelRuntime.loadGLBModel(t)}loadLowResTexture(t){return this.modelRuntime.loadLowResTexture(t)}changeBundle(t){this.modelRuntime.changeBundle(t)}loadBundles(e,i){return this.modelRuntime.loadBundles(e,i).then((e=>{if(!this.isNotRender){const{scale:e,position:i,rotation:n}=this.config.model||{};e&&this.characterGroup.scale.set(...e),i&&this.characterGroup.position.set(...i),n&&this.characterGroup.rotation.set(t.MathUtils.degToRad(n[0]),t.MathUtils.degToRad(n[1]),t.MathUtils.degToRad(n[2])),this.initOrbitControls(),this.loadCamera(this.config.camera),this.onWindowResize(),this.interactionManager.registerListeners()}this.emit("core.bundles.loaded",e)})).then((()=>{const t=this.animationManager.getMixer();return this.config.debug&&t&&(this.gui=new Sr(this.scene,t,this.animationManager.getAnimations().map((t=>t.animation)))),!0})).catch((t=>(console.error("Error loading models:",t),!1)))}onWindowResize=i((()=>{this.sceneManager.handleResize(),this.syncSceneRuntime()}),300,{leading:!0});setCamera(t,e){this.sceneManager.setCamera(t,e)}animate(){if(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),!(this.clock&&this.renderer&&this.scene&&this.camera))return;const t=this.clock.getDelta();this.animationManager.update(t),this.blendShapeManager.applyBlendShapes(),this.controls?.update(),this.backgroundManager.prepareFrame(),this.backgroundManager.renderBackground(),this.renderer.render(this.scene,this.camera)}startRender(){this.characterGroup&&this.scene&&!this.animationFrameId&&(this.animationManager.getMixer()&&this.playAction("idle",{loop:t.LoopRepeat,repetitions:Number.MAX_SAFE_INTEGER}),this.scene.remove(this.characterGroup),this.scene.add(this.characterGroup),this.animate())}stopRender(){this.animationFrameId&&this.characterGroup&&this.scene&&(this.scene.remove(this.characterGroup),this.animationManager.stopAllAction(),setTimeout((()=>{cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0}),100))}gsapMorph(t,e,i){const n={duration:.3,ease:"easy",onComplete:()=>{}};e.forEach(((t,e)=>{n[e]=t})),hr.to(t,n)}playAction=(()=>{var t=this;return function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.animationManager.playAction(e,i)}})();stopAllActionExcludeIdle(){this.animationManager.stopAllActionExcludeIdle()}stopAllAction(){this.animationManager.stopAllAction()}cleanMaterial(t){this.resourceCleaner.cleanMaterial(t)}destroy(){this.isNotRender||(this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=0),this.animationManager.destroy(),this.interactionManager.removeEventListeners(),this.onWindowResizeBound&&(window.removeEventListener("resize",this.onWindowResizeBound,!1),this.onWindowResizeBound=null),this.backgroundManager.destroy(),this.blendShapeManager.destroy(),this.modelRuntime.destroy(),this.controls&&(this.controls.dispose(),this.controls=null),this.resourceCleaner.cleanupScene(this.scene),this.gui?.dispose(),this.gui=null,this.renderer?.dispose(),this.renderer?.domElement?.parentNode&&this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.clearReferences())}clearReferences(){this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.body={},this.characterGroup=new t.Group,this.lightGroup=new t.Group,this.interactionManager.setCharacterGroup(this.characterGroup),this.sceneManager.setGroups(this.characterGroup,this.lightGroup)}async playByShapes(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.blendShapeManager.playByShapes(t,e)}stopServerShapes(){this.blendShapeManager.stopServerShapes()}addModel(t,e){this.modelRuntime.addModel(t,e)}destoryModel(t){this.modelRuntime.destroyModel(t,(t=>this.cleanMaterial(t)))}muteAction(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.animationManager.muteAction(t)}getModelInfo(){return this.animationManager.getModelInfo(this.characterGroup)}loadGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.loadGlb(t,e)}addGlb(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return this.modelRuntime.addGlb(t,e)}setCharacterCenter(){if(!this.characterGroup)return;const e=this.characterGroup.children.find((t=>t.name.includes("body")));if(!e)return;const i=(new t.Box3).setFromObject(e).getCenter(new t.Vector3);this.characterGroup.children.forEach((t=>{t.position.sub(i)})),this.characterGroup.position.add(i)}setVideoBackground(t){this.backgroundManager.setVideoBackground(t)}loadCubeBackground(t){this.backgroundManager.loadCubeBackground(t)}updateBackgroundSize(t,e){this.backgroundManager.updateBackgroundSize(t,e)}setBackgroundColorOrGradient(t){this.backgroundManager.setBackgroundColorOrGradient(t)}}class zr{hm;animationFrameId=0;container;scene;width;height;depth=1e3;zAxisNumber;camera;renderer;sphere;parameters=[];materials=[];particles_init_postion;zprogress;zprogress_second;particles_first=[];particles_second=[];constructor(e,i){this.hm=i,this.container="string"==typeof e?document.getElementById(e):e,this.width=this.container.clientWidth,this.height=this.container.clientHeight,this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4);const n=this.height/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.max(n-this.depth/2,this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0),this.initLight(),this.particles_init_postion=-this.zAxisNumber-this.depth/2,this.zprogress=this.particles_init_postion,this.zprogress_second=2*this.particles_init_postion,this.particles_first=this.initSceneStar(this.particles_init_postion),this.particles_second=this.initSceneStar(this.zprogress_second),this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement),this.initOrbitControls(),this.animate(),this.hm.on(a.HUMAN_LOAD_PROGRESS,this.onProgress),this.initProgressBar()}initProgressBar(){const t=document.createElement("div");t.id="loadingContainer",t.className="loading-container w-full h-full bg-[#000]",t.style.width="100%",t.style.height="100%";const e=document.createElement("div");e.className="bottom-20 flex justify-center left-0 absolute w-full items-center flex-col",e.style.display="flex",e.style.justifyContent="center",e.style.alignItems="center",e.style.flexDirection="column",e.style.position="absolute",e.style.left="0px",e.style.bottom="5rem",e.style.width="100%";const i=document.createElement("div");i.className="qt-progress-wrap w-3/4 h-[0.375rem] bg-[rgba(255,249,249,0.2)] rounded-1 overflow-hidden",i.style.backgroundColor="rgba(255,249,249,0.2)",i.style.height="0.375rem",i.style.width="75%",i.style.overflow="hidden",i.style.borderRadius=".25rem";const n=document.createElement("div");n.className="qt-progress w-[10%] h-[0.375rem] bg-white rounded-1",n.id="qtprogress",n.style.backgroundColor="rgb(255,255,255,1)",n.style.height="0.375rem",n.style.width="0",n.style.transition="width linear 0.3s",n.style.borderRadius=".25rem",i.appendChild(n),e.appendChild(i),t.appendChild(e);const r=document.createElement("div");r.className="text-white mt-4 text-sm",r.textContent="正在加载...",r.id="qtprogresstext",r.style.color="rgb(255,255,255,1)",r.style.fontSize="0.875rem",r.style.lineHeight="1.25rem",r.style.marginTop="1rem",e.appendChild(r),this.container.appendChild(t)}initScene(){this.scene=new t.Scene,this.scene.fog=new t.Fog(0,0,1e4)}initCamera(){const e=this.width/2/Math.tan(Math.PI/12);this.zAxisNumber=Math.floor(e-this.depth/2),this.camera=new t.PerspectiveCamera(15,this.width/this.height,1,1e4),this.camera.position.set(0,0,this.zAxisNumber),this.camera.lookAt(0,0,0)}initRenderer(){this.renderer=new t.WebGLRenderer,this.renderer.setSize(this.width,this.height),this.container.appendChild(this.renderer.domElement)}initOrbitControls(){const t=new m(this.camera,this.renderer.domElement);t.enabled=!1,t.update()}animate(){this.animationFrameId=requestAnimationFrame(this.animate.bind(this)),this.renderStarMove(),this.renderer.render(this.scene,this.camera)}initLight(){const e=new t.AmbientLight(16777215);this.scene.add(e);const i=new t.PointLight(415229,5,0);i.position.set(50,50,50),this.scene.add(i)}renderSphereRotate(){this.sphere.rotateY(.01)}initSceneStar(e){const i=new t.BufferGeometry,n=[],s=new t.TextureLoader,o=s.load("data:image/png;base64,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"),a=s.load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU9JREFUOBGlk0tLQzEQRm/qFav4AKUrQXEpgv//j4jLYtWVWJ/46K2N54RMudSdHTh0msw3mWTmpmbFcs4DlhL4K9qiklNK+kszsBhC/Q3YhCFsVZ+fpoNv+Kr+D4kyfjmpqeKW/9twAEdwCDugfcAUHuEFPmFuEkWaJysewQmcwTGYTHuFOxjDBB7ApPO23tmyDVZ8CRfV7ye4YW0PtBl0aBdW4N29s2V7smKTnMMuaO8Qyd7wn+raLF7aB/POln0Kivch9vVdc88YY9UMDLACr+CDeYrEybhLcy32jVWTTLCWmcB+2mdf1RaJd14112LfWDVl6pwsh2QK9+BrX4Otc0/0XXPPGGPVlC5YgRPmkIwhWvWM7501Eyi+AmOMVZNbZ5t+Wo7lTUCzVbfQT9AfJGM7tXZgrVEuCXpJ/vcxmSCsjraJ7VC0OR7zz+f8C54rgrcYdoUhAAAAAElFTkSuQmCC");this.parameters=[[[.6,100,.75],o,50],[[0,0,1],a,20]];for(let e=0;e<500;e++){const e=t.MathUtils.randFloatSpread(this.width),i=r(0,3*this.height/5),s=r(-this.depth/2,this.zAxisNumber);n.push(e,i,s)}i.setAttribute("position",new t.Float32BufferAttribute(n,3));const h=[];for(let n=0;n<this.parameters.length;n++){const r=this.parameters[n][0],s=this.parameters[n][1],o=this.parameters[n][2];this.materials[n]=new t.PointsMaterial({size:o,map:s,blending:t.AdditiveBlending,transparent:!0,depthTest:!1}),this.materials[n].color.setHSL(r[0],r[1],r[2]);const a=new t.Points(i,this.materials[n]);a.rotation.x=.2*Math.random()-.15,a.rotation.y=.2*Math.random()-.15,a.rotation.z=.2*Math.random()-.15,a.position.setZ(e),h.push(a),this.scene.add(a)}return h}renderStarMove(){const t=5e-5*Date.now();for(let e=0;e<this.parameters.length;e++){const i=this.parameters[e][0],n=360*(i[0]+t)%360/360;this.materials[e].color.setHSL(i[0],i[1],parseFloat(n.toFixed(2)))}this.zprogress+=10,this.zprogress_second+=10,this.zprogress>=this.zAxisNumber+this.depth/2?this.zprogress=this.particles_init_postion:this.particles_first.forEach((t=>{t.position.setZ(this.zprogress)})),this.zprogress_second>=this.zAxisNumber+this.depth/2?this.zprogress_second=this.particles_init_postion:this.particles_second.forEach((t=>{t.position.setZ(this.zprogress_second)}))}onProgress(t){let{progress:e,total:i}=t;document.getElementById("qtprogress").style.width=`${i}%`,document.getElementById("qtprogresstext").innerText=`正在加载:${i}%`}destroy(){cancelAnimationFrame(this.animationFrameId),this.renderer.dispose(),this.hm.off(a.HUMAN_LOAD_PROGRESS,this.onProgress),this.renderer.domElement.parentNode&&(this.renderer.domElement.parentNode.removeChild(this.renderer.domElement),this.container.innerHTML="")}}export{zr as L,Br as T};
|