1function onIntersection(elements,observer){elements.forEach((element,index)=>{if(element.isIntersecting){const elementTarget=element.target;elementTarget.classList.contains(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME)&&(elementTarget.classList.remove(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME),elementTarget.hasAttribute("data-cascade")&&elementTarget.setAttribute("style",`--animation-order: ${index};`)),observer.unobserve(elementTarget)}else element.target.classList.add(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME),element.target.classList.remove(SCROLL_ANIMATION_CANCEL_CLASSNAME)})}function refreshScrollAnimationTrigger(newPostIds){const animationTriggerElements=Array.from(document.getElementsByClassName(SCROLL_ANIMATION_TRIGGER_CLASSNAME));if(animationTriggerElements.length===0)return;let newAnimationTriggerElements=[];newPostIds.forEach(id=>{animationTriggerElements.forEach(element=>{element.dataset.id==id&&newAnimationTriggerElements.push(element)})});const observer=new IntersectionObserver(onIntersection,{rootMargin:"0px 0px -50px 0px"});newAnimationTriggerElements.forEach(element=>observer.observe(element))}customElements.get("infinite-scroll")||customElements.define("infinite-scroll",class extends HTMLElement{constructor(){super()}handleEndReach(entries,observer){entries.forEach(async entry=>{if(entry.isIntersecting&&this.currPage<this.numPages){const path=window.location.href.split("?page=")[0]+"?page="+(this.currPage+1),responseText=await(await fetch(path,{headers:{"X-Requested-With":"XMLHttpRequest"}})).text(),newPostEles=new DOMParser().parseFromString(responseText,"text/html").querySelector("infinite-scroll").children,newPostIds=Array.from(newPostEles).map(newPost=>newPost.dataset.id);this.append(...newPostEles),refreshScrollAnimationTrigger(newPostIds),this.currPage=this.currPage+1}})}connectedCallback(){this.hasReachedStart=!1,Number(window.location.href.split("page=")[1])?this.currPage=Number(window.location.href.split("page=")[1]):this.currPage=1,this.numPages=this.dataset.numPages,this.bottomObserver=new IntersectionObserver(this.handleEndReach.bind(this),{rootMargin:"0% 0% 0% 0%",threshold:0}),this.bottomObserver.observe(document.querySelector("footer"))}disconnectedCallback(){this.bottomObserver.disconnect()}}); 2//# sourceMappingURL=/cdn/shop/t/574/assets/component-infinite-scroll.js.map?v=19782028286769138431790802688
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.