1import{r as h,j as e}from"./react-vendor-B48pO6_4.js";import{an as g,aM as f,at as j,aq as N,ck as y}from"./index-CcmfrZrt.js";import w from"./LightboxGallery-BwWjhHkO.js";import{V as v}from"./VideoLiteEmbed-Bawm6WWS.js";import{p}from"./videoEmbed-BdWwMuHe.js";import"./supabase-D6JeZC_L.js";import"./proxy-CvOX2UCJ.js";const u=h.memo(({url:n,title:i="Game trailer",className:r=""})=>{const t=p(n);return t?e.jsx(v,{provider:t.provider,videoId:t.id,hash:t.hash,kicker:"Trailer",title:i,className:r}):null});u.displayName="TrailerEmbed";const $=({activeTab:n,lightboxIndex:i,setLightboxIndex:r,sortedGameImages:t,trailerUrl:o,gameTitle:c})=>{const d=t||[],a=d.length,b=h.useCallback(s=>{r(s)},[r]);if(n!=="screenshots")return null;const m=!!p(o);return a===0&&!m?e.jsxs("div",{className:"text-center py-16",children:[e.jsx(g,{className:"w-8 h-8 mx-auto mb-3 text-gray-600"}),e.jsx("h3",{className:"text-sm font-semibold text-gray-300 mb-1",children:"No screenshots"}),e.jsx("p",{className:"text-xs text-gray-500",children:"No screenshots have been added for this game yet."})]}):e.jsxs("div",{children:[e.jsxs("header",{className:"flex items-center justify-between gap-3 pb-3 mb-5 border-b border-white/[0.08]",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-lg sm:text-xl font-bold text-white tracking-tight",children:[e.jsx(f,{className:"w-[18px] h-[18px] text-cyan-400","aria-hidden":"true"}),"Gallery"]}),a>0&&e.jsxs("span",{className:"text-[11px] text-gray-500 tabular-nums",children:[a.toLocaleString()," screenshot",a!==1?"s":""]})]}),m&&e.jsx("div",{className:"mb-5 max-w-3xl",children:e.jsx(u,{url:o,title:c?`${c} trailer`:"Game trailer"})}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map((s,l)=>{const x=s.is_nsfw;return e.jsxs("figure",{className:"space-y-1.5",children:[e.jsxs("button",{type:"button",onClick:()=>b(l),className:"group relative block w-full aspect-video rounded-xl overflow-hidden bg-dark-400 border border-white/[0.06] hover:border-white/15 transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-white/20","aria-label":x?`Open NSFW screenshot ${l+1} in viewer`:`Open screenshot ${l+1} of ${a}`,children:[x?e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-dark-400/95 select-none z-10",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-white/[0.04] border border-white/[0.08] flex items-center justify-center",children:e.jsx(j,{className:"w-4 h-4 text-red-400","aria-hidden":"true"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-[0.14em] font-semibold text-red-400 mb-0.5",children:"NSFW"}),e.jsxs("p",{className:"text-[10px] text-gray-500 flex items-center gap-1 justify-center",children:[e.jsx(N,{className:"w-3 h-3","aria-hidden":"true"}),"Tap to view"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:s.image_url,alt:s.caption||"",loading:"lazy",decoding:"async",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/25 transition-colors duration-150"}),e.jsx(y,{className:"absolute top-2 right-2 w-4 h-4 text-white/85 opacity-0 group-hover:opacity-100 transition-opacity duration-150","aria-hidden":"true"})]}),e.jsx("span",{className:"absolute bottom-2 left-2 text-[10px] font-medium text-white/85 tabular-nums px-1.5 py-0.5 rounded bg-black/60 leading-none",children:l+1})]}),s.caption&&e.jsx("figcaption",{className:"px-0.5 text-xs text-gray-400 leading-snug line-clamp-2",children:s.caption})]},s.id)})}),i!==null&&e.jsx(w,{images:t,initialIndex:i,onClose:()=>r(null)})]})};export{$ as default};
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.