PageSourceSearch

https://etc-usc.vercel.app/_next/static/chunks/app/(site)/news/pag…?dpl=dpl_3x4enDwv5b2cbfP3jat51qCEfR5P

js etc-usc.vercel.app collected 2026-10-03 06:54:49 UTC 9,405 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8061],{61215:(e,t,s)=>{Promise.resolve().then(s.bind(s,80011))},78696:(e,t,s)=>{"use strict";s.d(t,{p:()=>l});var r=s(95155),a=s(5772);function l({src:e,alt:t,imageClassName:s="",sizes:o,priority:d}){return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.default,{src:e,alt:"","aria-hidden":!0,fill:!0,sizes:o,className:"scale-110 object-cover blur-2xl"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-background/20","aria-hidden":!0}),(0,r.jsx)(a.default,{src:e,alt:t,fill:!0,sizes:o,priority:d,className:`object-contain ${s}`})]}):null}},80011:(e,t,s)=>{"use strict";s.d(t,{NewsListClient:()=>b});var r=s(95155),a=s(98500),l=s.n(a),o=s(12115),d=s(18531),n=s(82131),i=s(40228),c=s(19085),m=s(78696),u=s(93519),x=s(91337);let g=["All News","Research","Events","Announcements","People","Projects","Publications"];function b({initialData:e}){let{theme:t}=(0,d.D)(),{content:s}=(0,n.m)(),a=e.categories?.length?e.categories:g,[f,p]=(0,o.useState)("All News"),[h,N]=(0,o.useState)(""),[j,v]=(0,o.useState)(""),[w,y]=(0,o.useState)(""),[S,k]=(0,o.useState)(""),[C,$]=(0,o.useState)(1),[P,E]=(0,o.useState)(e.docs),[A,R]=(0,o.useState)(e.totalPages),[L,_]=(0,o.useState)(e.totalDocs),[q,T]=(0,o.useState)(!1),[D,F]=(0,o.useState)(!1),M=(0,o.useRef)(!1),U=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("category")||e.get("filter");t&&a.includes(t)&&p(t);let s=e.get("q");s&&(y(s),k(s));let r=e.get("from");r&&N(r);let l=e.get("to");l&&v(l);let o=Number(e.get("page"));Number.isFinite(o)&&o>1&&$(o),U.current=!0},[a]),(0,o.useEffect)(()=>{let e=setTimeout(()=>k(w),350);return()=>clearTimeout(e)},[w]),(0,o.useEffect)(()=>$(1),[f,h,j,S]),(0,o.useEffect)(()=>{if(!U.current)return;let e=new URLSearchParams;"All News"!==f&&e.set("category",f),S&&e.set("q",S),h&&e.set("from",h),j&&e.set("to",j),C>1&&e.set("page",String(C));let t=e.toString();window.history.replaceState(null,"",t?`?${t}`:window.location.pathname)},[f,S,h,j,C]);let z=(0,o.useCallback)(async()=>{if(1===C&&"All News"===f&&!h&&!j&&!S&&!M.current){M.current=!0;return}T(!0),F(!1);let e=new URLSearchParams({page:String(C),perPage:String(12)});"All News"!==f&&e.set("category",f),h&&e.set("from",h),j&&e.set("to",j),S&&e.set("q",S);try{let t=await fetch(`/api/news?${e.toString()}`);if(!t.ok)throw Error(`Request failed: ${t.status}`);let s=await t.json();E(s.docs||[]),R(s.totalPages||1),_(s.totalDocs||0)}catch{E([]),F(!0)}finally{T(!1)}},[C,f,h,j,S]);(0,o.useEffect)(()=>{z()},[z]);let O=()=>{p("All News"),N(""),v(""),y("")},B="All News"!==f||h||j||S;return(0,r.jsx)(i.SiteLayout,{children:(0,r.jsx)("div",{className:"pb-12 pt-8 lg:pb-20 lg:pt-12",children:(0,r.jsxs)("div",{className:"mx-auto max-w-[96rem] px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"mb-10 max-w-5xl",children:[(0,r.jsx)(c.t,{as:"p",className:(0,u.k)("text-sm font-medium text-accent uppercase tracking-wider mb-4",s.pages.news.eyebrowStyle),value:s.pages.news.eyebrow}),(0,r.jsx)(c.t,{as:"h1",className:(0,u.k)(`text-balance ${"editorial"===t?"font-serif text-4xl md:text-5xl lg:text-6xl":"font-sans text-3xl md:text-4xl lg:text-6xl font-bold"} text-foreground mb-6`,s.pages.news.titleStyle),value:s.pages.news.title}),(0,r.jsx)(c.t,{as:"p",className:(0,u.k)("max-w-4xl text-lg leading-8 text-muted-foreground text-pretty sm:text-xl sm:leading-9",s.pages.news.introStyle),value:s.pages.news.intro})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mb-5",children:a.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>p(e),className:`px-4 py-2 text-sm font-medium rounded-md transition-colors ${f===e?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground border border-border hover:bg-muted"}`,children:e},e))}),(0,r.jsxs)("div",{className:"mb-3 flex flex-col gap-3 rounded-lg border border-border bg-card p-3 sm:flex-row sm:flex-wrap sm:items-end",children:[(0,r.jsxs)("label",{className:"flex-1 min-w-48 text-xs font-medium text-muted-foreground",children:["Search",(0,r.jsx)("input",{value:w,onChange:e=>y(e.target.value),placeholder:"Search titles, authors, and categories...",className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),(0,r.jsxs)("label",{className:"text-xs font-medium text-muted-foreground",children:["From",(0,r.jsx)("input",{type:"date",value:h,onChange:e=>N(e.target.value),className:"mt-1 block rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),(0,r.jsxs)("label",{className:"text-xs font-medium text-muted-foreground",children:["To",(0,r.jsx)("input",{type:"date",value:j,onChange:e=>v(e.target.value),className:"mt-1 block rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"})]}),B?(0,r.jsx)("button",{type:"button",onClick:O,className:"rounded-md border border-border px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-muted",children:"Clear"}):null]}),(0,r.jsxs)("p",{className:"mb-6 text-sm text-muted-foreground","aria-live":"polite",children:[q?"Loading…":`${L.toLocaleStr
1ing()} ${1===L?"story":"stories"}`,!q&&A>1?` \xb7 page ${C} of ${A}`:""]}),q&&!P.length?(0,r.jsx)("div",{className:"grid grid-cols-1 gap-7 sm:grid-cols-2 lg:grid-cols-3 xl:gap-8",children:Array.from({length:6}).map((e,t)=>(0,r.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,r.jsx)("div",{className:"aspect-[16/10] bg-muted animate-pulse"}),(0,r.jsxs)("div",{className:"p-5 space-y-3",children:[(0,r.jsx)("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"}),(0,r.jsx)("div",{className:"h-5 w-full bg-muted rounded animate-pulse"}),(0,r.jsx)("div",{className:"h-5 w-2/3 bg-muted rounded animate-pulse"}),(0,r.jsx)("div",{className:"h-3 w-full bg-muted rounded animate-pulse"})]})]},t))}):D?(0,r.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-8 text-center",children:[(0,r.jsx)("h2",{className:`${"editorial"===t?"font-serif text-2xl":"text-xl font-semibold"} text-foreground`,children:"Couldn't load stories"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Something went wrong fetching the latest news. Please try again."}),(0,r.jsx)("button",{type:"button",onClick:()=>void z(),className:"mt-4 rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-muted",children:"Try again"})]}):P.length?(0,r.jsx)("div",{className:"grid grid-cols-1 gap-7 sm:grid-cols-2 lg:grid-cols-3 xl:gap-8",children:P.map(e=>(0,r.jsx)(l(),{href:`/news/${e.id}`,className:"group",children:(0,r.jsxs)("article",{className:"bg-card border border-border rounded-lg overflow-hidden h-full hover:border-foreground
1/20 transition-all",children:[(0,r.jsx)("div",{className:"aspect-[16/10] relative overflow-hidden bg-muted",children:e.image?(0,r.jsx)(m.p,{src:e.image,alt:e.title,imageClassName:"group-hover:scale-105 transition-transform duration-500"}):(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted via-muted to-accent/10",children:(0,r.jsx)("span",{className:"font-serif text-2xl text-muted-foreground/40 px-6 text-center text-balance",children:e.category})})}),(0,r.jsxs)("div",{className:"p-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-accent",children:e.category}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,x.Y)(e.date,{month:"short",day:"numeric",year:"numeric"})})]}),(0,r.jsx)("h2",{className:(0,u.k)(`${"editorial"===t?"font-serif text-2xl":"text-xl font-semibold"} text-foreground mb-2 group-hover:text-accent transition-colors line-clamp-2`,e.titleStyle),children:e.title}),(0,r.jsx)(c.t,{as:"p",className:(0,u.k)("mb-5 line-clamp-3 text-base leading-7 text-muted-foreground",e.excerptStyle),value:e.excerpt}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("span",{className:(0,u.k)("text-xs text-muted-foreground",e.authorStyle),children:["By ",e.author]}),(0,r.jsx)("span",{className:"text-sm font-medium text-accent",children:"Read More →"})]})]})]})},e.id))}):(0,r.jsxs)("div",{className:"rounded-lg border border-dashed border-border bg-card p-8 text-center",children:[(0,r.jsx)("h2",{className:`${"editorial"===t?"font-serif text-2xl":"text-xl font-semibold"} text-foreground`,children:"No stories match your filters"}),B?(0,r.jsx)("button",{type:"button",onClick:O,className:"mt-3 text-sm font-medium text-accent hover:underline",children:"Clear filters"}):null]}),A>1?(0,r.jsxs)("div",{className:"mt-10 flex items-center justify-center gap-3",children:[(0,r.jsx)("button",{type:"button",disabled:C<=1||q,onClick:()=>$(e=>Math.max(1,e-1)),className:"rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground disabled:opacity-40 hover:bg-muted",children:"← Previous"}),(0,r.jsxs)("span",{className:"text-sm text-muted-foreground",children:["Page ",C," of ",A]}),(0,r.jsx)("button",{type:"button",disabled:C>=A||q,onClick:()=>$(e=>Math.min(A,e+1)),className:"rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground disabled:opacity-40 hover:bg-muted",children:"Next →"})]}):null]})})})}}},e=>{e.O(0,[9756,5772,792,228,8441,3794,7358],()=>e(e.s=61215)),_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.