1class MulticolumnVideoItem extends HTMLElement{constructor(){super(),this.video=null,this.playButton=null,this.isPreviewPlaying=!1,this.previewTimeout=null,this.previewDuration=parseInt(this.dataset.previewDuration)||1500}connectedCallback(){this.init()}disconnectedCallback(){this.cleanup()}init(){this.video=this.querySelector("video"),this.playButton=this.querySelector(".video-play-button"),!(!this.video||!this.playButton)&&(this.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),this.addEventListener("mouseleave",this.handleMouseLeave.bind(this)),this.playButton.addEventListener("click",this.handlePlayButtonClick.bind(this)),this.video.addEventListener("pause",this.handleVideoPause.bind(this)),this.video.addEventListener("play",this.handleVideoPlay.bind(this)),this.video.addEventListener("ended",this.handleVideoEnded.bind(this)))}handleMouseEnter(){this.classList.contains("playing")||(this.isPreviewPlaying=!0,this.video.currentTime=0,this.video.play(),this.classList.add("previewing"),this.previewTimeout=setTimeout(()=>{this.isPreviewPlaying&&!this.classList.contains("playing")&&(this.video.pause(),this.video.currentTime=0,this.classList.remove("previewing"),this.isPreviewPlaying=!1)},this.previewDuration))}handleMouseLeave(){this.isPreviewPlaying&&!this.classList.contains("playing")&&(clearTimeout(this.previewTimeout),this.video.pause(),this.video.currentTime=0,this.classList.remove("previewing"),this.isPreviewPlaying=!1)}handlePlayButtonClick(e){e.stopPropagation(),this.clearPreviewState(),this.video.paused?(this.video.play(),this.classList.add("playing")):(this.video.pause(),this.classList.remove("playing"))}handleVideoPause(){this.isPreviewPlaying||this.classList.remove("playing")}handleVideoPlay(){this.isPreviewPlaying||this.classList.add("playing")}handleVideoEnded(){this.isPreviewPlaying&&this.clearPreviewState()}clearPreviewState(){clearTimeout(this.previewTimeout),this.isPreviewPlaying=!1,this.classList.remove("previewing")}cleanup(){this.video&&this.playButton&&(this.removeEventListener("mouseenter",this.handleMouseEnter),this.removeEventListener("mouseleave",this.handleMouseLeave),this.playButton.removeEventListener("click",this.handlePlayButtonClick),this.video.removeEventListener("pause",this.handleVideoPause),this.video.removeEventListener("play",this.handleVideoPlay),this.video.removeEventListener("ended",this.handleVideoEnded),this.clearPreviewState())}}customElements.get("multicolumn-video-item")||customElements.define("multicolumn-video-item",MulticolumnVideoItem); 2//# sourceMappingURL=/cdn/shop/t/6/assets/section-multicolumn.js.map?v=60533381305077697591775341990
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.