1const VIDEO_REPLAY_DELAY_MS=2e3;const IOS_WEB_ALLOWED_PATHS=new Set(["/about","/contact","/privacy","/terms","/delete-account"]);export function iosWebPageAllowed(pathname="/"){let path=String(pathname||"/");try{path=decodeURIComponent(path)}catch{}path=path.replace(/\/+$/,"")||"/";return IOS_WEB_ALLOWED_PATHS.has(path)||path==="/admin"||path.startsWith("/admin/")}export function iosAppLandingRequested({search="",pathname="/",userAgent="",platform="",maxTouchPoints=0,isFullDemoHandoff=false}={}){const params=new URLSearchParams(search);const override=params.get("appLanding");if(override==="0")return false;if(override==="1")return true;if(isFullDemoHandoff)return false;if(iosWebPageAllowed(pathname))return false;const iosDevice=/iPhone|iPad|iPod/i.test(userAgent);const ipadDesktopMode=(platform==="MacIntel"||/Macintosh/i.test(userAgent))&&Number(maxTouchPoints)>1;const androidPhone=/Android/i.test(userAgent)&&/Mobile/i.test(userAgent);return iosDevice||ipadDesktopMode||androidPhone}function resolvedPromise(){return Promise.resolve()}export function installIosAppLanding({documentRef=document,windowRef=window}={}){const landing=documentRef.getElementById("ios-app-landing");const video=landing?.querySelector("[data-ios-app-landing-video]");if(!landing||!video){documentRef.documentElement.classList.remove("is-ios-app-landing");return{dismissed:resolvedPromise(),dismiss(){}}}let replayTimer=0;let settled=false;let resolveDismissed;const dismissed=new Promise(resolve=>{resolveDismissed=resolve});video.muted=true;video.defaultMuted=true;video.playsInline=true;video.controls=false;video.loop=false;video.autoplay=false;const showBlack=()=>landing.classList.remove("is-video-active");const clearReplayTimer=()=>{if(!replayTimer)return;windowRef.clearTimeout(replayTimer);replayTimer=0};const playVideo=async()=>{replayTimer=0;if(settled||documentRef.visibilityState==="hidden")return;try{video.currentTime=0;await video.play();if(!settled)landing.classList.add("is-video-active")}catch{showBlack();scheduleVideo()}};function scheduleVideo(){clearReplayTimer();if(settled||documentRef.visibilityState==="hidden")return;replayTimer=windowRef.setTimeout(playVideo,VIDEO_REPLAY_DELAY_MS)}const handleEnded=()=>{showBlack();scheduleVideo()};const handleVisibilityChange=()=>{if(documentRef.visibilityState==="hidden"){clearReplayTimer();video.pause();showBlack();return}scheduleVideo()};const dismiss=()=>{if(settled)return;settled=true;clearReplayTimer();video.pause();video.removeEventListener("ended",handleEnded);documentRef.removeEventListener("visibilitychange",handleVisibilityChange);landing.setAttribute("aria-hidden","true");documentRef.documentElement.classList.remove("is-ios-app-landing");landing.remove();video.removeAttribute("src");video.load();resolveDismissed()};const videoSource=video.dataset.src;if(videoSource)video.src=videoSource;landing.setAttribute("aria-hidden","false");video.addEventListener("ended",handleEnded);documentRef.addEventListener("visibilitychange",handleVisibilityChange);scheduleVideo();return{dismissed,dismiss}}
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.