1function e(){return{elements:[],sections:[],stickyContainer:null,oldPinned:null,offsetTop:0,prevLocation:-100,isMobile:!1,setOffsetTop(){this.offsetTop=window.innerHeight/2},setImage(){if(this.elements.length>0&&this.sections.length>0){let s=window.scrollY;var e=this.visibleSection(this.sections,this.offsetTop);if(e){var t=this.sections[e].dataset.index??0;let i=this.elements[t];if(null==this.oldPinned||null==i.querySelector("img")||i.querySelector("img").src!=this.oldPinned.querySelector("img").src){if(this.oldPinned){let e=this.prevLocation<s>0?"-15%":"15%";this.oldPinned.style.transform=`translateY(${e})`,this.oldPinned.classList.add("opacity-0")}i.classList.remove("opacity-0"),i.style.transform="translateY(0)",this.oldPinned=i}}else this.elements[0].classList.remove("opacity-0");this.prevLocation=s}},visibleSection(e,t){var s=[];for(let i=0;i<e.length;i++)e[i].getBoundingClientRect().top<=t&&s.push(i);return s.length>0?s.slice(-1):null},init(){this.elements=this.$el.querySelectorAll(".js--sticky-element"),this.sections=this.$el.querySelectorAll(".js--scroll-pinned"),this.stickyContainer=this.$el.querySelector(".js--sticky-container"),this.isMobile=this.$matchMediaQuery(),this.setOffsetTop()},wrapper:{"@scroll.window"(){this.setImage()},"@resize.window"(){this.isMobile=this.$matchMediaQuery(),this.setOffsetTop(),this.setImage()}}}}export{e as default};
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.