1import{e as $,g as E,h as P,B as R,d as A}from"./titleWidth-nrIWrjTv.js";import{j as e}from"./ssrQuery-DR6vMgnT.js";import{u as y,b as I,T as N}from"./i18n-CrKOKrzr.js";import{L as U}from"./router-B5hQUFv_.js";import{T as k}from"./NotFoundPage-D4iCxJar.js";import{T as z}from"./useTeam-DjmYFpJE.js";import{S as M,I as w}from"./eventIndexability-b4h1HjUb.js";import"./SportBackdrop-DxiKhW0M.js";import"./notComparedHint-D_pwh3xg.js";import"./buildSportsbookSnippets-hNkWmRgt.js";import{j as C,k as K}from"./icons-DtsrsVVp.js";const q={"welcome-bonus":"Welcome Bonus","no-sweat-bet":"No Sweat Bet","deposit-match":"Deposit Match","free-bet":"Free Bet","profit-boost":"Profit Boost","risk-free-bet":"Risk-Free Bet","odds-boost":"Odds Boost","parlay-insurance":"Parlay Insurance",referral:"Referral Bonus",other:"Bonus Offer"};function D(t){if(t!=null&&t.length)return t.find(s=>s.isCurrent)??[...t].sort((s,n)=>(n.version??0)-(s.version??0))[0]}function W(t){if(t!=null&&t.length)return[...t].sort((s,n)=>s.isFeatured!==n.isFeatured?s.isFeatured?-1:1:(s.displayOrder??0)-(n.displayOrder??0))[0]}function _(t){if(t!=null&&t.title)return{title:q[t.offerType]??"Bonus Offer",description:t.title,details:t.description??void 0,promoCode:t.promoCode??void 0}}function G(t){var i;const s=D(t.reviews),n=(s==null?void 0:s.rating)!=null?Number(s.rating):void 0,a=t.offers??[],l=_(W(a));return{slug:t.slug,name:t.name,rating:Number.isFinite(n)?n:void 0,logoUrl:P((i=t.logo)==null?void 0:i.url)??void 0,primaryColor:t.primaryColor||void 0,websiteUrl:t.websiteUrl||void 0,reviewPath:s?`/sportsbooks/${t.slug}`:void 0,bonus:l?{...l,moreCount:Math.max(0,a.length-1)}:void 0}}const V={reviews:{fields:["rating","isCurrent","version","isActive"]},offers:{fields:["title","description","offerType","promoCode","isFeatured","displayOrder","isActive"]},logo:{fields:["url"]}};function ie(){return $({queryKey:["sportsbook-card-info"],staleTime:1e3*60*60,queryFn:async()=>{const t=await E.find("sportsbooks",{filters:{isActive:!0},fields:["slug","name","primaryColor","websiteUrl"],pagination:{pageSize:100},populate:V}),s={};for(const n of t.data){if(!n.slug)continue;const a=G(n);s[n.slug]=a,n.name&&(s[n.name.toLowerCase()]=a)}return s}})}function le(t,s){if(!(!t||!s))return t[s]??t[s.toLowerCase()]}const oe=({books:t,typicalMargin:s,reviewPathOf:n,footnote:a,headingAs:l="h3"})=>{const{t:i}=y("bets");if(t.length===0)return null;const o=s!=null&&s>0?s:null,x=Math.max(o??0,...t.map(r=>r.medianMargin))*1.15||1,m=r=>`${Math.max(0,Math.min(100,r/x*100))}%`,u=r=>r.toLocaleString(A(),{maximumFractionDigits:2}),h=r=>i(r==="exchange"?"marketQuality.kindExchange":r==="prediction-market"?"marketQuality.kindPredictionMarket":"marketQuality.kindSportsbook"),c=Math.max(...t.map(r=>r.games)),f=e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{children:i("marketQuality.tip")}),e.jsx("p",{children:i("marketQuality.basis",{count:c})}),a&&e.jsx("p",{children:a})]});return e.jsxs("div",{className:"rounded-xl border border-white/10 px-4 py-4 sm:px-5 h-full flex flex-col min-w-0",children:[e.jsxs("div",{className:"flex justify-between items-center gap-3 mb-3",children:[e.jsx(l,{className:"text-base font-bold text-textMain",children:i("marketQuality.title")}),e.jsx(k,{content:f,label:i("marketQuality.helpLabel"),width:"w-max max-w-72",triggerClassName:"inline-flex cursor-help text-textMuted hover:text-textMain",children:e.jsx(K,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]}),o!==null&&e.jsxs("ul",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-textMuted mb-2",children:[e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block h-2 w-3 rounded-r bg-primary"}),i("marketQuality.legendMargin")]}),e.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-block h-3 w-0.5 rounded-full bg-secondary"}),i("marketQuality.legendTypicalValue",{value:u(o)})]})]}),e.jsx("ul",{className:"flex-1 divide-y divide-white/[0.06]",children:t.map(r=>{const d=n==null?void 0:n(r.book.slug),b=h(r.book.kind),p=i("marketQuality.margin",{value:u(r.medianMargin)});return e.jsxs("li",{className:"py-2.5 first:pt-1 last:pb-0",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 text-xs",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2 truncate",children:[e.jsx("span",{"aria-hidden":"true",className:"inline-flex",children:e.jsx(R,{name:r.book.name,size:18})}),d?e.jsx(U,{to:d,className:"font-semibold text-textMain hover:text-primary transition-colors",children:r.book.name}):e.jsx("span",{className:"font-semibold text-textMain",children:r.book.name}),e.jsx("span",{className:"ml-1 shrink-0 text-[10px] text-textSubtle",children:b})]}),e.jsx("span",{className:"shrink-0 tabular-nums",children:e.jsx("span",{className:"font-bold text-textMain",children:p})})]}),e.jsxs("div",{role:"img","aria-label":`${r.book.name}: ${p}`,className:"relative mt-1.5 h-2 rounded-sm bg-white/[0.06]",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r bg-primary",style:{width:m(r.medianMargin)}}),o!==null&&e.jsx("div",{className:"absolute -inset-y-1 w-0.5 -translate-x-1/2 roun
1ded-full bg-secondary",style:{left:m(o),boxShadow:"0 0 0 2px rgb(var(--mark-halo, var(--page)))"}})]})]},r.book.slug)})})]})},ce=({data:t,homeTeam:s,awayTeam:n,homeLogoUrl:a,awayLogoUrl:l,homeSub:i,awaySub:o,subTip:x,tip:m,headerExtra:u,children:h})=>{const{t:c}=y("bets"),{home:f,away:r,favored:d,margin:b,unit:p,confidence:S}=t,v=b||1,L=c(`expectedScore.${p}`,{count:v}),F=[{team:s,logo:a,score:f,sub:i,scoreClass:"text-primary"},{team:n,logo:l,score:r,sub:o,scoreClass:"text-textMain"}];return e.jsx(M,{icon:C,title:c("expectedScore.title"),headerRight:e.jsxs(e.Fragment,{children:[u,e.jsx(w,{text:m??c("expectedScore.tip")})]}),children:e.jsxs("div",{className:"flex flex-col flex-1 justify-center",children:[e.jsx("div",{className:"flex items-center justify-center gap-2 bg-background border border-border rounded-lg px-3 py-3 mb-4",children:F.map(({team:g,logo:B,score:T,sub:j,scoreClass:O},Q)=>e.jsxs(I.Fragment,{children:[Q===1&&e.jsx("span",{className:"text-2xl font-light text-textMuted shrink-0",children:"â"}),e.jsxs("div",{className:"flex flex-col items-center flex-1 min-w-0",children:[e.jsx(z,{name:g,url:B,className:"w-7 h-7",fallbackSize:"sm"}),e.jsx("span",{className:"text-xs font-bold text-textMuted uppercase tracking-wider text-center leading-tight line-clamp-2 mt-1.5",children:g}),e.jsx("span",{className:`text-4xl font-black tracking-tighter tabular-nums mt-0.5 ${O}`,children:T}),j&&(x?e.jsx(k,{content:x,width:"w-max max-w-56",children:e.jsx("span",{className:"text-[10px] font-semibold text-textMuted tabular-nums mt-0.5 cursor-help",children:j})}):e.jsx("span",{className:"text-[10px] font-semibold text-textMuted tabular-nums mt-0.5",children:j}))]})]},g))}),e.jsx("div",{className:"text-center text-xs text-textMain leading-relaxed px-4",children:d==="even"?e.jsxs(N,{i18nKey:"expectedScore.evenLine",ns:"bets",children:["Market expects a ",e.jsx("span",{className:"font-bold text-textMain",children:"tight, even contest"})]}):e.jsxs(N,{i18nKey:"expectedScore.favoredLine",ns:"bets",values:{team:d==="home"?s:n,amount:`${v} ${L}`},children:["Market expects ",e.jsx("span",{className:"font-bold text-textMain",children:"{{team}}"})," by ",e.jsx("span",{className:"font-bold text-primary",children:"{{amount}}"})]})}),h,S==="estimate"&&e.jsx("div",{className:"mt-4 flex items-center justify-center text-[9px]",children:e.jsx("span",{className:"font-bold text-yellow-500/90 bg-yellow-500/10 px-1.5 py-0.5 rounded uppercase tracking-wide",children:c("expectedScore.estimate")})})]})})},de=({data:t})=>{var n;const{t:s}=y("bets");return e.jsx(M,{icon:C,title:s("expectedOutcome.title"),headerRight:e.jsx(w,{text:s("expectedOutcome.tip")}),children:t?t.kind==="method"?e.jsxs("div",{className:"flex flex-col flex-1 justify-center",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center bg-background border border-border rounded-lg px-3 py-3 mb-3",children:[e.jsx("span",{className:"text-xs font-bold text-textMuted uppercase tracking-wider text-center leading-tight",children:t.topMethod??t.topLabel}),t.topFighter&&e.jsx("span",{className:"text-3xl font-black tracking-tight text-primary mt-0.5 text-center",children:t.topFighter})]}),t.topPct!=null&&e.jsx("div",{className:"text-center text-xs text-textMuted mb-4",children:s("expectedOutcome.mostLikely",{pct:t.topPct})}),e.jsx("div",{className:"text-[10px] font-bold text-textMuted uppercase tracking-wider mb-2",children:s("expectedOutcome.methodBreakdown")}),e.jsx("div",{className:"space-y-3.5",children:(n=t.methods)==null?void 0:n.map(a=>{const l=a.label===(t.topMethod??"");return e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-baseline text-sm mb-1.5",children:[e.jsx("span",{className:`font-bold ${l?"text-primary":"text-textMain"}`,children:a.label}),e.jsxs("span",{className:`font-mono font-black tabular-nums ${l?"text-primary":"text-textMuted"}`,children:[a.pct,"%"]})]}),e.jsx("div",{className:"w-full bg-secondary/10 h-2 rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full ${l?"bg-primary":"bg-textMuted/50"}`,style:{width:`${Math.min(100,a.pct)}%`}})})]},a.label)})})]}):e.jsxs("div",{className:"flex flex-col flex-1 justify-center",children:[e.jsx("div",{className:"text-center text-base font-bold text-textMain leading-relaxed px-2 mb-4",children:t.summary}),t.overPct!=null&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"font-bold text-primary",children:s("expectedOutcome.over",{line:t.roundsLine,pct:t.overPct})}),e.jsx("span",{className:"font-bold text-textMain",children:s("expectedOutcome.under",{pct:100-t.overPct})})]}),e.jsx("div",{className:"w-full bg-secondary/10 h-2 rounded-full overflow-hidden",children:e.jsx("div",{className:"bg-primary h-full",style:{width:`${t.overPct}%`}})})]})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center py-4",children:[e.jsx("p",{className:"text-xs font-semibold text-textMain/70",children:s("expectedOutcome.noMarketsTitle")}),e.jsx("p",{className:"text-[10px] text-textMuted mt-1 max-w-[12rem]",children:s("expectedOutcome.noMarketsBody")})]})})};export{ce as E,oe as M,de as a,le as r,ie as u};
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.