PageSourceSearch

https://gameghost.manus.space/assets/DjBatp4n.js

js gameghost.manus.space collected 2026-10-03 05:01:52 UTC 3,721 bytes, 1 lines download raw bytes

1import{r as e,j as t,aj as r,ak as s}from"./OALAxu8_.js";const n=({isOpen:n,onClose:a,gameUrl:o,gameTitle:i,requiresWebGPU:l=!1,onMultiplayerRequest:c,onSafeAdBreakRequest:d})=>{const u=e.useRef(null),m=e.useRef(null),[f,p]=e.useState(1),[b,w]=e.useState(window.innerWidth),[h,x]=e.useState(window.innerHeight),g=o.includes("archive.org/embed");e.useEffect(()=>{if(!n)return;const e=setTimeout(()=>{u.current&&(u.current.focus(),u.current.click())},300);return()=>clearTimeout(e)},[n,o]),e.useEffect(()=>{if(!n||!c)return;const e=e=>{"vibeHockeyMultiplayer"===e.data?.type&&c(e.data.mpUrl,e.data.roomCode)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[n,c]),e.useEffect(()=>{if(!n||!d)return;const e=new Set(["levelComplete","gameOver","returnToLobby","explicitPause"]),t=async t=>{if(t.source!==u.current?.contentWindow)return;if("gameghost:ad-break"!==t.data?.type||1!==t.data?.version)return;const r=t.data?.placement,s=t.data?.requestId;if("string"!=typeof s||!e.has(r))return;const n=await d(r);u.current?.contentWindow?.postMessage({type:"gameghost:ad-break-result",requestId:s,shown:n.shown,reason:n.reason},"*")};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[n,d]);const v=e.useCallback(()=>{if(!g)return;const e=window.innerWidth,t=window.innerHeight;w(e),x(t);const r=e/640,s=t/480;p(Math.max(r,s))},[g]);return e.useEffect(()=>{if(n&&g)return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[n,g,v]),n?t.jsxs("div",{ref:m,className:"fixed inset-0 z-50 bg-black flex flex-col items-center justify-center overflow-hidden",children:[t.jsxs("div",{className:"absolute top-0 left-0 right-0 z-50 flex items-center justify-between px-4 py-2 bg-gradient-to-b from-black/90 to-transparent pointer-events-none",children:[t.jsx("span",{className:"text-white/80 font-semibold text-sm tracking-widest uppercase pointer-events-none select-none",children:i}),t.jsx("button",{onClick:a,className:"pointer-events-auto p-2 bg-black/60 hover:bg-black/90 border border-white/10 hover:border-white/30 rounded-lg transition-all duration-200 text-white/70 hover:text-white","aria-label":"Close game",children:t.jsx(r,{size:20})})]}),l&&t.jsxs("div",{className:"absolute top-12 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2.5 bg-black/80 border border-amber-500/40 text-amber-300/90 text-xs px-4 py-2 rounded-full backdrop-blur-sm whitespace-nowrap",children:[t.jsx(s,{size:13,className:"flex-shrink-0 text-amber-400"}),t.jsxs("span",{children:[t.jsx("strong",{className:"text-amber-400",children:"WebGPU required"})," — use Chrome, Edge, or Brave for best experience"]})]}),g?t.jsx("div",{style:{width:b,height:h,overflow:"hidden",position:"relative"},children:t.jsx("iframe",{ref:u,src:o,tabIndex:0,onLoad:()=>{u.current?.focus()},style:{width:640,height:480,border:"none",transformOrigin:"top left",transform:`scale(${f})`,marginLeft:(b-640*f)/2,marginTop:(h-480*f)/2,display:"block"},allow:"fullscreen *; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; storage-access; pointer-lock",allowFullScreen:!0,title:i,credentialless:"true"})}):t.jsx("iframe",{ref:u,src:o,tabIndex:0,onLoad:()=>{u.current?.focus()},className:"w-full h-full border-0",allow:"fullscreen *; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; storage-access; pointer-lock",allowFullScreen:!0,title:i}),t.jsx("div",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 z-50 text-white/40 text-xs pointer-events-none select-none",children:"Press ESC or click × to close"})]}):null};export{n as FullscreenGameLauncher};

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.