1import{a as e,r as t}from"./utils-KNdIxHLD.js";import{r as n}from"./useRouter-cqa85HvV.js";import{R as r}from"./index-AsIGSPc5.js";import{t as i}from"./PhotoImg-WYEnfK3t.js";import{t as a}from"./Reveal-yNIQxvKu.js";var o=e(n(),1),s=t();function c({photos:e,columns:t=5}){let[n,c]=(0,o.useState)(null);return(0,o.useEffect)(()=>{if(n===null)return;let t=t=>{t.key===`Escape`&&c(null),t.key===`ArrowRight`&&c(t=>((t??0)+1)%e.length),t.key===`ArrowLeft`&&c(t=>((t??0)-1+e.length)%e.length)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[n,e.length]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{className:t===4?`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4`:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,children:e.map((e,t)=>(0,s.jsx)(a,{delay:t*50,children:(0,s.jsx)(`button`,{type:`button`,onClick:()=>c(t),className:`group block w-full overflow-hidden rounded-xl focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary`,children:(0,s.jsx)(i,{src:e.src,alt:e.alt,sizes:`(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw`,className:`aspect-square w-full object-cover transition-transform duration-500 group-hover:scale-105`})})},e.src))}),n===null?null:(0,s.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Job photo`,className:`fixed inset-0 z-100 flex items-center justify-center bg-charcoal/90 p-4`,onClick:()=>c(null),children:[(0,s.jsx)(`button`,{type:`button`,"aria-label":`Close photo`,className:`absolute right-5 top-5 rounded-full bg-white/10 p-2 text-white hover:bg-white/20`,onClick:()=>c(null),children:(0,s.jsx)(r,{className:`size-6`})}),(0,s.jsxs)(`figure`,{onClick:e=>e.stopPropagation(),className:`max-w-4xl`,children:[(0,s.jsx)(i,{src:e[n].src,alt:e[n].alt,sizes:`(min-width: 1024px) 900px, 100vw`,className:`max-h-[80vh] w-full rounded-xl object-contain`}),(0,s.jsx)(`figcaption`,{className:`mt-3 text-center text-sm text-white/80`,children:e[n].alt})]})]})]})}export{c as t};
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.