1import{u as e,a as s,j as a}from"./query-vendor-DZMRrbMU.js";import{b as t,H as r,I as l,Z as n,L as o,c as i,aK as m,e as c,aL as d,aM as u}from"./index-Ww_mg2y_.js";import{c as x}from"./ebay-affiliate-oIbpUDbb.js";import{E as p}from"./EbayAffiliateDisclosure-9DG4t62q.js";import{u as h}from"./useMergePlayKey-C5CYwFiM.js";import{q as y,C as g,X as j}from"./icon-vendor-BVA9AJ-N.js";import"./ui-vendor-BNlO3lKu.js";import"./firebase-vendor-CX_xv3XA.js";import"./form-vendor-BbpM4sBQ.js";import"./date-vendor-CXQvy03X.js";const f="https://www.hobbymonitor.com/games/bowmystery";function v(){h();const{toast:v}=t(),{data:b,isLoading:N}=e({queryKey:["games","bowmystery","today"],queryFn:u,staleTime:0}),[w,G]=s.useState(null),k=w??b??null,[C,S]=s.useState([]),[_,B]=s.useState(""),[I,A]=s.useState([]),[E,P]=s.useState(!1),T=s.useRef(null);s.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);const $=k?Math.max(0,k.totalClues-k.clues.length):0;return a.jsxs("div",{className:"container mx-auto max-w-lg px-4 py-6",children:[a.jsxs(r,{children:[a.jsx("title",{children:"Bowmystery â Daily Prospect Guessing Game | HobbyMonitor"}),a.jsx("meta",{name:"description",content:"Guess the mystery baseball prospect in six tries. Daily clues reveal age, stats, Bowman card details, team and rank. New prospect every day."}),a.jsx("meta",{property:"og:title",content:"Bowmystery â Daily Prospect Guessing Game"}),a.jsx("meta",{property:"og:image",content:"https://api.hobbymonitor.com/v3/games/og/bowmystery.png"}),a.jsx("meta",{property:"og:url",content:f}),a.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),a.jsx("link",{rel:"canonical",href:f}),a.jsx("script",{type:"application/ld+json",nonce:window.__CSP_NONCE__,children:JSON.stringify({"@context":"https://schema.org","@type":"Game",name:"Bowmystery",url:f,genre:"Guessing",gamePlatform:"Web"})})]}),a.jsx("h1",{className:"text-2xl font-bold mb-1",children:"Bowmystery"}),a.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Guess the daily prospect in ",(null==k?void 0:k.maxGuesses)??6," tries."]}),N&&!k?a.jsx("div",{className:"flex justify-center py-16",children:a.jsx(y,{className:"h-8 w-8 animate-spin text-primary"})}):k?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"text-xs text-muted-foreground mb-2",children:["Guess ",Math.min(k.guessCount+(k.done?0:1),k.maxGuesses)," of ",k.maxGuesses]}),a.jsxs("div",{className:"space-y-2 mb-4",children:[k.clues.map(e=>a.jsxs("div",{className:"rounded-md border p-3",children:[a.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:e.label}),a.jsx("div",{className:"text-sm font-medium",children:e.value})]},e.key)),Array.from({length:$}).map((e,s)=>a.jsx("div",{className:"rounded-md border border-dashed p-3 opacity-50",children:a.jsx("div",{className:"text-sm font-medium",children:"Next clue unlocks with a guess"})},`locked-${s}`))]}),C.length>0&&a.jsx("ul",{className:"space-y-1 mb-4",children:C.map((e,s)=>a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[e.correct?a.jsx(g,{className:"h-4 w-4 text-green-600"}):a.jsx(j,{className:"h-4 w-4 text-red-500"}),a.jsx("span",{className:e.correct?"font-medium":"text-muted-foreground",children:e.name})]},s))}),k.done?a.jsxs("div",{className:"rounded-lg border p-4 text-center",children:[k.reveal&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"font-bold text-lg",children:k.reveal.fullName}),a.jsxs("div",{className:"flex items-center justify-center gap-4 my-3",children:[k.reveal.playerId&&a.jsx(n,{playerId:k.reveal.playerId,fullName:k.reveal.fullName,headshotStatus:k.reveal.headshotStatus,teamAbbrev:k.reveal.teamAbbrev,size:96}),k.reveal.cardImage&&"skip"!==k.reveal.cardImage&&a.jsx("img",{src:`/api/images/200/85${k.reveal.cardImage}`,alt:`${k.reveal.fullName} first Bowman card`,className:"h-48 object-contain bg-white"})]}),a.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-1.5",children:[a.jsx(o,{href:k.reveal.prospectPath,children:a.jsx(i,{variant:"outline",className:"min-h-[44px]",children:"View prospect page â"})}),a.jsx(i,{variant:"outline",className:"min-h-[44px]",asChild:!0,children:a.jsxs("a",{href:x(`${k.reveal.fullName} bowman 1st auto`),target:"_blank",rel:"noopener noreferrer sponsored",children:["Shop ",k.reveal.fullName.split(" ").slice(-1)[0]," cards â"]})})]}),a.jsx(p,{className:"mb-3"})]}),a.jsx("p",{className:"mb-3 text-sm",children:k.solved?`Solved
1in ${k.guessCount}!`:"Out of guesses. Back tomorrow."}),a.jsx(i,{onClick:function(){(null==k?void 0:k.share)&&(navigator.share?navigator.share({text:k.share.replace(/\nbowmystery\.com$/,""),url:"https://bowmystery.com"}).catch(()=>{}):(navigator.clipboard.writeText(k.share),v({title:"Result copied"})))},className:"min-h-[44px] w-full",children:"Share result"})]}):a.jsxs("div",{className:"relative",children:[a.jsx(l,{value:_,onChange:e=>{return s=e.target.value,B(s),T.current&&clearTimeout(T.current),void(s.trim().length<2?A([]):T.current=setTimeout(async()=>{try{A(await m(s))}catch{}},200));var s},placeholder:"Guess a prospectâ¦",disabled:E,className:"min-h-[44px]","aria-label":"Guess a prospect"}),I.length>0&&a.jsx("ul",{className:"absolute z-10 mt-1 w-full rounded-md border bg-popover shadow-md max-h-64 overflow-y-auto",children:I.map(e=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>async function(e){if(k&&!E&&!k.done){P(!0),c.trackEvent("bowmystery_guess",{guessNumber:(k.guessCount??0)+1});try{const s=await d(e.id);G(s),S(a=>[...a,{name:e.fullName,correct:!!s.correct}
1]),B(""),A([]),s.solved&&c.trackEvent("bowmystery_solved",{guesses:s.guessCount})}catch{v({title:"Could not submit that guess",description:"Try again in a moment."})}finally{P(!1)}}}(e),disabled:E,className:"flex w-full items-center justify-between px-3 py-2 min-h-[44px] text-left text-sm hover:bg-accent",children:[a.jsx("span",{children:e.fullName}),e.teamAbbrev?a.jsx("span",{className:"text-xs uppercase text-muted-foreground",children:e.teamAbbrev}):null]})},e.id))})]})]}):null]})}export{v 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.