1import{c as le,r as d,s as A,j as e,X as ie,C as T,u as S,I as G,B as f,S as oe,b as me,d as de,f as ce,L as _,M as xe,A as Y}from"./index-CK3vutSl.js";import{S as ue}from"./SEOHead-CON3zavc.js";import{N as F}from"./Navbar-BUpDNnzb.js";import{F as he}from"./Footer-FFVJjLyw.js";import{a as pe}from"./useAppCommunities-D64U6F5i.js";import{n as fe}from"./notifyMember-DNXOQvUn.js";import{u as ge}from"./useRequireMembership-Cc4lxE6k.js";import{g as be}from"./communityCovers-C6qFsZx_.js";import{C as K}from"./camera-ChDGjUbQ.js";import{L as O}from"./loader-circle-XW1Y8Qce.js";import{L as je}from"./link-2-BNr-27Ip.js";import{T as Ne}from"./textarea-CymhbYJ8.js";import{D as ve,a as ye,c as V,d as Z,b as we}from"./dialog-CaAso78V.js";import{C as _e}from"./circle-check-C6IuHH5E.js";import{o as ke,s as R}from"./types-CkIM-bQt.js";import{L as Ce}from"./Lightbox-BpyjDVop.js";import{A as Q}from"./arrow-left-BUIXgTrn.js";import{G as X}from"./user-COEoZknB.js";import{I as Se}from"./instagram-DeBoCUzc.js";import{E as C}from"./external-link-Iw7g49f4.js";import{L as Me}from"./lock-C1R_uXig.js";import{U as ee}from"./users-yySNN4BJ.js";import{M as se}
1from"./map-pin-BOiT9jNc.js";import{M as Le}from"./monitor-D8Ky6Ht_.js";import{C as Ee}from"./compass-DKm21LtY.js";import{S as Ae}from"./sparkles-ubwtpnfR.js";import{C as Oe}from"./calendar-DiVt_6eG.js";import{Z as te}from"./zap-BjYdfLPn.js";import{f as ze}from"./format-OtXgTV4o.js";import"./useIsAdmin-BuXYVmKR.js";import"./useProfile-B5IlLGJw.js";import"./avatar-C3uy22Nn.js";import"./index-BsnkaMDn.js";import"./Combination-CMXmbd7n.js";import"./index-0mbE7Hqp.js";import"./chevron-right-CWRhAgdX.js";import"./settings-CZ-FKz03.js";import"./log-out-BwoLdbKR.js";import"./house-DvWMWEH7.js";import"./message-square-bZ_BbvsG.js";import"./plus-D178_5fr.js";import"./calendar-days-Bm2AhvK-.js";import"./heart-CV_CSns9.js";import"./star-DA5biP6Q.js";import"./building-2-tZ3PgJs7.js";import"./useMembership-D0seokH0.js";import"./useQuery-Cmekee7_.js";import"./community-dinner-Barq20oa.js";import"./group-photo-BkzmwMP3.js";import"./gathering-DTUJRNWb.js";import"./outdoor-yoga-DCKnSNVy.js";import"./skiing-adventure-BhZ-JleR.js";import"./community-3-BFEbyRY3.js";import"./index-DbsHWzTR.js";import"./chevron-left-NvjWjqI7.js";import"./en-US-CulqtCeB.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Fe=le("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Re=le("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);function Te(n){const[x,c]=d.useState([]),[s,l]=d.useState(!1);return d.useEffect(()=>{if(!n)return;l(!0),A.from("ccr_events").select("id, slug, title, description, format, event_type, location_name, starts_at, ends_at, cover_image, rsvp_count, price_cents, currency").eq("community_id",n).eq("status","published").gte("starts_at",new Date().toISOString()).order("starts_at",{ascending:!0}).limit(6).then(({data:j})=>{c(j??[]),l(!1)})},[n]),{events:x,loading:s}}function De({communityId:n,onUpdated:x}){const c=d.useRef(null),[s,l]=d.useState(!1),[i,j]=d.useState(""),[o,u]=d.useState(!1),g=A,N=async a=>{const{error:h}=await g.from("ccr_communities").update({cover_image:a}).eq("id",n);if(h){S.error(h.message);return}x(a),S.success("Cover updated"),l(!1),j("")},k=async a=>{var w;const h=(w=a.target.files)==null?void 0:w[0];if(!h)return;u(!0);const r=h.name.split(".").pop(),p=`${n}/${Date.now()}.${r}`,{error:m}=await A.storage.from("community-covers").upload(p,h,{upsert:!0});if(m){S.error(m.message),u(!1);return}const{data:M}=A.storage.from("community-covers").getPublicUrl(p);await N(M.publicUrl),u(!1),a.target.value=""};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>l(!0),className:"absolute top-[92px] right-4 z-30 flex items-center gap-1.5 rounded-full bg-black/50 backdrop-blur-sm border border-white/20 text-white text-xs font-medium px-3 py-1.5 hover:bg-black/70 transition-colors",title:"Change cover photo",children:[e.jsx(K,{size:13}),"Change cover"]}),s&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:()=>l(!1),children:e.jsxs("div",{className:"bg-background border border-border rounded-2xl shadow-2xl w-full max-w-sm p-6 relative",onClick:a=>a.stopPropagation(),children:[e.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-muted-foreground hover:text-foreground",children:e.jsx(ie,{size:18})}),e.jsx("h3",{className:"font-semibold text-base mb-4",children:"Change cover photo"}),e.jsxs("button",{onClick:()=>{var a;return(a=c.current)==null?void 0:a.click()},disabled:o,className:"w-full flex items-center gap-3 rounded-xl border border-dashed border-border hover:border-primary/60 hover:bg-muted/40 transition-colors p-4 mb-3 text-sm font-medium",children:[o?e.jsx(O,{size:18,className:"animate-spin text-primary"}):e.jsx(K,{size:18,className:"text-muted-foreground"}),o?"Uploadingâ¦":"Upload from device"]}),e.jsx("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:k}),e.jsxs("div",{className:"flex items-center gap-2 my-3",children:[e.jsx("div",{className:"flex-1 h-px bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or paste URL"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(je,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx("input",{type:"url",value:i,onChange:a=>j(a.target.value),onKeyDown:a=>a.key==="Enter"&&i&&N(i),placeholder:"https://...",className:"w-full rounded-lg border border-border bg-muted/30 pl-8 pr-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary/40"})]}),e.jsx("button",{onClick:()=>i&&N(i),disabled:!i,className:"rounded-lg bg-primary text-primary-foreground px-3 py-2 disabled:opacity-40 hover:bg-primary/90 transition-colors",children:e.jsx(T,{size:16})})]})]})})]})}const He=ke({name:R().trim().min(1,"Name is required").max(100),email:R().trim().email("Invalid email address").max(255),message:R().trim().min(1,"Write a short message").max(3e3)});function Ie({open:n,onOpenChange:x,communitySlug:c,communityName:s,topic:l}
11){const[i,j]=d.useState({name:"",email:"",message:""}),[o,u]=d.useState({}),[g,N]=d.useState("idle"),k=(r,p)=>{j(m=>({...m,[r]:p})),o[r]&&u(m=>({...m,[r]:void 0}))},a=r=>{!r&&g==="sent"&&(j({name:"",email:"",message:""}),N("idle")),x(r)},h=async r=>{r.preventDefault();const p=He.safeParse(i);if(!p.success){const w={};p.error.errors.forEach(L=>{L.path[0]&&(w[L.path[0]]=L.message)}),u(w);return}N("sending");const{data:m,error:M}=await A.functions.invoke("contact-submit",{body:{...p.data,subject:`${l} â ${s}`,source:`community/${c}`,community_slug:c}});N(M||m!=null&&m.error?"error":"sent")};return e.jsx(ve,{open:n,onOpenChange:a,children:e.jsx(ye,{className:"sm:max-w-md",children:g==="sent"?e.jsxs("div",{className:"text-center py-6",children:[e.jsx(_e,{className:"h-10 w-10 text-primary mx-auto mb-3"}),e.jsx(V,{className:"mb-2",children:"Message sent"}),e.jsxs(Z,{children:["The ",s," leaders will get back to you by email."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(V,{children:l}),e.jsxs(Z,{children:["Your message goes to the leaders of ",s,". They'll reply by email."]})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(G,{placeholder:"Your name",value:i.name,onChange:r=>k("name",r.target.value),"aria-label":"Name"}),o.name&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:o.name})]}),e.jsxs("div",{children:[e.jsx(G,{type:"email",placeholder:"Email",value:i.email,onChange:r=>k("email",r.target.value),"aria-label":"Email"}),o.email&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:o.email})]})]}),e.jsxs("div",{children:[e.jsx(Ne,{rows:5,placeholder:"Your question or ideaâ¦",value:i.message,onChange:r=>k("message",r.target.value),"aria-label":"Message"}),o.message&&e.jsx("p",{className:"text-xs text-destructive mt-1",children:o.message})]}),g==="error"&&e.jsxs("p",{className:"text-sm text-destructive",children:["Could not send. Please try again or email"," ",e.jsx("a",{href:"mailto:[email protected]",className:"underline",children:"[email protected]"}),"."]}),e.jsx(f,{type:"submit",className:"w-full rounded-full",disabled:g==="sending",children:g==="sending"?e.jsx(O,{className:"h-4 w-4 animate-spin"}):e.jsxs(e.Fragment,{children:["Send ",e.jsx(oe,{className:"ml-2 h-4 w-4"})]})})]})]})})})}const qe=["Meet people who share your passion â in real places","Member rates at every coliving in the network","Events, trips and workations with the community","Support to organise your own meetups"],Ue="Join the community, meet up at events and colivings across the network, and organise your own meetups â we help with places and promotion.",$e={workation:"Workation",hiking:"Hiking",retreat:"Retreat",coworking:"Coworking",dinner:"Dinner",other:"Event"},Pe={workation:"ð¡",hiking:"ð¥¾",retreat:"ð§",coworking:"ð»",dinner:"ð½ï¸",other:"ð
"},re=["#c026d3","#7c3aed","#2563eb","#0891b2","#16a34a","#d97706","#dc2626","#db2777"];function ae(n){const x=(n.charCodeAt(0)??0)%re.length;return re[x]}function ne(n){return n.split(" ").slice(0,2).map(x=>x[0]).join("").toUpperCase()}function Js(){var U,$,P;const{slug:n}=me(),x=de(),{user:c}=ce(),{community:s,members:l,loading:i,error:j}=pe(n),{events:o}=Te(s==null?void 0:s.id),[u,g]=d.useState(!1),[N,k]=d.useState(null),{requireMember:a}=ge(),[h,r]=d.useState(null),[p,m]=d.useState(null),M=A,w=async()=>{if(!c){x(`/auth?redirect=/community/${n}`);return}if(s&&a({ref:s.slug})){if(g(!0),s.type==="open"){const{error:t}=await M.from("ccr_community_members").insert({community_id:s.id,user_id:c.id});t?S.error(t.message):S.success(`Joined ${s.name}!`)}else if(s.type==="apply"){const{error:t}=await M.from("ccr_community_join_requests").insert({community_id:s.id,user_id:c.id});t?S.error(t.message):(S.success("Request sent â a leader will review it"),fe({type:"join_request",community_name:s.name}))}g(!1)}};if(i)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(F,{}),e.jsx("div",{className:"flex justify-center py-40",children:e.jsx(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})})]});if(j||!s)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(F,{}),e.jsxs("div",{className:"max-w-xl mx-auto px-4 py-32 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-6",children:"Community not found."}),e.jsx(f,{asChild:!0,variant:"outline",className:"rounded-full",children:e.jsxs(_,{to:"/community",children:[e.jsx(Q,{className:"mr-2 h-4 w-4"})," All Communities"]})})]})]});const L=[s.website_url&&{href:s.website_url,label:"Website",icon:X},s.instagram_url&&{href:s.instagram_url,label:"Instagram",icon:Se},s.whatsapp_url&&{href:s.whatsapp_url,label:"WhatsApp",icon:C},s.telegram_url&&{href:s.telegram_url,label:"Telegram",icon:C},s.discord_url&&{href:s.discord_url,label:"Discord",icon:C},s.newsletter_url&&{href:s.newsletter_url,label:"Newsletter",icon:C}
11].filter(Boolean),D=s.type==="invite",H=s.type==="apply"?"Apply to join":"Join Community",v=l.filter(t=>t.role==="leader").slice(0,3).map(t=>{var b,y,E,z;return{name:((b=t.profile)==null?void 0:b.full_name)??((y=t.profile)==null?void 0:y.username)??"Community leader",avatar:((E=t.profile)==null?void 0:E.avatar_url)??null,location:((z=t.profile)==null?void 0:z.location)??null}});v.length===0&&s.lead_name&&v.push({name:s.lead_name,avatar:s.lead_avatar_url??null,location:null});const I=l.slice(0,9),q=Math.max(0,s.member_count-I.length);return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(ue,{title:`${s.name} â Coliving Revolution`,description:s.tagline??s.description??`${s.name} is a community on Coliving Revolution.`}),e.jsx(F,{}),e.jsx("section",{className:"relative -mt-[84px]",children:e.jsxs("div",{className:"h-80 md:h-[440px] w-full overflow-hidden relative",children:[e.jsx("img",{src:N??be(s),alt:s.name,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-black/40"}),e.jsxs(_,{to:"/community",className:"absolute top-[72px] left-5 md:left-8 flex items-center gap-1.5 text-white/75 hover:text-white text-sm transition-colors",children:[e.jsx(Q,{className:"h-4 w-4"})," Communities"]}),c&&(s.member_role==="leader"||s.created_by===c.id)&&e.jsx(De,{communityId:s.id,onUpdated:t=>k(t)}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-5 md:px-10 pb-8 md:pb-10",children:e.jsxs("div",{className:"max-w-4xl mx-auto flex items-end justify-between gap-6",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-4xl mb-3 leading-none",children:s.emoji}),e.jsx("h1",{className:"font-heading text-3xl md:text-5xl font-bold text-white leading-tight mb-2",children:s.name}),s.tagline&&e.jsx("p",{className:"text-white/70 text-sm md:text-base leading-snug max-w-xl",children:s.tagline})]}),e.jsx("div",{className:"shrink-0 pb-1",children:D?e.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-white/70 border border-white/30 rounded-full px-4 py-2",children:[e.jsx(Me,{className:"h-3.5 w-3.5"})," Invite only"]}):s.is_member?e.jsx(f,{asChild:!0,variant:"outline",size:"sm",className:"rounded-full bg-white/10 border-white/30 text-white hover:bg-white/20",children:e.jsx(_,{to:`/communities/${n}`,children:"Go to Community"})}):s.has_pending_request?e.jsx("span",{className:"text-sm text-white/60 italic",children:"Request pending"}):e.jsx(f,{size:"default",className:"rounded-full px-7 font-semibold shadow-lg",onClick:w,disabled:u,children:u?e.jsx(O,{className:"h-4 w-4 animate-spin"}):H})})]})})]})}),e.jsx("div",{className:"border-b border-border bg-card/80 backdrop-blur-sm sticky top-[60px] z-20",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-5 md:px-8 py-3 flex flex-wrap items-center gap-x-5 gap-y-2",children:[s.category&&e.jsx("span",{className:"text-xs font-semibold bg-primary/10 text-primary border border-primary/15 px-2.5 py-1 rounded-full",children:s.category}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s.member_count," ",s.member_count===1?"member":"members"]}),s.location_name&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(se,{className:"h-3.5 w-3.5"})," ",s.location_name]}),s.location_type==="online"&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Le,{className:"h-3.5 w-3.5"})," Online"]}),s.location_type==="global"&&!s.location_name&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(X,{className:"h-3.5 w-3.5"})," Global"]}),v.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Led by ",e.jsx("span",{className:"text-foreground font-medium",children:v.map(t=>t.name).join(", ")})]})]})}),e.jsxs("div",{className:"max-w-4xl mx-auto px-5 md:px-8 py-12 space-y-14",children:[s.description&&e.jsxs("section",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-4",children:"About"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap text-[15px]",children:s.description})]}),s.who_is_for&&e.jsxs("section",{className:"rounded-2xl bg-muted/40 border border-border p-6 flex gap-4",children:[e.jsx(Ee,{className:"h-6 w-6 text-primary shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-heading text-lg font-bold mb-1",children:"Who is it for"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.who_is_for})]})]}),e.jsxs("section",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[e.jsxs("h2",{className:"font-heading text-lg font-bold mb-4 flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5 text-primary"})," What you get"]}),e.jsx("ul",{className:"space-y-2.5",children:((U=s.what_you_get)!=null&&U.length?s.what_you_get:qe).map(t=>e.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(T,{className:"h-4 w-4 text-primary mt-0.5 shrink-0"}),e.jsx("span",{children:t})]},t))})]}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[e.jsxs("h2",{className:"font-heading text-lg font-bold mb-4 flex items-center gap-2",children:[e.jsx(ee,{className:"h-5 w-5 text-primary"}
11)," How it works"]}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.how_it_works||Ue})]})]}),!!(($=s.gallery_images)!=null&&$.length)&&e.jsxs("section",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-5",children:"Photos"}),e.jsx("div",{className:`grid gap-2 ${[2,4].includes(s.gallery_images.length)?"grid-cols-2":"grid-cols-2 sm:grid-cols-3"}`,children:s.gallery_images.map((t,b)=>e.jsx("button",{type:"button",onClick:()=>m(b),className:`relative overflow-hidden rounded-xl bg-muted ${b===0&&(s.gallery_images.length===3||s.gallery_images.length>=5)?"col-span-2 row-span-2 aspect-square sm:aspect-auto":"aspect-square"}`,children:e.jsx("img",{src:t,alt:`${s.name} photo ${b+1}`,loading:"lazy",className:"absolute inset-0 w-full h-full object-cover hover:scale-105 transition-transform duration-300"})},t))})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-5",children:v.length===1?"Community leader":"Community leaders"}),v.length>0?e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:v.map(t=>e.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card p-4",children:[e.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden flex items-center justify-center text-sm font-bold text-white shrink-0",style:{background:t.avatar?void 0:ae(t.name)},children:t.avatar?e.jsx("img",{src:t.avatar,alt:t.name,className:"w-full h-full object-cover"}):ne(t.name)}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-semibold leading-tight truncate",children:t.name}),e.jsxs("p",{className:"text-xs text-primary flex items-center gap-1 mt-0.5",children:[e.jsx(Re,{className:"h-3 w-3"})," Leader"]}),t.location&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.location})]})]},t.name))}):null,v.length>0?e.jsxs(f,{variant:"outline",className:"rounded-full mt-4",onClick:()=>r("Question for the leaders"),children:[e.jsx(xe,{className:"mr-2 h-4 w-4"})," Ask the ",v.length===1?"leader":"leaders"]}):e.jsxs("div",{className:"rounded-2xl border border-dashed border-border p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This community is looking for a leader. Want to bring people together?"}),e.jsx(f,{asChild:!0,variant:"outline",size:"sm",className:"rounded-full shrink-0",children:e.jsx(_,{to:"/contact",children:"Become a leader"})})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-5",children:"What it costs"}),e.jsxs("div",{className:"rounded-2xl border border-primary/30 bg-primary/5 p-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-start gap-6",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-semibold mb-1",children:s.is_partner?"Coliving Revolution membership":"Included in your Coliving Revolution membership"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"One membership for all communities â plus member rates at every coliving in the network."}),e.jsx("ul",{className:"space-y-1.5 text-sm",children:[["1 year","CHF 250","CHF 500"],["3 years","CHF 500","CHF 1,000"],["Lifetime","CHF 1,250","CHF 2,500"]].map(([t,b,y])=>e.jsxs("li",{className:"flex items-baseline justify-between gap-4 max-w-xs",children:[e.jsx("span",{children:t}),e.jsxs("span",{children:[e.jsx("span",{className:"text-xs text-muted-foreground line-through mr-2",children:y}),e.jsx("span",{className:"font-bold text-primary",children:b})]})]},t))}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Early-bird prices â 50% off until 1 July 2027."})]}),s.is_partner&&e.jsxs("div",{className:"md:w-64 rounded-xl bg-card border border-border p-4 text-sm space-y-3",children:[s.community_fee_chf?e.jsxs("p",{children:[e.jsxs("span",{className:"font-semibold",children:["+ CHF ",s.community_fee_chf," / year"]})," ",e.jsxs("span",{className:"text-muted-foreground",children:["community fee, set by ",s.name,"."]})]}):e.jsx("p",{className:"text-muted-foreground",children:"No extra community fee."}),e.jsxs("p",{className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(T,{className:"h-4 w-4 text-primary mt-0.5 shrink-0"}),e.jsxs("span",{children:["â
of the membership fees from this community's members go directly to ",s.name,"."]})]})]})]}),e.jsx(f,{asChild:!0,className:"rounded-full mt-6",children:e.jsxs(_,{to:"/membership",children:["See membership ",e.jsx(Y,{className:"ml-2 h-4 w-4"})]})})]})]}),l.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("h2",{className:"font-heading text-xl font-bold",children:"Members"}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[s.member_count," people"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I.map((t,b)=>{var W,B,J;const y=((W=t.profile)==null?void 0:W.full_name)??((B=t.profile)==null?void 0:B.username)??"?",E=(J=t.profile)==null?void 0:J.avatar_url,z=ae(y);return e.jsx("div",{title:y,className:"w-10 h-10 rounded-full border-2 border-background shadow-sm overflow-hidden flex items-center justify-center text-xs font-bold text-white shrink-0",style:{background:E?void 0:z}
11,children:E?e.jsx("img",{src:E,alt:y,className:"w-full h-full object-cover"}):ne(y)},b)}),q>0&&e.jsxs("div",{className:"w-10 h-10 rounded-full border-2 border-background shadow-sm bg-muted flex items-center justify-center text-[10px] font-bold text-muted-foreground shrink-0",children:["+",q]}),!s.is_member&&!D&&!s.has_pending_request&&e.jsx(f,{size:"sm",variant:"outline",className:"rounded-full ml-2 h-10 px-5 font-medium text-xs",onClick:w,disabled:u,children:u?e.jsx(O,{className:"h-3.5 w-3.5 animate-spin"}):H})]})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("h2",{className:"font-heading text-xl font-bold",children:"Events & Workations"}),e.jsxs(_,{to:"/events",className:"text-sm text-primary hover:underline flex items-center gap-1 font-medium",children:["See all ",e.jsx(Y,{className:"h-3.5 w-3.5"})]})]}),o.length===0&&e.jsxs("div",{className:"rounded-2xl border border-dashed border-border p-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold mb-1",children:"No event planned yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Got an idea â a hike, a dinner, a workation? Suggest it and we'll help make it happen."})]}),e.jsxs(f,{className:"rounded-full shrink-0",onClick:()=>r("Event idea"),children:[e.jsx(Fe,{className:"mr-2 h-4 w-4"})," Suggest an event"]})]}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(t=>e.jsxs("div",{className:"rounded-2xl border border-border bg-card overflow-hidden flex items-stretch hover:border-primary/30 hover:shadow-sm transition-all duration-200",children:[e.jsx("div",{className:"w-1.5 shrink-0 bg-primary/50 rounded-l-2xl"}),e.jsxs("div",{className:"p-4 flex items-start gap-3 flex-1",children:[e.jsx("span",{className:"text-2xl shrink-0 mt-0.5",children:Pe[t.format]??"ð
"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-sm leading-snug mb-1.5",children:t.title}),e.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Oe,{className:"h-3 w-3"}),ze(new Date(t.starts_at),"d MMM yyyy")]}),t.location_name&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(se,{className:"h-3 w-3"})," ",t.location_name]})]})]}),e.jsx("span",{className:"text-[10px] font-semibold bg-muted px-2 py-1 rounded-full text-muted-foreground capitalize shrink-0 mt-0.5",children:$e[t.format]??t.format})]})]},t.id))})]}),e.jsxs("section",{className:"rounded-2xl border border-border bg-card p-6 md:p-8",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(te,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-1",children:"Contribute"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Communities grow through contribution. Host, teach, organize â and earn in return."})]})]}),e.jsx("div",{className:"grid gap-2.5 sm:grid-cols-2 mb-6",children:[{title:"Host a workshop",desc:"Share your skills with the community"},{title:"Organize an event",desc:"Bring people together around a shared interest"},{title:"Facilitate a session",desc:"Lead a group conversation or mastermind"},{title:"Stay & Contribute",desc:"Work in exchange for accommodation"}].map(t=>e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4 hover:bg-muted/60 transition-colors",children:[e.jsx("p",{className:"font-semibold text-sm mb-0.5",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.desc})]},t.title))}),e.jsxs("div",{className:"flex flex-wrap gap-2.5",children:[e.jsxs("a",{href:"https://nomad-barter.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-border bg-background px-4 py-2 text-sm font-medium hover:border-primary/40 hover:text-primary transition-colors",children:[e.jsx(te,{className:"h-3.5 w-3.5 text-primary"}),"Browse on Nomad Barter",e.jsx(C,{className:"h-3 w-3 text-muted-foreground"})]}),e.jsxs("a",{href:"https://nomad-job.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-border bg-background px-4 py-2 text-sm font-medium hover:border-primary/40 hover:text-primary transition-colors",children:["Paid roles on Nomad Job",e.jsx(C,{className:"h-3 w-3 text-muted-foreground"})]})]})]}),L.length>0&&e.jsxs("section",{children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-2",children:"Find us"}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:[s.name," keeps its own presence across tools."]}),e.jsx("div",{className:"flex flex-wrap gap-2.5",children:L.map(t=>e.jsxs("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-full border border-border bg-card px-4 py-2 text-sm font-medium hover:border-primary/40 hover:text-primary transition-colors",children:[e.jsx(t.icon,{className:"h-4 w-4"}),t.label,e.jsx(C,{className:"h-3 w-3 text-muted-foreground"})]},t.href))})]}),e.jsxs("section",{className:"rounded-2xl bg-primary/5 border border-primary/15 p-7 md:p-10 text-center",children:[e.jsx("h3",{className:"font-heading text-xl md:text-2xl font-bold mb-2",children:"Become part of the network"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6 max-w-sm mx-auto leading-relaxed",children:"One membership unlocks access to all communities, member rates at every coliving, and a network of people who actually show up."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(f,{asChild:!0,size:"lg",className:"rounded-full px-8 font-semibold",children:e.jsx(_,{to:"/join-club",children:"Join Coliving Revolution"})}),e.jsx(f,{asChild:!0,size:"lg",variant:"outline",className:"rounded-full px-8",children:e.jsx(_,{to:"/membership",children:"See Membership"})})]})]})]}),p!==null&&((P=s.gallery_images)!=null&&P.length)?e.jsx(Ce,{images:s.gallery_images,index:p,onClose:()=>m(null),onChangeIndex:m}):null,e.jsx(Ie,{open:h!==null,onOpenChange:t=>!t&&r(null),communitySlug:s.slug,communityName:s.name,topic:h??""}),e.jsx(he,{})]})}
11export{Js 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.