1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{2132:e=>{e.exports={style:{fontFamily:"'Cormorant Garamond', 'Cormorant Garamond Fallback'",fontStyle:"normal"},className:"__className_3b76fe",variable:"__variable_3b76fe"}},4846:e=>{e.exports={style:{fontFamily:"'Space Grotesk', 'Space Grotesk Fallback'",fontStyle:"normal"},className:"__className_49a339",variable:"__variable_49a339"}},6872:()=>{},7651:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var l in r)Object.defineProperty(t,l,{enumerable:!0,get:r[l]});let a=s(3623),n=s(5413),i=s(8437),o=a._(s(6095));function c(e){let{props:t}=(0,n.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=i.Image},7935:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var r=s(5155),l=s(2115),a=s(8500),n=s.n(a),i=s(7651),o=s.n(i);function c({searchContent:e,personLabel:t,personLabelPlural:s}){let[a,i]=(0,l.useState)(""),[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(0),h=(0,l.useRef)(null),f=(0,l.useRef)(null),p=(0,l.useMemo)(()=>{if(!a.trim())return[];let t=a.toLowerCase().trim(),s=t.split(/\s+/),r=[];return e.forEach(e=>{let l=0,a=e.title.toLowerCase(),n=e.excerpt?e.excerpt.toLowerCase():"",i=e.contentText.toLowerCase();
1a.includes(t)&&(l+=a.startsWith(t)?100:50),s.forEach(e=>{e.length>0&&a.includes(e)&&(l+=25)}),n&&n.includes(t)&&(l+=30),n&&s.forEach(e=>{e.length>0&&n.includes(e)&&(l+=10)}),i.includes(t)&&(l+=15),s.forEach(e=>{e.length>0&&i.includes(e)&&(l+=5)}),l>0&&r.push({...e,matchScore:l})}),r.sort((e,t)=>t.matchScore-e.matchScore).slice(0,10)},[a,e]),x=(0,l.useMemo)(()=>({biographies:p.filter(e=>"biography"===e.contentType),insights:p.filter(e=>"article"===e.contentType)}),[p]);(0,l.useEffect)(()=>{if(!c)return;let e=e=>{switch(e.key){case"Escape":d(!1),i(""),u(0),f.current?.blur();break;case"ArrowDown":e.preventDefault(),u(e=>Math.min(e+1,p.length-1));break;case"ArrowUp":e.preventDefault(),u(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),p[m]&&(window.location.href=`/${p[m].slug}`)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,p,m]),(0,l.useEffect)(()=>{let e=e=>{h.current&&!h.current.contains(e.target)&&d(!1)};return c&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c]),(0,l.useEffect)(()=>{u(0)},[a]);let b=()=>{d(!1),i(""),u(0)};return(0,r.jsxs)("div",{ref:h,className:"relative w-full sm:max-w-120",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-4 pointer-events-none",children:(0,r.jsx)("svg",{className:"h-4 w-4 text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,r.jsx)("input",{ref:f,type:"text",value:a,onChange:e=>{i(e.target.value),d(!0)},onFocus:()=>d(!0),placeholder:"Search the star index...",className:"input-field pl-11 pr-4 py-2.5 text-sm rounded-full focus:ring-primary min-h-11","aria-label":"Search"})]}),c&&a.trim()&&(0,r.jsx)("div",{className:"absolute top-full left-0 right-0 mt-2 panel-soft max-h-96 overflow-y-auto z-50",children:0===p.length?(0,r.jsx)("div",{className:"p-4 text-center text-slate-500",children:(0,r.jsxs)("p",{className:"text-sm",children:['No results found for "',a,'"']})}):(0,r.jsxs)("div",{children:[x.biographies.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"px-3 py-2 text-[0.65rem] font-semibold text-slate-500 uppercase tracking-[0.25em] bg-white/70 border-b border-slate-200/60",children:s.charAt(0).toUpperCase()+s.slice(1)}),x.biographies.map(e=>{let t=p.findIndex(t=>t.slug===e.slug);return(0,r.jsxs)(n(),{href:`/${e.slug}`,onClick:b,className:`flex items-start gap-3 px-3 py-2 hover:bg-white transition-colors border-b border-slate-200/60 last:border-b-0 ${t===m?"bg-primary-light":""}`,children:[e.featuredImage&&(0,r.jsx)(o(),{src:e.featuredImage,alt:e.title,width:40,height:40,className:"w-10 h-10 object-cover rounded-lg shrink-0"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold text-slate-900 truncate",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-slate-600 line-clamp-2 mt-0.5",children:e.excerpt})]})]},e.slug)})]}),x.insights.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"px-3 py-2 text-[0.65rem] font-semibold text-slate-500 uppercase tracking-[0.25em] bg-white/70 border-b border-slate-200/60",children:"Astronomy Insights"}),x.insights.map(e=>{let t=p.findIndex(t=>t.slug===e.slug);return(0,r.jsxs)(n(),{href:`/${e.slug}`,onClick:b,className:`flex items-start gap-3 px-3 py-2 hover:bg-white transition-colors border-b border-slate-200/60 last:border-b-0 ${t===m?"bg-primary-light":""}`,children:[e.featuredImage&&(0,r.jsx)(o(),{src:e.featuredImage,alt:e.title,width:40,height:40,className:"w-10 h-10 object-cover rounded-lg shrink-0"}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold text-slate-900 truncate",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-slate-600 line-clamp-2 mt-0.5",children:e.excerpt})]})]},e.slug)})]}),(0,r.jsxs)("div",{className:"px-3 py-2 text-xs text-slate-500 bg-white/80 border-t border-slate-200/60",children:[p.length," result",1!==p.length?"s":""]})]})})]})}},8557:e=>{e.exports={style:{fontFamily:"'Space Mono', 'Space Mono Fallback'",fontStyle:"normal"},className:"__className_e8b655",variable:"__variable_e8b655"}},9128:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,6872,23)),Promise.resolve().then(s.bind(s,7935)),Promise.resolve().then(s.t.bind(s,8500,23)),Promise.resolve().then(s.t.bind(s,8437,23)),Promise.resolve().then(s.t.bind(s,2593,23)),Promise.resolve().then(s.t.bind(s,2132,23)),Promise.resolve().then(s.t.bind(s,4846,23)),Promise.resolve().then(s.t.bind(s,8557,23))}},e=>{e.O(0,[660,500,933,441,794,358],()=>e(e.s=9128)),_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.