1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BTPUR8Lu.js","assets/index-Cw_vWzcG.js","assets/index-B7IqKIwa.css","assets/index-C9quj048.js","assets/index-61460C-M.css"])))=>i.map(i=>d[i]); 2import{dg as Je,dh as ue,di as We,dj as Xe,dk as Re,a4 as R,dl as Ye,dm as Ie,r as b,dn as et,dp as tt,dq as st,dr as at,ds as Oe,dt as it,du as nt,c as xe,j as e,G as J,dv as rt,dw as dt,dx as lt,dy as ct,O as _,da as Me,B as N,P as F,aR as H,Q as B,R as Y,bo as me,dz as ot,dA as ut,at as Ue,dB as mt,dC as ht,dD as xt,dE as pt,dc as Z,dF as yt,dG as gt,dH as vt,dI as ft,dJ as G,dK as X,dL as I,dM as O,dN as Le,dO as jt,dP as bt,dQ as Nt,dR as wt,dS as kt,dT as St,dU as Ct,dV as qt,dW as Qt,bd as At,dX as Et,dY as Tt,dZ as Pt,d_ as Kt,d$ as Ot,e0 as Lt,e1 as Gt,e2 as Dt,e3 as Rt,e4 as Mt,e5 as Ut,e6 as zt,e7 as Vt,e8 as $t,e9 as _t,ea as Ft,eb as Ht,ec as Bt,ed as Zt,ee as Jt,ef as Wt,eg as Xt,eh as Yt,ei as It,ej as es,ek as ts,el as re,em as de,en as ss,eo as Ge,ep as z,eq as P,er as T,es as V,et as le,eu as ce,L as as,bq as is}from"./index-Cw_vWzcG.js";import{S as ns}from"./skeleton-CNI0NEzJ.js";import{I as Q}from"./input-C6iN-KGn.js";import{L as k}from"./label-qVDuR2Rg.js";import{S as rs}from"./switch-DYGgxqMj.js";import{B as E}from"./badge-B8aAVdnW.js";import{T as he}from"./textarea-C1ir9wus.js";import{S as ds,a as ls,b as cs,c as os,d as $}from"./select-C3hP61dO.js";import{T as ee,a as te,b as A,c as S,d as se,e as j,A as us,m as ms,f as hs,g as xs,h as ps,i as ys,j as gs,k as vs,l as fs}from"./table-BvueJhDD.js";import{U as js,S as ze}from"./user-plus-CuGllrY1.js";import{t as bs,f as D}from"./format-BEeSy016.js";import{I as Ns}from"./info-Dl2JEE-m.js";import{R as ws}from"./rotate-ccw-DQIADpyK.js";import{C as ks}from"./clock-B5471JeQ.js";import{U as Ss}from"./upload-BU8OO0kQ.js";import{E as Cs}from"./external-link-DafRhKqP.js";import"./index-CeSLzpw6.js";import"./chevron-down-BxGR1GEJ.js";import"./check-aenHoWvI.js";function De(s,t){const r=new Set(t);return s.filter(i=>!r.has(i))}function qs(s,t,r){const i=s.slice(0);return i[t]=r,i}var Qs=class extends Je{#i;#e;#n;#a;#t;#s;#r;#d;#l;#c=[];constructor(s,t,r){super(),this.#i=s,this.#a=r,this.#n=[],this.#t=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(s=>{s.subscribe(t=>{this.#h(s,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(s=>{s.destroy()})}setQueries(s,t){this.#n=s,this.#a=t,ue.batch(()=>{const r=this.#t,i=this.#m(this.#n);i.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const c=i.map(h=>h.observer),u=c.map(h=>h.getCurrentResult()),o=r.length!==c.length,x=c.some((h,v)=>h!==r[v]),m=o||x,p=m?!0:u.some((h,v)=>{const l=this.#e[v];return!l||!We(h,l)});!m&&!p||(m&&(this.#c=i,this.#t=c),this.#e=u,this.hasListeners()&&(m&&(De(r,c).forEach(h=>{h.destroy()}),De(c,r).forEach(h=>{h.subscribe(v=>{this.#h(h,v)})})),this.#x()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(s=>s.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(s,t){const r=this.#m(s),i=r.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=r.map(u=>u.defaultedQueryOptions.queryHash);return[i,u=>this.#u(u??i,t,c),()=>this.#o(i,r)]}#o(s,t){return t.map((r,i)=>{const c=s[i];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,u=>{t.forEach(o=>{o.observer.trackProp(u)})})})}#u(s,t,r){if(t){const i=this.#l,c=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((u,o)=>u!==i[o]));return(!this.#s||this.#e!==this.#d||c||t!==this.#r)&&(this.#r=t,this.#d=this.#e,r!==void 0&&(this.#l=r),this.#s=Xe(this.#s,t(s))),this.#s}return s}#p(){return this.#a?.combine!==void 0&&this.#t.some((s,t)=>s.options.suspense&&this.#e[t]?.data===void 0)}#m(s){const t=new Map;this.#t.forEach(i=>{const c=i.options.queryHash;if(!c)return;const u=t.get(c);u?u.push(i):t.set(c,[i])});const r=[];return s.forEach(i=>{const c=this.#i.defaultQueryOptions(i),o=t.get(c.queryHash)?.shift()??new Re(this.#i,c);r.push({defaultedQueryOptions:c,observer:o})}),r}#h(s,t){const r=this.#t.indexOf(s);r!==-1&&(this.#e=qs(this.#e,r,t),this.#x())}#x(){if(this.hasListeners()){const s=this.#o(this.#e,this.#c),t=this.#p(),r=this.#s,i=t?r:this.#u(s,this.#a?.combine);(t||r!==i)&&ue.batch(()=>
2{this.listeners.forEach(c=>{c(this.#e)})})}}};function As({queries:s,...t},r){const i=R(),c=Ye(),u=Ie(),o=b.useMemo(()=>s.map(y=>{const w=i.defaultQueryOptions(y);return w._optimisticResults=c?"isRestoring":"optimistic",w}),[s,i,c]);o.forEach(y=>{et(y);const w=i.getQueryCache().get(y.queryHash);tt(y,u,w)}),st(u);const[x]=b.useState(()=>new Qs(i,o,t)),[m,p,h]=x.getOptimisticResult(o,t.combine),v=!c&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(y=>v?x.subscribe(ue.batchCalls(y)):at,[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),b.useEffect(()=>{x.setQueries(o,t)},[o,t,x]);const f=m.some((y,w)=>Oe(o[w],y))?m.flatMap((y,w)=>{const C=o[w];if(C&&Oe(C,y)){const K=new Re(i,C);return it(C,K,u)}return[]}):[];if(f.length>0)throw Promise.all(f);const d=m.find((y,w)=>{const C=o[w];return C&&nt({result:y,errorResetBoundary:u,throwOnError:C.throwOnError,query:i.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(d?.error)throw d.error;return p(h())}const Es=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ve=xe("ban",Es);const Ts=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Ps=xe("qr-code",Ts);const Ks=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],$e=xe("shield",Ks);function oe(s){return+bs(s)<Date.now()}function Os({showId:s}){const t=R(),{toast:r}=J(),{data:i=[],isLoading:c}=rt(s,{query:{enabled:!!s,queryKey:G(s)}}),u=dt(),o=lt(),x=ct(),[m,p]=b.useState(!1),[h,v]=b.useState(null),[l,f]=b.useState({name:"",email:"",phone:"",partyName:"",quantity:1,notes:""}),d=()=>{f({name:"",email:"",phone:"",partyName:"",quantity:1,notes:""})},y=()=>{if(!l.name.trim())return;const n={name:l.name.trim(),email:l.email.trim()||null,phone:l.phone.trim()||null,partyName:l.partyName.trim()||null,quantity:Math.max(1,l.quantity),notes:l.notes.trim()||null};h?o.mutate({showId:s,guestId:h.id,data:n},{onSuccess:()=>{t.invalidateQueries({queryKey:G(s)}),v(null),r({title:"Guest updated"})},onError:()=>r({title:"Failed to update guest",variant:"destructive"})}):u.mutate({showId:s,data:n},{onSuccess:()=>{t.invalidateQueries({queryKey:G(s)}),p(!1),d(),r({title:"Guest added"})},onError:()=>r({title:"Failed to add guest",variant:"destructive"})})},w=n=>{x.mutate({showId:s,guestId:n.id},{onSuccess:()=>{t.invalidateQueries({queryKey:G(s)}),r({title:"Guest cancelled"})},onError:()=>r({title:"Failed to cancel guest",variant:"destructive"})})},C=n=>{o.mutate({showId:s,guestId:n.id,data:{active:!0}},{onSuccess:()=>{t.invalidateQueries({queryKey:G(s)}),r({title:"Guest reactivated"})},onError:()=>r({title:"Failed to reactivate",variant:"destructive"})})},K=i.filter(n=>n.active),M=i.filter(n=>!n.active),W=K.reduce((n,L)=>n+L.quantity,0),U=K.filter(n=>n.arrivedAt).reduce((n,L)=>n+L.quantity,0);return e.jsxs("div",{className:"min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground shadow",children:[e.jsxs("div",{className:"flex flex-col gap-4 border-b p-4 sm:flex-row sm:items-center sm:justify-between sm:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("h3",{className:"font-semibold leading-none tracking-tight",children:"Roster"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[W," total invited ",U>0&&e.jsxs("span",{className:"text-primary font-medium",children:["· ",U," arrived"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:flex sm:items-center",children:[e.jsx(Ds,{showId:s}),e.jsxs(_,{open:m,onOpenChange:n=>{n||d(),p(n)},children:[e.jsx(Me,{asChild:!0,children:e.jsxs(N,{size:"sm","data-testid":"button-add-guest",children:[e.jsx(js,{className:"mr-2 h-4 w-4"})," Add Guest"]})}),e.jsxs(F,{className:"max-h-[90dvh] w-[calc(100%-1.5rem)] overflow-y-auto sm:w-full",children:[e.jsxs(H,{
2children:[e.jsx(B,{children:"Add Guest"}),e.jsx(Y,{children:"Add a new invited guest to the list."})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Name *"}),e.jsx(Q,{value:l.name,onChange:n=>f({...l,name:n.target.value}),"data-testid":"input-guest-name"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Email"}),e.jsx(Q,{type:"email",value:l.email,onChange:n=>f({...l,email:n.target.value}),"data-testid":"input-guest-email"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Phone"}),e.jsx(Q,{type:"tel",value:l.phone,onChange:n=>f({...l,phone:n.target.value}),"data-testid":"input-guest-phone"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:'Party Name (e.g. "Contest Winner")'}),e.jsx(Q,{value:l.partyName,onChange:n=>f({...l,partyName:n.target.value}),"data-testid":"input-guest-party"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Quantity"}),e.jsx(Q,{type:"number",min:1,value:l.quantity,onChange:n=>f({...l,quantity:parseInt(n.target.value)||1}),"data-testid":"input-guest-quantity"})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Door Notes"}),e.jsx(he,{value:l.notes,onChange:n=>f({...l,notes:n.target.value}),"data-testid":"input-guest-notes"})]})]}),e.jsxs(me,{children:[e.jsx(N,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e.jsx(N,{onClick:y,disabled:!l.name,"data-testid":"button-save-guest",children:"Save Guest"})]})]})]})]})]}),e.jsx("div",{className:"p-0",children:e.jsxs(ee,{children:[e.jsx(te,{children:e.jsxs(A,{children:[e.jsx(S,{children:"Name / Contact"}),e.jsx(S,{children:"Qty"}),e.jsx(S,{children:"Status"}),e.jsx(S,{className:"text-right",children:"Actions"})]})}),e.jsxs(se,{children:[i.length===0&&!c&&e.jsx(A,{children:e.jsx(j,{colSpan:4,className:"text-center text-muted-foreground h-24",children:"No guests added yet."})}),K.map(n=>e.jsxs(A,{"data-testid":`row-guest-${n.id}`,children:[e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"font-medium",children:[n.name," ",n.partyName&&e.jsxs("span",{className:"text-muted-foreground font-normal ml-1",children:["(",n.partyName,")"]})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:[n.email,n.phone].filter(Boolean).join(" ⢠")}),n.notes&&e.jsx("span",{className:"text-xs text-muted-foreground italic mt-1",children:n.notes})]})}),e.jsx(j,{children:n.quantity}),e.jsx(j,{children:n.arrivedAt?e.jsxs(E,{variant:"default",className:"bg-green-600 hover:bg-green-700",children:["Arrived ",D(new Date(n.arrivedAt),"h:mm a")]}):e.jsx(E,{variant:"secondary",children:"Pending"})}),e.jsx(j,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(N,{variant:"ghost",size:"icon",onClick:()=>{f({name:n.name,email:n.email||"",phone:n.phone||"",partyName:n.partyName||"",quantity:n.quantity,notes:n.notes||""}),v(n)},"data-testid":`button-edit-guest-${n.id}`,children:e.jsx(Ns,{className:"h-4 w-4"})}),e.jsxs(us,{children:[e.jsx(ms,{asChild:!0,children:e.jsx(N,{variant:"ghost",size:"icon",className:"text-destructive","data-testid":`button-cancel-guest-${n.id}`,children:e.jsx(Ve,{className:"h-4 w-4"})})}),e.jsxs(hs,{children:[e.jsxs(xs,{children:[e.jsx(ps,{children:"Cancel Guest?"}),e.jsx(ys,{children:"This will mark the guest as cancelled. They will remain in the system but won't be admitted."})]}),e.jsxs(gs,{children:[e.jsx(vs,{children:"Keep"}),e.jsx(fs,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>w(n),children:"Cancel Guest"})]})]})]})]})})]},n.id)),M.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"bg-muted/50",children:e.jsx(j,{colSpan:4,className:"font-medium text-xs uppercase tracking-wider text-muted-foreground",children:"Cancelled"})}),M.map(n=>e.jsxs(A,{className:"opacity-60 bg-muted/20","data-testid":`row-guest-cancelled-${n.id}`,children:[e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col line-through",children:[e.jsx("span",{className:"font-medium",children:n.name}),e.jsx("span",{className:"text-xs text-muted-foreground",children:n.email})]})}),e.jsx(j,{children:n.quantity}),e.jsx(j,{children:e.jsx(E,{variant:"outline",children:"Cancelled"})}),e.jsx(j,{className:"text-right",children:e.jsxs(N,{variant:"ghost",size:"sm",onClick:()=>C(n),"data-testid":`button-reactivate-guest-${n.id}`,children:[e.jsx(ws,{className:"mr-2 h-3.5 w-3.5"})," Restore"]})})]},n.id))]})]})]})}),e.jsx(_,{open:!!h,onOpenChange:n=>!n&&v(null),children:e.jsxs(F,{children:[e.jsx(H,{children:e.jsx(B,{children:"Edit Guest"})}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Name *"}),e.jsx(Q,{value:l.name,onChange:n=>
2f({...l,name:n.target.value}),"data-testid":"input-edit-guest-name"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Email"}),e.jsx(Q,{type:"email",value:l.email,onChange:n=>f({...l,email:n.target.value})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Phone"}),e.jsx(Q,{type:"tel",value:l.phone,onChange:n=>f({...l,phone:n.target.value})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Party Name"}),e.jsx(Q,{value:l.partyName,onChange:n=>f({...l,partyName:n.target.value})})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Quantity"}),e.jsx(Q,{type:"number",min:1,value:l.quantity,onChange:n=>f({...l,quantity:parseInt(n.target.value)||1})})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Door Notes"}),e.jsx(he,{value:l.notes,onChange:n=>f({...l,notes:n.target.value})})]})]}),e.jsxs(me,{children:[e.jsx(N,{variant:"outline",onClick:()=>v(null),children:"Cancel"}),e.jsx(N,{onClick:y,disabled:!l.name,"data-testid":"button-save-edit-guest",children:"Save Changes"})]})]})})]})}function Ls({showId:s}){return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"space-y-6 lg:col-span-2",children:[e.jsx(Os,{showId:s}),e.jsx(Ms,{showId:s})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(Rs,{showId:s}),e.jsx(Us,{showId:s})]})]})}const Gs=`name,email,phone,partyName,quantity,notes,status 3Alex Rivera,[email protected],555-0100,Venue list,2,Near the stage,active 4Jordan Lee,[email protected],,,,cancelled`;function Ds({showId:s}){const t=R(),{toast:r}=J(),i=ft(),[c,u]=b.useState(!1),[o,x]=b.useState(""),[m,p]=b.useState(null),h=()=>{x(""),p(null)},v=d=>{if(!o.trim()){r({title:"Upload or paste a CSV first",variant:"destructive"});return}i.mutate({showId:s,data:{csv:o,commit:d}},{onSuccess:y=>{if(p(y),!!d){if(!y.committed){r({title:"Fix the validation errors before importing",variant:"destructive"});return}t.invalidateQueries({queryKey:G(s)}),t.invalidateQueries({queryKey:O(s)}),r({title:y.written===0?"Guest list is already up to date":`Imported ${y.written} guest-list change${y.written===1?"":"s"}`}),u(!1),h()}},onError:y=>{const w=y?.data?.error??"Guest import failed";r({title:w,variant:"destructive"})}})},l=m?m.summary.additions+m.summary.updates+m.summary.cancellations:0,f=d=>d==="add"?"bg-green-600 hover:bg-green-700":d==="cancel"||d==="error"?"bg-destructive text-destructive-foreground":d==="update"?"bg-amber-500 text-black hover:bg-amber-500":"";return e.jsxs(_,{open:c,onOpenChange:d=>{u(d),d||h()},children:[e.jsx(Me,{asChild:!0,children:e.jsxs(N,{variant:"outline",size:"sm","data-testid":"button-import-guests",children:[e.jsx(Ss,{className:"mr-2 h-4 w-4"})," Import CSV"]})}
4),e.jsxs(F,{className:"max-w-3xl",children:[e.jsxs(H,{children:[e.jsx(B,{children:"Import guest list"}),e.jsx(Y,{children:"Preview every change for this show before anything is written."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-xs text-muted-foreground",children:[e.jsx("p",{className:"font-medium text-foreground",children:"CSV columns"}),e.jsx("p",{children:e.jsx("code",{children:"name,email,phone,partyName,quantity,notes,status"})}),e.jsxs("p",{className:"mt-1",children:["Name is required. Quantity defaults to 1. Status is ",e.jsx("code",{children:"active"})," or ",e.jsx("code",{children:"cancelled"}),". Guests omitted from the file are left unchanged."]}),e.jsx("p",{className:"mt-1",children:"Rows match this show only, using email first, then phone + name, party + name, or name."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"guest-import-file",children:"Upload CSV"}),e.jsx(Q,{id:"guest-import-file",type:"file",accept:".csv,text/csv","data-testid":"input-guest-import-file",onChange:d=>{const y=d.target.files?.[0];y&&y.text().then(w=>{x(w),p(null)}).catch(()=>{r({title:"Could not read that file",variant:"destructive"})})}})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"guest-import-csv",children:"Or paste CSV"}),e.jsx(he,{id:"guest-import-csv",rows:7,value:o,placeholder:Gs,"data-testid":"input-guest-import-csv",onChange:d=>{x(d.target.value),p(null)}})]}),m&&e.jsxs("div",{className:"space-y-3","data-testid":"guest-import-preview",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(E,{className:"bg-green-600 hover:bg-green-700",children:[m.summary.additions," additions"]}),e.jsxs(E,{className:"bg-amber-500 text-black hover:bg-amber-500",children:[m.summary.updates," updates"]}),e.jsxs(E,{variant:"destructive",children:[m.summary.cancellations," cancellations"]}),e.jsxs(E,{variant:"secondary",children:[m.summary.unchanged," unchanged"]}),m.summary.errors>0&&e.jsxs(E,{variant:"destructive",children:[m.summary.errors," errors"]})]}),e.jsx("div",{className:"max-h-64 overflow-y-auto rounded-md border",children:e.jsxs(ee,{children:[e.jsx(te,{children:e.jsxs(A,{children:[e.jsx(S,{className:"w-16",children:"Row"}),e.jsx(S,{children:"Guest"}),e.jsx(S,{className:"w-28",children:"Action"}),e.jsx(S,{children:"Details"})]})}),e.jsx(se,{children:m.rows.map(d=>e.jsxs(A,{"data-testid":`row-guest-import-${d.rowNumber}`,children:[e.jsx(j,{children:d.rowNumber}),e.jsxs(j,{children:[e.jsx("div",{className:"font-medium",children:d.name||"CSV header"}),d.email&&e.jsx("div",{className:"text-xs text-muted-foreground",children:d.email})]}),e.jsx(j,{children:e.jsx(E,{variant:d.action==="unchanged"?"secondary":"default",className:f(d.action),children:d.action})}),e.jsx(j,{className:d.errors.length>0?"text-destructive":"text-muted-foreground",children:d.errors.length>0?d.errors.join(" "):d.changes.join(", ")||"No changes"})]},d.rowNumber))})]})})]})]}),e.jsxs(me,{children:[e.jsx(N,{variant:"outline",onClick:()=>u(!1),"data-testid":"button-cancel-guest-import",children:"Close"}),e.jsxs(N,{variant:"outline",onClick:()=>v(!1),disabled:!o.trim()||i.isPending,"data-testid":"button-preview-guest-import",children:[i.isPending?e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Preview"]}),e.jsxs(N,{onClick:()=>v(!0),disabled:!m||m.summary.errors>0||l===0||i.isPending,"data-testid":"button-apply-guest-import",children:[i.isPending?e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Apply Import"]})]})]})]})}function Rs({showId:s}){const t=R(),{toast:r}=J(),{data:i=[]}=mt(s,{query:{enabled:!!s,queryKey:X(s)}}),c=ht(),u=xt(),o=pt(),[x,m]=b.useState(""),[p,h]=b.useState(()=>{const d=new Date;return d.setDate(d.getDate()+2),d.toISOString().slice(0,16)}),v=()=>{!x||!p||c.mutate({showId:s,data:{recipientEmail:x,expiresAt:new Date(p).toISOString()}},{onSuccess:d=>{t.invalidateQueries({queryKey:X(s)}),t.invalidateQueries({queryKey:I(s)}),t.invalidateQueries({queryKey:O(s)}),m(""),r({title:"Invitation queued for delivery"})},onError:()=>r({title:"Failed to queue invitation",variant:"destructive"})})},l=d=>{u.mutate({showId:s,grantId:d},{onSuccess:()=>{t.invalidateQueries({queryKey:X(s)}),t.invalidateQueries({queryKey:O(s)}),r({title:"Access revoked"})},onError:()=>r({title:"Failed to revoke access",variant:"destructive"})})},f=d=>{o.mutate({showId:s,grantId:d},{onSuccess:()=>{t.invalidateQueries({queryKey:X(s)}),t.invalidateQueries({queryKey:I(s)}),t.invalidateQueries({queryKey:O(s)}),r({title:"Invitation queued for delivery"})},onError:()=>r({title:"Failed to queue invitation",variant:"destructive"})})};return e.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow",children:[e.jsxs("div",{className:"border-b p-6",children:[e.jsxs("h3",{className:"font-semibold leading-none tracking-tight flex items-center gap-2",children:[e.jsx($e,{className:"h-4 w-4 text-primary"})," Door Access"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Grant venue staff or promoters secure capability-link access to manage the door. They will not need an account."})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Recipient Email"}),e.jsx(Q,{type:"email",placeholder:"[email protected]",value:x,onChange:d=>m(d.target.value),"data-testid":"input-grant-email"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Link Expires At"}),e.jsx(Q,{type:"datetime-local",value:p,onChange:d=>h(d.target.value),"data-testid":"input-grant-expires"})]}),e.jsxs(N,{onClick:v,disabled:!x||!p||c.isPending,className:"w-full","data-testid":"button-create-grant",children:[c.isPending?e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(ze,{className:"mr-2 h-4 w-4"}),"Send Magic Link"]})]}),i.length>0&&e.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Active Links"}),e.jsx("div",{className:"space-y-3",children:i.map(d=>e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border bg-muted/30 p-3 text-sm","data-testid":`grant-${d.id}`,children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:d.recipientEmail}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Queued ",d.lastSentAt?D(new Date(d.lastSentAt),"MMM d, h:mm a"):"Unknown"]}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:["Expires ",D(new Date(d.expiresAt),"MMM d, h:mm a")]})]}),d.revokedAt?e.jsx(E,{variant:"destructive",children:"Revoked"}
4):e.jsx(E,{variant:"outline",className:oe(new Date(d.expiresAt))?"text-destructive border-destructive":"text-green-600 border-green-600",children:oe(new Date(d.expiresAt))?"Expired":"Active"})]}),!d.revokedAt&&!oe(new Date(d.expiresAt))&&e.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t mt-1",children:[e.jsxs(N,{variant:"ghost",size:"sm",className:"h-7 text-xs flex-1",onClick:()=>f(d.id),disabled:o.isPending,"data-testid":`button-resend-grant-${d.id}`,children:[e.jsx(Z,{className:"mr-2 h-3 w-3"})," Resend"]}),e.jsxs(N,{variant:"ghost",size:"sm",className:"h-7 text-xs flex-1 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>l(d.id),disabled:u.isPending,"data-testid":`button-revoke-grant-${d.id}`,children:[e.jsx(Ve,{className:"mr-2 h-3 w-3"})," Revoke"]})]})]},d.id))})]})]})]})}function Ms({showId:s}){const{data:t=[]}=ot(s,{query:{enabled:!!s,queryKey:I(s),refetchInterval:1e4}}),{data:r=[]}=ut(s,{query:{enabled:!!s,queryKey:O(s),refetchInterval:1e4}});return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow",children:[e.jsx("div",{className:"border-b p-6",children:e.jsxs("h3",{className:"font-semibold leading-none tracking-tight flex items-center gap-2",children:[e.jsx(Ue,{className:"h-4 w-4 text-primary"})," Delivery History"]})}),e.jsx("div",{className:"p-0 max-h-64 overflow-y-auto",children:e.jsxs(ee,{children:[e.jsx(te,{children:e.jsxs(A,{children:[e.jsx(S,{children:"Type"}),e.jsx(S,{children:"Recipient"}),e.jsx(S,{children:"Status"}),e.jsx(S,{children:"Date"})]})}),e.jsxs(se,{children:[t.length===0&&e.jsx(A,{children:e.jsx(j,{colSpan:4,className:"text-center text-muted-foreground h-16",children:"No recent deliveries."})}),t.map(i=>e.jsxs(A,{"data-testid":`row-delivery-${i.id}`,children:[e.jsx(j,{className:"capitalize text-xs",children:i.kind}),e.jsx(j,{className:"text-xs",children:i.recipientEmail||"Unknown"}),e.jsx(j,{children:e.jsx(E,{variant:i.status==="sent"?"default":i.status==="failed"?"destructive":"secondary",className:"text-[10px]",children:i.status})}),e.jsx(j,{className:"text-xs text-muted-foreground",children:D(new Date(i.createdAt),"MMM d, h:mm a")})]},i.id))]})]})})]}),e.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow",children:[e.jsx("div",{className:"border-b p-6",children:e.jsxs("h3",{className:"font-semibold leading-none tracking-tight flex items-center gap-2",children:[e.jsx($e,{className:"h-4 w-4 text-primary"})," Audit Log"]})}),e.jsx("div",{className:"p-0 max-h-64 overflow-y-auto",children:e.jsxs(ee,{children:[e.jsx(te,{children:e.jsxs(A,{children:[e.jsx(S,{children:"Action"}),e.jsx(S,{children:"Actor"}),e.jsx(S,{children:"Date"})]})}),e.jsxs(se,{children:[r.length===0&&e.jsx(A,{children:e.jsx(j,{colSpan:3,className:"text-center text-muted-foreground h-16",children:"No activity recorded."})}),r.map(i=>e.jsxs(A,{"data-testid":`row-audit-${i.id}`,children:[e.jsx(j,{className:"text-xs",children:i.action}),e.jsx(j,{className:"text-xs",children:i.actor}),e.jsx(j,{className:"text-xs text-muted-foreground",children:D(new Date(i.createdAt),"MMM d, h:mm a")})]},i.id))]})]})})]})]})}function Us({showId:s}){const t=R(),{toast:r}=J(),{data:i}=yt(s,{query:{enabled:!!s,queryKey:Le(s)}}),c=gt(),u=vt(),[o,x]=b.useState({recipientEmail:"",cadence:"weekly",enabled:!1});b.useEffect(()=>{i&&x({recipientEmail:i.recipientEmail||"",cadence:i.cadence,enabled:i.enabled})},[i,s]);const m=i?o.recipientEmail!==(i.recipientEmail||"")||o.cadence!==i.cadence||o.enabled!==i.enabled:!1,p=()=>{if(!i)return;let v=o.enabled;const l=o.recipientEmail.trim()||null;if(v&&!l){r({title:"Recipient email required to enable updates",variant:"destructive"}),x(d=>({...d,enabled:!1})),v=!1;return}const f={recipientEmail:l,cadence:o.cadence,enabled:v};c.mutate({showId:s,data:f},{onSuccess:()=>{t.setQueryData(Le(s),d=>({...d,...f})),t.invalidateQueries({queryKey:O(s)}),r({title:"Settings saved"})},onError:()=>r({title:"Failed to save settings",variant:"destructive"})})},h=()=>{u.mutate({showId:s},{onSuccess:()=>{t.invalidateQueries({queryKey:I(s)}),t.invalidateQueries({queryKey:O(s)}),r({title:"Update queued immediately"})},onError:()=>r({title:"Failed to queue update",variant:"destructive"})})};return i?e.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow",children:[e.jsxs("div",{className:"border-b p-6",children:[e.jsxs("h3",{className:"font-semibold leading-none tracking-tight flex items-center gap-2",children:[e.jsx(Ue,{className:"h-4 w-4 text-primary"})," Roster Email Updates"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Automatically send roster changes to venue management or tour manager."})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(k,{htmlFor:"update-enabled",className:"flex flex-col gap-1",children:[e.jsx("span",{children:"Enable Emails"}),e.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Active status"})]}),e.jsx(rs,{id:"update-enabled",checked:o.enabled,onCheckedChange:v=>x(l=>({...l,enabled:v})),"data-testid":"switch-update-enabled"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Recipient Email"}),e.jsx(Q,{type:"email",placeholder:"[email protected]",value:o.recipientEmail,onChange:v=>x(l=>({...l,recipientEmail:v.target.value})),"data-testid":"input-update-email"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Delivery Cadence"}),e.jsxs(ds,{value:o.cadence,onValueChange:v=>x(l=>({...l,cadence:v})),children:[e.jsx(ls,{"data-testid":"select-update-cadence",children:e.jsx(cs,{})}),e.jsxs(os,{children:[e.jsx($,{value:"on_change",children:"Immediately on change"}),e.jsx($,{value:"hourly",children:"Hourly digest"}),e.jsx($,{value:"daily",children:"Daily digest"}),e.jsx($,{value:"weekly",children:"Weekly digest"}),e.jsx($,{value:"before_show",children:"Once before show"})]})]})]})]}),m&&e.jsx(N,{className:"w-full",onClick:p,disabled:c.isPending,"data-testid":"button-save-settings",children:"Save Settings"}),i.nextSendAt&&i.enabled&&e.jsxs("div",{className:"text-sm text-muted-foreground bg-muted/50 p-3 rounded-md flex items-center gap-2",children:[e.jsx(ks,{className:"h-4 w-4 shrink-0"}),"Next email scheduled for ",D(new Date(i.nextSendAt),"MMM d, h:mm a")]}),e.jsxs(N,{variant:"outline",className:"w-full",onClick:h,disabled:u.isPending||!i.recipientEmail,"data-testid":"button-send-update-now",children:[u.isPending?e.jsx(Z,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(ze,{className:"mr-2 h-4 w-4"}),"Send Update Now"]})]})]}):null}async function zs(s,t){const r=s.getReader(),i=new TextDecoder;let c="",u,o=!1;const x=m=>{if(!m.trim())return;
4if(o)throw new Error("Seat map analysis sent data after its terminal event");const p=JSON.parse(m);if(!p||typeof p!="object"||!("type"in p))throw new Error("Seat map analysis sent an invalid stream event");const h=p;if(h.type==="progress")t(h.progress);else{if(h.type==="error")throw o=!0,new Error(h.error);if(h.type==="result")o=!0,u=h.result;else throw new Error("Seat map analysis sent an unknown stream event")}};try{for(;;){const m=await r.read();c+=i.decode(m.value,{stream:!m.done});const p=c.split(` 5`);c=p.pop()??"";for(const h of p)x(h);if(m.done)break}x(c)}catch(m){throw await r.cancel().catch(()=>{}),m}if(!u)throw new Error("Seat map analysis ended without a result");return u}const Vs=b.lazy(()=>is(()=>import("./index-BTPUR8Lu.js"),__vite__mapDeps([0,1,2,3,4])).then(s=>({default:s.AdminConsole})));function la(){const{toast:s}=J(),t=R(),[r,i]=b.useState(null),[c,u]=b.useState(null),[o,x]=b.useState(null),{data:m=[]}=jt(),{data:p=[]}=bt(),{data:h=[]}=Nt(),l=As({queries:h.map(a=>wt(a.id))}).flatMap(a=>a.data??[]),{data:f=[]}=kt(),{data:d=[]}=St(),{data:y=[]}=Ct(),{data:w=[]}=qt(),{data:C=[]}=Qt(),{data:K=[]}=At(),M=Et(),W=Tt(),U=Pt(),n=Kt(),L=Ot(),pe=Lt(),ye=Gt(),ge=Dt(),ve=Rt(),fe=Mt(),je=Ut(),be=zt(),ae=Vt(),Ne=$t(),we=_t(),ke=Ft(),Se=Ht(),Ce=Bt(),qe=Zt(),Qe=Jt(),Ae=Wt(),Ee=Xt(),Te=Yt(),Pe=It(),Ke=es(),ie=ts(),_e=async()=>{if(window.confirm("Create or reuse the unlisted production test event? Checkout uses live Stripe and will make a real $1 charge."))try{const a=await ie.mutateAsync();await Promise.all([t.invalidateQueries({queryKey:V()}),t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:T()})]),x(a.checkoutPath),s({title:a.reused?"Production test event ready":"Production test event created",description:"The unlisted $1 live checkout is ready to open."})}catch(a){s({title:"Production test setup failed",description:a?.data?.error??a?.message??"Unknown error",variant:"destructive"})}},Fe=b.useMemo(()=>({venues:m,createVenue:async a=>{await M.mutateAsync({data:a}),await t.invalidateQueries({queryKey:ce()})},updateVenue:async(a,g)=>{await W.mutateAsync({id:a,data:g}),await Promise.all([t.invalidateQueries({queryKey:ce()}),t.invalidateQueries({queryKey:V()})])},deleteVenue:async a=>{await U.mutateAsync({id:a}),await t.invalidateQueries({queryKey:ce()})},layouts:p,createLayout:async a=>{await n.mutateAsync({data:a}),await t.invalidateQueries({queryKey:le()})},updateLayout:async(a,g)=>{await L.mutateAsync({id:a,data:g}),await t.invalidateQueries({queryKey:le()})},deleteLayout:async a=>{await pe.mutateAsync({id:a}),await t.invalidateQueries({queryKey:le()})},uploadLayoutImage:async a=>{const g=await ge.mutateAsync({data:{name:a.name,size:a.size,contentType:a.type}}),q=await fetch(g.uploadURL,{method:"PUT",headers:{"Content-Type":a.type},body:a});if(!q.ok)throw new Error(`Seat map upload failed (${q.status})`);return g.objectPath},analyzeLayoutImage:async a=>await ye.mutateAsync({data:a}),analyzeLayoutImageStream:async(a,g)=>{const q=await fetch("/api/admin/ticketing/layouts/analyze-image-stream",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson"},body:JSON.stringify(a),signal:g.signal});if(!q.ok||!q.body){const ne=await q.json().catch(()=>null);throw new Error(ne?.error??`Seat map analysis failed (${q.status})`)}return zs(q.body,g.onProgress)},events:h,createEvent:async a=>{await ve.mutateAsync({data:a}),await t.invalidateQueries({queryKey:V()})},updateEvent:async(a,g)=>{await fe.mutateAsync({id:a,data:g}),await t.invalidateQueries({queryKey:V()})},deleteEvent:async a=>{await je.mutateAsync({id:a}),await t.invalidateQueries({queryKey:V()})},performances:f,createPerformance:async a=>{await be.mutateAsync({data:a}),await Promise.all([t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:z(a.eventId)}),t.invalidateQueries({queryKey:T()})])},updatePerformance:async(a,g)=>{await ae.mutateAsync({id:a,data:g}),await t.invalidateQueries({queryKey:P()})},deletePerformance:async a=>{const g=f.find(ne=>ne.id===a);if(!g)throw new Error(`Cannot delete performance ${a}: performance was not found`);const{eventId:q}=g;await Ne.mutateAsync({id:a}),await Promise.all([t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:T()}),t.invalidateQueries({queryKey:z(q)})])},offers:d,createOffer:async a=>{await we.mutateAsync({data:a}),await t.invalidateQueries({queryKey:T()})},updateOffer:async(a,g)=>{await ke.mutateAsync({id:a,data:g}),await t.invalidateQueries({queryKey:T()})},deleteOffer:async a=>{await Se.mutateAsync({id:a}),await t.invalidateQueries({queryKey:T()})},zones:l,createZone:async(a,g)=>{await Ce.mutateAsync({eventId:a,data:g}),await Promise.all([t.invalidateQueries({queryKey:z(a)}),t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:T()})])},updateZone:async(a,g,q)=>{await qe.mutateAsync({eventId:a,id:g,data:q}),await Promise.all([t.invalidateQueries({queryKey:z(a)}),t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:T()})])},deleteZone:async(a,g)=>{await Qe.mutateAsync({eventId:a,id:g}),await Promise.all([t.invalidateQueries({queryKey:z(a)}),t.invalidateQueries({queryKey:P()}),t.invalidateQueries({queryKey:T()})])},promotions:y,createPromotion:async a=>{await Ae.mutateAsync({data:a}),await t.invalidateQueries({queryKey:Ge()})},updatePromotion:async(a,g)=>{await Ee.mutateAsync({id:a,data:g}),await t.invalidateQueries({queryKey:Ge()})},orders:w,getOrder:async a=>await ss(a),resendOrder:async a=>{await Te.mutateAsync({id:a}
5),await t.invalidateQueries({queryKey:re()}),await t.invalidateQueries({queryKey:de()})},refundOrder:async(a,g,q)=>{await Pe.mutateAsync({id:a,data:{amount:g,reason:q}}),await t.invalidateQueries({queryKey:re()}),await t.invalidateQueries({queryKey:de()})},cancelOrder:async a=>{await Ke.mutateAsync({id:a}),await t.invalidateQueries({queryKey:re()}),await t.invalidateQueries({queryKey:de()})},providerEvents:C}),[m,p,h,f,d,l,y,w,C,M,W,U,n,L,pe,ye,ge,ve,fe,je,be,ae,Ne,we,ke,Se,Ce,qe,Qe,Ae,Ee,Te,Pe,Ke,t]),He=a=>{i(a)},Be=a=>{a.steveShowId&&u(a.steveShowId)},Ze=async a=>{if(r)try{await ae.mutateAsync({id:r,data:{steveShowId:a}}),await t.invalidateQueries({queryKey:P()}),s({title:"Success",description:"Show linked successfully!"}),i(null)}catch(g){s({title:"Error",description:g.message||"Unknown error",variant:"destructive"})}};return e.jsxs("div",{className:"bg-muted/10 min-h-[100dvh] pt-12 pb-24 relative",children:[e.jsxs("div",{className:"container mx-auto px-4 flex flex-wrap justify-end gap-2 mb-4",children:[o&&e.jsx(N,{asChild:!0,className:"rounded-full font-bold uppercase tracking-widest text-xs h-10 gap-2",children:e.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",children:[e.jsx(Cs,{className:"w-4 h-4"})," Open $1 Buyer Page"]})}),e.jsx(N,{variant:"outline",className:"rounded-full font-bold uppercase tracking-widest text-xs h-10",disabled:ie.isPending,onClick:_e,children:ie.isPending?"Setting Upâ¦":"Create Production $1 Test Event"}),e.jsx(N,{asChild:!0,variant:"outline",className:"rounded-full font-bold uppercase tracking-widest text-xs h-10 gap-2 text-primary border-primary/30 hover:bg-primary/10 hover:text-primary",children:e.jsxs(as,{href:"/admin/ticketing/check-in",children:[e.jsx(Ps,{className:"w-4 h-4"})," Open Scanner"]})})]}),e.jsx("div",{className:"container mx-auto px-4",children:e.jsx(b.Suspense,{fallback:e.jsx(ns,{className:"h-[80vh] w-full rounded-2xl"}),children:e.jsx(Vs,{api:Fe,artistName:"Steve Hofstetter",onLinkSteveShow:He,onManageGuestList:Be})})}),e.jsx(_,{open:!!r,onOpenChange:()=>i(null),children:e.jsxs(F,{className:"max-h-[80vh] overflow-auto max-w-2xl",children:[e.jsxs(H,{
5children:[e.jsx(B,{children:"Link Steve Show"}),e.jsx(Y,{children:"Choose the Steve show whose guest list belongs to this performance."})]}),e.jsx("div",{className:"space-y-2 mt-4",children:K.map(a=>e.jsxs("button",{onClick:()=>Ze(a.id),className:"w-full text-left p-3 border rounded-xl hover:bg-muted/50 transition-colors flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"font-bold",children:[a.city,", ",a.region]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[new Date(a.date).toLocaleString()," ⢠",a.venue]})]}),e.jsxs("div",{className:"text-xs font-mono opacity-50",children:["#",a.id]})]},a.id))})]})}),e.jsx(_,{open:!!c,onOpenChange:a=>!a&&u(null),children:e.jsxs(F,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(H,{children:[e.jsx(B,{children:"Manage Guest List"}),e.jsx(Y,{children:"Add, update, cancel, restore, or import guests for the linked Steve show."})]}),c&&e.jsx(Ls,{showId:c})]})})]})}export{zs as consumeSeatMapAnalysisStream,la 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.