diff --git a/dist/global.js b/dist/global.js index bca8fd0..60b705a 100644 --- a/dist/global.js +++ b/dist/global.js @@ -88,4 +88,4 @@ var _h=Object.defineProperty;var Dh=(o,e,i)=>e in o?_h(o,e,{enumerable:!0,config * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com -*/var Si,ou,ro,ch,hh,al,Ca,fh,dh=function(){return typeof window<"u"},ph=function(){return Si||dh()&&(Si=window.gsap)&&Si.registerPlugin&&Si},Ep=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,Ho={rect:["width","height"],circle:["r","r"],ellipse:["rx","ry"],line:["x2","y2"]},_r=function(e){return Math.round(e*1e4)/1e4},Vi=function(e){return parseFloat(e)||0},ul=function(e,i){var t=Vi(e);return~e.indexOf("%")?t/100*i:t},ks=function(e,i){return Vi(e.getAttribute(i))},Ns=Math.sqrt,ll=function(e,i,t,r,n,s){return Ns(Math.pow((Vi(t)-Vi(e))*n,2)+Math.pow((Vi(r)-Vi(i))*s,2))},cl=function(e){return console.warn(e)},gh=function(e){return e.getAttribute("vector-effect")==="non-scaling-stroke"},Sp=1,kp=function(e,i,t){var r=e.indexOf(" "),n,s;return r<0?(n=t!==void 0?t+"":e,s=e):(n=e.substr(0,r),s=e.substr(r+1)),n=ul(n,i),s=ul(s,i),n>s?[s,n]:[n,s]},zs=function(e){if(e=ou(e)[0],!e)return 0;var i=e.tagName.toLowerCase(),t=e.style,r=1,n=1,s,a,u,l,c,p,h;gh(e)&&(n=e.getScreenCTM(),r=Ns(n.a*n.a+n.b*n.b),n=Ns(n.d*n.d+n.c*n.c));try{a=e.getBBox()}catch{cl("Some browsers won't measure invisible elements (like display:none or masks inside defs).")}var f=a||{x:0,y:0,width:0,height:0},g=f.x,d=f.y,m=f.width,_=f.height;if((!a||!m&&!_)&&Ho[i]&&(m=ks(e,Ho[i][0]),_=ks(e,Ho[i][1]),i!=="rect"&&i!=="line"&&(m*=2,_*=2),i==="line"&&(g=ks(e,"x1"),d=ks(e,"y1"),m=Math.abs(m-g),_=Math.abs(_-d))),i==="path")l=t.strokeDasharray,t.strokeDasharray="none",s=e.getTotalLength()||0,_r(r)!==_r(n)&&!al&&(al=1)&&cl("Warning: length cannot be measured when vector-effect is non-scaling-stroke and the element isn't proportionally scaled."),s*=(r+n)/2,t.strokeDasharray=l;else if(i==="rect")s=m*2*r+_*2*n;else if(i==="line")s=ll(g,d,g+m,d+_,r,n);else if(i==="polyline"||i==="polygon")for(u=e.getAttribute("points").match(Ep)||[],i==="polygon"&&u.push(u[0],u[1]),s=0,c=2;ci&&(r=i),[-n||0,r-n||0]},fl=function(){dh()&&(ro=window,hh=Si=ph(),ou=Si.utils.toArray,Ca=Si.core.getStyleSaver,fh=Si.core.reverting||function(){},ch=((ro.navigator||{}).userAgent||"").indexOf("Edge")!==-1)},mh={version:"3.12.5",name:"drawSVG",register:function(e){Si=e,fl()},init:function(e,i,t,r,n){if(!e.getBBox)return!1;hh||fl();var s=zs(e),a,u,l;return this.styles=Ca&&Ca(e,"strokeDashoffset,strokeDasharray,strokeMiterlimit"),this.tween=t,this._style=e.style,this._target=e,i+""=="true"?i="0 100%":i?(i+"").indexOf(" ")===-1&&(i="0 "+i):i="0 0",a=hl(e,s),u=kp(i,s,a[0]),this._length=_r(s),this._dash=_r(a[1]-a[0]),this._offset=_r(-a[0]),this._dashPT=this.add(this,"_dash",this._dash,_r(u[1]-u[0]),0,0,0,0,0,1),this._offsetPT=this.add(this,"_offset",this._offset,_r(-u[0]),0,0,0,0,0,1),ch&&(l=ro.getComputedStyle(e),l.strokeLinecap!==l.strokeLinejoin&&(u=Vi(l.strokeMiterlimit),this.add(e.style,"strokeMiterlimit",u,u+.01))),this._live=gh(e)||~(i+"").indexOf("live"),this._nowrap=~(i+"").indexOf("nowrap"),this._props.push("drawSVG"),Sp},render:function(e,i){if(i.tween._time||!fh()){var t=i._pt,r=i._style,n,s,a,u;if(t){for(i._live&&(n=zs(i._target),n!==i._length&&(s=n/i._length,i._length=n,i._offsetPT&&(i._offsetPT.s*=s,i._offsetPT.c*=s),i._dashPT?(i._dashPT.s*=s,i._dashPT.c*=s):i._dash*=s));t;)t.r(e,t.d),t=t._next;a=i._dash||e&&e!==1&&1e-4||0,n=i._length-a+.1,u=i._offset,a&&u&&a+Math.abs(u%i._length)>i._length-.2&&(u+=u<0?.1:-.1)&&(n+=.1),r.strokeDashoffset=a?u:u+.001,r.strokeDasharray=n<.2?"none":a?a+"px,"+(i._nowrap?999999:n)+"px":"0px, 999999px"}}else i.styles.revert()},getLength:zs,getPosition:hl};ph()&&Si.registerPlugin(mh);M.registerPlugin(mh);const au={mainNavLinks:null,secondaryNavLinks:null,allNavLinks:null,cursor:null,navButton:null,hamburgerIcon:null,hamburgerLines:null,navOverlay:null,pageContainer:null,navWrapper:null,isAnimating:!1,header:null,headerColor:null,init(){this.setVariables(),this.prepareNavOverlay(),this.addHoverAnimation(),this.handleCursor(),this.addButtonEventListeners()},setVariables(){this.mainNavLinks=M.utils.toArray(".main-nav__link"),this.secondaryNavLinks=M.utils.toArray(".secondary-nav__link"),this.allNavLinks=[...this.mainNavLinks,...this.secondaryNavLinks],this.cursor=Fr.getInstance(),this.openButton=document.querySelector(".header__nav-open-button"),this.closeButton=document.querySelector(".header__nav-close-button"),this.hamburgerIcon=document.querySelector(".hamburger-icon"),this.hamburgerLines=this.hamburgerIcon.querySelectorAll("line"),this.navOverlay=document.querySelector(".nav"),this.navWrapper=document.querySelector(".nav__wrapper"),this.header=document.querySelector(".header")},prepareNavOverlay(){M.set(this.navOverlay,{autoAlpha:1,yPercent:-100}),this.openButton.addEventListener("click",()=>this.openNav()),this.closeButton.addEventListener("click",()=>this.closeNav(!1))},addHoverAnimation(){co.make(this.mainNavLinks),this.mainNavLinks.forEach(o=>{o.addEventListener("mouseenter",()=>{const e=this.mainNavLinks.filter(i=>i!==o);M.to(e,{color:ir("--color--blue-gray-500"),duration:.3})}),o.addEventListener("mouseleave",()=>{M.to(this.mainNavLinks,{color:ir("--color--off-white-100"),duration:.3})})})},openNav(){this.headerColor=window.getComputedStyle(this.header).color,this.pageContainer=document.querySelector(".page__container");const o=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.to(this.header,{color:ir("--color--off-white-100")}),bt.getInstance().paused(!0)},onComplete:()=>{this.isAnimating=!1}});o.to(this.hamburgerLines,{drawSVG:"100% 100%",duration:.3,ease:"power3.inOut",stagger:.1,onComplete:()=>{M.set(this.hamburgerIcon,{display:"none"})}}),o.to(this.pageContainer,{y:200,filter:"blur(80px)",duration:.8,ease:"power3.inOut"},0),o.to(this.navOverlay,{yPercent:0},".2"),o.from(this.mainNavLinks,{autoAlpha:0,y:-50,duration:1,ease:"power3.out",stagger:{from:"end",amount:.1}},"<50%"),o.from(".close-icon line",{drawSVG:M.utils.wrap(["100% 100%","0"]),stagger:.2,onStart:()=>{M.set(this.closeButton,{display:"block"})}},"<50%")},closeNav(o=!0){const e=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.set(this.closeButton,{display:"none"})},onComplete:()=>{this.isAnimating=!1,bt.getInstance().paused(!1),M.set([this.openButton,this.hamburgerIcon,this.hamburgerLines,this.mainNavLinks],{clearProps:"all"})}});e.to(this.pageContainer,{y:0,filter:"blur(0px)",duration:.8,ease:"power3.out"},"<"),o||e.to(this.header,{color:this.headerColor},"<"),e.to(this.mainNavLinks,{autoAlpha:0,y:-50,filter:"blur(5px)",duration:1,ease:"power3.out",stagger:{from:"start",amount:.1}},"<"),e.to(this.navOverlay,{yPercent:-100},"<")},navTransition(o){const e=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.set(this.closeButton,{display:"none"}),o()},onComplete:()=>{this.isAnimating=!1,bt.getInstance().paused(!1),M.set([this.openButton,this.hamburgerIcon,this.hamburgerLines,this.mainNavLinks],{clearProps:"all"})}});e.to(".header__name",{color:ir("--color--dark-blue-800")},"<"),e.to(this.mainNavLinks,{autoAlpha:0,y:-50,filter:"blur(5px)",duration:1,ease:"power3.out",stagger:{from:"start",amount:.1}},"<"),e.to(this.navOverlay,{yPercent:-100},"<")},handleCursor(){this.allNavLinks.forEach(o=>{o.addEventListener("mouseenter",()=>this.cursor.addState("cursor--hidden")),o.addEventListener("mouseleave",()=>this.cursor.removeState("cursor--hidden"))})},updateNavigation:()=>{const o=document.querySelectorAll(".main-nav__link");o.forEach(s=>s.classList.remove("main-nav__link--active"));const i=window.location.pathname.match(/(?:\/public)?\/([^\/]+)(?:\.html)?/),t=i?i[1]:"",r=new RegExp(`/(?:public/)?${t}(?:\\.html)?`),n=Array.from(o).find(s=>r.test(s.getAttribute("href")));n&&n.classList.add("main-nav__link--active")},addButtonEventListeners(){const o=e=>{if(this.isAnimating)return;const i=e?["20% 100%","60% 100%","40% 100%"]:"0% 100%";M.to(this.hamburgerLines,{drawSVG:M.utils.wrap(i),duration:.3,ease:"power3.inOut"})};this.openButton.addEventListener("mouseenter",()=>{this.cursor.addState("cursor--hidden"),o(!0)}),this.openButton.addEventListener("mouseleave",()=>{this.cursor.removeState("cursor--hidden"),o(!1)}),this.closeButton.addEventListener("mouseenter",()=>this.cursor.addState("cursor--hidden")),this.closeButton.addEventListener("mouseleave",()=>this.cursor.removeState("cursor--hidden"))}};class Tp{constructor(){X(this,"name","nav-transition");X(this,"from",{custom:({trigger:e})=>e.closest(".nav")!==null})}leave({current:e}){M.set(e.container,{display:"none"})}afterLeave(){bt.getInstance().scrollTo(0,!1)}enter(){const e=this.async();au.navTransition(e)}}const Fp=new Tp,Pp={init(){this.addTransitionElement(),this.setupBarba()},setupBarba(){cs.hooks.before(o=>{bt.getInstance().paused(!0)}),cs.hooks.beforeEnter(o=>{au.updateNavigation()}),cs.hooks.after(()=>{bt.getInstance().paused(!1)}),cs.init({logLevel:"error",views:[Yd,Wd,Gd,hp,_p,dp],transitions:[Fp,Cp,Ad,gp]})},addTransitionElement(){const o=document.createElement("div");o.classList.add("transition"),document.body.appendChild(o),M.set(o,{yPercent:100,autoAlpha:1,position:"fixed",inset:0,backgroundColor:ir("--transition--bg-color"),zIndex:9})}};M.registerPlugin(Ri);const Ap={logo:null,splitLogo:null,init(){this.logo=document.querySelector(".header__name"),this.splitLogo=new Ri(this.logo,{type:"lines, words"}),M.set([this.splitLogo.lines],{overflow:"hidden",position:"relative"}),M.set(this.splitLogo.words,{paddingBottom:"0.15em"}),M.set(this.splitLogo.lines.slice(1),{marginTop:"-0.15em"}),this.splitLogo.words.forEach(r=>{const n=r.cloneNode(!0);M.set(n,{yPercent:100,position:"absolute",top:0,left:0}),r.insertAdjacentElement("afterend",n)}),co.make(this.logo);const o=Fr.getInstance(),e=M.timeline({paused:!0}),i=M.to(this.splitLogo.lines[1].querySelectorAll("div"),{yPercent:"-=100",ease:"none"}),t=M.to(this.splitLogo.lines[0].querySelectorAll("div"),{yPercent:"-=100",ease:"none"});e.add(i,0),e.add(t,">-25%"),this.logo.addEventListener("mouseenter",()=>{o.addState("cursor--hidden"),M.to(e,{progress:1,duration:.6,ease:"power1.inOut"})}),this.logo.addEventListener("mouseleave",()=>{o.removeState("cursor--hidden"),M.to(e,{progress:0,duration:.6,ease:"power1.out"})})}};bt.init();Fr.init();au.init();Ap.init();Pp.init(); +*/var Si,ou,ro,ch,hh,al,Ca,fh,dh=function(){return typeof window<"u"},ph=function(){return Si||dh()&&(Si=window.gsap)&&Si.registerPlugin&&Si},Ep=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,Ho={rect:["width","height"],circle:["r","r"],ellipse:["rx","ry"],line:["x2","y2"]},_r=function(e){return Math.round(e*1e4)/1e4},Vi=function(e){return parseFloat(e)||0},ul=function(e,i){var t=Vi(e);return~e.indexOf("%")?t/100*i:t},ks=function(e,i){return Vi(e.getAttribute(i))},Ns=Math.sqrt,ll=function(e,i,t,r,n,s){return Ns(Math.pow((Vi(t)-Vi(e))*n,2)+Math.pow((Vi(r)-Vi(i))*s,2))},cl=function(e){return console.warn(e)},gh=function(e){return e.getAttribute("vector-effect")==="non-scaling-stroke"},Sp=1,kp=function(e,i,t){var r=e.indexOf(" "),n,s;return r<0?(n=t!==void 0?t+"":e,s=e):(n=e.substr(0,r),s=e.substr(r+1)),n=ul(n,i),s=ul(s,i),n>s?[s,n]:[n,s]},zs=function(e){if(e=ou(e)[0],!e)return 0;var i=e.tagName.toLowerCase(),t=e.style,r=1,n=1,s,a,u,l,c,p,h;gh(e)&&(n=e.getScreenCTM(),r=Ns(n.a*n.a+n.b*n.b),n=Ns(n.d*n.d+n.c*n.c));try{a=e.getBBox()}catch{cl("Some browsers won't measure invisible elements (like display:none or masks inside defs).")}var f=a||{x:0,y:0,width:0,height:0},g=f.x,d=f.y,m=f.width,_=f.height;if((!a||!m&&!_)&&Ho[i]&&(m=ks(e,Ho[i][0]),_=ks(e,Ho[i][1]),i!=="rect"&&i!=="line"&&(m*=2,_*=2),i==="line"&&(g=ks(e,"x1"),d=ks(e,"y1"),m=Math.abs(m-g),_=Math.abs(_-d))),i==="path")l=t.strokeDasharray,t.strokeDasharray="none",s=e.getTotalLength()||0,_r(r)!==_r(n)&&!al&&(al=1)&&cl("Warning: length cannot be measured when vector-effect is non-scaling-stroke and the element isn't proportionally scaled."),s*=(r+n)/2,t.strokeDasharray=l;else if(i==="rect")s=m*2*r+_*2*n;else if(i==="line")s=ll(g,d,g+m,d+_,r,n);else if(i==="polyline"||i==="polygon")for(u=e.getAttribute("points").match(Ep)||[],i==="polygon"&&u.push(u[0],u[1]),s=0,c=2;ci&&(r=i),[-n||0,r-n||0]},fl=function(){dh()&&(ro=window,hh=Si=ph(),ou=Si.utils.toArray,Ca=Si.core.getStyleSaver,fh=Si.core.reverting||function(){},ch=((ro.navigator||{}).userAgent||"").indexOf("Edge")!==-1)},mh={version:"3.12.5",name:"drawSVG",register:function(e){Si=e,fl()},init:function(e,i,t,r,n){if(!e.getBBox)return!1;hh||fl();var s=zs(e),a,u,l;return this.styles=Ca&&Ca(e,"strokeDashoffset,strokeDasharray,strokeMiterlimit"),this.tween=t,this._style=e.style,this._target=e,i+""=="true"?i="0 100%":i?(i+"").indexOf(" ")===-1&&(i="0 "+i):i="0 0",a=hl(e,s),u=kp(i,s,a[0]),this._length=_r(s),this._dash=_r(a[1]-a[0]),this._offset=_r(-a[0]),this._dashPT=this.add(this,"_dash",this._dash,_r(u[1]-u[0]),0,0,0,0,0,1),this._offsetPT=this.add(this,"_offset",this._offset,_r(-u[0]),0,0,0,0,0,1),ch&&(l=ro.getComputedStyle(e),l.strokeLinecap!==l.strokeLinejoin&&(u=Vi(l.strokeMiterlimit),this.add(e.style,"strokeMiterlimit",u,u+.01))),this._live=gh(e)||~(i+"").indexOf("live"),this._nowrap=~(i+"").indexOf("nowrap"),this._props.push("drawSVG"),Sp},render:function(e,i){if(i.tween._time||!fh()){var t=i._pt,r=i._style,n,s,a,u;if(t){for(i._live&&(n=zs(i._target),n!==i._length&&(s=n/i._length,i._length=n,i._offsetPT&&(i._offsetPT.s*=s,i._offsetPT.c*=s),i._dashPT?(i._dashPT.s*=s,i._dashPT.c*=s):i._dash*=s));t;)t.r(e,t.d),t=t._next;a=i._dash||e&&e!==1&&1e-4||0,n=i._length-a+.1,u=i._offset,a&&u&&a+Math.abs(u%i._length)>i._length-.2&&(u+=u<0?.1:-.1)&&(n+=.1),r.strokeDashoffset=a?u:u+.001,r.strokeDasharray=n<.2?"none":a?a+"px,"+(i._nowrap?999999:n)+"px":"0px, 999999px"}}else i.styles.revert()},getLength:zs,getPosition:hl};ph()&&Si.registerPlugin(mh);M.registerPlugin(mh);const au={mainNavLinks:null,secondaryNavLinks:null,allNavLinks:null,cursor:null,navButton:null,hamburgerIcon:null,hamburgerLines:null,navOverlay:null,pageContainer:null,navWrapper:null,isAnimating:!1,header:null,headerColor:null,init(){this.setVariables(),this.prepareNavOverlay(),this.addHoverAnimation(),this.handleCursor(),this.addButtonEventListeners()},setVariables(){this.mainNavLinks=M.utils.toArray(".main-nav__link"),this.secondaryNavLinks=M.utils.toArray(".secondary-nav__link"),this.allNavLinks=[...this.mainNavLinks,...this.secondaryNavLinks],this.cursor=Fr.getInstance(),this.openButton=document.querySelector(".header__nav-open-button"),this.closeButton=document.querySelector(".header__nav-close-button"),this.hamburgerIcon=document.querySelector(".hamburger-icon"),this.hamburgerLines=this.hamburgerIcon.querySelectorAll("line"),this.navOverlay=document.querySelector(".nav"),this.navWrapper=document.querySelector(".nav__wrapper"),this.header=document.querySelector(".header")},prepareNavOverlay(){M.set(this.navOverlay,{autoAlpha:1,yPercent:-100}),this.openButton.addEventListener("click",()=>this.openNav()),this.closeButton.addEventListener("click",()=>this.closeNav(!1))},addHoverAnimation(){co.make(this.mainNavLinks),this.mainNavLinks.forEach(o=>{o.addEventListener("mouseenter",()=>{const e=this.mainNavLinks.filter(i=>i!==o);M.to(e,{color:ir("--color--blue-gray-500"),duration:.3})}),o.addEventListener("mouseleave",()=>{M.to(this.mainNavLinks,{color:ir("--color--off-white-100"),duration:.3})})})},openNav(){this.headerColor=window.getComputedStyle(this.header).color,this.pageContainer=document.querySelector(".page__container");const o=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.to(this.header,{color:ir("--color--off-white-100")}),bt.getInstance().paused(!0)},onComplete:()=>{this.isAnimating=!1}});o.to(this.hamburgerLines,{drawSVG:"100% 100%",duration:.3,ease:"power3.inOut",stagger:.1,onComplete:()=>{M.set(this.hamburgerIcon,{display:"none"})}}),o.to(this.pageContainer,{y:200,filter:"blur(80px)",duration:.8,ease:"power3.inOut"},0),o.to(this.navOverlay,{yPercent:0},".2"),o.from(this.mainNavLinks,{autoAlpha:0,y:-50,duration:1,ease:"power3.out",stagger:{from:"end",amount:.1}},"<50%"),o.from(".close-icon line",{drawSVG:M.utils.wrap(["100% 100%","0"]),stagger:.2,onStart:()=>{M.set(this.closeButton,{display:"block"})}},"<50%")},closeNav(o=!0){const e=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.set(this.closeButton,{display:"none"})},onComplete:()=>{this.isAnimating=!1,bt.getInstance().paused(!1),M.set([this.openButton,this.hamburgerIcon,this.hamburgerLines,this.mainNavLinks],{clearProps:"all"})}});e.to(this.pageContainer,{y:0,filter:"blur(0px)",duration:.8,ease:"power3.out"},"<"),o||e.to(this.header,{color:this.headerColor},"<"),e.to(this.mainNavLinks,{autoAlpha:0,y:-50,filter:"blur(5px)",duration:1,ease:"power3.out",stagger:{from:"start",amount:.1}},"<"),e.to(this.navOverlay,{yPercent:-100},"<")},navTransition(o){const e=M.timeline({onStart:()=>{this.isAnimating=!0,this.cursor.removeState("cursor--hidden"),M.set(this.closeButton,{display:"none"}),o()},onComplete:()=>{this.isAnimating=!1,bt.getInstance().paused(!1),M.set([this.openButton,this.hamburgerIcon,this.hamburgerLines,this.mainNavLinks],{clearProps:"all"})}});e.to(".header__name",{color:ir("--color--dark-blue-800")},"<"),e.to(this.mainNavLinks,{autoAlpha:0,y:-50,filter:"blur(5px)",duration:1,ease:"power3.out",stagger:{from:"start",amount:.1}},"<"),e.to(this.navOverlay,{yPercent:-100},"<")},handleCursor(){this.allNavLinks.forEach(o=>{o.addEventListener("mouseenter",()=>this.cursor.addState("cursor--hidden")),o.addEventListener("mouseleave",()=>this.cursor.removeState("cursor--hidden"))})},updateNavigation:()=>{const o=document.querySelectorAll(".main-nav__link");o.forEach(s=>s.classList.remove("main-nav__link--active"));const i=window.location.pathname.match(/(?:\/public)?\/([^\/]+)(?:\.html)?/),t=i?i[1]:"",r=new RegExp(`/(?:public/)?${t}(?:\\.html)?`),n=Array.from(o).find(s=>r.test(s.getAttribute("href")));n&&n.classList.add("main-nav__link--active")},addButtonEventListeners(){const o=e=>{if(this.isAnimating)return;const i=e?["20% 100%","60% 100%","40% 100%"]:"0% 100%";M.to(this.hamburgerLines,{drawSVG:M.utils.wrap(i),duration:.3,ease:"power3.inOut"})};this.openButton.addEventListener("mouseenter",()=>{this.cursor.addState("cursor--hidden"),o(!0)}),this.openButton.addEventListener("mouseleave",()=>{this.cursor.removeState("cursor--hidden"),o(!1)}),this.closeButton.addEventListener("mouseenter",()=>this.cursor.addState("cursor--hidden")),this.closeButton.addEventListener("mouseleave",()=>this.cursor.removeState("cursor--hidden"))}};class Tp{constructor(){X(this,"name","nav-transition");X(this,"from",{custom:({trigger:e})=>typeof e!="string"&&e.closest(".nav")!==null})}leave({current:e}){M.set(e.container,{display:"none"})}afterLeave(){bt.getInstance().scrollTo(0,!1)}enter(){const e=this.async();au.navTransition(e)}}const Fp=new Tp,Pp={init(){this.addTransitionElement(),this.setupBarba()},setupBarba(){cs.hooks.before(o=>{bt.getInstance().paused(!0)}),cs.hooks.beforeEnter(o=>{au.updateNavigation()}),cs.hooks.after(()=>{bt.getInstance().paused(!1)}),cs.init({logLevel:"error",views:[Yd,Wd,Gd,hp,_p,dp],transitions:[Fp,Cp,Ad,gp]})},addTransitionElement(){const o=document.createElement("div");o.classList.add("transition"),document.body.appendChild(o),M.set(o,{yPercent:100,autoAlpha:1,position:"fixed",inset:0,backgroundColor:ir("--transition--bg-color"),zIndex:9})}};M.registerPlugin(Ri);const Ap={logo:null,splitLogo:null,init(){this.logo=document.querySelector(".header__name"),this.splitLogo=new Ri(this.logo,{type:"lines, words"}),M.set([this.splitLogo.lines],{overflow:"hidden",position:"relative"}),M.set(this.splitLogo.words,{paddingBottom:"0.15em"}),M.set(this.splitLogo.lines.slice(1),{marginTop:"-0.15em"}),this.splitLogo.words.forEach(r=>{const n=r.cloneNode(!0);M.set(n,{yPercent:100,position:"absolute",top:0,left:0}),r.insertAdjacentElement("afterend",n)}),co.make(this.logo);const o=Fr.getInstance(),e=M.timeline({paused:!0}),i=M.to(this.splitLogo.lines[1].querySelectorAll("div"),{yPercent:"-=100",ease:"none"}),t=M.to(this.splitLogo.lines[0].querySelectorAll("div"),{yPercent:"-=100",ease:"none"});e.add(i,0),e.add(t,">-25%"),this.logo.addEventListener("mouseenter",()=>{o.addState("cursor--hidden"),M.to(e,{progress:1,duration:.6,ease:"power1.inOut"})}),this.logo.addEventListener("mouseleave",()=>{o.removeState("cursor--hidden"),M.to(e,{progress:0,duration:.6,ease:"power1.out"})})}};bt.init();Fr.init();au.init();Ap.init();Pp.init();