1(function(){if(window.SharedVideoPlayer&&typeof window.SharedVideoPlayer.bind=="function")return;function fmtTime(sec){var s=Math.max(0,Math.floor(Number(sec)||0)),h=Math.floor(s/3600),m=Math.floor(s%3600/60),ss=s%60;return h>0?h+":"+String(m).padStart(2,"0")+":"+String(ss).padStart(2,"0"):m+":"+String(ss).padStart(2,"0")}function bind(opts){if(!opts)return null;var state={video:opts.video||null,root:opts.root||null,controls:opts.controls||null,overlayPlay:opts.overlayPlay||null,playBtn:opts.playBtn||null,progress:opts.progress||null,timeCurrent:opts.timeCurrent||null,timeDuration:opts.timeDuration||null,muteBtn:opts.muteBtn||null,expandBtn:opts.expandBtn||null,volumeWrap:opts.volumeWrap||null,volumePop:opts.volumePop||null,volumeSlider:opts.volumeSlider||null,useOverlay:opts.useOverlay!==!1,hideDelayDesktop:typeof opts.hideDelayDesktop=="number"?opts.hideDelayDesktop:1200,hideDelayMobile:typeof opts.hideDelayMobile=="number"?opts.hideDelayMobile:1200,hideDelayPausedDesktop:typeof opts.hideDelayPausedDesktop=="number"?opts.hideDelayPausedDesktop:500,isDesktop:typeof opts.isDesktop=="function"?opts.isDesktop:function(){return window.innerWidth>749},isFullscreen:typeof opts.isFullscreen=="function"?opts.isFullscreen:function(){return!1},onSyncInsets:typeof opts.onSyncInsets=="function"?opts.onSyncInsets:function(){},onExpand:typeof opts.onExpand=="function"?opts.onExpand:null,onVisibleChange:typeof opts.onVisibleChange=="function"?opts.onVisibleChange:null,onPoke:typeof opts.onPoke=="function"?opts.onPoke:null,shouldKeepVisible:typeof opts.shouldKeepVisible=="function"?opts.shouldKeepVisible:null,isActive:typeof opts.isActive=="function"?opts.isActive:null,hookSync:typeof opts.syncFn=="function"?opts.syncFn:null,hookSetVisible:typeof opts.setVisibleFn=="function"?opts.setVisibleFn:null,hookScheduleHide:typeof opts.scheduleHideFn=="function"?opts.scheduleHideFn:null,hookPoke:typeof opts.pokeFn=="function"?opts.pokeFn:null,hookTogglePlay:typeof opts.togglePlayFn=="function"?opts.togglePlayFn:null,hookOpenVolume:typeof opts.openVolumeFn=="function"?opts.openVolumeFn:null,hookCloseVolume:typeof opts.closeVolumeFn=="function"?opts.closeVolumeFn:null,hideTimer:null,hideHoldUntil:0,scrubbing:!1,unsubs:[]};function on(el,evt,fn,options){!el||!fn||(el.addEventListener(evt,fn,options),state.unsubs.push(function(){try{el.removeEventListener(evt,fn,options)}catch(_){}}))}function closeVolume(){if(state.hookCloseVolume){state.hookCloseVolume();return}state.volumePop&&(state.volumePop.classList.remove("is-open"),window.setTimeout(function(){state.volumePop&&!state.volumePop.classList.contains("is-open")&&(state.volumePop.hidden=!0)},720))}function openVolume(){if(state.hookOpenVolume){state.hookOpenVolume();return}state.volumePop&&(state.volumePop.hidden=!1,requestAnimationFrame(function(){requestAnimationFrame(function(){state.volumePop&&state.volumePop.classList.add("is-open")})}))}function setControlsVisible(visible){if(state.hookSetVisible){state.hookSetVisible(visible);return}state.controls&&(state.controls.hidden=!1,state.controls.classList.toggle("is-visible",!!visible),state.onVisibleChange&&state.onVisibleChange(!!visible,state))}function shouldKeepVisible(){if(state.isActive&&!state.isActive(state))return!1;if(state.shouldKeepVisible)return!!state.shouldKeepVisible(state);var v=state.video;return v?state.volumePop&&!state.volumePop.hidden?!0:state.isDesktop()?!1:v.paused||v.ended:!1}function scheduleHide(){if(state.hookScheduleHide){state.hookScheduleHide();return}state.hideTimer&&clearTimeout(state.hideTimer);var v=state.video;
1if(v){if(state.isActive&&!state.isActive(state)){setControlsVisible(!1);return}if(v.paused||v.ended){shouldKeepVisible()||(state.isDesktop()&&!state.isFullscreen()?state.hideTimer=setTimeout(function(){shouldKeepVisible()||setControlsVisible(!1)},state.hideDelayPausedDesktop):setControlsVisible(!1));return}var delay=state.isFullscreen()||state.isDesktop()?state.hideDelayDesktop:state.hideDelayMobile,now=Date.now();state.hideHoldUntil&&state.hideHoldUntil>now&&(delay=Math.max(delay,state.hideHoldUntil-now)),state.hideTimer=setTimeout(function(){shouldKeepVisible()||setControlsVisible(!1)},delay)}}function poke(){if(state.hookPoke){state.hookPoke();return}state.isActive&&!state.isActive(state)||(state.hideTimer&&(clearTimeout(state.hideTimer),state.hideTimer=null),setControlsVisible(!0),state.onPoke&&state.onPoke(state),scheduleHide())}function sync(){if(state.isActive&&!state.isActive(state)){state.reset();return}if(state.hookSync){state.hookSync();return}var video=state.video;if(video){var duration=Number.isFinite(video.duration)?video.duration:0,current=Number.isFinite(video.currentTime)?video.currentTime:0,playing=!video.paused&&!video.ended,pct=duration>0?current/duration*100:0;if(state.controls&&(state.controls.classList.toggle("is-overlay-primary",state.useOverlay&&!playing),state.controls.classList.toggle("is-playing",playing),state.controls.style.setProperty("--gm-vp-progress",String(Math.max(0,Math.min(100,pct)))),state.controls.style.setProperty("--gm-vp-volume",String(Math.round((video.muted?0:video.volume)*100))),state.controls.hidden=!1),state.progress&&!state.scrubbing&&(state.progress.value=String(pct)),state.timeCurrent&&(state.timeCurrent.textContent=fmtTime(current)),state.timeDuration&&(state.timeDuration.textContent=fmtTime(duration)),state.volumeSlider&&!state.scrubbing&&(state.volumeSlider.value=String(Math.round((video.muted?0:video.volume)*100))),state.playBtn&&state.playBtn.classList.toggle("is-playing",playing),state.overlayPlay)if(state.overlayPlay.classList.toggle("is-playing",playing),state.useOverlay){var show=!playing;state.overlayPlay.hidden=!1,state.overlayPlay.classList.toggle("is-visible",show),state.overlayPlay.classList.toggle("is-hidden",!show)}else state.overlayPlay.hidden=!0,state.overlayPlay.classList.remove("is-visible"),state.overlayPlay.classList.add("is-hidden");state.muteBtn&&(state.muteBtn.classList.toggle("is-muted",video.muted||video.volume===0),state.muteBtn.setAttribute("aria-label",video.muted||video.volume===0?"Unmute video":"Mute video")),!playing&&shouldKeepVisible()&&setControlsVisible(!0),state.onSyncInsets(state)}}function togglePlay(){if(state.hookTogglePlay){state.hookTogglePlay();return}var video=state.video;video&&(video.paused?video.play().catch(function(){}):video.pause())}return state.root&&on(state.root,"click",function(event){event.target.closest("[data-gm-vp-controls], [data-gm-vp-overlay-play], [data-ehmr-modal-video-controls], [data-ehmr-modal-video-overlay-play]")||togglePlay()}),on(state.overlayPlay,"click",function(e){e.preventDefault(),e.stopPropagation(),state.isDesktop()&&(state.hideHoldUntil=Date.now()+500),togglePlay(),poke()}),on(state.playBtn,"click",function(e){e.preventDefault(),e.stopPropagation(),state.isDesktop()&&(state.hideHoldUntil=Date.now()+500),togglePlay(),poke()}),on(state.expandBtn,"click",function(e){e.preventDefault(),e.stopPropagation(),state.onExpand&&state.onExpand(state)}),on(state.muteBtn,"click",function(e){e.preventDefault(),e.stopPropagation(),poke(),state.volumePop?state.volumePop.hidden||!state.volumePop.classList.contains("is-open")?openVolume():closeVolume():state.video&&(state.video.muted=!state.video.muted),sync()}),on(state.volumePop,"click",function(e){e.stopPropagation()}),state.progress&&(on(state.progress,"pointerdown",function(){state.scrubbing=!0}),on(state.progress,"pointerup",function(){state.scrubbing=!1}),on(state.progress,"change",function(){state.scrubbing=!1}),on(state.progress,"input",function(e){e.stopPropagation();var video=state.video;
1if(video){var duration=Number.isFinite(video.duration)?video.duration:0,pct=Math.max(0,Math.min(100,parseFloat(state.progress.value||"0")));duration>0&&(video.currentTime=pct/100*duration),sync()}})),state.volumeSlider&&on(state.volumeSlider,"input",function(e){e.stopPropagation();var video=state.video;if(video){var pct=Math.max(0,Math.min(100,parseFloat(state.volumeSlider.value||"100")));video.volume=pct/100,video.muted=pct===0,sync()}}),state.video&&["play","pause","timeupdate","loadedmetadata","durationchange","volumechange","ended","seeking","seeked"].forEach(function(evt){on(state.video,evt,function(){sync(),evt==="play"&&scheduleHide()})}),state.sync=sync,state.poke=poke,state.setVisible=setControlsVisible,state.scheduleHide=scheduleHide,state.reset=function(){state.hideTimer&&(clearTimeout(state.hideTimer),state.hideTimer=null),state.controls&&(state.controls.hidden=!0,state.controls.classList.remove("is-visible","is-playing","is-overlay-primary"),state.controls.style.removeProperty("--gm-vp-progress"),state.controls.style.removeProperty("--gm-vp-volume")),state.overlayPlay&&(state.overlayPlay.hidden=!0,state.overlayPlay.classList.remove("is-visible","is-hidden","is-playing")),state.volumePop&&(state.volumePop.classList.remove("is-open"),state.volumePop.hidden=!0)},state.destroy=function(){state.reset(),state.unsubs.forEach(function(fn){try{fn()}catch(_){}}),state.unsubs=[]},state.state=state,state}window.SharedVideoPlayer={bind:bind},window.GMSharedVideoPlayer=window.GMSharedVideoPlayer||window.SharedVideoPlayer})(); 2//# sourceMappingURL=/cdn/shop/t/2/assets/shared-video-player.js.map?v=145143480142495839771773385003
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.