1import{o as e,H as t,q as s,D as a,v as r,w as l,R as n,e as o,x as i,T as c,y as d,z as m,F as u,G as x,J as h,K as p,I as g,B as b,M as f,N as j,O as y,Q as v,S as w,U as N,V as k,W as C,X as S,Y as $,Z as R,j as O,$ as T,C as D,b as B,a0 as M,a1 as P,u as A,a as L,a2 as I,a3 as _,E as U,a4 as E}from"./index-I0rfwnEW.js";import{a as F,j as z,u as H}from"./query-vendor-oX4S9fKB.js";import{E as V,a as W}from"./ebay-smart-placements-DhmFFIiv.js";import{B as q}from"./breadcrumbs-B5b4OIgq.js";import{O as G}from"./optimized-image-CiUIPmsv.js";import{E as Q}from"./EbayLinkButton-CO4pdTYy.js";import{u as Y}from"./use-debounce-Dppdem_L.js";import{a1 as J,a2 as Z,a3 as K}from"./ui-vendor-DMIqSPrK.js";import{T as X,a as ee,b as te,c as se}from"./tooltip-EVI4uI8T.js";import{B as ae}from"./badge-Td4mzEzu.js";import{r as re,v as le,X as ne,n as oe,A as ie,G as ce,m as de,p as me,w as ue,x as xe,b as he,Z as pe,i as ge,h as be}from"./icon-vendor-oFTUSuKF.js";import{b as fe}from"./form-vendor-CujXulA7.js";import{T as je}from"./textarea-GM_F-DBk.js";import{S as ye}from"./skeleton-Chifzod1.js";import{A as ve}from"./AdManager-a1FJR3wn.js";import"./firebase-vendor-CX_xv3XA.js";import"./useSubscriptionStatus-DRl3JL4b.js";const we=e=>e?new Date(e):null,Ne=e=>e?new Date(e):null,ke=e=>new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"});function Ce({release:m,imageError:u,onImageError:x}){var h,p,g,b,f,j;const y=(t=>{var s;const a={Baseball:"baseball cards, rookie cards, autographs, parallels, MLB cards",Basketball:"basketball cards, NBA cards, rookie cards, autographs, parallels",Football:"football cards, NFL cards, rookie cards, autographs, parallels",Hockey:"hockey cards, NHL cards, rookie cards, autographs, parallels",Soccer:"soccer cards, football cards, MLS cards, rookie cards, autographs"}[t.sport]||"sports cards, trading cards, card collecting, hobby cards",r=we(t.releaseDate),l=(null==r?void 0:r.getFullYear())??(new Date).getFullYear();let n=t.description||`${t.title} ${t.sport} cards`;if(null==(s=t.teamChecklists)?void 0:s.length){const e=t.teamChecklists.reduce((e,t)=>{var s;return e+((null==(s=t.players)?void 0:s.length)||0)},0),s=new Set(t.teamChecklists.map(e=>e.cardType).filter(Boolean)),a=Array.from(s).join(", ");n=`Official ${t.title} complete checklist with ${e}+ cards${a?`, including ${a}`:""}. View rookies, inserts, parallels, and card values. Updated for ${l} release.`}const o=r?r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"TBD";return{title:`${t.title} - Complete ${l} ${t.sport} Cards Checklist | HobbyMonitor`,description:n,keywords:`${t.title} checklist, ${t.title} complete checklist, ${l} ${t.sport} checklist, ${t.manufacturer||"trading cards"} checklist, ${t.title} card list, rookie checklist, ${a}`,image:e(t.imageUrl),releaseDate:o,url:`https://www.hobbymonitor.com/release/${t.slug}`,type:"product"}})(m),v=(t=>{var s,a,r,l;const n=we(t.releaseDate),o=(null==n?void 0:n.getFullYear())??(new Date).getFullYear(),i={"@context":"https://schema.org","@type":"Article",headline:`${t.title} Checklist - Complete Card List and Set Information`,description:t.description||`Complete checklist and set information for ${t.title} ${t.sport} cards`,image:e(t.imageUrl),author:{"@type":"Organization",name:"HobbyMonitor"},publisher:{"@type":"Organization",name:"HobbyMonitor",logo:{"@type":"ImageObject",url:"https://www.hobbymonitor.com/logos/hobbymonitor_logo_cream_512.png"}},articleSection:`${t.sport} Card Releases`,keywords:`${t.title} checklist, ${t.title}, ${t.sport} cards checklist, ${t.manufacturer||"trading cards"} checklist, ${o} checklist, complete checklist`,mainEntityOfPage:{"@type":"WebPage","@id":`https://www.hobbymonitor.com/release/${t.slug}`}};n?(i.datePublished=n.toISOString(),i.dateModified=t.updatedAt?new Date(t.updatedAt).toISOString():n.toISOString()):t.updatedAt&&(i.dateModified=new Date(t.updatedAt).toISOString());const c={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.hobbymonitor.com"},{"@type":"ListItem",position:2,name:"Releases",item:"https://www.hobbymonitor.com/releases"},{"@type":"ListItem",position:3,name:t.title,item:`https://www.hobbymonitor.com/release/${t.slug}`}]},d={"@context":"https://schema.org","@type":"CollectionPage",name:`${t.title} Complete Checklist`,description:(null==(s=t.teamChecklists)?void 0:s.length)?`Complete ${t.title} checklist with ${t.teamChecklists.reduce((e,t)=>
1{var s;return e+((null==(s=t.players)?void 0:s.length)||0)},0)}+ cards`:`${t.title} checklist and set details`,isPartOf:{"@type":"WebSite",name:"HobbyMonitor",url:"https://www.hobbymonitor.com"},url:`https://www.hobbymonitor.com/release/${t.slug}`,breadcrumb:c};return n&&(d.datePublished=n.toISOString()),[i,c,d,{"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:`When was ${t.title} released?`,acceptedAnswer:{"@type":"Answer",text:n?`${t.title} was released on ${n.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}.`:`${t.title} has not been released yet. The release date is to be determined (TBD).`}},{"@type":"Question",name:`How many cards are in the ${t.title} set?`,acceptedAnswer:{"@type":"Answer",text:(null==(a=t.teamChecklists)?void 0:a.length)?`The ${t.title} set contains ${t.teamChecklists.reduce((e,t)=>{var s;return e+((null==(s=t.players)?void 0:s.length)||0)},0)}+ cards across various card types${(null==(r=t.cardParallels)?void 0:r.length)?" and parallels":""}.`:`The ${t.title} set details are available on HobbyMonitor including card types, variations, and checklist information.`}},{"@type":"Question",name:`What are the key rookie cards in ${t.title}
1?`,acceptedAnswer:{"@type":"Answer",text:(null==(l=t.teamChecklists)?void 0:l.some(e=>e.rookie))?`The ${t.title} set includes several rookie cards. Visit the complete checklist on HobbyMonitor to view all rookie cards and their details.`:`Visit the complete ${t.title} checklist on HobbyMonitor to view all cards including rookie cards and their details.`}}]}]})(m),[w,N]=F.useState(!1),[k,C]=F.useState(!1),S=(null==(h=m.teamChecklists)?void 0:h.length)??0,$=S>0,R=new Set((m.cardParallels??[]).flatMap(e=>e.parallels.map(e=>e.name.trim().toLowerCase()))).size||((null==(p=m.cardVariations)?void 0:p.length)??0),O=(null==(g=Ne(m.releaseDate))?void 0:g.getTime())??null,T=!!m.preorderDate&&(null===O||O>Date.now()),D=null===O||O>Date.now(),B=[m.sport,m.manufacturer].filter(Boolean).join(" · "),M=[];$&&M.push(["Cards",S.toLocaleString("en-US")]),R>0&&M.push(["Parallels",R.toLocaleString("en-US")]),M.length&&M.push(["Release",m.releaseDate?ke(m.releaseDate):"TBD"]);const P=(m.description??"").split("\n").map(e=>e.trim()).filter(Boolean),A=P[0]??"",L=A.length>280?`${A.slice(0,A.lastIndexOf(" ",280)).trim()}...`:A,I=P.length>1||A.length>280,_=[{href:"/",label:"Home"},{href:"/releases",label:"Releases"},{href:`/release/${null==m?void 0:m.slug}`,label:(null==m?void 0:m.title)||"Loading..."}];return z.jsxs(z.Fragment,{children:[z.jsxs(t,{children:[z.jsx("title",{children:y.title}),z.jsx("meta",{name:"description",content:y.description}),z.jsx("meta",{name:"keywords",content:y.keywords}),z.jsx("meta",{name:"product:release_date",content:y.releaseDate}),z.jsx("meta",{name:"product:brand",content:m.manufacturer||""}),z.jsx("meta",{name:"product:category",content:`${m.sport} Trading Cards`}),z.jsx("meta",{name:"robots",content:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"}),z.jsx("meta",{name:"googlebot",content:"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"}),z.jsx("meta",{name:"article:publisher",content:"https://www.hobbymonitor.com"}),(m.updatedAt||m.releaseDate)&&z.jsx("meta",{name:"article:modified_time",content:m.updatedAt?new Date(m.updatedAt).toISOString():(null==(b=Ne(m.releaseDate))?void 0:b.toISOString())||""}),m.releaseDate&&z.jsx("meta",{name:"article:published_time",content:(null==(f=Ne(m.releaseDate))?void 0:f.toISOString())||""}),m.sport&&z.jsx("meta",{name:"article:section",content:`${m.sport} Cards`}),z.jsx("meta",{name:"article:tag",content:`${m.title}`}),z.jsx("meta",{name:"article:tag",content:`${m.sport} Cards`}),z.jsx("meta",{name:"article:tag",content:"Checklist"}),m.manufacturer&&z.jsx("meta",{name:"article:tag",content:m.manufacturer}),z.jsx("meta",{property:"og:title",content:y.title}),z.jsx("meta",{property:"og:description",content:y.description}),z.jsx("meta",{property:"og:type",content:y.type}),z.jsx("meta",{property:"og:url",content:y.url}),z.jsx("meta",{property:"og:site_name",content:"HobbyMonitor"}),z.jsx("meta",{property:"product:brand",content:m.manufacturer||""}),m.releaseDate&&z.jsx("meta",{property:"product:release_date",content:"string"==typeof m.releaseDate?m.releaseDate:(null==(j=Ne(m.releaseDate))?void 0:j.toISOString())||""}),y.image&&z.jsx("meta",{property:"og:image",content:y.image}),z.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),z.jsx("meta",{name:"twitter:site",content:"@hobbymonitor"}),z.jsx("meta",{name:"twitter:title",content:y.title}),z.jsx("meta",{name:"twitter:description",content:y.description}),y.image&&z.jsx("meta",{name:"twitter:image",content:y.image}),z.jsx("link",{rel:"canonical",href:y.url}),v.map((e,t)=>z.jsx("script",{type:"application/ld+json",nonce:window.__CSP_NONCE__,children:JSON.stringify(e)},t))]}),z.jsx("header",{style:s,className:"text-[#eef1f6]",children:z.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 pt-4 pb-6 md:pb-8",children:[z.jsx(q,{items:_,className:"mb-4 flex-wrap gap-y-1 text-[#9aa6ba] [&_a:hover]:text-white [&_[aria-current]]:text-[#eef1f6] [&_[aria-current]]:break-words"}),z.jsxs("div",{className:"flex flex-col gap-5 sm:flex-row sm:items-start",children:[z.jsx("div",{className:"shrink-0 w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48 relative rounded-md bg-white/[0.04] border border-[#e2b75a]/25 overflow-hidden",children:m.imageUrl&&!u?z.jsxs(z.Fragment,{children:[z.jsx(G,{src:e(m.imageUrl)||"",alt:m.title,className:"w-full h-full object-contain p-2",sizes:"192px",priority:!0,onError:x,onLoad:()=>N(!0),aspectRatio:"1/1",fillContainer:!0}),!w&&z.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:z.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-t-2 border-[#e2b75a]"})})]}):z.jsx("div",{className:`${a} w-full h-full grid place-items-center p-3 text-center text-sm font-semibold leading-snug text-[#9aa6ba] break-words`,children:m.title})}),z.jsxs("div",{className:"flex-1 min-w-0",children:[B&&z.jsx("div",{className:r,children:B}),z.jsxs("h1",{className:`${a} mt-1.5 text-2xl md:text-[32px] leading-tight font-semibold break-words text-balance`,children:[m.title," ",$?"Checklist":""]}),z.jsxs("div",{className:"mt-3 flex flex-wrap items-baseline gap-x-5 gap-y-1",children:[T&&z.jsxs("div",{children:[z.jsx("div",{className:"text-xs text-[#9aa6ba]",children:"Preorder"}),z.jsx("div",{className:`${a} text-3xl font-semibold tabular-nums text-[#e2b75a]`,children:l(m.preorderDate)})]}),z.jsxs("div",{children:[z.jsx("div",{className:"text-xs text-[#9aa6ba]",children:"Out"}),z.jsx("div",{className:`${a} ${T?"text-xl text-[#eef1f6]":"text-3xl text-[#e2b75a]"} font-semibold tabular-nums`,children:m.releaseDate?ke(m.releaseDate):"TBD"})]})]}
1),z.jsx("div",{className:"mt-3",children:z.jsx(n,{dark:!0,r:{status:T?"preorder":void 0,hasChecklists:$,hasVariations:R>0}})}),z.jsxs("div",{className:"mt-5 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-start",children:[m.productUrl&&z.jsxs("div",{className:"min-w-0",children:[o(m.productUrl)?z.jsx("a",{href:i(m.productUrl),target:"_blank",rel:"noopener sponsored",className:"inline-flex items-center rounded-md bg-[#e2b75a] px-4 py-2 text-sm font-semibold text-[#1a1405] hover:bg-[#f0c877]",children:D?"Preorder at Topps":"Buy at Topps"}):z.jsx("a",{href:m.productUrl,target:"_blank",rel:"noopener",className:"inline-flex items-center rounded-md border border-[#e2b75a]/40 px-4 py-2 text-sm font-semibold text-[#eef1f6] hover:bg-white/[0.06]",children:"Official product page"}),o(m.productUrl)&&z.jsx(c,{className:"mt-1.5 text-[#9aa6ba]"})]}),m.title&&z.jsxs("div",{className:"min-w-0",children:[z.jsx(Q,{mode:"active",label:"Shop cards on eBay",searchQuery:m.title,category:"0",placement:"release_detail",className:"h-9 border-[#e2b75a]/40 bg-transparent text-[#eef1f6] hover:bg-white/[0.06] hover:text-white"}),z.jsx(d,{className:"mt-1.5 text-[#9aa6ba]"})]})]})]})]}),M.length>0&&z.jsx("dl",{className:"mt-6 grid grid-cols-3 divide-x divide-[#e2b75a]/20 rounded-lg border border-[#e2b75a]/25 bg-white/[0.04]",children:M.map(([e,t])=>z.jsxs("div",{className:"min-w-0 px-3 py-2.5 md:px-4",children:[z.jsx("dt",{className:`${a} text-[11px] font-semibold uppercase tracking-[0.14em] text-[#9aa6ba]`,children:e}),z.jsx("dd",{className:`${a} mt-0.5 text-xl md:text-2xl font-semibold tabular-nums text-[#eef1f6] break-words`,children:t})]},e))}),P.length>0&&z.jsxs("div",{className:"mt-5 max-w-3xl text-sm text-[#c4ccda]",children:[(k?P:[L]).map((e,t)=>z.jsx("p",{className:t>0?"mt-2":"",children:e},t)),I&&z.jsx("button",{type:"button",onClick:()=>C(e=>!e),className:"mt-1.5 text-sm font-medium text-[#e2b75a] hover:text-[#f0c877]","aria-expanded":k,children:k?"Show less":"Read more"})]})]})})]})}const Se=J,$e=Z,Re=K,Oe=["Pokemon","One Piece","Magic","Yu-Gi-Oh","Lorcana"];const Te=["Leader","Common","Uncommon","Rare","Double Rare","ACE SPEC Rare","Ultra Rare","Illustration Rare","Shiny Rare","Shiny Ultra Rare","Special Illustration Rare","Mega Attack Rare","Hyper Rare","Pikachu Rare","Futuristic Rare","RGB Rare","Classic Collection","Super Rare","Secret Rare","Special","Treasure Rare","Promo"],De=new Map(Te.map((e,t)=>[e,t]));function Be(e){return e?De.get(e)??Te.length:Te.length}const Me={Common:{glyph:"â",tone:"default"},Uncommon:{glyph:"â",tone:"default"},Rare:{glyph:"â
",tone:"default"},"Double Rare":{glyph:"â
â
",tone:"default"},"Ultra Rare":{glyph:"â
â
",tone:"silver"},"Illustration Rare":{glyph:"â
",tone:"gold"},"Special Illustration Rare":{glyph:"â
â
",tone:"gold"},"Hyper Rare":{glyph:"â
â
â
",tone:"gold"},"Futuristic Rare":{glyph:"â
",tone:"teal"},"Classic Collection":{glyph:"â
C",tone:"default"},"Pikachu Rare":{glyph:"",tone:"pikachu"}},Pe={Common:Me.Common,Uncommon:Me.Uncommon,Rare:Me.Rare};function Ae(e){if(!e||"object"!=typeof e)return null;const t=e.display_order;return"number"==typeof t&&Number.isFinite(t)?t:null}function Le(e){if(!e)return null;const t=parseInt(e.replace(/\D+/g,""),10);return Number.isFinite(t)?t:null}function Ie(e,t){if(!e.cardNumber&&!t.cardNumber)return 0;if(!e.cardNumber)return 1;if(!t.cardNumber)return-1;const s=Ae(e.attrs)??Le(e.cardNumber),a=Ae(t.attrs)??Le(t.cardNumber);return null!==s&&null!==a&&s!==a?s-a:e.cardNumber.localeCompare(t.cardNumber)}function _e({open:e,onOpenChange:t,release:s}){const[a,r]=F.useState([]),[l,n]=F.useState(""),[o,i]=F.useState(!1),c=F.useMemo(()=>{if(!(null==s?void 0:s.teamChecklists))return[];const e=new Map;
1return s.teamChecklists.forEach(t=>{(t.players||[]).forEach(s=>{e.has(s)||e.set(s,[]),e.get(s).push(t)})}),Array.from(e.entries()).map(([e,t])=>({playerName:e,cards:t.sort((e,t)=>e.cardNumber&&t.cardNumber?e.cardNumber.localeCompare(t.cardNumber):0)})).sort((e,t)=>e.playerName.localeCompare(t.playerName))},[null==s?void 0:s.teamChecklists]),d=F.useMemo(()=>{if(!l)return c;const e=l.toLowerCase();return c.filter(({playerName:t})=>t.toLowerCase().includes(e))},[c,l]),f=F.useMemo(()=>{const e={};for(const t of(null==s?void 0:s.cardParallels)||[]){const s=[...t.parallels].sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)).map(e=>{const t=e.isOneOfOne?"1/1":null!==e.printRun?`/${e.printRun}`:null;return[e.name,t,e.odds?`(${e.odds})`:null].filter(Boolean).join(" ")});s.length&&(e[t.cardSet]=[...e[t.cardSet]||[],...s])}return e},[null==s?void 0:s.cardParallels]),j=e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=3?[...t.slice(1),e]:[...t,e])},y=F.useMemo(()=>a.map(e=>c.find(t=>t.playerName===e)).filter(Boolean),[a,c]);return z.jsx(m,{open:e,onOpenChange:()=>{r([]),n(""),i(!1),t(!1)},children:z.jsxs(u,{className:"max-w-6xl max-h-[90vh] overflow-y-auto",children:[z.jsxs(x,{children:[z.jsxs(h,{className:"flex items-center gap-2",children:[z.jsx(re,{className:"h-5 w-5"}),"Compare Players"]}),z.jsx(p,{children:"Select 2-3 players to compare their cards and pack odds"})]}),o?z.jsxs("div",{className:"space-y-4",children:[z.jsxs("div",{className:"flex items-center justify-between gap-2 pb-2 border-b",children:[z.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(e=>z.jsxs(ae,{variant:"secondary",className:"gap-1",children:[e,z.jsx("button",{onClick:()=>j(e),className:"hover:bg-muted-foreground/20 rounded-full p-0.5",children:z.jsx(ne,{className:"h-3 w-3"})})]},e))}),z.jsx(b,{variant:"outline",size:"sm",onClick:()=>i(!1),children:"Change Selection"})]}),z.jsx("div",{className:"overflow-x-auto",children:z.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${y.length}, minmax(250px, 1fr))`},children:y.map(({playerName:e,cards:t})=>{var s;const a=t.reduce((e,t)=>{const s=t.cardSet||"Base";return e[s]||(e[s]=[]),e[s].push(t),e},{});return z.jsxs("div",{className:"border rounded-lg p-4 bg-card",children:[z.jsx("h3",{className:"font-semibold mb-1 truncate",children:e}),z.jsx("div",{className:"text-xs text-muted-foreground mb-3",children:null==(s=t[0])?void 0:s.team}),z.jsx("div",{className:"space-y-4",children:Object.entries(a).map(([e,t])=>z.jsxs("div",{children:[z.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide",children:e}),z.jsx("div",{className:"space-y-2 mb-3",children:t.map(e=>z.jsxs("div",{className:"text-sm border-l-2 border-primary/30 pl-2 py-1",children:[z.jsxs("div",{className:"flex items-center gap-2",children:[z.jsxs("span",{className:"font-medium",children:["#",e.cardNumber]}),z.jsxs("div",{className:"flex gap-1",children:[e.rookie&&z.jsx(ae,{variant:"default",className:"text-xs px-1.5 py-0",children:"RC"}),e.bowman_first&&z.jsx(ae,{className:"text-xs px-1.5 py-0 bg-blue-500",children:"1st"})]})]}),"Base"!==e.cardType&&z.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:e.cardType})]},e.id))}),f[e]&&z.jsxs("div",{className:"bg-muted/30 rounded-md p-2",children:[z.jsx("div",{className:"text-xs font-medium mb-1.5",children:"Parallels"}),z.jsx("div",{className:"space-y-1",children:f[e].map((e,t)=>z.jsx("div",{className:"text-xs text-muted-foreground",children:e},t))})]})]},e))})]},e)})})})]}):z.jsxs("div",{className:"space-y-4",children:[z.jsxs("div",{className:"relative",children:[z.jsx(le,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),z.jsx(g,{type:"search",placeholder:"Search players...",className:"pl-9",value:l,onChange:e=>n(e.target.value)})]}),a.length>0&&z.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 bg-muted/30 rounded-lg border",children:[z.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(e=>z.jsxs(ae,{variant:"secondary",className:"gap-1",children:[e,z.jsx("button",{onClick:()=>
1j(e),className:"hover:bg-muted-foreground/20 rounded-full p-0.5",children:z.jsx(ne,{className:"h-3 w-3"})})]},e))}),z.jsxs(b,{onClick:()=>i(!0),disabled:a.length<2,size:"sm",children:["Compare (",a.length,")"]})]}),z.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 max-h-[400px] overflow-y-auto",children:d.map(({playerName:e,cards:t})=>{var s;const r=t.some(e=>e.rookie),l=t.some(e=>e.bowman_first),n=a.includes(e);return z.jsx("button",{onClick:()=>j(e),className:"p-3 border rounded-lg hover:bg-accent text-left transition-colors "+(n?"bg-primary/10 border-primary":""),children:z.jsxs("div",{className:"flex items-start justify-between gap-2",children:[z.jsxs("div",{className:"flex-1 min-w-0",children:[z.jsx("div",{className:"font-medium truncate",children:e}),z.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[t.length," card",1!==t.length?"s":""," ⢠",null==(s=t[0])?void 0:s.team]})]}),z.jsxs("div",{className:"flex gap-1 shrink-0",children:[r&&z.jsx(ae,{variant:"default",className:"text-xs px-1.5 py-0",children:"RC"}),l&&z.jsx(ae,{className:"text-xs px-1.5 py-0 bg-blue-500",children:"1st"})]})]})},e)})})]})]})})}const Ue=S({subject:R("Checklist Fix"),message:$().min(10,"Message must be at least 10 characters").max(5e3)});function Ee({release:e,open:t,onOpenChange:s}){const[a,r]=F.useState(!1),l=t??a,n=s??r,[o,i]=F.useState(!1),c=fe({resolver:f(Ue),defaultValues:{subject:"Checklist Fix",message:`I found an issue with the checklist for "${e.title}":\n\n[Please describe the issue - missing players, incorrect information, etc.]\n\nSuggested correction:\n[Please provide the correct information if known]\n\n`}});return z.jsx(m,{open:l,onOpenChange:n,children:z.jsxs(u,{className:"sm:max-w-[525px]",children:[z.jsxs(x,{children:[z.jsx(h,{children:"Report Checklist Issue"}),z.jsxs(p,{children:['Help us improve the checklist for "',e.title,'". Please describe the issue and provide corrections if possible.']})]}),z.jsx(j,{...c,children:z.jsxs("form",{onSubmit:c.handleSubmit(async e=>{i(!0);try{const t=await fetch("/api/feedback/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw new Error(s.message||"Failed to send feedback");C({title:"Feedback sent!",description:"Thank you for helping us improve our checklists. We'll review your feedback and make updates."}),c.reset(),n(!1)}catch(t){C({title:"Error",description:t instanceof Error?t.message:"Failed to send feedback. Please try again.",variant:"destructive"})}finally{i(!1)}}),className:"space-y-4",children:[z.jsx(y,{control:c.control,name:"message",render:({field:e})=>z.jsxs(v,{children:[z.jsx(w,{children:"Issue Description"}),z.jsx(N,{children:z.jsx(je,{placeholder:"Describe the checklist issue and provide correct information if known...",className:"min-h-[120px]",...e})}),z.jsx(k,{})]})}),z.jsxs("div",{className:"flex justify-end gap-2",children:[z.jsx(b,{type:"button",variant:"outline",onClick:()=>n(!1),disabled:o,children:"Cancel"}),z.jsxs(b,{type:"submit",disabled:o,children:[o&&z.jsx(oe,{className:"mr-2 h-4 w-4 animate-spin"}),"Send Report"]})]})]})})]})})}const Fe={Base:0,Insert:1,Autograph:2,Relic:3,"Short Print":4},ze={Base:xe,Insert:me,Autograph:ie,Relic:ue,"Short Print":me},He="text-amber-700 dark:text-amber-400",Ve="focus:outline-none focus-visible:ring-2 focus-visible:ring-amber-500/60",We=`${a} text-xs font-semibold uppercase tracking-[0.14em] ${He}`,qe={Base:"bg-muted text-muted-foreground",Insert:"bg-sky-500/10 text-sky-700 dark:text-sky-300",Autograph:"bg-amber-500/15 text-amber-800 dark:text-amber-300",Relic:"bg-emerald-500/10 text-emerald-700 dark:text-emerald-300","Short Print":"bg-violet-500/10 text-violet-700 dark:text-violet-300"},Ge="inline-flex items-center rounded px-1.5 py-px text-[10.5px] font-semibold uppercase tracking-wide whitespace-nowrap",Qe=e=>O("inline-flex items-center gap-1.5 min-h-11 sm:min-h-8 px-3 rounded-full border text-xs font-semibold transition-colors whitespace-nowrap",Ve,e?"bg-[#e2b75a] text-[#1a1405] border-[#e2b75a]":"bg-background text-muted-foreground border-border hover:text-foreground hover:border-amber-500/50");function Ye(e){if(e.isOneOfOne)return"bg-gradient-to-r from-amber-500/90 to-amber-300/90 text-amber-950 border-amber-600 ring-1 ring-amber-400/40";if(/printing plates?/i.test(e.name))return"bg-gradient-to-r from-slate-700 to-slate-500 text-slate-50 border-slate-500";const t=e.printRun;return null===t?"bg-muted/60 text-muted-foreground border-border":t<=5?"bg-rose-500/15 text-rose-700 dark:text-rose-300 border-rose-500/40":t<=25?"bg-orange-500/15 text-orange-700 dark:text-orange-300 border-orange-500/40":t<=75?"bg-amber-500/15 text-amber-800 dark:text-amber-200 border-amber-500/40":t<=150?"bg-emerald-500/15 text-emerald-800 dark:text-emerald-200 border-emerald-500/40":t<=300?"bg-sky-500/15 text-sky-800 dark:text-sky-200 border-sky-500/40":"bg-blue-500/10 text-blue-800 dark:text-blue-200 border-blue-500/30"}function Je({p:t}){const s=t.isOneOfOne?"1/1":null!==t.printRun?`/${t.printRun}`:null,a=[];t.odds&&a.push(`Odds ${t.odds}`),t.exclusivity&&a.push(t.exclusivity);const r=a.join(" ⢠")||null,l=t.imageUrl?e(t.imageUrl):void 0,n=z.jsxs("span",{className:O("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-xs font-medium",Ye(t),l&&"cursor-pointer hover:ring-1 hover:ring-amber-500/50"),children:[l&&z.jsx("img",{src:l,alt:`${t.name} example`,loading:"lazy",className:"h-7 w-5 object-cover rounded-sm shrink-0 bg-white"}),z.jsx("span",{children:t.name}),s&&z.jsx("span",{className:"tabular-nums text-[11px] font-semibold opacity-80",children:s}),t.exclusivity&&z.jsx("span",{className:"text-[10px] uppercase tracking-wide opacity-70 hidden sm:inline",children:"Excl"})]}),o=e=>r?z.jsxs(ee,{children:[z.jsx(te,{asChild:!0,children:e}),z.jsx(se,{side:"top",className:"text-xs max-w-xs",children:r})]}):z.jsx(z.Fragment,{children:e});return l?z.jsxs(m,{children:[o(z.jsx(T,{asChild:!0,children:z.jsx("button",{type:"button","aria-label":`See ${t.name} example`,className:"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded-md",children:n})})),z.jsxs(u,{className:"max-w-sm p-2 bg-transparent border-0 shadow-none",children:[z.jsxs(h,{className:"sr-only",children:[t.name," example"]}),z.jsx("img",{src:l,alt:`${t.name} example`,className:"w-full h-auto rounded-lg"})]})]}):o(n)}
1const Ze={default:"text-foreground/80",silver:"text-slate-400 dark:text-slate-300",gold:He,teal:"text-teal-600 dark:text-teal-400",pikachu:"text-yellow-600 dark:text-yellow-400"};function Ke({symbol:e,className:t}){return z.jsx("span",{"aria-hidden":!0,className:O("inline-flex items-center shrink-0 leading-none whitespace-nowrap",Ze[e.tone],t),children:"pikachu"===e.tone?z.jsx(pe,{className:"h-3 w-3 fill-current"}):e.glyph})}function Xe({card:t,isTcg:s,subtitle:a,symbol:r}){var l;const n=(null==(l=t.players)?void 0:l.length)?t.players.join(" / "):"Unknown",o=e(t.imageUrl);return z.jsxs("div",{className:"flex items-start gap-3 py-2.5 px-3 sm:px-4 hover:bg-muted/40 transition-colors",children:[o&&z.jsxs(m,{children:[z.jsx(T,{asChild:!0,children:z.jsx("button",{type:"button","aria-label":`Enlarge ${n}${t.cardNumber?` #${t.cardNumber}`:""}`,className:"shrink-0 cursor-zoom-in rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-amber-500/60",children:z.jsx("img",{src:o,alt:n,loading:"lazy",className:"w-10 h-14 object-contain rounded bg-muted"})})}),z.jsxs(u,{className:"max-w-sm p-2 bg-transparent border-0 shadow-none",children:[z.jsxs(h,{className:"sr-only",children:[n,t.cardNumber?` #${t.cardNumber}`:""]}),z.jsx("img",{src:o,alt:n,className:"w-full h-auto rounded-lg"})]})]}),z.jsx("div",{className:"pt-0.5 text-xs tabular-nums text-muted-foreground w-12 sm:w-14 shrink-0 break-all",children:t.cardNumber||"-"}),z.jsxs("div",{className:"flex-1 min-w-0",children:[z.jsx("div",{className:"text-sm font-medium break-words",children:n}),(()=>{const e=void 0!==a?a:t.rarity||(s?null:t.team);if(!e)return null;const l=r&&void 0===a&&t.rarity?r:null;return z.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground break-words",children:[l&&z.jsx(Ke,{symbol:l}),z.jsx("span",{className:"min-w-0",children:e})]})})()]}),!s&&(t.rookie||t.bowman_first)&&z.jsxs("div",{className:"flex flex-wrap justify-end items-center gap-1 shrink-0 pt-0.5",children:[t.rookie&&z.jsx("span",{className:O(Ge,"bg-sky-500/10 text-sky-700 dark:text-sky-300"),children:"RC"}),t.bowman_first&&z.jsx("span",{className:O(Ge,"bg-amber-500/15",He),children:"1st"})]})]})}function et({id:e,release:t}){const[s,r]=F.useState(""),l=Y(s,250),[n,o]=F.useState("All"),[i,c]=F.useState(!1),[d,m]=F.useState(!1),[u,x]=F.useState(!1),[h,p]=F.useState(!1),[b,f]=F.useState(new Set),[j,y]=F.useState("set"),v=!!(w=t.sport)&&Oe.includes(w);var w;const N=e=>function(e,t){return e&&"Pokemon"===t.sport?(/sword\s*&\s*shield/i.test(t.setTitle??"")?Pe:Me)[e]??null:null}(e,{sport:t.sport,setTitle:t.title}),k=F.useMemo(()=>{const e=new Map;for(const s of t.cardParallels||[])e.set(s.cardSet,{cardSet:s.cardSet,cardType:s.cardType,parallels:[...s.parallels].sort((e,t)=>(e.sortOrder??0)-(t.sortOrder??0)),cards:[]});for(const s of t.teamChecklists||[]){const t=s.cardSet||"Base";let a=e.get(t);a||(a={cardSet:t,cardType:s.cardType||"Base",parallels:[],cards:[]},e.set(t,a)),a.cards.push(s)}for(const t of e.values())t.cards.sort((e,t)=>{var s,a;const r=Ie(e,t);return 0!==r?r:((null==(s=e.players)?void 0:s[0])||"").localeCompare((null==(a=t.players)?void 0:a[0])||"")});return Array.from(e.values()).sort((e,t)=>{const s=(Fe[e.cardType]??9)-(Fe[t.cardType]??9);return 0!==s?s:e.cardSet.localeCompare(t.cardSet)})},[t.cardParallels,t.teamChecklists]),C=F.useMemo(()=>{const e=new Set;for(const t of k)e.add(t.cardType||"Base");return Array.from(e).sort((e,t)=>(Fe[e]??9)-(Fe[t]??9))},[k]),S=F.useMemo(()=>["All",...C],[C]),$=F.useMemo(()=>(t.teamChecklists||[]).some(e=>!!e.rarity),[t.teamChecklists]),R=F.useMemo(()=>{const e=new Map;for(const s of t.teamChecklists||[]){const t=s.rarity||s.cardSet||"Other";let a=e.get(t);a||(a={cardSet:t,cardType:"Base",parallels:[],cards:[]},e.set(t,a)),a.cards.push(s)}for(const t of e.values())t.cards.sort(Ie);return Array.from(e.values()).sort((e,t)=>Be(e.cardSet)-Be(t.cardSet))},[t.teamChecklists]),T=F.useMemo(()=>!v&&(t.teamChecklists||[]).some(e=>e.rookie),[t.teamChecklists,v]),D=F.useMemo(()=>!v&&(t.teamChecklists||[]).some(e=>e.bowman_first),[t.teamChecklists,v]),B=F.useMemo(()=>!v&&(t.teamChecklists||[]).some(e=>!!e.team),[t.teamChecklists,v]),M=F.useMemo(()=>{const e=new Map;for(const s of t.teamChecklists||[]){const t=s.team||"Unknown";let a=e.get(t);a||(a={cardSet:t,cardType:"Base",parallels:[],cards:[]},e.set(t,a)),a.cards.push(s)}for(const t of e.values())t.cards.sort((e,t)=>
1{const s=(e.cardSet||"").localeCompare(t.cardSet||"");return 0!==s?s:Ie(e,t)});return Array.from(e.values()).sort((e,t)=>e.cardSet.localeCompare(t.cardSet))},[t.teamChecklists]),P="rarity"===j&&$?R:"team"===j&&B?M:k,A=P!==k,L=F.useMemo(()=>{const e=l.trim().toLowerCase();return P.map(t=>{if(!A&&"All"!==n&&t.cardType!==n)return null;const s=t.cards.filter(t=>{var s,a,r;return(!A||"All"===n||(t.cardType||"Base")===n)&&(!(i&&!t.rookie)&&(!(d&&!t.bowman_first)&&(!e||(!!(null==(s=t.team)?void 0:s.toLowerCase().includes(e))||(!!(null==(a=t.cardNumber)?void 0:a.toLowerCase().includes(e))||(null==(r=t.players)?void 0:r.some(t=>t.toLowerCase().includes(e))))))))}),a=e&&t.cardSet.toLowerCase().includes(e);return 0===s.length&&0===t.parallels.length||e&&!a&&0===s.length||A&&0===s.length?null:{...t,cards:s}}).filter(Boolean)},[P,A,l,n,i,d]),I=F.useMemo(()=>{const e=k.reduce((e,t)=>e+t.cards.length,0),t=k.reduce((e,t)=>e+t.parallels.length,0);return{sets:k.length,cards:e,parallels:t}},[k]);if(0===k.length)return z.jsxs("section",{id:e,className:"rounded-lg border bg-card",children:[z.jsx("div",{className:"px-4 pt-4",children:z.jsx("h2",{className:We,children:"Checklist"})}),z.jsx("div",{className:"py-12 px-4 text-center text-sm text-muted-foreground",children:"No checklist or parallel data available yet for this release."})]});const _=[{value:"set",label:"Set"},...B?[{value:"team",label:"Team"}]:[],...$?[{value:"rarity",label:"Rarity"}]:[]],U=(e,t)=>z.jsxs("span",{className:"whitespace-nowrap",children:[z.jsx("span",{className:O(a,"text-lg font-semibold tabular-nums text-foreground"),children:e.toLocaleString()})," ",z.jsx("span",{className:"text-xs text-muted-foreground",children:t})]});return z.jsx(X,{delayDuration:150,children:z.jsxs("section",{id:e,className:"space-y-3",children:[z.jsxs("div",{className:"space-y-3",children:[z.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1",children:[z.jsx("h2",{className:We,children:"Checklist"}),z.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[U(I.sets,1===I.sets?"set":"sets"),U(I.cards,1===I.cards?"card":"cards"),I.parallels>0&&U(I.parallels,1===I.parallels?"parallel":"parallels")]})]}),z.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[z.jsxs("div",{className:"relative flex-1 min-w-0","data-tour":"search-box",children:[z.jsx(le,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),z.jsx(g,{placeholder:v?"Search card name or card #":"Search player, team, or card #","aria-label":"Search checklist",value:s,onChange:e=>r(e.target.value),className:"h-11 sm:h-10 pl-9 pr-11 rounded-lg bg-card focus-visible:ring-amber-500/50"}),s&&z.jsx("button",{type:"button","aria-label":"Clear search",onClick:()=>r(""),className:O("absolute right-0.5 top-1/2 -translate-y-1/2 h-10 w-10 inline-flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground",Ve),children:z.jsx(ne,{className:"h-4 w-4"})})]}),_.length>1&&z.jsx("div",{role:"radiogroup","aria-label":"Group checklist by","data-tour":"grouping-buttons",className:"inline-flex self-start items-center gap-0.5 rounded-md border bg-muted/50 p-0.5",children:_.map(e=>{const t=j===e.value;return z.jsx("button",{type:"button",role:"radio","aria-checked":t,onClick:()=>{return t=e.value,y(t),void f(new Set);var t},className:O("min-h-10 sm:min-h-9 px-3 inline-flex items-center justify-center rounded text-xs font-semibold transition-colors",Ve,t?"bg-background text-foreground shadow-sm ring-1 ring-amber-500/40":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})]}),z.jsxs("div",{className:"flex flex-wrap items-center gap-2","data-tour":"filter-buttons",children:[C.length>1&&S.map(e=>z.jsx("button",{type:"button","aria-pressed":n===e,onClick:()=>o(e),className:Qe(n===e),children:e},e)),C.length>1&&(T||D)&&z.jsx("span",{"aria-hidden":!0,className:"h-5 w-px bg-border mx-0.5"}),T&&z.jsxs("button",{type:"button",onClick:()=>c(e=>!e),"aria-pressed":i,className:Qe(i),children:[z.jsx(re,{className:"h-3.5 w-3.5"}),"Rookies"]}
1),D&&z.jsxs("button",{type:"button",onClick:()=>m(e=>!e),"aria-pressed":d,"aria-label":"Show only 1st Bowman cards",className:Qe(d),children:[z.jsx(ie,{className:"h-3.5 w-3.5"}),"1st Bowman"]})]}),z.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-xs",children:[z.jsxs("div",{className:"flex items-center gap-1",children:[B&&z.jsxs("button",{type:"button",onClick:()=>x(!0),className:O("inline-flex items-center gap-1.5 min-h-11 sm:min-h-8 px-2 rounded-md font-medium text-muted-foreground hover:text-foreground",Ve),children:[z.jsx(ce,{className:"h-3.5 w-3.5"}),"Compare players"]}),z.jsxs("button",{type:"button",onClick:()=>p(!0),"aria-label":"Report a checklist issue",className:O("inline-flex items-center gap-1.5 min-h-11 sm:min-h-8 px-2 rounded-md font-medium text-muted-foreground hover:text-foreground",Ve),children:[z.jsx(de,{className:"h-3.5 w-3.5"}),"Report issue"]})]}),z.jsxs("div",{className:"flex items-center",children:[z.jsx("button",{type:"button",onClick:()=>f(new Set(L.map(e=>e.cardSet))),className:O("min-h-11 sm:min-h-8 px-2 rounded-md text-muted-foreground hover:text-foreground",Ve),children:"Expand all"}),z.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground/60",children:"|"}),z.jsx("button",{type:"button",onClick:()=>f(new Set),className:O("min-h-11 sm:min-h-8 px-2 rounded-md text-muted-foreground hover:text-foreground",Ve),children:"Collapse all"})]})]})]}),z.jsxs("div",{className:"rounded-lg border bg-card overflow-hidden",children:[0===L.length?z.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm",children:"No matches for these filters."}):z.jsx("div",{className:"divide-y divide-border",children:L.map(e=>{const t="team"===j?re:ze[e.cardType]||xe,s=b.has(e.cardSet);return z.jsxs(Se,{open:s,onOpenChange:()=>{return t=e.cardSet,void f(e=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s});var t},children:[z.jsxs($e,{className:O("flex w-full items-center gap-3 min-h-14 px-4 py-3 text-left transition-colors border-l-2","focus:outline-none focus-visible:bg-muted/60",s?"border-l-amber-500 bg-amber-500/[0.06]":"border-l-transparent hover:bg-muted/40"),children:[z.jsx(t,{className:O("h-4 w-4 shrink-0",s?He:"text-muted-foreground")}),z.jsxs("div",{className:"flex-1 min-w-0",children:[z.jsxs("div",{className:O(a,"flex items-center gap-2 text-base font-semibold leading-snug break-words"),children:["rarity"===j&&(()=>{const t=N(e.cardSet);return t?z.jsx(Ke,{symbol:t,className:"text-sm"}):null})(),z.jsx("span",{className:"min-w-0",children:e.cardSet})]}),z.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground mt-1 tabular-nums",children:[!A&&z.jsx("span",{className:O(Ge,qe[e.cardType]||qe.Base),children:e.cardType}),e.cards.length>0&&z.jsxs("span",{children:[e.cards.length," ",1===e.cards.length?"card":"cards"]}),e.parallels.length>0&&z.jsxs("span",{children:[e.parallels.length," ",1===e.parallels.length?"parallel":"parallels"]})]})]}),z.jsx(he,{className:O("h-5 w-5 text-muted-foreground transition-transform shrink-0",s&&"rotate-90")})]}),z.jsxs(Re,{className:"border-t border-border/60 bg-muted/20",children:[e.parallels.length>0&&z.jsxs("div",{className:"px-4 pt-3 pb-3",children:[z.jsx("div",{className:O(a,"text-[11px] uppercase tracking-[0.14em] text-muted-foreground font-semibold mb-2"),children:"Parallels"}),z.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.parallels.map((e,t)=>z.jsx(Je,{p:e},`${e.name}-${t}`))})]}),e.cards.length>0&&z.jsxs("div",{className:"pt-2 pb-2",children:[z.jsx("div",{className:O(a,"text-[11px] uppercase tracking-[0.14em] text-muted-foreground font-semibold mb-1 px-4"),children:"Cards"}),z.jsx("div",{className:"divide-y divide-border/50",children:e.cards.map(e=>z.jsx(Xe,{card:e,isTcg:v,subtitle:"team"===j?e.cardSet||"Base":void 0,symbol:N(e.rarity)},e.id))})]}),0===e.parallels.length&&0===e.cards.length&&z.jsx("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No data in this set yet."})]})]},e.cardSet)})}),z.jsx("div",{className:"px-4 py-2 border-t border-border text-center",children:z.jsx("button",{type:"button",onClick:()=>p(!0),className:O("min-h-11 sm:min-h-8 px-2 rounded-md text-xs text-muted-foreground hover:text-foreground transition-colors",Ve),children:"See an error? Report it"})})]}),z.jsx(_e,{open:u,onOpenChange:x,release:t}),z.jsx(Ee,{release:t,open:h,onOpenChange:p})]})})}function tt({tourId:e,steps:t,children:s}){const[a,r]=F.useState(!1),[l,n]=F.useState(0),[o,i]=F.useState(!1);F.useRef(null),F.useEffect(()=>{const t=localStorage.getItem(`tour-dismissed-${e}`);i("true"===t)},[e]);const c=(t=!1)=>{r(!1),n(0),t&&(localStorage.setItem(`tour-dismissed-${e}`,"true"),i(!0))};F.useEffect(()=>{if(!a||!t[l])return;const e=document.querySelector(t[l].target);return e&&(e.classList.add("tour-highlight"),e.scrollIntoView({behavior:"smooth",block:"center"})),()=>
1{document.querySelectorAll(".tour-highlight").forEach(e=>{e.classList.remove("tour-highlight")})}},[a,l,t]);const d=t[l];return z.jsxs(z.Fragment,{children:[!a&&z.jsx("div",{className:"fixed bottom-4 right-4 z-50",children:z.jsxs(b,{onClick:()=>{r(!0),n(0)},size:"sm",className:"bg-primary hover:bg-primary/90 text-white shadow-lg flex items-center gap-2",children:[z.jsx(ge,{className:"h-4 w-4"}),"Page Guide"]})}),a&&d&&z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"fixed inset-0 bg-black/50 z-40"}),z.jsx(D,{className:"fixed z-50 w-80 max-w-sm shadow-xl border-primary/20",style:(()=>{if(!a||!t[l])return{};const e=document.querySelector(t[l].target);if(!e)return{};const s=e.getBoundingClientRect();switch(t[l].position||"bottom"){case"top":return{top:s.top-10,left:s.left+s.width/2,transform:"translate(-50%, -100%)"};case"bottom":default:return{top:s.bottom+10,left:s.left+s.width/2,transform:"translate(-50%, 0)"};case"left":return{top:s.top+s.height/2,left:s.left-10,transform:"translate(-100%, -50%)"};case"right":return{top:s.top+s.height/2,left:s.right+10,transform:"translate(0, -50%)"}}})(),children:z.jsxs(B,{className:"p-4",children:[z.jsxs("div",{className:"flex items-center justify-between mb-3",children:[z.jsx("h4",{className:"font-semibold text-sm",children:d.title}),z.jsx(b,{variant:"ghost",size:"sm",onClick:()=>c(!0),className:"p-1 h-auto",children:z.jsx(ne,{className:"h-4 w-4"})})]}),z.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:d.content}),z.jsxs("div",{className:"flex items-center justify-between",children:[z.jsxs("div",{className:"text-xs text-muted-foreground",children:["Step ",l+1," of ",t.length]}),z.jsxs("div",{className:"flex gap-2",children:[l>0&&z.jsx(b,{variant:"outline",size:"sm",onClick:()=>{l>0&&n(l-1)},children:z.jsx(be,{className:"h-4 w-4"})}),z.jsxs(b,{size:"sm",onClick:()=>{l<t.length-1?n(l+1):c(!0)},children:[l===t.length-1?"Finish":"Next",l<t.length-1&&z.jsx(he,{className:"h-4 w-4 ml-1"})]})]})]})]})})]}),a&&z.jsx("style",{dangerouslySetInnerHTML:{__html:"\n .tour-highlight {\n position: relative;\n z-index: 45;\n border-radius: 8px;\n box-shadow: 0 0 0 4px hsl(var(--primary) / 0.3), 0 0 0 2px hsl(var(--primary) / 0.6);\n transition: all 0.3s ease;\n }\n "}}),s]})}const st=[{target:'[data-tour="search-box"]',title:"Search Cards",content:"Use this search box to quickly find specific players, teams, or card numbers in the checklist.",position:"bottom"},{target:'[data-tour="grouping-buttons"]',title:"View Options",content:"Choose how to organize the checklist: by card set (default), by team, or by rarity. Filter to rookies or 1st Bowman cards, compare players, or report an error.",position:"bottom"},{target:'[data-tour="filter-buttons"]',title:"Filters",content:"Narrow the checklist to a single card type, or expand and collapse every group at once.",position:"bottom"}],at=()=>z.jsxs(z.Fragment,{children:[z.jsx("div",{style:s,children:z.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-4 pb-8",children:[z.jsx("div",{className:"h-4 w-48 mb-4 rounded bg-white/10"}),z.jsxs("div",{className:"flex flex-col gap-5 sm:flex-row",children:[z.jsx("div",{className:"w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48 rounded-md bg-white/[0.06]"}),z.jsxs("div",{className:"flex-1 space-y-3",children:[z.jsx("div",{className:"h-3 w-32 rounded bg-white/10"}),z.jsx("div",{className:"h-8 w-3/4 rounded bg-white/10"}),z.jsx("div",{className:"h-8 w-40 rounded bg-white/10"})]})]})]})}),z.jsxs("div",{className:"container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 md:py-8",children:[z.jsx(ye,{className:"h-10 w-full mb-2"}),z.jsx(ye,{className:"h-6 w-full mb-4"}),z.jsx("div",{className:"space-y-2",children:Array.from({length:5}).map((e,t)=>z.jsx(ye,{className:"h-14 w-full"},t))})]})]});function rt(){const{id:e}=M(),[,t]=P("/release/:slug"),s=null==t?void 0:t.slug,{user:a}=A(),[r,l]=F.useState(!1),[n,o]=L(),i=n.startsWith("/release/"),c=i?s:e,{data:d,isLoading:m,error:u}=H({queryKey:["release",c],queryFn:async()=>{try{const e=await E.get(`/releases/${c}`);if(!e.ok){const t=await e.json();throw new Error(t.message||"Failed to fetch release")}const t=await e.json();return!i&&t.slug&&o(`/release/${t.slug}`,{replace:!0}),t}catch(e){throw e}},staleTime:3e5});return I(!m&&!!d,[c]),F.useEffect(()=>{d&&_.trackEvent("release_viewed",{slug:d.slug||c})},[d,c]),m?z.jsx(at,{}):d?((null==d?void 0:d.teamChecklists)&&d.teamChecklists.length>0||(null==d?void 0:d.cardParallels)&&d.cardParallels.length,z.jsx(tt,{tourId:"checklist-tour",steps:st,children:z.jsxs(U,{children:[z.jsx(Ce,{release:d,imageError:r,onImageError:()=>l(!0)}),z.jsx("div",{className:"container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 md:py-8",children:z.jsxs("div",{className:"space-y-6 md:space-y-8",children:[z.jsx(et,{id:"unified-checklist-section",release:d}),z.jsxs("div",{className:"p-4 rounded-lg border border-border bg-muted/20 text-center",children:[z.jsx("p",{className:"text-sm text-muted-foreground",children:"Tracking which cards you've pulled from this set?"}),z.jsx("a",{href:"https://collect.hobbymonitor.com",target:"_blank",rel:"noopener noreferrer",children:z.jsxs("button",{className:"mt-2 inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:text-primary/80 transition-colors",children:["Open Collect",z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[z.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),z.jsx("polyline",{points:"15 3 21 3 21 9"}),z.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})})]}),z.jsx(V,{children:z.jsx(ve,{children:z.jsx("section",{className:"border border-primary/10 p-4 rounded-lg shadow-sm bg-card/50 overflow-hidden",children:z.jsxs("div",{className:"flex flex-col items-center",children:[z.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Related eBay Listings"}),z.jsx("div",{style:{width:"100%",maxWidth:"900px",minHeight:"220px"},children:z.jsx(U,{fallback:z.jsx("div",{className:"p-4 text-sm text-muted-foreground bg-muted/10 rounded-lg",children:"Advertisement content unavailable"}),children:z.jsx(W,{configId:"fff81e2109e3f06866ad1f4a",keyword:`${d.title} ${d.sport} cards`,width:900,height:220})})})]})})})})]})})]})})):z.jsx("div",{className:"container py-12",children:z.jsxs("div",{className:"bg-destructive/10 text-destructive p-4 rounded-lg",children:[z.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Error Loading Release"}),z.jsx("p",{children:"Unable to load the release details. The release may not exist or there was an error connecting to the server."})]})})}export{rt 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.