1class ResponsiveImage extends HTMLElement{get intersecting(){return this.hasAttribute("intersecting")}constructor(){super(),this.img=this.querySelector("img"),this.observerCallback=this.observerCallback.bind(this),this.loadImage=this.loadImage.bind(this),this.img.onload=this.onLoad.bind(this),this.img.complete&&(this.removeAttribute("data-image-loading"),this.img.classList.add("f-img-loaded"))}connectedCallback(){"IntersectionObserver"in window?this.initIntersectionObserver():this.loadImage()}disconnectedCallback(){this.disconnectObserver()}loadImage(){this.setAttribute("intersecting","true"),this.img.width=this.clientWidth,this.img.height=this.clientHeight,this.img.sizes=this.clientWidth+"px"}onLoad(){this.removeAttribute("data-image-loading"),this.img.classList.add("f-img-loaded")}observerCallback(entries,observer){entries[0].isIntersecting&&(observer.unobserve(this),this.loadImage())}initIntersectionObserver(){if(this.observer)return;const rootMargin="10px";this.observer=new IntersectionObserver(this.observerCallback,{rootMargin}),this.observer.observe(this)}disconnectObserver(){this.observer&&(this.observer.disconnect(),this.observer=null,delete this.observer)}}customElements.define("responsive-image",ResponsiveImage); 2//# sourceMappingURL=/cdn/shop/t/6/assets/lazy-image.js.map?v=68169924899378488731728630638
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.