1import{u as e,j as s,L as t}from"./vendor-react-BH6F5oQJ.js";import{l as a,S as r,H as n,C as l,g as i,I as o,b as m,d as c,m as d,B as x}from"./index-C_oSc_qP.js";import{E as p,b as h,s as u,i as g}from"./EventShareMenu-D_pFae9X.js";import{n as j}from"./ogImage-5aQVhhu0.js";import{P as f}from"./PersonCard-Dhs6VyeD.js";import{c as v,d as w,M as N,e as _,U as b,L as y,Y as k,F as $,E}from"./vendor-icons-CaI5__By.js";import"./vendor-ui-B4WC06Sp.js";import"./vendor-query-CC4VRGyP.js";import"./vendor-supabase-COwyE4EW.js";import"./dropdown-menu-YTVGj1XK.js";import"./index-D5Ei2fSx.js";import"./Combination-DzDAyqvK.js";import"./socialSharing-lIC7LEty.js";const F="https://delphigrc.org",S=e=>new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),C=e=>e?String(e).slice(0,5):"",L=(e,s,t,a)=>{if(!e&&!s)return"";const r=e||s,n=S(r),l=C(t),i=C(a),o=!!l||!!i,m=l?`${n}, ${l}`:n;let c;if(s&&s!==r){c=`${m} â ${i?`${S(s)}, ${i}`:S(s)}`}else c=a&&a!==t?`${m} â ${C(a)}`:m;return o?`${c} ET`:c},B=({fellow:e})=>{const t=(null==e?void 0:e.name)??"â";return s.jsx(f,{name:t,subtitle:null==e?void 0:e.title,avatarUrl:null==e?void 0:e.avatar_url,href:(null==e?void 0:e.slug)?`/fellows/${e.slug}`:null})},D=()=>{var f;const{id:S}=e(),{data:C,isLoading:D}=a(S),R=C?`${F}/events/${C.slug||C.id}`:F+"/events";if(D)return s.jsx(s.Fragment,{children:s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-3xl space-y-6",children:[s.jsx(r,{className:"h-8 w-48"}),s.jsx(r,{className:"aspect-video w-full"}),s.jsx(r,{className:"h-6 w-full"}),s.jsx(r,{className:"h-4 w-2/3"})]})})})});if(!C)return s.jsx(s.Fragment,{children:s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-2xl text-center",children:[s.jsx("p",{className:"text-muted-foreground mb-6",children:"Event not found or no longer available."}),s.jsxs(t,{to:"/events",className:"inline-flex items-center gap-2 text-primary hover:underline",children:[s.jsx(v,{className:"h-4 w-4"})," Back to Events"]})]})})})});const G=C.title,H=(null==(f=C.description)?void 0:f.replace(/\s+/g," ").slice(0,200).trim())||(L(C.event_date,C.end_date,C.event_time,C.end_time)?`Event: ${C.title}. ${L(C.event_date,C.end_date,C.event_time,C.end_time)}.`:`Event: ${C.title}.`),M=j(C.image_url);return s.jsxs(s.Fragment,{children:[s.jsxs(n,{children:[s.jsxs("title",{children:[G," | Events | Delphi Global Research Center"]}),s.jsx("meta",{name:"description",content:H}),s.jsx("meta",{property:"og:type",content:"website"}),s.jsx("meta",{property:"og:site_name",content:"Delphi Global Research Center"}),s.jsx("meta",{property:"og:title",content:G}),s.jsx("meta",{property:"og:description",content:H}),s.jsx("meta",{property:"og:url",content:R}),s.jsx("meta",{property:"og:image",content:M}),s.jsx("meta",{property:"og:image:secure_url",content:M}),s.jsx("meta",{property:"og:image:width",content:"1200"}),s.jsx("meta",{property:"og:image:height",content:"630"}),s.jsx("meta",{property:"og:image:alt",content:G}),s.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),s.jsx("meta",{name:"twitter:title",content:G}),s.jsx("meta",{name:"twitter:description",content:H}),s.jsx("meta",{name:"twitter:image",content:M}),s.jsx("link",{rel:"canonical",href:R})]}),s.jsx("div",{className:"min-h-screen bg-background",children:s.jsx("main",{className:"container py-16",children:s.jsxs("div",{className:"mx-auto max-w-4xl space-y-8",children:[s.jsxs(t,{to:"/events",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[s.jsx(v,{className:"h-4 w-4"})," Back to Events"]}),s.jsxs(l,{className:"overflow-hidden",children:[C.image_url&&s.jsx("div",{className:"aspect-video w-full overflow-hidden bg-muted",children:s.jsx("img",{sizes:"(max-width: 1024px) 100vw, 1024px",srcSet:m(C.image_url,c.hero),src:i(C.image_url,{width:o.hero}),alt:"",loading:"eager",decoding:"async",className:"h-full w-full object-cover"})}),s.jsxs(d,{className:"p-6 md:p-8 space-y-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[C.is_featured&&s.jsx(x,{variant:"secondary",children:"Featured"}),s.jsx("h1",{className:"font-heading text-2xl md:text-3xl font-bold text-foreground",children:C.title})]}),L(C.event_date,C.end_date,C.event_time,C.end_time)&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(w,{className:"h-4 w-4 flex-shrink-0"}),s.jsx("span",{children:L(C.event_date,C.end_date,C.event_time,C.end_time)})]}),C.location&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(N,{className:"h-4 w-4 flex-shrink-0"}),s.jsx("span",{children:C.location})]}),C.description&&s.jsx("div",{className:"text-foreground whitespace-pre-wrap leading-relaxed",children:C.description}),C.event_speakers&&C.event_speakers.length>0&&s.jsxs("div",{children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground mb-2 font-medium",children:[s.jsx(_,{className:"h-4 w-4"})," Speakers"]}),s.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:C.event_speakers.map(e=>s.jsx(B,{fellow:e.fellows},e.fellow_id))})]}),C.event_moderators&&C.event_moderators.length>0&&s.jsxs("div",{children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground mb-2 font-medium",children:[s.jsx(b,{className:"h-4 w-4"})," Moderators"]}),s.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:C.event_moderators.map(e=>s.jsx(B,{fellow:e.fellows},e.fellow_id))})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2 border-t border-border",children:[s.jsx(p,{...h(C)}),C.agenda_enabled&&s.jsxs(t,{to:`/events/${C.slug||C.id}/agenda`,className:"inline-flex items-center gap-2 font-medium text-primary hover:underline",children:[s.jsx(y,{className:"h-4 w-4"}),"View program"]}),C.youtube_url&&u(C)?s.jsxs("a",{href:C.youtube_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 font-medium text-primary hover:underline",children:[s.jsx(k,{className:"h-4 w-4"}),"Watch on YouTube"]}):null,C.program_file_url&&s.jsxs("a",{href:(P=C.program_file_url,P.toLowerCase().endsWith(".pdf")?P.includes("#")?`${P}&view=FitH`:`${P}#view=FitH`:P),target:"_blank",rel:"noopener noreferrer",className:"inline-flex max-w-full flex-wrap items-center gap-2 font-medium text-primary hover:underline",children:[s.jsx($,{className:"h-4 w-4 flex-shrink-0"}),s.jsx("span",{className:"break-words",children:"View program page"}),s.jsx(E,{className:"h-4 w-4 flex-shrink-0"})]}),C.link_url&&g(C)&&s.jsxs("a",{href:C.link_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 font-medium text-primary hover:underline",children:["Register ",s.jsx(E,{className:"h-4 w-4"})]})]})]})]}),C.related_publications&&C.related_publications.length>0&&s.jsxs("section",{className:"space-y-4",children:[s.jsxs("h2",{className:"font-heading text-xl font-semibold text-foreground flex items-center gap-2",children:[s.jsx($,{className:"h-5 w-5"}),"Related Publications"]}),s.jsx("ul",{className:"space-y-2",children:C.related_publications.map(e=>{const a=e.articles;return(null==a?void 0:a.slug)?s.jsx("li",{children:s.jsx(t,{to:`/articles/${a.slug}`,className:"text-primary hover:underline font-medium",children:a.title})},e.article_id):null})})]})]})})})]});var P};export{D as default};
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.