1customElements.get("media-gallery")||customElements.define("media-gallery",class extends HTMLElement{constructor(){super(),this.elements={liveRegion:this.querySelector('[id^="GalleryStatus"]'),viewer:this.querySelector('[id^="GalleryViewer"]')},this.mql=window.matchMedia("(min-width: 990px)"),this.elements.viewer.addEventListener("slideChanged",debounce(this.onSlideChanged.bind(this),500))}onSlideChanged(event){}setActiveMedia(mediaId,prepend){const activeMedia=this.elements.viewer.querySelector(`[data-media-id="${mediaId}"]`);if(this.elements.viewer.querySelectorAll("[data-media-id]").forEach(element=>{element.classList.remove("is-active")}),activeMedia.classList.add("is-active"),this.elements.thumbnails){const mediaIdSplit=mediaId.split("-"),mediaIdbase=mediaIdSplit[mediaIdSplit.length-1];if(activeMedia.querySelector("template")&&activeMedia.querySelector("template").content.querySelector("video")){const video=this.elements.thumbnails.querySelector(`video[media-id="${mediaIdbase}"]`);video&&video.pause()}this.elements.thumbnails.querySelectorAll("video").forEach(video=>{video.paused&&video.getAttribute("media-id")!==mediaIdbase&&video.play()})}prepend&&(activeMedia.parentElement.prepend(activeMedia),this.elements.viewer.slider&&this.elements.viewer.resetPages()),this.preventStickyHeader(),window.setTimeout(()=>{this.elements.viewer.querySelector(".slider").scrollTo({left:0})}),this.playActiveMedia(activeMedia)}playActiveMedia(activeItem){window.pauseAllMedia();const deferredMedia=activeItem.querySelector(".deferred-media");deferredMedia&&deferredMedia.loadContent(!1)}preventStickyHeader(){this.stickyHeader=this.stickyHeader||document.querySelector("sticky-header"),this.stickyHeader&&this.stickyHeader.dispatchEvent(new Event("preventHeaderReveal"))}removeListSemantic(){this.elements.viewer.slider&&(this.elements.viewer.slider.setAttribute("role","presentation"),this.elements.viewer.sliderItems.forEach(sli
1de=>slide.setAttribute("role","presentation")))}}); 2//# sourceMappingURL=/cdn/shop/t/60/assets/media-gallery.js.map?v=163836258128809510961711617432
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.