1import{_ as vt}from"./VoiceMic-BTVRFvRw.js";import{b3 as _t,r as _,ad as E,W as ht,k as yt,X as $,H as pt,I as ft,ap as gt,az as W,w as bt,c as n,o as a,b as S,d as t,f as Ne,e as kt,V,x as i,y as U,n as b,F as j,i as z,v as M,m as h,K as ce,aD as le,J as A,ac as wt,aG as Ct,Y as $t,aA as Tt,Q as Pt,R as St,av as jt}from"./main-CKQbcAOR.js";import{A as Mt}from"./AppHeaderStrip-DWm1fy2R.js";import{u as Et}from"./leaderboardStore-BfjzQnZ2.js";import{_ as Dt}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./useVoiceInput-KaMpWdYJ.js";import"./useProfitProgress-Ds111OgC.js";import"./LinaMessageStream-Zl8WZfiD.js";import"./LinaOutcomeCheckin-DXfBp0aD.js";import"./VMenu-D5Dwh7EC.js";import"./VOverlay-nv6Kedq-.js";import"./forwardRefs-D3j0TLhE.js";import"./lazy-DDV_s5-s.js";import"./transition-CeUDVoY4.js";import"./dialog-transition-xTp8j8dr.js";const xt=_t("community",()=>{const B=_(null),c=_([]),k=_([]),K=_(null),q=_("all"),D=_(!1),y=_(null);async function P(){const v=await E("/community/my-league");B.value=v.data.current,c.value=v.data.leagues,K.value===void 0&&(K.value=null)}async function G(v){const m=await E(`/community/memberships/${v}`,{method:"POST"}),r=c.value.find(l=>l.tier===v);return r&&(r.joined=m.data.joined,r.members=m.data.members),m.data}async function O(v=1){D.value=!0;try{const m={page:v};K.value!==null&&(m.league_tier=K.value),q.value!=="all"&&(m.type=q.value);const r=await E("/community/posts",{query:m});v===1?k.value=r.data.data:k.value.push(...r.data.data),y.value={current_page:r.data.current_page,last_page:r.data.last_page,total:r.data.total}}finally{D.value=!1}}async function w(v){const m=await E("/community/posts",{method:"POST",body:v});return k.value.unshift(m.data.post),m.data.post}async function N(v){await E(`/community/posts/${v}`,{method:"DELETE"}),k.value=k.value.filter(m=>m.id!==v)}async function H(v){const m=await E(`/community/posts/${v}/like`,{method:"POST"}),r=k.value.find(l=>l.id===v);return r&&(r.liked=m.data.liked,r.likes_count=m.data.likes_count),m.data}async function J(v){const m=await E(`/community/posts/${v}/rsvp`,{method:"POST"}),r=k.value.find(l=>l.id===v);return r&&(r.rsvped=m.data.rsvped,r.rsvps_count=m.data.rsvps_count),m.data}async function R(v,m,r=null){const l=await E(`/community/posts/${v}/comments`,{method:"POST",body:{body:m,parent_id:r}}),f=k.value.find(C=>C.id===v);if(f)if(f.comments_count=(f.comments_count||0)+1,f.comments||(f.comments=[]),!r)f.comments.push(l.data.comment);else{const C=f.comments.find(Z=>Z.id===r);C&&(C.replies||(C.replies=[]),C.replies.push(l.data.comment))}return l.data.comment}async function Y(v,m,r=null){await E(`/community/comments/${v}`,{method:"DELETE"});const l=k.value.find(f=>f.id===m);if(l)if(l.comments_count=Math.max(0,(l.comments_count||1)-1),!r)l.comments=(l.comments||[]).filter(f=>f.id!==v);else{const f=(l.comments||[]).find(C=>C.id===r);f&&(f.replies=(f.replies||[]).filter(C=>C.id!==v))}}async function x(v){const m=await E(`/community/posts/${v}`),r=k.value.findIndex(l=>l.id===v);return r>-1?k.value[r]=m.data.post:k.value.unshift(m.data.post),m.data.post}return{myLeague:B,leagues:c,posts:k,activeTier:K,activeType:q,loading:D,pagination:y,fetchMyLeague:P,toggleMembership:G,fetchPosts:O,createPost:w,deletePost:N,toggleLike:H,toggleRsvp:J,addComment:R,deleteComment:Y,fetchPostDetail:x}}),T=B=>(Pt("data-v-4691b6a9"),B=B(),St(),B),Lt={class:"cm-page"},Vt={class:"ahs-left-block"},Ut=T(()=>t("div",{class:"ahs-left-text"},[t("h1",{class:"ahs-left-title"}," Community "),t("span",{class:"ahs-left-sub"},"Owners at your stage")],-1)),At={class:"cm-band"},Kt={class:"cm-band-row"},zt={class:"cm-band-medal"},Ot={class:"cm-band-text"},Rt={class:"cm-band-title-row"},Ft={class:"cm-band-title"},Wt={class:"cm-band-meta"},Bt={class:"cm-band-line"},Nt={class:"cm-circle-chips"},Yt=["onClick"],It={class:"cm-cols"},Xt={class:"cm-feed-col"},qt={key:0,class:"cm-discover"},Gt={class:"cm-disc-head"},Ht={class:"cm-disc-medal"},Jt={class:"cm-disc-info"},Qt={class:"cm-disc-name"},Zt={class:"cm-disc-meta"},es={class:"cm-disc-desc"},ts={key:0,class:"cm-yours-chip"},ss=["disabled","onClick"],os={class:"cm-composer"},as={class:"cm-prompt-row"},ns=T(()=>t("span",{class:"cm-prompt-badge"},"ð¬ TODAY'S PROMPT",-1)),is={class:"cm-prompt-text"},cs=T(()=>t("span",{class:"cm-reward-pill"},"â
+10 XP for posting",-1)),ls={class:"cm-composer-body"},rs={class:"cm-avatar cm-avatar--me"},us=["src"],ms={key:1},ds={class:"cm-composer-main"},vs=["placeholder"],_s={key:0,class:"cm-event-fields"}
1,hs={key:1,class:"cm-error"},ys={class:"cm-composer-actions"},ps=["onClick"],fs=["disabled"],gs={key:0,class:"cm-empty"},bs=T(()=>t("img",{src:"/images/onboarding/lina-cheering.png",alt:"Lina",class:"cm-empty-lina"},null,-1)),ks=T(()=>t("div",{class:"cm-empty-title"}," This circle is brand new ",-1)),ws={class:"cm-empty-sub"},Cs=T(()=>t("span",{class:"cm-confetti cm-confetti--1"},null,-1)),$s=T(()=>t("span",{class:"cm-confetti cm-confetti--2"},null,-1)),Ts=T(()=>t("span",{class:"cm-confetti cm-confetti--3"},null,-1)),Ps={class:"cm-milestone-row"},Ss=T(()=>t("div",{class:"cm-milestone-flame"}," ð¥ ",-1)),js={class:"cm-milestone-info"},Ms={class:"cm-milestone-title"},Es={class:"cm-milestone-author"},Ds=["onClick"],xs=["src"],Ls={key:1},Vs={class:"cm-milestone-line"},Us=["onClick"],As={key:0,class:"cm-pinned-label"},Ks={class:"cm-event-row"},zs={class:"cm-date-block"},Os={class:"cm-date-month"},Rs={class:"cm-date-day"},Fs={class:"cm-event-info"},Ws={class:"cm-event-title"},Bs={class:"cm-event-meta"},Ns={key:0,class:"cm-event-body"},Ys={class:"cm-event-foot"},Is={key:0,class:"cm-going-stack"},Xs=["src"],qs={key:1},Gs={class:"cm-going"},Hs=["href"],Js=["onClick"],Qs={key:0,class:"cm-pinned-label"},Zs={class:"cm-post-head cm-pop-anchor"},eo=["onClick"],to=["src"],so={key:1},oo={class:"cm-post-author"},ao={class:"cm-post-author-top"},no=["onClick"],io=["title"],co={key:0,class:"cm-streak"},lo={class:"cm-post-time"},ro={key:0,class:"cm-post-biz"},uo=["onClick"],mo={key:1,class:"cm-overflow"},vo=["onClick"],_o=["onClick"],ho={class:"cm-post-body"},yo={key:0,class:"cm-post-title"},po={class:"cm-post-actions"},fo=["onClick"],go=["onClick"],bo={key:1,class:"cm-comments"},ko=["src"],wo={key:1},Co={class:"cm-comment-main"},$o={class:"cm-comment-bubble"},To={class:"cm-comment-name"},Po={class:"cm-comment-body"},So=["onClick"],jo={class:"cm-comment-name"},Mo={class:"cm-comment-body"},Eo=["onClick"],Do={class:"cm-comment-composer"},xo={class:"cm-avatar cm-avatar--xs cm-avatar--me"},Lo=["src"],Vo={key:1},Uo=["onUpdate:modelValue","onKeydown"],Ao={key:3,class:"cm-caughtup"},Ko=T(()=>t("span",{class:"cm-caughtup-rule"},null,-1)),zo=T(()=>t("span",{class:"cm-caughtup-label"},"CAUGHT UP â EARLIER POSTS â",-1)),Oo=T(()=>t("span",{class:"cm-caughtup-rule"},null,-1)),Ro=[Ko,zo,Oo],Fo={class:"cm-rail"},Wo={key:0,class:"cm-rail-card cm-member-pop"},Bo={class:"cm-member-head"},No=["src"],Yo={key:1},Io={class:"cm-member-info"},Xo={class:"cm-member-name"},qo={class:"cm-member-biz"},Go={key:1,class:"cm-member-chips"},Ho={class:"cm-member-chip cm-member-chip--gold"},Jo={key:0,class:"cm-member-chip cm-member-chip--fire"},Qo={class:"cm-member-chip cm-member-chip--blue"},Zo={class:"cm-member-actions"},ea={class:"cm-rail-card"},ta=T(()=>t("div",{class:"cm-rail-title"}," Upcoming events ",-1)),sa={key:0,class:"cm-rail-events"},oa=["onClick"],aa={class:"cm-date-block cm-date-block--sm"},na={class:"cm-date-month"},ia={class:"cm-date-day"},ca={class:"cm-rail-event-info"},la={class:"cm-rail-event-title"},ra={class:"cm-rail-event-sub"},ua={key:1,class:"cm-rail-empty"},ma={class:"cm-rail-card"},da=T(()=>t("div",{class:"cm-rail-title"}," This week's podium ",-1)),va={class:"cm-rail-sub"},_a={key:0,class:"cm-podium"},ha={class:"cm-podium-medal"},ya=["src"],pa={key:1},fa={class:"cm-podium-info"},ga={class:"cm-podium-name"},ba={key:0},ka={class:"cm-podium-xp"},wa={key:1,class:"cm-rail-empty"},Ca={key:0,class:"cm-toast"},Ye="community-last-visit",$a={__name:"community",setup(B){const c=xt(),k=Et(),K=ht(),q=yt(),D=$(()=>K.authUser),y=[{tier:0,name:"Getting Started",emoji:"ð±",range:"Under $1K/mo",description:"First customers, first invoices â everyone starts here."},{tier:1,name:"$1K Club",emoji:"ðµ",range:"$1Kâ$5K/mo",description:"Finding rhythm: repeatable jobs, first repeat customers."},{tier:2,name:"$5K Club",emoji:"ð°",range:"$5Kâ$10K/mo",description:"Pricing with confidence, filling the calendar."},{tier:3,name:"$10K Club",emoji:"ð",range:"$10Kâ$25K/mo",description:"First hires, bigger contracts, and letting go of doing it all."},{tier:4,name:"$25K Club",emoji:"ð",range:"$25Kâ$50K/mo",de
1scription:"Systems that run without you â teams, SOPs, real margins."},{tier:5,name:"$50K Club",emoji:"ð",range:"$50Kâ$100K/mo",description:"Elite operators running multi-six-figure operations."},{tier:6,name:"$100K Club",emoji:"ð",range:"$100K+/mo",description:"Scaling owners talking acquisition, leadership, and exits."}],P=_("feed"),G=_(!1),O=_(""),w=_("win"),N=_(""),H=_(""),J=_(!1),R=_(""),Y=_({}),x=_({}),v=_({}),m=_({}),r=_(null),l=_(null),f=_(!1),C=_(null),Z=_([]),re=_([]),se=_(null);let _e=null;function I(s){clearTimeout(_e),se.value=s,_e=setTimeout(()=>se.value=null,2800)}const ue=_(null);pt(async()=>{var s;document.title=`${ft.app.title} | Community`;try{ue.value=localStorage.getItem(Ye),localStorage.setItem(Ye,new Date().toISOString())}catch{}(s=K.authUser)!=null&&s.id||K.getAuthUser(),await c.fetchMyLeague(),c.activeTier=null,c.activeType="all",await c.fetchPosts(1),ye(),document.addEventListener("click",he)}),gt(()=>document.removeEventListener("click",he));function he(s){s.target.closest(".cm-pop-anchor")||(r.value=null)}async function ye(){var s;try{const o=await E("/community/posts?type=event&per_page=10"),u=((s=o==null?void 0:o.data)==null?void 0:s.data)??[];Z.value=u.filter(p=>p.event_at&&W(p.event_at).isAfter(W())).sort((p,g)=>new Date(p.event_at)-new Date(g.event_at)).slice(0,3)}catch{}try{const o=await k.fetchLeaderboard("7d",!0);re.value=((o==null?void 0:o.rows)??[]).slice(0,3)}catch{}}const oe=$(()=>c.leagues.filter(s=>s.joined)),ee=$(()=>{var s;return((s=c.myLeague)==null?void 0:s.tier)??0}),me=$(()=>c.activeTier===null?null:c.leagues.find(s=>s.tier===c.activeTier)??y[c.activeTier]),Ie=$(()=>{const s=oe.value.map(u=>`${y[u.tier].emoji} ${y[u.tier].name}`);return s.length?`Everything from your circles â ${s.length===1?s[0]:`${s.slice(0,-1).join(", ")} and ${s[s.length-1]}`}.`:"Everything from your circles."}),Xe=$(()=>{var s;return P.value==="discover"?"ð§":c.activeTier===null?"â¨":(s=y[c.activeTier])==null?void 0:s.emoji}),qe=$(()=>{var s;return P.value==="discover"?"Discover circles":c.activeTier===null?"My Feed":(s=me.value)==null?void 0:s.name}),Ge=$(()=>{var o,u;if(P.value==="discover")return`${c.leagues.length||7} circles`;if(c.activeTier===null)return`${oe.value.length} circle${oe.value.length===1?"":"s"} joined`;const s=((o=me.value)==null?void 0:o.member_count)??((u=me.value)==null?void 0:u.members)??null;return[s?`${s} members`:null,c.activeTier===ee.value?"your league":null].filter(Boolean).join(" · ")}),He=$(()=>{var s;return P.value==="discover"?"Every revenue stage has a circle â join any that fit where you're headed.":c.activeTier===null?Ie.value:`Owners doing ${(s=y[c.activeTier])==null?void 0:s.range} â your stage, your people.`});function de(s){P.value="feed",c.activeTier=s,l.value=null}function Je(){P.value="discover",l.value=null}bt(()=>c.activeTier,()=>{P.value==="feed"&&c.fetchPosts(1)});async function Qe(s){C.value=s;try{await c.toggleMembership(s)}finally{C.value=null}}const pe=["What's one win from this week â big or small?","What's the hardest thing on your plate right now?","What did a customer say to you this week?","What would you do with one extra free hour a day?","What's one price, offer, or process you changed lately?","Who helped your business this week â and how?","What's one thing you know now that you wish you knew at day 1?"],fe=$(()=>{const s=Math.floor((Date.now()-new Date(new Date().getFullYear(),0,0).getTime())/864e5);return pe[s%pe.length]}),Ze=[{key:"win",label:"ð Win"},{key:"question",label:"â Question"},{key:"event",label:"ð
Event"},{key:"post",label:"âï¸ Post"}],et=$(()=>({win:"Share your win â numbers welcomeâ¦",question:"What do you want to ask the circle?",event:"What's the event about?",post:"Share something with the circleâ¦"})[w.value]);async function tt(){var o;const s=O.value.trim();if(!s){R.value="Write something first.";return}if(w.value==="event"&&!N.value){R.value="Pick a date and time.";return}J.value=!0,R.value="";try{const u=await c.createPost({post_type:w.value==="event"?"event":"post",category:w.value==="event"?null:w.value==="post"?"general":w.value,league_tier:c.activeTier??ee.value,title:null,body:s,zoom_link:w.value==="event"&&H.value||null,event_at:w.value==="event"?N.value:null}),p=w.value==="event",g=Number((u==null?void 0:u.xp_awarded)??0);O.value="",N.value="",H.value="",G.value=!1,w.value="win",I(p?g>0?`Event posted ð
+${g} XP`:"Event posted ð
":g>0?`Posted to your circle ð +${g} XP`:"Posted to your circle ð"),ye()}catch(u){R.value=((o=u==null?void 0:u.data)==null?void 0:o.message)||"Could not post â join this circle first."}finally{J.value=!1}}const ae=$(()=>c.posts),st=$(()=>c.pagination&&c.pagination.current_page<c.pagination.last_page),ot=$(()=>{if(!ue.value)return-1;const s=new Date(ue.value);let o=-1,u=!1;return ae.value.forEach((p,g)=>{new Date(p.created_at)>s?o=g:u=!0}),o>-1&&u&&o<ae.value.length-1?o:-1});function at(s){return s.category==="milestone"}
1const ne={win:{label:"ð Win",bg:"#ECF8F4",fg:"#2E9B77"},question:{label:"â Question",bg:"#ECF1F8",fg:"#3C71B8"}};function nt(s){Y.value={...Y.value,[s.id]:!Y.value[s.id]},Y.value[s.id]&&!s.comments&&c.fetchPostDetail(s.id)}async function it(s){const o=(x.value[s.id]||"").trim();if(!o)return;const u=await c.addComment(s.id,o,null);x.value={...x.value,[s.id]:""};const p=Number((u==null?void 0:u.xp_awarded)??0);I(p>0?`Comment posted · +${p} XP`:"Comment posted")}function ct(s,o){var p;const u=(((p=o.user)==null?void 0:p.name)||"").trim().split(" ")[0];x.value={...x.value,[s.id]:u?`@${u} `:""},jt(()=>{var g;return(g=v.value[s.id])==null?void 0:g.focus()})}function lt(s){const o=s.comments??[];return m.value[s.id]?o:o.slice(0,2)}function rt(s){var o;return!m.value[s.id]&&(((o=s.comments)==null?void 0:o.length)??0)>2}async function ut(s){const o=await c.toggleRsvp(s.id);o!=null&&o.rsvped&&I("You're going â")}async function mt(s){r.value=null,await c.deletePost(s.id),I("Post deleted")}async function dt(s){var o,u;r.value=null;try{await E("/support/ticket",{method:"POST",body:{subject:`Report community post #${s.id} by ${((o=s.user)==null?void 0:o.name)??"unknown"}`,message:`Reported from Community. Post body: 2 3${(u=s.body)==null?void 0:u.slice(0,500)}`}}),I("Report sent â our team reviews within 24 hours")}catch{I("Could not send report â try again")}}async function ve(s){var u,p,g,te;const o=((u=s.user)==null?void 0:u.id)??s.user_id;if(!(!o||o===((p=D.value)==null?void 0:p.id))){f.value=!0,l.value={id:o,name:(g=s.user)==null?void 0:g.name,avatar:(te=s.user)==null?void 0:te.avatar};try{const X=await E(`/community/members/${o}`);X!=null&&X.data&&(l.value=X.data)}catch{}f.value=!1}}function F(s){return(s||"?").split(" ").slice(0,2).map(o=>o[0]).join("").toUpperCase()}const ge=["#3C71B8","#927BB7","#46BC94","#F6851F","#79C7E0","#E0A722"];function Q(s){return ge[(s??0)%ge.length]}function be(s){const o=Math.floor((Date.now()-new Date(s))/1e3);return o<60?"just now":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric"})}return(s,o)=>{var p,g,te,X,ke,we;const u=vt;return a(),n("div",Lt,[S(Mt,{class:"ahs-page-strip","lina-phrases":["Post a win â someone needs to see it","Stuck? Someone here solved it"]},{left:kt(()=>[t("div",Vt,[S(V,{icon:"tabler-users",size:"26",class:"ahs-left-icon"}),Ut])]),_:1}),t("section",At,[t("div",Kt,[t("div",zt,i(Xe.value),1),t("div",Ot,[t("div",Rt,[t("h1",Ft,i(qe.value),1),t("span",Wt,i(Ge.value),1)]),t("div",Bt,i(He.value),1)])]),t("div",Nt,[t("button",{class:U(["cm-circle-chip",{"cm-circle-chip--active":P.value==="feed"&&b(c).activeTier===null}]),type:"button",onClick:o[0]||(o[0]=e=>de(null))}," ⨠My Feed ",2),(a(!0),n(j,null,z(oe.value,e=>(a(),n("button",{key:e.tier,class:U(["cm-circle-chip",{"cm-circle-chip--active":P.value==="feed"&&b(c).activeTier===e.tier}]),type:"button",onClick:L=>de(e.tier)},i(y[e.tier].emoji)+" "+i(y[e.tier].name),11,Yt))),128)),t("button",{class:U(["cm-circle-chip",{"cm-circle-chip--active":P.value==="discover"}]),type:"button",onClick:Je}," Discover + ",2)])]),t("div",It,[t("div",Xt,[P.value==="discover"?(a(),n("div",qt,[(a(!0),n(j,null,z(b(c).leagues,e=>(a(),n("div",{key:e.tier,class:"cm-disc-card"},[t("div",Gt,[t("div",Ht,i(y[e.tier].emoji),1),t("div",Jt,[t("div",Qt,i(y[e.tier].name),1),t("div",Zt,i(y[e.tier].range)+" · "+i(e.member_count??e.members??0)+" members ",1)])]),t("div",es,i(y[e.tier].description),1),e.tier===ee.value?(a(),n("span",ts,[S(V,{icon:"tabler-home",size:"13"}),M("Your league")])):(a(),n("button",{key:1,class:U(["cm-join-btn",{"cm-join-btn--joined":e.joined}]),type:"button",disabled:C.value===e.tier,onClick:L=>Qe(e.tier)},i(e.joined?"â Joined":"Join circle"),11,ss))]))),128))])):(a(),n(j,{key:1},[t("section",os,[t("div",as,[ns,t("span",is,i(fe.value),1),cs]),t("div",ls,[t("div",rs,[(p=D.value)!=null&&p.avatar?(a(),n("img",{key:0,src:D.value.avatar,alt:""},null,8,us)):(a(),n("span",ms,i(F((g=D.value)==null?void 0:g.name)),1))]),t("div",ds,[G.value?(a(),n(j,{key:1},[ce(t("textarea",{"onUpdate:modelValue":o[2]||(o[2]=e=>O.value=e),class:"cm-textarea",placeholder:et.value,rows:"3"},null,8,vs),[[le,O.value]]),w.value==="event"?(a(),n("div",_s,[ce(t("input",{"onUpdate:modelValue":o[3]||(o[3]=e=>N.value=e),type:"datetime-local",class:"cm-input"},null,512),[[le,N.value]]),ce(t("input",{"onUpdate:modelValue":o[4]||(o[4]=e=>H.value=e),placeholder:"Zoom link (optional)",class:"cm-input cm-input--grow"},null,512),[[le,H.value]])])):h("",!0),R.value?(a(),n("div",hs,i(R.value),1)):h("",!0),t("div",ys,[S(u,{modelValue:O.value,"onUpdate:modelValue":o[5]||(o[5]=e=>O.value=e),size:30},null,8,["modelValue"]),(a(),n(j,null,z(Ze,e=>t("button",{key:e.key,class:U(["cm-type-chip",[`cm-type-chip--${e.key}`,{"cm-type-chip--active":w.value===e.key}]]),type:"button",onClick:L=>w.value=e.key},i(e.label),11,ps)),64)),t("button",{class:"cm-post-btn",type:"button",disabled:J.value,onClick:tt},i(J.value?"Postingâ¦":"Post"),9,fs)])],64)):(a(),n("div",{key:0,class:"cm-composer-pill",onClick:o[1]||(o[1]=e=>G.value=!0)}," Share your win⦠"))])])]),!b(c).loading&&ae.value.length===0?(a(),n("section",gs,[bs,ks,t("div",ws,[M(" Be the first â today's prompt is an easy one: "),t("em",null,i(fe.value),1)]),t("button",{class:"cm-btn-orange",type:"button",onClick:o[6]||(o[6]=e=>G.value=!0)}," Answer the prompt â ")])):h("",!0),(a(!0),n(j,null,z(ae.value,(e,L)=>{var Ce,$e,Te,Pe,Se,je,Me,Ee,De,xe,Le,Ve,Ue,Ae,Ke,ze;return a(),n(j,{key:e.id},[at(e)?(a(),n("section",{key:0,class:"cm-milestone cm-rise",style:A({animationDelay:`${Math.min(L*60,360)}ms`})},[Cs,$s,Ts,t("div",Ps,[Ss,t("div",js,[t("div",Ms,i(e.title??e.body),1),t("div",Es,[t("div",{class:"cm-avatar cm-avatar--xs",style:A({background:Q((Ce=e.user)==null?void 0:Ce.id)}),onClick:d=>ve(e)},[($e=e.user)!=null&&$e.avatar?(a(),n("img",{key:0,src:e.user.avatar,alt:""},null,8,xs)):(a(),n("span",Ls,i(F((Te=e.user)==null?void 0:Te.name)),1))],12,Ds),t("span",Vs,[M(i((Pe=e.user)==null?void 0:Pe.name),1),(Se=e.user)!=null&&Se.business?(a(),n(j,{key:0},[M(" · "+i(e.user.business),1)],64)):h("",!0),M(" · "+i(be(e.created_at)),1)])])]),t("button",{class:U(["cm-congrats",{"cm-congrats--on":e.liked}]),type:"button",onClick:d=>b(c).toggleLike(e.id)}," ð "+i(e.liked?"Congratulated":"Congratulate")+" · "+i(e.likes_count),11,Us)])],4)):e.post_type==="event"?(a(),n("section",{key:1,class:U(["cm-card cm-rise",{"cm-card--pinned":e.is_pinned}]),style:A({animationDelay:`${Math.min(L*60,360)}ms`})},[e.is_pinned?(a(),n("div",As," ð Pinned by the circle host ")):h("",!0),t("div",Ks,[t("div",zs,[t("div",Os,i(b(W)(e.event_at).format("MMM").toUpperCase()),1),t("div",Rs,i(b(W)(e.event_at).format("D")),1)]),t("div",Fs,[t("div",Ws,i(e.title??e.body),1),t("div",Bs,i(b(W)(e.event_at).format("h:mm A"))+" · hosted by "+i((je=e.user)==null?void 0:je.name),1),e.title?(a(),n("div",Ns,i(e.body),1)):h("",!0),t("div",Ys,[(e.rsvp_preview??[]).length?(a(),n("div",Is,[(a(!0),n(j,null,z(e.rsvp_preview,d=>(a(),n("div",{key:d.id,class:"cm-avatar cm-going-avatar",style:A({background:Q(d.id)})},[d.avatar?(a(),n("img",{key:0,src:d.avatar,alt:""},null,8,Xs)):(a(),n("span",qs,i(F(d.name)),1))],4))),128))])):h("",!0),t("span",Gs,"+"+i(e.rsvps_count)+" going",1),e.zoom_link?(a(),n("a",{key:1,href:e.zoom_link,target:"_blank",rel:"noopener noreferrer",class:"cm-zoom-chip"},[S(V,{icon:"tabler-video",size:"13"}),M("Zoom")],8,Hs)):h("",!0)])]),t("button",{class:U(["cm-rsvp",{"cm-rsvp--on":e.rsvped}]),type:"button",onClick:d=>ut(e)},i(e.rsvped?"â Going":"RSVP"),11,Js)])],6)):(a(),n("section",{key:2,class:U(["cm-card cm-rise",{"cm-card--pinned":e.is_pinned}]),style:A({animationDelay:`${Math.min(L*60,360)}ms`})},[e.is_pinned?(a(),n("div",Qs," ð Pinned by the circle host ")):h("",!0),t("div",Zs,[t("div",{class:"cm-avatar",style:A({background:Q((Me=e.user)==null?void 0:Me.id)}),onClick:d=>ve(e)},[(Ee=e.user)!=null&&Ee.avatar?(a(),n("img",{key:0,src:e.user.avatar,alt:""},null,8,to)):(a(),n("span",so,i(F((De=e.user)==null?void 0:De.name)),1))],12,eo),t("div",oo,[t("div",ao,[t("span",{class:"cm-post-name",onClick:d=>ve(e)},i((xe=e.user)==null?void 0:xe.name),9,no),t("span",{class:"cm-league-mini",title:(Le=y[e.league_tier])==null?void 0:Le.name},i((Ve=y[e.league_tier])==null?void 0:Ve.emoji),9,io),(((Ue=e.user)==null?void 0:Ue.streak)??0)>0?(a(),n("span",co,"ð¥"+i(e.user.streak),1)):h("",!0),t("span",lo,"· "+i(be(e.created_at)),1)]),(Ae=e.user)!=null&&Ae.business?(a(),n("div",ro,i(e.user.business),1)):h("",!0)]),ne[e.category]?(a(),n("span",{key:0,class:"cm-cat-chip",style:A({background:ne[e.category].bg,color:ne[e.category].fg})},i(ne[e.category].label),5)):h("",!0),t("button",{class:"cm-btn-plain",type:"button",onClick:wt(d=>r.value=r.value===e.id?null:e.id,["stop"])},[S(V,{icon:"tabler-dots",size:"17"})],8,uo),r.value===e.id?(a(),n("div",mo,[e.is_own?(a(),n("button",{key:0,t
3ype:"button",class:"cm-overflow-danger",onClick:d=>mt(e)},[S(V,{icon:"tabler-trash",size:"15"}),M("Delete ")],8,vo)):(a(),n("button",{key:1,type:"button",onClick:d=>dt(e)},[S(V,{icon:"tabler-flag",size:"15"}),M("Report ")],8,_o))])):h("",!0)]),t("div",ho,[e.title?(a(),n("div",yo,i(e.title),1)):h("",!0),M(" "+i(e.body),1)]),t("div",po,[t("button",{class:U(["cm-act",{"cm-act--liked":e.liked}]),type:"button",onClick:d=>b(c).toggleLike(e.id)},[S(V,{icon:e.liked?"tabler-heart-filled":"tabler-heart",size:"17"},null,8,["icon"]),M(i(e.likes_count),1)],10,fo),t("button",{class:"cm-act",type:"button",onClick:d=>nt(e)},[S(V,{icon:"tabler-message-circle",size:"17"}),M(i(e.comments_count),1)],8,go)]),Y.value[e.id]?(a(),n("div",bo,[(a(!0),n(j,null,z(lt(e),d=>{var Oe,Re,Fe,We;return a(),n("div",{key:d.id,class:"cm-comment"},[t("div",{class:"cm-avatar cm-avatar--xs",style:A({background:Q((Oe=d.user)==null?void 0:Oe.id)})},[(Re=d.user)!=null&&Re.avatar?(a(),n("img",{key:0,src:d.user.avatar,alt:""},null,8,ko)):(a(),n("span",wo,i(F((Fe=d.user)==null?void 0:Fe.name)),1))],4),t("div",Co,[t("div",$o,[t("span",To,i((We=d.user)==null?void 0:We.name),1),t("div",Po,i(d.body),1)]),t("span",{class:"cm-comment-reply",onClick:ie=>ct(e,d)},"Reply",8,So),(a(!0),n(j,null,z(d.replies??[],ie=>{var Be;return a(),n("div",{key:ie.id,class:"cm-comment-bubble cm-comment-bubble--reply"},[t("span",jo,i((Be=ie.user)==null?void 0:Be.name),1),t("div",Mo,i(ie.body),1)])}),128))])])}),128)),rt(e)?(a(),n("span",{key:0,class:"cm-comment-more",onClick:d=>m.value={...m.value,[e.id]:!0}},"View all "+i(e.comments_count)+" comments",9,Eo)):h("",!0),t("div",Do,[t("div",xo,[(Ke=D.value)!=null&&Ke.avatar?(a(),n("img",{key:0,src:D.value.avatar,alt:""},null,8,Lo)):(a(),n("span",Vo,i(F((ze=D.value)==null?void 0:ze.name)),1))]),ce(t("input",{ref_for:!0,ref:d=>v.value[e.id]=d,"onUpdate:modelValue":d=>x.value[e.id]=d,class:"cm-comment-input",placeholder:"Add a commentâ¦",onKeydown:Ct(d=>it(e),["enter"])},null,40,Uo),[[le,x.value[e.id]]]),S(u,{modelValue:x.value[e.id],"onUpdate:modelValue":d=>x.value[e.id]=d,size:26},null,8,["modelValue","onUpdate:modelValue"])])])):h("",!0)],6)),L===ot.value?(a(),n("div",Ao,Ro)):h("",!0)],64)}),128)),st.value?(a(),n("button",{key:1,class:"cm-loadmore",type:"button",onClick:o[7]||(o[7]=e=>b(c).fetchPosts(b(c).pagination.current_page+1))}," Load more ")):h("",!0)],64))]),t("div",Fo,[l.value?(a(),n("section",Wo,[t("div",Bo,[t("div",{class:"cm-avatar cm-avatar--lg",style:A({background:Q(l.value.id)})},[l.value.avatar?(a(),n("img",{key:0,src:l.value.avatar,alt:""},null,8,No)):(a(),n("span",Yo,i(F(l.value.name)),1))],4),t("div",Io,[t("div",Xo,i(l.value.name),1),t("div",qo,i(l.value.business?`Owner · ${l.value.business}`:"Uplify member"),1)]),t("button",{class:"cm-btn-plain",type:"button",onClick:o[8]||(o[8]=e=>l.value=null)},[S(V,{icon:"tabler-x",size:"16"})])]),f.value?(a(),Ne($t,{key:0,indeterminate:"",color:"primary",height:"2",class:"my-2"})):(a(),n("div",Go,[t("span",Ho,i((te=y[l.value.league_tier??0])==null?void 0:te.emoji)+" "+i((X=y[l.value.league_tier??0])==null?void 0:X.name),1),(l.value.streak??0)>0?(a(),n("span",Jo,"ð¥ "+i(l.value.streak)+"-day streak",1)):h("",!0),t("span",Qo,"Level "+i(l.value.level??1),1)])),t("div",Zo,[t("button",{class:"cm-btn-primary",type:"button",onClick:o[9]||(o[9]=e=>b(q).push(`/messages?with=${l.value.id}`))},[S(V,{icon:"tabler-message-circle",size:"15"}),M("Message ")])])])):h("",!0),t("section",ea,[ta,Z.value.length?(a(),n("div",sa,[(a(!0),n(j,null,z(Z.value,e=>(a(),n("div",{key:e.id,class:"cm-rail-event",onClick:L=>de(e.league_tier)},[t("div",aa,[t("div",na,i(b(W)(e.event_at).format("MMM").toUpperCase()),1),t("div",ia,i(b(W)(e.event_at).format("D")),1)]),t("div",ca,[t("div",la,i(e.title??e.body),1),t("div",ra,i(b(W)(e.event_at).format("h:mm A"))+" · "+i(e.rsvps_count)+" going ",1)])],8,oa))),128))])):(a(),n("div",ua," No upcoming events â host one from the composer ð
"))]),t("section",ma,[da,t("div",va,i((ke=y[ee.value])==null?void 0:ke.emoji)+" "+i((we=y[ee.value])==null?void 0:we.name)+" · top 3 get a shoutout Sunday ",1),re.value.length?(a(),n("div",_a,[(a(!0),n(j,null,z(re.value,(e,L)=>(a(),n("div",{key:e.id??L,class:"cm-podium-row"},[t("span",ha,i(["ð¥","ð¥","ð¥"][L]),1),t("div",{class:"cm-avatar cm-avatar--sm",style:A({background:Q(e.id)})},[e.avatar?(a(),n("img",{key:0,src:e.avatar,alt:""},null,8,ya)):(a(),n("span",pa,i(F(e.name)),1))],4),t("div",fa,[t("div",ga,[M(i(e.name),1),e.is_current_user?(a(),n("span",ba," (you)")):h("",!0)])]),t("span",ka,i((e.xp??0).toLocaleStr
3ing())+" XP",1)]))),128))])):(a(),n("div",wa," No activity yet this week. ")),t("span",{class:"cm-rail-link",onClick:o[10]||(o[10]=e=>b(q).push("/leaderboard"))},"Full leaderboard â")])])]),(a(),Ne(Tt,{to:"body"},[se.value?(a(),n("div",Ca,i(se.value),1)):h("",!0)]))])}}},Ra=Dt($a,[["__scopeId","data-v-4691b6a9"]]);export{Ra 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.