1/*! For license information please see 99.ecdc48b7.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkproject_aging_and_cognition_lab=self.webpackChunkproject_aging_and_cognition_lab||[]).push([[99],{76:(e,t,a)=>{a.d(t,{BP:()=>l,Df:()=>n,Oo:()=>c,j_:()=>i,oE:()=>r,wr:()=>o});const s=(0,a(550).a)({bucketSlug:"aging-and-cognition-lab-production",readKey:"haR9elOQurWT9DwEd4U0SoxksrTtWNLSJlVuWSbEW6Jkzv943z"}),r=async()=>{try{const e=await s.objects.findOne({type:"labmembers",slug:"labmembers"}).props("slug,title,metadata,type").depth(1);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}},l=async()=>{try{const e=await s.objects.findOne({type:"researchpage",slug:"researchpage"}).props("slug,title,metadata,type").depth(2);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}},o=async()=>{try{const e=await s.objects.findOne({type:"newspage",slug:"main-news-page"}).props("slug,title,metadata,type").depth(1);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}},n=async()=>{try{const e=await s.objects.findOne({type:"homenews",slug:"home-news"}).props("slug,title,metadata,type").depth(1);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}},i=async()=>{try{const e=await s.objects.findOne({type:"homepages",slug:"homepage"}).props("slug,title,metadata,type").depth(1);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}},c=async()=>{try{const e=await s.objects.findOne({type:"joinpages",slug:"joinpage"}).props("slug,title,metadata,type").depth(1);return console.log(e),e}catch(e){console.error("Error fetching research data:",e)}}},99:(e,t,a)=>{a.r(t),a.d(t,{default:()=>p});var s=a(43),r=a(579);function l(e){let{title:t,metadata:a}=e;return(0,r.jsxs)("div",{className:"rounded-lg",children:[(0,r.jsx)("h2",{className:"text-left text-3xl font-semibold mb-5",style:{color:"black"},children:t}),(0,r.jsx)("p",{className:"text-gray-600",children:a.description})]})}function o(e){let{publications:t}=e;return(0,r.jsxs)("div",{className:"rounded-lg mt-[-25px]",children:[(0,r.jsx)("h3",{className:"text-[28px] italic font-semibold mb-1",style:{color:"var(--dark-teal)"},children:"Highlights"}),t.map((e=>(0,r.jsxs)("a",{href:e.metadata.link,target:"_blank",rel:"noopener noreferrer",className:"flex gap-8 rounded-lg mb-3 cursor-pointer items-start",children:[(0,r.jsx)("div",{className:"w-48 flex-shrink-0 pt-3",children:(0,r.jsx)("img",{className:"object-cover rounded-lg",src:e.metadata.image.url,alt:e.metadata.title})}),(0,r.jsxs)("div",{className:"flex-1 pt-2",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-2",style:{color:"var(--base-teal)"},children:e.metadata.title}),(0,r.jsx)("p",{className:"text-gray-600 text-lg mb-0",children:e.metadata.description})]})]},e.slug)))]})}function n(e){let{publications:t}=e;return(0,r.jsxs)("div",{className:"mt-[-20px]",children:[(0,r.jsx)("div",{children:(0,r.jsx)("h3",{className:"text-[28px] italic font-semibold mb-3",style:{color:"var(--dark-teal)"},children:"More on this Topic"})}),(0,r.jsx)("div",{className:"rounded-lg p-6",style:{backgroundColor:"var(--base-teal)"},children:(0,r.jsx)("div",{className:"space-y-6",children:t.map((e=>(0,r.jsxs)("a",{href:e.metadata.link,target:"_blank",rel:"noopener noreferrer",className:"block bg-white rounded-lg p-6 cursor-pointer",children:[(0,r.jsx)("h4",{className:"text-lg font-semibold mb-2",children:e.metadata.title}),(0,r.jsx)("p",{className:"text-gray-600",children:e.metadata.description})]},e.slug)))})})]})}const i=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter(((e,t,a)=>Boolean(e)&&""!==e.trim()&&a.indexOf(e)===t)).join(" ").trim()};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const d=(0,s.forwardRef)(((e,t)=>{let{color:a="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:n="",children:d,iconNode:m,...u}=e;return(0,s.createElement)("svg",{ref:t,...c,width:r,height:r,stroke:a,strokeWidth:o?24*Number(l)/Number(r):l,className:i("lucide",n),...u},[...m.map((e=>
2{let[t,a]=e;return(0,s.createElement)(t,a)})),...Array.isArray(d)?d:[d]])})),m=((e,t)=>{const a=(0,s.forwardRef)(((a,r)=>{let{className:l,...o}=a;return(0,s.createElement)(d,{ref:r,iconNode:t,className:i(`lucide-${n=e,n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,l),...o});var n}));return a.displayName=`${e}`,a})("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var u=a(76);function h(e){let{isOpen:t,onClose:a,publications:l}=e;return(0,s.useEffect)((()=>(t?(document.documentElement.classList.add("overflow-hidden"),document.body.classList.add("overflow-hidden")):(document.documentElement.classList.remove("overflow-hidden"),document.body.classList.remove("overflow-hidden")),()=>{document.documentElement.classList.remove("overflow-hidden"),document.body.classList.remove("overflow-hidden")})),[t]),t?(0,r.jsx)("div",{onClick:a,className:"fixed inset-0 flex justify-center items-center z-50",style:{backgroundColor:"rgba(0, 128, 128, 0.75)"},children:(0,r.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"rounded-lg w-full min-w-[300px] max-w-6xl mx-8 my-8 px-6 py-4 max-h-[80vh] overflow-hidden flex flex-col",style:{backgroundColor:"var(--off-white)"},children:[(0,r.jsxs)("div",{className:"flex justify-between items-center pb-4 border-b border-gray-300",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Search Results"}),(0,r.jsx)("button",{onClick:a,className:"text-gray-600 hover:text-gray-800 text-xl font-bold","aria-label":"Close",children:"\xd7"})]}),(0,r.jsx)("div",{className:"overflow-y-auto flex-1 mt-4",children:l.length>0?(0,r.jsx)("ul",{className:"space-y-4",children:l.map((e=>(0,r.jsx)("li",{className:"p-4 border border-gray-300 rounded-lg shadow-sm hover:shadow-md transition-shadow",style:{backgroundColor:"var(--off-white)"},children:(0,r.jsxs)("a",{href:e.metadata.link,target:"_blank",rel:"noopener noreferrer",className:"block cursor-pointer",children:[(0,r.jsx)("h3",{className:"font-semibold text-lg mb-2",children:e.metadata.title}),(0,r.jsx)("p",{className:"text-gray-700",children:e.metadata.description})]})},e.slug)))}):(0,r.jsx)("p",{children:"No results found."})})]})}):null}function p(){const[e,t]=(0,s.useState)(),[a,i]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[p,x]=(0,s.useState)(""),[g,f]=(0,s.useState)([]),[b,v]=(0,s.useState)(!1),[j,y]=(0,s.useState)(null),N=(0,s.useRef)([]),w=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(null),[E,S]=(0,s.useState)(!1),[L,_]=(0,s.useState)(0);(0,s.useEffect)((()=>{!async function(){try{const a=await(0,u.BP)(),s=a.object.metadata.topics_array;t(s),console.log(a),console.log(s),console.log(e)}catch(a){d("Failed to fetch data.")}finally{i(!1)}}();const a=setTimeout((()=>{if(k.current){const e=k.current.getBoundingClientRect();_(e.top+window.scrollY)}}),100);return()=>clearTimeout(a)}),[]),(0,s.useEffect)((()=>{const e=()=>{L&&S(window.scrollY>L)};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)}),[L]),(0,s.useEffect)((()=>{if(C.current){const e=C.current.offsetHeight;y(e)}}),[e]);const O=e=>{var t,a;-1===e?null===(t=w.current)||void 0===t||t.scrollIntoView({behavior:"smooth"}):null===(a=N.current[e])||void 0===a||a.scrollIntoView({behavior:"smooth"})},R=()=>{const t=((null===e||void 0===e?void 0:e.flatMap((e=>e.metadata.publications)))||[]).filter((e=>e.metadata.title.toLowerCase().includes(p.toLowerCase())));f(t),v(!0)};return a?(0,r.jsx)("div",{className:"p-8",children:"Loading..."}):c?(0,r.jsx)("div",{className:"p-8 text-red-500",children:c}):e?(0,r.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,r.jsx)(h,{isOpen:b,onClose:()=>{v(!1)},publications:g}),(0,r.jsx)("div",{className:"max-w-7xl mx-auto px-4 pt-4",children:(0,r.jsxs)("div",{className:"flex gap-8",children:[(0,r.jsx)("div",{style:{width:"16rem",flexShrink:0,height:j||"auto",position:"relative"},children:(0,r.jsxs)("div",{ref:k,className:"w-72 pl-5",style:{position:E?"fixed":"static",top:E?"20px":"auto",width:"16rem",transition:"all 0.3s ease"},children:[(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"text",value:p,onChange:e=>x(e.target.value),placeholder:"Search Publications",style:{borderColor:"var(--base-teal)",color:"var(--dark-teal)"},className:"w-full px-6 py-2 rounded-full border-2 placeholder-teal-600 focus:outline-none focus:ring-2 focus:border-transparent",onKeyPress:e=>{"Enter"===e.key&&R()}}),(0,r.jsx)("button",{onClick:R,style:{color:"var(--base-teal)"},className:"absolute right-4 top-1/2 transform -translate-y-1/2 hover:opacity-80",children:(0,r.jsx)(m,{size:20})})]})}),(0,r.jsxs)("div",{className:"space-y-2 flex flex-col items-center",children:[(0,r.jsx)("h3",{className:"text-[#327475] font-semibold italic mb-[0px]",children:"Current Research"}),e.map(((e,t)=>(0,r.jsx)("button",{onClick:()=>"More"===e.slug?O(-1):O(t),className:"w-full rounded-lg bg-gray-100 p-4 text-left hover:bg-gray-200 transition-colors border-gray-100",children:(0,r.jsx)("span",{style:{color:"var(--base-teal)"},className:"text-lg",children:e.title})},e.slug)))]})]})}),(0,r.jsx)("div",{ref:C,className:"",children:(0,r.jsx)("div",{className:"space-y-12",children:null===e||void 0===e?void 0:e.map(((e,t)=>{e.metadata.publications.forEach(((e,t)=>{console.log(`Publication ${t+1}:`,e)}));const a=e.metadata.publications.filter((e=>{var t;return"true"===(null===(t=e.metadata)||void 0===t?void 0:t.ishighlight)})),s=e.metadata.publications.filter((e=>{var t;return"false"===(null===(t=e.metadata)||void 0===t?void 0:t.ishighlight)}));return"more"===e.slug?(0,r.jsx)("div",{ref:w,className:"pb-8",children:(0,r.jsx)("div",{className:"px-4 mb-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,r.jsx)("h3",{className:"text-center text-3xl font-semibold mb-4",style:{color:"black"},children:"Other Publications"})}),(0,r.jsx)("div",{className:"rounded-lg p-6",style:{backgroundColor:"var(--base-teal)"},children:(0,r.jsx)("div",{className:"space-y-6",children:s.map((e=>(0,r.jsxs)("a",{href:e.metadata.link,target:"_blank",rel:"noopener noreferrer",className:"block bg-white rounded-lg p-6 cursor-pointer",children:[(0,r.jsx)("h4",{className:"text-lg font-semibold mb-2",children:e.metadata.title}),(0,r.jsx)("p",{className:"text-gray-600",children:e.metadata.description})]},e.slug)))})})]})})},e.slug):(0,r.jsxs)("div",{ref:e=>N.current[t]=e,children:[(0,r.jsx)("div",{className:"mx-6 mb-12",children:(0,r.jsx)(l,{slug:e.slug,title:e.title,metadata:e.metadata})}),(0,r.jsx)("div",{className:"mx-6 my-12",children:(0,r.jsx)(o,{publications:a})}),(0,r.jsx)("div",{className:"mx-6 my-12",children:(0,r.jsx)(n,{publications:s})})]},e.slug)}))})})]})})]}):null}}}]); 3//# sourceMappingURL=99.ecdc48b7.chunk.js.map
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.