PageSourceSearch

https://britishboxers.uk/assets/Reports-DxJ47V8d.js

js britishboxers.uk collected 2026-10-09 05:15:25 UTC 12,282 bytes, 1 lines download raw bytes

1import{u as D,i as A,r as b,t as i,b as n,j as e,B as t,l as I,d as L}from"./index-CAgTsS9I.js";import{L as u}from"./Layout-D_oP4nSj.js";import{B as T}from"./badge-Dfqv_Hz3.js";import{D as h,a as f,b as R,c as j}from"./dialog-70VskD_D.js";import{W as F}from"./index-BLw9-JcA.js";import{L as d}from"./lock-B324poJk.js";import{F as B}from"./file-text-B4Uz5txe.js";import{B as z}from"./book-open-BGh3pu81.js";import{G as N}from"./globe-Cl9IuGQG.js";import{C as M}from"./calendar-vhbxlSut.js";import{E as w}from"./eye-CPGi78pS.js";import{C as P}from"./copy-njXYZb9-.js";import{T as E}from"./trash-2-B8kvyBWw.js";import"./settings-Dqu1Zn_r.js";import"./check-DXYeM_Sd.js";import"./mail-SHgAPKVI.js";import"./index-CSdx2VRY.js";import"./search-CkMXx1d0.js";import"./user-Bzsp7ULD.js";import"./arrow-left-BuPJNO5W.js";import"./camera-DxANKcNo.js";import"./shield-check-BgNs-s5f.js";import"./house-CVZTxZpZ.js";const v={fight_prediction:{label:"Fight Prediction",color:"bg-boxing-red/15 text-boxing-red border-boxing-red/30"},fighter_analysis:{label:"Fighter Analysis",color:"bg-blue-500/15 text-blue-400 border-blue-500/30"},historical_comparison:{label:"Historical Comparison",color:"bg-amber-500/15 text-amber-400 border-amber-500/30"},custom:{label:"Custom Report",color:"bg-purple-500/15 text-purple-400 border-purple-500/30"}};function ie(){const{user:x}=D(),[,p]=A(),[o,m]=b.useState(null),[l,r]=b.useState(null),{data:c,isLoading:y,refetch:g}=i.reports.list.useQuery(void 0,{enabled:!!x}),C=i.reports.delete.useMutation({onSuccess:()=>{n.success("Report deleted"),g(),r(null)}}),k=i.reports.togglePublic.useMutation({onSuccess:s=>{n.success(s?.isPublic?"Report is now public":"Report is now private"),g()}}),S=s=>{const a=`${window.location.origin}/reports/shared/${s}`;navigator.clipboard.writeText(a),n.success("Share link copied to clipboard")};return x?e.jsx(u,{"data-loc":"client/src/pages/Reports.tsx:72",children:e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:73",className:"w-full bg-[#0a0a0a] min-h-screen min-h-dvh",children:[e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:75",className:"relative w-full overflow-hidden bg-black min-h-[340px] flex items-center justify-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:76",className:"absolute top-0 left-0 w-full h-full bg-background/80"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:77",className:"absolute -top-1/2 -right-1/4 w-full h-full bg-boxing-red/20 rounded-full blur-[250px]"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:78",className:"absolute -bottom-1/2 -left-1/4 w-3/4 h-3/4 bg-amber-500/10 rounded-full blur-[200px] animate-pulse"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:79",className:"absolute inset-0",style:{backgroundImage:"radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:81",className:"relative w-full px-4 sm:px-6 md:px-10 lg:px-16 py-10 z-10",children:[e.jsxs("button",{"data-loc":"client/src/pages/Reports.tsx:82",onClick:()=>p("/ai-chat"),className:"flex items-center gap-2 text-muted-foreground hover:text-boxing-red transition-colors mb-6",children:[e.jsx(I,{"data-loc":"client/src/pages/Reports.tsx:83",className:"w-4 h-4"}),"Back to AI Chat"]}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:87",className:"flex items-center gap-3 mb-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:88",className:"bg-card/40 border border-border rounded-xl px-4 py-2 backdrop-blur-sm flex items-center gap-3",children:[e.jsx(L,{"data-loc":"client/src/pages/Reports.tsx:89",className:"w-5 h-5 text-amber-400"}),e.jsx("span",{"data-loc":"client/src/pages/Reports.tsx:90",className:"text-sm font-semibold text-amber-400",children:"Founding Member Feature"})]})}),e.jsx("h1",{"data-loc":"client/src/pages/Reports.tsx:94",className:"text-4xl md:text-5xl font-black text-white tracking-tight mb-4",children:"My Reports"}),e.jsx("p",{"data-loc":"client/src/pages/Reports.tsx:97",className:"text-lg text-muted-foreground max-w-2xl",children:"Your saved AI-generated analysis reports. View, share, or download your boxing research."})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:104",className:"w-full px-4 sm:px-6 md:px-10 lg:px-16 py-10",children:y?e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:106",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 ga
1p-6",children:[...Array(5)].map((s,a)=>e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:108",className:"bg-card/30 border border-border rounded-xl p-6 animate-pulse",children:[e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:109",className:"h-5 bg-white/5 rounded w-1/3 mb-4"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:110",className:"h-6 bg-white/5 rounded w-3/4 mb-3"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:111",className:"h-4 bg-white/5 rounded w-full mb-2"}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:112",className:"h-4 bg-white/5 rounded w-2/3"})]},a))}):!c||c.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:117",className:"text-center py-10 sm:py-20 border border-dashed border-border rounded-2xl",children:[e.jsx(B,{"data-loc":"client/src/pages/Reports.tsx:118",className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h3",{"data-loc":"client/src/pages/Reports.tsx:119",className:"text-xl font-bold text-foreground mb-2",children:"No Reports Yet"}),e.jsx("p",{"data-loc":"client/src/pages/Reports.tsx:120",className:"text-muted-foreground mb-6 max-w-sm mx-auto",children:"Use the AI Boxing Historian to generate analysis reports, then save them here."}),e.jsxs(t,{"data-loc":"client/src/pages/Reports.tsx:123",onClick:()=>p("/ai-chat"),className:"bg-boxing-red hover:bg-boxing-red/90 text-white font-bold",children:[e.jsx(z,{"data-loc":"client/src/pages/Reports.tsx:124",className:"w-4 h-4 mr-2"}),"Go to AI Chat"]})]}):e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:129",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-6",children:c.map(s=>{const a=v[s.reportType]||v.custom;return e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:133",className:"group bg-card/30 backdrop-blur-sm border border-border rounded-xl p-5 flex flex-col transition-all duration-300 hover:border-boxing-red/30 hover:bg-card/40",children:[e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:137",className:"flex-grow",children:[e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:138",className:"flex items-center justify-between mb-3",children:[e.jsx(T,{"data-loc":"client/src/pages/Reports.tsx:139",variant:"outline",className:`text-xs font-bold ${a.color}`,children:a.label}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:142",className:"flex items-center gap-1",children:s.isPublic?e.jsx(N,{"data-loc":"client/src/pages/Reports.tsx:144",className:"w-3.5 h-3.5 text-emerald-400"}):e.jsx(d,{"data-loc":"client/src/pages/Reports.tsx:146",className:"w-3.5 h-3.5 text-muted-foreground"})})]}),e.jsx("h3",{"data-loc":"client/src/pages/Reports.tsx:151",className:"text-md font-bold text-foreground mb-2 line-clamp-2 group-hover:text-boxing-red transition-colors",children:s.title}),e.jsx("p",{"data-loc":"client/src/pages/Reports.tsx:155",className:"text-sm text-muted-foreground mb-4 line-clamp-2 h-10",children:s.summary||"AI-generated boxing analysis report"}),e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:159",className:"flex items-center gap-3 text-xs text-muted-foreground mb-5 border-t border-border pt-3 mt-3",children:[e.jsxs("span",{"data-loc":"client/src/pages/Reports.tsx:160",className:"flex items-center gap-1.5",children:[e.jsx(M,{"data-loc":"client/src/pages/Reports.tsx:161",className:"w-3.5 h-3.5"}),new Date(s.createdAt).toLocaleDateString()]}),e.jsxs("span",{"data-loc":"client/src/pages/Reports.tsx:164",className:"flex items-center gap-1.5",children:[e.jsx(w,{"data-loc":"client/src/pages/Reports.tsx:165",className:"w-3.5 h-3.5"}),s.viewCount||0," views"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:171",className:"flex items-center gap-2",children:[e.jsxs(t,{"data-loc":"client/src/pages/Reports.tsx:172",size:"sm",onClick:()=>m(s),className:"flex-1 bg-white/5 hover:bg-accent text-muted-foreground text-xs rounded-lg font-semibold",children:[e.jsx(w,{"data-loc":"client/src/pages/Reports.tsx:177",className:"w-3.5 h-3.5 mr-1.5"}),"View"]}
1),e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:180",size:"sm",variant:"outline",onClick:()=>k.mutate({reportId:s.id}),className:"border-border text-muted-foreground text-xs rounded-lg p-2 hover:bg-accent/50",children:s.isPublic?e.jsx(d,{"data-loc":"client/src/pages/Reports.tsx:186",className:"w-3.5 h-3.5"}):e.jsx(N,{"data-loc":"client/src/pages/Reports.tsx:186",className:"w-3.5 h-3.5"})}),s.shareToken&&e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:189",size:"sm",variant:"outline",onClick:()=>S(s.shareToken),className:"border-border text-muted-foreground text-xs rounded-lg p-2 hover:bg-accent/50",children:e.jsx(P,{"data-loc":"client/src/pages/Reports.tsx:195",className:"w-3.5 h-3.5"})}),e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:198",size:"sm",variant:"outline",onClick:()=>r(s.id),className:"border-boxing-red/30 text-boxing-red hover:bg-boxing-red/10 text-xs rounded-lg p-2",children:e.jsx(E,{"data-loc":"client/src/pages/Reports.tsx:204",className:"w-3.5 h-3.5"})})]})]},s.id)})})}),e.jsx(h,{"data-loc":"client/src/pages/Reports.tsx:215",open:!!o,onOpenChange:()=>m(null),children:e.jsxs(f,{"data-loc":"client/src/pages/Reports.tsx:216",className:"max-w-3xl max-h-[80vh] overflow-y-auto bg-[#0a0a0a] border-border text-white rounded-xl",children:[e.jsx(R,{"data-loc":"client/src/pages/Reports.tsx:217",children:e.jsx(j,{"data-loc":"client/src/pages/Reports.tsx:218",className:"text-xl font-bold",children:o?.title})}),e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:220",className:"prose prose-invert prose-sm max-w-none mt-4 prose-p:text-muted-foreground prose-headings:text-white prose-strong:text-white",children:e.jsx(F,{"data-loc":"client/src/pages/Reports.tsx:221",children:o?.content||""})})]})}),e.jsx(h,{"data-loc":"client/src/pages/Reports.tsx:227",open:l!==null,onOpenChange:()=>r(null),children:e.jsxs(f,{"data-loc":"client/src/pages/Reports.tsx:228",className:"bg-[#0a0a0a] border-border text-white max-w-sm rounded-xl",children:[e.jsx(R,{"data-loc":"client/src/pages/Reports.tsx:229",children:e.jsx(j,{"data-loc":"client/src/pages/Reports.tsx:230",children:"Delete Report?"})}),e.jsx("p",{"data-loc":"client/src/pages/Reports.tsx:232",className:"text-muted-foreground text-sm",children:"This action cannot be undone and the report will be permanently lost."}),e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:233",className:"flex justify-end gap-3 mt-4",children:[e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:234",variant:"outline",onClick:()=>r(null),className:"border-white/20 text-muted-foreground hover:bg-accent/50",children:"Cancel"}),e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:237",onClick:()=>l&&C.mutate({reportId:l}),className:"bg-boxing-red hover:bg-boxing-red/90 text-white font-bold",children:"Delete"})]})]})})]})}):e.jsx(u,{"data-loc":"client/src/pages/Reports.tsx:56",children:e.jsx("div",{"data-loc":"client/src/pages/Reports.tsx:57",className:"w-full bg-[#0a0a0a] min-h-screen min-h-dvh flex items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Reports.tsx:58",className:"text-center max-w-md px-6",children:[e.jsx(d,{"data-loc":"client/src/pages/Reports.tsx:59",className:"w-12 h-12 text-boxing-red mx-auto mb-4"}),e.jsx("h2",{"data-loc":"client/src/pages/Reports.tsx:60",className:"text-2xl font-bold text-foreground mb-2",children:"Free Sign Up Required"}),e.jsx("p",{"data-loc":"client/src/pages/Reports.tsx:61",className:"text-muted-foreground mb-6",children:"Create a free account to access AI reports and all features. Founding members get full access."}),e.jsx(t,{"data-loc":"client/src/pages/Reports.tsx:62",onClick:()=>window.location.href="/api/oauth/login",className:"bg-boxing-red hover:bg-boxing-red/90 text-white font-bold",children:"Sign Up Free"})]})})})}export{ie 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.