PageSourceSearch

https://socialloop.ai/_next/static/chunks/5356.2e6df0eda06cbb21.js

js socialloop.ai collected 2026-10-05 12:46:55 UTC 22,580 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5356],{30770:(e,t,s)=>{s.d(t,{x:()=>a});var n=s(12115),i=s(10555);function a(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(0,n.useRef)(t);a.current=t;let l=(0,n.useRef)(!1),{eventId:r,communityId:o,ready:d=!0}=s;(0,n.useEffect)(()=>{if(!d||l.current)return;let t=(0,i.Ti)();t&&t.action===e&&(!t.eventId||!r||t.eventId===r)&&(t.communityId&&o&&t.communityId!==o||(l.current=!0,(0,i.zm)(),a.current(t.payload)))},[e,r,o,d])}},85356:(e,t,s)=>{s.r(t),s.d(t,{default:()=>C});var n=s(95155),i=s(12115),a=s(39390),l=s(14585),r=s(29213),o=s(82146),d=s(37401),c=s(13038),u=s(3131),m=s(12711),h=s(8683),p=s(18619),x=s(30770),v=s(76849),f=s(12180);let b=[{key:"host",label:"Producer",description:"Full producer permissions — manage everything as if it were their own event"},{key:"manager",label:"Event Manager",description:"Full event management except staff & finances"},{key:"guest_list",label:"Guest List Manager",description:"Manage guest list, check-in, and attendee coordination"},{key:"door_person",label:"Check-in Attendant",description:"Handle guest check-in at the door"},{key:"promoter",label:"Co-Host",description:"Featured on the event page as a host. Can invite people from their own network. No other event access."}];function g(e){var t,s,c;let{open:u,onClose:x,initialRole:g,initialValues:j}=e,{user:y,userProfile:N,notify:w}=(0,d.Y)(),{eventId:k,eventData:C}=(0,o._)(),[L,I]=(0,i.useState)(null!=(t=null==j?void 0:j.email)?t:""),[S,A]=(0,i.useState)(null!=(c=null!=(s=null==j?void 0:j.role)?s:g)?c:"guest_list"),[U,M]=(0,i.useState)(!1),[R,D]=(0,i.useState)(""),[_,F]=(0,i.useState)(void 0);(0,i.useEffect)(()=>{g&&A(g)},[g]);let E=(0,i.useCallback)(()=>{I(""),A(null!=g?g:"guest_list"),D(""),F(void 0)},[g]),H=(0,i.useCallback)(async()=>{if(k&&y&&L.trim()){M(!0),D(""),F(void 0);try{let e=(0,v.httpsCallable)(l.functions,"checkStaffLimit");await e({eventId:k});let t=(0,r.q)(),s=(0,a.collection)(l.db,"events",k,"staff_invites"),n=[null==N?void 0:N.firstName,null==N?void 0:N.lastName].filter(Boolean).join(" ")||"A host";await (0,a.addDoc)(s,{eventId:k,email:L.trim(),role:S,token:t,status:"pending",invitedBy:y.uid,createdAt:(0,a.serverTimestamp)(),inviterName:n,eventName:(null==C?void 0:C.eventName)||null,eventDate:(null==C?void 0:C.eventDate)?a.Timestamp.fromDate(C.eventDate):null,eventImageURL:(null==C?void 0:C.imageURL)||null,eventVenue:(null==C?void 0:C.locationAddress)||null,metadata:{}}),w({type:"success",message:"Invite sent to ".concat(L.trim())}),E(),x()}catch(t){if(t&&"object"==typeof t&&"code"in t&&("functions/resource-exhausted"===t.code||"resource-exhausted"===t.code)){var e;D(t&&"object"==typeof t&&"message"in t?t.message:"Team member limit reached for your plan."),F(null==(e=(0,f._s)(t))?void 0:e.requiredPlan)}else(0,f.WL)("StaffInvite",w)(t)}finally{M(!1)}}},[k,y,L,S,w,E,x,N,C]);return u?(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:x}),(0,n.jsxs)("div",{className:"relative w-full max-w-md mx-4 bg-modal-glass border border-card rounded-2xl shadow-2xl overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/5",children:[(0,n.jsx)("h2",{className:"studio-subtitle",children:"Invite Team Member"}),(0,n.jsx)("button",{onClick:x,className:"p-1.5 rounded-lg hover:bg-white/5 text-t2 hover:text-t1/70 transition",children:(0,n.jsx)(h.fK,{className:"w-5 h-5"})})]}),(0,n.jsxs)("div",{className:"px-6 py-5 space-y-5 ".concat(U?"pointer-events-none":""),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"studio-label",children:"Email Address"}),(0,n.jsx)("input",{type:"email",placeholder:"[email protected]",value:L,onChange:e=>I(e.target.value),disabled:U,className:"mt-2 w-full px-3 py-2.5 rounded-lg bg-white/5 border border-white/10 text-sm text-white placeholder:text-t2 outline-none focus:border-white/20 disabled:opacity-40",autoFocus:!0})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"studio-label",children:"Role"}),(0,n.jsx)("div",{className:"mt-2 space-y-2",children:b.map(e=>(0,n.jsxs)("button",{onClick:()=>A(e.key),disabled:U,className:"w-full flex items-start gap-3 p-3 rounded-lg border transition text-left ".concat(S===e.ke
1y?"border-white/[0.08] bg-surface-raised":"border-white/5 hover:border-white/10 bg-white/[0.02]"," ").concat(U?"opacity-40":""),children:[(0,n.jsx)("div",{className:"mt-0.5 w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ".concat(S===e.key?"border-white bg-white":"border-white/20"),children:S===e.key&&(0,n.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-surface-base"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"studio-body-strong",children:e.label}),(0,n.jsx)("p",{className:"studio-caption mt-0.5",children:e.description})]})]},e.key))})]})]}),R&&(0,n.jsxs)("div",{className:"mx-6 mb-0 bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-3 flex items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-sm text-negative-ink",children:R}),(0,n.jsx)("button",{onClick:()=>(0,p.k)({requiredPlan:_,intent:{tab:"STAFF",eventId:null!=k?k:void 0,action:"invite-staff",meter:"staff",payload:{email:L,role:S}}}),className:"shrink-0 px-3 py-1 rounded-lg bg-white/10 hover:bg-white/20 text-xs font-semibold text-white transition",children:"Upgrade"})]}),(0,n.jsxs)("div",{className:"flex items-center justify-end gap-3 px-6 py-4 border-t border-white/5",children:[(0,n.jsx)(m.$n,{variant:"secondary",onClick:x,disabled:U,children:"Cancel"}),(0,n.jsx)(m.$n,{onClick:H,disabled:U||!L.trim(),className:"min-w-[120px]",icon:U?(0,n.jsx)("div",{className:"w-3.5 h-3.5 border-2 border-black/20 border-t-black rounded-full animate-spin"}):void 0,children:U?"Sending...":"Send Invite"})]})]})]}):null}var j=s(8012);let y={host:"Producer",manager:"Event Manager",guest_list:"Guest List Manager",guestList:"Guest List Manager",door_person:"Check-in Attendant",doorPerson:"Check-in Attendant",promoter:"Co-Host",custom:"Custom"},N={host:"bg-white/10 text-t2",manager:"bg-blue-500/15 text-info-ink/80",guest_list:"bg-emerald-500/15 text-positive-ink/80",guestList:"bg-emerald-500/15 text-positive-ink/80",door_person:"bg-amber-500/15 text-attention-ink/80",doorPerson:"bg-amber-500/15 text-attention-ink/80",promoter:"bg-violet-500/15 text-[rgb(var(--accent-purple)/0.80)]",custom:"bg-white/[0.06] text-t2"},w={pending:"bg-amber-500/15 text-attention-ink/80",accepted:"bg-emerald-500/15 text-positive-ink/80",declined:"bg-red-500/15 text-negative-ink/80"};function k(e){let{label:t,enabled:s}=e;return(0,n.jsx)("span",{className:"inline-block px-2 py-0.5 rounded text-[10px] font-medium ".concat(s?"bg-emerald-500/10 text-positive-ink/60":"bg-white/[0.04] text-t2"),children:t})}function C(){let{eventId:e,eventData:t,loading:s}=(0,o._)(),{user:v,userProfile:f,notify:b}=(0,d.Y)(),[C,I]=(0,i.useState)(!1),[S,A]=(0,i.useState)(void 0),[U,M]=(0,i.useState)(null),[R,D]=(0,i.useState)(null),_=(null==f?void 0:f.plan)||"free",F=u.B2[_].maxStaffPerEvent,E=!isFinite(F);(0,x.x)("invite-staff",e=>{A(e),I(!0)},{eventId:e});let H=e?"events/".concat(e,"/staff_invites"):null,{data:B,loading:T}=(0,c.$)(H,[],(e,t)=>{var s,n,i,a,l;return{id:e,eventId:null!=(s=t.eventId)?s:"",email:t.email,phone:t.phone,role:null!=(n=t.role)?n:"guest_list",permissions:t.permissions,token:null!=(i=t.token)?i:"",status:null!=(a=t.status)?a:"pending",invitedBy:null!=(l=t.invitedBy)?l:"",createdAt:(0,j.E)(t.createdAt),acceptedAt:t.acceptedAt?(0,j.E)(t.acceptedAt):void 0}}),z=(0,i.useMemo)(()=>(null==t?void 0:t.staff)?Object.entries(t.staff).map(e=>{let[t,s]=e;return{uid:t,...s}}):[],[t]),G=(0,i.useMemo)(()=>B.filter(e=>"pending"===e.status),[B]),P=(0,i.useMemo)(()=>{var e;return new Set(null!=(e=null==t?void 0:t.hosts)?e:[])},[null==t?void 0:t.hosts]),$=(0,i.useMemo)(()=>{var e;return new Set(null!=(e=null==t?void 0:t.hiddenHosts)?e:[])},[null==t?void 0:t.hiddenHosts]),V=(0,i.useCallback)(async(t,s)=>{if(e){M(t);try{let n=$.has(t);await (0,a.updateDoc)((0,a.doc)(l.db,"events",e),{hiddenHosts:n?(0,a.arrayRemove)(t):(0,a.arrayUnion)(t)}),b({type:"success",message:n?"".concat(s," is now visible on the event page"):"".concat(s," is now hidden from the event page")})}catch(e){b({type:"error",message:"Failed to update visibility"})}finally{M(null)}}},[e,$,b]),W=e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),q=(0,i.useCallback)(async s=>{if(e&&v&&!R){D(s.id);try{let n=(0,a.doc)(l.db,"events",e,"staff_invites",s.id);await (0,a.deleteDoc)(n);let i=[null==f?void 0:f.firstName,null==f?void 0:f.lastName].filter(
1Boolean).join(" ")||"A host",o=(0,a.collection)(l.db,"events",e,"staff_invites");await (0,a.addDoc)(o,{eventId:e,email:s.email||null,phone:s.phone||null,role:s.role,token:(0,r.q)(),status:"pending",invitedBy:v.uid,createdAt:(0,a.serverTimestamp)(),inviterName:i,eventName:(null==t?void 0:t.eventName)||null,eventDate:(null==t?void 0:t.eventDate)?a.Timestamp.fromDate(t.eventDate):null,eventImageURL:(null==t?void 0:t.imageURL)||null,eventVenue:(null==t?void 0:t.locationAddress)||null,metadata:{}}),b({type:"success",message:"Invite resent to ".concat(s.email||s.phone)})}catch(e){b({type:"error",message:"Failed to resend invite"})}finally{D(null)}}},[e,v,f,t,R,b]);return e?s?(0,n.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,n.jsx)("div",{className:"studio-spinner",style:{width:32,height:32}})}):(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-b from-white to-white/50 bg-clip-text text-transparent",children:"Team"}),(0,n.jsxs)("p",{className:"text-white/40 mt-1",children:[z.length,E?"":" / ".concat(F)," member",1!==z.length?"s":"",G.length>0&&(0,n.jsxs)("span",{className:"text-attention-ink/80",children:[" ","\xb7 ",G.length," pending invite",1!==G.length?"s":""]})]})]}),!E&&z.length+G.length>=F?(0,n.jsx)(m.$n,{variant:"upgrade",onClick:()=>(0,p.k)({intent:{tab:"STAFF",eventId:null!=e?e:void 0,action:"invite-staff",meter:"staff"}}),children:"Upgrade to add more members"}):(0,n.jsx)(m.$n,{onClick:()=>I(!0),icon:(0,n.jsx)(h.c1,{className:"w-4 h-4"}),children:"Invite Member"})]}),(0,n.jsxs)("div",{className:"bg-card border border-card rounded-xl overflow-hidden",children:[(0,n.jsx)("div",{className:"px-5 py-4 border-b border-white/[0.06]",children:(0,n.jsx)("h2",{className:"studio-body-strong",children:"Current Members"})}),0===z.length?(0,n.jsx)("div",{className:"px-5 py-12 text-center",children:(0,n.jsx)("p",{className:"studio-body",children:"No team members yet. Invite someone to get started."})}):(0,n.jsx)("div",{className:"divide-y divide-white/[0.06]",children:z.map(e=>{var t,s,i,a,l,r,o,d,c,u,m,h,p,x;return(0,n.jsxs)("div",{className:"px-5 py-4 hover:bg-white/[0.04] transition",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-9 h-9 rounded-full bg-white/10 flex items-center justify-center text-sm font-semibold text-t2",children:(e.name||"?").charAt(0).toUpperCase()}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"studio-body-strong",children:e.name||"Unknown"}),(0,n.jsxs)("p",{className:"studio-caption",children:["Added ",e.addedAt?W(e.addedAt):"—"]})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[P.has(e.uid)&&(0,n.jsx)("button",{onClick:()=>V(e.uid,e.name),disabled:U===e.uid,className:"p-1 rounded-lg transition disabled:opacity-40 ".concat($.has(e.uid)?"text-t2 hover:text-t1 hover:bg-white/[0.06]":"text-white/50 hover:text-white hover:bg-white/[0.06]"),title:$.has(e.uid)?"Show on event page":"Hide from event page",children:$.has(e.uid)?(0,n.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}):(0,n.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,n.jsx)("span",{className:"px-2.5 py-0.5 rounded-full text-[11px] font-medium ".concat(null!=(t=N[e.role])?t:"bg-white/[0.06] text-t2"),children:null!=(i=null!=(s=y[e.role])?s:e.role)?i:"Staff"})]})]}),e.permissions&&(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-1.5 pl-12",children:[(0,n.jsx)(k,{label:"Scanner",enabled:null!=(l=null!=(a=e.permissions.scanner)?a:e.permissions.canCheckInGuests)&&l}),(0,n.jsx)(k,{label:"Guests",enabled:null!=(o=null!=(r=e.permissions.guestListEdit)?r:e.permissions.canManageGuestList)&&o}),(0,n.jsx)(k,{label:"Check-in",enabled:null!=(c=null!=(d=e.permissions.guestListCheckIn)?d:e.permissions.canCheckInGuests)&&c}),(0,n.jsx)(k,{label:"Staff",enabled:null!=(m=null!=(u=e.permissions.staffManagement)?u:e.permissions.canManageStaff)&&m}),(0,n.jsx)(k,{label:"Analytics",enabled:null!=(p=null!=(h=e.permissions.analytics)?h:e.permissions.canViewAnalytics)&&p}),(0,n.jsx)(k,{label:"Refunds",enabled:null!=(x=e.permissions.refunds)&&x})]})]},e.uid)})})]}),(0,n.jsxs)("div",{className:"bg-card border border-card rounded-xl overflow-hidden",children:[(0,n.jsxs)("div",{className:"px-5 py-4 border-b border-white/[0.06] flex items-center gap-2",children:[(0,n.jsx)(h.O4,{className:"w-4 h-4 text-t2"}),(0,n.jsx)("h2",{className:"studio-body-strong",children:"Pending Invites"})]}),T?(0,n.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,n.jsx)("div",{className:"studio-spinner-sm",style:{width:20,height:20}})}):0===B.length?(0,n.jsx)("div",{className:"px-5 py-8 text-center",children:(0,n.jsx)("p",{className:"studio-body",children:"No invites sent"})}):(0,n.jsx)("div",{className:"divide-y divide-white/[0.06]",children:B.map(e=>{var t;return(0,n.jsxs)("div",{className:"px-5 py-3 flex items-center justify-between hover:bg-white/[0.04] transition",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"studio-body-strong",children:e.email||e.phone||"Unknown"}),(0,n.jsxs)("p",{className:"studio-caption mt-0.5",children:[y[e.role]," \xb7 Sent ",W(e.createdAt)]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:["pending"===e.status&&(0,n.jsx)("button",{onClick:()=>q(e),disabled:R===e.id,className:"px-2.5 py-0.5 rounded-lg text-[11px] font-medium text-t2 hover:text-t1/70 hover:bg-white/[0.06] transition disabled:opacity-30",children:R===e.id?"Sending...":"Resend"}),(0,n.jsx)("span",{className:"px-2.5 py-0.5 rounded-full text-[11px] font-medium ".concat(null!=(t=w[e.status])?t:"bg-white/[0.06] text-t2"),children:e.status.charAt(0).toUpperCase()+e.status.slice(1)})]})]},e.id)})})]}),(0,n.jsx)(L,{eventId:e,eventData:t}),(0,n.jsx)(g,{open:C,onClose:()=>{I(!1),A(void 0)},initialValues:S})]}):(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center h-80 text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-white/[0.04] flex items-center justify-center mb-4",children:(0,n.jsx)(h.K6,{className:"w-8 h-8 text-t2"})}),(0,n.jsx)("h2",{className:"studio-subtitle",children:"No Event Selected"}),(0,n.jsx)("p",{className:"studio-body mt-1 max-w-sm",children:"Select an event from the dropdown above to manage your team."})]})}function L(e){let{eventId:t,eventData:s}=e,{notify:r}=(0,d.Y)(),[o,u]=(0,i.useState)(!1),[m,p]=(0,i.useState)(""),[x,v]=(0,i.useState)(!1),f=(0,i.useMemo)(()=>{var e;return new Set(null!=(e=null==s?void 0:s.displayHosts)?e:[])},[null==s?void 0:s.displayHosts]),b=(0,i.useMemo)(()=>{var e;return new Set(null!=(e=null==s?void 0:s.hosts)?e:[])},[null==s?void 0:s.hosts]),g=o||f.size>0,j=t&&g?"events/".concat(t,"/tickets"):null,{data:y,loading:N}=(0,c.$)(j,[],(e,t)=>{var s,n,i,a,l,r,o,d,c,u;return{id:e,holderAccountId:null!=(n=null!=(s=t.holderAccountId)?s:t.userID)?n:void 0,firstName:null!=(a=null!=(i=t.firstName)?i:t.guestFirstName)?a:"",lastName:null!=(r=null!=(l=t.lastName)?l:t.guestLastName)?r:"",guestFirstName:t.guestFirstName,guestLastName:t.guestLastName,profileImageURL:null!=(d=null!=(o=t.profileImageURL)?o:t.photoURL)?d:void 0,userName:null!=(u=null!=(c=t.userName)?c:t.username)?u:void 0}}),w=(0,i.useMemo)(()=>{let e=new Set,t=[];if(null==s?void 0:s.staff)for(let[n,i]of Object.entries(s.staff))b.has(n)||f.has(n)||e.has(n)||(e.add(n),t.push({uid:n,name:i.name||"Unknown",source:"staff"}));for(let s of y){let n=s.holderAccountId;if(!n||b.has(n)||f.has(n)||e.has(n))continue;e.add(n);
1let i=[s.firstName,s.lastName].filter(Boolean).join(" ")||s.userName||"Unknown";t.push({uid:n,name:i,profileImageURL:s.profileImageURL,source:"guest"})}return t},[null==s?void 0:s.staff,y,b,f]),k=(0,i.useMemo)(()=>{if(!m.trim())return w;let e=m.toLowerCase();return w.filter(t=>t.name.toLowerCase().includes(e))},[w,m]),C=(0,i.useMemo)(()=>{if(0===f.size)return[];let e=[];for(let n of f){var t;let i=null==s||null==(t=s.staff)?void 0:t[n];if(i){e.push({uid:n,name:i.name||"Unknown",source:"staff"});continue}let a=y.find(e=>e.holderAccountId===n);if(a){let t=[a.firstName,a.lastName].filter(Boolean).join(" ")||a.userName||"Unknown";e.push({uid:n,name:t,profileImageURL:a.profileImageURL,source:"guest"});continue}e.push({uid:n,name:n.slice(0,8)+"…",source:"guest"})}return e},[f,null==s?void 0:s.staff,y]),L=(0,i.useCallback)(async e=>{if(t){v(!0);try{await (0,a.updateDoc)((0,a.doc)(l.db,"events",t),{displayHosts:(0,a.arrayUnion)(e.uid)}),r({type:"success",message:"".concat(e.name," added as a display host")})}catch(e){r({type:"error",message:"Failed to add display host"})}finally{v(!1)}}},[t,r]),I=(0,i.useCallback)(async e=>{if(t)try{await (0,a.updateDoc)((0,a.doc)(l.db,"events",t),{displayHosts:(0,a.arrayRemove)(e.uid)}),r({type:"success",message:"".concat(e.name," removed from display hosts")})}catch(e){r({type:"error",message:"Failed to remove display host"})}},[t,r]);return(0,n.jsxs)("div",{className:"bg-card border border-card rounded-xl overflow-hidden",children:[(0,n.jsxs)("div",{className:"px-5 py-4 border-b border-white/[0.06] flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.Gg,{className:"w-4 h-4 text-t2"}),(0,n.jsx)("h2",{className:"studio-body-strong",children:"Display Hosts"})]}),!o&&(0,n.jsxs)("button",{onClick:()=>u(!0),className:"flex items-center gap-1.5 text-xs font-medium text-t2 hover:text-t1/70 transition",children:[(0,n.jsx)(h.c1,{className:"w-3.5 h-3.5"}),"Add"]})]}),o&&(0,n.jsxs)("div",{className:"px-5 py-4 border-b border-white/[0.06] space-y-3",children:[(0,n.jsx)("p",{className:"studio-caption",children:"Display hosts appear on the event page but receive no permissions. Pick someone from your guest list or staff."}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(h.WI,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-t2"}),(0,n.jsx)("input",{type:"text",placeholder:"Search guests and staff…",value:m,onChange:e=>p(e.target.value),className:"w-full pl-9 pr-3 py-2 rounded-lg bg-white/5 border border-white/10 text-sm text-white placeholder:text-t2 outline-none focus:border-white/20",autoFocus:!0})]}),(0,n.jsx)("div",{className:"max-h-48 overflow-y-auto -mx-1 px-1",children:N?(0,n.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,n.jsx)("div",{className:"studio-spinner-sm"})}):0===k.length?(0,n.jsx)("p",{className:"studio-caption text-center py-4",children:m.trim()?"No matching people found":"No eligible guests or staff to add"}):(0,n.jsx)("div",{className:"space-y-0.5",children:k.map(e=>(0,n.jsxs)("button",{onClick:()=>L(e),disabled:x,className:"w-full flex items-center gap-3 px-2 py-2 rounded-lg hover:bg-white/[0.06] transition text-left disabled:opacity-40",children:[e.profileImageURL?(0,n.jsx)("img",{src:e.profileImageURL,alt:"",className:"w-8 h-8 rounded-full object-cover"}):(0,n.jsx)("div",{className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center text-xs font-semibold text-t2",children:e.name.charAt(0).toUpperCase()}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("p",{className:"studio-body-strong truncate",children:e.name}),(0,n.jsx)("p",{className:"studio-micro capitalize",children:e.source})]})]},e.uid))})}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("button",{onClick:()=>{u(!1),p("")},className:"px-3 py-1.5 rounded-lg bg-white/5 hover:bg-white/10 text-t2 text-xs font-medium transition",children:"Done"})})]}),0!==f.size||o?C.length>0?(0,n.jsx)("div",{className:"divide-y divide-white/[0.06]",children:C.map(e=>(0,n.jsxs)("div",{className:"px-5 py-3 flex items-center justify-between hover:bg-white/[0.04] transition group",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[e.profileImageURL?(0,n.jsx)("img",{src:e.profileImageURL,alt:"",className:"w-8 h-8 rounded-full object-cover"}):(0,n.jsx)("div",{className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center text-xs font-semibold text-t2",children:e.name.charAt(0).toUpperCase()}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"studio-body-strong",children:e.name}),(0,n.jsx)("p",{className:"studio-caption",children:"Display only"})]})]}),(0,n.jsx)("button",{onClick:()=>I(e),className:"p-1.5 rounded-lg text-t3 hover:text-negative-ink hover:bg-red-500/10 transition opacity-0 group-hover:opacity-100",title:"Remove display host",children:(0,n.jsx)(h.fK,{className:"w-4 h-4"})})]},e.uid))}):null:(0,n.jsx)("div",{className:"px-5 py-8 text-center",children:(0,n.jsx)("p",{className:"studio-body",children:"No display hosts. Add people who should appear as hosts on the event page without receiving any permissions."})})]})}}}]);

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.