1import{_ as Y}from"./BH5mcRLb.js";import{_ as Z,a as ee,b as te,c as ne,d as se,e as ae}from"./IfMfTlqy.js";import{d as k,h as U,o as a,B as _,ab as S,u as t,w as x,f as V,e as L,I as D,l as I,a9 as G,E as oe,a8 as re,c as u,F as T,aa as j,t as g,b as h,x as w,p as R,q as J,v as ie,a as p,r as ce,j as f,al as le,ag as K,_ as me,ah as ue,am as _e,an as de,m as pe,ao as fe,s as ve,n as ge,H as ye,ap as H,aq as he,k as M,ar as q,as as xe,at as ke,au as be}from"./BBsw3eGQ.js";import{i as Ee,a as $e}from"./CF0zyXkr.js";import"./BHuE53F1.js";const Le=k({name:"EventUnregisterLink",__name:"EventUnregisterLink",props:{event:{}},setup(e){const n=e,r=U(),l=L(()=>r({name:"community_event_unregister",params:D(n.event)}));return(i,m)=>{const c=S;return a(),_(c,{to:t(l),class:"event-unregister-link"},{default:x(()=>[V(i.$slots,"default")]),_:3},8,["to"])}}}),Pe=Object.assign(Le,{__name:"EventUnregisterLink"}),we=k({name:"EventRegisterLink",__name:"EventRegisterLink",props:{event:{}},setup(e){const n=e,r=U(),l=L(()=>r({name:"community_event_register",params:D(n.event)}));return(i,m)=>{const c=S;return a(),_(c,{to:t(l),prefetch:!1,class:"event-register-link"},{default:x(()=>[V(i.$slots,"default")]),_:3},8,["to"])}}}),Re=Object.assign(we,{__name:"EventRegisterLink"}),Ue={key:1},De=k({name:"EventRegistrationButton",__name:"EventRegistrationButton",props:{event:{}},setup(e){const{t:n}=I(),{isEnabled:r}=G(),l=r("event-registration"),{userInfo:i}=oe(),m=e,c=w(!1),v=w(!1),d=w(!1);async function y(){v.value=!0,d.value=!1;try{c.value=await Ee(m.event)}finally{v.value=!1,d.value=!0}}return re(()=>i.value?.profile,s=>{s?y():c.value=!1},{immediate:!0}),(s,b)=>{const o=Pe,E=Re;return t(l)?(a(),u(T,{key:0},[!t(i)?.profile||t(d)?(a(),u(T,{key:0},[t(c)?(a(),_(o,{key:0,event:e.event,class:"event-registration-button block h-12 w-full rounded-xl bg-primary px-4 py-3 text-center font-semibold leading-6 text-surface transition-opacity hover:opacity-90"},{default:x(()=>[j(g(t(n)("community.unregister")),1)]),_:1},8,["event"])):(a(),_(E,{key:1,event:e.event,class:"event-registration-button block h-12 w-full rounded-xl bg-primary px-4 py-3 text-center font-semibold leading-6 text-surface transition-opacity hover:opacity-90"},{default:x(()=>[j(g(t(n)("community.register")),1)]),_:1},8,["event"]))],64)):h("",!0)],64)):(a(),u("div",Ue))}}}),Ie=Object.assign(De,{__name:"EventRegistrationButton"}),Ce=k({name:"EventParticipantsLink",__name:"EventParticipantsLink",props:{event:{}},setup(e){const n=e,r=U(),l=L(()=>r({name:"community_event_participants",params:D(n.event)}));return(i,m)=>{const c=S;return a(),_(c,{class:"event-participants-link",to:t(l)},{default:x(()=>[V(i.$slots,"default")]),_:3},8,["to"])}}}),Ae=Object.assign(Ce,{__name:"EventParticipantsLink"}),Be={class:"event-participants-card"},Ne={class:"mb-3 text-sm font-semibold uppercase tracking-wide text-surface lg:mb-4"},Oe={key:0,class:"text-sm text-surface"},Te={key:1,class:"space-y-3"},je={class:"size-10 shrink-0 overflow-hidden rounded-full bg-secondary"},Se={key:1,class:"grid h-full w-full place-items-center text-white"},Ve={class:"truncate text-sm font-medium text-surface group-hover:text-current"},ze=k({name:"EventParticipantsCard",__name:"EventParticipantsCard",props:{event:{}},async setup(e){let n,r;const l=e,{t:i}=I(),{data:m}=([n,r]=R(()=>J(`/community/events/${l.event.id}/participants/people`,{query:{limit:10},transform:ie}).catch(()=>({data:w([])}))),n=await n,r(),n);return(c,v)=>{const d=K,y=me,s=le,b=Ae;return a(),u("div",Be,[p("h3",Ne,g(t(i)("eventParticipants.title")),1),t(m)?.length?(a(),u("ul",Te,[(a(!0),u(T,null,ce(t(m),o=>(a(),u("li",{key:o.id},[f(s,{"person-id":o.id,class:"group flex items-center gap-3"},{default:x(()=>[p("div",je,[o.profileImageURL?(a(),_(d,{key:0,src:o.profileImageURL,alt:[o.firstName,o.lastName].filter(Boolean).join(" "),ratio:"1:1",size:"ld",class:"size-full"},null,8,["src","alt"])):(a(),u("div",Se,[f(y,{class:"size-5"})]))]),p("span",Ve,g([o.firstName,o.lastName].filter(Boolean).join(" ")),1)]),_:2},1032,["person-id"])]))),128))])):(a(),u("p",Oe,g(t(i)("eventParticipants.empty")),1)),t(m)?.length?(a(),_(b,{key:2,event:e.event,class:"mt-4 block text-sm font-medium text-primary hover:underline"},{default:x(()=>[j(g(t(i)("actions.seeMore")),1)]),_:1},8,["event"])):h("",!0)])}}}),Fe=Object.assign(ze,{__name:"EventParticipantsCard"}),He={class:"grid gap-6 lg:grid-cols-3 lg:gap-8"},Me={class:"block order-last space-y-6"},qe=["href"],Ge={class:"text-sm font-medium"},Je={class:"space-y-6 lg:col-span-2"},Ke={class:"overflow-hidden rounded-xl bg-card"},Qe={class:"w-full overflow-hidden bg-surface/5"},We={class:"space-y-3 p-4 lg:p-6"},Xe={class:"text-2xl font-bold leading-tight tracking-tight text-surface lg:text-3xl"}
1,Ye=["innerHTML"],Ze=k({name:"DefaultEventViewer",__name:"DefaultEventViewer",props:{profile:{}},setup(e){const{t:n}=I(),{isEnabled:r}=G(),l=r("event-registration"),i=e,m=L(()=>$e(i.profile)),c=L(()=>_e(i.profile));return(v,d)=>{const y=Y,s=Z,b=Ie,o=ue,E=ee,C=Fe,A=K,$=te,B=ne;return a(),u("div",He,[p("div",Me,[f(y,{"starts-at":e.profile.startsAt,"ends-at":e.profile.endsAt,"is-all-day":e.profile.isAllDay,class:"rounded-lg bg-secondary p-4"},null,8,["starts-at","ends-at","is-all-day"]),f(s,{categories:e.profile.categories,class:"rounded-xl bg-card p-4 lg:p-6"},null,8,["categories"]),t(l)&&!e.profile.subscriptionURL&&t(m)?(a(),_(b,{key:0,event:e.profile},null,8,["event"])):h("",!0),e.profile.subscriptionURL&&t(m)?(a(),u("a",{key:1,href:e.profile.subscriptionURL,target:"_blank",rel:"noopener noreferrer",class:"flex items-center gap-3 rounded-xl bg-card p-4 transition-colors hover:bg-primary hover:text-white"},[f(o,{class:"size-5 shrink-0"}),p("span",Ge,g(t(n)("community.registerToThisEvent")),1)],8,qe)):h("",!0),f(E,{address:e.profile.address,contact:e.profile.contact,"profile-type":e.profile.profileType,class:"rounded-xl bg-card p-4 lg:p-6"},null,8,["address","contact","profile-type"]),t(l)?(a(),_(C,{key:2,event:e.profile,class:"rounded-xl bg-card p-4 lg:p-6"},null,8,["event"])):h("",!0)]),p("div",Je,[p("div",Ke,[p("div",Qe,[t(c)?(a(),_(A,{key:0,src:t(c),alt:e.profile.name??"",fit:"contain",size:"hd"},null,8,["src","alt"])):(a(),_($,{key:1}))]),p("div",We,[p("h1",Xe,g(e.profile.name),1),e.profile.summaryHtml?(a(),u("div",{key:0,class:"prose prose-sm max-w-none text-surface",innerHTML:e.profile.summaryHtml},null,8,Ye)):h("",!0),f(B,{blocks:e.profile.description?.blocks,class:"border-t border-surface/10 pt-4 lg:pt-6"},null,8,["blocks"])])])])])}}}),et=Object.assign(Ze,{__name:"DefaultEventViewer"}),tt={key:0,class:"container py-8"},it=k({name:"CommunityEventDetailPage",__name:"[eventId]",async setup(e){let n,r;const l=et,{t:i}=I(),{formatDateRange:m,formatTimeRange:c}=de(),v=U(),d=pe(),{media:y}=([n,r]=R(()=>fe()),n=await n,r(),n),{data:s,error:b}=([n,r]=R(()=>J(`/community/events/${d.params.eventId}`,{transform:ve})),n=await n,r(),n);if(b.value||!s.value)throw ge({statusCode:404,statusMessage:"Event not found"});d.params.year||([n,r]=R(()=>ye(v({name:"community_event",params:D(s.value)}),{replace:!0})),await n,r());const o=s.value.address,E=o?[o.city,o.state,o.country].filter(Boolean).join(", "):null,C=m(s.value.startsAt,s.value.endsAt,s.value.isAllDay),A=s.value.isAllDay?null:c(s.value.startsAt,s.value.endsAt),$=H(s.value.name)??"",B=[C,A||i("community.allDay"),E,s.value.summaryText].filter(Boolean),N=H(B.join(" â ")),O=s.value.profileImageURL||null,z=Q(s.value);function Q(P){if(P.canonicalUrl)return P.canonicalUrl;const F=v({name:"community_events",params:{year:void 0,month:void 0,day:void 0}});return new URL(`${F}/${P.id}`,he().url).href}return M({title:$,meta:[{property:"og:title",content:$},{name:"description",content:N},{property:"og:description",content:N},{property:"og:url",content:z}]}),M({link:[{rel:"canonical",href:z}]}),O?q({}):q({}),xe([ke({name:$,description:N,startDate:s.value.startsAt.toISOString(),endDate:s.value.endsAt.toISOString(),...O&&{image:O},...o&&{location:{"@type":"Place",name:E,address:{"@type":"PostalAddress",streetAddress:o.street||void 0,addressLocality:o.city||void 0,addressRegion:o.state||void 0,addressCountry:o.country||void 0}}}}),be({itemListElement:[{name:y.value?.displayName||"Home",item:"/"},{name:i("events.title"),item:v({name:"community_events"})},{name:$}]})]),(P,F)=>{const W=se,X=ae;return t(s)?(a(),u("div",tt,[f(W,{profile:t(s),"profile-kind":"event","profile-type":t(s).profileType?.key,fallback:t(l)},null,8,["profile","profile-type","fallback"]),f(X,{"profile-type":"events","profile-id":t(d).params.eventId,class:"mt-8"},null,8,["profile-id"])])):h("",!0)}}});export{it 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.