1 Star 0 Fork 0

show-case/introduce

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
239.46798ecbcdef724d.js 124.79 KB
一键复制 编辑 原始数据 按行查看 历史
Mel 提交于 2023-10-25 14:37 . :art:
"use strict";(self.webpackChunkintroduce=self.webpackChunkintroduce||[]).push([[239],{2648:(Ei,ct,Ke)=>{Ke.d(ct,{C:()=>fe});var X=Ke(6682),Le=Ke(6821);class fe{constructor(v,N,V,I,L){this.camera=v,this.renderer=N,this.scene=V,this.params={continuous:!1,enable:!1,debug:!1,frame:120,blendWindow:100,lightCount:8,lightIntensity:5,bias:3e-4,aoWeight:.424,ao:{position:new X.Pa4(0,2,0),radius:1},shadow:{position:new X.Pa4(2,2,2),radius:.5}},this.lights=[],this.lightHelpers=[],this.objects=[],this.frame=0,this.color=new X.Ilk,window.shadow=this,L&&(this.gui=L),this.initLights(),this.initGUI()}initLights(){this.scene.traverse(v=>{v.isMesh&&(v.receiveShadow||v.castShadow)&&this.objects.push(v)});for(let v=0;v<this.params.lightCount;v++){const N=new X.Ox3(16777215,this.params.lightIntensity/this.params.lightCount);N.castShadow=!0,N.shadow.camera.near=1,N.shadow.camera.far=5e3,N.shadow.bias=this.params.bias,N.shadow.mapSize.width=N.shadow.mapSize.height=512,N.position.copy(this.params.shadow.position),this.lights.push(N);const V=this.genMesh();V.visible=this.params.debug,V.position.copy(this.params.shadow.position),this.scene.add(V),this.lightHelpers.push(V)}this.aoLightHelper=new X.Kj0(new X.xo$(1),new X.vBJ({color:16777215,wireframe:!0})),this.aoLightHelper.visible=this.params.debug,this.aoLightHelper.position.copy(this.params.ao.position),this.scene.add(this.aoLightHelper),this.progressiveLightMap=new Le.n(this.renderer,1024),this.progressiveLightMap.addObjectsToLightMap([...this.objects,...this.lights]),this.params.enable=!0}update(){if(!this.params.continuous){if(!this.params.enable||this.frame>=this.params.frame)return;this.frame++}this.lights.forEach((v,N)=>{if(Math.random()>this.params.aoWeight)v.position.set(this.params.shadow.position.x+Math.random()*this.params.shadow.radius,this.params.shadow.position.y+Math.random()*this.params.shadow.radius,this.params.shadow.position.z+Math.random()*this.params.shadow.radius),this.lightHelpers[N].position.copy(v.position);else{const V=this.randomHemisphere(this.params.ao.radius).add(this.params.ao.position);v.position.copy(V),this.lightHelpers[N].position.copy(V)}}),this.progressiveLightMap.update(this.camera,this.params.continuous?this.params.blendWindow:this.frame<.2*this.params.frame?10:this.params.blendWindow,!0)}refresh(){this.params.continuous||(this.params.enable=!1,this.frame=0,this.params.enable=!0)}genMesh(v=.2){return new X.Kj0(new X.DvJ(v,v,v),new X.vBJ({color:this.randomColor()}))}randomColor(){return"#"+this.color.setHSL(Math.random(),.5,.5).getHexString()}randomHemisphere(v){const N=this.getRangeRandom(.5*-Math.PI,.5*Math.PI),V=v*Math.sin(N),I=v*Math.cos(N),L=this.getRangeRandom(-Math.PI,Math.PI),ae=V,U=ae*Math.sin(L),Fe=ae*Math.cos(L);return new X.Pa4(U,I,Fe)}getRangeRandom(v,N){return Math.random()*(N-v)+v}initGUI(){!this.gui||(this.gui.hide(),(v=>{v.open(),v.add(this.params,"continuous",!0,!1),v.add(this.params,"debug",!0,!1).onChange(N=>{this.aoLightHelper.visible=N,this.lightHelpers.forEach(V=>V.visible=N),this.progressiveLightMap.showDebugLightmap(N)}),v.add(this.params,"blendWindow",1,200).name("BlendWindow").step(1),v.add(this.params,"lightIntensity",1,10).step(1).name("Intensity").onChange(N=>{this.lights.forEach(V=>{V.intensity=this.params.lightIntensity/this.params.lightCount})}),v.add(this.params,"bias",-1,1).step(1e-6).onChange(N=>{this.lights.forEach(V=>V.shadow.bias=N)}),v.add(this.params,"aoWeight",0,1).step(.001).name("AOWeight"),v.add({refresh:()=>{this.refresh()}},"refresh")})(this.gui.addFolder("Common")),(v=>{v.open(),["x","y","z"].forEach(N=>{v.add(this.params.ao.position,N,2,500).step(1).onChange(V=>{this.aoLightHelper.position.copy(this.params.ao.position)})}),v.add(this.params.ao,"radius",0,100).step(.1).name("Radius").onChange(N=>{this.aoLightHelper.scale.setScalar(N)})})(this.gui.addFolder("AO")),(v=>{v.open(),["x","y","z"].forEach(N=>{v.add(this.params.shadow.position,N,-100,100).step(1)}),v.add(this.params.shadow,"radius",0,10).step(.1).name("Radius")})(this.gui.addFolder("Shadow")))}}},2549:(Ei,ct,Ke)=>{function Le(h,s){var u=h.__state.conversionName.toString(),_=Math.round(h.r),p=Math.round(h.g),m=Math.round(h.b),T=h.a,k=Math.round(h.h),F=h.s.toFixed(1),W=h.v.toFixed(1);if(s||"THREE_CHAR_HEX"===u||"SIX_CHAR_HEX"===u){for(var te=h.hex.toString(16);te.length<6;)te="0"+te;return"#"+te}return"CSS_RGB"===u?"rgb("+_+","+p+","+m+")":"CSS_RGBA"===u?"rgba("+_+","+p+","+m+","+T+")":"HEX"===u?"0x"+h.hex.toString(16):"RGB_ARRAY"===u?"["+_+","+p+","+m+"]":"RGBA_ARRAY"===u?"["+_+","+p+","+m+","+T+"]":"RGB_OBJ"===u?"{r:"+_+",g:"+p+",b:"+m+"}":"RGBA_OBJ"===u?"{r:"+_+",g:"+p+",b:"+m+",a:"+T+"}":"HSV_OBJ"===u?"{h:"+k+",s:"+F+",v:"+W+"}":"HSVA_OBJ"===u?"{h:"+k+",s:"+F+",v:"+W+",a:"+T+"}":"unknown format"}Ke.d(ct,{XS:()=>Ye});var fe=Array.prototype.forEach,ye=Array.prototype.slice,v={BREAK:{},extend:function(s){return this.each(ye.call(arguments,1),function(u){(this.isObject(u)?Object.keys(u):[]).forEach(function(p){this.isUndefined(u[p])||(s[p]=u[p])}.bind(this))},this),s},defaults:function(s){return this.each(ye.call(arguments,1),function(u){(this.isObject(u)?Object.keys(u):[]).forEach(function(p){this.isUndefined(s[p])&&(s[p]=u[p])}.bind(this))},this),s},compose:function(){var s=ye.call(arguments);return function(){for(var u=ye.call(arguments),_=s.length-1;_>=0;_--)u=[s[_].apply(this,u)];return u[0]}},each:function(s,u,_){if(s)if(fe&&s.forEach&&s.forEach===fe)s.forEach(u,_);else if(s.length===s.length+0){var m,p=void 0;for(p=0,m=s.length;p<m;p++)if(p in s&&u.call(_,s[p],p)===this.BREAK)return}else for(var T in s)if(u.call(_,s[T],T)===this.BREAK)return},defer:function(s){setTimeout(s,0)},debounce:function(s,u,_){var p=void 0;return function(){var m=this,T=arguments;function k(){p=null,_||s.apply(m,T)}var F=_||!p;clearTimeout(p),p=setTimeout(k,u),F&&s.apply(m,T)}},toArray:function(s){return s.toArray?s.toArray():ye.call(s)},isUndefined:function(s){return void 0===s},isNull:function(s){return null===s},isNaN:function(h){function s(u){return h.apply(this,arguments)}return s.toString=function(){return h.toString()},s}(function(h){return isNaN(h)}),isArray:Array.isArray||function(h){return h.constructor===Array},isObject:function(s){return s===Object(s)},isNumber:function(s){return s===s+0},isString:function(s){return s===s+""},isBoolean:function(s){return!1===s||!0===s},isFunction:function(s){return s instanceof Function}},N=[{litmus:v.isString,conversions:{THREE_CHAR_HEX:{read:function(s){var u=s.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==u&&{space:"HEX",hex:parseInt("0x"+u[1].toString()+u[1].toString()+u[2].toString()+u[2].toString()+u[3].toString()+u[3].toString(),0)}},write:Le},SIX_CHAR_HEX:{read:function(s){var u=s.match(/^#([A-F0-9]{6})$/i);return null!==u&&{space:"HEX",hex:parseInt("0x"+u[1].toString(),0)}},write:Le},CSS_RGB:{read:function(s){var u=s.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);return null!==u&&{space:"RGB",r:parseFloat(u[1]),g:parseFloat(u[2]),b:parseFloat(u[3])}},write:Le},CSS_RGBA:{read:function(s){var u=s.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);return null!==u&&{space:"RGB",r:parseFloat(u[1]),g:parseFloat(u[2]),b:parseFloat(u[3]),a:parseFloat(u[4])}},write:Le}}},{litmus:v.isNumber,conversions:{HEX:{read:function(s){return{space:"HEX",hex:s,conversionName:"HEX"}},write:function(s){return s.hex}}}},{litmus:v.isArray,conversions:{RGB_ARRAY:{read:function(s){return 3===s.length&&{space:"RGB",r:s[0],g:s[1],b:s[2]}},write:function(s){return[s.r,s.g,s.b]}},RGBA_ARRAY:{read:function(s){return 4===s.length&&{space:"RGB",r:s[0],g:s[1],b:s[2],a:s[3]}},write:function(s){return[s.r,s.g,s.b,s.a]}}}},{litmus:v.isObject,conversions:{RGBA_OBJ:{read:function(s){return!!(v.isNumber(s.r)&&v.isNumber(s.g)&&v.isNumber(s.b)&&v.isNumber(s.a))&&{space:"RGB",r:s.r,g:s.g,b:s.b,a:s.a}},write:function(s){return{r:s.r,g:s.g,b:s.b,a:s.a}}},RGB_OBJ:{read:function(s){return!!(v.isNumber(s.r)&&v.isNumber(s.g)&&v.isNumber(s.b))&&{space:"RGB",r:s.r,g:s.g,b:s.b}},write:function(s){return{r:s.r,g:s.g,b:s.b}}},HSVA_OBJ:{read:function(s){return!!(v.isNumber(s.h)&&v.isNumber(s.s)&&v.isNumber(s.v)&&v.isNumber(s.a))&&{space:"HSV",h:s.h,s:s.s,v:s.v,a:s.a}},write:function(s){return{h:s.h,s:s.s,v:s.v,a:s.a}}},HSV_OBJ:{read:function(s){return!!(v.isNumber(s.h)&&v.isNumber(s.s)&&v.isNumber(s.v))&&{space:"HSV",h:s.h,s:s.s,v:s.v}},write:function(s){return{h:s.h,s:s.s,v:s.v}}}}}],V=void 0,I=void 0,L=function(){I=!1;var s=arguments.length>1?v.toArray(arguments):arguments[0];return v.each(N,function(u){if(u.litmus(s))return v.each(u.conversions,function(_,p){if(V=_.read(s),!1===I&&!1!==V)return I=V,V.conversionName=p,V.conversion=_,v.BREAK}),v.BREAK}),I},ae=void 0,U={hsv_to_rgb:function(s,u,_){var p=Math.floor(s/60)%6,m=s/60-Math.floor(s/60),T=_*(1-u),k=_*(1-m*u),F=_*(1-(1-m)*u),W=[[_,F,T],[k,_,T],[T,_,F],[T,k,_],[F,T,_],[_,T,k]][p];return{r:255*W[0],g:255*W[1],b:255*W[2]}},rgb_to_hsv:function(s,u,_){var p=Math.min(s,u,_),m=Math.max(s,u,_),T=m-p,k=void 0;return 0===m?{h:NaN,s:0,v:0}:(k=s===m?(u-_)/T:u===m?2+(_-s)/T:4+(s-u)/T,(k/=6)<0&&(k+=1),{h:360*k,s:T/m,v:m/255})},rgb_to_hex:function(s,u,_){var p=this.hex_with_component(0,2,s);return p=this.hex_with_component(p,1,u),this.hex_with_component(p,0,_)},component_from_hex:function(s,u){return s>>8*u&255},hex_with_component:function(s,u,_){return _<<(ae=8*u)|s&~(255<<ae)}},Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},j=function(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")},Ee=function(){function h(s,u){for(var _=0;_<u.length;_++){var p=u[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}return function(s,u,_){return u&&h(s.prototype,u),_&&h(s,_),s}}(),qe=function h(s,u,_){null===s&&(s=Function.prototype);var p=Object.getOwnPropertyDescriptor(s,u);if(void 0===p){var m=Object.getPrototypeOf(s);return null===m?void 0:h(m,u,_)}if("value"in p)return p.value;var T=p.get;return void 0===T?void 0:T.call(_)},ie=function(h,s){if("function"!=typeof s&&null!==s)throw new TypeError("Super expression must either be null or a function, not "+typeof s);h.prototype=Object.create(s&&s.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),s&&(Object.setPrototypeOf?Object.setPrototypeOf(h,s):h.__proto__=s)},K=function(h,s){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||"object"!=typeof s&&"function"!=typeof s?h:s},Z=function(){function h(){if(j(this,h),this.__state=L.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return Ee(h,[{key:"toString",value:function(){return Le(this)}},{key:"toHexString",value:function(){return Le(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),h}();function pt(h,s,u){Object.defineProperty(h,s,{get:function(){return"RGB"===this.__state.space||Z.recalculateRGB(this,s,u),this.__state[s]},set:function(p){"RGB"!==this.__state.space&&(Z.recalculateRGB(this,s,u),this.__state.space="RGB"),this.__state[s]=p}})}function ke(h,s){Object.defineProperty(h,s,{get:function(){return"HSV"===this.__state.space||Z.recalculateHSV(this),this.__state[s]},set:function(_){"HSV"!==this.__state.space&&(Z.recalculateHSV(this),this.__state.space="HSV"),this.__state[s]=_}})}Z.recalculateRGB=function(h,s,u){if("HEX"===h.__state.space)h.__state[s]=U.component_from_hex(h.__state.hex,u);else{if("HSV"!==h.__state.space)throw new Error("Corrupted color state");v.extend(h.__state,U.hsv_to_rgb(h.__state.h,h.__state.s,h.__state.v))}},Z.recalculateHSV=function(h){var s=U.rgb_to_hsv(h.r,h.g,h.b);v.extend(h.__state,{s:s.s,v:s.v}),v.isNaN(s.h)?v.isUndefined(h.__state.h)&&(h.__state.h=0):h.__state.h=s.h},Z.COMPONENTS=["r","g","b","h","s","v","hex","a"],pt(Z.prototype,"r",2),pt(Z.prototype,"g",1),pt(Z.prototype,"b",0),ke(Z.prototype,"h"),ke(Z.prototype,"s"),ke(Z.prototype,"v"),Object.defineProperty(Z.prototype,"a",{get:function(){return this.__state.a},set:function(s){this.__state.a=s}}),Object.defineProperty(Z.prototype,"hex",{get:function(){return"HEX"!==this.__state.space&&(this.__state.hex=U.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(s){this.__state.space="HEX",this.__state.hex=s}});var oe=function(){function h(s,u){j(this,h),this.initialValue=s[u],this.domElement=document.createElement("div"),this.object=s,this.property=u,this.__onChange=void 0,this.__onFinishChange=void 0}return Ee(h,[{key:"onChange",value:function(u){return this.__onChange=u,this}},{key:"onFinishChange",value:function(u){return this.__onFinishChange=u,this}},{key:"setValue",value:function(u){return this.object[this.property]=u,this.__onChange&&this.__onChange.call(this,u),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),h}(),mt={};v.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},function(h,s){v.each(h,function(u){mt[u]=s})});var mi=/(\d+(\.\d+)?)px/;function ne(h){if("0"===h||v.isUndefined(h))return 0;var s=h.match(mi);return v.isNull(s)?0:parseFloat(s[1])}var x={makeSelectable:function(s,u){void 0===s||void 0===s.style||(s.onselectstart=u?function(){return!1}:function(){},s.style.MozUserSelect=u?"auto":"none",s.style.KhtmlUserSelect=u?"auto":"none",s.unselectable=u?"on":"off")},makeFullscreen:function(s,u,_){var p=_,m=u;v.isUndefined(m)&&(m=!0),v.isUndefined(p)&&(p=!0),s.style.position="absolute",m&&(s.style.left=0,s.style.right=0),p&&(s.style.top=0,s.style.bottom=0)},fakeEvent:function(s,u,_,p){var m=_||{},T=mt[u];if(!T)throw new Error("Event type "+u+" not supported.");var k=document.createEvent(T);switch(T){case"MouseEvents":k.initMouseEvent(u,m.bubbles||!1,m.cancelable||!0,window,m.clickCount||1,0,0,m.x||m.clientX||0,m.y||m.clientY||0,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var te=k.initKeyboardEvent||k.initKeyEvent;v.defaults(m,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),te(u,m.bubbles||!1,m.cancelable,window,m.ctrlKey,m.altKey,m.shiftKey,m.metaKey,m.keyCode,m.charCode);break;default:k.initEvent(u,m.bubbles||!1,m.cancelable||!0)}v.defaults(k,p),s.dispatchEvent(k)},bind:function(s,u,_,p){return s.addEventListener?s.addEventListener(u,_,p||!1):s.attachEvent&&s.attachEvent("on"+u,_),x},unbind:function(s,u,_,p){return s.removeEventListener?s.removeEventListener(u,_,p||!1):s.detachEvent&&s.detachEvent("on"+u,_),x},addClass:function(s,u){if(void 0===s.className)s.className=u;else if(s.className!==u){var _=s.className.split(/ +/);-1===_.indexOf(u)&&(_.push(u),s.className=_.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return x},removeClass:function(s,u){if(u)if(s.className===u)s.removeAttribute("class");else{var _=s.className.split(/ +/),p=_.indexOf(u);-1!==p&&(_.splice(p,1),s.className=_.join(" "))}else s.className=void 0;return x},hasClass:function(s,u){return new RegExp("(?:^|\\s+)"+u+"(?:\\s+|$)").test(s.className)||!1},getWidth:function(s){var u=getComputedStyle(s);return ne(u["border-left-width"])+ne(u["border-right-width"])+ne(u["padding-left"])+ne(u["padding-right"])+ne(u.width)},getHeight:function(s){var u=getComputedStyle(s);return ne(u["border-top-width"])+ne(u["border-bottom-width"])+ne(u["padding-top"])+ne(u["padding-bottom"])+ne(u.height)},getOffset:function(s){var u=s,_={left:0,top:0};if(u.offsetParent)do{_.left+=u.offsetLeft,_.top+=u.offsetTop,u=u.offsetParent}while(u);return _},isActive:function(s){return s===document.activeElement&&(s.type||s.href)}},Dt=function(h){function s(u,_){j(this,s);var p=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_)),m=p;return p.__prev=p.getValue(),p.__checkbox=document.createElement("input"),p.__checkbox.setAttribute("type","checkbox"),x.bind(p.__checkbox,"change",function T(){m.setValue(!m.__prev)},!1),p.domElement.appendChild(p.__checkbox),p.updateDisplay(),p}return ie(s,h),Ee(s,[{key:"setValue",value:function(_){var p=qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"setValue",this).call(this,_);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),p}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"updateDisplay",this).call(this)}}]),s}(oe),Je=function(h){function s(u,_,p){j(this,s);var m=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_)),T=p,k=m;if(m.__select=document.createElement("select"),v.isArray(T)){var F={};v.each(T,function(W){F[W]=W}),T=F}return v.each(T,function(W,te){var H=document.createElement("option");H.innerHTML=te,H.setAttribute("value",W),k.__select.appendChild(H)}),m.updateDisplay(),x.bind(m.__select,"change",function(){k.setValue(this.options[this.selectedIndex].value)}),m.domElement.appendChild(m.__select),m}return ie(s,h),Ee(s,[{key:"setValue",value:function(_){var p=qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"setValue",this).call(this,_);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),p}},{key:"updateDisplay",value:function(){return x.isActive(this.__select)?this:(this.__select.value=this.getValue(),qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"updateDisplay",this).call(this))}}]),s}(oe),Lt=function(h){function s(u,_){j(this,s);var p=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_)),m=p;function T(){m.setValue(m.__input.value)}return p.__input=document.createElement("input"),p.__input.setAttribute("type","text"),x.bind(p.__input,"keyup",T),x.bind(p.__input,"change",T),x.bind(p.__input,"blur",function k(){m.__onFinishChange&&m.__onFinishChange.call(m,m.getValue())}),x.bind(p.__input,"keydown",function(F){13===F.keyCode&&this.blur()}),p.updateDisplay(),p.domElement.appendChild(p.__input),p}return ie(s,h),Ee(s,[{key:"updateDisplay",value:function(){return x.isActive(this.__input)||(this.__input.value=this.getValue()),qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"updateDisplay",this).call(this)}}]),s}(oe);function Zt(h){var s=h.toString();return s.indexOf(".")>-1?s.length-s.indexOf(".")-1:0}var Ft=function(h){function s(u,_,p){j(this,s);var m=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_)),T=p||{};return m.__min=T.min,m.__max=T.max,m.__step=T.step,m.__impliedStep=v.isUndefined(m.__step)?0===m.initialValue?1:Math.pow(10,Math.floor(Math.log(Math.abs(m.initialValue))/Math.LN10))/10:m.__step,m.__precision=Zt(m.__impliedStep),m}return ie(s,h),Ee(s,[{key:"setValue",value:function(_){var p=_;return void 0!==this.__min&&p<this.__min?p=this.__min:void 0!==this.__max&&p>this.__max&&(p=this.__max),void 0!==this.__step&&p%this.__step!=0&&(p=Math.round(p/this.__step)*this.__step),qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"setValue",this).call(this,p)}},{key:"min",value:function(_){return this.__min=_,this}},{key:"max",value:function(_){return this.__max=_,this}},{key:"step",value:function(_){return this.__step=_,this.__impliedStep=_,this.__precision=Zt(_),this}}]),s}(oe),ee=function(h){function s(u,_,p){j(this,s);var m=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_,p));m.__truncationSuspended=!1;var T=m,k=void 0;function W(){T.__onFinishChange&&T.__onFinishChange.call(T,T.getValue())}function H(de){var G=k-de.clientY;T.setValue(T.getValue()+G*T.__impliedStep),k=de.clientY}function q(){x.unbind(window,"mousemove",H),x.unbind(window,"mouseup",q),W()}return m.__input=document.createElement("input"),m.__input.setAttribute("type","text"),x.bind(m.__input,"change",function F(){var de=parseFloat(T.__input.value);v.isNaN(de)||T.setValue(de)}),x.bind(m.__input,"blur",function te(){W()}),x.bind(m.__input,"mousedown",function Be(de){x.bind(window,"mousemove",H),x.bind(window,"mouseup",q),k=de.clientY}),x.bind(m.__input,"keydown",function(de){13===de.keyCode&&(T.__truncationSuspended=!0,this.blur(),T.__truncationSuspended=!1,W())}),m.updateDisplay(),m.domElement.appendChild(m.__input),m}return ie(s,h),Ee(s,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():function Oi(h,s){var u=Math.pow(10,s);return Math.round(h*u)/u}(this.getValue(),this.__precision),qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"updateDisplay",this).call(this)}}]),s}(Ft);function Oe(h,s,u,_,p){return _+(h-s)/(u-s)*(p-_)}var at=function(h){function s(u,_,p,m,T){j(this,s);var k=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_,{min:p,max:m,step:T})),F=k;function te(G){G.preventDefault();var we=F.__background.getBoundingClientRect();return F.setValue(Oe(G.clientX,we.left,we.right,F.__min,F.__max)),!1}function H(){x.unbind(window,"mousemove",te),x.unbind(window,"mouseup",H),F.__onFinishChange&&F.__onFinishChange.call(F,F.getValue())}function Be(G){var we=G.touches[0].clientX,tt=F.__background.getBoundingClientRect();F.setValue(Oe(we,tt.left,tt.right,F.__min,F.__max))}function de(){x.unbind(window,"touchmove",Be),x.unbind(window,"touchend",de),F.__onFinishChange&&F.__onFinishChange.call(F,F.getValue())}return k.__background=document.createElement("div"),k.__foreground=document.createElement("div"),x.bind(k.__background,"mousedown",function W(G){document.activeElement.blur(),x.bind(window,"mousemove",te),x.bind(window,"mouseup",H),te(G)}),x.bind(k.__background,"touchstart",function q(G){1===G.touches.length&&(x.bind(window,"touchmove",Be),x.bind(window,"touchend",de),Be(G))}),x.addClass(k.__background,"slider"),x.addClass(k.__foreground,"slider-fg"),k.updateDisplay(),k.__background.appendChild(k.__foreground),k.domElement.appendChild(k.__background),k}return ie(s,h),Ee(s,[{key:"updateDisplay",value:function(){var _=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*_+"%",qe(s.prototype.__proto__||Object.getPrototypeOf(s.prototype),"updateDisplay",this).call(this)}}]),s}(Ft),gt=function(h){function s(u,_,p){j(this,s);var m=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_)),T=m;return m.__button=document.createElement("div"),m.__button.innerHTML=void 0===p?"Fire":p,x.bind(m.__button,"click",function(k){return k.preventDefault(),T.fire(),!1}),x.addClass(m.__button,"button"),m.domElement.appendChild(m.__button),m}return ie(s,h),Ee(s,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),s}(oe),xe=function(h){function s(u,_){j(this,s);var p=K(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u,_));p.__color=new Z(p.getValue()),p.__temp=new Z(0);var m=p;p.domElement=document.createElement("div"),x.makeSelectable(p.domElement,!1),p.__selector=document.createElement("div"),p.__selector.className="selector",p.__saturation_field=document.createElement("div"),p.__saturation_field.className="saturation-field",p.__field_knob=document.createElement("div"),p.__field_knob.className="field-knob",p.__field_knob_border="2px solid ",p.__hue_knob=document.createElement("div"),p.__hue_knob.className="hue-knob",p.__hue_field=document.createElement("div"),p.__hue_field.className="hue-field",p.__input=document.createElement("input"),p.__input.type="text",p.__input_textShadow="0 1px 1px ",x.bind(p.__input,"keydown",function(G){13===G.keyCode&&H.call(this)}),x.bind(p.__input,"blur",H),x.bind(p.__selector,"mousedown",function(){x.addClass(this,"drag").bind(window,"mouseup",function(){x.removeClass(m.__selector,"drag")})}),x.bind(p.__selector,"touchstart",function(){x.addClass(this,"drag").bind(window,"touchend",function(){x.removeClass(m.__selector,"drag")})});var T=document.createElement("div");function k(G){Be(G),x.bind(window,"mousemove",Be),x.bind(window,"touchmove",Be),x.bind(window,"mouseup",W),x.bind(window,"touchend",W)}function F(G){de(G),x.bind(window,"mousemove",de),x.bind(window,"touchmove",de),x.bind(window,"mouseup",te),x.bind(window,"touchend",te)}function W(){x.unbind(window,"mousemove",Be),x.unbind(window,"touchmove",Be),x.unbind(window,"mouseup",W),x.unbind(window,"touchend",W),q()}function te(){x.unbind(window,"mousemove",de),x.unbind(window,"touchmove",de),x.unbind(window,"mouseup",te),x.unbind(window,"touchend",te),q()}function H(){var G=L(this.value);!1!==G?(m.__color.__state=G,m.setValue(m.__color.toOriginal())):this.value=m.__color.toString()}function q(){m.__onFinishChange&&m.__onFinishChange.call(m,m.__color.toOriginal())}function Be(G){-1===G.type.indexOf("touch")&&G.preventDefault();var we=m.__saturation_field.getBoundingClientRect(),tt=G.touches&&G.touches[0]||G,Me=(tt.clientX-we.left)/(we.right-we.left),$e=1-(tt.clientY-we.top)/(we.bottom-we.top);return $e>1?$e=1:$e<0&&($e=0),Me>1?Me=1:Me<0&&(Me=0),m.__color.v=$e,m.__color.s=Me,m.setValue(m.__color.toOriginal()),!1}function de(G){-1===G.type.indexOf("touch")&&G.preventDefault();var we=m.__hue_field.getBoundingClientRect(),Ne=1-((G.touches&&G.touches[0]||G).clientY-we.top)/(we.bottom-we.top);return Ne>1?Ne=1:Ne<0&&(Ne=0),m.__color.h=360*Ne,m.setValue(m.__color.toOriginal()),!1}return v.extend(p.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),v.extend(p.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:p.__field_knob_border+(p.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),v.extend(p.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),v.extend(p.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),v.extend(T.style,{width:"100%",height:"100%",background:"none"}),ei(T,"top","rgba(0,0,0,0)","#000"),v.extend(p.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),function gi(h){h.style.background="",h.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",h.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",h.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",h.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",h.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}(p.__hue_field),v.extend(p.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:p.__input_textShadow+"rgba(0,0,0,0.7)"}),x.bind(p.__saturation_field,"mousedown",k),x.bind(p.__saturation_field,"touchstart",k),x.bind(p.__field_knob,"mousedown",k),x.bind(p.__field_knob,"touchstart",k),x.bind(p.__hue_field,"mousedown",F),x.bind(p.__hue_field,"touchstart",F),p.__saturation_field.appendChild(T),p.__selector.appendChild(p.__field_knob),p.__selector.appendChild(p.__saturation_field),p.__selector.appendChild(p.__hue_field),p.__hue_field.appendChild(p.__hue_knob),p.domElement.appendChild(p.__input),p.domElement.appendChild(p.__selector),p.updateDisplay(),p}return ie(s,h),Ee(s,[{key:"updateDisplay",value:function(){var _=L(this.getValue());if(!1!==_){var p=!1;v.each(Z.COMPONENTS,function(k){if(!v.isUndefined(_[k])&&!v.isUndefined(this.__color.__state[k])&&_[k]!==this.__color.__state[k])return p=!0,{}},this),p&&v.extend(this.__color.__state,_)}v.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var m=this.__color.v<.5||this.__color.s>.5?255:0,T=255-m;v.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+m+","+m+","+m+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,ei(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),v.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+m+","+m+","+m+")",textShadow:this.__input_textShadow+"rgba("+T+","+T+","+T+",.7)"})}}]),s}(oe),Bt=["-moz-","-o-","-webkit-","-ms-",""];function ei(h,s,u,_){h.style.background="",v.each(Bt,function(p){h.style.cssText+="background: "+p+"linear-gradient("+s+", "+u+" 0%, "+_+" 100%); "})}var Nt='<div id="dg-save" class="dg dialogue">\n\n Here\'s the new load parameter for your <code>GUI</code>\'s constructor:\n\n <textarea id="dg-new-constructor"></textarea>\n\n <div id="dg-save-locally">\n\n <input id="dg-local-storage" type="checkbox"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id="dg-local-explain">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>\'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>',vi=function(s,u){var _=s[u];return v.isArray(arguments[2])||v.isObject(arguments[2])?new Je(s,u,arguments[2]):v.isNumber(_)?v.isNumber(arguments[2])&&v.isNumber(arguments[3])?v.isNumber(arguments[4])?new at(s,u,arguments[2],arguments[3],arguments[4]):new at(s,u,arguments[2],arguments[3]):v.isNumber(arguments[4])?new ee(s,u,{min:arguments[2],max:arguments[3],step:arguments[4]}):new ee(s,u,{min:arguments[2],max:arguments[3]}):v.isString(_)?new Lt(s,u):v.isFunction(_)?new gt(s,u,""):v.isBoolean(_)?new Dt(s,u):null},Ai=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function vt(h){setTimeout(h,1e3/60)},zt=function(){function h(){j(this,h),this.backgroundElement=document.createElement("div"),v.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),x.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),v.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var s=this;x.bind(this.backgroundElement,"click",function(){s.hide()})}return Ee(h,[{key:"show",value:function(){var u=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),v.defer(function(){u.backgroundElement.style.opacity=1,u.domElement.style.opacity=1,u.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var u=this,_=function p(){u.domElement.style.display="none",u.backgroundElement.style.display="none",x.unbind(u.domElement,"webkitTransitionEnd",p),x.unbind(u.domElement,"transitionend",p),x.unbind(u.domElement,"oTransitionEnd",p)};x.bind(this.domElement,"webkitTransitionEnd",_),x.bind(this.domElement,"transitionend",_),x.bind(this.domElement,"oTransitionEnd",_),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-x.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-x.getHeight(this.domElement)/2+"px"}}]),h}();!function(s,u){var _=u||document,p=document.createElement("style");p.type="text/css",p.innerHTML=s;var m=_.getElementsByTagName("head")[0];try{m.appendChild(p)}catch{}}(function X(h){if(h&&!(typeof window>"u")){var s=document.createElement("style");return s.setAttribute("type","text/css"),s.innerHTML=h,document.head.appendChild(s),h}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));var ot="Default",me=function(){try{return!!window.localStorage}catch{return!1}}(),Ze=void 0,ii=!0,Xe=void 0,bt=!1,Ut=[],Y=function h(s){var u=this,_=s||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),x.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],_=v.defaults(_,{closeOnTop:!1,autoPlace:!0,width:h.DEFAULT_WIDTH}),_=v.defaults(_,{resizable:_.autoPlace,hideable:_.autoPlace}),v.isUndefined(_.load)?_.load={preset:ot}:_.preset&&(_.load.preset=_.preset),v.isUndefined(_.parent)&&_.hideable&&Ut.push(this),_.resizable=v.isUndefined(_.parent)&&_.resizable,_.autoPlace&&v.isUndefined(_.scrollable)&&(_.scrollable=!0);var p=me&&"true"===localStorage.getItem(We(0,"isLocal")),m=void 0,T=void 0;if(Object.defineProperties(this,{parent:{get:function(){return _.parent}},scrollable:{get:function(){return _.scrollable}},autoPlace:{get:function(){return _.autoPlace}},closeOnTop:{get:function(){return _.closeOnTop}},preset:{get:function(){return u.parent?u.getRoot().preset:_.load.preset},set:function(q){u.parent?u.getRoot().preset=q:_.load.preset=q,function yi(h){for(var s=0;s<h.__preset_select.length;s++)h.__preset_select[s].value===h.preset&&(h.__preset_select.selectedIndex=s)}(this),u.revert()}},width:{get:function(){return _.width},set:function(q){_.width=q,ri(u,q)}},name:{get:function(){return _.name},set:function(q){_.name=q,T&&(T.innerHTML=_.name)}},closed:{get:function(){return _.closed},set:function(q){_.closed=q,_.closed?x.addClass(u.__ul,h.CLASS_CLOSED):x.removeClass(u.__ul,h.CLASS_CLOSED),this.onResize(),u.__closeButton&&(u.__closeButton.innerHTML=q?h.TEXT_OPEN:h.TEXT_CLOSED)}},load:{get:function(){return _.load}},useLocalStorage:{get:function(){return p},set:function(q){me&&(p=q,q?x.bind(window,"unload",m):x.unbind(window,"unload",m),localStorage.setItem(We(0,"isLocal"),q))}}}),v.isUndefined(_.parent)){if(this.closed=_.closed||!1,x.addClass(this.domElement,h.CLASS_MAIN),x.makeSelectable(this.domElement,!1),me&&p){u.useLocalStorage=!0;var k=localStorage.getItem(We(0,"gui"));k&&(_.load=JSON.parse(k))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=h.TEXT_CLOSED,x.addClass(this.__closeButton,h.CLASS_CLOSE_BUTTON),_.closeOnTop?(x.addClass(this.__closeButton,h.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(x.addClass(this.__closeButton,h.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),x.bind(this.__closeButton,"click",function(){u.closed=!u.closed})}else{void 0===_.closed&&(_.closed=!0);var F=document.createTextNode(_.name);x.addClass(F,"controller-name"),T=Ht(u,F),x.addClass(this.__ul,h.CLASS_CLOSED),x.addClass(T,"title"),x.bind(T,"click",function(q){return q.preventDefault(),u.closed=!u.closed,!1}),_.closed||(this.closed=!1)}_.autoPlace&&(v.isUndefined(_.parent)&&(ii&&(Xe=document.createElement("div"),x.addClass(Xe,"dg"),x.addClass(Xe,h.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(Xe),ii=!1),Xe.appendChild(this.domElement),x.addClass(this.domElement,h.CLASS_AUTO_PLACE)),this.parent||ri(u,_.width)),this.__resizeHandler=function(){u.onResizeDebounced()},x.bind(window,"resize",this.__resizeHandler),x.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),x.bind(this.__ul,"transitionend",this.__resizeHandler),x.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),_.resizable&&function Pe(h){var s=void 0;function u(m){return m.preventDefault(),h.width+=s-m.clientX,h.onResize(),s=m.clientX,!1}function _(){x.removeClass(h.__closeButton,Y.CLASS_DRAG),x.unbind(window,"mousemove",u),x.unbind(window,"mouseup",_)}function p(m){return m.preventDefault(),s=m.clientX,x.addClass(h.__closeButton,Y.CLASS_DRAG),x.bind(window,"mousemove",u),x.bind(window,"mouseup",_),!1}h.__resize_handle=document.createElement("div"),v.extend(h.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),x.bind(h.__resize_handle,"mousedown",p),x.bind(h.__closeButton,"mousedown",p),h.domElement.insertBefore(h.__resize_handle,h.domElement.firstElementChild)}(this),this.saveToLocalStorageIfPossible=m=function(){me&&"true"===localStorage.getItem(We(0,"isLocal"))&&localStorage.setItem(We(0,"gui"),JSON.stringify(u.getSaveObject()))},_.parent||function te(){var H=u.getRoot();H.width+=1,v.defer(function(){H.width-=1})}()};function Ht(h,s,u){var _=document.createElement("li");return s&&_.appendChild(s),u?h.__ul.insertBefore(_,u):h.__ul.appendChild(_),h.onResize(),_}function Ce(h){x.unbind(window,"resize",h.__resizeHandler),h.saveToLocalStorageIfPossible&&x.unbind(window,"unload",h.saveToLocalStorageIfPossible)}function se(h,s){var u=h.__preset_select[h.__preset_select.selectedIndex];u.innerHTML=s?u.value+"*":u.value}function et(h,s){var u=h.getRoot(),_=u.__rememberedObjects.indexOf(s.object);if(-1!==_){var p=u.__rememberedObjectIndecesToControllers[_];if(void 0===p&&(u.__rememberedObjectIndecesToControllers[_]=p={}),p[s.property]=s,u.load&&u.load.remembered){var m=u.load.remembered,T=void 0;if(m[h.preset])T=m[h.preset];else{if(!m[ot])return;T=m[ot]}if(T[_]&&void 0!==T[_][s.property]){var k=T[_][s.property];s.initialValue=k,s.setValue(k)}}}}function yt(h,s,u,_){if(void 0===s[u])throw new Error('Object "'+s+'" has no property "'+u+'"');var p=void 0;if(_.color)p=new xe(s,u);else{var m=[s,u].concat(_.factoryArgs);p=vi.apply(h,m)}_.before instanceof oe&&(_.before=_.before.__li),et(h,p),x.addClass(p.domElement,"c");var T=document.createElement("span");x.addClass(T,"property-name"),T.innerHTML=p.property;var k=document.createElement("div");k.appendChild(T),k.appendChild(p.domElement);var F=Ht(h,k,_.before);return x.addClass(F,Y.CLASS_CONTROLLER_ROW),x.addClass(F,p instanceof xe?"color":Fe(p.getValue())),function ge(h,s,u){if(u.__li=s,u.__gui=h,v.extend(u,{options:function(T){if(arguments.length>1){var k=u.__li.nextElementSibling;return u.remove(),yt(h,u.object,u.property,{before:k,factoryArgs:[v.toArray(arguments)]})}if(v.isArray(T)||v.isObject(T)){var F=u.__li.nextElementSibling;return u.remove(),yt(h,u.object,u.property,{before:F,factoryArgs:[T]})}},name:function(T){return u.__li.firstElementChild.firstElementChild.innerHTML=T,u},listen:function(){return u.__gui.listen(u),u},remove:function(){return u.__gui.remove(u),u}}),u instanceof at){var _=new ee(u.object,u.property,{min:u.__min,max:u.__max,step:u.__step});v.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(m){var T=u[m],k=_[m];u[m]=_[m]=function(){var F=Array.prototype.slice.call(arguments);return k.apply(_,F),T.apply(u,F)}}),x.addClass(s,"has-slider"),u.domElement.insertBefore(_.domElement,u.domElement.firstElementChild)}else if(u instanceof ee){var p=function(T){if(v.isNumber(u.__min)&&v.isNumber(u.__max)){var k=u.__li.firstElementChild.firstElementChild.innerHTML,F=u.__gui.__listening.indexOf(u)>-1;u.remove();var W=yt(h,u.object,u.property,{before:u.__li.nextElementSibling,factoryArgs:[u.__min,u.__max,u.__step]});return W.name(k),F&&W.listen(),W}return T};u.min=v.compose(p,u.min),u.max=v.compose(p,u.max)}else u instanceof Dt?(x.bind(s,"click",function(){x.fakeEvent(u.__checkbox,"click")}),x.bind(u.__checkbox,"click",function(m){m.stopPropagation()})):u instanceof gt?(x.bind(s,"click",function(){x.fakeEvent(u.__button,"click")}),x.bind(s,"mouseover",function(){x.addClass(u.__button,"hover")}),x.bind(s,"mouseout",function(){x.removeClass(u.__button,"hover")})):u instanceof xe&&(x.addClass(s,"color"),u.updateDisplay=v.compose(function(m){return s.style.borderLeftColor=u.__color.toString(),m},u.updateDisplay),u.updateDisplay());u.setValue=v.compose(function(m){return h.getRoot().__preset_select&&u.isModified()&&se(h.getRoot(),!0),m},u.setValue)}(h,F,p),h.__controllers.push(p),p}function We(h,s){return document.location.href+"."+s}function Gt(h,s,u){var _=document.createElement("option");_.innerHTML=s,_.value=s,h.__preset_select.appendChild(_),u&&(h.__preset_select.selectedIndex=h.__preset_select.length-1)}function ni(h,s){s.style.display=h.useLocalStorage?"block":"none"}function bi(h){var s=h.__save_row=document.createElement("li");x.addClass(h.domElement,"has-save"),h.__ul.insertBefore(s,h.__ul.firstChild),x.addClass(s,"save-row");var u=document.createElement("span");u.innerHTML="&nbsp;",x.addClass(u,"button gears");var _=document.createElement("span");_.innerHTML="Save",x.addClass(_,"button"),x.addClass(_,"save");var p=document.createElement("span");p.innerHTML="New",x.addClass(p,"button"),x.addClass(p,"save-as");var m=document.createElement("span");m.innerHTML="Revert",x.addClass(m,"button"),x.addClass(m,"revert");var T=h.__preset_select=document.createElement("select");if(h.load&&h.load.remembered?v.each(h.load.remembered,function(H,q){Gt(h,q,q===h.preset)}):Gt(h,ot,!1),x.bind(T,"change",function(){for(var H=0;H<h.__preset_select.length;H++)h.__preset_select[H].innerHTML=h.__preset_select[H].value;h.preset=this.value}),s.appendChild(T),s.appendChild(u),s.appendChild(_),s.appendChild(p),s.appendChild(m),me){var k=document.getElementById("dg-local-explain"),F=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(We(0,"isLocal"))&&F.setAttribute("checked","checked"),ni(h,k),x.bind(F,"change",function(){h.useLocalStorage=!h.useLocalStorage,ni(h,k)})}var te=document.getElementById("dg-new-constructor");x.bind(te,"keydown",function(H){H.metaKey&&(67===H.which||67===H.keyCode)&&Ze.hide()}),x.bind(u,"click",function(){te.innerHTML=JSON.stringify(h.getSaveObject(),void 0,2),Ze.show(),te.focus(),te.select()}),x.bind(_,"click",function(){h.save()}),x.bind(p,"click",function(){var H=prompt("Enter a new preset name.");H&&h.saveAs(H)}),x.bind(m,"click",function(){h.revert()})}function ri(h,s){h.domElement.style.width=s+"px",h.__save_row&&h.autoPlace&&(h.__save_row.style.width=s+"px"),h.__closeButton&&(h.__closeButton.style.width=s+"px")}function Ve(h,s){var u={};return v.each(h.__rememberedObjects,function(_,p){var m={};v.each(h.__rememberedObjectIndecesToControllers[p],function(k,F){m[F]=s?k.initialValue:k.getValue()}),u[p]=m}),u}function xt(h){0!==h.length&&Ai.call(window,function(){xt(h)}),v.each(h,function(s){s.updateDisplay()})}Y.toggleHide=function(){bt=!bt,v.each(Ut,function(h){h.domElement.style.display=bt?"none":""})},Y.CLASS_AUTO_PLACE="a",Y.CLASS_AUTO_PLACE_CONTAINER="ac",Y.CLASS_MAIN="main",Y.CLASS_CONTROLLER_ROW="cr",Y.CLASS_TOO_TALL="taller-than-window",Y.CLASS_CLOSED="closed",Y.CLASS_CLOSE_BUTTON="close-button",Y.CLASS_CLOSE_TOP="close-top",Y.CLASS_CLOSE_BOTTOM="close-bottom",Y.CLASS_DRAG="drag",Y.DEFAULT_WIDTH=245,Y.TEXT_CLOSED="Close Controls",Y.TEXT_OPEN="Open Controls",Y._keydownHandler=function(h){"text"!==document.activeElement.type&&(72===h.which||72===h.keyCode)&&Y.toggleHide()},x.bind(window,"keydown",Y._keydownHandler,!1),v.extend(Y.prototype,{add:function(s,u){return yt(this,s,u,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(s,u){return yt(this,s,u,{color:!0})},remove:function(s){this.__ul.removeChild(s.__li),this.__controllers.splice(this.__controllers.indexOf(s),1);var u=this;v.defer(function(){u.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&Xe.removeChild(this.domElement);var s=this;v.each(this.__folders,function(u){s.removeFolder(u)}),x.unbind(window,"keydown",Y._keydownHandler,!1),Ce(this)},addFolder:function(s){if(void 0!==this.__folders[s])throw new Error('You already have a folder in this GUI by the name "'+s+'"');var u={name:s,parent:this};u.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[s]&&(u.closed=this.load.folders[s].closed,u.load=this.load.folders[s]);var _=new Y(u);this.__folders[s]=_;var p=Ht(this,_.domElement);return x.addClass(p,"folder"),_},removeFolder:function(s){this.__ul.removeChild(s.domElement.parentElement),delete this.__folders[s.name],this.load&&this.load.folders&&this.load.folders[s.name]&&delete this.load.folders[s.name],Ce(s);var u=this;v.each(s.__folders,function(_){s.removeFolder(_)}),v.defer(function(){u.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var s=this.getRoot();if(s.scrollable){var u=x.getOffset(s.__ul).top,_=0;v.each(s.__ul.childNodes,function(p){s.autoPlace&&p===s.__save_row||(_+=x.getHeight(p))}),window.innerHeight-u-20<_?(x.addClass(s.domElement,Y.CLASS_TOO_TALL),s.__ul.style.height=window.innerHeight-u-20+"px"):(x.removeClass(s.domElement,Y.CLASS_TOO_TALL),s.__ul.style.height="auto")}s.__resize_handle&&v.defer(function(){s.__resize_handle.style.height=s.__ul.offsetHeight+"px"}),s.__closeButton&&(s.__closeButton.style.width=s.width+"px")},onResizeDebounced:v.debounce(function(){this.onResize()},50),remember:function(){if(v.isUndefined(Ze)&&((Ze=new zt).domElement.innerHTML=Nt),this.parent)throw new Error("You can only call remember on a top level GUI.");var s=this;v.each(Array.prototype.slice.call(arguments),function(u){0===s.__rememberedObjects.length&&bi(s),-1===s.__rememberedObjects.indexOf(u)&&s.__rememberedObjects.push(u)}),this.autoPlace&&ri(this,this.width)},getRoot:function(){for(var s=this;s.parent;)s=s.parent;return s},getSaveObject:function(){var s=this.load;return s.closed=this.closed,this.__rememberedObjects.length>0&&(s.preset=this.preset,s.remembered||(s.remembered={}),s.remembered[this.preset]=Ve(this)),s.folders={},v.each(this.__folders,function(u,_){s.folders[_]=u.getSaveObject()}),s},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=Ve(this),se(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(s){this.load.remembered||(this.load.remembered={},this.load.remembered[ot]=Ve(this,!0)),this.load.remembered[s]=Ve(this),this.preset=s,Gt(this,s,!0),this.saveToLocalStorageIfPossible()},revert:function(s){v.each(this.__controllers,function(u){this.getRoot().load.remembered?et(s||this.getRoot(),u):u.setValue(u.initialValue),u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())},this),v.each(this.__folders,function(u){u.revert(u)}),s||se(this.getRoot(),!1)},listen:function(s){var u=0===this.__listening.length;this.__listening.push(s),u&&xt(this.__listening)},updateDisplay:function(){v.each(this.__controllers,function(s){s.updateDisplay()}),v.each(this.__folders,function(s){s.updateDisplay()})}});var Ye=Y},9749:(Ei,ct,Ke)=>{function X(d){if(void 0===d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function Le(d,e){d.prototype=Object.create(e.prototype),d.prototype.constructor=d,d.__proto__=e}Ke.d(ct,{ZP:()=>nn,p8:()=>nn});var v,N,V,ee,Oe,at,gt,ei,ot,Wt,ui,l,f,c,y,b,w,d,e,t,i,n,r,a,o,C,fe={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ye={duration:.5,overwrite:!1,delay:0},I=1e8,L=1/I,ae=2*Math.PI,U=ae/4,Fe=0,j=Math.sqrt,Ee=Math.cos,qe=Math.sin,ie=function(e){return"string"==typeof e},K=function(e){return"function"==typeof e},Z=function(e){return"number"==typeof e},pt=function(e){return typeof e>"u"},ke=function(e){return"object"==typeof e},oe=function(e){return!1!==e},pi=function(){return typeof window<"u"},mt=function(e){return K(e)||ie(e)},mi="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},ne=Array.isArray,x=/(?:-?\.?\d|\.)+/gi,Dt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Je=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Lt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Zt=/[+-]=-?[.\d]+/,Ft=/[^,'"\[\]\s]+/gi,Oi=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,xe={},Bt={},gi=function(e){return(Bt=Ve(e,xe))&&Ie},ti=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Nt=function(e,t){return!t&&console.warn(e)},vi=function(e,t){return e&&(xe[e]=t)&&Bt&&(Bt[e]=t)||xe},vt=function(){return 0},Ai={suppressEvents:!0,isStart:!0,kill:!1},zt={suppressEvents:!0,kill:!1},ki={suppressEvents:!0},It={},Ge=[],Vt={},me={},Ze={},ii=30,Xe=[],bt="",Ut=function(e){var i,n,t=e[0];if(ke(t)||K(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(n=Xe.length;n--&&!Xe[n].targetTest(t););i=Xe[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new yn(e[n],i)))||e.splice(n,1);return e},Y=function(e){return e._gsap||Ut(Ue(e))[0]._gsap},Ht=function(e,t,i){return(i=e[t])&&K(i)?e[t]():pt(i)&&e.getAttribute&&e.getAttribute(t)||i},Ce=function(e,t){return(e=e.split(",")).forEach(t)||e},se=function(e){return Math.round(1e5*e)/1e5||0},ge=function(e){return Math.round(1e7*e)/1e7||0},et=function(e,t){var i=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),"+"===i?e+n:"-"===i?e-n:"*"===i?e*n:e/n},yt=function(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i},We=function(){var i,n,e=Ge.length,t=Ge.slice(0);for(Vt={},Ge.length=0,i=0;i<e;i++)(n=t[i])&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},Gt=function(e,t,i,n){Ge.length&&We(),e.render(t,i,n||N&&t<0&&(e._initted||e._startAt)),Ge.length&&We()},ni=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(Ft).length<2?t:ie(e)?e.trim():e},bi=function(e){return e},Pe=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Ve=function(e,t){for(var i in t)e[i]=t[i];return e},yi=function d(e,t){for(var i in t)"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(e[i]=ke(t[i])?d(e[i]||(e[i]={}),t[i]):t[i]);return e},xt=function(e,t){var n,i={};for(n in e)n in t||(i[n]=e[n]);return i},wt=function(e){var t=e.parent||ee,i=e.keyframes?function(e){return function(t,i){for(var n in i)n in t||"duration"===n&&e||"ease"===n||(t[n]=i[n])}}(ne(e.keyframes)):Pe;if(oe(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},xi=function(e,t,i,n,r){void 0===i&&(i="_first"),void 0===n&&(n="_last");var o,a=e[n];if(r)for(o=t[r];a&&a[r]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},Xt=function(e,t,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=t._prev,a=t._next;r?r._next=a:e[i]===t&&(e[i]=a),a?a._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},Ye=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove(e),e._act=0},ut=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},rn=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},h=function(e,t,i,n){return e._startAt&&(N?e._startAt.revert(zt):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},s=function d(e){return!e||e._ts&&d(e.parent)},u=function(e){return e._repeat?_(e._tTime,e=e.duration()+e._rDelay)*e:0},_=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},p=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},m=function(e){return e._end=ge(e._start+(e._tDur/Math.abs(e._ts||e._rts||L)||0))},T=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=ge(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),m(e),i._dirty||ut(i,e)),e},k=function(e,t){var i;if((t._time||t._initted&&!t._dur)&&(i=p(e.rawTime(),t),(!t._dur||$e(0,t.totalDuration(),i)-t._tTime>L)&&t.render(i,!0)),ut(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-L}},F=function(e,t,i,n){return t.parent&&Ye(t),t._start=ge((Z(i)?i:i||e!==ee?Se(e,i,t):e._time)+t._delay),t._end=ge(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),xi(e,t,"_first","_last",e._sort?"_start":0),q(t)||(e._recent=t),n||k(e,t),e._ts<0&&T(e,e._tTime),e},W=function(e,t){return(xe.ScrollTrigger||ti("scrollTrigger",t))&&xe.ScrollTrigger.create(t,e)},te=function(e,t,i,n,r){return Ii(e,t,r),e._initted?!i&&e._pt&&!N&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&ot!==ze.frame?(Ge.push(e),e._lazy=[r,n],1):void 0:1},H=function d(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||d(t))},q=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},G=function(e,t,i,n){var r=e._repeat,a=ge(t)||0,o=e._tTime/e._tDur;return o&&!n&&(e._time*=a/e._dur),e._dur=a,e._tDur=r?r<0?1e10:ge(a*(r+1)+e._rDelay*r):a,o>0&&!n&&T(e,e._tTime=e._tDur*o),e.parent&&m(e),i||ut(e.parent,e),e},we=function(e){return e instanceof Re?ut(e):G(e,e._dur)},tt={_start:0,endTime:vt,totalDuration:vt},Se=function d(e,t,i){var o,l,f,n=e.labels,r=e._recent||tt,a=e.duration()>=I?r.endTime(!1):e._dur;return ie(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),f="%"===t.substr(-1),o=t.indexOf("="),"<"===l||">"===l?(o>=0&&(t=t.replace(/=/,"")),("<"===l?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(f?(o<0?r:i).totalDuration()/100:1)):o<0?(t in n||(n[t]=a),n[t]):(l=parseFloat(t.charAt(o-1)+t.substr(o+1)),f&&i&&(l=l/100*(ne(i)?i[0]:i).totalDuration()),o>1?d(e,t.substr(0,o-1),i)+l:a+l)):null==t?a:+t},Ne=function(e,t,i){var o,l,n=Z(t[1]),r=(n?2:1)+(e<2?0:1),a=t[r];if(n&&(a.duration=t[1]),a.parent=i,e){for(o=a,l=i;l&&!("immediateRender"in o);)o=l.vars.defaults||{},l=oe(l.vars.inherit)&&l.parent;a.immediateRender=oe(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[r-1]}return new ve(t[0],a,t[r+1])},Me=function(e,t){return e||0===e?t(e):t},$e=function(e,t,i){return i<e?e:i>t?t:i},Te=function(e,t){return ie(e)&&(t=Oi.exec(e))?t[1]:""},Mi=[].slice,sn=function(e,t){return e&&ke(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ke(e[0]))&&!e.nodeType&&e!==Oe},Ue=function(e,t,i){return V&&!t&&V.selector?V.selector(e):!ie(e)||i||!at&&Yt()?ne(e)?function(e,t,i){return void 0===i&&(i=[]),e.forEach(function(n){var r;return ie(n)&&!t||sn(n,1)?(r=i).push.apply(r,Ue(n)):i.push(n)})||i}(e,i):sn(e)?Mi.call(e,0):e?[e]:[]:Mi.call((t||gt).querySelectorAll(e),0)},Ri=function(e){return e=Ue(e)[0]||Nt("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return Ue(t,i.querySelectorAll?i:i===e?Nt("Invalid scope")||gt.createElement("div"):e)}},an=function(e){return e.sort(function(){return.5-Math.random()})},on=function(e){if(K(e))return e;var t=ke(e)?e:{each:e},i=Ct(t.ease),n=t.from||0,r=parseFloat(t.base)||0,a={},o=n>0&&n<1,l=isNaN(n)||o,f=t.axis,c=n,y=n;return ie(n)?c=y={center:.5,edges:.5,end:1}[n]||0:!o&&l&&(c=n[0],y=n[1]),function(b,w,C){var E,O,A,M,P,z,B,D,R,g=(C||t).length,S=a[g];if(!S){if(!(R="auto"===t.grid?0:(t.grid||[1,I])[1])){for(B=-I;B<(B=C[R++].getBoundingClientRect().left)&&R<g;);R--}for(S=a[g]=[],E=l?Math.min(R,g)*c-.5:n%R,O=R===I?0:l?g*y/R-.5:n/R|0,B=0,D=I,z=0;z<g;z++)A=z%R-E,M=O-(z/R|0),S[z]=P=f?Math.abs("y"===f?M:A):j(A*A+M*M),P>B&&(B=P),P<D&&(D=P);"random"===n&&an(S),S.max=B-D,S.min=D,S.v=g=(parseFloat(t.amount)||parseFloat(t.each)*(R>g?g-1:f?"y"===f?g/R:R:Math.max(R,g/R))||0)*("edges"===n?-1:1),S.b=g<0?r-g:r,S.u=Te(t.amount||t.each)||0,i=i&&g<0?gn(i):i}return g=(S[b]-S.min)/S.max||0,ge(S.b+(i?i(g):g)*S.v)+S.u}},Di=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var n=ge(Math.round(parseFloat(i)/e)*e*t);return(n-n%1)/t+(Z(i)?0:Te(i))}},un=function(e,t){var n,r,i=ne(e);return!i&&ke(e)&&(n=i=e.radius||I,e.values?(e=Ue(e.values),(r=!Z(e[0]))&&(n*=n)):e=Di(e.increment)),Me(t,i?K(e)?function(a){return r=e(a),Math.abs(r-a)<=n?r:a}:function(a){for(var b,w,o=parseFloat(r?a.x:a),l=parseFloat(r?a.y:0),f=I,c=0,y=e.length;y--;)(b=r?(b=e[y].x-o)*b+(w=e[y].y-l)*w:Math.abs(e[y]-o))<f&&(f=b,c=y);return c=!n||f<=n?e[c]:a,r||c===a||Z(a)?c:c+Te(a)}:Di(e))},ln=function(e,t,i,n){return Me(ne(e)?!t:!0===i?!!(i=0):!n,function(){return ne(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+.99*i))/i)*i*n)/n})},hn=function(e,t,i){return Me(i,function(n){return e[~~t(n)]})},si=function(e){for(var n,r,a,o,t=0,i="";~(n=e.indexOf("random(",t));)a=e.indexOf(")",n),o="["===e.charAt(n+7),r=e.substr(n+7,a-n-7).match(o?Ft:x),i+=e.substr(t,n-t)+ln(o?r:+r[0],o?0:+r[1],+r[2]||1e-5),t=a+1;return i+e.substr(t,e.length-t)},fn=function(e,t,i,n,r){var a=t-e,o=n-i;return Me(r,function(l){return i+((l-e)/a*o||0)})},dn=function(e,t,i){var a,o,l,n=e.labels,r=I;for(a in n)(o=n[a]-t)<0==!!i&&o&&r>(o=Math.abs(o))&&(l=a,r=o);return l},He=function(e,t,i){var l,f,c,n=e.vars,r=n[t],a=V,o=e._ctx;if(r)return l=n[t+"Params"],f=n.callbackScope||e,i&&Ge.length&&We(),o&&(V=o),c=l?r.apply(f,l):r.call(f),V=a,c},ai=function(e){return Ye(e),e.scrollTrigger&&e.scrollTrigger.kill(!!N),e.progress()<1&&He(e,"onInterrupt"),e},sr=function(e){var t=(e=!e.name&&e.default||e).name,i=K(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:vt,render:Hi,add:Ni,kill:xr,modifier:yr,rawVars:0},a={targetTest:0,get:0,getSetter:Ui,aliases:{},register:0};if(Yt(),e!==n){if(me[t])return;Pe(n,Pe(xt(e,r),a)),Ve(n.prototype,Ve(r,xt(e,a))),me[n.prop=t]=n,e.targetTest&&(Xe.push(n),It[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}vi(t,n),e.register&&e.register(Ie,n,De)},re=255,oi={aqua:[0,re,re],lime:[0,re,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,re],navy:[0,0,128],white:[re,re,re],olive:[128,128,0],yellow:[re,re,0],orange:[re,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[re,0,0],pink:[re,192,203],cyan:[0,re,re],transparent:[re,re,re,0]},Li=function(e,t,i){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(i-t)*e*6:e<.5?i:3*e<2?t+(i-t)*(2/3-e)*6:t)*re+.5|0},_n=function(e,t,i){var r,a,o,l,f,c,y,b,w,C,n=e?Z(e)?[e>>16,e>>8&re,e&re]:0:oi.black;if(!n){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),oi[e])n=oi[e];else if("#"===e.charAt(0)){if(e.length<6&&(r=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e="#"+r+r+a+a+o+o+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(n=parseInt(e.substr(1,6),16))>>16,n>>8&re,n&re,parseInt(e.substr(7),16)/255];n=[(e=parseInt(e.substr(1),16))>>16,e>>8&re,e&re]}else if("hsl"===e.substr(0,3))if(n=C=e.match(x),t){if(~e.indexOf("="))return n=e.match(Dt),i&&n.length<4&&(n[3]=1),n}else l=+n[0]%360/360,f=+n[1]/100,r=2*(c=+n[2]/100)-(a=c<=.5?c*(f+1):c+f-c*f),n.length>3&&(n[3]*=1),n[0]=Li(l+1/3,r,a),n[1]=Li(l,r,a),n[2]=Li(l-1/3,r,a);else n=e.match(x)||oi.transparent;n=n.map(Number)}return t&&!C&&(r=n[0]/re,a=n[1]/re,o=n[2]/re,c=((y=Math.max(r,a,o))+(b=Math.min(r,a,o)))/2,y===b?l=f=0:(w=y-b,f=c>.5?w/(2-y-b):w/(y+b),l=y===r?(a-o)/w+(a<o?6:0):y===a?(o-r)/w+2:(r-a)/w+4,l*=60),n[0]=~~(l+.5),n[1]=~~(100*f+.5),n[2]=~~(100*c+.5)),i&&n.length<4&&(n[3]=1),n},cn=function(e){var t=[],i=[],n=-1;return e.split(lt).forEach(function(r){var a=r.match(Je)||[];t.push.apply(t,a),i.push(n+=a.length+1)}),t.c=i,t},pn=function(e,t,i){var l,f,c,y,n="",r=(e+n).match(lt),a=t?"hsla(":"rgba(",o=0;if(!r)return e;if(r=r.map(function(b){return(b=_n(b,t,1))&&a+(t?b[0]+","+b[1]+"%,"+b[2]+"%,"+b[3]:b.join(","))+")"}),i&&(c=cn(e),(l=i.c).join(n)!==c.c.join(n)))for(y=(f=e.replace(lt,"1").split(Je)).length-1;o<y;o++)n+=f[o]+(~l.indexOf(o)?r.shift()||a+"0,0,0,0)":(c.length?c:r.length?r:i).shift());if(!f)for(y=(f=e.split(lt)).length-1;o<y;o++)n+=f[o]+r[o];return n+f[y]},lt=function(){var e,d="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in oi)d+="|"+e+"\\b";return new RegExp(d+")","gi")}(),ar=/hsl[a]?\(/,mn=function(e){var i,t=e.join(" ");if(lt.lastIndex=0,lt.test(t))return i=ar.test(t),e[1]=pn(e[1],i),e[0]=pn(e[0],i,cn(e[1])),!0},ze=(d=Date.now,e=500,t=33,i=d(),n=i,a=r=1e3/240,C=function g(S){var A,M,P,z,E=d()-n,O=!0===S;if(E>e&&(i+=E-t),((A=(P=(n+=E)-i)-a)>0||O)&&(z=++y.frame,b=P-1e3*y.time,y.time=P/=1e3,a+=A+(A>=r?4:r-A),M=1),O||(l=f(g)),M)for(w=0;w<o.length;w++)o[w](P,b,z,S)},y={time:0,frame:0,tick:function(){C(!0)},deltaRatio:function(S){return b/(1e3/(S||60))},wake:function(){ei&&(!at&&pi()&&(Oe=at=window,gt=Oe.document||{},xe.gsap=Ie,(Oe.gsapVersions||(Oe.gsapVersions=[])).push(Ie.version),gi(Bt||Oe.GreenSockGlobals||!Oe.gsap&&Oe||{}),c=Oe.requestAnimationFrame),l&&y.sleep(),f=c||function(S){return setTimeout(S,a-1e3*y.time+1|0)},ui=1,C(2))},sleep:function(){(c?Oe.cancelAnimationFrame:clearTimeout)(l),ui=0,f=vt},lagSmoothing:function(S,E){e=S||1/L,t=Math.min(E,e,0)},fps:function(S){a=1e3*y.time+(r=1e3/(S||240))},add:function(S,E,O){var A=E?function(M,P,z,B){S(M,P,z,B),y.remove(A)}:S;return y.remove(S),o[O?"unshift":"push"](A),Yt(),A},remove:function(S,E){~(E=o.indexOf(S))&&o.splice(E,1)&&w>=E&&w--},_listeners:o=[]}),Yt=function(){return!ui&&ze.wake()},$={},or=/^[\d.\-M][\d.\-,\s]/,ur=/["']/g,lr=function(e){for(var o,l,f,t={},i=e.substr(1,e.length-3).split(":"),n=i[0],r=1,a=i.length;r<a;r++)l=i[r],o=r!==a-1?l.lastIndexOf(","):l.length,f=l.substr(0,o),t[n]=isNaN(f)?f.replace(ur,"").trim():+f,n=l.substr(o+1).trim();return t},gn=function(e){return function(t){return 1-e(1-t)}},vn=function d(e,t){for(var n,i=e._first;i;)i instanceof Re?d(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?d(i.timeline,t):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=t)),i=i._next},Ct=function(e,t){return e&&(K(e)?e:$[e]||function(e){var t=(e+"").split("("),i=$[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[lr(t[1])]:function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<i?e.indexOf(")",i+1):i)}(e).split(",").map(ni)):$._CE&&or.test(e)?$._CE("",e):i}(e))||t},St=function(e,t,i,n){void 0===i&&(i=function(l){return 1-t(1-l)}),void 0===n&&(n=function(l){return l<.5?t(2*l)/2:1-t(2*(1-l))/2});var a,r={easeIn:t,easeOut:i,easeInOut:n};return Ce(e,function(o){for(var l in $[o]=xe[o]=r,$[a=o.toLowerCase()]=i,r)$[a+("easeIn"===l?".in":"easeOut"===l?".out":".inOut")]=$[o+"."+l]=r[l]}),r},bn=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},Fi=function d(e,t,i){var n=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),a=r/ae*(Math.asin(1/n)||0),o=function(c){return 1===c?1:n*Math.pow(2,-10*c)*qe((c-a)*r)+1},l="out"===e?o:"in"===e?function(f){return 1-o(1-f)}:bn(o);return r=ae/r,l.config=function(f,c){return d(e,f,c)},l},Bi=function d(e,t){void 0===t&&(t=1.70158);var i=function(a){return a?--a*a*((t+1)*a+t)+1:0},n="out"===e?i:"in"===e?function(r){return 1-i(1-r)}:bn(i);return n.config=function(r){return d(e,r)},n};Ce("Linear,Quad,Cubic,Quart,Quint,Strong",function(d,e){var t=e<5?e+1:e;St(d+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(2*i,t)/2:1-Math.pow(2*(1-i),t)/2})}),$.Linear.easeNone=$.none=$.Linear.easeIn,St("Elastic",Fi("in"),Fi("out"),Fi()),function(d,e){var r=function(o){return o<.36363636363636365?d*o*o:o<.7272727272727273?d*Math.pow(o-1.5/e,2)+.75:o<.9090909090909092?d*(o-=2.25/e)*o+.9375:d*Math.pow(o-2.625/e,2)+.984375};St("Bounce",function(a){return 1-r(1-a)},r)}(7.5625,2.75),St("Expo",function(d){return d?Math.pow(2,10*(d-1)):0}),St("Circ",function(d){return-(j(1-d*d)-1)}),St("Sine",function(d){return 1===d?1:1-Ee(d*U)}),St("Back",Bi("in"),Bi("out"),Bi()),$.SteppedEase=$.steps=xe.SteppedEase={config:function(e,t){void 0===e&&(e=1);var i=1/e,n=e+(t?0:1),r=t?1:0;return function(o){return((n*$e(0,.99999999,o)|0)+r)*i}}},ye.ease=$["quad.out"],Ce("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(d){return bt+=d+","+d+"Params,"});var yn=function(e,t){this.id=Fe++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Ht,this.set=t?t.getSetter:Ui},$t=function(){function d(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,G(this,+t.duration,1,1),this.data=t.data,V&&(this._ctx=V,V.data.push(this)),ui||ze.wake()}var e=d.prototype;return e.delay=function(i){return i||0===i?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,G(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,n){if(Yt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(T(this,i),!r._dp||r.parent||k(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&F(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===L||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Gt(this,i,n)),this},e.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+u(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},e.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?i:1-i)+u(this),n):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(i,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,n):this._repeat?_(this._tTime,r)+1:1},e.timeScale=function(i){if(!arguments.length)return this._rts===-L?0:this._rts;if(this._rts===i)return this;var n=this.parent&&this._ts?p(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-L?0:this._rts,this.totalTime($e(-this._delay,this._tDur,n),!0),m(this),rn(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Yt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==L&&(this._tTime-=L)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&F(n,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(oe(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?p(n.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){void 0===i&&(i=ki);var n=N;return N=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),"nested"!==this.data&&!1!==i.kill&&this.kill(),N=n,this},e.globalTime=function(i){for(var n=this,r=arguments.length?i:n.rawTime();n;)r=n._start+r/(n._ts||1),n=n._dp;return!this.parent&&this.vars.immediateRender?-1:r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,we(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,we(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,n){return this.totalTime(Se(this,i),oe(n))},e.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,oe(n))},e.play=function(i,n){return null!=i&&this.seek(i,n),this.reversed(!1).paused(!1)},e.reverse=function(i,n){return null!=i&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(i,n){return null!=i&&this.seek(i,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-L:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-L,this},e.isActive=function(){var r,i=this.parent||this._dp,n=this._start;return!(i&&!(this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=n&&r<this.endTime(!0)-L))},e.eventCallback=function(i,n,r){var a=this.vars;return arguments.length>1?(n?(a[i]=n,r&&(a[i+"Params"]=r),"onUpdate"===i&&(this._onUpdate=n)):delete a[i],this):a[i]},e.then=function(i){var n=this;return new Promise(function(r){var a=K(i)?i:bi,o=function(){var f=n.then;n.then=null,K(a)&&(a=a(n))&&(a.then||a===n)&&(n.then=f),r(a),n.then=f};n._initted&&1===n.totalProgress()&&n._ts>=0||!n._tTime&&n._ts<0?o():n._prom=o})},e.kill=function(){ai(this)},d}();Pe($t.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:-L,_prom:0,_ps:!1,_rts:1});var Re=function(d){function e(i,n){var r;return void 0===i&&(i={}),(r=d.call(this,i)||this).labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=oe(i.sortChildren),ee&&F(i.parent||ee,X(r),n),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&W(X(r),i.scrollTrigger),r}Le(e,d);var t=e.prototype;return t.to=function(n,r,a){return Ne(0,arguments,this),this},t.from=function(n,r,a){return Ne(1,arguments,this),this},t.fromTo=function(n,r,a,o){return Ne(2,arguments,this),this},t.set=function(n,r,a){return r.duration=0,r.parent=this,wt(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new ve(n,r,Se(this,a),1),this},t.call=function(n,r,a){return F(this,ve.delayedCall(0,n,r),a)},t.staggerTo=function(n,r,a,o,l,f,c){return a.duration=r,a.stagger=a.stagger||o,a.onComplete=f,a.onCompleteParams=c,a.parent=this,new ve(n,a,Se(this,l)),this},t.staggerFrom=function(n,r,a,o,l,f,c){return a.runBackwards=1,wt(a).immediateRender=oe(a.immediateRender),this.staggerTo(n,r,a,o,l,f,c)},t.staggerFromTo=function(n,r,a,o,l,f,c,y){return o.startAt=a,wt(o).immediateRender=oe(o.immediateRender),this.staggerTo(n,r,o,l,f,c,y)},t.render=function(n,r,a){var b,w,C,g,S,E,O,A,M,P,z,B,o=this._time,l=this._dirty?this.totalDuration():this._tDur,f=this._dur,c=n<=0?0:ge(n),y=this._zTime<0!=n<0&&(this._initted||!f);if(this!==ee&&c>l&&n>=0&&(c=l),c!==this._tTime||a||y){if(o!==this._time&&f&&(c+=this._time-o,n+=this._time-o),b=c,M=this._start,E=!(A=this._ts),y&&(f||(o=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(z=this._yoyo,S=f+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(100*S+n,r,a);if(b=ge(c%S),c===l?(g=this._repeat,b=f):((g=~~(c/S))&&g===c/S&&(b=f,g--),b>f&&(b=f)),P=_(this._tTime,S),!o&&this._tTime&&P!==g&&(P=g),z&&1&g&&(b=f-b,B=1),g!==P&&!this._lock){var D=z&&1&P,R=D===(z&&1&g);if(g<P&&(D=!D),o=D?0:f,this._lock=1,this.render(o||(B?0:ge(g*S)),r,!f)._lock=0,this._tTime=c,!r&&this.parent&&He(this,"onRepeat"),this.vars.repeatRefresh&&!B&&(this.invalidate()._lock=1),o&&o!==this._time||E!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(f=this._dur,l=this._tDur,R&&(this._lock=2,this.render(o=D?f:-1e-4,!0),this.vars.repeatRefresh&&!B&&this.invalidate()),this._lock=0,!this._ts&&!E)return this;vn(this,B)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(O=function(e,t,i){var n;if(i>t)for(n=e._first;n&&n._start<=i;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}}(this,ge(o),ge(b)),O&&(c-=b-(b=O._start))),this._tTime=c,this._time=b,this._act=!A,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,o=0),!o&&b&&!r&&(He(this,"onStart"),this._tTime!==c))return this;if(b>=o&&n>=0)for(w=this._first;w;){if(C=w._next,(w._act||b>=w._start)&&w._ts&&O!==w){if(w.parent!==this)return this.render(n,r,a);if(w.render(w._ts>0?(b-w._start)*w._ts:(w._dirty?w.totalDuration():w._tDur)+(b-w._start)*w._ts,r,a),b!==this._time||!this._ts&&!E){O=0,C&&(c+=this._zTime=-L);break}}w=C}else{w=this._last;for(var Q=n<0?n:b;w;){if(C=w._prev,(w._act||Q<=w._end)&&w._ts&&O!==w){if(w.parent!==this)return this.render(n,r,a);if(w.render(w._ts>0?(Q-w._start)*w._ts:(w._dirty?w.totalDuration():w._tDur)+(Q-w._start)*w._ts,r,a||N&&(w._initted||w._startAt)),b!==this._time||!this._ts&&!E){O=0,C&&(c+=this._zTime=Q?-L:L);break}}w=C}}if(O&&!r&&(this.pause(),O.render(b>=o?0:-L)._zTime=b>=o?1:-1,this._ts))return this._start=M,m(this),this.render(n,r,a);this._onUpdate&&!r&&He(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&o)&&(M===this._start||Math.abs(A)!==Math.abs(this._ts))&&(this._lock||((n||!f)&&(c===l&&this._ts>0||!c&&this._ts<0)&&Ye(this,1),!r&&(!(n<0)||o)&&(c||o||!l)&&(He(this,c===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var a=this;if(Z(r)||(r=Se(this,r,n)),!(n instanceof $t)){if(ne(n))return n.forEach(function(o){return a.add(o,r)}),this;if(ie(n))return this.addLabel(n,r);if(!K(n))return this;n=ve.delayedCall(0,n)}return this!==n?F(this,n,r):this},t.getChildren=function(n,r,a,o){void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===a&&(a=!0),void 0===o&&(o=-I);for(var l=[],f=this._first;f;)f._start>=o&&(f instanceof ve?r&&l.push(f):(a&&l.push(f),n&&l.push.apply(l,f.getChildren(!0,r,a)))),f=f._next;return l},t.getById=function(n){for(var r=this.getChildren(1,1,1),a=r.length;a--;)if(r[a].vars.id===n)return r[a]},t.remove=function(n){return ie(n)?this.removeLabel(n):K(n)?this.killTweensOf(n):(Xt(this,n),n===this._recent&&(this._recent=this._last),ut(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ge(ze.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),d.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=Se(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,a){var o=ve.delayedCall(0,r||vt,a);return o.data="isPause",this._hasPause=1,F(this,o,Se(this,n))},t.removePause=function(n){var r=this._first;for(n=Se(this,n);r;)r._start===n&&"isPause"===r.data&&Ye(r),r=r._next},t.killTweensOf=function(n,r,a){for(var o=this.getTweensOf(n,a),l=o.length;l--;)ht!==o[l]&&o[l].kill(n,r);return this},t.getTweensOf=function(n,r){for(var c,a=[],o=Ue(n),l=this._first,f=Z(r);l;)l instanceof ve?yt(l._targets,o)&&(f?(!ht||l._initted&&l._ts)&&l.globalTime(0)<=r&&l.globalTime(l.totalDuration())>r:!r||l.isActive())&&a.push(l):(c=l.getTweensOf(o,r)).length&&a.push.apply(a,c),l=l._next;return a},t.tweenTo=function(n,r){r=r||{};var w,a=this,o=Se(a,n),f=r.startAt,c=r.onStart,y=r.onStartParams,b=r.immediateRender,C=ve.to(a,Pe({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:o,overwrite:"auto",duration:r.duration||Math.abs((o-(f&&"time"in f?f.time:a._time))/a.timeScale())||L,onStart:function(){if(a.pause(),!w){var S=r.duration||Math.abs((o-(f&&"time"in f?f.time:a._time))/a.timeScale());C._dur!==S&&G(C,S,0,1).render(C._time,!0,!0),w=1}c&&c.apply(C,y||[])}},r));return b?C.render(0):C},t.tweenFromTo=function(n,r,a){return this.tweenTo(r,Pe({startAt:{time:Se(this,n)}},a))},t.recent=function(){return this._recent},t.nextLabel=function(n){return void 0===n&&(n=this._time),dn(this,Se(this,n))},t.previousLabel=function(n){return void 0===n&&(n=this._time),dn(this,Se(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+L)},t.shiftChildren=function(n,r,a){void 0===a&&(a=0);for(var f,o=this._first,l=this.labels;o;)o._start>=a&&(o._start+=n,o._end+=n),o=o._next;if(r)for(f in l)l[f]>=a&&(l[f]+=n);return ut(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return d.prototype.invalidate.call(this,n)},t.clear=function(n){void 0===n&&(n=!0);for(var a,r=this._first;r;)a=r._next,this.remove(r),r=a;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),ut(this)},t.totalDuration=function(n){var f,c,y,r=0,a=this,o=a._last,l=I;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-n:n));if(a._dirty){for(y=a.parent;o;)f=o._prev,o._dirty&&o.totalDuration(),(c=o._start)>l&&a._sort&&o._ts&&!a._lock?(a._lock=1,F(a,o,c-o._delay,1)._lock=0):l=c,c<0&&o._ts&&(r-=c,(!y&&!a._dp||y&&y.smoothChildTiming)&&(a._start+=c/a._ts,a._time-=c,a._tTime-=c),a.shiftChildren(-c,!1,-1/0),l=0),o._end>r&&o._ts&&(r=o._end),o=f;G(a,a===ee&&a._time>r?a._time:r,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(n){if(ee._ts&&(Gt(ee,p(n,ee)),ot=ze.frame),ze.frame>=ii){ii+=fe.autoSleep||120;var r=ee._first;if((!r||!r._ts)&&fe.autoSleep&&ze._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||ze.sleep()}}},e}($t);Pe(Re.prototype,{_lock:0,_hasPause:0,_forcing:0});var ht,zi,dr=function(e,t,i,n,r,a,o){var y,b,w,C,g,S,E,O,l=new De(this._pt,e,t,0,1,En,null,r),f=0,c=0;for(l.b=i,l.e=n,i+="",(E=~(n+="").indexOf("random("))&&(n=si(n)),a&&(a(O=[i,n],e,t),i=O[0],n=O[1]),b=i.match(Lt)||[];y=Lt.exec(n);)C=y[0],g=n.substring(f,y.index),w?w=(w+1)%5:"rgba("===g.substr(-5)&&(w=1),C!==b[c++]&&(S=parseFloat(b[c-1])||0,l._pt={_next:l._pt,p:g||1===c?g:",",s:S,c:"="===C.charAt(1)?et(S,C)-S:parseFloat(C)-S,m:w&&w<4?Math.round:0},f=Lt.lastIndex);return l.c=f<n.length?n.substring(f,n.length):"",l.fp=o,(Zt.test(n)||E)&&(l.e=0),this._pt=l,l},Ni=function(e,t,i,n,r,a,o,l,f,c){K(n)&&(n=n(r||0,e,a));var C,y=e[t],b="get"!==i?i:K(y)?f?e[t.indexOf("set")||!K(e["get"+t.substr(3)])?t:"get"+t.substr(3)](f):e[t]():y,w=K(y)?f?gr:Sn:Vi;if(ie(n)&&(~n.indexOf("random(")&&(n=si(n)),"="===n.charAt(1)&&((C=et(b,n)+(Te(b)||0))||0===C)&&(n=C)),!c||b!==n||zi)return isNaN(b*n)||""===n?(!y&&!(t in e)&&ti(t,n),dr.call(this,e,t,b,n,w,l||fe.stringFilter,f)):(C=new De(this._pt,e,t,+b||0,n-(b||0),"boolean"==typeof y?br:Tn,0,w),f&&(C.fp=f),o&&C.modifier(o,this,e),this._pt=C)},xn=function(e,t,i,n,r,a){var o,l,f,c;if(me[e]&&!1!==(o=new me[e]).init(r,o.rawVars?t[e]:function(e,t,i,n,r){if(K(e)&&(e=li(e,r,t,i,n)),!ke(e)||e.style&&e.nodeType||ne(e)||mi(e))return ie(e)?li(e,r,t,i,n):e;var o,a={};for(o in e)a[o]=li(e[o],r,t,i,n);return a}(t[e],n,r,a,i),i,n,a)&&(i._pt=l=new De(i._pt,r,e,0,1,o.render,o,0,o.priority),i!==Wt))for(f=i._ptLookup[i._targets.indexOf(r)],c=o._props.length;c--;)f[o._props[c]]=l;return o},Ii=function d(e,t,i){var B,D,R,Q,J,he,_e,ce,le,be,pe,Ae,kt,n=e.vars,r=n.ease,a=n.startAt,o=n.immediateRender,l=n.lazy,f=n.onUpdate,c=n.onUpdateParams,y=n.callbackScope,b=n.runBackwards,w=n.yoyoEase,C=n.keyframes,g=n.autoRevert,S=e._dur,E=e._startAt,O=e._targets,A=e.parent,M=A&&"nested"===A.data?A.vars.targets:O,P="auto"===e._overwrite&&!v,z=e.timeline;if(z&&(!C||!r)&&(r="none"),e._ease=Ct(r,ye.ease),e._yEase=w?gn(Ct(!0===w?r:w,ye.ease)):0,w&&e._yoyo&&!e._repeat&&(w=e._yEase,e._yEase=e._ease,e._ease=w),e._from=!z&&!!n.runBackwards,!z||C&&!n.stagger){if(Ae=(ce=O[0]?Y(O[0]).harness:0)&&n[ce.prop],B=xt(n,It),E&&(E._zTime<0&&E.progress(1),t<0&&b&&o&&!g?E.render(-1,!0):E.revert(b&&S?zt:Ai),E._lazy=0),a){if(Ye(e._startAt=ve.set(O,Pe({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:oe(l),startAt:null,delay:0,onUpdate:f,onUpdateParams:c,callbackScope:y,stagger:0},a))),e._startAt._dp=0,t<0&&(N||!o&&!g)&&e._startAt.revert(zt),o&&S&&t<=0&&i<=0)return void(t&&(e._zTime=t))}else if(b&&S&&!E)if(t&&(o=!1),R=Pe({overwrite:!1,data:"isFromStart",lazy:o&&oe(l),immediateRender:o,stagger:0,parent:A},B),Ae&&(R[ce.prop]=Ae),Ye(e._startAt=ve.set(O,R)),e._startAt._dp=0,t<0&&(N?e._startAt.revert(zt):e._startAt.render(-1,!0)),e._zTime=t,o){if(!t)return}else d(e._startAt,L,L);for(e._pt=e._ptCache=0,l=S&&oe(l)||l&&!S,D=0;D<O.length;D++){if(_e=(J=O[D])._gsap||Ut(O)[D]._gsap,e._ptLookup[D]=be={},Vt[_e.id]&&Ge.length&&We(),pe=M===O?D:M.indexOf(J),ce&&!1!==(le=new ce).init(J,Ae||B,e,pe,M)&&(e._pt=Q=new De(e._pt,J,le.name,0,1,le.render,le,0,le.priority),le._props.forEach(function(Pt){be[Pt]=Q}),le.priority&&(he=1)),!ce||Ae)for(R in B)me[R]&&(le=xn(R,B,e,pe,J,M))?le.priority&&(he=1):be[R]=Q=Ni.call(e,J,R,"get",B[R],pe,M,0,n.stringFilter);e._op&&e._op[D]&&e.kill(J,e._op[D]),P&&e._pt&&(ht=e,ee.killTweensOf(J,be,e.globalTime(t)),kt=!e.parent,ht=0),e._pt&&l&&(Vt[_e.id]=1)}he&&On(e),e._onInit&&e._onInit(e)}e._onUpdate=f,e._initted=(!e._op||e._pt)&&!kt,C&&t<=0&&z.render(I,!0,!0)},mr=function(e,t,i,n){var a,o,r=t.ease||n||"power1.inOut";if(ne(t))o=i[e]||(i[e]=[]),t.forEach(function(l,f){return o.push({t:f/(t.length-1)*100,v:l,e:r})});else for(a in t)o=i[a]||(i[a]=[]),"ease"===a||o.push({t:parseFloat(e),v:t[a],e:r})},li=function(e,t,i,n,r){return K(e)?e.call(t,i,n,r):ie(e)&&~e.indexOf("random(")?si(e):e},wn=bt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Cn={};Ce(wn+",id,stagger,delay,duration,paused,scrollTrigger",function(d){return Cn[d]=1});var ve=function(d){function e(i,n,r,a){var o;"number"==typeof n&&(r.duration=n,n=r,r=null);var M,P,z,B,D,R,Q,J,l=(o=d.call(this,a?n:wt(n))||this).vars,f=l.duration,c=l.delay,y=l.immediateRender,b=l.stagger,w=l.overwrite,C=l.keyframes,g=l.defaults,S=l.scrollTrigger,E=l.yoyoEase,O=n.parent||ee,A=(ne(i)||mi(i)?Z(i[0]):"length"in n)?[i]:Ue(i);if(o._targets=A.length?Ut(A):Nt("GSAP target "+i+" not found. https://greensock.com",!fe.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=w,C||b||mt(f)||mt(c)){if(n=o.vars,(M=o.timeline=new Re({data:"nested",defaults:g||{},targets:O&&"nested"===O.data?O.vars.targets:A})).kill(),M.parent=M._dp=X(o),M._start=0,b||mt(f)||mt(c)){if(B=A.length,Q=b&&on(b),ke(b))for(D in b)~wn.indexOf(D)&&(J||(J={}),J[D]=b[D]);for(P=0;P<B;P++)(z=xt(n,Cn)).stagger=0,E&&(z.yoyoEase=E),J&&Ve(z,J),R=A[P],z.duration=+li(f,X(o),P,R,A),z.delay=(+li(c,X(o),P,R,A)||0)-o._delay,!b&&1===B&&z.delay&&(o._delay=c=z.delay,o._start+=c,z.delay=0),M.to(R,z,Q?Q(P,R,A):0),M._ease=$.none;M.duration()?f=c=0:o.timeline=0}else if(C){wt(Pe(M.vars.defaults,{ease:"none"})),M._ease=Ct(C.ease||n.ease||"none");var _e,ce,le,he=0;if(ne(C))C.forEach(function(be){return M.to(A,be,">")}),M.duration();else{for(D in z={},C)"ease"===D||"easeEach"===D||mr(D,C[D],z,C.easeEach);for(D in z)for(_e=z[D].sort(function(be,pe){return be.t-pe.t}),he=0,P=0;P<_e.length;P++)(le={ease:(ce=_e[P]).e,duration:(ce.t-(P?_e[P-1].t:0))/100*f})[D]=ce.v,M.to(A,le,he),he+=le.duration;M.duration()<f&&M.to({},{duration:f-M.duration()})}}f||o.duration(f=M.duration())}else o.timeline=0;return!0===w&&!v&&(ht=X(o),ee.killTweensOf(A),ht=0),F(O,X(o),r),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(y||!f&&!C&&o._start===ge(O._time)&&oe(y)&&s(X(o))&&"nested"!==O.data)&&(o._tTime=-L,o.render(Math.max(0,-c)||0)),S&&W(X(o),S),o}Le(e,d);var t=e.prototype;return t.render=function(n,r,a){var b,w,C,g,S,E,O,A,M,o=this._time,l=this._tDur,f=this._dur,c=n<0,y=n>l-L&&!c?l:n<L?0:n;if(f){if(y!==this._tTime||!n||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(b=y,A=this.timeline,this._repeat){if(g=f+this._rDelay,this._repeat<-1&&c)return this.totalTime(100*g+n,r,a);if(b=ge(y%g),y===l?(C=this._repeat,b=f):((C=~~(y/g))&&C===y/g&&(b=f,C--),b>f&&(b=f)),(E=this._yoyo&&1&C)&&(M=this._yEase,b=f-b),S=_(this._tTime,g),b===o&&!a&&this._initted)return this._tTime=y,this;C!==S&&(A&&this._yEase&&vn(A,E),this.vars.repeatRefresh&&!E&&!this._lock&&(this._lock=a=1,this.render(ge(g*C),!0).invalidate()._lock=0))}if(!this._initted){if(te(this,c?n:b,a,r,y))return this._tTime=0,this;if(o!==this._time)return this;if(f!==this._dur)return this.render(n,r,a)}if(this._tTime=y,this._time=b,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=O=(M||this._ease)(b/f),this._from&&(this.ratio=O=1-O),b&&!o&&!r&&(He(this,"onStart"),this._tTime!==y))return this;for(w=this._pt;w;)w.r(O,w.d),w=w._next;A&&A.render(n<0?n:!b&&E?-L:A._dur*A._ease(b/this._dur),r,a)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(c&&h(this,n,0,a),He(this,"onUpdate")),this._repeat&&C!==S&&this.vars.onRepeat&&!r&&this.parent&&He(this,"onRepeat"),(y===this._tDur||!y)&&this._tTime===y&&(c&&!this._onUpdate&&h(this,n,0,!0),(n||!f)&&(y===this._tDur&&this._ts>0||!y&&this._ts<0)&&Ye(this,1),!r&&(!c||o)&&(y||o||E)&&(He(this,y===l?"onComplete":"onReverseComplete",!0),this._prom&&!(y<l&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,i,n){var f,c,y,r=e.ratio,a=t<0||!t&&(!e._start&&H(e)&&(e._initted||!q(e))||(e._ts<0||e._dp._ts<0)&&!q(e))?0:1,o=e._rDelay,l=0;if(o&&e._repeat&&(l=$e(0,e._tDur,t),c=_(l,o),e._yoyo&&1&c&&(a=1-a),c!==_(e._tTime,o)&&(r=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==r||N||n||e._zTime===L||!t&&e._zTime){if(!e._initted&&te(e,t,n,i,l))return;for(y=e._zTime,e._zTime=t||(i?L:0),i||(i=t&&!y),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=l,f=e._pt;f;)f.r(a,f.d),f=f._next;t<0&&h(e,t,0,!0),e._onUpdate&&!i&&He(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&He(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&Ye(e,1),!i&&!N&&(He(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,n,r,a);return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),d.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,a,o){ui||ze.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ii(this,l),function(e,t,i,n,r,a,o){var f,c,y,b,l=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!l)for(l=e._ptCache[t]=[],y=e._ptLookup,b=e._targets.length;b--;){if((f=y[b][t])&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==t&&f.fp!==t;)f=f._next;if(!f)return zi=1,e.vars[t]="+=0",Ii(e,o),zi=0,1;l.push(f)}for(b=l.length;b--;)(f=(c=l[b])._pt||c).s=!n&&0!==n||r?f.s+(n||0)+a*f.c:n,f.c=i-f.s,c.e&&(c.e=se(i)+Te(c.e)),c.b&&(c.b=f.s+Te(c.b))}(this,n,r,a,o,this._ease(l/this._dur),l)?this.resetTo(n,r,a,o):(T(this,0),this.parent||xi(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(void 0===r&&(r="all"),!(n||r&&"all"!==r))return this._lazy=this._pt=0,this.parent?ai(this):this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,ht&&!0!==ht.vars.overwrite)._first||ai(this),this.parent&&a!==this.timeline.totalDuration()&&G(this,this._dur*this.timeline._tDur/a,0,1),this}var y,b,w,C,g,S,E,o=this._targets,l=n?Ue(n):o,f=this._ptLookup,c=this._pt;if((!r||"all"===r)&&function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0}(o,l))return"all"===r&&(this._pt=0),ai(this);for(y=this._op=this._op||[],"all"!==r&&(ie(r)&&(g={},Ce(r,function(O){return g[O]=1}),r=g),r=function(e,t){var r,a,o,l,i=e[0]?Y(e[0]).harness:0,n=i&&i.aliases;if(!n)return t;for(a in r=Ve({},t),n)if(a in r)for(o=(l=n[a].split(",")).length;o--;)r[l[o]]=r[a];return r}(o,r)),E=o.length;E--;)if(~l.indexOf(o[E]))for(g in b=f[E],"all"===r?(y[E]=r,C=b,w={}):(w=y[E]=y[E]||{},C=r),C)(S=b&&b[g])&&((!("kill"in S.d)||!0===S.d.kill(g))&&Xt(this,S,"_pt"),delete b[g]),"all"!==w&&(w[g]=1);return this._initted&&!this._pt&&c&&ai(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return Ne(1,arguments)},e.delayedCall=function(n,r,a,o){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:o})},e.fromTo=function(n,r,a){return Ne(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,a){return ee.killTweensOf(n,r,a)},e}($t);Pe(ve.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Ce("staggerTo,staggerFrom,staggerFromTo",function(d){ve[d]=function(){var e=new Re,t=Mi.call(arguments,0);return t.splice("staggerFromTo"===d?5:4,0,0),e[d].apply(e,t)}});var Vi=function(e,t,i){return e[t]=i},Sn=function(e,t,i){return e[t](i)},gr=function(e,t,i,n){return e[t](n.fp,i)},vr=function(e,t,i){return e.setAttribute(t,i)},Ui=function(e,t){return K(e[t])?Sn:pt(e[t])&&e.setAttribute?vr:Vi},Tn=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},br=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},En=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round(1e4*(i.s+i.c*e))/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},Hi=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},yr=function(e,t,i,n){for(var a,r=this._pt;r;)a=r._next,r.p===n&&r.modifier(e,t,i),r=a},xr=function(e){for(var i,n,t=this._pt;t;)n=t._next,t.p===e&&!t.op||t.op===e?Xt(this,t,"_pt"):t.dep||(i=1),t=n;return!i},wr=function(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)},On=function(e){for(var i,n,r,a,t=e._pt;t;){for(i=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:a)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:a=t,t=i}e._pt=r},De=function(){function d(t,i,n,r,a,o,l,f,c){this.t=i,this.s=r,this.c=a,this.p=n,this.r=o||Tn,this.d=l||this,this.set=f||Vi,this.pr=c||0,this._next=t,t&&(t._prev=this)}return d.prototype.modifier=function(i,n,r){this.mSet=this.mSet||this.set,this.set=wr,this.m=i,this.mt=r,this.tween=n},d}();Ce(bt+"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(d){return It[d]=1}),xe.TweenMax=xe.TweenLite=ve,xe.TimelineLite=xe.TimelineMax=Re,ee=new Re({sortChildren:!1,defaults:ye,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),fe.stringFilter=mn;var jt=[],wi={},Cr=[],An=0,Gi=function(e){return(wi[e]||Cr).map(function(t){return t()})},Xi=function(){var e=Date.now(),t=[];e-An>2&&(Gi("matchMediaInit"),jt.forEach(function(i){var a,o,l,f,n=i.queries,r=i.conditions;for(o in n)(a=Oe.matchMedia(n[o]).matches)&&(l=1),a!==r[o]&&(r[o]=a,f=1);f&&(i.revert(),l&&t.push(i))}),Gi("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i)}),An=e,Gi("matchMedia"))},kn=function(){function d(t,i){this.selector=i&&Ri(i),this.data=[],this._r=[],this.isReverted=!1,t&&this.add(t)}var e=d.prototype;return e.add=function(i,n,r){K(i)&&(r=n,n=i,i=K);var a=this,o=function(){var y,f=V,c=a.selector;return f&&f!==a&&f.data.push(a),r&&(a.selector=Ri(r)),V=a,y=n.apply(a,arguments),K(y)&&a._r.push(y),V=f,a.selector=c,a.isReverted=!1,y};return a.last=o,i===K?o(a):i?a[i]=o:o},e.ignore=function(i){var n=V;V=null,i(this),V=n},e.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof d?i.push.apply(i,n.getTweens()):n instanceof ve&&!(n.parent&&"nested"===n.parent.data)&&i.push(n)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,n){var r=this;if(i){var a=this.getTweens();this.data.forEach(function(l){"isFlip"===l.data&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(f){return a.splice(a.indexOf(f),1)}))}),a.map(function(l){return{g:l.globalTime(0),t:l}}).sort(function(l,f){return f.g-l.g||-1}).forEach(function(l){return l.t.revert(i)}),this.data.forEach(function(l){return!(l instanceof $t)&&l.revert&&l.revert(i)}),this._r.forEach(function(l){return l(i,r)}),this.isReverted=!0}else this.data.forEach(function(l){return l.kill&&l.kill()});if(this.clear(),n){var o=jt.indexOf(this);~o&&jt.splice(o,1)}},e.revert=function(i){this.kill(i||{})},d}(),Sr=function(){function d(t){this.contexts=[],this.scope=t}var e=d.prototype;return e.add=function(i,n,r){ke(i)||(i={matches:i});var l,f,c,a=new kn(0,r||this.scope),o=a.conditions={};for(f in this.contexts.push(a),n=a.add("onMatch",n),a.queries=i,i)"all"===f?c=1:(l=Oe.matchMedia(i[f]))&&(jt.indexOf(a)<0&&jt.push(a),(o[f]=l.matches)&&(c=1),l.addListener?l.addListener(Xi):l.addEventListener("change",Xi));return c&&n(a),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},d}(),Ci={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(n){return sr(n)})},timeline:function(e){return new Re(e)},getTweensOf:function(e,t){return ee.getTweensOf(e,t)},getProperty:function(e,t,i,n){ie(e)&&(e=Ue(e)[0]);var r=Y(e||{}).get,a=i?bi:ni;return"native"===i&&(i=""),e&&(t?a((me[t]&&me[t].get||r)(e,t,i,n)):function(o,l,f){return a((me[o]&&me[o].get||r)(e,o,l,f))})},quickSetter:function(e,t,i){if((e=Ue(e)).length>1){var n=e.map(function(c){return Ie.quickSetter(c,t,i)}),r=n.length;return function(c){for(var y=r;y--;)n[y](c)}}var a=me[t],o=Y(e=e[0]||{}),l=o.harness&&(o.harness.aliases||{})[t]||t,f=a?function(c){var y=new a;Wt._pt=0,y.init(e,i?c+i:c,Wt,0,[e]),y.render(1,y),Wt._pt&&Hi(1,Wt)}:o.set(e,l);return a?f:function(c){return f(e,l,i?c+i:c,o,1)}},quickTo:function(e,t,i){var n,r=Ie.to(e,Ve(((n={})[t]="+=0.1",n.paused=!0,n),i||{})),a=function(l,f,c){return r.resetTo(t,l,f,c)};return a.tween=r,a},isTweening:function(e){return ee.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Ct(e.ease,ye.ease)),yi(ye,e||{})},config:function(e){return yi(fe,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.defaults,a=e.extendTimeline;(e.plugins||"").split(",").forEach(function(o){return o&&!me[o]&&!xe[o]&&Nt(t+" effect requires "+o+" plugin.")}),Ze[t]=function(o,l,f){return i(Ue(o),Pe(l||{},r),f)},a&&(Re.prototype[t]=function(o,l,f){return this.add(Ze[t](o,ke(l)?l:(f=l)&&{},this),f)})},registerEase:function(e,t){$[e]=Ct(t)},parseEase:function(e,t){return arguments.length?Ct(e,t):$},getById:function(e){return ee.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var n,r,i=new Re(e);for(i.smoothChildTiming=oe(e.smoothChildTiming),ee.remove(i),i._dp=0,i._time=i._tTime=ee._time,n=ee._first;n;)r=n._next,(t||!(!n._dur&&n instanceof ve&&n.vars.onComplete===n._targets[0]))&&F(i,n,n._start-n._delay),n=r;return F(ee,i,0),i},context:function(e,t){return e?new kn(e,t):V},matchMedia:function(e){return new Sr(e)},matchMediaRefresh:function(){return jt.forEach(function(e){var i,n,t=e.conditions;for(n in t)t[n]&&(t[n]=!1,i=1);i&&e.revert()})||Xi()},addEventListener:function(e,t){var i=wi[e]||(wi[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=wi[e],n=i&&i.indexOf(t);n>=0&&i.splice(n,1)},utils:{wrap:function d(e,t,i){var n=t-e;return ne(e)?hn(e,d(0,e.length),t):Me(i,function(r){return(n+(r-e)%n)%n+e})},wrapYoyo:function d(e,t,i){var n=t-e,r=2*n;return ne(e)?hn(e,d(0,e.length-1),t):Me(i,function(a){return e+((a=(r+(a-e)%r)%r||0)>n?r-a:a)})},distribute:on,random:ln,snap:un,normalize:function(e,t,i){return fn(e,t,0,1,i)},getUnit:Te,clamp:function(e,t,i){return Me(i,function(n){return $e(e,t,n)})},splitColor:_n,toArray:Ue,selector:Ri,mapRange:fn,pipe:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduce(function(r,a){return a(r)},n)}},unitize:function(e,t){return function(i){return e(parseFloat(i))+(t||Te(i))}},interpolate:function d(e,t,i,n){var r=isNaN(e+t)?0:function(w){return(1-w)*e+w*t};if(!r){var l,f,c,y,b,a=ie(e),o={};if(!0===i&&(n=1)&&(i=null),a)e={p:e},t={p:t};else if(ne(e)&&!ne(t)){for(c=[],b=(y=e.length)-2,f=1;f<y;f++)c.push(d(e[f-1],e[f]));y--,r=function(C){C*=y;var g=Math.min(b,~~C);return c[g](C-g)},i=t}else n||(e=Ve(ne(e)?[]:{},e));if(!c){for(l in t)Ni.call(o,e,l,"get",t[l]);r=function(C){return Hi(C,o)||(a?e.p:e)}}}return Me(i,r)},shuffle:an},install:gi,effects:Ze,ticker:ze,updateRoot:Re.updateRoot,plugins:me,globalTimeline:ee,core:{PropTween:De,globals:vi,Tween:ve,Timeline:Re,Animation:$t,getCache:Y,_removeLinkedListItem:Xt,reverting:function(){return N},context:function(e){return e&&V&&(V.data.push(e),e._ctx=V),V},suppressOverwrites:function(e){return v=e}}};Ce("to,from,fromTo,delayedCall,set,killTweensOf",function(d){return Ci[d]=ve[d]}),ze.add(Re.updateRoot),Wt=Ci.to({},{duration:0});var Tr=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Wi=function(e,t){return{name:e,rawVars:1,init:function(n,r,a){a._onInit=function(o){var l,f;if(ie(r)&&(l={},Ce(r,function(c){return l[c]=1}),r=l),t){for(f in l={},r)l[f]=t(r[f]);r=l}!function(e,t){var n,r,a,i=e._targets;for(n in t)for(r=i.length;r--;)(a=e._ptLookup[r][n])&&(a=a.d)&&(a._pt&&(a=Tr(a,n)),a&&a.modifier&&a.modifier(t[n],e,i[r],n))}(o,r)}}}},Ie=Ci.registerPlugin({name:"attr",init:function(e,t,i,n,r){var a,o,l;for(a in this.tween=i,t)l=e.getAttribute(a)||"",(o=this.add(e,"setAttribute",(l||0)+"",t[a],n,r,0,0,a)).op=a,o.b=l,this._props.push(a)},render:function(e,t){for(var i=t._pt;i;)N?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},Wi("roundProps",Di),Wi("modifiers"),Wi("snap",un))||Ci;ve.version=Re.version=Ie.version="3.11.3",ei=1,pi()&&Yt();var Pn,ft,Kt,Yi,Tt,Mn,$i,Nn,it={},Et=180/Math.PI,qt=Math.PI/180,Qt=Math.atan2,Rn=1e8,ji=/([A-Z])/g,kr=/(left|right|width|margin|padding|x)/i,Pr=/[\s,\(]\S/,nt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Ki=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},Mr=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},Rr=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},Dr=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Dn=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Ln=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},Lr=function(e,t,i){return e.style[t]=i},Fr=function(e,t,i){return e.style.setProperty(t,i)},Br=function(e,t,i){return e._gsap[t]=i},Nr=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},zr=function(e,t,i,n,r){var a=e._gsap;a.scaleX=a.scaleY=i,a.renderTransform(r,a)},Ir=function(e,t,i,n,r){var a=e._gsap;a[t]=i,a.renderTransform(r,a)},ue="transform",je=ue+"Origin",Vr=function(e,t){var i=this,n=this.target,r=n.style;if(e in it){if(this.tfm=this.tfm||{},"transform"!==e&&(~(e=nt[e]||e).indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=rt(n,a)}):this.tfm[e]=n._gsap.x?n._gsap[e]:rt(n,e)),this.props.indexOf(ue)>=0)return;n._gsap.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(je,t,"")),e=ue}(r||t)&&this.props.push(e,t,r[e])},Fn=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Ur=function(){var r,a,e=this.props,t=this.target,i=t.style,n=t._gsap;for(r=0;r<e.length;r+=3)e[r+1]?t[e[r]]=e[r+2]:e[r+2]?i[e[r]]=e[r+2]:i.removeProperty(e[r].replace(ji,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)n[a]=this.tfm[a];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),(r=$i())&&!r.isStart&&!i[ue]&&(Fn(i),n.uncache=1)}},Bn=function(e,t){var i={target:e,props:[],revert:Ur,save:Vr};return t&&t.split(",").forEach(function(n){return i.save(n)}),i},qi=function(e,t){var i=ft.createElementNS?ft.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):ft.createElement(e);return i.style?i:ft.createElement(e)},Qe=function d(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(ji,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&d(e,Jt(t)||t,1)||""},zn="O,Moz,ms,Ms,Webkit".split(","),Jt=function(e,t,i){var r=(t||Tt).style,a=5;if(e in r&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(zn[a]+e in r););return a<0?null:(3===a?"ms":a>=0?zn[a]:"")+e},Qi=function(){typeof window<"u"&&window.document&&(Pn=window,Kt=(ft=Pn.document).documentElement,Tt=qi("div")||{style:{}},qi("div"),ue=Jt(ue),je=ue+"Origin",Tt.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Nn=!!Jt("perspective"),$i=Ie.core.reverting,Yi=1)},Ji=function d(e){var a,t=qi("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,r=this.style.cssText;if(Kt.appendChild(t),t.appendChild(this),this.style.display="block",e)try{a=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=d}catch{}else this._gsapBBox&&(a=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),Kt.removeChild(t),this.style.cssText=r,a},In=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},Vn=function(e){var t;try{t=e.getBBox()}catch{t=Ji.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===Ji||(t=Ji.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+In(e,["x","cx","x1"])||0,y:+In(e,["y","cy","y1"])||0,width:0,height:0}},Un=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!Vn(e))},hi=function(e,t){if(t){var i=e.style;t in it&&t!==je&&(t=ue),i.removeProperty?(("ms"===t.substr(0,2)||"webkit"===t.substr(0,6))&&(t="-"+t),i.removeProperty(t.replace(ji,"-$1").toLowerCase())):i.removeAttribute(t)}},dt=function(e,t,i,n,r,a){var o=new De(e._pt,t,i,0,1,a?Ln:Dn);return e._pt=o,o.b=n,o.e=r,e._props.push(i),o},Hn={deg:1,rad:1,turn:1},Hr={grid:1,flex:1},_t=function d(e,t,i,n){var C,g,S,E,r=parseFloat(i)||0,a=(i+"").trim().substr((r+"").length)||"px",o=Tt.style,l=kr.test(t),f="svg"===e.tagName.toLowerCase(),c=(f?"client":"offset")+(l?"Width":"Height"),y=100,b="px"===n,w="%"===n;return n===a||!r||Hn[n]||Hn[a]?r:("px"!==a&&!b&&(r=d(e,t,i,"px")),E=e.getCTM&&Un(e),!w&&"%"!==a||!it[t]&&!~t.indexOf("adius")?(o[l?"width":"height"]=y+(b?a:n),g=~t.indexOf("adius")||"em"===n&&e.appendChild&&!f?e:e.parentNode,E&&(g=(e.ownerSVGElement||{}).parentNode),(!g||g===ft||!g.appendChild)&&(g=ft.body),(S=g._gsap)&&w&&S.width&&l&&S.time===ze.time&&!S.uncache?se(r/S.width*y):((w||"%"===a)&&!Hr[Qe(g,"display")]&&(o.position=Qe(e,"position")),g===e&&(o.position="static"),g.appendChild(Tt),C=Tt[c],g.removeChild(Tt),o.position="absolute",l&&w&&((S=Y(g)).time=ze.time,S.width=g[c]),se(b?C*r/y:C&&r?y/C*r:0))):(C=E?e.getBBox()[l?"width":"height"]:e[c],se(w?r/C*y:r/100*C)))},rt=function(e,t,i,n){var r;return Yi||Qi(),t in nt&&"transform"!==t&&~(t=nt[t]).indexOf(",")&&(t=t.split(",")[0]),it[t]&&"transform"!==t?(r=di(e,n),r="transformOrigin"!==t?r[t]:r.svg?r.origin:Ti(Qe(e,je))+" "+r.zOrigin+"px"):(!(r=e.style[t])||"auto"===r||n||~(r+"").indexOf("calc("))&&(r=Si[t]&&Si[t](e,t,i)||Qe(e,t)||Ht(e,t)||("opacity"===t?1:0)),i&&!~(r+"").trim().indexOf(" ")?_t(e,t,r,i)+i:r},Gr=function(e,t,i,n){if(!i||"none"===i){var r=Jt(t,e,1),a=r&&Qe(e,r,1);a&&a!==i?(t=r,i=a):"borderColor"===t&&(i=Qe(e,"borderTopColor"))}var c,y,b,w,C,g,S,E,O,A,M,o=new De(this._pt,e.style,t,0,1,En),l=0,f=0;if(o.b=i,o.e=n,i+="","auto"==(n+="")&&(e.style[t]=n,n=Qe(e,t)||n,e.style[t]=i),mn(c=[i,n]),n=c[1],b=(i=c[0]).match(Je)||[],(n.match(Je)||[]).length){for(;y=Je.exec(n);)S=y[0],O=n.substring(l,y.index),C?C=(C+1)%5:("rgba("===O.substr(-5)||"hsla("===O.substr(-5))&&(C=1),S!==(g=b[f++]||"")&&(w=parseFloat(g)||0,M=g.substr((w+"").length),"="===S.charAt(1)&&(S=et(w,S)+M),E=parseFloat(S),A=S.substr((E+"").length),l=Je.lastIndex-A.length,A||(A=A||fe.units[t]||M,l===n.length&&(n+=A,o.e+=A)),M!==A&&(w=_t(e,t,g,A)||0),o._pt={_next:o._pt,p:O||1===f?O:",",s:w,c:E-w,m:C&&C<4||"zIndex"===t?Math.round:0});o.c=l<n.length?n.substring(l,n.length):""}else o.r="display"===t&&"none"===n?Ln:Dn;return Zt.test(n)&&(o.e=0),this._pt=o,o},Gn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Xr=function(e){var t=e.split(" "),i=t[0],n=t[1]||"50%";return("top"===i||"bottom"===i||"left"===n||"right"===n)&&(e=i,i=n,n=e),t[0]=Gn[i]||i,t[1]=Gn[n]||n,t.join(" ")},Wr=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var o,l,f,i=t.t,n=i.style,r=t.u,a=i._gsap;if("all"===r||!0===r)n.cssText="",l=1;else for(f=(r=r.split(",")).length;--f>-1;)it[o=r[f]]&&(l=1,o="transformOrigin"===o?je:ue),hi(i,o);l&&(hi(i,ue),a&&(a.svg&&i.removeAttribute("transform"),di(i,1),a.uncache=1,Fn(n)))}},Si={clearProps:function(e,t,i,n,r){if("isFromStart"!==r.data){var a=e._pt=new De(e._pt,t,i,0,0,Wr);return a.u=n,a.pr=-10,a.tween=r,e._props.push(i),1}}},fi=[1,0,0,1,0,0],Xn={},Wn=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},Yn=function(e){var t=Qe(e,ue);return Wn(t)?fi:t.substr(7).match(Dt).map(se)},Zi=function(e,t){var a,o,l,f,i=e._gsap||Y(e),n=e.style,r=Yn(e);return i.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(r=[(l=e.transform.baseVal.consolidate().matrix).a,l.b,l.c,l.d,l.e,l.f]).join(",")?fi:r:(r===fi&&!e.offsetParent&&e!==Kt&&!i.svg&&(l=n.display,n.display="block",(!(a=e.parentNode)||!e.offsetParent)&&(f=1,o=e.nextElementSibling,Kt.appendChild(e)),r=Yn(e),l?n.display=l:hi(e,"display"),f&&(o?a.insertBefore(e,o):a?a.appendChild(e):Kt.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},en=function(e,t,i,n,r,a){var z,B,R,o=e._gsap,l=r||Zi(e,!0),f=o.xOrigin||0,c=o.yOrigin||0,y=o.xOffset||0,b=o.yOffset||0,w=l[0],C=l[1],g=l[2],S=l[3],E=l[4],O=l[5],A=t.split(" "),M=parseFloat(A[0])||0,P=parseFloat(A[1])||0;i?l!==fi&&(B=w*S-C*g)&&(R=M*(-C/B)+P*(w/B)-(w*O-C*E)/B,M=M*(S/B)+P*(-g/B)+(g*O-S*E)/B,P=R):(M=(z=Vn(e)).x+(~A[0].indexOf("%")?M/100*z.width:M),P=z.y+(~(A[1]||A[0]).indexOf("%")?P/100*z.height:P)),n||!1!==n&&o.smooth?(o.xOffset=y+((E=M-f)*w+(O=P-c)*g)-E,o.yOffset=b+(E*C+O*S)-O):o.xOffset=o.yOffset=0,o.xOrigin=M,o.yOrigin=P,o.smooth=!!n,o.origin=t,o.originIsAbsolute=!!i,e.style[je]="0px 0px",a&&(dt(a,o,"xOrigin",f,M),dt(a,o,"yOrigin",c,P),dt(a,o,"xOffset",y,o.xOffset),dt(a,o,"yOffset",b,o.yOffset)),e.setAttribute("data-svg-origin",M+" "+P)},di=function(e,t){var i=e._gsap||new yn(e);if("x"in i&&!t&&!i.uncache)return i;var c,y,b,w,C,g,S,E,O,A,M,P,z,B,D,R,Q,J,he,_e,ce,le,be,pe,Ae,kt,Pt,ci,Mt,qn,st,Rt,n=e.style,r=i.scaleX<0,a="px",o="deg",l=getComputedStyle(e),f=Qe(e,je)||"0";return c=y=b=g=S=E=O=A=M=0,w=C=1,i.svg=!(!e.getCTM||!Un(e)),l.translate&&(("none"!==l.translate||"none"!==l.scale||"none"!==l.rotate)&&(n[ue]=("none"!==l.translate?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==l.rotate?"rotate("+l.rotate+") ":"")+("none"!==l.scale?"scale("+l.scale.split(" ").join(",")+") ":"")+("none"!==l[ue]?l[ue]:"")),n.scale=n.rotate=n.translate="none"),B=Zi(e,i.svg),i.svg&&(i.uncache?(Ae=e.getBBox(),f=i.xOrigin-Ae.x+"px "+(i.yOrigin-Ae.y)+"px",pe=""):pe=!t&&e.getAttribute("data-svg-origin"),en(e,pe||f,!!pe||i.originIsAbsolute,!1!==i.smooth,B)),P=i.xOrigin||0,z=i.yOrigin||0,B!==fi&&(J=B[0],he=B[1],_e=B[2],ce=B[3],c=le=B[4],y=be=B[5],6===B.length?(w=Math.sqrt(J*J+he*he),C=Math.sqrt(ce*ce+_e*_e),g=J||he?Qt(he,J)*Et:0,(O=_e||ce?Qt(_e,ce)*Et+g:0)&&(C*=Math.abs(Math.cos(O*qt))),i.svg&&(c-=P-(P*J+z*_e),y-=z-(P*he+z*ce))):(qn=B[7],Pt=B[8],ci=B[9],st=B[11],c=B[12],y=B[13],b=B[14],S=(D=Qt(Rt=B[6],Mt=B[10]))*Et,D&&(pe=le*(R=Math.cos(-D))+Pt*(Q=Math.sin(-D)),Ae=be*R+ci*Q,kt=Rt*R+Mt*Q,Pt=le*-Q+Pt*R,ci=be*-Q+ci*R,Mt=Rt*-Q+Mt*R,st=qn*-Q+st*R,le=pe,be=Ae,Rt=kt),E=(D=Qt(-_e,Mt))*Et,D&&(R=Math.cos(-D),st=ce*(Q=Math.sin(-D))+st*R,J=pe=J*R-Pt*Q,he=Ae=he*R-ci*Q,_e=kt=_e*R-Mt*Q),g=(D=Qt(he,J))*Et,D&&(pe=J*(R=Math.cos(D))+he*(Q=Math.sin(D)),Ae=le*R+be*Q,he=he*R-J*Q,be=be*R-le*Q,J=pe,le=Ae),S&&Math.abs(S)+Math.abs(g)>359.9&&(S=g=0,E=180-E),w=se(Math.sqrt(J*J+he*he+_e*_e)),C=se(Math.sqrt(be*be+Rt*Rt)),D=Qt(le,be),O=Math.abs(D)>2e-4?D*Et:0,M=st?1/(st<0?-st:st):0),i.svg&&(pe=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!Wn(Qe(e,ue)),pe&&e.setAttribute("transform",pe))),Math.abs(O)>90&&Math.abs(O)<270&&(r?(w*=-1,O+=g<=0?180:-180,g+=g<=0?180:-180):(C*=-1,O+=O<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+a,i.y=y-((i.yPercent=y&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-y)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+a,i.z=b+a,i.scaleX=se(w),i.scaleY=se(C),i.rotation=se(g)+o,i.rotationX=se(S)+o,i.rotationY=se(E)+o,i.skewX=O+o,i.skewY=A+o,i.transformPerspective=M+a,(i.zOrigin=parseFloat(f.split(" ")[2])||0)&&(n[je]=Ti(f)),i.xOffset=i.yOffset=0,i.force3D=fe.force3D,i.renderTransform=i.svg?$r:Nn?$n:Yr,i.uncache=0,i},Ti=function(e){return(e=e.split(" "))[0]+" "+e[1]},tn=function(e,t,i){var n=Te(t);return se(parseFloat(t)+parseFloat(_t(e,"x",i+"px",n)))+n},Yr=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,$n(e,t)},Ot="0deg",_i="0px",At=") ",$n=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,a=i.x,o=i.y,l=i.z,f=i.rotation,c=i.rotationY,y=i.rotationX,b=i.skewX,w=i.skewY,C=i.scaleX,g=i.scaleY,S=i.transformPerspective,E=i.force3D,O=i.target,A=i.zOrigin,M="",P="auto"===E&&e&&1!==e||!0===E;if(A&&(y!==Ot||c!==Ot)){var R,z=parseFloat(c)*qt,B=Math.sin(z),D=Math.cos(z);z=parseFloat(y)*qt,R=Math.cos(z),a=tn(O,a,B*R*-A),o=tn(O,o,-Math.sin(z)*-A),l=tn(O,l,D*R*-A+A)}S!==_i&&(M+="perspective("+S+At),(n||r)&&(M+="translate("+n+"%, "+r+"%) "),(P||a!==_i||o!==_i||l!==_i)&&(M+=l!==_i||P?"translate3d("+a+", "+o+", "+l+") ":"translate("+a+", "+o+At),f!==Ot&&(M+="rotate("+f+At),c!==Ot&&(M+="rotateY("+c+At),y!==Ot&&(M+="rotateX("+y+At),(b!==Ot||w!==Ot)&&(M+="skew("+b+", "+w+At),(1!==C||1!==g)&&(M+="scale("+C+", "+g+At),O.style[ue]=M||"translate(0, 0)"},$r=function(e,t){var P,z,B,D,R,i=t||this,n=i.xPercent,r=i.yPercent,a=i.x,o=i.y,l=i.rotation,f=i.skewX,c=i.skewY,y=i.scaleX,b=i.scaleY,w=i.target,C=i.xOrigin,g=i.yOrigin,S=i.xOffset,E=i.yOffset,O=i.forceCSS,A=parseFloat(a),M=parseFloat(o);l=parseFloat(l),f=parseFloat(f),(c=parseFloat(c))&&(f+=c=parseFloat(c),l+=c),l||f?(l*=qt,f*=qt,P=Math.cos(l)*y,z=Math.sin(l)*y,B=Math.sin(l-f)*-b,D=Math.cos(l-f)*b,f&&(c*=qt,R=Math.tan(f-c),B*=R=Math.sqrt(1+R*R),D*=R,c&&(R=Math.tan(c),P*=R=Math.sqrt(1+R*R),z*=R)),P=se(P),z=se(z),B=se(B),D=se(D)):(P=y,D=b,z=B=0),(A&&!~(a+"").indexOf("px")||M&&!~(o+"").indexOf("px"))&&(A=_t(w,"x",a,"px"),M=_t(w,"y",o,"px")),(C||g||S||E)&&(A=se(A+C-(C*P+g*B)+S),M=se(M+g-(C*z+g*D)+E)),(n||r)&&(R=w.getBBox(),A=se(A+n/100*R.width),M=se(M+r/100*R.height)),w.setAttribute("transform",R="matrix("+P+","+z+","+B+","+D+","+A+","+M+")"),O&&(w.style[ue]=R)},jr=function(e,t,i,n,r){var y,b,a=360,o=ie(r),f=parseFloat(r)*(o&&~r.indexOf("rad")?Et:1)-n,c=n+f+"deg";return o&&("short"===(y=r.split("_")[1])&&(f%=a)!=f%180&&(f+=f<0?a:-a),"cw"===y&&f<0?f=(f+a*Rn)%a-~~(f/a)*a:"ccw"===y&&f>0&&(f=(f-a*Rn)%a-~~(f/a)*a)),e._pt=b=new De(e._pt,t,i,n,f,Mr),b.e=c,b.u="deg",e._props.push(i),b},jn=function(e,t){for(var i in t)e[i]=t[i];return e},Kr=function(e,t,i){var o,l,f,c,y,b,C,n=jn({},i._gsap),a=i.style;for(l in n.svg?(f=i.getAttribute("transform"),i.setAttribute("transform",""),a[ue]=t,o=di(i,1),hi(i,ue),i.setAttribute("transform",f)):(f=getComputedStyle(i)[ue],a[ue]=t,o=di(i,1),a[ue]=f),it)(f=n[l])!==(c=o[l])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(l)<0&&(y=Te(f)!==(C=Te(c))?_t(i,l,f,C):parseFloat(f),b=parseFloat(c),e._pt=new De(e._pt,o,l,y,b-y,Ki),e._pt.u=C||0,e._props.push(l));jn(o,n)};Ce("padding,margin,Width,Radius",function(d,e){var t="Top",i="Right",n="Bottom",r="Left",a=(e<3?[t,i,n,r]:[t+r,t+i,n+i,n+r]).map(function(o){return e<2?d+o:"border"+o+d});Si[e>1?"border"+d:d]=function(o,l,f,c,y){var b,w;if(arguments.length<4)return b=a.map(function(C){return rt(o,C,f)}),5===(w=b.join(" ")).split(b[0]).length?b[0]:w;b=(c+"").split(" "),w={},a.forEach(function(C,g){return w[C]=b[g]=b[g]||b[(g-1)/2|0]}),o.init(l,w,y)}});var Kn={name:"css",register:Qi,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var f,c,y,b,w,C,g,S,E,O,A,M,P,z,B,D,a=this._props,o=e.style,l=i.vars.startAt;for(g in Yi||Qi(),this.styles=this.styles||Bn(e),D=this.styles.props,this.tween=i,t)if("autoRound"!==g&&(c=t[g],!me[g]||!xn(g,t,i,n,e,r)))if(C=Si[g],"function"==(w=typeof c)&&(w=typeof(c=c.call(i,n,e,r))),"string"===w&&~c.indexOf("random(")&&(c=si(c)),C)C(this,e,g,c,i)&&(B=1);else if("--"===g.substr(0,2))f=(getComputedStyle(e).getPropertyValue(g)+"").trim(),c+="",lt.lastIndex=0,lt.test(f)||(S=Te(f),E=Te(c)),E?S!==E&&(f=_t(e,g,f,E)+E):S&&(c+=S),this.add(o,"setProperty",f,c,n,r,0,0,g),a.push(g),D.push(g,0,o[g]);else if("undefined"!==w){if(l&&g in l?(f="function"==typeof l[g]?l[g].call(i,n,e,r):l[g],ie(f)&&~f.indexOf("random(")&&(f=si(f)),Te(f+"")||(f+=fe.units[g]||Te(rt(e,g))||""),"="===(f+"").charAt(1)&&(f=rt(e,g))):f=rt(e,g),b=parseFloat(f),(O="string"===w&&"="===c.charAt(1)&&c.substr(0,2))&&(c=c.substr(2)),y=parseFloat(c),g in nt&&("autoAlpha"===g&&(1===b&&"hidden"===rt(e,"visibility")&&y&&(b=0),D.push("visibility",0,o.visibility),dt(this,o,"visibility",b?"inherit":"hidden",y?"inherit":"hidden",!y)),"scale"!==g&&"transform"!==g&&~(g=nt[g]).indexOf(",")&&(g=g.split(",")[0])),A=g in it)if(this.styles.save(g),M||((P=e._gsap).renderTransform&&!t.parseTransform||di(e,t.parseTransform),z=!1!==t.smoothOrigin&&P.smooth,(M=this._pt=new De(this._pt,o,ue,0,1,P.renderTransform,P,0,-1)).dep=1),"scale"===g)this._pt=new De(this._pt,P,"scaleY",b,(O?et(b,O+y):y)-b||0,Ki),this._pt.u=0,a.push("scaleY",g),g+="X";else{if("transformOrigin"===g){D.push(je,0,o[je]),c=Xr(c),P.svg?en(e,c,0,z,0,this):((E=parseFloat(c.split(" ")[2])||0)!==P.zOrigin&&dt(this,P,"zOrigin",P.zOrigin,E),dt(this,o,g,Ti(f),Ti(c)));continue}if("svgOrigin"===g){en(e,c,1,z,0,this);continue}if(g in Xn){jr(this,P,g,b,O?et(b,O+c):c);continue}if("smoothOrigin"===g){dt(this,P,"smooth",P.smooth,c);continue}if("force3D"===g){P[g]=c;continue}if("transform"===g){Kr(this,c,e);continue}}else g in o||(g=Jt(g)||g);if(A||(y||0===y)&&(b||0===b)&&!Pr.test(c)&&g in o)y||(y=0),(S=(f+"").substr((b+"").length))!==(E=Te(c)||(g in fe.units?fe.units[g]:S))&&(b=_t(e,g,f,E)),this._pt=new De(this._pt,A?P:o,g,b,(O?et(b,O+y):y)-b,A||"px"!==E&&"zIndex"!==g||!1===t.autoRound?Ki:Dr),this._pt.u=E||0,S!==E&&"%"!==E&&(this._pt.b=f,this._pt.r=Rr);else if(g in o)Gr.call(this,e,g,f,O?O+c:c);else{if(!(g in e)){ti(g,c);continue}this.add(e,g,f||e[g],O?O+c:c,n,r)}A||(g in o?D.push(g,0,o[g]):D.push(g,1,f||e[g])),a.push(g)}B&&On(this)},render:function(e,t){if(t.tween._time||!$i())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:rt,aliases:nt,getSetter:function(e,t,i){var n=nt[t];return n&&n.indexOf(",")<0&&(t=n),t in it&&t!==je&&(e._gsap.x||rt(e,"x"))?i&&Mn===i?"scale"===t?Nr:Br:(Mn=i||{})&&("scale"===t?zr:Ir):e.style&&!pt(e.style[t])?Lr:~t.indexOf("-")?Fr:Ui(e,t)},core:{_removeProperty:hi,_getMatrix:Zi}};Ie.utils.checkPrefix=Jt,Ie.core.getStyleSaver=Bn,function(d,e,t,i){var n=Ce(d+","+e+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(r){it[r]=1});Ce(e,function(r){fe.units[r]="deg",Xn[r]=1}),nt[n[13]]=d+","+e,Ce("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(r){var a=r.split(":");nt[a[1]]=n[a[0]]})}("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY"),Ce("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(d){fe.units[d]="px"}),Ie.registerPlugin(Kn);var nn=Ie.registerPlugin(Kn)||Ie},6821:(Ei,ct,Ke)=>{Ke.d(ct,{n:()=>fe});var X=Ke(6682);class fe{constructor(v,N=1024){this.renderer=v,this.res=N,this.lightMapContainers=[],this.compiled=!1,this.scene=new X.xsS,this.scene.background=null,this.tinyTarget=new X.dd2(1,1),this.buffer1Active=!1,this.firstUpdate=!0,this.warned=!1;const V=/(Android|iPad|iPhone|iPod)/g.test(navigator.userAgent)?X.cLu:X.VzW;this.progressiveLightMap1=new X.dd2(this.res,this.res,{type:V}),this.progressiveLightMap2=new X.dd2(this.res,this.res,{type:V}),this.progressiveLightMap2.texture.channel=1,this.uvMat=new X.xoR,this.uvMat.uniforms={},this.uvMat.onBeforeCompile=I=>{I.vertexShader="#define USE_LIGHTMAP\n#define LIGHTMAP_UV uv1\n"+I.vertexShader.slice(0,-1)+"\tgl_Position = vec4((LIGHTMAP_UV - 0.5) * 2.0, 1.0, 1.0); }";const L=I.fragmentShader.indexOf("void main() {");I.fragmentShader="#define USE_LIGHTMAP\n"+I.fragmentShader.slice(0,L)+"\tuniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+I.fragmentShader.slice(L-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vLightMapUv).rgb;\n\t\t\t\tgl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/averagingWindow);\n\t\t\t}",I.uniforms.previousShadowMap={value:this.progressiveLightMap1.texture},I.uniforms.averagingWindow={value:100},this.uvMat.uniforms=I.uniforms,this.uvMat.userData.shader=I,this.compiled=!0}}addObjectsToLightMap(v){this.uv_boxes=[];const N=3/this.res;for(let I=0;I<v.length;I++){const L=v[I];L.isLight?this.scene.attach(L):L.geometry.hasAttribute("uv")?(null==this.blurringPlane&&this._initializeBlurPlane(this.res,this.progressiveLightMap1),L.material.lightMap=this.progressiveLightMap2.texture,L.material.dithering=!0,L.castShadow=!0,L.receiveShadow=!0,L.renderOrder=1e3+I,this.uv_boxes.push({w:1+2*N,h:1+2*N,index:I}),this.lightMapContainers.push({basicMat:L.material,object:L}),this.compiled=!1):console.warn("All lightmap objects need UVs!")}const V=function Le(ye){let v=0,N=0;for(const U of ye)v+=U.w*U.h,N=Math.max(N,U.w);ye.sort((U,Fe)=>Fe.h-U.h);const I=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(v/.95)),N),h:1/0}];let L=0,ae=0;for(const U of ye)for(let Fe=I.length-1;Fe>=0;Fe--){const j=I[Fe];if(!(U.w>j.w||U.h>j.h)){if(U.x=j.x,U.y=j.y,ae=Math.max(ae,U.y+U.h),L=Math.max(L,U.x+U.w),U.w===j.w&&U.h===j.h){const Ee=I.pop();Fe<I.length&&(I[Fe]=Ee)}else U.h===j.h?(j.x+=U.w,j.w-=U.w):U.w===j.w?(j.y+=U.h,j.h-=U.h):(I.push({x:j.x+U.w,y:j.y,w:j.w-U.w,h:U.h}),j.y+=U.h,j.h-=U.h);break}}return{w:L,h:ae,fill:v/(L*ae)||0}}(this.uv_boxes);this.uv_boxes.forEach(I=>{const L=v[I.index].geometry.getAttribute("uv").clone();for(let ae=0;ae<L.array.length;ae+=L.itemSize)L.array[ae]=(L.array[ae]+I.x+N)/V.w,L.array[ae+1]=(L.array[ae+1]+I.y+N)/V.h;v[I.index].geometry.setAttribute("uv1",L),v[I.index].geometry.getAttribute("uv1").needsUpdate=!0})}update(v,N=100,V=!0){if(null==this.blurringPlane)return;const I=this.renderer.getRenderTarget();this.blurringPlane.visible=V;for(let U=0;U<this.lightMapContainers.length;U++)this.lightMapContainers[U].object.oldScene=this.lightMapContainers[U].object.parent,this.scene.attach(this.lightMapContainers[U].object);this.firstUpdate&&(this.renderer.setRenderTarget(this.tinyTarget),this.renderer.render(this.scene,v),this.firstUpdate=!1);for(let U=0;U<this.lightMapContainers.length;U++)this.uvMat.uniforms.averagingWindow={value:N},this.lightMapContainers[U].object.material=this.uvMat,this.lightMapContainers[U].object.oldFrustumCulled=this.lightMapContainers[U].object.frustumCulled,this.lightMapContainers[U].object.frustumCulled=!1;const ae=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1;this.renderer.setRenderTarget(this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2),this.uvMat.uniforms.previousShadowMap={value:ae.texture},this.blurringPlane.material.uniforms.previousShadowMap={value:ae.texture},this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,v);for(let U=0;U<this.lightMapContainers.length;U++)this.lightMapContainers[U].object.frustumCulled=this.lightMapContainers[U].object.oldFrustumCulled,this.lightMapContainers[U].object.material=this.lightMapContainers[U].basicMat,this.lightMapContainers[U].object.oldScene.attach(this.lightMapContainers[U].object);this.renderer.setRenderTarget(I)}showDebugLightmap(v,N){0!=this.lightMapContainers.length?(null==this.labelMesh&&(this.labelMaterial=new X.vBJ({map:this.progressiveLightMap1.texture,side:X.ehD}),this.labelPlane=new X._12(100,100),this.labelMesh=new X.Kj0(this.labelPlane,this.labelMaterial),this.labelMesh.position.y=250,this.lightMapContainers[0].object.parent.add(this.labelMesh)),null!=N&&this.labelMesh.position.copy(N),this.labelMesh.visible=v):this.warned||(console.warn("Call this after adding the objects!"),this.warned=!0)}_initializeBlurPlane(v,N=null){const V=new X.vBJ;V.uniforms={previousShadowMap:{value:null},pixelOffset:{value:1/v},polygonOffset:!0,polygonOffsetFactor:-1,polygonOffsetUnits:3},V.onBeforeCompile=I=>{I.vertexShader="#define USE_UV\n"+I.vertexShader.slice(0,-1)+"\tgl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const L=I.fragmentShader.indexOf("void main() {");I.fragmentShader="#define USE_UV\n"+I.fragmentShader.slice(0,L)+"\tuniform sampler2D previousShadowMap;\n\tuniform float pixelOffset;\n"+I.fragmentShader.slice(L-1,-1)+"\tgl_FragColor.rgb = (\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2( pixelOffset, 0.0 )).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2( 0.0 , pixelOffset)).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2( 0.0 , -pixelOffset)).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2(-pixelOffset, 0.0 )).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2( pixelOffset, pixelOffset)).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2(-pixelOffset, pixelOffset)).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2( pixelOffset, -pixelOffset)).rgb +\n\t\t\t\t\t\t\t\t\ttexture2D(previousShadowMap, vUv + vec2(-pixelOffset, -pixelOffset)).rgb)/8.0;\n\t\t\t\t}",I.uniforms.previousShadowMap={value:N.texture},I.uniforms.pixelOffset={value:.5/v},V.uniforms=I.uniforms,V.userData.shader=I,this.compiled=!0},this.blurringPlane=new X.Kj0(new X._12(1,1),V),this.blurringPlane.name="Blurring Plane",this.blurringPlane.frustumCulled=!1,this.blurringPlane.renderOrder=0,this.blurringPlane.material.depthWrite=!1,this.scene.add(this.blurringPlane)}}}}]);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/show-case/introduce.git
[email protected]:show-case/introduce.git
show-case
introduce
introduce
master

搜索帮助