PageSourceSearch

https://wab-booking-dev.pages.dev/assets/index-CuZ9I3Ls.js

js wab-booking-dev.pages.dev collected 2026-10-03 05:46:36 UTC 41,035 bytes, 6 lines download raw bytes

1import{c as q,j as e,C as V,e as h,a3 as W,aw as E,d as G,r as w,b3 as Y,O,a5 as J,a6 as _,a8 as D,a9 as Q,a7 as Z,aa as C,f as $,S as K,F as X}from"./index-Cn3juDuU.js";import{E as H,T as F,A as ee,a as te}from"./analyticsApi-DL74lyzC.js";import{S as se}from"./StatCard-B4CufHcJ.js";import{C as ae}from"./credit-card-Bcd-4trx.js";import{A as re}from"./arrow-up-right-CgipCqmc.js";import{R as b,X as g,Y as k,b as ne,B as p,c as ie,d as le,L as U,C as j,T as v,a as I,e as z}from"./LineChart-DYDoTPCU.js";import{B as N}from"./BarChart-DL6wJKOR.js";import{T as oe}from"./trending-up-BrHOyMNh.js";/**
2 * @license lucide-react v0.487.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ce=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],de=q("chart-column",ce);function f(t){return`€ ${t.toLocaleString("de-AT",{minimumFractionDigits:0,maximumFractionDigits:0})}`}function x(t){return t.toLocaleString("de-AT")}const L=["#6D0101","#4F46E5","#0EA5E9","#059669","#D97706","#9333EA","#DB2777","#64748B"];function me(t){const r=[...t].sort((a,s)=>s-a),n={};return r.forEach((a,s)=>{n[a]=L[s%L.length]}),n}function B(t){if(Math.abs(t)>=1e3){const r=t/1e3;return`€ ${r.toLocaleString("de-AT",{maximumFractionDigits:r>=10?0:1})}k`}return`€ ${t.toLocaleString("de-AT",{maximumFractionDigits:0})}`}function xe({years:t,selected:r,onChange:n,colors:a}){const s=[...t].sort((d,m)=>m.year-d.year),i=new Set(r),l=s.map(d=>d.year),c=r.length===l.length&&l.length>0,o=d=>{i.has(d)?n(r.filter(m=>m!==d)):n([...r,d])};return e.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-ink-200 bg-white px-4 py-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-ink-500",children:"Jahrgänge vergleichen"}),e.jsxs("span",{className:"text-xs text-ink-400",children:[r.length," von ",l.length," ausgewählt"]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.map(d=>{const m=i.has(d.year),u=a[d.year]??"#6D0101";return e.jsxs("button",{type:"button",onClick:()=>o(d.year),"aria-pressed":m,title:d.title??`Ball ${d.year}`,className:h("group inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-semibold","transition-all duration-150 active:scale-95",m?"border-transparent text-white shadow-sm":"border-ink-200 bg-white text-ink-600 hover:border-ink-300 hover:bg-ink-50"),style:m?{backgroundColor:u,boxShadow:`0 0 0 2px ${u}22`}:void 0,children:[e.jsx("span",{className:h("flex h-4 w-4 items-center justify-center rounded-full transition-colors",m?"bg-white/25":"border border-ink-300 group-hover:border-ink-400"),style:m?void 0:{borderColor:u,color:u},children:m&&e.jsx(V,{size:11,strokeWidth:3})}),"Ball ",d.year,d.isActive&&e.jsx("span",{className:h("ml-0.5 rounded px-1 py-px text-[9px] font-bold uppercase tracking-wide",m?"bg-white/25 text-white":"bg-emerald-100 text-emerald-700"),children:"Live"})]},d.year)}),e.jsx("span",{className:"mx-1 h-5 w-px bg-ink-200","aria-hidden":"true"}),e.jsx("button",{type:"button",onClick:()=>n(l),disabled:c,className:h("rounded-full border px-2.5 py-1 text-xs font-medium transition-colors",c?"cursor-default border-ink-100 text-ink-300":"border-brand-200 text-brand-700 hover:bg-brand-50"),children:"Alle"}),e.jsx("button",{type:"button",onClick:()=>n([]),disabled:r.length===0,className:h("rounded-full border px-2.5 py-1 text-xs font-medium transition-colors",r.length===0?"cursor-default border-ink-100 text-ink-300":"border-ink-200 text-ink-500 hover:bg-ink-50"),children:"Keine"})]})]})}function S({curr:t,prev:r,prevYear:n,invert:a=!1}){if(r==null||n==null)return e.jsx("span",{className:"text-xs text-ink-400",children:"kein Vorjahr im Vergleich"});const s=r===0?t>0?100:0:Math.round((t-r)/r*100),i=a?s<=0:s>=0;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:h("inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-semibold",i?"bg-emerald-50 text-emerald-700":"bg-red-50 text-red-700"),children:[s>=0?e.jsx(re,{size:11,strokeWidth:2.5}):e.jsx(ee,{size:11,strokeWidth:2.5}),s>0?"+":"",s,"%"]}),e.jsxs("span",{className:"text-xs text-ink-400",children:["vs. Ball ",n]})]})}function ue({years:t}){if(t.length===0)return null;const r=[...t].sort((c,o)=>o.year-c.year),n=r[0],a=r[1]??null,s=(a==null?void 0:a.year)??null,i=n.kpi,l=[{label:`Umsatz gebucht · Ball ${n.year}`,info:"Der gesamte gebuchte Umsatz dieses Balls.",icon:e.jsx(H,{size:15,strokeWidth:1.75}),iconClass:"bg-brand-50 border border-brand-200 text-brand-700",value:f(i.revenueBooked),sub:e.jsx(S,{curr:i.revenueBooked,prev:(a==null?void 0:a.kpi.revenueBooked)??null,prevYear:s})},{label:`Tickets · Ball ${n.year}`,info:"Wie viele Tickets verkauft wurden.",icon:e.jsx(W,{size:15,strokeWidth:1.75}),iconClass:"bg-emerald-50 border border-emerald-200 text-emerald-700",value:x(i.tickets),sub:e.jsx(S,{curr:i.tickets,prev:(a==null?void 0:a.kpi.tickets)??null,prevYear:s})},{label:`Gäste · Ball ${n.year}`,info:"Wie viele Gäste zum Ball kommen.",icon:e.jsx(E,{size:15,strokeWidth:1.75}),iconClass:"bg-sky-50 border border-sky-200 text-sky-700",value:x(i.guests),sub:e.jsx(S,{curr:i.guests,prev:(a==null?void 0:a.kpi.guests)??null,prevYear:s})},{label:`Offen · Ball ${n.year}`,info:"Der Betrag, der noch nicht bezahlt wurde.",icon:e.jsx(ae,{size:15,strokeWidth:1.75}),iconClass:"bg-amber-50 border border-amber-200 text-amber-700",value:f(i.outstanding),sub:e.jsx(S,{curr:i.outstanding,prev:(a==null?void 0:a.kpi.outstanding)??null,prevYear:s,invert:!0})},{label:`Tische · Ball ${n.year}`,info:"Wie viele Tische bereits vergeben sind.",icon:e.jsx(F,{size:15,strokeWidth:1.75}),iconClass:"bg-indigo-50 border border-indigo-200 text-indigo-700",value:e.jsxs("span",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-2xl font-bold leading-none tracking-tight tabular-nums text-ink-900",children:x(i.tablesBooked)}),e.jsxs("span",{className:"text-sm text-ink-400",children:["· ",x(i.seatsBooked)," Sitze"]})]}),sub:e.jsx(S,{curr:i.tablesBooked,prev:(a==null?void 0:a.kpi.tablesBooked)??null,prevYear:s})}];return e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",children:l.map(c=>e.jsx(se,{label:c.label,info:c.info,icon:c.icon,iconClass:c.iconClass,value:c.value,sub:c.sub},c.label))})}function y({title:t,data:r,format:n,info:a}){const s=r.reduce((c,o)=>Math.max(c,o.value),0),i=r.length?r.reduce((c,o)=>c+o.value,0)/r.length:0,l=s>0;return e.jsxs("div",{className:"flex flex-col rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2 border-b border-ink-200 px-4 py-2.5",children:[a?e.jsx(G,{content:a,children:e.jsx("p",{className:"m-0 w-fit cursor-help border-b border-dotted border-ink-300 text-xs font-semibold text-ink-900",children:t})}):e.jsx("p",{className:"m-0 text-xs font-semibold text-ink-900",children:t}),l&&e.jsxs("span",{className:"whitespace-nowrap text-[11px] font-medium text-ink-400",children:["Durchschn. ",n(Math.round(i))]})]}),e.jsxs("div",{className:"relative h-36 px-2 pb-1 pt-2",children:[!l&&e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center text-xs text-ink-300",children:"Keine Daten"}),e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{data:r,margin:{top:16,right:8,left:0,bottom:0}
6,children:[e.jsx(g,{dataKey:"year",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},tickFormatter:c=>`'${String(c).slice(2)}`}),e.jsx(k,{hide:!0,domain:[0,l?s*1.25:1]}),l&&e.jsx(ne,{y:i,stroke:"#cbd5e1",strokeDasharray:"4 3",ifOverflow:"extendDomain"}),e.jsxs(p,{dataKey:"value",radius:[3,3,0,0],maxBarSize:48,isAnimationActive:!1,children:[r.map(c=>e.jsx(ie,{fill:c.color},c.year)),e.jsx(le,{dataKey:"value",position:"top",formatter:c=>c>0?n(c):"",style:{fontSize:10,fontWeight:600,fill:"#374151"}})]})]})})]})]})}function he({years:t,colors:r}){const n=[...t].sort((s,i)=>s.year-i.year),a=s=>n.map(i=>({year:i.year,value:s(i),color:r[i.year]??"#6D0101"}));return e.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(y,{title:"Umsatz (gebucht)",info:"Der gesamte gebuchte Umsatz.",data:a(s=>s.kpi.revenueBooked),format:B}),e.jsx(y,{title:"Umsatz (eingegangen)",info:"Der bereits bezahlte Umsatz.",data:a(s=>s.kpi.revenueReceived),format:B}),e.jsx(y,{title:"Reservierungen",info:"Anzahl der Reservierungen.",data:a(s=>s.kpi.reservations),format:x}),e.jsx(y,{title:"Tickets verkauft",info:"Wie viele Tickets verkauft wurden.",data:a(s=>s.kpi.tickets),format:x}),e.jsx(y,{title:"Gäste",info:"Wie viele Gäste zum Ball kommen.",data:a(s=>s.kpi.guests),format:x}),e.jsx(y,{title:"Durchschn. Umsatz / Res.",info:"Durchschnittlicher Umsatz pro Reservierung.",data:a(s=>s.kpi.avgPerReservation),format:B}),e.jsx(y,{title:"Tischauslastung",info:"Wie viele Tische bereits vergeben sind.",data:a(s=>s.kpi.tableOccupancy),format:s=>`${s}%`}),e.jsx(y,{title:"Check-in-Quote",info:"Wie viele Gäste am Ballabend eingecheckt haben.",data:a(s=>s.kpi.checkinRate),format:s=>`${s}%`})]})}function fe(t,r){const n=new Map;for(const a of t)for(const s of a.velocity){const i=n.get(s.weeksBeforeBall)??{weeksBeforeBall:s.weeksBeforeBall};i[`y${a.year}`]=r==="revenue"?s.cumRevenue:s.cumTickets,n.set(s.weeksBeforeBall,i)}return[...n.values()].sort((a,s)=>s.weeksBeforeBall-a.weeksBeforeBall)}function be({active:t,payload:r,label:n,metric:a,colors:s}){if(!t||!(r!=null&&r.length))return null;const i=a==="revenue"?f:x,l=r.filter(c=>c.value!=null).sort((c,o)=>o.value-c.value);return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n===0?"Ballwoche":`${n} Wochen vor dem Ball`}),l.map(c=>{const o=c.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:s[Number(o)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",o,":"]}),e.jsx("span",{className:"font-semibold",children:i(c.value)})]},c.dataKey)})]})}function ge({years:t,colors:r}){const[n,a]=w.useState("revenue"),s=[...t].sort((l,c)=>l.year-c.year),i=fe(s,n);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-ink-200 px-5 py-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(oe,{size:14,strokeWidth:2,className:"text-brand-700"}),"Verkaufstempo im Jahresvergleich"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Kumulativ, ausgerichtet auf Wochen vor dem Ball"})]}),e.jsx("div",{className:"flex flex-shrink-0 overflow-hidden rounded-md border border-ink-200",children:["revenue","tickets"].map(l=>e.jsx("button",{type:"button",onClick:()=>a(l),className:h("px-2.5 py-1 text-xs font-medium transition-colors",n===l?"bg-brand-700 text-white":"bg-white text-ink-600 hover:bg-ink-50"),children:l==="revenue"?"Umsatz":"Tickets"},l))})]}),e.jsx("div",{className:"h-72 px-2 pb-2 pt-3",children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(U,{data:i,margin:{top:4,right:24,left:4,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),e.jsx(g,{dataKey:"weeksBeforeBall",type:"number",reversed:!0,domain:["dataMax",0],axisLine
6:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},tickFormatter:l=>l===0?"Ball":`${l}W`,dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},width:48,tickFormatter:l=>n==="revenue"?B(l):x(l)}),e.jsx(v,{content:e.jsx(be,{metric:n,colors:r})}),s.map(l=>e.jsx(I,{type:"monotone",dataKey:`y${l.year}`,name:`Ball ${l.year}`,stroke:r[l.year]??"#6D0101",strokeWidth:2,dot:!1,connectNulls:!0,isAnimationActive:!1},l.year))]})})})]})}function ke(t){const r=new Map;for(const n of t)for(const a of n.paymentTimeline){const s=r.get(a.weeksBeforeBall)??{weeksBeforeBall:a.weeksBeforeBall};s[`y${n.year}`]=a.cumReceived,r.set(a.weeksBeforeBall,s)}return[...r.values()].sort((n,a)=>a.weeksBeforeBall-n.weeksBeforeBall)}function pe({active:t,payload:r,label:n,colors:a}){if(!t||!(r!=null&&r.length))return null;const s=r.filter(i=>i.value!=null).sort((i,l)=>l.value-i.value);return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n===0?"Ballwoche":`${n} Wochen vor dem Ball`}),s.map(i=>{const l=i.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:a[Number(l)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",l,":"]}),e.jsx("span",{className:"font-semibold",children:f(i.value)})]},i.dataKey)})]})}function je({years:t,colors:r}){const n=[...t].sort((s,i)=>s.year-i.year),a=ke(n);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(Y,{size:14,strokeWidth:2,className:"text-brand-700"}),"Zahlungseingang im Jahresvergleich"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Kumulativ eingegangene Zahlungen, ausgerichtet auf Wochen vor dem Ball"})]}),e.jsx("div",{className:"h-64 px-2 pb-2 pt-3",children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(U,{data:a,margin:{top:4,right:24,left:4,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),e.jsx(g,{dataKey:"weeksBeforeBall",type:"number",reversed:!0,domain:["dataMax",0],axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},tickFormatter:s=>s===0?"Ball":`${s}W`,dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},width:48,tickFormatter:s=>B(s)}),e.jsx(v,{content:e.jsx(pe,{colors:r})}),n.map(s=>e.jsx(I,{type:"monotone",dataKey:`y${s.year}`,name:`Ball ${s.year}`,stroke:r[s.year]??"#6D0101",strokeWidth:2,strokeDasharray:"5 3",dot:!1,connectNulls:!0,isAnimationActive:!1},s.year))]})})})]})}function ve(t){const r=[],n=new Map;for(const a of t)for(const s of a.revenueByCategory)n.has(s.label)||(n.set(s.label,{label:s.label}),r.push(s.label)),n.get(s.label)[`y${a.year}`]=s.revenue;return r.map(a=>n.get(a))}function ye({active:t,payload:r,label:n,colors:a}){return!t||!(r!=null&&r.length)?null:e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n}),r.filter(s=>s.value!=null).map(s=>{const i=s.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:a[Number(i)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",i,":"]}),e.jsx("span",{className:"font-semibold",children:f(s.value)})]},s.dataKey)})]})}function Ne({years:t,colors:r}){const n=[...t].sort((s,i)=>s.year-i.year),a=ve(n);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-ink-900",children:"Umsatz nach Kategorie"}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Gebuchter Umsatz je Ticketkategorie"})]}),e.jsx("div",{className:"h-72 px-2 pb-2 pt-3",children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{data:a,margin:{top:4,right:16,left:4,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}
6),e.jsx(g,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},width:48,tickFormatter:s=>B(s)}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(ye,{colors:r})}),e.jsx(z,{formatter:s=>`Ball ${s.slice(1)}`,wrapperStyle:{fontSize:12}}),n.map(s=>e.jsx(p,{dataKey:`y${s.year}`,fill:r[s.year]??"#6D0101",radius:[3,3,0,0],maxBarSize:40,isAnimationActive:!1},s.year))]})})})]})}const we=10;function Be(t){const r=new Map;for(const n of t)for(const a of n.ticketTypes){const s=r.get(a.name)??{name:a.name,category:a.category,byYear:new Map,totalQty:0,totalRev:0};s.byYear.set(n.year,{quantity:a.quantity,revenue:a.revenue}),s.totalQty+=a.quantity,s.totalRev+=a.revenue,r.set(a.name,s)}return[...r.values()]}function ze({active:t,payload:r,label:n,metric:a,colors:s}){if(!t||!(r!=null&&r.length))return null;const i=a==="revenue"?f:l=>`${x(l)} Stk.`;return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 max-w-[220px] font-medium text-ink-400",children:n}),r.filter(l=>l.value!=null).map(l=>{const c=l.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:s[Number(c)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",c,":"]}),e.jsx("span",{className:"font-semibold",children:i(l.value)})]},l.dataKey)})]})}function Se({years:t,colors:r}){const[n,a]=w.useState("quantity"),s=[...t].sort((o,d)=>o.year-d.year),i=Be(s);i.sort((o,d)=>n==="revenue"?d.totalRev-o.totalRev:d.totalQty-o.totalQty);const l=i.slice(0,we).map(o=>{const d={name:o.name};for(const m of s){const u=o.byYear.get(m.year);u&&(d[`y${m.year}`]=n==="revenue"?u.revenue:u.quantity)}return d}),c=Math.max(240,l.length*40+60);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-ink-200 px-5 py-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(W,{size:14,strokeWidth:2,className:"text-brand-700"}),"Beliebteste Ticketarten"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Meistverkaufte Ticketarten je Jahrgang (Karten, Tischplätze, Logen)"})]}),e.jsx("div",{className:"flex flex-shrink-0 overflow-hidden rounded-md border border-ink-200",children:["quantity","revenue"].map(o=>e.jsx("button",{type:"button",onClick:()=>a(o),className:h("px-2.5 py-1 text-xs font-medium transition-colors",n===o?"bg-brand-700 text-white":"bg-white text-ink-600 hover:bg-ink-50"),children:o==="quantity"?"Menge":"Umsatz"},o))})]}),e.jsx("div",{className:"px-2 py-3",style:{height:c},children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{layout:"vertical",data:l,margin:{top:4,right:16,left:8,bottom:0},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",horizontal:!1}),e.jsx(g,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},allowDecimals:!1,tickFormatter:o=>n==="revenue"?B(o):x(o)}),e.jsx(k,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#374151"},width:170}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(ze,{metric:n,colors:r})}),e.jsx(z,{formatter:o=>`Ball ${o.slice(1)}`,wrapperStyle:{fontSize:12}}),s.map(o=>e.jsx(p,{dataKey:`y${o.year}`,fill:r[o.year]??"#6D0101",radius:[0,3,3,0],maxBarSize:16,isAnimationActive:!1},o.year))]})})})]})}const T=[{key:"ACCEPTED",label:"Angenommen",color:"#94A3B8"},{key:"AWAITING_PAYMENT",label:"Zahlung offen",color:"#F59E0B"},{key:"PAYMENT_RECEIVED",label:"Bezahlt",color:"#0EA5E9"},{key:"TICKETS_GENERATED",label:"Tickets erstellt",color:"#6366F1"},{key:"DELIVERED",label:"Geliefert",color:"#059669"},{key:"CANCELLED",label:"Storniert",color:"#DC2626"}];function Te(t){const r=new Map;return{rows:t.map(a=>{const s={};let i=0;for(const o of a.statusDistribution)s[o.status]=o.count,i+=o.count;const l=`Ball ${a.year}`;r.set(l,s);const c={label:l};for(const o of T)c[o.key]=i>0?Math.round((s[o.key]??0)/i*100):0;return c}),counts:r}}function Ae({active:t,payload:r,label:n,counts:a}){if(!t||!(r!=null&&r.length)||!n)return null;const s=a.get(n)??{};return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n}),r.filter(i=>i.value>0).map(i=>{const l=T.find(c=>c.key===i.dataKey);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:l.color}}),e.jsxs("span",{className:"text-ink-200",children:[l.label,":"]}
6),e.jsxs("span",{className:"font-semibold",children:[s[i.dataKey]??0," · ",i.value,"%"]})]},i.dataKey)})]})}function De({years:t}){const r=[...t].sort((i,l)=>l.year-i.year),{rows:n,counts:a}=Te(r),s=Math.max(120,n.length*48+40);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-ink-900",children:"Reservierungs-Pipeline"}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Statusverteilung je Jahrgang (Anteil)"})]}),e.jsx("div",{className:"px-2 py-3",style:{height:s},children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{layout:"vertical",data:n,margin:{top:4,right:16,left:8,bottom:0},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",horizontal:!1}),e.jsx(g,{type:"number",domain:[0,100],axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},tickFormatter:i=>`${i}%`}),e.jsx(k,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},width:70}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(Ae,{counts:a})}),T.map((i,l)=>e.jsx(p,{dataKey:i.key,name:i.label,stackId:"s",fill:i.color,isAnimationActive:!1,radius:l===0?[4,0,0,4]:l===T.length-1?[0,4,4,0]:0,maxBarSize:28},i.key))]})})}),e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 border-t border-ink-100 px-5 py-2.5",children:T.map(i=>e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-ink-600",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:i.color}}),i.label]},i.key))})]})}const Ce="#0EA5E9",$e="#6D0101";function Ke({active:t,payload:r,label:n}){if(!t||!(r!=null&&r.length))return null;const a=r.reduce((s,i)=>s+(i.value??0),0);return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n}),r.map(s=>e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:s.color}}),e.jsxs("span",{className:"text-ink-200",children:[s.dataKey==="neu"?"Neue Gäste":"Stammgäste",":"]}),e.jsx("span",{className:"font-semibold",children:x(s.value)})]},s.dataKey)),e.jsxs("div",{className:"mt-1 border-t border-ink-700 pt-1 text-ink-300",children:["Gesamt: ",x(a)]})]})}function Le({years:t}){const n=[...t].sort((a,s)=>a.year-s.year).map(a=>({label:`Ball ${a.year}`,neu:a.kpi.newGuests,wiederkehrend:a.kpi.returningGuests}));return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-ink-900",children:"Gästestruktur"}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Neue vs. wiederkehrende Gäste je Jahrgang"})]}),e.jsx("div",{className:"h-64 px-2 pb-2 pt-3",children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{data:n,margin:{top:4,right:16,left:0,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}),e.jsx(g,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},width:40,allowDecimals:!1}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(Ke,{})}),e.jsx(z,{wrapperStyle:{fontSize:12}}),e.jsx(p,{dataKey:"wiederkehrend",name:"Stammgäste",stackId:"g",fill:$e,maxBarSize:56,isAnimationActive:!1}),e.jsx(p,{dataKey:"neu",name:"Neue Gäste",stackId:"g",fill:Ce,radius:[3,3,0,0],maxBarSize:56,isAnimationActive:!1})]})})})]})}function Re(t,r){return r==="tables"?t.tablesBooked:t.seatsBooked}function R(t,r){return r==="tables"?t.tablesCapacity:t.seatsCapacity}function Me(t,r){const n=new Map;for(const l of t)for(const c of l.tablesByCategory)n.set(c.category,Math.max(n.get(c.category)??0,R(c,r)));const a=[...n.entries()].filter(([,l])=>l>0).sort((l,c)=>c[1]-l[1]).map(([l])=>l),s=new Map;return{rows:a.map(l=>{const c={area:l},o=new Map;for(const d of t){const m=d.tablesByCategory.find(P=>P.category===l);if(!m)continue;const u=Re(m,r),A=R(m,r);o.set(d.year,{booked:u,capacity:A}),c[`y${d.year}`]=A>0?Math.round(u/A*100):0}
6return s.set(l,o),c}),counts:s}}function We({active:t,payload:r,label:n,counts:a,metric:s}){if(!t||!(r!=null&&r.length)||!n)return null;const i=a.get(n),l=s==="tables"?"Tische":"Sitze";return e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n}),r.map(c=>{const o=Number(c.dataKey.slice(1)),d=i==null?void 0:i.get(o);return d?e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsxs("span",{className:"text-ink-200",children:["Ball ",o,":"]}),e.jsxs("span",{className:"font-semibold",children:[c.value,"% · ",x(d.booked),"/",x(d.capacity)," ",l]})]},c.dataKey):null})]})}function Ee({years:t,colors:r}){const[n,a]=w.useState("tables"),s=[...t].sort((o,d)=>o.year-d.year),{rows:i,counts:l}=Me(s,n),c=i.length>0;return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-ink-200 px-5 py-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(F,{size:14,strokeWidth:2,className:"text-brand-700"}),"Tische & Logen"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Auslastung je Bereich (belegt / verfügbar)"})]}),e.jsx("div",{className:"flex flex-shrink-0 overflow-hidden rounded-md border border-ink-200",children:["tables","seats"].map(o=>e.jsx("button",{type:"button",onClick:()=>a(o),className:h("px-2.5 py-1 text-xs font-medium transition-colors",n===o?"bg-brand-700 text-white":"bg-white text-ink-600 hover:bg-ink-50"),children:o==="tables"?"Tische":"Sitze"},o))})]}),e.jsx("div",{className:"h-64 px-2 pb-2 pt-3",children:c?e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{data:i,margin:{top:4,right:16,left:0,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}
6),e.jsx(g,{dataKey:"area",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,domain:[0,100],tick:{fontSize:12,fill:"#9ca3af"},width:40,tickFormatter:o=>`${o}%`}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(We,{counts:l,metric:n})}),e.jsx(z,{formatter:o=>`Ball ${o.slice(1)}`,wrapperStyle:{fontSize:12}}),s.map(o=>e.jsx(p,{dataKey:`y${o.year}`,fill:r[o.year]??"#6D0101",radius:[3,3,0,0],maxBarSize:40,isAnimationActive:!1},o.year))]})}):e.jsx("div",{className:"flex h-full items-center justify-center text-xs text-ink-300",children:"Keine Tischbereiche konfiguriert"})})]})}const Ge=10;function Fe(t){const r=new Map;for(const n of t)for(const a of n.topBunds){const s=r.get(a.name)??{name:a.name,total:0};s[`y${n.year}`]=a.tickets,s.total=s.total+a.tickets,r.set(a.name,s)}return[...r.values()].sort((n,a)=>a.total-n.total).slice(0,Ge)}function Ue({active:t,payload:r,label:n,colors:a}){return!t||!(r!=null&&r.length)?null:e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 max-w-[200px] font-medium text-ink-400",children:n}),r.filter(s=>s.value!=null).map(s=>{const i=s.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:a[Number(i)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",i,":"]}),e.jsxs("span",{className:"font-semibold",children:[x(s.value)," Tickets"]})]},s.dataKey)})]})}function Ie({years:t,colors:r}){const n=[...t].sort((i,l)=>i.year-l.year),a=Fe(n),s=Math.max(280,a.length*52+70);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(E,{size:14,strokeWidth:2,className:"text-brand-700"}),"Stärkste Verbindungen & Bünde"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Studentenverbindungen mit den meisten gekauften Tickets — je Jahrgang"})]}),e.jsx("div",{className:"px-2 py-3",style:{height:s},children:a.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-xs text-ink-300",children:"Keine Verbindungsdaten"}):e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{layout:"vertical",data:a,margin:{top:4,right:16,left:8,bottom:0},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",horizontal:!1}),e.jsx(g,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"#9ca3af"},allowDecimals:!1}),e.jsx(k,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#374151"},width:200}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(Ue,{colors:r})}),e.jsx(z,{formatter:i=>`Ball ${i.slice(1)}`,wrapperStyle:{fontSize:12}}),n.map(i=>e.jsx(p,{dataKey:`y${i.year}`,fill:r[i.year]??"#6D0101",radius:[0,3,3,0],maxBarSize:18,isAnimationActive:!1},i.year))]})})})]})}const Pe=[{key:"total",label:"Anfragen"},{key:"accepted",label:"Angenommen"},{key:"converted",label:"Konvertiert"}];function qe(t){return Pe.map(r=>{const n={stage:r.label};for(const a of t)n[`y${a.year}`]=a.inquiryFunnel[r.key];return n})}function Ve({active:t,payload:r,label:n,colors:a}){return!t||!(r!=null&&r.length)?null:e.jsxs("div",{className:"rounded-md bg-ink-900 px-3 py-2 text-xs text-white shadow-card-hover",children:[e.jsx("div",{className:"mb-1.5 font-medium text-ink-400",children:n}),r.filter(s=>s.value!=null).map(s=>{const i=s.dataKey.slice(1);return e.jsxs("div",{className:"mb-0.5 flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{backgroundColor:a[Number(i)]??"#6D0101"}}),e.jsxs("span",{className:"text-ink-200",children:["Ball ",i,":"]}),e.jsx("span",{className:"font-semibold",children:x(s.value)})]},s.dataKey)})]})}function Ye({years:t,colors:r}){const n=[...t].sort((s,i)=>s.year-i.year),a=qe(n);return e.jsxs("div",{className:"rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsxs("p",{className:"m-0 flex items-center gap-1.5 text-sm font-semibold text-ink-900",children:[e.jsx(O,{size:14,strokeWidth:2,className:"text-brand-700"}),"Anfrage-Trichter"]}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Von der Anfrage zur Reservierung"})]}),e.jsx("div",{className:"h-64 px-2 pb-2 pt-3",children:e.jsx(b,{width:"100%",height:"100%",children:e.jsxs(N,{data:a,margin:{top:4,right:16,left:0,bottom:4},children:[e.jsx(j,{strokeDasharray:"3 3",stroke:"#f3f4f6",vertical:!1}
6),e.jsx(g,{dataKey:"stage",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},dy:6}),e.jsx(k,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#9ca3af"},width:40,allowDecimals:!1}),e.jsx(v,{cursor:{fill:"rgba(0,0,0,0.03)"},content:e.jsx(Ve,{colors:r})}),e.jsx(z,{formatter:s=>`Ball ${s.slice(1)}`,wrapperStyle:{fontSize:12}}),n.map(s=>e.jsx(p,{dataKey:`y${s.year}`,fill:r[s.year]??"#6D0101",radius:[3,3,0,0],maxBarSize:36,isAnimationActive:!1},s.year))]})})})]})}const Oe=[{label:"Umsatz (eingegangen)",info:"Der bereits bezahlte Umsatz.",value:t=>t.kpi.revenueReceived,format:f,higherBetter:!0},{label:"Umsatz (gebucht)",info:"Der gesamte gebuchte Umsatz.",value:t=>t.kpi.revenueBooked,format:f,higherBetter:!0},{label:"Offen",info:"Der Betrag, der noch nicht bezahlt wurde.",value:t=>t.kpi.outstanding,format:f,higherBetter:!1},{label:"Zahlungsquote",info:"Wie viel Prozent der Reservierungen bereits bezahlt sind.",value:t=>t.kpi.paymentRate,format:t=>`${t}%`,higherBetter:!0,percent:!0},{label:"Reservierungen",info:"Anzahl der Reservierungen.",value:t=>t.kpi.reservations,format:x,higherBetter:!0},{label:"Tickets verkauft",info:"Wie viele Tickets verkauft wurden.",value:t=>t.kpi.tickets,format:x,higherBetter:!0},{label:"Gäste",info:"Wie viele Gäste zum Ball kommen.",value:t=>t.kpi.guests,format:x,higherBetter:!0},{label:"Durchschn. Umsatz / Reservierung",info:"Durchschnittlicher Umsatz pro Reservierung.",value:t=>t.kpi.avgPerReservation,format:f,higherBetter:!0},{label:"Tischauslastung",info:"Wie viele Tische bereits vergeben sind.",value:t=>t.kpi.tableOccupancy,format:t=>`${t}%`,higherBetter:!0,sub:t=>`${t.kpi.tablesBooked}/${t.kpi.tablesCapacity}`,percent:!0},{label:"Sitzauslastung",info:"Wie viele Sitzplätze bereits belegt sind.",value:t=>t.kpi.seatOccupancy,format:t=>`${t}%`,higherBetter:!0,sub:t=>`${t.kpi.seatsBooked}/${t.kpi.seatsCapacity}`,percent:!0},{label:"Check-in-Quote",info:"Wie viele Gäste am Ballabend eingecheckt haben.",value:t=>t.isPast?t.kpi.checkinRate:null,format:t=>`${t}%`,higherBetter:!0,percent:!0},{label:"Konsumation eingelöst",info:"Wie viele Konsumationskarten am Ball eingelöst wurden.",value:t=>t.isPast?t.kpi.konsumationIssued>0?Math.round(t.kpi.konsumationRedeemed/t.kpi.konsumationIssued*100):0:null,format:t=>`${t}%`,higherBetter:!0,sub:t=>`${t.kpi.konsumationRedeemed}/${t.kpi.konsumationIssued}`,percent:!0},{label:"Damenspende eingelöst",info:"Wie viele Damenspende-Karten am Ball eingelöst wurden.",value:t=>t.isPast?t.kpi.damenspendeIssued>0?Math.round(t.kpi.damenspendeRedeemed/t.kpi.damenspendeIssued*100):0:null,format:t=>`${t}%`,higherBetter:!0,sub:t=>`${t.kpi.damenspendeRedeemed}/${t.kpi.damenspendeIssued}`,percent:!0},{label:"Durchschn. Tickets / Reservierung",info:"Durchschnittliche Anzahl Tickets je Reservierung.",value:t=>t.kpi.avgPartySize,format:t=>M(t),higherBetter:!0},{label:"Durchschn. Sitze / Tisch",info:"Durchschnittliche Sitzanzahl je gebuchtem Tisch.",value:t=>t.kpi.avgSeatsPerTable,format:t=>M(t),higherBetter:!0},{label:"Durchschn. Tage bis Zahlung",info:"Durchschnittliche Zeit von der Reservierung bis zum Zahlungseingang.",value:t=>t.kpi.avgDaysToPayment,format:t=>`${t} T`,higherBetter:!1},{label:"Stornierungen",info:"Anzahl stornierter Reservierungen.",value:t=>t.kpi.cancellations,format:x,higherBetter:!1},{label:"Stornoquote",info:"Anteil stornierter an allen Reservierungen.",value:t=>t.kpi.cancellationRate,format:t=>`${t}%`,higherBetter:!1,percent:!0},{label:"Stammgäste",info:"Gäste, die bereits einen früheren Ball besucht haben (Ticket erhalten).",value:t=>t.kpi.returningGuests,format:x,higherBetter:!0},{label:"Neue Gäste",info:"Gäste ohne früheren Ballbesuch — zum ersten Mal dabei.",value:t=>t.kpi.newGuests,format:x,higherBetter:!0},{label:"Stammgastquote",info:"Anteil der Gäste, die schon einmal auf einem früheren Ball waren.",value:t=>t.kpi.returningRate,format:t=>`${t}%`,higherBetter:!0,percent:!0},{label:"Anfragen",info:"Anzahl der Anfragen (Inbox) für diesen Jahrgang.",value:t=>t.kpi.inquiries,format:x,higherBetter:!0},{label:"Anfrage-Konversion",info:"Anteil der Anfragen, die zu einer Reservierung wurden.",value:t=>t.kpi.inquiryConversion,format:t=>`${t}%`,higherBetter:!0,percent:!0},{label:"E-Mails gesendet",info:"Anzahl an Reservierungen versendeter E-Mails.",value:t=>t.kpi.emailsSent,format:x,higherBetter:!0}];
6function M(t){return t.toLocaleString("de-AT",{maximumFractionDigits:1})}function Je(t,r){if(r.length<2)return-1;let n=-1,a=t.higherBetter?-1/0:1/0,s=!1;return r.forEach((i,l)=>{const c=t.value(i);c!=null&&(n!==-1&&c!==a&&(s=!0),(t.higherBetter?c>a:c<a)&&(a=c,n=l))}),s?n:-1}function _e({years:t,colors:r}){const n=[...t].sort((a,s)=>a.year-s.year);return e.jsxs("div",{className:"overflow-hidden rounded-lg border border-ink-200 bg-white",children:[e.jsxs("div",{className:"border-b border-ink-200 px-5 py-3",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-ink-900",children:"Kennzahlen im Detail"}),e.jsx("p",{className:"m-0 mt-0.5 text-xs text-ink-400",children:"Bester Wert je Zeile hervorgehoben"})]}),e.jsxs(J,{children:[e.jsx(_,{children:e.jsxs("tr",{children:[e.jsx(D,{children:"Kennzahl"}),n.map(a=>e.jsx(D,{align:"right",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r[a.year]??"#6D0101"}}),"Ball ",a.year]})},a.year))]})}),e.jsx(Q,{children:Oe.map(a=>{const s=Je(a,n);return e.jsxs(Z,{children:[e.jsx(C,{className:"text-ink-600",children:e.jsx(G,{content:a.info,side:"right",children:e.jsx("span",{className:"cursor-help border-b border-dotted border-ink-300 decoration-ink-300",children:a.label})})}),n.map((i,l)=>{var u;const c=a.value(i),o=(u=a.sub)==null?void 0:u.call(a,i),d=l===s,m=r[i.year]??"#6D0101";return e.jsx(C,{align:"right",className:"tabular-nums",children:c==null?e.jsx("span",{className:"text-ink-300",children:"—"}):a.percent?e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsxs("span",{className:h(d?"font-bold text-brand-700":"text-ink-900"),children:[a.format(c),o&&e.jsx("span",{className:"ml-1 text-[11px] text-ink-400",children:o})]}),e.jsx("div",{className:"h-1.5 w-20 overflow-hidden rounded-full bg-ink-100",role:"presentation",children:e.jsx("div",{className:"h-full rounded-full transition-[width]",style:{width:`${Math.max(0,Math.min(100,c))}%`,backgroundColor:m}})})]}):e.jsxs("span",{className:h(d?"font-bold text-brand-700":"text-ink-900"),children:[a.format(c),o&&e.jsx("span",{className:"ml-1 text-[11px] text-ink-400",children:o})]})},i.year)})]},a.label)})})]})]})}function rt(){const t=$({queryKey:["event-years"],queryFn:()=>X.list(),staleTime:3e5}),r=w.useMemo(()=>{var d;return(((d=t.data)==null?void 0:d.items)??[]).map(m=>({year:m.year,title:m.title,isActive:m.isActive}))},[t.data]),n=w.useMemo(()=>r.map(d=>d.year),[r]),[a,s]=w.useState(null),i=a??n,l=w.useMemo(()=>me(n),[n]),c=[...i].sort((d,m)=>d-m),o=$({queryKey:["analytics","compare",c],queryFn:()=>te.compare(i),enabled:i.length>0,staleTime:6e4});return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"m-0 flex items-center gap-2 text-base font-bold leading-tight text-ink-900",children:[e.jsx(de,{size:18,strokeWidth:1.75,className:"text-brand-700"}),"Analytics"]}),e.jsx("p",{className:"m-0 mt-0.5 text-sm text-ink-500",children:"Wiener Akademikerball · Leistungsvergleich der Ball-Jahrgänge"})]}),t.isPending?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(K,{size:20})}):t.isError||r.length===0?e.jsx("div",{className:"rounded-lg border border-ink-200 bg-white px-4 py-12 text-center text-sm text-ink-500",children:"Keine Ball-Jahrgänge gefunden."}):e.jsxs(e.Fragment,{children:[e.jsx(xe,{years:r,selected:i,onChange:s,colors:l}),i.length===0?e.jsx("div",{className:"rounded-lg border border-dashed border-ink-200 bg-white px-4 py-16 text-center text-sm text-ink-500",children:"Wähle mindestens einen Ball-Jahrgang zum Vergleichen."}):o.isPending?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(K,{size:20})}):o.isError||!o.data?e.jsx("div",{className:"rounded-lg border border-ink-200 bg-white px-4 py-12 text-center text-sm text-ink-500",children:"Vergleichsdaten konnten nicht geladen werden."}):e.jsxs(e.Fragment,{children:[e.jsx(ue,{years:o.data.years}),e.jsx(he,{years:o.data.years,colors:l}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:[e.jsx(ge,{years:o.data.years,colors:l}),e.jsx(je,{years:o.data.years,colors:l})]}),e.jsx(Se,{years:o.data.years,colors:l}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:[e.jsx(Ne,{years:o.data.years,colors:l}),e.jsx(De,{years:o.data.years})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2",children:[e.jsx(Le,{years:o.data.years}),e.jsx(Ye,{years:o.data.years,colors:l})]}),e.jsx(Ee,{years:o.data.years,colors:l}),e.jsx(Ie,{years:o.data.years,colors:l}),e.jsx(_e,{years:o.data.years,colors:l})]})]})]})}export{rt as AnalyticsDashboard};

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.