1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4474],{64474:(e,l,n)=>{n.r(l),n.d(l,{default:()=>d});var t=n(37876),r=n(14232),a=n(98477),c=n(49995),u=n(81809),s=n(992),i=n(90715),o=n.n(i);let d=e=>{let{images:l,index:n,onClose:i,onNext:d,onPrev:f}=e,v=(0,r.useRef)(null),h=(0,r.useRef)(null),m=(0,r.useRef)(null),b=(0,r.useRef)({}),g=l[n],x=l.length>1;if((0,r.useEffect)(()=>{let e=e=>{if("Escape"===e.key)return void i();if("ArrowRight"===e.key&&x)return void d();if("ArrowLeft"===e.key&&x)return void f();if("Tab"===e.key){var l;let n=null==(l=v.current)?void 0:l.querySelectorAll('button, a[href], [tabindex]:not([tabindex="-1"])');if(!(null==n?void 0:n.length))return;let t=n[0],r=n[n.length-1];e.shiftKey&&document.activeElement===t?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),t.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i,d,f,x]),(0,r.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]),(0,r.useEffect)(()=>{var e;let l=document.activeElement;return null==(e=h.current)||e.focus(),()=>{var e;null==l||null==(e=l.focus)||e.call(l)}},[]),(0,r.useEffect)(()=>{x&&[(n+1)%l.length,(n-1+l.length)%l.length].forEach(e=>{var n;let t=null==(n=l[e])?void 0:n.src;if(t&&!b.current[t]){let e=new Image;e.src=t,b.current[t]=e}})},[n,l,x]),"undefined"==typeof document||!g)return null;let y=!!g.credit,p=!!g.caption,j=null;y&&(j=g.creditUrl?(0,t.jsx)("a",{href:g.creditUrl,children:g.credit}):(0,t.jsx)("span",{children:g.credit}));let N=(0,t.jsxs)("div",{ref:v,className:o().overlay,role:"dialog","aria-modal":"true","aria-label":g.alt?"Enlarged image: ".concat(g.alt):"Enlarged image",onTouchStart:e=>{var l,n;m.current=null!=(n=null==(l=e.changedTouches[0])?void 0:l.clientX)?n:null},onTouchEnd:e=>{var l,n;if(null===m.current||!x)return;let t=(null!=(n=null==(l=e.changedTouches[0])?void 0:l.clientX)?n:m.current)-m.current;t>50?f():t<-50&&d(),m.current=null},children:[(0,t.jsx)("button",{type:"button",className:o().scrim,"aria-label":"Close",onClick:i,tabIndex:-1}),(0,t.jsx)("button",{ref:h,type:"button",className:o().close,onClick:i,"aria-label":"Close",children:(0,t.jsx)(u.A,{"aria-hidden":"true",className:o().closeIcon})}),x?(0,t.jsx)("button",{type:"button",className:(0,c.A)(o().nav,o().navPrev),onClick:f,"aria-label":"Previous image",children:(0,t.jsx)(s.A,{"aria-hidden":"true",className:o().navIcon})}):null,(0,t.jsxs)("figure",{className:o().figure,children:[(0,t.jsx)("img",{className:o().image,src:g.src,alt:g.alt}),p||y?(0,t.jsxs)("figcaption",{className:o().caption,children:[p?(0,t.jsx)("span",{children:g.caption}):null,p&&y?(0,t.jsx)("span",{className:o().divider}):null,j]}):null]}),x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:(0,c.A)(o().nav,o().navNext),onClick:d,"aria-label":"Next image",children:(0,t.jsx)(s.A,{"aria-hidden":"true",className:o().navIcon})}),(0,t.jsx)("p",{className:o().counter,"aria-live":"polite",children:"".concat(n+1," / ").concat(l.length)})]}):null]});return(0,a.createPortal)(N,document.body)}}}]);
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.