1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55436,e=>{"use strict";let s=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>s],55436)},27566,e=>{e.v({"header-center":"style-module-scss-module__OdGEUa__header-center","header-container":"style-module-scss-module__OdGEUa__header-container","header-left":"style-module-scss-module__OdGEUa__header-left","header-navbar":"style-module-scss-module__OdGEUa__header-navbar","header-right":"style-module-scss-module__OdGEUa__header-right","logo-background":"style-module-scss-module__OdGEUa__logo-background","logo-image":"style-module-scss-module__OdGEUa__logo-image","logo-link":"style-module-scss-module__OdGEUa__logo-link","logo-wrapper":"style-module-scss-module__OdGEUa__logo-wrapper","menu-bar":"style-module-scss-module__OdGEUa__menu-bar","menu-bar-1":"style-module-scss-module__OdGEUa__menu-bar-1","menu-bar-2":"style-module-scss-module__OdGEUa__menu-bar-2","menu-bar-3":"style-module-scss-module__OdGEUa__menu-bar-3","menu-separator":"style-module-scss-module__OdGEUa__menu-separator","menu-toggle":"style-module-scss-module__OdGEUa__menu-toggle","menu-toggle-inner":"style-module-scss-module__OdGEUa__menu-toggle-inner","open-bar-1":"style-module-scss-module__OdGEUa__open-bar-1","open-bar-2":"style-module-scss-module__OdGEUa__open-bar-2","open-bar-3":"style-module-scss-module__OdGEUa__open-bar-3",scrolled:"style-module-scss-module__OdGEUa__scrolled","search-bar":"style-module-scss-module__OdGEUa__search-bar","search-bg":"style-module-scss-module__OdGEUa__search-bg","search-clear-btn":"style-module-scss-module__OdGEUa__search-clear-btn","search-empty":"style-module-scss-module__OdGEUa__search-empty","search-form-container":"style-module-scss-module__OdGEUa__search-form-container","search-hint":"style-module-scss-module__OdGEUa__search-hint","search-icon-btn":"style-module-scss-module__OdGEUa__search-icon-btn","search-input-inline":"style-module-scss-module__OdGEUa__search-input-inline","search-popup":"style-module-scss-module__OdGEUa__search-popup","search-popup-input":"style-module-scss-module__OdGEUa__search-popup-input","search-popup-input-clear":"style-module-scss-module__OdGEUa__search-popup-input-clear","search-popup-input-icon":"style-module-scss-module__OdGEUa__search-popup-input-icon","search-popup-input-wrap":"style-module-scss-module__OdGEUa__search-popup-input-wrap","search-result-card":"style-module-scss-module__OdGEUa__search-result-card","search-result-content":"style-module-scss-module__OdGEUa__search-result-content","search-result-date":"style-module-scss-module__OdGEUa__search-result-date","search-result-image":"style-module-scss-module__OdGEUa__search-result-image","search-result-title":"style-module-scss-module__OdGEUa__search-result-title","search-results":"style-module-scss-module__OdGEUa__search-results","search-results-content":"style-module-scss-module__OdGEUa__search-results-content","search-results-grid":"style-module-scss-module__OdGEUa__search-results-grid","search-results-section":"style-module-scss-module__OdGEUa__search-results-section","search-section-label":"style-module-scss-module__OdGEUa__search-section-label","sidebar-menu":"style-module-scss-module__OdGEUa__sidebar-menu","sidebar-menu-active":"style-module-scss-module__OdGEUa__sidebar-menu-active","sidebar-menu-content":"style-module-scss-module__OdGEUa__sidebar-menu-content","sidebar-menu-item":"style-module-scss-module__OdGEUa__sidebar-menu-item","sidebar-menu-link":"style-module-scss-module__OdGEUa__sidebar-menu-link","sidebar-menu-list":"style-module-scss-module__OdGEUa__sidebar-menu-list","sidebar-overlay":"style-module-scss-module__OdGEUa__sidebar-overlay","sidebar-search":"style-module-scss-module__OdGEUa__sidebar-search","sidebar-search-clear":"style-module-scss-module__OdGEUa__sidebar-search-clear","sidebar-search-hint":"style-module-scss-module__OdGEUa__sidebar-search-hint","sidebar-search-icon":"style-module-scss-module__OdGEUa__sidebar-search-icon","sidebar-search-inner":"style-module-scss-module__OdGEUa__sidebar-search-inner","sidebar-search-input":"style-module-scss-module__OdGEUa__sidebar-search-input","sidebar-social-links":"style-module-scss-module__OdGEUa__sidebar-social-links","sidebar-submenu":"style-module-scss-module__OdGEUa__sidebar-submenu","site-label":"style-module-scss-module__OdGEUa__site-label",slideInFromRight:"style-module-scss-module__OdGEUa__slideInFromRight","social-links-inline":"style-module-scss-module__OdGEUa__social-links-inline","social-pill":"style-module-scss-module__OdGEUa__social-pill","social-separator":"style-module-scss-module__OdGEUa__social-separator","submenu-arrow":"style-module-scss-module__OdGEUa__submenu-arrow"})},55671,64659,55900,e=>{"use strict";var s=e.i(43476),l=e.i(71645),t=e.i(18723),a=e.i(51884),r=e.i(55436),i=e.i(37727),d=e.i(75254);let n=(0,d.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>n],64659);let c=(0,d.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>c],55900);var o=e.i(11152),u=e.i(84828),m=e.i(68127),h=e.i(22016),x=e.i(18566),g=e.i(57688),p=e.i(30975),b=e.i(27566);function f(){let e=(0,x.useRouter)(),{navbars:d,social_links:f}=(0,t.useSiteData)(),{isAuthenticated:_,user:y,logout:j}=(0,a.useAuth)(),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!1),[E,O]=(0,l.useState)(null),[U,G]=(0,l.useState)(""),[T,C]=(0,l.useState)([]),[S,F]=(0,l.useState)(!1),$=(0,l.useRef)(null),[z,D]=(0,l.useState)(!1),[I,A]=(0,l.useState)([]),[L,M]=(0,l.useState)(0);d?.[0];let H=y?.username||y?.email||"Editor",R=(0,l.useMemo)(()=>L<768?z?60:90:L<1024?z?80:100:z?90:120,[L,z]);(0,l.useEffect)(()=>{let e=()=>{M(window.innerWidth)};return M(window.innerWidth),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,l.useEffect)(()=>{let e=()=>{D((window.scrollY||document.documentElement.scrollTop)>50)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,l.useEffect)(()=>{!async function(){try{let e=await (0,p.getArchiveData)();e?.categories&&A(e.categories.map(e=>({name:e.name,slug:e.slug})))}catch(e){console.error("Error fetching archive categories:",e)}}()},[]),(0,l.useEffect)(()=>{let e=U.trim();return e.length<3?void C([]):($.current&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,F(!0),(0,p.searchUnified)(e,20).then(e=>{C(e.map(e=>({id:e.id,title:e.title,url:e.url,image:e.image??null,type:e.type,date:e.date??void 0})))}).catch(()=>C([])).finally(()=>F(!1))},300),()=>{$.current&&clearTimeout($.current)})},[U]),(0,l.useEffect)(()=>(v?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[v]),(0,l.useEffect)(()=>(w?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[w]);let P=[{title:"About",url:"",children:[{title:"Overview",url:"/about/overview"}]},{title:"Life & Times",url:"",children:[{title:"Timeline",url:"/life-times/timeline"},{title:"Tributes, Honours & Awards",url:"/life-times/tributes"}]},{title:"Articles",url:"/life-times/articles",children:[]},{title:"On This Day",url:"/on-this-day",children:[]},{title:"Archive",url:"/archive",children:I.map(e=>({title:e.name,url:`/archive/${e.slug}`}))},{title:"Family life",url:"/family-life",children:[]},{title:"Presidential Gallery",url:"/presidential-gallery",children:[]},{title:"News",url:"/news",children:[]},{title:"First Lady",url:"/first-lady",children:[]}],Y=(0,l.useMemo)(()=>{let e={news:[],article:[],archive:[]};return T.forEach(s=>{e[s.type].push(s)}),e},[T]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("header",{className:`${b.default["header-navbar"]} border-b-1 border-b-brown-200 ${z?b.default.scrolled:""} ${_?b.default.authenticated:""}`,children:[(0,s.jsxs)("div",{className:b.default["header-container"],children:[(0,s.jsxs)("div",{className:b.default["header-left"],children:[(0,s.jsx)("div",{className:b.default["menu-toggle"],onClick:()=>N(!v),children:(0,s.jsxs)("div",{className:b.default["menu-toggle-inner"],children:[(0,s.jsx)("span",{className:`${b.default["menu-bar"]} ${v?b.default["open-bar-1"]:b.default["menu-bar-1"]}`}),(0,s.jsx)("span",{className:`${b.default["menu-bar"]} ${v?b.default["open-bar-2"]:b.default["menu-bar-2"]}`}),(0,s.jsx)("span",{className:`${b.default["menu-bar"]} ${v?b.default["open-bar-3"]:b.default["menu-bar-3"]}`})]})}),(0,s.jsx)("div",{className:b.default["logo-wrapper"],children:(0,s.jsx)(h.default,{href:"/",title:"Home",className:b.default["logo-link"],children:(0,s.jsx)("div",{className:b.default["logo-background"],children:(0,s.jsx)(g.default,{src:"/logo.svg",alt:"Museveni Online",width:80,height:80,className:b.default["logo-image"]})})})}),(0,s.jsx)("span",{className:b.default["site-label"],children:"MUSEVENI ONLINE"})]}),(0,s.jsxs)("div",{className:b.default["header-right"],children:[(0,s.jsxs)("div",{className:b.default["search-bar"],children:[(0,s.jsx)("input",{type:"text",placeholder:"Search the archive...",className:`${b.default["search-input-inline"]} hidden md:block`,value:U,onChange:e=>{let s=e.target.value;G(s),s.trim().length>0&&!w&&k(!0),0===s.trim().length&&w&&k(!1)},onClick:()=>{U.trim().length>0&&k(!0)}}),U&&(0,s.jsx)("button",{type:"button",onClick:()=>{G(""),k(!1)},className:`${b.default["search-clear-btn"]} hidden md:flex`,"aria-label":"Clear search",children:(0,s.jsx)(i.X,{size:16})}),(0,s.jsx)("button",{className:b.default["search-icon-btn"],onClick:()=>k(!w),"aria-label":"Search",children:(0,s.jsx)(r.Search,{size:20})})]}),(0,s.jsx)("div",{className:`${b.default["social-links-inline"]} hidden md:flex`,children:f?.map(e=>(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:b.default["social-pill"],children:["Facebook"===e.platform&&(0,s.jsx)(o.FaFacebook,{size:18}),"Twitter"===e.platform&&(0,s.jsx)(u.FaXTwitter,{size:18}),"Instagram"===e.platform&&(0,s.jsx)(o.FaInstagram,{size:18}),"TikTok"===e.platform&&(0,s.jsx)(o.FaTiktok,{size:18}),"YouTube"===e.platform&&(0,s.jsx)(u.FaYoutube,{size:18}),"Threads"===e.platform&&(0,s.jsx)(m.SiThreads,{size:18})]},e.id))}),_&&(0,s.jsxs)("div",{className:"ml-4 flex items-center gap-3",children:[(0,s.jsxs)("span",{className:"hidden md:inline text-xs font-medium text-red-600",children:["Logged in as ",H]}),(0,s.jsx)("button",{type:"button",onClick:j,className:"inline-flex h-8 w-8 aspect-square items-center justify-center rounded-full bg-red-600 text-xs font-semibold text-white shadow hover:bg-red-700 transition-colors","aria-label":"Logout",children:H.charAt(0).toUpperCase()})]})]})]}),_&&(0,s.jsx)("div",{className:"fixed left-0 right-0 z-50 flex justify-center",style:{to
1p:R+8},children:(0,s.jsx)("div",{className:"w-full max-w-[1620px] mx-auto sm:px-6 md:px-0 flex justify-end",children:(0,s.jsx)("button",{type:"button",onClick:j,className:"rounded-md bg-red-600 px-3 py-2 text-xs font-semibold text-white shadow hover:bg-red-700 transition-colors",children:"Logout"})})}),w&&(0,s.jsxs)("div",{className:b.default["search-popup"],style:{top:R,height:`calc(100vh - ${R}px)`},children:[(0,s.jsx)("div",{className:b.default["search-bg"],onClick:()=>{G(""),k(!1)}}),(0,s.jsxs)("div",{className:b.default["search-form-container"],children:[(0,s.jsxs)("div",{className:b.default["search-popup-input-wrap"],onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(r.Search,{size:20,className:b.default["search-popup-input-icon"],"aria-hidden":!0}),(0,s.jsx)("input",{type:"text",placeholder:"Search the archive...",className:b.default["search-popup-input"],value:U,onChange:e=>G(e.target.value),onClick:e=>e.stopPropagation(),"aria-label":"Search",autoFocus:!0}),U&&(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),G("")},className:b.default["search-popup-input-clear"],"aria-label":"Clear search",children:(0,s.jsx)(i.X,{size:18})})]}),(0,s.jsxs)("div",{className:b.default["search-results"],children:[S&&(0,s.jsx)("div",{className:b.default["search-hint"],children:"Loading content..."}),!S&&U.trim().length>0&&U.trim().length<3&&(0,s.jsx)("div",{className:b.default["search-hint"],children:"Keep typing to search (min 3 characters)"}),!S&&T.length>0&&(0,s.jsxs)("div",{className:b.default["search-results-content"],children:[Y.article.length>0&&(0,s.jsxs)("div",{className:b.default["search-results-section"],children:[(0,s.jsx)("h3",{className:b.default["search-section-label"],children:"Articles"}),(0,s.jsx)("div",{className:b.default["search-results-grid"],children:Y.article.map(e=>(0,s.jsxs)(h.default,{href:e.url,onClick:()=>k(!1),className:b.default["search-result-card"],children:[e.image&&(0,s.jsx)("div",{className:b.default["search-result-image"],children:(0,s.jsx)("img",{src:e.image,alt:e.title,className:"absolute inset-0 w-full h-full object-cover",onError:e=>{e.currentTarget.style.display="none"}})}),(0,s.jsxs)("div",{className:b.default["search-result-content"],children:[(0,s.jsx)("h3",{className:b.default["search-result-title"],children:e.title}),e.date&&(0,s.jsx)("div",{className:b.default["search-result-date"],children:e.date})]})]},`${e.type}-${e.id}`))})]}),Y.news.length>0&&(0,s.jsxs)("div",{className:b.default["search-results-section"],children:[(0,s.jsx)("h3",{className:b.default["search-section-label"],children:"News"}),(0,s.jsx)("div",{className:b.default["search-results-grid"],children:Y.news.map(e=>(0,s.jsxs)(h.default,{href:e.url,onClick:()=>k(!1),className:b.default["search-result-card"],children:[e.image&&(0,s.jsx)("div",{className:b.default["search-result-image"],children:(0,s.jsx)("img",{src:e.image,alt:e.title,className:"absolute inset-0 w-full h-full object-cover",onError:e=>{e.currentTarget.style.display="none"}})}),(0,s.jsxs)("div",{className:b.default["search-result-content"],children:[(0,s.jsx)("h3",{className:b.default["search-result-title"],children:e.title}),e.date&&(0,s.jsx)("div",{className:b.default["search-result-date"],children:e.date})]})]},`${e.type}-${e.id}`))})]}),Y.archive.length>0&&(0,s.jsxs)("div",{className:b.default["search-results-section"],children:[(0,s.jsx)("h3",{className:b.default["search-section-label"],children:"Archive"}),(0,s.jsx)("div",{className:b.default["search-results-grid"],children:Y.archive.map(e=>(0,s.jsxs)(h.default,{href:e.url,onClick:()=>k(!1),className:b.default["search-result-card"],children:[e.image&&(0,s.jsx)("div",{className:b.default["search-result-image"],children:(0,s.jsx)("img",{src:e.image,alt:e.title,className:"absolute inset-0 w-full h-full object-cover",onError:e=>{e.currentTarget.style.display="none"}})}),(0,s.jsxs)("div",{className:b.default["search-result-content"],children:[(0,s.jsx)("h3",{className:b.default["search-result-title"],children:e.title}),e.date&&(0,s.jsx)("div",{className:b.default["search-result-date"],children:e.date})]})]},`${e.type}-${e.id}`))})]})]}),!S&&U.trim().length>=3&&0===T.length&&(0,s.jsx)("div",{className:b.default["search-empty"],children:"No matches found."})]})]})]})]}),(0,s.jsx)("div",{className:`${b.default["sidebar-menu"]} ${v?b.default["sidebar-menu-active"]:""}
1`,style:{top:R,height:`calc(100% - ${R}px)`},children:(0,s.jsxs)("div",{className:b.default["sidebar-menu-content"],children:[(0,s.jsxs)("div",{className:b.default["sidebar-search"],children:[(0,s.jsxs)("div",{className:b.default["sidebar-search-inner"],children:[(0,s.jsx)(r.Search,{size:20,className:b.default["sidebar-search-icon"],"aria-hidden":!0}),(0,s.jsx)("input",{type:"text",placeholder:"Search the archive...",className:b.default["sidebar-search-input"],value:U,onChange:e=>{let s=e.target.value;G(s),s.trim().length>0&&k(!0),0===s.trim().length&&k(!1)},onClick:()=>{U.trim().length>0&&k(!0)},"aria-label":"Search"}),U&&(0,s.jsx)("button",{type:"button",onClick:()=>{G(""),k(!1)},className:b.default["sidebar-search-clear"],"aria-label":"Clear search",children:(0,s.jsx)(i.X,{size:16})})]}),U.trim().length>0&&U.trim().length<3&&(0,s.jsx)("div",{className:b.default["sidebar-search-hint"],children:"Keep typing (min 3 characters)"})]}),(0,s.jsx)("ul",{className:b.default["sidebar-menu-list"],children:P.map((l,t)=>(0,s.jsx)("li",{className:b.default["sidebar-menu-item"],children:l.children&&l.children.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b.default["sidebar-menu-link"],children:[(0,s.jsx)(h.default,{href:l.url,className:"flex-1 text-left",onClick:s=>{var a;return a=l.url,void(s.preventDefault(),E===t?(O(null),N(!1),e.push(a)):O(t))},children:l.title}),(0,s.jsx)("button",{type:"button",className:"ml-4 flex items-center justify-center",onClick:e=>{e.stopPropagation(),O(E===t?null:t)},"aria-label":"Toggle submenu",children:E===t?(0,s.jsx)(c,{size:18}):(0,s.jsx)(n,{size:18})})]}),E===t&&(0,s.jsx)("ul",{className:b.default["sidebar-submenu"],children:l.children.map((e,l)=>(0,s.jsx)("li",{children:(0,s.jsx)(h.default,{href:e.url,onClick:()=>N(!1),children:e.title})},l))})]}):(0,s.jsx)(h.default,{href:l.url,className:b.default["sidebar-menu-link"],onClick:()=>N(!1),children:l.title})},t))}),(0,s.jsx)("div",{className:`${b.default["sidebar-social-links"]} md:hidden mt-auto pt-8`,children:(0,s.jsx)("div",{className:"flex gap-3 justify-start",children:f?.map(e=>(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:b.default["social-pill"],children:["Facebook"===e.platform&&(0,s.jsx)(o.FaFacebook,{size:18}),"Twitter"===e.platform&&(0,s.jsx)(u.FaXTwitter,{size:18}),"Instagram"===e.platform&&(0,s.jsx)(o.FaInstagram,{size:18}),"TikTok"===e.platform&&(0,s.jsx)(o.FaTiktok,{size:18}),"YouTube"===e.platform&&(0,s.jsx)(u.FaYoutube,{size:18}),"Threads"===e.platform&&(0,s.jsx)(m.SiThreads,{size:18})]},e.id))})})]})}),v&&(0,s.jsx)("div",{className:b.default["sidebar-overlay"],onClick:()=>N(!1)})]})}e.s(["default",()=>f],55671)},87316,e=>{"use strict";let s=(0,e.i(75254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>s],87316)},51975,e=>{"use strict";let s=(0,e.i(75254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>s],51975)},34365,e=>{"use strict";var s=e.i(43476),l=e.i(71645),t=e.i(55671),a=e.i(30975),r=e.i(22016);let i=(0,e.i(75254).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var d=e.i(63059),n=e.i(87316),c=e.i(51975);let o=e=>{if(!e||"string"!=typeof e)return"";if("undefined"!=typeof document){let s=document.createElement("div");return s.innerHTML=e,(s.textContent||s.innerText||"").replace(/\s+/g," ").trim()}return e.replace(/<[^>]*>?/gm,"").replace(/\s+/g," ").trim()},u=e=>new Date(e).getFullYear().toString(),m=["bg-red-600","bg-amber-600","bg-emerald-600","bg-blue-600","bg-violet-600","bg-rose-600"];function h(){let e,h,[x,g]=(0,l.useState)(null),[p,b]=(0,l.useState)(!0),[f,_]=(0,l.useState)("oldest");(0,l.useEffect)(()=>{let e=!1;return(0,a.getOnThisDayData)().then(s=>{if(e||!s)return;let l=s.articles??[],t=s.today_date??new Date().toISOString().slice(0,10),a=new Date(t),r=s.today_label??`${a.toLocaleStr
1ing("en-US",{month:"long"})} ${a.getDate()}`;g({banner:s.banner??{tag_text:"OFFICIAL PRESIDENTIAL ARCHIVE",title:"On This Day &",title_highlight:"History",subtitle:"Exploring pivotal moments through in-depth articles that chronicle the events and decisions that shaped our nation's journey across decades of leadership.",button_text:"Explore History >",button_link:"#articles",background_image:null},articles:l,today_date:t,today_label:r})}).catch(()=>g({banner:{tag_text:"OFFICIAL PRESIDENTIAL ARCHIVE",title:"On This Day &",title_highlight:"History",subtitle:"Exploring pivotal moments through in-depth articles that chronicle the events and decisions that shaped our nation's journey across decades of leadership.",button_text:"Explore History >",button_link:"#articles",background_image:null},articles:[],today_date:new Date().toISOString().slice(0,10),today_label:""})).finally(()=>{e||b(!1)}),()=>{e=!0}},[]);let y=(0,l.useMemo)(()=>{if(!x?.articles?.length)return[];let e=[...x.articles];return"newest"===f&&e.sort((e,s)=>new Date(s.date).getTime()-new Date(e.date).getTime()),"oldest"===f&&e.sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),e},[x?.articles,f]),j=(0,l.useMemo)(()=>x?.today_date&&y.length?y.find(e=>{var s,l;let t,a;return s=e.date,l=x.today_date,t=new Date(s),a=new Date(l),t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()})??null:null,[x?.today_date,y]),v=(0,l.useMemo)(()=>j?y.filter(e=>e.id!==j.id):y,[y,j]),N=x?.banner??{tag_text:"OFFICIAL PRESIDENTIAL ARCHIVE",title:"On This Day &",title_highlight:"History",subtitle:"Exploring pivotal moments through in-depth articles that chronicle the events and decisions that shaped our nation's journey across decades of leadership.",button_text:"Explore History >",button_link:"#articles",background_image:null};return(0,s.jsxs)("div",{className:"min-h-screen bg-white",children:[(0,s.jsx)(t.default,{}),(0,s.jsxs)("main",{className:"pt-[120px]",children:[(0,s.jsxs)("section",{className:"relative w-full min-h-[320px] md:min-h-[380px] overflow-hidden",children:[(0,s.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[N.background_image?(0,s.jsx)("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${N.background_image})`}}):(0,s.jsx)("div",{className:"absolute inset-0 w-full h-full",style:{background:"linear-gradient(to right, #0a0a0a, #1a1a1a)",backgroundSize:"cover",backgroundPosition:"center"}}),(0,s.jsx)("div",{className:"absolute inset-0 w-full h-full",style:{backgroundColor:"rgba(0,0,0,0.82)"}})]}),(0,s.jsxs)("div",{className:"relative z-10 w-full max-w-[1620px] mx-auto flex flex-col justify-center min-h-[320px] md:min-h-[380px] px-6 md:px-12 lg:px-16 py-16 md:py-20 text-left",children:[N.tag_text&&(0,s.jsx)("span",{className:"inline-block px-2 py-1 rounded-full bg-amber-400 text-black text-[10px] md:text-xs font-semibold uppercase tracking-widest mb-5 w-fit",children:N.tag_text}),(0,s.jsxs)("h1",{className:"text-3xl md:text-5xl lg:text-6xl font-bold text-white mb-4",children:[N.title," ",(0,s.jsx)("span",{className:"text-amber-400",children:N.title_highlight})]}),N.subtitle&&(0,s.jsx)("p",{className:"text-base md:text-lg lg:text-xl text-white/95 leading-relaxed mb-8 max-w-2xl",children:N.subtitle}),(N.button_text||N.button_link)&&(0,s.jsxs)(r.default,{href:N.button_link||"#articles",className:"inline-flex items-center gap-1 px-6 py-3 bg-amber-400 text-black font-semibold rounded-md hover:bg-amber-300 transition-colors w-fit",children:[(N.button_text||"Explore History").replace(/\s*>\s*$/,""),(0,s.jsx)(d.ChevronRight,{className:"h-4 w-4 shrink-0"})]})]})]}),(0,s.jsx)("div",{id:"articles",className:"py-16 md:py-16",style:{backgroundColor:"#ededed"},children:(0,s.jsxs)("div",{className:"w-full max-w-[1620px] mx-auto px-6 md:px-12 lg:px-16",children:[(0,s.jsxs)("div",{className:"mb-8 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-1 text-gray-900",children:x?.today_label?`${x.today_label} in History`:"In History"}),(0,s.jsxs)("p",{className:"text-gray-600",children:["Showing ",y.length," article",1!==y.length?"s":""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("label",{htmlFor:"sort-by-year",className:"text-sm text-gray-500",children:"Sort by year"}
1),(0,s.jsxs)("select",{id:"sort-by-year",value:f,onChange:e=>_(e.target.value),className:"rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 focus:outline-none focus:ring-2 focus:ring-amber-400/50",children:[(0,s.jsx)("option",{value:"newest",children:"Newest first"}),(0,s.jsx)("option",{value:"oldest",children:"Oldest first"})]})]})]}),p?(0,s.jsx)("div",{className:"flex justify-center py-20",children:(0,s.jsx)("div",{className:"w-8 h-8 border-2 border-amber-400 border-t-transparent rounded-full animate-spin"})}):0===y.length?(0,s.jsx)("div",{className:"text-center py-16 bg-white rounded-xl border border-gray-200",children:(0,s.jsx)("p",{className:"text-gray-500 text-lg",children:"No articles in this date range. Try again another day."})}):(0,s.jsxs)(s.Fragment,{children:[j&&(e=new Date(j.date).toLocaleDateString("en-US",{month:"long",day:"numeric"}),h=u(j.date),(0,s.jsx)(r.default,{href:`/life-times/timeline/article/${j.slug}?light=1`,className:"group block w-full mb-10",children:(0,s.jsxs)("article",{className:"relative w-full rounded-3xl overflow-hidden min-h-[380px] md:min-h-[420px] grid grid-cols-1 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"absolute inset-0",children:[j.image?(0,s.jsx)("img",{src:j.image,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-800"}),(0,s.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%)"}})]}),(0,s.jsxs)("div",{className:"relative z-10 flex h-full min-h-0 flex-col p-8 md:p-10 lg:p-12",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-slate-800/75","aria-hidden":!0}),(0,s.jsxs)("div",{className:"relative z-10 flex min-h-0 flex-1 flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-block px-3 py-1 rounded-full bg-[#6b21a8] text-white text-xs font-semibold uppercase tracking-wider",children:"Featured Story"}),(0,s.jsx)("span",{className:"inline-block px-3 py-1 rounded-full bg-amber-400 text-black text-xs font-semibold",children:e})]}),(0,s.jsx)("h3",{className:"text-3xl md:text-4xl lg:text-5xl font-bold tracking-tight text-white group-hover:text-amber-300 transition-colors line-clamp-3",children:j.title}),(0,s.jsx)("p",{className:"text-white/90 text-base md:text-lg leading-relaxed line-clamp-3",children:o(j.summary||j.body||"")}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-white/80 text-sm",children:[(0,s.jsx)(n.Calendar,{className:"h-4 w-4 shrink-0"}),(0,s.jsx)("span",{children:h})]}),j.tags&&j.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:j.tags.map(e=>(0,s.jsx)("span",{className:"rounded border border-white/50 bg-white/5 backdrop-blur-md px-3 py-1 text-xs text-white",children:e},e))}),j.category&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:(0,s.jsx)("span",{className:"px-3 py-1 rounded border border-white/50 text-white/90 text-xs",children:j.category.name})}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 w-fit rounded-md bg-amber-400 px-5 py-2.5 text-base font-semibold text-gray-900 group-hover:bg-amber-300 transition-colors mt-4",children:["Read Full Article",(0,s.jsx)(i,{className:"h-4 w-4 shrink-0"})]})]})]}),(0,s.jsx)("div",{className:"relative z-10 min-h-[200px] md:min-h-0 flex items-end justify-end p-6 md:p-8",children:(0,s.jsx)("span",{className:"rounded-md bg-amber-400 px-4 py-2 text-base font-bold text-gray-900",children:h})})]})})),v.length>0&&(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:v.map(e=>{let l=new Date(e.date).toLocaleDateString("en-US",{month:"long",day:"numeric"}),t=u(e.date);return(0,s.jsx)(r.default,{href:`/life-times/timeline/article/${e.slug}?light=1`,className:"group block bg-white rounded-2xl border border-gray-200 overflow-hidden hover:border-gray-300 transition-all h-full",children:(0,s.jsxs)("article",{className:"h-full flex flex-col",children:[(0,s.jsxs)("div",{className:"relative h-48 w-full overflow-hidden bg-gray-100",children:[e.image?(0,s.jsx)("img",{src:e.image,alt:"",className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",onError:e=>{let s=e.currentTarget;s.style.display="none";let l=s.parentElement;l&&(l.innerHTML='<div class="w-full h-48 flex items-center justify-center bg-gray-100 text-gray-500 text-sm">Image not available</div>')}}):(0,s.jsx)("div",{className:"w-full h-48 bg-gray-200"}),e.category&&(0,s.jsx)("span",{className:`absolute top-3 left-3 px-3 py-1 rounded-full text-white text-xs font-semibold uppercase tracking-wider ${m[e.category.id%m.length]}`,children:e.category.name}),(0,s.jsx)("span",{className:"absolute bottom-3 right-3 p-2 rounded bg-gray-900 text-white text-sm font-semibold",children:t})]}),(0,s.jsxs)("div",{className:"p-5 flex-1 flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-gray-500 text-sm",children:[(0,s.jsx)(n.Calendar,{className:"h-4 w-4 shrink-0"}),(0,s.jsx)("span",{children:l})]}),(0,s.jsx)("h3",{className:"text-lg md:text-xl font-bold tracking-tight text-amber-600 line-clamp-2 group-hover:text-amber-700 transition-colors",children:e.title}),(e.summary||e.body)&&(0,s.jsx)("p",{className:"text-gray-700 text-sm leading-relaxed line-clamp-3",children:o(e.summary||e.body||"")}),(0,s.jsx)("div",{className:"mt-auto border-t border-gray-200 pt-4 flex items-center justify-end",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-amber-600 text-sm font-medium group-hover:text-amber-700",children:["Read More",(0,s.jsx)(d.ChevronRight,{className:"h-4 w-4 shrink-0"})]})}),e.tags&&e.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2 pt-2",children:e.tags.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded bg-gray-100 px-3 py-1 text-xs text-gray-700",children:[(0,s.jsx)(c.Tag,{className:"h-3 w-3 shrink-0"}),e]},e))})]})]})},e.id)})})]})]})})]})]})}e.s(["default",()=>h],34365)}]);
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.