PageSourceSearch

https://kentarokuribayashi.com/_next/static/chunks/pages/photo/[slug]-a0a9e523f8d4b3b3.js

js kentarokuribayashi.com collected 2026-10-02 05:00:34 UTC 7,153 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[684],{1436:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSG:()=>m,default:()=>g});var n=s(7876),a=s(8230),i=s.n(a),l=s(4050),r=s(625),c=s(4232);let o=(0,s(8106).v)((e,t)=>({isOpen:!1,currentIndex:0,images:[],open:(t,s)=>e({isOpen:!0,images:t,currentIndex:s}),close:()=>e({isOpen:!1}),reset:()=>e({isOpen:!1,currentIndex:0,images:[]}),next:()=>{let{currentIndex:s,images:n}=t();s<n.length-1&&e({currentIndex:s+1})},prev:()=>{let{currentIndex:s}=t();s>0&&e({currentIndex:s-1})},goTo:s=>{let{images:n}=t();s>=0&&s<n.length&&e({currentIndex:s})}}));function d(e){let{src:t,alt:s,onClick:a}=e;return(0,n.jsx)("button",{type:"button",className:"relative aspect-square overflow-hidden rounded-lg cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 hover:opacity-90 active:scale-[0.98] transition-all duration-200 bg-gray-200",onClick:a,children:(0,n.jsx)("img",{src:t,alt:s,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})})}function h(e){let{images:t}=e,{open:s,isOpen:a}=o(),[i,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=Math.min(8,t.length);for(let s=0;s<e;s++)new Image().src=t[s]},[t]);let r=e=>{l(!0),setTimeout(()=>{s(t,e),l(!1)},50)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2 md:gap-4",children:t.map((e,t)=>(0,n.jsx)(d,{src:e,alt:"Photo ".concat(t+1),onClick:()=>r(t)},e))}),i&&!a&&(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/95",children:(0,n.jsx)("div",{className:"w-10 h-10 border-4 border-white/30 border-t-white rounded-full animate-spin"})})]})}var u=s(8615);function p(){let{isOpen:e,currentIndex:t,images:s,close:a,next:i,prev:l}=o(),[r,d]=(0,c.useState)(null),[h,p]=(0,c.useState)(null),[x,m]=(0,c.useState)(!0),g=(0,c.useRef)(null);(0,c.useEffect)(()=>{e&&m(!0)},[e,t]),(0,c.useEffect)(()=>{if(!e||0===s.length)return;let n=e=>{new Image().src=e};t>0&&n(s[t-1]),t<s.length-1&&n(s[t+1]),t>1&&n(s[t-2]),t<s.length-2&&n(s[t+2])},[e,t,s]);let f=(0,c.useCallback)(t=>{if(e)switch(t.key){case"Escape":a();break;case"ArrowLeft":l();break;case"ArrowRight":i()}},[e,a,l,i]);if((0,c.useEffect)(()=>(window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)),[f]),(0,c.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;let j=s[t],v=t>0,b=t<s.length-1;return(0,n.jsxs)("div",{ref:g,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/95",onClick:e=>{e.target===g.current&&a()},onTouchStart:e=>{p(null),d(e.targetTouches[0].clientX)},onTouchMove:e=>{p(e.targetTouches[0].clientX)},onTouchEnd:()=>{if(!r||!h)return;let e=r-h;e>50?i():e<-50&&l()},children:[(0,n.jsx)("button",{type:"button",onClick:a,className:"absolute top-4 right-4 z-10 p-2 text-white/80 hover:text-white transition-colors rounded-full hover:bg-white/10","aria-label":"閉じる",children:(0,n.jsx)(u.yGN,{size:28})}),(0,n.jsxs)("div",{className:"absolute top-4 left-4 z-10 text-white/80 text-sm font-medium",children:[t+1," / ",s.length]}),v&&(0,n.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),l()},className:"absolute left-2 md:left-4 z-10 p-2 md:p-3 text-white/80 hover:text-white transition-colors rounded-full hover:bg-white/10","aria-label":"前の写真",children:(0,n.jsx)(u.irw,{size:32})}),b&&(0,n.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),i()},className:"absolute right-2 md:right-4 z-10 p-2 md:p-3 text-white/80 hover:text-white transition-colors rounded-full hover:bg-white/10","aria-label":"次の写真",children:(0,n.jsx)(u.fOo,{size:32})}),x&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,n.jsx)("div",{className:"w-10 h-10 border-4 border-white/30 border-t-white rounded-full animate-spin"})}),(0,n.jsx)("img",{src:j,alt:"Photo ".concat(t+1),className:"max-w-[90vw] max-h-[85vh] object-contain select-none transition-opacity duration-150 ".concat(x?"opacity-0":"opacity-100"),draggable:!1,onLoad:()=>{m(!1)}})]})}function x(e){if(!e)return"";let t=new Date(e);if(Number.isNaN(t.getTime())){let t=e.match(/(\d{4})年(\d{1,2})月(\d{1,2})日/);return t?"".concat(t[1],".").concat(t[2].padStart(2,"0"),".").concat(t[3].padStart(2,"0")):e}return"".concat(t.getFullYear(),".").concat(String(t.getMonth()+1).padStart(2,"0"),".").concat(String(t.getDate()).padStart(2,"0"))}var m=!0;function g(e){let{gallery:t,prev:s,next:a}=e,c=t.images[0];return t.images.slice(1),(0,n.jsxs)(l.A,{activeNav:"photo",children:[(0,n.jsx)(r.A,{title:t.title,de
1scription:t.description||"写真: ".concat(t.title),ogImage:c}),(0,n.jsx)("section",{className:"sub-hero",children:(0,n.jsxs)("div",{className:"wrap",children:[(0,n.jsxs)("div",{className:"crumb",children:[(0,n.jsx)(i(),{href:"/",children:"ホーム"}),(0,n.jsx)("span",{className:"sep",children:"/"}),(0,n.jsx)(i(),{href:"/photo",children:"写真"}),(0,n.jsx)("span",{className:"sep",children:"/"}),(0,n.jsx)("span",{children:t.title})]}),(0,n.jsxs)("div",{className:"sub-hero-grid",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"giga",style:{fontSize:"clamp(48px, 7vw, 96px)"},children:t.title}),t.description&&(0,n.jsx)("p",{className:"lede-en",style:{maxWidth:"48ch",color:"var(--ink-soft)"},children:t.description})]}),(0,n.jsxs)("div",{className:"meta-block",children:[(0,n.jsx)("b",{children:t.images.length}),(0,n.jsx)("em",{children:"photos"}),t.date&&(0,n.jsx)("span",{style:{display:"block",marginTop:"10px"},children:x(t.date)})]})]})]})}),(0,n.jsxs)("section",{className:"wrap",style:{paddingTop:"48px",paddingBottom:"24px"},children:[c&&(0,n.jsx)("div",{className:"photo-hero",style:{marginBottom:"14px"},children:(0,n.jsx)("img",{src:c,alt:t.title})}),(0,n.jsxs)("div",{className:"photo-caption-bar",children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"nr",children:"001"}),(0,n.jsx)("span",{style:{margin:"0 12px",color:"var(--accent)"},children:"\xb7"}),t.title]}),(0,n.jsxs)("span",{children:[x(t.date),(0,n.jsx)("span",{style:{margin:"0 12px",color:"var(--accent)"},children:"\xb7"}),t.images.length," photos"]})]})]}),(0,n.jsx)("section",{className:"wrap",style:{paddingTop:0,paddingBottom:"48px"},children:(0,n.jsx)(h,{images:t.images})}),(0,n.jsx)(p,{}),(s||a)&&(0,n.jsx)("section",{className:"wrap",style:{paddingTop:"24px",paddingBottom:"96px"},children:(0,n.jsxs)("div",{className:"article-nav",children:[s?(0,n.jsxs)(i(),{href:"/photo/".concat(s.slug),children:[(0,n.jsx)("div",{className:"l",children:"← 前のシリーズ"}),(0,n.jsx)("div",{className:"t",children:s.title})]}):(0,n.jsx)("span",{}),a?(0,n.jsxs)(i(),{href:"/photo/".concat(a.slug),className:"next",children:[(0,n.jsx)("div",{className:"l",children:"次のシリーズ →"}),(0,n.jsx)("div",{className:"t",children:a.title})]}):(0,n.jsx)("span",{})]})})]})}},7500:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/photo/[slug]",function(){return s(1436)}])}},e=>{var t=t=>e(e.s=t);e.O(0,[141,873,34,636,593,792],()=>t(7500)),_N_E=e.O()}]);

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.