1import{u as e,j as s,L as t}from"./vendor-react-BH6F5oQJ.js";import{a}from"./vendor-query-CC4VRGyP.js";import{S as n,f as r,H as i,C as l,m as o,B as c}from"./index-dRqPaCFl.js";import{f as d}from"./useEventAgenda-BtQLJVXt.js";import{c as m,f as x}from"./vendor-icons-CaI5__By.js";import"./vendor-ui-B4WC06Sp.js";import"./vendor-supabase-COwyE4EW.js";const p="undefined"!=typeof window?window.location.origin:"";function h(e,s){return new Intl.DateTimeFormat("en-US",{timeZone:s,weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e))}const g=()=>{var g;const{id:j,sessionId:u}=e(),{data:v,isLoading:f,error:N}=a({queryKey:["event-agenda-session",u,j],queryFn:()=>d(u),enabled:!!u}),w=v&&j&&(v.event.slug===j||v.event.id===j),y=v&&j?`${p}/events/${j}/agenda/sessions/${u}`:"",_=y?`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(y)}`:"";if(f)return s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("main",{className:"container py-16 max-w-2xl",children:[s.jsx(n,{className:"h-8 w-48 mb-4"}),s.jsx(n,{className:"h-40 w-full"})]})});if(N||!v||!w)return s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("main",{className:"container py-16 max-w-xl text-center space-y-4",children:[s.jsx("p",{className:"text-muted-foreground",children:"Session not found or unavailable."}),s.jsx(r,{asChild:!0,variant:"outline",children:s.jsx(t,{to:"/events",children:"Events"})})]})});const{item:b,day:k,event:$}=v,F=$.agenda_timezone||"America/New_York",C=(null==(g=b.description)?void 0:g.replace(/\s+/g," ").slice(0,180).trim())||`${b.title} â ${$.title}`;return s.jsxs(s.Fragment,{children:[s.jsxs(i,{children:[s.jsxs("title",{children:[b.title," | ",$.title," | Program"]}),s.jsx("meta",{name:"description",content:C}),s.jsx("meta",{property:"og:title",content:`${b.title} | ${$.title}`}),s.jsx("meta",{property:"og:description",content:C}),s.jsx("meta",{property:"og:url",content:y}),$.image_url&&s.jsx("meta",{property:"og:image",content:$.image_url})]}),s.jsx("div",{className:"min-h-screen bg-background",children:s.jsxs("main",{className:"container py-10 max-w-2xl space-y-6",children:[s.jsx(r,{asChild:!0,variant:"ghost",size:"sm",className:"-ml-2",children:s.jsxs(t,{to:`/events/${j}/agenda`,className:"gap-2",children:[s.jsx(m,{className:"h-4 w-4"})," Full program"]})}),s.jsx(l,{children:s.jsxs(o,{className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(c,{variant:"outline",children:b.item_type}),b.track&&s.jsx(c,{variant:"secondary",children:b.track.name})]}),s.jsx("h1",{className:"font-heading text-2xl font-bold",children:b.title}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[$.title," · ",k.label||`Day ${k.day_index}`," ·"," ",h(b.starts_at,F)," â ",h(b.ends_at,F)]}),b.room&&s.jsxs("p",{className:"text-sm",children:["Room: ",b.room.label]}),b.location_note&&s.jsx("p",{className:"text-sm text-muted-foreground",children:b.location_note}),b.description&&s.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:b.description}),b.event_agenda_item_speakers&&b.event_agenda_item_speakers.length>0&&s.jsx("ul",{className:"text-sm space-y-1 border-t pt-3",children:b.event_agenda_item_speakers.map(e=>s.jsx("li",{children:e.fellows?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:e.fellows.name}),e.fellows.title?` â ${e.fellows.title}`:""]}):s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:e.guest_name}),e.guest_title?` â ${e.guest_title}`:""]})},e.id))})]})}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start",children:[_&&s.jsx("div",{className:"rounded-lg border bg-card p-3",children:s.jsx("img",{src:_,width:160,height:160,alt:"Session QR",className:"rounded"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(r,{type:"button",className:"gap-2",onClick:()=>{navigator.clipboard.writeText(y)},children:[s.jsx(x,{className:"h-4 w-4"})," Copy link for social / chat"]}),s.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:"Paste the link in LinkedIn, X, or Facebook â preview text comes from this page's meta tags."})]})]})]})})]})};export{g 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.