1function smoothscroll(){class ScrollSnap{constructor(lenis,proximityLimit,{snapType}){this.lenis=lenis;this.proximityLimit=proximityLimit||0.3;this.isHorizontal=this.lenis.options.orientation==="horizontal";this.rootElement=this.lenis.options.content;this.snapType=snapType||this.rootElement.getAttribute("scroll-snap-type")||"mandatory";this.initElements();this.lenis.on("scroll",this.onScroll.bind(this))} 2initElements(){this.elements=Array.from(this.rootElement.querySelectorAll('[scroll-snap-align]:not([scroll-snap-align="none"]')).map((element)=>{let snapAlign=element.getAttribute("scroll-snap-align");if(!["start","center","end","none"].includes(snapAlign)){snapAlign="start"} 3return{element,snapAlign}})} 4onScroll=({velocity})=>{if(Math.abs(velocity)>0.1)return;const wrapperRect=this.lenis.options.wrapper===window?{left:0,top:0,width:this.lenis.dimensions.width,height:this.lenis.dimensions.height}:this.lenis.dimensions.wrapper.getBoundingClientRect();const wrapperPos=this.isHorizontal?wrapperRect.left:wrapperRect.top;const elements=this.elements.map(({element,snapAlign})=>{const elRect=element.getBoundingClientRect();let offset=0;if("end"===snapAlign){offset=this.isHorizontal?elRect.width-wrapperRect.width:elRect.height-wrapperRect.height}else if("center"===snapAlign){offset=this.isHorizontal?(elRect.width-wrapperRect.width)/2:(elRect.height-wrapperRect.height)/2} 5const elPos=this.isHorizontal?elRect.left:elRect.top;const distance=Math.abs(elPos-wrapperPos+offset);return{element,distance,elRect,offset}}).sort((a,b)=>a.distance-b.distance);let limit=this.isHorizontal?wrapperRect.width:wrapperRect.height;if("proximity"===this.snapType){limit*=this.proximityLimit} 6const element=elements[0];if(element&&element.distance>=limit){return} 7if(element){this.lenis.scrollTo(element.element,{offset:element.offset})}}} 8var t=window.location.href.includes("brickspreview"),e=document.querySelector(".bc-smooth-scroll-data");if(e){var i=e.getAttribute("data-disable-builder"),r=e.getAttribute("data-disable-screen"),o=!1;if((t&&"1"==i&&(o=!0),!o)){var l=e.getAttribute("data-type");if("lenisjs"==l&&("1"!=r||("1"==r&&window.matchMedia("(pointer:fine)").matches))){let u=e.getAttribute("data-duration"),s=e.getAttribute("data-smoothtouch"),c=e.getAttribute("data-wheelmultiplier"),n=e.getAttribute("data-touchmultiplier"),d=e.getAttribute("data-infinite"),b=e.getAttribute("data-wrapper");var h=document.querySelector(b);var a=new Lenis({wrapper:h,content:document.documentElement,duration:u,easing:(t)=>Math.min(1,1.001-Math.pow(2,-10*t)),direction:"vertical",gestureDirection:"vertical",smoothTouch:s,wheelMultiplier:c,touchMultiplier:n,infinite:d,});let scrollSnapEnabled=!1;if(e.getAttribute("data-enable-snap")=="1"){scrollSnapEnabled=!0} 9let snapType=e.getAttribute("data-type-snap");let proximityLimit=parseFloat(e.getAttribute("data-proximity-limit-snap"))/100;if(scrollSnapEnabled){new ScrollSnap(a,proximityLimit,{snapType})} 10window.lenisInstance=a;document.addEventListener('keydown',function(event){if(event.key==='Escape'&&window.lenisInstance&&window.lenisInstance.isStopped){window.lenisInstance.start()}});
10function f(t){a.raf(t),ScrollTrigger.update(),requestAnimationFrame(f)} 11requestAnimationFrame(f),document.querySelectorAll('a[href^="#"]').forEach((t)=>{t.addEventListener("click",(e)=>{e.preventDefault();let i=t.getAttribute("href")?.slice(1);if(!i)return;let r=document.getElementById(i);r&&r.scrollIntoView({behavior:"smooth"})})})}else if("scrollsmoother"==l&&("1"!=r||("1"==r&&window.matchMedia("(pointer:fine)").matches))){let g=e.getAttribute("data-duration"),p=e.getAttribute("data-smoothtouch"),A=e.getAttribute("data-ease"),m=e.getAttribute("data-touchsmooth"),_=""!=m&&0!=parseFloat(p)&&m,v=e.getAttribute("data-wrapperGSAP"),w=e.getAttribute("data-classes").split("bc11").filter(Boolean),$=e.getAttribute("data-speeds").split("bc11").filter(Boolean),y=e.getAttribute("data-lags").split("bc11").filter(Boolean);w.forEach(function(t,e){var i=document.querySelectorAll("."+t);i.forEach(function(el){var r=$[e],o=y[e];"unset"!=r&&el.setAttribute("data-speed",r),"unset"!=o&&el.setAttribute("data-lag",o)})}),ScrollSmoother.create({content:v,smooth:g,smoothTouch:_,ease:A,ignoreMobileResize:!0,effects:!0})}}}} 12document.addEventListener("DOMContentLoaded",function(t){bricksIsFrontend&&smoothscroll()})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.