1import{u as C,t as o,b as d,j as e,B as r,g as A,d as g,e as j,E as M,L as p,Z as F,f as R}from"./index-CAgTsS9I.js";import{L as f,H as B}from"./Layout-D_oP4nSj.js";import{u as E}from"./useSEO-8BDs2_0i.js";import{B as x}from"./badge-Dfqv_Hz3.js";import{U as b}from"./user-Bzsp7ULD.js";import{C as N}from"./circle-check-DfwU2bne.js";import{C as L}from"./credit-card-DtBd85lo.js";import{C as U}from"./calendar-vhbxlSut.js";import{R as v}from"./refresh-cw-2PnpROlW.js";import{S as z}from"./settings-Dqu1Zn_r.js";import{C as I}from"./circle-x-j8nVuR48.js";import{S as O}from"./shield-check-BgNs-s5f.js";import"./check-DXYeM_Sd.js";import"./trash-2-B8kvyBWw.js";import"./mail-SHgAPKVI.js";import"./dialog-70VskD_D.js";import"./index-CSdx2VRY.js";import"./search-CkMXx1d0.js";import"./arrow-left-BuPJNO5W.js";import"./camera-DxANKcNo.js";import"./house-CVZTxZpZ.js";function w(a){return a?new Date(a).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}):"â"}function ce(){E({title:"My Profile",canonical:"/profile",noindex:!0});const{user:a,isAuthenticated:n,loading:y}=C(),{data:h}=o.favorites.myFighters.useQuery(void 0,{enabled:n}),{data:u}=o.alerts.myAlerts.useQuery(void 0,{enabled:n}),{data:t,refetch:k}=o.premium.subscriptionStatus.useQuery(void 0,{enabled:n}),i=o.premium.billingPortal.useMutation({onSuccess:s=>{d.info("Opening billing portal..."),window.open(s.url,"_blank")},onError:s=>{d.error("Could not open billing portal",{description:s.message})}}),l=o.premium.switchPlan.useMutation({onSuccess:()=>{d.success("Plan switched successfully!"),k()},onError:s=>{d.error("Could not switch plan",{description:s.message})}});if(y)return e.jsxs(f,{"data-loc":"client/src/pages/Profile.tsx:51",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:52",className:"relative w-full overflow-hidden bg-black min-h-[340px]",children:e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:53",className:"w-full px-4 sm:px-6 md:px-10 lg:px-16 py-12 animate-pulse",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:54",className:"h-8 bg-card/60 rounded w-1/3 mb-8"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:55",className:"h-32 bg-card/40 rounded-xl mb-4"})]})}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:58",className:"w-full bg-[#0a0a0a] min-h-screen min-h-dvh"})]});if(!n)return e.jsx(f,{"data-loc":"client/src/pages/Profile.tsx:65",children:e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:66",className:"relative w-full overflow-hidden bg-black min-h-[60vh] flex items-center justify-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:67",className:"absolute inset-0 pointer-events-none",children:e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:68",className:"absolute top-1/4 left-1/4 w-96 h-96 bg-boxing-red/8 rounded-full blur-[200px]"})}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:70",className:"relative z-10 w-full px-4 sm:px-6 md:px-10 lg:px-16 py-8 sm:py-16 text-center",children:[e.jsx(b,{"data-loc":"client/src/pages/Profile.tsx:71",className:"h-16 w-16 text-boxing-red/30 mx-auto mb-4"}),e.jsx("h2",{"data-loc":"client/src/pages/Profile.tsx:72",className:"font-heading text-2xl mb-4",children:"Free Sign Up Required"}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:73",className:"text-muted-foreground mb-6",children:"Create a free account to access your profile, favorites, and alerts."}),e.jsx(r,{"data-loc":"client/src/pages/Profile.tsx:74",onClick:()=>{window.location.href=A()},className:"bg-boxing-red hover:bg-boxing-red/90 text-white font-bold uppercase tracking-wider",children:"Sign Up Free"})]})]})});const m=a?.isPremium===!0,S=t?.plan==="annual"?"Annual":"Monthly",P=t?.active,c=t?.cancelAtPeriodEnd;return e.jsxs(f,{"data-loc":"client/src/pages/Profile.tsx:92",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:94",className:"relative w-full overflow-hidden bg-black min-h-[340px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:95",className:"absolute inset-0 pointer-events-none",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:96",className:"absolute top-0 left-1/4 w-96 h-96 bg-boxing-red/8 rounded-full blur-[200px]"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:97",className:"absolute top-0 right-1/3 w-64 h-64 bg-boxing-gold/5 rounded-full blur-[150px]"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:98",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/Profile.tsx:101",className:"relative z-10 w-full px-4 sm:px-6 md:px-10 lg:px-16 py-12 md:py-16",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:102",className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:103",className:"w-1.5 h-10 bg-gradient-to-b from-boxing-red to-boxing-red-dark rounded-full shadow-[0_0_10px_rgba(220,38,38,0.5)]"}),e.jsxs("h1",{"data-loc":"client/src/pages/Profile.tsx:104",className:"font-heading text-4xl md:text-5xl tracking-wide",children:["MY ",e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:105",className:"text-boxing-red",children:"PROFILE"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:110",className:"bg-card/30 border border-border rounded-xl backdrop-blur-sm p-6 flex items-center gap-4 max-w-3xl",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:111",className:"w-16 h-16 rounded-full bg-boxing-red/10 border border-boxing-red/20 flex items-center justify-center shrink-0",children:e.jsx(b,{"data-loc":"client/src/pages/Profile.tsx:112",className:"h-8 w-8 text-boxing-red"})}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:114",className:"flex-1 min-w-0",children:[e.jsx("h2",{"data-loc":"client/src/pages/Profile.tsx:115",className:"font-heading text-xl truncate",children:a?.name||"Boxing Fan"}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:116",className:"text-sm text-muted-foreground truncate",children:a?.email}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:117",className:"flex flex-wrap items-center gap-2 mt-2",children:[e.jsx(x,{"data-loc":"client/src/pages/Profile.tsx:118",variant:"outline",className:"border-border bg-card/40 text-xs capitalize",children:a?.role}),m?e.jsxs(x,{"data-loc":"client/src/pages/Profile.tsx:120",className:"bg-amber-500/20 text-amber-400 border border-amber-500/30 text-xs",children:[e.jsx(g,{"data-loc":"client/src/pages/Profile.tsx:121",className:"h-3 w-3 mr-1"})," Pro Member"]}):e.jsxs(x,{"data-loc":"client/src/pages/Profile.tsx:124",className:"bg-green-500/20 text-green-400 border border-green-500/30 text-xs",children:[e.jsx(N,{"data-loc":"client/src/pages/Profile.tsx:125",className:"h-3 w-3 mr-1"})," Free Member"]})]})]})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:135",className:"w-full bg-[#0a0a0a] min-h-screen min-h-dvh",children:e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:136",className:"w-full px-4 sm:px-6 md:px-10 lg:px-16 py-10",children:e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:137",className:"max-w-3xl mx-auto
1space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:140",className:"bg-card/30 border border-border rounded-xl backdrop-blur-sm overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:141",className:"flex items-center gap-2 px-6 pt-6 pb-4 border-b border-border/50",children:[e.jsx(L,{"data-loc":"client/src/pages/Profile.tsx:142",className:"h-5 w-5 text-boxing-gold"}),e.jsx("h3",{"data-loc":"client/src/pages/Profile.tsx:143",className:"font-heading text-lg",children:"Subscription"})]}),m&&P?e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:147",className:"p-6 space-y-5",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:149",className:`rounded-lg p-4 border ${c?"bg-amber-500/5 border-amber-500/20":"bg-amber-500/8 border-amber-500/20"}`,children:e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:150",className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:151",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:152",className:"flex items-center gap-2 mb-1",children:[e.jsx(g,{"data-loc":"client/src/pages/Profile.tsx:153",className:"h-5 w-5 text-amber-400"}),e.jsxs("span",{"data-loc":"client/src/pages/Profile.tsx:154",className:"font-heading text-base text-amber-300",children:["British Boxers Pro â ",S]})]}),c?e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:157",className:"text-sm text-amber-400/80 flex items-center gap-1.5",children:[e.jsx(j,{"data-loc":"client/src/pages/Profile.tsx:158",className:"h-4 w-4 shrink-0"}),"Cancels on ",w(t?.expiresAt)," â you keep Pro access until then"]}):e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:162",className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[e.jsx(U,{"data-loc":"client/src/pages/Profile.tsx:163",className:"h-4 w-4 shrink-0"}),"Renews ",w(t?.expiresAt)]})]}),e.jsx(x,{"data-loc":"client/src/pages/Profile.tsx:168",className:`shrink-0 text-xs ${c?"bg-amber-500/20 text-amber-400 border-amber-500/30":"bg-green-500/20 text-green-400 border-green-500/30"} border`,children:c?"Cancelling":"Active"})]})}),!c&&e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:176",className:"flex flex-wrap gap-3",children:t?.plan==="monthly"?e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:178",variant:"outline",size:"sm",className:"border-amber-500/30 text-amber-400 hover:bg-amber-500/10",onClick:()=>l.mutate({newPlanKey:"annual"}),disabled:l.isPending,children:[e.jsx(v,{"data-loc":"client/src/pages/Profile.tsx:185",className:"h-3.5 w-3.5 mr-1.5"}),l.isPending?"Switching...":"Switch to Annual (Save 33%)"]}):e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:189",variant:"outline",size:"sm",className:"border-border text-muted-foreground hover:bg-accent/50",onClick:()=>l.mutate({newPlanKey:"monthly"}),disabled:l.isPending,children:[e.jsx(v,{"data-loc":"client/src/pages/Profile.tsx:196",className:"h-3.5 w-3.5 mr-1.5"}),l.isPending?"Switching...":"Switch to Monthly"]})}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:204",className:"border-t border-border/50 pt-4 space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:205",className:"text-xs text-muted-foreground",children:"Manage your subscription, update your payment method, download invoices, or cancel â all through the secure Stripe billing portal."}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:208",className:"flex flex-wrap gap-3",children:[e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:209",onClick:()=>i.mutate(),disabled:i.isPending,className:"bg-amber-500 hover:bg-amber-400 text-black font-bold text-sm",children:[e.jsx(z,{"data-loc":"client/src/pages/Profile.tsx:214",className:"h-4 w-4 mr-2"}),i.isPending?"Opening...":"Manage Subscription",e.jsx(M,{"data-loc":"client/src/pages/Profile.tsx:216",className:"h-3.5 w-3.5 ml-2 opacity-70"})]}),!c&&e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:219",variant:"outline",onClick:()=>i.mutate(),disabled:i.isPending,className:"border-red-500/30 text-red-400 hover:bg-red-500/10 text-sm",children:[e.jsx(I,{"data-loc":"client/src/pages/Profile.tsx:225",className:"h-4 w-4 mr-2"}),"Cancel Subscription"]})]}),e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:230",className:"text-[11px] text-muted-foreground
1/60 flex items-center gap-1",children:[e.jsx(O,{"data-loc":"client/src/pages/Profile.tsx:231",className:"h-3 w-3"}),"Secured by Stripe â your payment details are never stored on our servers"]})]})]}):m&&!P?e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:238",className:"p-6 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:239",className:"bg-red-500/5 border border-red-500/20 rounded-lg p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:240",className:"flex items-center gap-2 mb-1",children:[e.jsx(j,{"data-loc":"client/src/pages/Profile.tsx:241",className:"h-5 w-5 text-red-400"}),e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:242",className:"font-heading text-base text-red-300",children:"Subscription Inactive"})]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:244",className:"text-sm text-muted-foreground",children:"Your Pro subscription has ended. Reactivate to restore full access."})]}),e.jsx(p,{"data-loc":"client/src/pages/Profile.tsx:246",href:"/premium",children:e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:247",className:"bg-boxing-red hover:bg-boxing-red/90 text-white font-bold",children:[e.jsx(F,{"data-loc":"client/src/pages/Profile.tsx:248",className:"h-4 w-4 mr-2"}),"Reactivate Pro"]})})]}):e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:255",className:"p-6 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:256",className:"bg-card/40 border border-border/60 rounded-lg p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:257",className:"flex items-center gap-2 mb-2",children:[e.jsx(N,{"data-loc":"client/src/pages/Profile.tsx:258",className:"h-5 w-5 text-green-400"}),e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:259",className:"font-heading text-base",children:"Free Member"})]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:261",className:"text-muted-foreground text-sm",children:"You have free access to news, fighter profiles, schedules, and 10 AI chat messages per week."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:265",className:"bg-gradient-to-r from-amber-500/8 to-transparent border border-amber-500/15 rounded-lg p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:266",className:"text-sm text-amber-300 font-medium mb-1",children:"Unlock everything for £4.99/month"}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:267",className:"text-xs text-muted-foreground mb-3",children:"Unlimited AI Chat, Fight Night live, Forum, Compare Tool, Academy, My Hub, and all future updates."}),e.jsx(p,{"data-loc":"client/src/pages/Profile.tsx:268",href:"/premium",children:e.jsxs(r,{"data-loc":"client/src/pages/Profile.tsx:269",size:"sm",className:"bg-gradient-to-r from-amber-500 to-yellow-600 hover:from-amber-400 hover:to-yellow-500 text-black font-bold",children:[e.jsx(g,{"data-loc":"client/src/pages/Profile.tsx:270",className:"h-4 w-4 mr-2"}),"Upgrade to Pro"]})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:280",className:"bg-card/30 border border-border rounded-xl backdrop-blur-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:281",className:"flex items-center gap-2 mb-4",children:[e.jsx(B,{"data-loc":"client/src/pages/Profile.tsx:282",className:"h-5 w-5 text-boxing-red"}),e.jsx("h3",{"data-loc":"client/src/pages/Profile.tsx:283",className:"font-heading text-lg",children:"Favorite Fighters"})]}),(h||[]).length>0?e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:286",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:h.map(s=>e.jsx(p,{"data-loc":"client/src/pages/Profile.tsx:288",href:`/fighters/${s.fighterSlug}`,children:e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:289",className:"flex items-center gap-3 p-3 rounded-lg bg-card/40 border border-border hover:border-boxing-red/20 hover:bg-card/60 transition-all cursor-pointer",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:290",className:"w-10 h-10 rounded-full bg-boxing-red/10 border border-boxing-red/20 flex items-center justify-center",children:e.jsx(b,{"data-loc":"client/src/pages/Profile.tsx:291",className:"h-5 w-5 text-boxing-red"})}),e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:293",className:"font-heading text-sm",children:s.fighterName})]})},s.fighterId))}):e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:299",className:"text-sm text-muted-foreground",children:"No favorite fighters yet. Visit the Fighters page to add some!"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:306",className:"bg-card/30 border border-border rounded-xl backdrop-blur-sm p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:307",className:"flex items-center gap-2 mb-4",children:[e.jsx(R,{"data-loc":"client/src/pages/Profile.tsx:308",className:"h-5 w-5 text-boxing-red"}),e.jsx("h3",{"data-loc":"client/src/pages/Profile.tsx:309",className:"font-heading text-lg",children:"Recent Alerts"})]}),(u||[]).length>0?e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:312",className:"space-y-3",children:u.slice(0,10).map(s=>e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:314",className:`p-3 rounded-lg border ${s.isRead?"bg-card/30 border-border":"bg-boxing-red/5 border-boxing-red/15"}`,children:[e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:315",className:"text-sm font-medium",children:s.title}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:316",className:"text-xs text-muted-foreground",children:s.message})]},s.id))}):e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:321",className:"text-sm text-muted-foreground",children:"No alerts yet. You'll be notified about breaking news and fight updates."})]})]})})})]})}export{ce 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.