PageSourceSearch

https://brkngbr.ai/assets/Home-_FZ8MrRc.js

js brkngbr.ai collected 2026-10-05 13:50:21 UTC 57,665 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./vendor-react-B-uJOWSj.js";import{e as Me,b as Ue,u as Ee,c as be,l as he,a as Ne,X as Ge}from"./index-CeaQ1CvA.js";import{D as Pe}from"./dashboard-layout-s1jIwS5B.js";import{B as Ie}from"./button-CozFm_86.js";import{D as Fe,a as We}from"./dialog-DOMvuUoE.js";import{u as $e,b as pe,a as Re}from"./vendor-query-kWhkqRot.js";import{T as He}from"./TierLimitDialog-a7cx9UO2.js";import{C as Oe}from"./CreateGroupWizard-xJouL47b.js";import{e as Be,b as Le}from"./timeFormat-BQRTnWEC.js";import{E as ze}from"./EventImageThumbnail-__AMJ7BA.js";import{D as Qe,E as Ve,A as Ke}from"./EventCardRow2-Bnay_1zt.js";import{C as Xe}from"./index.module-Dkl5vp8R.js";import{L as Ae}from"./loader-circle-D8JIEvg6.js";import{B as Te}from"./bell-B_hpgFny.js";import{C as Je}from"./clipboard-list-Bl3gZmBo.js";import{U as te}from"./users-DnZFc5WL.js";import{U as Ze}from"./user-plus-DGQZBggZ.js";import{I as et}from"./image-Bl3UZsie.js";import{M as tt}from"./message-circle-Bq8Si7VZ.js";import{C as V}from"./calendar-BgAJG2Mn.js";import{A as Z}from"./arrow-right-TyoRsebT.js";import{C as st}from"./clock-BTi01tXF.js";import{M as ot}from"./map-pin-CiAmqECz.js";import{C as ke}from"./circle-check-DiEpsh7J.js";import{S as nt}from"./sparkles-B2970YSx.js";import{C as at}from"./chevron-right-BdxWxTMv.js";import{C as _e}from"./camera-j3oFR_Wb.js";import{U as Ye}from"./utensils-1haBW8tv.js";import"./FeedbackDialog-BJlz-XyN.js";import"./input-CY09TGwo.js";import"./label-HYAAgob-.js";import"./textarea-by7FpCSY.js";import"./check-KfsUf5bc.js";import"./shield-check-DGRPXqOL.js";import"./phone-CwZTiFlC.js";import"./feature-flags-DCXAz1VB.js";import"./index-CSAQBmOs.js";import"./index-y4u1e3Wx.js";import"./tslib.es6-CwyXKlH1.js";import"./menu-BuZ4pJkX.js";import"./house-DY1-RjaJ.js";import"./user-dJW6tbED.js";import"./settings-C-BPhE1q.js";import"./circle-question-mark-BGmUwagY.js";import"./tierConfig-CX3EhNbM.js";import"./upgradeFeatures-CuEwMGLw.js";import"./UpgradeOverlay-BE9VfK8H.js";import"./badge-c_BRNB6F.js";import"./analytics-BsPnnpqz.js";import"./resolveEventIllustration-HeAw7pU6.js";import"./crown-DuJR4Qdb.js";const it=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],ee=Me("network",it),rt=[{id:"q3_0",screen:"q3",questionIndex:0,category:"Dinner Party Style",question:"You arrive at a dinner party where you only know the host. What's your move?",options:["Brings a bottle and good stories","The one who introduces everyone","Quietly observing until I find my people","In the kitchen helping with food"]},{id:"q3_1",screen:"q3",questionIndex:1,category:"Dinner Party Style",question:"You notice someone at the table is being really quiet. What do you do?",options:["Check in with them one on one when the moment feels right","Pull them into the group conversation","Give them space — they'll join when they're ready","Make a joke to break the ice"]},{id:"q3_2",screen:"q3",questionIndex:2,category:"Dinner Party Style",question:"The conversation turns deep — someone shares something really personal. How do you feel?",options:["I love it, vulnerability is a superpower","Depends on the vibe — sometimes it's great","I'd listen but not go there myself","I'd try to lighten the mood a little"]},{id:"q3_3",screen:"q3",questionIndex:3,category:"Dinner Party Style",question:"If you could design your ideal dinner gathering, what would it look like?",options:["A cozy potluck where everyone brings their signature dish","A fancy themed dinner — think mystery night or cultural cuisine","A casual backyard BBQ with music and games","An intimate chef's table experience with a small group"]},{id:"q4_0",screen:"q4",questionIndex:0,category:"How You Show Up",question:"Be honest — when it comes to being on time, what kind of person are you really?",options:["I aim for on time and usually land there","Fashionably late is my brand","Early bird — I'm always the first one there","It depends on the event honestly"]},{id:"q4_1",screen:"q4",questionIndex:1,category:"How You Show Up",question:"It's Saturday morning and a friend texts: 'what are you doing today, we should hang.' No plan. What happens?",options:["I'm in, just tell me a time and place","Depen
1ds — how social am I feeling?","I need at least a day's notice","Already have plans, but let's find another day"]},{id:"q4_2",screen:"q4",questionIndex:2,category:"How You Show Up",question:"Someone at the table has spinach in their teeth. You...",options:["Tell them immediately, that's what friends are for","Wait for the right moment, then quietly let them know","Catch their eye and hope they figure it out","Pray someone else handles it"]},{id:"q5_0",screen:"q5",questionIndex:0,category:"What Lights You Up",question:"You're planning a trip. What does that look like for you?",options:["Spreadsheet with every detail mapped out","Somewhere in between — vibes + a few anchors","Book the flight, figure out the rest later","I let someone else plan and just show up"]},{id:"q5_1",screen:"q5",questionIndex:1,category:"What Lights You Up",question:"Your friend just quit their 9-to-5 to start something of their own. No safety net. Your first thought?",options:["I love it. Scary, but life's too short not to try.","Bold move — I hope they have a plan","I'd need more info before I'd support that","I admire it but could never do it myself"]},{id:"q5_2",screen:"q5",questionIndex:2,category:"What Lights You Up",question:"Self-driving cars are becoming a real thing. Fully autonomous. Are you getting in?",options:["Already have the app downloaded, sign me up","Probably eventually — once other people have tested it","Hard pass. I want a human behind that wheel.","I have so many questions before I decide"]},{id:"q6_0",screen:"q6",questionIndex:0,category:"The Real You",question:"You have an amazing time at a gathering. How do people know?",options:["I'll say something warm on the way out","They'll hear about it in the group chat the next day","I'll be the last one to leave","They'll know by how many leftovers I took home"]},{id:"q6_1",screen:"q6",questionIndex:1,category:"The Real You",question:"People are coming over tonight. How does that actually go for you?",options:["I clean up and grab a few nice things, but I keep it casual","Full Marie Kondo — every pillow placed with intention","I panic clean 20 minutes before they arrive","My place is always ready, come on over"]},{id:"q6_2",screen:"q6",questionIndex:2,category:"The Real You",question:"If you could design your ideal everyday life — not vacation, just regular life — where does it take place?",options:["A city. Walkable, loud, always something happening","Suburbs — enough going on, but I can breathe","A small town where everyone knows your name","Somewhere rural. Space, quiet, and a long driveway"]}],lt=[{id:"supp_0",screen:"supplemental",questionIndex:0,category:"Outlook",question:"A friend pitches you a 'sure thing' business idea. What's your gut reaction?",options:["Count me in — big swings are how things happen","I'm cautiously interested — tell me more","I'd want to see the numbers first","I've heard 'sure thing' before..."]},{id:"supp_1",screen:"supplemental",questionIndex:0,category:"Outlook",question:"You're about to start a new project. What drives your confidence?",options:["I just know it's going to work out","I've done my homework — I'm ready","I'm cautiously optimistic","I prepare for the worst and hope for the best"]},{id:"supp_2",screen:"supplemental",questionIndex:0,category:"Outlook",question:"A flight gets cancelled. How do you actually feel?",options:["It'll work out — adventures always do","Annoyed, but I'll figure something out","I already have a backup plan","This is why I always build in buffer time"]},{id:"supp_3",screen:"supplemental",questionIndex:0,category:"Your Style",question:"You're decorating a space that's all yours. What does it look like?",options:["Clean lines, minimal clutter — breathing room","A few meaningful pieces that tell my story","Cozy and layered — something new to discover everywhere","Bold statement pieces, big color, maximum personality"]},{id:"supp_4",screen:"supplemental",questionIndex:0,category:"Your Style",question:"You're picking an outfit for a night out. Your vibe is...",options:["Classic and understated — I let the conversation do the talking","Something I love but wouldn't call flashy","A statement piece — something people notice","Head-to-toe, I dressed for the 'fit this time"]},{id:"supp_5",screen:"supplemental",questionIndex:0,category:"Your Style",question:"How do you approach gift-giving?",options:["Thoughtful and personal, even if it's small","I go for quality over quantity","I love going big — the reaction is the best part","I'm the one who shows up with a whole bag of things"]},{id:"supp_6",screen:"supplemental",questionIndex:0,category:"In Conversation",question:"At a dinner, the host asks 'what's everyone been up to?' You...",options:["Jump in first — I've got a story for this","Share when it feels right","Listen to everyone else first, then add something short","I'm more curious about what others are up to"]},{id:"supp_7",screen:"supplemental",questionIndex:0,category:"In Conversation",question:"A friend is going through something hard. Your instinct is to...",options:["Ask questions and really dig in","Share a similar experience so they don't feel alone","Mostly listen — presence over words","Make them laugh — sometimes that's the best medicine"]},{id:"supp_8",screen:"supplemental",questionIndex:0,category:"In Conversation",question:"In a group meeting, you tend to be...",options:["The one who drives the agenda","Jumping in when I have something to add","Quiet unless asked, then pretty direct","Taking it all in — I process and respond later"]},{id:"supp_9",screen:"supplemental",questionIndex:0,category:"Tech & Change",question:"New social app everyone is talking about. You...",options:["Already have it — was on the beta waitlist","Download it out of curiosity","Wait and see if it actually sticks","If it ain't broke, why fix it"]},{id:"supp_10",screen:"supplemental",questionIndex:0,category:"Tech & Change",question:"Your favorite way to take notes is...",options:["Whatever app I'm currently obsessed with","Digital but nothing fancy","A notebook — pen and paper, always","I try to just remember things"]},{id:"supp_11",screen:"supplemental",questionIndex:0,category:"Tech & Change",question:"When it comes to new technology at work or home, you're usually...",options:["The one showing everyone else how to use it","Comfortable once I've had a minute to explore","I'll adopt it when I have to","Resistant — I liked the old way"]},{id:"supp_12",screen:"supplemental",questionIndex:0,category:"Social Energy",question:"A long weekend with no obligations. Ideal scenario?",options:["I pack it with plans — I get restless without people","A mix of social and me-time","Mostly solo activities with one or tw
1o low-key hangs","Fully off the grid — just me and whatever I'm into"]},{id:"supp_13",screen:"supplemental",questionIndex:0,category:"Social Energy",question:"After a long week, what actually recharges you?",options:["A big group dinner or party — being around people fills me up","A smaller hangout with people I trust","Quiet time alone — I need to decompress","Honestly just sleep and a long walk"]},{id:"supp_14",screen:"supplemental",questionIndex:0,category:"Social Energy",question:"You're on public transit with a long ride ahead. You...",options:["Hope someone interesting sits next to me","Have headphones in, but I'm open to chatting","Headphones in, do not disturb","Read, journal, or zone out completely"]},{id:"supp_15",screen:"supplemental",questionIndex:0,category:"Emotions",question:"Your team scores a big win. How do you react?",options:["I might tear up a little — I'm not gonna lie","Big smile, maybe a hug or two","Internally thrilled, externally composed","I celebrate privately — I process later"]},{id:"supp_16",screen:"supplemental",questionIndex:0,category:"Emotions",question:"A movie really hits you emotionally. What happens?",options:["Full cry. I'm not ashamed.","I feel it but I hold it together","I notice it but I don't show it","I've been accused of being made of stone"]},{id:"supp_17",screen:"supplemental",questionIndex:0,category:"Emotions",question:"Someone gives you an incredibly thoughtful gift. You...",options:["Get emotional — unexpected kindness gets me every time","Feel a lot, say something genuine","Say thank you warmly and keep it together","Appreciate it but I'm not one to make it a big deal"]},{id:"supp_18",screen:"supplemental",questionIndex:0,category:"The Spotlight",question:"There's a karaoke machine at the party. You...",options:["First one up — already have my song picked","Get talked into it eventually and secretly love it","Cheer everyone else on but stay seated","Need a drink first... maybe two"]},{id:"supp_19",screen:"supplemental",questionIndex:0,category:"The Spotlight",question:"Someone calls on you to speak unexpectedly in front of a group. How do you feel?",options:["Bring it on — I love impromptu","Fine — a little adrenaline, then I'm in it","I can do it but I prefer to prepare","Internal panic, external calm (hopefully)"]},{id:"supp_20",screen:"supplemental",questionIndex:0,category:"The Spotlight",question:"At a costume party, you show up as...",options:["A full character — voice, accent, the whole bit","Something clever and committed","Something low-key that works if you know what it is","Technically in costume, technically avoiding attention"]},{id:"supp_21",screen:"supplemental",questionIndex:0,category:"Your Pace",question:"Perfect Saturday energy, start to finish?",options:["Packed — run, errands, brunch, plans, more plans","Active morning, slow afternoon","Slow morning, a few nice things, early night","Horizontal until something pulls me off the couch"]},{id:"supp_22",screen:"supplemental",questionIndex:0,category:"Your Pace",question:"How would your friends describe your default pace?",options:["'You're always moving — how are you not exhausted?'","Energetic but knows when to slow down","Super laid-back — nothing seems to rattle you","Honestly depends on the day"]},{id:"supp_23",screen:"supplemental",questionIndex:0,category:"Your Pace",question:"Your ideal workout (or movement) looks like...",options:["Something intense — the harder the better","A good run or something with a goal to chase","A long walk, yoga, or a swim","Does walking to the kitchen count?"]},{id:"supp_24",screen:"supplemental",questionIndex:0,category:"How You Think",question:"You're planning a group trip. Your natural role is...",options:["The vision person — I pitch the destination and vibe","I do the research and send a shortlist","I handle logistics — flights, hotels, itinerary","I show up when someone else has sorted all that"]},{id:"supp_25",screen:"supplemental",questionIndex:0,category:"How You Think",question:"You're reviewing a document. You...",options:["Look for the key takeaway and move on","Skim first, then dig into what matters","Read carefully and catch what others miss","I'm the typo person. Every team needs one."]},{id:"supp_26",screen:"supplemental",questionIndex:0,category:"How You Think",question:"When learning something new, you prefer...",options:["The big concept first, details later (or never)","An overview, then I decide how deep to go","Step by step — I want to understand the foundation","Give me the manual. I'll read the whole thing."]},{id:"supp_27",screen:"supplemental",questionIndex:0,category:"Where You Belong",question:"Your dream neighborhood has...",options:["Restaurants, coffee shops, transit, noise — the whole thing","Walkable, but not overwhelming","Quiet streets, maybe a garden, fewer people","Land. Space. A porch. Stars visible at night."]},{id:"supp_28",screen:"supplemental",questionIndex:0,category:"Where You Belong",question:"When you need to clear your head, you go...",options:["For a walk in my neighborhood — 
1city energy helps me think","To a park or waterfront — nature-adjacent does the trick","Somewhere genuinely natural — trees, not just a median strip","As far from people as I can reasonably get"]},{id:"supp_29",screen:"supplemental",questionIndex:0,category:"Where You Belong",question:"On a weekend away, you'd choose...",options:["A city I've never explored — restaurants, museums, streets","A cozy small town with good food and something to discover","A cabin, a hike, total disconnection","Anywhere with a view and no notifications"]},{id:"supp_30",screen:"supplemental",questionIndex:0,category:"How You Communicate",question:"A friend asks your honest opinion on their haircut. It's... not great. You...",options:["Tell them the truth — real friends are honest","Focus on what works while gently noting what doesn't","Find something genuinely nice to say and leave it there","Say it looks great and feel vaguely guilty"]},{id:"supp_31",screen:"supplemental",questionIndex:0,category:"How You Communicate",question:"You disagree with something said in a meeting. You...",options:["Say so directly, in the moment","Wait, frame it constructively, then speak up","Bring it up with the right person afterward","Let it go unless it's really important"]},{id:"supp_32",screen:"supplemental",questionIndex:0,category:"How You Communicate",question:"Someone takes credit for something you did. You...",options:["Correct the record immediately and clearly","Find a moment to clarify it without making it a thing","Let it slide — I know what I contributed","Stew about it internally"]},{id:"supp_33",screen:"supplemental",questionIndex:0,category:"Your Timing",question:"You're meeting a friend for coffee. You arrive...",options:["10 minutes early — I've already ordered","Right on time, give or take a minute","A few minutes late, but I texted ahead","Running behind — it's a pattern, I know"]},{id:"supp_34",screen:"supplemental",questionIndex:0,category:"Your Timing",question:"How do you feel when you're running late?",options:["I don't run late. That's not a thing for me.","Stressed — I hate making people wait","A little rushed, but I've made peace with it","It happens. People know to expect it."]},{id:"supp_35",screen:"supplemental",questionIndex:0,category:"Your Timing",question:"Your relationship with deadlines is...",options:["Sacred. I'm done early just to be safe.","I respect them — I'd rather not cut it close","I usually make it, just not always with breathing room","Flexible. I mean, they're more like guidelines."]},{id:"supp_36",screen:"supplemental",questionIndex:0,category:"Planning Style",question:"Weekend plans come together by...",options:["Friday vibes — whatever feels right, we'll figure it out","A loose idea mid-week, details as we go","Mid-week at the latest — I like to know what's happening","Sunday I'm already planning the following weekend"]},{id:"supp_37",screen:"supplemental",questionIndex:0,category:"Planning Style",question:"You're packing for a trip. You...",options:["Throw a few things in the night before — I'll figure it out","Pack the essentials without overthinking it","Pack a few days ahead — I hate last-minute stress","I have a packing list. It lives in my Notes app."]},{id:"supp_38",screen:"supplemental",questionIndex:0,category:"Planning Style",question:"Your ideal vacation is planned...",options:["The day before departure — half the fun is winging it","A few weeks out, rough outline only","A month out with a solid itinerary","Months in advance — I need to know it's locked in"]}],ct=[...rt,...lt],dt="/assets/home_create_group-ClOMVMen.webp",ut="/assets/home_plan_gathering-CSmtrmkN.webp";async function ht(t,o){const s=new Image;s.crossOrigin="anonymous",await new Promise((l,f)=>{s.onload=l,s.onerror=f,s.src=t});const i=document.createElement("canvas");return i.width=400,i.height=400,i.getContext("2d").drawImage(s,o.x,o.y,o.width,o.height,0,0,400,400),new Promise(l=>{i.toBlob(f=>l(f),"image/jpeg",.9)})}const r={teal:"#1A4D58",amber:"#D97706",cream:"#fdfbf7"},fe="#ffffff",J="#e8e3da",R="#64748b",ye={event:{icon:V,color:r.amber},gathering:{icon:V,color:r.amber},rsvp:{icon:V,color:r.amber},poll:{icon:V,color:r.amber},discussion:{icon:tt,color:r.teal},photo:{icon:et,color:"#7c3aed"},invite:{icon:Ze,color:"#059669"},group:{icon:te,color:"#059669"},survey:{icon:Je,color:r.amber},default:{icon:Te,color:r.teal}};function pt(t){const o=t.type||"default",s=ye[o]||ye.default,i=t.preformattedTime?String(t.preformattedTime):t.time||t.createdAt?mt(t.time||t.createdAt):"";return{id:String(t.id??Math.random()),type:o,title:String(t.title||t.subject||"New notification"),body:String(t.body||t.message||t.description||""),group:t.group||t.communityName||void 0,time:i,color:t.brandColor||t.color||s.color,link:t.link||void 0}}function mt(t){if(!t)return"";const o=new Date(t);if(isNaN(o.getTime()))return String(t);const s=Date.now()-o.getTime(),i=Math.floor(s/6e4);if(i<1)return"Just now";if(i<60)return`${i}m ago`;const h=Math.floor(i/60);return h<24?`${h}h ago`:`${Math.floor(h/24)}d ago`}function gt(t){if(!t)return"";const[o,s,i]=t.split("-");return!o||!s||!i?"":`${s}/${i}/${o.slice(2)}`}const me=["#7c3aed","#059669","#0891b2","#d97706","#db2777","#16a34a","#ea580c","#0284c7","#7c3aed","#065f46","#9333ea","#0e7490"],Ce=["#7c3aed","#059669","#0891b2","#d97706","#db2777","#16a34a","#ea580c","#0284c7","#9333ea","#0e7490"];function Se(t){let o=0;for(let s=0;s<t.length;s++)o=o*31+t.charCodeAt(s)&65535;return Ce[o%Ce.length]}function xt(t,o){const s=o?280:520,i=o?180:340,h=s/2,l=i/2,f=o?20:30,d=o?14:20,b=o?58:95,k=o?90:158,m=o?9:24,u=w=>w*Math.PI/180,c=w=>{const E=w>=10?5:w>=6?4:w>=3?3:w===2?2:1;return k-(E-1)/4*(k-b)}
1,g=new Set,N=t.filter(w=>g.has(w.connectedUserId)?!1:(g.add(w.connectedUserId),!0)).slice(0,m),j=6,H=o?11:15,P=o?26:38,a=o?14:10,I=[];if(N.length>0){const w=new Map;for(const T of N){const U=T.sharedGroupCounts?.[0]?.name||T.sharedGroups?.[0]||T.groupName||"Other";w.has(U)||w.set(U,[]),w.get(U).push(T)}for(const T of w.values())T.sort((U,G)=>(G.sharedCount??1)-(U.sharedCount??1));const E=[...w.entries()].sort((T,U)=>U[1].length-T[1].length),O=new Set(N.map(T=>T.connectedUserId)),L=E.length>1?10:0,se=5,we=360-L*E.length,ne=N.length;let z=-90,W=0;for(const[,T]of E){const U=T.length/ne*we,G=z+U/2,ae=z+se,ie=Math.max(0,U-2*se),ve=T.filter(_=>_.metViaConnectedUserId&&O.has(_.metViaConnectedUserId)),re=T.filter(_=>!_.metViaConnectedUserId||!O.has(_.metViaConnectedUserId)),X=re.slice(0,j),le=[...re.slice(j),...ve],$=[];X.forEach((_,Q)=>{const B=X.length,p=B===1?G:ae+ie*Q/(B-1),v=u(p),y=c(_.sharedCount??1),q=h+y*Math.cos(v),A=l+y*Math.sin(v);$.push({angleDeg:p,dist:y,x:q,y:A}),I.push({id:_.connectedUserId,x:q,y:A,r:d,conn:_,color:me[W%me.length],edgeFromX:h,edgeFromY:l}),W++});const ce=$.length===0?{angleDeg:G,dist:c(1),x:h+c(1)*Math.cos(u(G)),y:l+c(1)*Math.sin(u(G))}:null,de=new Array(Math.max($.length,1)).fill(0);le.forEach((_,Q)=>{const B=_.metViaConnectedUserId,p=B?X.findIndex(je=>je.connectedUserId===B):-1,v=p!==-1?p:$.length>0?Q%$.length:0,y=$[v]??ce,q=de[v]++,A=q===0?0:q%2===1?Math.ceil(q/2)*a:-Math.floor(q/2)*a,F=u(y.angleDeg+A),ue=y.dist+P;I.push({id:_.connectedUserId,x:h+ue*Math.cos(F),y:l+ue*Math.sin(F),r:H,conn:_,color:me[W%me.length],edgeFromX:y.x,edgeFromY:y.y}),W++}),z+=U+L}}const S=o?16:24;let M=h-f,C=h+f,D=l-f,Y=l+f;for(const w of I)M=Math.min(M,w.x-w.r),C=Math.max(C,w.x+w.r),D=Math.min(D,w.y-w.r),Y=Math.max(Y,w.y+w.r);const K={x:M-S,y:D-S,w:C-M+S*2,h:Y-D+S*2};return{cx:h,cy:l,youR:f,vw:s,vh:i,bbox:K,nodes:I}}function xe({children:t,testId:o}){return e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wide mb-2 ml-1",style:{color:R},"data-testid":o,children:t})}function qe({name:t,compact:o=!1}){const s=new Date().getHours(),i=s<12?"Good morning":s<17?"Good afternoon":"Good evening";return e.jsx("div",{children:e.jsxs("h1",{className:o?"text-xl font-sans font-semibold text-slate-900":"text-3xl font-serif font-medium text-slate-900",children:[i,","," ",e.jsx("span",{style:{color:r.teal},children:t||"friend"})]})})}function ft({connections:t,compact:o=!1,youAvatarUrl:s="",youInitials:i="?",onAvatarClick:h}){const[l,f]=x.useState(null),[d,b]=x.useState(!1),k=x.useRef(null),m=x.useMemo(()=>xt(t,o),[t,o]),{cx:u,cy:c,youR:g,vw:n,vh:N,bbox:j,nodes:H}=m,P=H.find(a=>a.id===l)??null;return t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center text-center py-10 px-4 gap-2",children:[e.jsx(ee,{className:"w-8 h-8 text-slate-300"}),e.jsx("p",{className:"text-sm text-slate-500 font-medium",children:"Your network is just getting started"}),e.jsx("p",{className:"text-xs text-slate-400",children:"RSVP to a gathering to start building connections"})]}):e.jsxs("div",{ref:k,className:"relative select-none",style:{height:o?190:"100%",minHeight:o?150:260},children:[e.jsxs("svg",{width:"100%",height:o?190:"100%",viewBox:`${j.x} ${j.y} ${j.w} ${j.h}`,style:{width:"100%",display:"block"},preserveAspectRatio:"xMidYMid meet",children:[e.jsx("defs",{children:e.jsxs("radialGradient",{id:"mapBgHome2",cx:"50%",cy:"50%",r:"50%",children:[e.jsx("stop",{offset:"0%",stopColor:"#1a4d5814"}),e.jsx("stop",{offset:"100%",stopColor:"transparent"})]})}),e.jsx("circle",{cx:u,cy:c,r:Math.min(n,N)*.45,fill:"url(#mapBgHome2)"}),H.map(a=>{const I=l===a.id,S=a.conn.sharedCount??1,M=S>=10?5:S>=6?4:S>=3?3:S===2?2:1,C=a.conn.sharedGroupCounts?.[0]?.brandColor||(a.conn.sharedGroups?.[0]?Se(a.conn.sharedGroups[0]):null),D=I?r.amber:C?C+"70":S>=6?"#94a3b8":"#cbd5e1";return e.jsx("line",{x1:a.edgeFromX,y1:a.edgeFromY,x2:a.x,y2:a.y,stroke:D,strokeWidth:M,style:{transition:"all 0.2s"}},`edge-${a.id}`)}),H.map(a=>{const I=l===a.id,S=`${a.conn.firstName?.[0]||""}${a.conn.lastName?.[0]||""}`.toUpperCase()||"?",C=a.conn.sharedGroupCounts?.[0]?.brandColor||(a.conn.sharedGroups?.[0]?Se(a.conn.sharedGroups[0]):null)||a.color;return e.jsx("g",{onMouseEnter:()=>f(a.id),onMouseLeave:()=>f(null),style:{cursor:"pointer"},children:a.conn.avatarUrl?e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"transparent"}),e.jsx("foreignObject",{x:a.x-a.r,y:a.y-a.r,width:a.r*2,height:a.r*2,
1style:{pointerEvents:"none",overflow:"visible"},children:e.jsx("div",{style:{width:"100%",height:"100%",borderRadius:"50%",overflow:"hidden",pointerEvents:"none"},children:e.jsx("img",{src:a.conn.avatarUrl,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",pointerEvents:"none"}})})}),e.jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"none",stroke:C,strokeWidth:2,style:{transition:"stroke 0.18s",pointerEvents:"none"}})]}):e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:a.x,cy:a.y,r:a.r+(I?2:0),fill:I?C:"white",stroke:C,strokeWidth:2,style:{transition:"all 0.18s"}}),e.jsx("text",{x:a.x,y:a.y+a.r*.35,textAnchor:"middle",fontSize:a.r*.75,fill:I?"white":C,fontWeight:"700",style:{pointerEvents:"none",userSelect:"none"},children:S})]})},a.id)}),e.jsxs("g",{style:{cursor:h?"pointer":"default"},onClick:h,onMouseEnter:()=>{h&&b(!0)},onMouseLeave:()=>b(!1),children:[e.jsx("circle",{cx:u,cy:c,r:g,fill:r.amber,stroke:"white",strokeWidth:2}),s?e.jsx("foreignObject",{x:u-g,y:c-g,width:g*2,height:g*2,style:{pointerEvents:"none",overflow:"visible"},children:e.jsx("div",{style:{width:"100%",height:"100%",borderRadius:"50%",overflow:"hidden"},children:e.jsx("img",{src:s,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})})}):e.jsx("text",{x:u,y:c+g*.35,textAnchor:"middle",fontSize:g*.65,fill:"white",fontWeight:"800",style:{pointerEvents:"none",userSelect:"none"},children:i}),h&&d&&e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:u,cy:c,r:g,fill:"rgba(0,0,0,0.38)",style:{pointerEvents:"none"}}),e.jsx("foreignObject",{x:u-11,y:c-11,width:22,height:22,style:{pointerEvents:"none",overflow:"visible"},children:e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(_e,{style:{width:16,height:16,color:"white"}})})})]})]})]}),P&&(()=>{const a=P,I=a.conn,S=[I.firstName,I.lastName].filter(Boolean).join(" ")||"Connection",M=I.sharedCount??1,C=(a.x-j.x)/j.w*100,D=(a.y-j.y)/j.h*100,Y=C>60?"auto":`${C}%`,K=C>60?`${100-C}%`:"auto",w=D>55?"auto":`${D+8}%`,E=D>55?`${100-D+8}%`:"auto";return e.jsx("div",{className:"absolute z-10 pointer-events-none",style:{left:Y,right:K,top:w,bottom:E},children:e.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-slate-200 px-3 py-2.5 text-left min-w-[170px] max-w-[230px]",children:[e.jsx("p",{className:"text-sm font-bold text-slate-900 leading-tight",children:S}),e.jsxs("div",{className:"mt-1.5 space-y-1",children:[I.lastGatheringDate&&e.jsxs("p",{className:"text-xs text-slate-500 flex items-center gap-1",children:[e.jsx(Ye,{className:"w-3 h-3 shrink-0",style:{color:r.teal}}),e.jsxs("span",{children:["Last Gathering: ",e.jsx("span",{className:"font-medium text-slate-700",children:gt(I.lastGatheringDate)})]})]}),I.sharedGroups&&I.sharedGroups.length>0&&e.jsxs("p",{className:"text-xs text-slate-500 flex items-start gap-1",children:[e.jsx(ee,{className:"w-3 h-3 shrink-0 mt-px",style:{color:r.teal}}),e.jsxs("span",{children:[e.jsxs("span",{className:"font-medium text-slate-700",children:[I.sharedGroups.length===1?"Group":"Groups",": "]}),I.sharedGroups.join(", ")]})]}),e.jsxs("p",{className:"text-xs font-semibold flex items-center gap-1",style:{color:r.amber},children:[e.jsx(te,{className:"w-3 h-3 shrink-0"}),M," Shared ",M===1?"Gathering":"Gatherings"]})]})]})})})()]})}function De({notif:t,onDismiss:o,dark:s=!1}){const[i,h]=x.useState(!1),[,l]=be(),f=(ye[t.type??"default"]??ye.default).icon,d=u=>{u.stopPropagation(),h(!0),setTimeout(o,280)},b=()=>{t.link&&l(t.link)},k=s?"rgba(255,255,255,0.15)":`${t.color}12`,m=s?"#ffffff":t.color;return e.jsxs("div",{className:`flex gap-3 items-start px-5 py-3.5 border-t ${s?"border-white/10":"border-slate-100"} ${t.link?s?"cursor-pointer hover:bg-white/5 transition-colors":"cursor-pointer hover:bg-slate-50 transition-colors":""}`,style:{opacity:i?0:1,transform:i?"translateX(12px)":"translateX(0)",transition:"all 0.28s ease"},onClick:t.link?b:void 0,children:[e.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5",style:{backgroundColor:k},children:e.jsx(f,{className:"w-3.5 h-3.5",style:{color:m}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:`text-sm font-semibold leading-snug ${s?"text-white":"text-slate-800"}`,children:t.title}),e.jsx("button",{onClick:d,className:`transition-colors shrink-0 mt-0.5 ${s?"text-white/40 hover:text-white/70":"text-slate-300 hover:text-slate-500"}`,children:e.jsx(Ge,{className:"w-3.5 h-3.5"})})]}),e.jsx("p",{className:`text-xs mt-0.5 leading-relaxed ${s?"text-white/70":"text-slate-500"}`,children:t.body}),e.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[t.group&&e.jsx("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{backgroundColor:s?"rgba(255,255,255,0.15)":`${t.color}
112`,color:s?"#ffffff":t.color},children:t.group}),t.time&&e.jsx("span",{className:`text-[10px] ${s?"text-white/50":"text-slate-400"}`,children:t.time}),t.link&&e.jsx("span",{className:"text-[10px] font-semibold ml-auto",style:{color:s?"#ffffff":r.teal},children:"View →"})]})]})]})}function yt({onSaveAnswer:t,answeredIds:o}){const[s,i]=x.useState(0),[h,l]=x.useState(null),[f,d]=x.useState(!1),[b,k]=x.useState(!1),m=x.useMemo(()=>ct.filter(n=>!o.has(n.id)),[o]);if(m.length===0)return null;const u=m[s%m.length],c=async n=>{if(!(f||b)){l(n),k(!0);try{await t(u.id,u.question,n,u.screen,u.questionIndex),d(!0)}catch{l(null)}finally{k(!1)}}},g=()=>{l(null),d(!1),i(0)};return e.jsx("div",{className:"rounded-2xl border border-slate-200 bg-white shadow-sm overflow-hidden",children:e.jsxs("div",{className:"px-5 pt-5 pb-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(nt,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"font-semibold text-sm text-slate-700",children:u.category})]}),e.jsx("p",{className:"text-sm font-semibold text-slate-800 leading-snug mb-3",children:u.question}),e.jsx("div",{className:"space-y-2",children:u.options.map(n=>{const N=h===n,j=f&&N;return e.jsxs("button",{"data-testid":`quiz-option-${n.substring(0,20).replace(/\s+/g,"-").toLowerCase()}`,onClick:()=>c(n),disabled:b,className:"w-full text-left text-xs px-3 py-2.5 rounded-xl border transition-all duration-200 flex items-center justify-between gap-2",style:{borderColor:N?j?r.teal:r.amber:"#e2e8f0",backgroundColor:N?j?`${r.teal}10`:`${r.amber}10`:"white",color:N?j?r.teal:r.amber:"#475569",fontWeight:N?600:400},children:[e.jsx("span",{children:n}),j&&e.jsx(ke,{className:"w-3.5 h-3.5 shrink-0",style:{color:r.teal}})]},n)})}),f&&e.jsxs("div",{className:"mt-3 flex items-center justify-between animate-in fade-in duration-300",children:[e.jsx("span",{className:"text-[11px] text-slate-400",children:"Saved to your vibe profile"}),e.jsxs("button",{"data-testid":"button-quiz-next",onClick:g,className:"text-[11px] font-semibold flex items-center gap-1",style:{color:r.teal},children:["Next question ",e.jsx(at,{className:"w-3 h-3"})]})]})]})})}function bt({profile:t,onFinish:o,initials:s,onAvatarClick:i,avatarUploading:h}){const[,l]=be(),f=({size:m,fill:u=!1,showBadge:c=!0,subtleBadge:g=!1})=>{const n=g?22:u?26:(m??44)*.4,N=u?33:(m??44)*.36;return e.jsxs("button",{type:"button",onClick:i,"data-testid":"button-profile-avatar",className:"relative overflow-visible active:scale-95 transition-transform shrink-0",style:u?{width:99,height:99}:{width:m,height:m},"aria-label":"Edit profile photo",children:[e.jsx("span",{className:"block w-full h-full overflow-hidden flex items-center justify-center rounded-full",style:{backgroundColor:t.avatarUrl?"transparent":`${r.teal}14`,border:`2px solid ${r.teal}22`},children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:"w-full h-full object-cover"}):e.jsx("span",{className:"font-black",style:{color:r.teal,fontSize:N},children:s})}),c&&e.jsx("span",{className:"absolute bottom-1.5 right-1.5 rounded-full flex items-center justify-center shadow-sm",style:{width:n,height:n,backgroundColor:g?"rgba(255,255,255,0.9)":r.teal,border:g?`1px solid ${J}`:"2px solid #fff"},children:h?e.jsx(Ae,{className:"animate-spin",style:{width:n*.55,height:n*.55,color:g?R:"#fff"}}):e.jsx(_e,{style:{width:n*.55,height:n*.55,color:g?R:"#fff"}})})]})},d=[{label:"Add a photo",done:!!t.avatarUrl},{label:"Tell your story",done:!!t.aboutMe.trim()},{label:"Set your location",done:!!(t.location.trim()||t.zipCode.trim())},{label:"Pick your interests",done:t.selectedInterests.length>0},{label:"Answer vibe questions",done:Object.keys(t.personalityTraits).length>0||t.profileAnswers.length>0},{label:"Link a social",done:!!(t.linkedInUrl||t.instagramUrl||t.facebookUrl||t.tiktokUrl)}],b=d.filter(m=>m.done).length,k=Math.round(b/d.length*100);return d.find(m=>!m.done),k>=100?e.jsx("div",{className:"rounded-2xl border overflow-hidden",style:{backgroundColor:fe,borderColor:J},"data-testid":"card-profile-completion",children:e.jsxs("div",{className:"px-5 py-4 flex items-center gap-3",children:[e.jsx(f,{size:91,subtleBadge:!0}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-bold leading-snug",style:{color:r.teal},children:"Look at you — you're ready to gather."}),e.jsxs("button",{type:"button",onClick:()=>l("/dashboard/profile"),"data-testid":"link-view-profile",className:"mt-1.5 text-xs font-bold flex items-center gap-1",style:{color:r.teal},children:["View profile ",e.jsx(Z,{className:"w-3 h-3"})]})]})]})}):e.jsx("div",{className:"rounded-2xl border overflow-hidden",style:{backgroundColor:fe,borderColor:J},"data-testid":"card-profile-completion",children:e.jsxs("div",{className:"flex items-center gap-4 p-4",children:[e.jsx(f,{fill:!0}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center py-1",children:[e.jsx("span",{className:"font-semibold text-sm mb-1",style:{color:r.teal},children:"Your profile"}),e.jsxs("div",{className:"flex items-end gap-1.5 mb-2",children:[e.jsxs("span",{className:"text-3xl font-black leading-none",style:{color:r.teal},"data-testid":"text-profile-completion-percent",children:[k,"%"]}),e.jsx("span",{className:"text-xs font-medium mb-0.5",style:{color:R},children:"complete"})]}
1),e.jsx("div",{className:"h-2 w-1/2 rounded-full overflow-hidden mb-3",style:{backgroundColor:"#eceae4"},children:e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${k}%`,backgroundColor:r.teal}})}),e.jsxs("button",{onClick:o,"data-testid":"button-finish-profile",className:"text-sm font-extrabold flex items-center gap-1",style:{color:r.teal},children:["Finish your profile ",e.jsx(Z,{className:"w-4 h-4"})]})]})]})})}const wt=[{label:"2 weeks",days:14},{label:"1 month",days:30},{label:"3 months",days:90},{label:"6 months",days:180},{label:"12 months",days:365}];function vt({filterDays:t,setFilterDays:o,filterGroup:s,setFilterGroup:i,allGroups:h}){return e.jsxs("div",{className:"flex items-center gap-2 flex-wrap px-4 pb-2 pt-1",children:[e.jsx("select",{value:t,onChange:l=>o(Number(l.target.value)),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border border-slate-200 text-slate-500 bg-white outline-none cursor-pointer",style:{maxWidth:110},children:wt.map(l=>e.jsx("option",{value:l.days,children:l.label},l.days))}),h.length>0&&e.jsxs("select",{value:s??"",onChange:l=>i(l.target.value||null),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border border-slate-200 text-slate-500 bg-white outline-none cursor-pointer",style:{maxWidth:130},children:[e.jsx("option",{value:"",children:"All groups"}),h.map(l=>e.jsx("option",{value:l,children:l},l))]})]})}function jt({gatheringsCount:t,connectionCount:o,groupsCount:s}){const i=[{label:"Gatherings",value:t,Icon:Ye},{label:"Connections",value:o,Icon:ee},{label:"Groups",value:s,Icon:te}];return e.jsx("div",{className:"grid grid-cols-3 gap-2 px-4 pb-4",children:i.map(({label:h,value:l,Icon:f})=>e.jsxs("div",{className:"rounded-xl p-3 text-center",style:{backgroundColor:`${r.teal}08`},children:[e.jsx(f,{className:"w-4 h-4 mx-auto mb-1",style:{color:r.teal}}),e.jsx("div",{className:"text-lg font-black",style:{color:r.teal},children:l}),e.jsx("div",{className:"text-[9px] text-slate-400 uppercase tracking-wide",children:h})]},h))})}function It({notifications:t,onDismiss:o}){return e.jsxs("div",{className:"rounded-2xl bg-white border border-slate-200 shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 pt-5 pb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Te,{className:"w-4 h-4 text-slate-400"}),e.jsx("h2",{className:"font-semibold text-sm text-slate-700",children:"What's Happening"})]}),t.length>0&&e.jsxs("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full",style:{backgroundColor:`${r.amber}18`,color:r.amber},children:[t.length," new"]})]}),t.length===0?e.jsxs("div",{className:"px-5 pb-6 text-center",children:[e.jsx(ke,{className:"w-7 h-7 mx-auto mb-2 text-slate-300"}),e.jsx("p",{className:"text-sm font-medium text-slate-500",children:"You're all caught up"}),e.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"Check back after your next gathering"})]}):e.jsxs("div",{children:[t.map(s=>e.jsx(De,{notif:s,onDismiss:()=>
1o(s.id)},s.id)),e.jsx("div",{className:"pb-2"})]})]})}function kt({onCreateGroup:t,onPlanGathering:o}){const s="linear-gradient(to bottom, rgba(6,38,45,0.18) 0%, rgba(6,38,45,0.55) 55%, rgba(6,38,45,0.92) 100%)";return e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{"data-testid":"button-create-group",onClick:t,className:"relative flex flex-col items-start gap-2 rounded-2xl p-4 text-left overflow-hidden shadow-sm active:scale-[0.97] transition-transform min-h-[132px]",style:{color:"#ffffff"},children:[e.jsx("img",{src:dt,alt:"","aria-hidden":!0,className:"absolute inset-0 w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0",style:{background:s}}),e.jsxs("div",{className:"relative flex items-center justify-between w-full",children:[e.jsx("span",{className:"w-[41px] h-[41px] rounded-xl flex items-center justify-center",style:{backgroundColor:"rgba(255,255,255,0.22)",backdropFilter:"blur(2px)"},children:e.jsx(te,{className:"w-[23px] h-[23px] text-white"})}),e.jsx("span",{className:"w-6 h-6 rounded-full flex items-center justify-center shrink-0",style:{backgroundColor:"rgba(255,255,255,0.22)",backdropFilter:"blur(2px)"},children:e.jsx(Z,{className:"w-3.5 h-3.5 text-white"})})]}),e.jsx("span",{className:"relative mt-auto text-[15px] font-bold leading-tight drop-shadow-sm",children:"Create a group"}),e.jsx("span",{className:"relative text-xs font-medium leading-snug text-white/85 drop-shadow-sm",children:"Organize your people"})]}),e.jsxs("button",{"data-testid":"button-plan-gathering",onClick:o,className:"relative flex flex-col items-start gap-2 rounded-2xl p-4 text-left overflow-hidden shadow-sm active:scale-[0.97] transition-transform min-h-[132px]",style:{color:"#ffffff"},children:[e.jsx("img",{src:ut,alt:"","aria-hidden":!0,className:"absolute inset-0 w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0",style:{background:s}}),e.jsxs("div",{className:"relative flex items-center justify-between w-full",children:[e.jsx("span",{className:"w-[41px] h-[41px] rounded-xl flex items-center justify-center",style:{backgroundColor:"rgba(255,255,255,0.22)",backdropFilter:"blur(2px)"},children:e.jsx(V,{className:"w-[23px] h-[23px] text-white"})}),e.jsx("span",{className:"w-6 h-6 rounded-full flex items-center justify-center shrink-0",style:{backgroundColor:"rgba(255,255,255,0.22)",backdropFilter:"blur(2px)"},children:e.jsx(Z,{className:"w-3.5 h-3.5 text-white"})})]}),e.jsx("span",{className:"relative mt-auto text-[15px] font-bold leading-tight drop-shadow-sm",children:"Plan a gathering"}),e.jsx("span",{className:"relative text-xs font-medium leading-snug text-white/85 drop-shadow-sm",children:"Get on the calendar"})]})]})}const ge=[{id:"invites",label:"Invites",types:["invite","group"],emptyTitle:"No invites waiting",emptySub:"New invitations will land here"},{id:"coming",label:"Coming up",types:["event","gathering","poll","survey"],emptyTitle:"Nothing on the calendar yet",emptySub:"Upcoming gatherings & polls show up here"},{id:"activity",label:"Activity",types:["discussion","photo","rsvp"],emptyTitle:"All quiet for now",emptySub:"Chatter from your groups appears here"}];function Nt({notifications:t,onDismiss:o}){const s=x.useMemo(()=>{const c={invites:[],coming:[],activity:[]};for(const g of t){const n=g?.type??"default",N=ge.find(j=>j.types.includes(n));c[N?N.id:"activity"].push(g)}return c},[t]),[i,h]=x.useState(()=>ge.find(g=>(s[g.id]?.length??0)>0)?.id??"invites"),[l,f]=x.useState(!1),d=ge.find(c=>c.id===i),b=s[i]??[],k=l?b:b.slice(0,3),m=b.length-k.length,u=c=>{h(c),f(!1)};return e.jsxs("div",{className:"rounded-2xl border overflow-hidden",style:{backgroundColor:fe,borderColor:J},children:[e.jsx("div",{className:"px-3 pt-3 pb-3",children:e.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-xl p-1",style:{backgroundColor:"#f1f0ec"},children:ge.map(c=>{const g=s[c.id]?.length??0,n=c.id===i;return e.jsxs("button",{"data-testid":`tab-whatshappening-${c.id}`,onClick:()=>u(c.id),className:"relative flex items-center justify-center gap-1.5 rounded-lg py-2 text-xs font-semibold transition-colors",style:{backgroundColor:n?"white":"transparent",color:n?r.teal:R,boxSh
1adow:n?"0 1px 2px rgba(0,0,0,0.06)":"none"},children:[c.label,g>0&&e.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-full leading-none",style:{backgroundColor:n?`${r.teal}1a`:"rgba(15,23,42,0.06)",color:n?r.teal:R},children:g})]},c.id)})})}),b.length===0?e.jsxs("div",{className:"px-5 pb-6 text-center",children:[e.jsx(ke,{className:"w-7 h-7 mx-auto mb-2",style:{color:"#cbd5e1"}}),e.jsx("p",{className:"text-sm font-medium",style:{color:r.teal},children:d.emptyTitle}),e.jsx("p",{className:"text-xs mt-0.5",style:{color:R},children:d.emptySub})]}):e.jsxs("div",{children:[k.map(c=>e.jsx(De,{notif:c,onDismiss:()=>o(c.id)},c.id)),m>0&&e.jsxs("button",{"data-testid":"button-whatshappening-seeall",onClick:()=>f(!0),className:"w-full text-center py-3 text-xs font-semibold border-t border-slate-100",style:{color:r.teal},children:["See ",m," more"]}),e.jsx("div",{className:"pb-2"})]})]})}function Ct({gatherings:t,userId:o}){const[,s]=be(),i=o?`heroEventDismissedIds:${o}`:null,[h,l]=x.useState(()=>{if(!i)return new Set;try{const u=localStorage.getItem(i);return new Set(u?JSON.parse(u):[])}catch{return new Set}}),f=x.useCallback((u,c)=>{c.stopPropagation(),l(g=>{const n=new Set(g);if(n.add(u),i)try{localStorage.setItem(i,JSON.stringify(Array.from(n)))}catch{}return n})},[i]),d=x.useMemo(()=>{const u=new Date,c=`${u.getFullYear()}-${String(u.getMonth()+1).padStart(2,"0")}-${String(u.getDate()).padStart(2,"0")}`,g=n=>n.date&&n.date>=c?`A_${n.date}`:n.deadline?`B_${n.deadline}`:"C_";return(t||[]).filter(n=>n&&n.status!=="draft"&&n.status!=="cancelled"&&!h.has(n.id)&&(n.date&&n.date>=c||!n.date&&(n.status==="planning"||n.status==="confirmed"))).sort((n,N)=>g(n).localeCompare(g(N)))[0]??null},[t,h]);if(!d)return null;const b=/^#[0-9a-fA-F]{6}$/.test(d.communityBrandColor||"")?d.communityBrandColor:d.themeColor||r.teal,k=d.date?Be(d.date,d.timezone):"Date TBD",m=d.time?Le(d.date,d.time,d.timezone):"";return e.jsxs("div",{children:[e.jsx(xe,{testId:"title-next-gathering",children:"Your next gathering"}),e.jsxs("button",{"data-testid":"card-next-gathering",onClick:()=>s(`/dashboard/events/${d.id}`),className:"w-full text-left rounded-2xl overflow-hidden active:scale-[0.99] transition-transform grid grid-cols-[auto_1fr] gap-x-3 gap-y-2 p-3",style:{backgroundColor:b},children:[e.jsx("div",{className:"self-center shrink-0",children:e.jsx(ze,{dark:!0,eventImageUrl:d.eventImageUrl,eventImageMode:d.eventImageMode,alt:d.title||"",illustrationKey:d.defaultIllustration,eventType:d.eventType,themeColor:b,className:"w-28 rounded-xl","data-testid":"img-next-gathering"})}),e.jsxs("div",{className:"min-w-0 flex flex-col justify-center space-y-0.5",children:[e.jsx("h3",{className:"font-bold text-sm text-white truncate","data-testid":"text-next-gathering-title",children:d.title||"Untitled gathering"}),e.jsx("p",{className:"text-xs font-semibold text-white/70",children:k}),e.jsx(Qe,{event:d,dark:!0}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-white/60 min-w-0",children:[m&&e.jsxs(e.Fragment,{children:[e.jsx(st,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{className:"shrink-0",children:m})]}),m&&d.location&&e.jsx("span",{className:"text-white/30 shrink-0",children:"·"}),d.location&&e.jsxs(e.Fragment,{children:[e.jsx(ot,{className:"w-3 h-3 shrink-0"}),e.jsx("span",{className:"truncate",children:d.location})]})]})]}),e.jsxs("div",{className:"col-span-2 flex items-center gap-2 min-w-0",children:[e.jsx(Ve,{event:d,dark:!0}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(Ke,{event:d,themeColor:b,dark:!0,onDismiss:u=>f(d.id,u)})})]})]})]})}function St({gatheringsCount:t,connectionCount:o,groupsCount:s}){const i=[{label:"Gatherings",value:t,Icon:V},{label:"Connections",value:o,Icon:ee},{label:"Groups",value:s,Icon:te}];return e.jsx("div",{className:"grid grid-cols-3 gap-2","data-testid":"stats-strip",children:i.map(({label:h,value:l,Icon:f})=>e.jsxs("div",{"data-testid":`stat-${h.toLowerCase()}`,className:"rounded-xl border px-1.5 py-2.5 flex flex-col items-center text-center gap-1",style:{backgroundColor:fe,borderColor:J},children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(f,{className:"w-3.5 h-3.5 shrink-0",style:{color:r.teal}}),e.jsx("span",{className:"text-lg font-black leading-none",style:{color:r.teal},children:l})]}),e.jsx("div",{className:"text-[10px] font-semibold leading-none",style:{color:R},children:h})]},h))})}function qt({onCreateGroup:t}){return e.jsxs("div",{className:"rounded-2xl border border-amber-200 bg-amber-50/60 p-5 flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-semibold text-[#1A4D58]",children:"Every group has a home in Breaking Bread"}),e.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Bring your people together — start a group today"})]}),e.jsxs(Ie,{"data-testid":"button-cta-create-group",onClick:t,size:"sm",className:"shrink-0 h-9 px-4 text-xs font-semibold rounded-xl text-white",style:{backgroundColor:r.amber},children:["Start a Group ",e.jsx(Z,{className:"w-3.5 h-3.5 ml-1.5"})]})]})}function Cs(){const{toast:t}=Ue(),o=$e(),{profile:s,user:i,refetch:h}=Ee(),[,l]=be(),[f,d]=x.useState(!1),[b,k]=x.useState(null),{data:m}=pe({queryKey:["/api/account/usage"],queryFn:he({on401:"returnNull"}),enabled:!!i}),{data:u}=pe({queryKey:["/api/gatherings"],queryFn:he({on401:"returnNull"}),staleTime:120*1e3,gcTime:1800*1e3,placeholderData:p=>p}),{data:c=[]}=pe({queryKey:["/api/connections"],queryFn:he({on401:"returnNull"}),enabled:!!i,staleTime:300*1e3}),{data:g}=pe({queryKey:["/api/notifications"],queryFn:he({on401:"returnNull"}),enabled:!!i,retry:!1}),[n,N]=x.useState(new Set),[j,H]=x.useState(90),[P,a]=x.useState(null),I=x.useMemo(()=>{const p=new Set;
1return c.forEach(v=>(v.sharedGroups??[]).forEach(y=>p.add(y))),[...p].sort()},[c]),S=x.useMemo(()=>{let p=c;const v=new Date;v.setDate(v.getDate()-j);const y=v.toISOString().slice(0,10);p=p.filter(A=>!A.lastGatheringDate||A.lastGatheringDate>=y),P!==null&&(p=p.filter(A=>(A.sharedGroups??[]).includes(P)));const q=new Map;for(const A of p){const F=q.get(A.connectedUserId);(!F||(A.sharedCount??1)>(F.sharedCount??1))&&q.set(A.connectedUserId,A)}return[...q.values()]},[c,j,P]),M=x.useMemo(()=>{const p=Array.isArray(g)?g:[],v=Date.now();return p.filter(y=>y&&y.id&&!n.has(String(y.id))).sort((y,q)=>{const A=new Date(y.sortTime||y.createdAt||0).getTime(),F=new Date(q.sortTime||q.createdAt||0).getTime();return Math.abs(v-A)-Math.abs(v-F)}).slice(0,8).map(y=>pt(y))},[g,n]),C=p=>N(v=>new Set([...v,p])),D=x.useCallback(()=>{if(m?.groupQuotaEnforced!==!1&&m?.groupLimit!=null&&m.groupsUsed>=m.groupLimit){k({limitType:"group_limit",tier:m.tier,limit:m.groupLimit,currentCount:m.groupsUsed,canUpgrade:m.tier!=="tier5"});return}d(!0)},[m]),Y=x.useMemo(()=>({firstName:s?.firstName||"",lastName:s?.lastName||"",location:s?.location||"",avatarUrl:s?.avatarUrl||"",selectedInterests:s?.interests||[],personalityTraits:s?.personalityTraits||s?.personality||{},personality:s?.personality||{},profileAnswers:s?.profileAnswers||[],headline:s?.headline||"",bio:s?.bio||"",vibeSummary:s?.vibeSummary||"",aboutMe:s?.bio||s?.aboutMe||"",socialBattery:s?.socialBattery??50,zipCode:s?.zipCode||"",linkedInUrl:s?.linkedInUrl||"",instagramUrl:s?.instagramUrl||"",facebookUrl:s?.facebookUrl||"",tiktokUrl:s?.tiktokUrl||""}),[s]),K=x.useMemo(()=>new Set(Y.profileAnswers.map(p=>p.id)),[Y.profileAnswers]),w=Re({mutationFn:async p=>(await Ne("PUT","/api/profile",p)).json(),onSuccess:()=>{o.invalidateQueries({queryKey:["/api/auth/me"]})}}),E=x.useRef(null),[O,L]=x.useState(null),[se,oe]=x.useState(!1),[we,ne]=x.useState({x:0,y:0}),[z,W]=x.useState(1),[T,U]=x.useState(null),[G,ae]=x.useState(!1),ie=()=>E.current?.click(),ve=p=>{const v=p.target.files?.[0];if(!v)return;const y=new FileReader;y.onload=()=>{L(y.result),oe(!0),ne({x:0,y:0}),W(1)},y.readAsDataURL(v),p.target.value=""},re=x.useCallback((p,v)=>{U(v)},[]),X=async()=>{if(!(!O||!T)){ae(!0);try{const p=await ht(O,T);oe(!1);const v=new FormData;v.append("avatar",p,"avatar.jpg");const y=await fetch("/api/upload/avatar",{method:"POST",credentials:"include",body:v});if(y.ok){const{url:q}=await y.json();w.mutate({avatarUrl:q}),t({title:"Photo updated!"})}else t({variant:"destructive",title:"Upload failed",description:"Please try again."})}catch{t({variant:"destructive",title:"Upload failed",description:"Please try again."})}finally{ae(!1),L(null)}}},le=()=>{oe(!1),L(null)},$=async(p,v,y,q,A)=>{try{const F=Y.profileAnswers.filter(je=>je.id!==p),ue={id:p,screen:q,questionIndex:A,question:v,answer:y,answeredAt:new Date().toISOString()};await Ne("PUT","/api/profile",{profileAnswers:[...F,ue]}),await h(),t({title:"Saved!",description:"Your answer has been added to your vibe profile."})}catch{throw t({variant:"destructive",title:"Couldn't save",description:"Please try again."}),new Error("Save failed")}},ce=(u||[]).length,de=m?.groupsUsed??0,_=c.length,Q=`${Y.firstName?.[0]||""}${Y.lastName?.[0]||""}`.toUpperCase()||"?",B={filterDays:j,setFilterDays:H,filterGroup:P,setFilterGroup:a,allGroups:I};return e.jsxs(Pe,{headerColor:"#06262D",children:[e.jsx("input",{ref:E,type:"file",accept:"image/*",className:"hidden",onChange:ve}),e.jsx(Fe,{open:se,onOpenChange:p=>{p||le()},children:e.jsxs(We,{className:"max-w-lg p-0 gap-0 overflow-hidden rounded-3xl",children:[e.jsx("div",{className:"relative w-full h-[400px] bg-black",children:O&&e.jsx(Xe,{image:O,crop:we,zoom:z,aspect:1,cropShape:"round",onCropChange:ne,onZoomChange:W,onCropComplete:re})}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-slate-500",children:"Zoom"}),e.jsx("input",{type:"range",min:1,max:3,step:.1,value:z,onChange:p=>W(Number(p.target.value)),className:"flex-1"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ie,{variant:"outline",className:"flex-1",onClick:le,children:"Cancel"}),e.jsxs(Ie,{className:"flex-1 bg-[#1A4D58] hover:bg-[#1A4D58]/90",onClick:X,disabled:G,children:[G?e.jsx(Ae,{className:"w-4 h-4 animate-spin mr-2"}):null,"Save Photo"]})]})]})]})}),e.jsx("div",{className:"min-h-screen",style:{backgroundColor:r.cream}
1,children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 md:px-8 pt-6 pb-14",children:[e.jsxs("div",{className:"md:hidden space-y-4",children:[e.jsx(qe,{name:Y.firstName,compact:!0}),e.jsx(bt,{profile:Y,onFinish:()=>l("/dashboard/profile"),initials:Q,onAvatarClick:ie,avatarUploading:G}),e.jsx(Ct,{gatherings:u||[],userId:i?.id||""}),e.jsxs("div",{children:[e.jsx(xe,{testId:"title-quick-actions",children:"Quick actions"}),e.jsx(kt,{onCreateGroup:D,onPlanGathering:()=>l("/dashboard/create-gathering")})]}),e.jsxs("div",{children:[e.jsx(xe,{testId:"title-growing-table",children:"Your growing circle"}),e.jsx(St,{gatheringsCount:ce,connectionCount:_,groupsCount:de})]}),e.jsxs("div",{children:[e.jsx(xe,{testId:"title-whats-happening",children:"What's happening"}),e.jsx(Nt,{notifications:M,onDismiss:C})]})]}),e.jsxs("div",{className:"hidden md:block space-y-6",children:[e.jsx(qe,{name:Y.firstName}),e.jsxs("div",{className:"grid gap-6",style:{gridTemplateColumns:"320px 1fr"},children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(It,{notifications:M,onDismiss:C}),e.jsx(yt,{onSaveAnswer:$,answeredIds:K})]}),e.jsxs("div",{className:"rounded-2xl bg-white border border-slate-200 shadow-sm overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"px-6 pt-5 pb-2 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[e.jsx(ee,{className:"w-4 h-4 text-slate-400"}),e.jsx("h2",{className:"font-semibold text-sm text-slate-700",children:"My Network"})]}),e.jsx("p",{className:"text-xs text-slate-400 ml-6",children:"People you've gathered with · hover to explore"})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-2xl font-black",style:{color:r.teal},children:S.length}),e.jsx("div",{className:"text-[10px] text-slate-400",children:"connections"})]})]}),e.jsx(vt,{...B}),e.jsx("div",{className:"px-4 flex-1",children:e.jsx(ft,{connections:S,youAvatarUrl:Y.avatarUrl,youInitials:Q,onAvatarClick:ie})}),S.length>0&&e.jsx("div",{className:"px-6 pb-3 pt-1",children:e.jsxs("div",{className:"flex gap-3 text-[11px] text-slate-400 justify-center",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block w-5 border-t border-slate-300",style:{borderWidth:1}}),"1×"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block w-5 border-t border-slate-300",style:{borderWidth:2}}),"2×"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block w-5 border-t border-slate-300",style:{borderWidth:3}}),"3–5×"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block w-5 border-t",style:{borderWidth:4,borderColor:"#94a3b8"}}),"6–9×"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block w-5 border-t",style:{borderWidth:5,borderColor:"#94a3b8"}}),"10+×"]})]})}),e.jsx(jt,{gatheringsCount:ce,connectionCount:_,groupsCount:de})]})]}),e.jsx(qt,{onCreateGroup:D})]})]})}),b&&e.jsx(He,{open:!!b,onClose:()=>k(null),limitType:b.limitType,tier:b.tier,limit:b.limit,currentCount:b.currentCount,canUpgrade:b.canUpgrade}),e.jsx(Oe,{open:f,onOpenChange:d})]})}export{Cs 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.