PageSourceSearch

https://prixtcg.fr/_next/static/chunks/6590-3035a2543fc2d73f.js

js prixtcg.fr collected 2026-09-24 15:01:26 UTC 123,155 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6590],{12864:e=>{e.exports={page:"product-detail-layout_page__HKUcy",product:"product-detail-layout_product__K9JRf",gallery:"product-detail-layout_gallery__doPuE",identity:"product-detail-layout_identity__B4HDQ",buybox:"product-detail-layout_buybox__ApWra",actions:"product-detail-layout_actions__6rs6B",offers:"product-detail-layout_offers__NhhKu",composition:"product-detail-layout_composition__D__yU",details:"product-detail-layout_details__Z8J9W",navigation:"product-detail-layout_navigation__w_dm0",primaryOffer:"product-detail-layout_primaryOffer__pW8uD",primaryPrice:"product-detail-layout_primaryPrice__s_57T",primaryCta:"product-detail-layout_primaryCta__nEM0J"}},24209:(e,t,r)=>{Promise.resolve().then(r.bind(r,72830)),Promise.resolve().then(r.bind(r,79694)),Promise.resolve().then(r.bind(r,27084)),Promise.resolve().then(r.t.bind(r,38437,23))},38291:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var s=r(95155);r(12115);var n=r(18460),a=r(91337);let i=(0,n.F)("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-1 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow",success:"border-transparent bg-success text-success-foreground",warning:"border-transparent bg-warning text-warning-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t,...r}){return(0,s.jsx)("div",{className:(0,a.cn)(i({variant:t}),e),...r})}},39658:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var s=r(95155),n=r(12115),a=r(91337);let i=n.forwardRef(({className:e,type:t,...r},n)=>(0,s.jsx)("input",{type:t,ref:n,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-card px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...r}));i.displayName="Input"},72830:(e,t,r)=>{"use strict";r.d(t,{ProductDetail:()=>te});var s=r(95155),n=r(13442),a=r(12864),i=r.n(a),l=r(10736),o=r(12115),d=r(73321),c=r(98500),u=r.n(c),m=r(37206),x=r(31966),p=r(12363),f=r(1275),h=r(54757),g=r(15298),b=r(92571),j=r(49804),v=r(59680),N=r(18986),y=r(65738),_=r(66609),w=r(82034),k=r(22356),C=r(70147),$=r(94020),S=r(50981),A=r(36145),P=r(34779),R=r(13488),E=r(10360),L=r(91337);function z({className:e}){return(0,s.jsx)("span",{className:(0,L.cn)("block text-[9px] leading-4 text-muted-foreground",e),children:"Lien r\xe9mun\xe9r\xe9 : PrixTCG peut percevoir une commission en cas d’achat."})}function I({productId:e,initial:t,best:r=!1,onDataChange:n,bootstrapOnly:a=!1}){let[i,l]=(0,o.useState)(t),d=(0,o.useRef)(0);(0,o.useEffect)(()=>{if(!["refresh_required","refresh_pending","upstream_unavailable"].includes(i.reason??"")||d.current>=4)return;let t=!1,r=null,s="refresh_required"===i.reason,a=async()=>{if(!t&&!(d.current>=4)){d.current+=1;try{let i=await (0,k.nr)(`/api/products/${e}/ebay-offers${s?"?refresh=true":""}`);!t&&(l(i),n?.(i),["refresh_required","refresh_pending","upstream_unavailable"].includes(i.reason??"")&&d.current<4&&(r=window.setTimeout(a,4e3)))}catch{!t&&d.current<4&&(r=window.setTimeout(a,4e3))}}},o=window.setTimeout(a,4e3*("refresh_pending"===i.reason));return()=>{t=!0,window.clearTimeout(o),null!=r&&window.clearTimeout(r)}},[i.reason,n,e]);let c=(0,o.useMemo)(()=>(function(e){if(!e.length)return null;let t=Math.min(...e.map(e=>e.delivered_price_eur)),r=e=>(e.delivered_price_eur-t)/Math.max(t,1)*50-3*Math.min(Math.log10(e.seller_feedback_score+1),5)-(e.seller_feedback_pct-98)*2-5*!!e.top_rated;return[...e].sort((e,t)=>r(e)-r(t))[0]})(i.offers),[i.offers]);if(a||!i.offers.length)return null;let u=i.offers.reduce((e,t)=>
1t.delivered_price_eur<e.delivered_price_eur?t:e),m=i.refreshed_at?new Intl.DateTimeFormat("fr-FR",{dateStyle:"short",timeStyle:"short",timeZone:"Europe/Paris"}).format(new Date(i.refreshed_at)):null;return(0,s.jsxs)("details",{className:(0,L.cn)("group overflow-hidden rounded-lg border border-primary/30 bg-gradient-to-r from-primary/[0.065] via-card to-card shadow-sm transition hover:border-primary/50 open:border-primary/55 open:shadow-md",r&&"ring-1 ring-success/25"),children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-3 p-3 transition-colors hover:bg-primary/[0.035] sm:p-4",children:[(0,s.jsx)(w.hY,{site:"ebay",variant:"offer"}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-xs font-semibold",children:["eBay ",(0,s.jsx)("span",{className:"rounded border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[9px] uppercase text-primary-emphasis",children:"Marketplace"}),r?(0,s.jsx)("span",{className:"rounded bg-success/10 px-1.5 py-0.5 text-[9px] uppercase text-success",children:"Meilleur total livr\xe9"}):null]}),(0,s.jsxs)("span",{className:"block text-[11px] font-medium text-foreground/80",children:[i.offers.length," vendeur",i.offers.length>1?"s":""," fiable",i.offers.length>1?"s":""," v\xe9rifi\xe9",i.offers.length>1?"s":""]}),(0,s.jsxs)("span",{className:"block truncate text-[11px] text-muted-foreground",children:["Offres neuves FR \xb7 achat imm\xe9diat \xb7 d\xe8s ",(0,L.$g)(u.delivered_price_eur)," livr\xe9"]})]}),(0,s.jsxs)("span",{className:"text-right",children:[(0,s.jsxs)("span",{className:"block text-sm font-bold tabular-nums",children:[(0,L.$g)(u.delivered_price_eur)," livr\xe9"]}),(0,s.jsx)("span",{className:"mt-1 inline-flex rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold text-primary-emphasis transition group-open:bg-primary group-open:text-primary-foreground",children:"Comparer"})]}),(0,s.jsx)("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-full border border-primary/20 bg-white/70 text-primary",children:(0,s.jsx)(p.A,{className:"h-4 w-4 transition-transform group-open:rotate-180","aria-hidden":"true"})})]}),(0,s.jsxs)("div",{className:"border-t border-primary/20 bg-background",children:[i.offers.map(e=>{var t,r;let n=(t=c?.id??u.id,r=u.id,e.id===t?{label:"Recommand\xe9e",icon:S.A,className:"border-success/30 bg-success/10 text-success"}:e.id===r?{label:"Meilleur prix",icon:A.A,className:"border-primary/30 bg-primary/10 text-primary-emphasis"}:e.top_rated?{label:"Top vendeur",icon:P.A,className:"border-sky-500/30 bg-sky-500/10 text-sky-700"}:0===e.shipping_price_eur?{label:"Livraison offerte",icon:R.A,className:"border-border bg-muted text-muted-foreground"}:null),a=n?.icon;return(0,s.jsxs)("article",{className:(0,L.cn)("grid gap-3 border-b p-3 last:border-b-0 sm:grid-cols-[1fr_auto_auto] sm:items-center",e.id===u.id&&"bg-success/[0.035]"),children:[(0,s.jsxs)("div",{className:"flex min-w-0 gap-3",children:[e.image_url?(0,s.jsx)(E.ZoomImage,{src:e.image_url,alt:e.title,className:"h-14 w-14 cursor-zoom-in rounded-md border bg-white",imgClassName:"object-contain",sizes:"56px",previewSize:320}):null,(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-1.5",children:[n&&a&&(0,s.jsxs)("span",{className:(0,L.cn)("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[9px] font-semibold uppercase",n.className),children:[(0,s.jsx)(a,{className:"h-3 w-3"}),n.label]}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.seller_business?"Vendeur professionnel":"Vendeur particulier"})]}),(0,s.jsx)("p",{className:"line-clamp-2 text-xs font-medium leading-5",title:e.title,children:e.title}),(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:[e.seller_feedback_pct.toLocaleString("fr-FR"),"% positifs \xb7 ",e.seller_feedback_score.toLocaleString("fr-FR")," \xe9valuations",e.top_rated?" \xb7 Exp\xe9rience Top vendeur":""]})]})]}),(0,s.jsxs)("div",{className:"text-left sm:text-right",children:[(0,s.jsxs)("p",{className:"text-sm font-bold tabular-nums",children:[(0,L.$g)(e.delivered_price_eur)," livr\xe9"]}),(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:[(0,L.$g)(e.item_price_eur)," + ",0===e.shipping_price_eur?"livraison offerte":`${(0,L.$g)(e.shipping_price_eur)} de port`]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("a",{href:e.go_url,"data-outboun
1d-impression":!0,target:"_blank",rel:"nofollow sponsored noopener","aria-label":`Voir cette offre eBay : ${e.title} — lien r\xe9mun\xe9r\xe9`,title:`Voir cette offre eBay : ${e.title} — lien r\xe9mun\xe9r\xe9`,className:"inline-flex min-h-9 w-full items-center justify-center gap-1 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:brightness-90",children:["Voir sur eBay",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5"})]}),(0,s.jsx)(z,{className:"mt-1 max-w-44 text-center"})]})]},e.id)}),(0,s.jsxs)("p",{className:"px-3 py-2 text-[9px] leading-4 text-muted-foreground",children:["Marketplace eBay \xb7 annonces neuves en achat imm\xe9diat",m?` \xb7 derni\xe8re v\xe9rification le ${m}`:"",i.stale?" \xb7 donn\xe9es anciennes \xe0 confirmer sur eBay":"",". Ces offres sont exclues de l’historique et des alertes PrixTCG."]})]})]})}var M=r(11012),T=r(4474),D=r(74350);let q=/^\/go\/ebay\//;function F({active:e,children:t}){let[r,n]=(0,o.useState)(null),a=(0,o.useRef)(new WeakSet);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{onClickCapture:t=>{if(!e||t.defaultPrevented)return;let r=t.target.closest("a[href]");!r||!function(e){try{return q.test(new URL(e.href,window.location.origin).pathname)}catch{return!1}}(r)||a.current.delete(r)||(t.preventDefault(),t.stopPropagation(),n(r))},children:t}),(0,s.jsx)(D.lG,{open:null!=r,onOpenChange:e=>{e||n(null)},children:(0,s.jsxs)(D.Cf,{className:"max-w-md",children:[(0,s.jsxs)(D.c7,{children:[(0,s.jsx)("span",{className:"mx-auto mb-1 grid h-11 w-11 place-items-center rounded-full bg-warning/10 text-warning-emphasis sm:mx-0",children:(0,s.jsx)(M.A,{className:"h-5 w-5","aria-hidden":"true"})}),(0,s.jsx)(D.L3,{children:"Attention : produit en pr\xe9commande"}),(0,s.jsxs)(D.rr,{className:"space-y-2 pt-1 text-left",children:[(0,s.jsx)("span",{className:"block",children:"Ce produit n’est pas encore disponible. V\xe9rifiez attentivement la date d’exp\xe9dition annonc\xe9e et les conditions de l’offre avant de commander."}),(0,s.jsx)("span",{className:"block",children:"PrixTCG v\xe9rifie les vendeurs et leurs \xe9valuations, mais ne vend pas ce produit et ne peut pas garantir l’annonce ni \xeatre tenu responsable d’une fraude ou d’un litige sur eBay."})]})]}),(0,s.jsxs)(D.Es,{className:"gap-2 sm:gap-0",children:[(0,s.jsx)(T.$,{variant:"outline",onClick:()=>n(null),children:"Rester sur PrixTCG"}),(0,s.jsxs)(T.$,{onClick:()=>{r&&(a.current.add(r),n(null),r.click())},children:["Continuer vers eBay",(0,s.jsx)(f.A,{className:"h-4 w-4","aria-hidden":"true"})]})]})]})})]})}var O=r(4572),B=r(57192);let V=new Set(["offer_table","best_offer","deal","merchant_page","amzinvite","unknown"]),U=new Set(["amzinvite"]),G=/^\/go\/([a-f0-9]{24})(?:\?|$)/,H=/^\/go\/ebay\/(\d+)\/(\d+)(?:\?|$)/;function J(e=globalThis.crypto){if("function"==typeof e?.randomUUID)return e.randomUUID();if("function"==typeof e?.getRandomValues){let t=e.getRandomValues(new Uint8Array(16));t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=Array.from(t,e=>e.toString(16).padStart(2,"0"));return[r.slice(0,4).join(""),r.slice(4,6).join(""),r.slice(6,8).join(""),r.slice(8,10).join(""),r.slice(10).join("")].join("-")}return`${Date.now().toString(16)}-${Math.random().toString(16).slice(2)}`}var Z=r(76630),Y=r(24940);function W({id:e,name:t,path:r}){let s=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let n=()=>{if("hidden"!==document.visibilityState&&s.current!==e){var n;let a,i;(0,Y.sx)("view_item",(a={product_id:(n={id:e,name:t,public_path:r}).id,product_name:n.name.slice(0,100)},(i=n.public_path?.split(/[?#]/,1)[0])&&/^\/[a-z0-9][a-z0-9/_-]*$/i.test(i)&&(a.page_location=`https://prixtcg.fr${i}`),a))&&(s.current=e)}};return n(),window.addEventListener(Y.yE,n),document.addEventListener("visibilitychange",n),()=>{window.removeEventListener(Y.yE,n),document.removeEventListener("visibilitychange",n)}},[e,t,r]),null}var X=r(55707),K=r(76715),Q=r(9726),ee=r(84111),et=r(63076),er=r(588),es=r(79984),en=r(50685),ea=r(39650),ei=r(9005);let el=[{key:"dispo",label:"Dispo"},{key:"prix",label:"Prix"},{key:"url",label:"URL"}],eo="offer-report-handled",ed="offer-report-pending";function ec(){try{let e=JSON.parse(sessionStorage.getItem(ed)??"null");if(!e||"number"!=typeof e.id||"string"!=typeof e.label)return null;return{id:e.id,label:e.label,clickedAt:"number"==typeof e.clickedAt?e.clickedAt:void 0,left:!0===e.left}}catch{return null}}function eu(e){try{e?sessionStorage.setItem(ed,JSON.stringify(e)):sessionStorage.removeItem(ed)}catch{}}function em(e){eu({...e,left:!1})}function ex(){try{let e=sessionStorage.getItem(eo);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function ep(e){try{let t=ex();t.add(e),sessionStorage.setItem(eo,JSON.stringify([...t]))}catch{}}function ef({clickedOffer:e,onResolved:t}){let[r,n]=(0,o.useState)(null),[a,i]=(0,o.useState)(null),l=(0,o.useRef)(null),d=(0,o.useRef)(!1),c=(0,o.useRef)(null);(0,o.useEffect)(()=>{l.current=e,d.current=!1,e&&em(e)},[e]);let u=(0,o.useCallback)(()=>{c.current&&clearTimeout(c.current),n(null),eu(null),t()},[t]);(0,o.useEffect)(()=>{let e=()=>{let e=ec(),t=l.current??e,r=d.current||e?.left===!0;if(t&&r&&!(t.clickedAt&&Date.now()-t.clickedAt<1200)){if(ex().has(t.id))return void eu(null);d.current=!1,eu({...t,left:!1}),n(t)}},t=()=>{let e=l.current??ec();e&&(d.current=!0,eu({...e,left:!0}))},r=()=>{"hidden"===document.visibilityState?t():e()},s=()=>e();return document.addEventListener("visibilitychange",r),window.addEventListener("pagehide",t),window.addEventListener("pageshow",s),window.addEventListener("focus",e),e(
1),()=>{document.removeEventListener("visibilitychange",r),window.removeEventListener("pagehide",t),window.removeEventListener("pageshow",s),window.removeEventListener("focus",e)}},[]),(0,o.useEffect)(()=>{if(r)return c.current=setTimeout(()=>{ep(r.id),u()},12e3),()=>{c.current&&clearTimeout(c.current)}},[r,u]);let m=async e=>{if(r){i(e);try{await (0,k.nr)(`/api/offers/${r.id}/report`,{method:"POST",body:{type:e}}),_.oR.success("Merci, c'est signal\xe9 !"),ep(r.id),u()}catch{_.oR.error("Erreur lors du signalement")}finally{i(null)}}};return r?(0,s.jsx)("div",{role:"dialog","aria-label":"Signaler un souci sur l'offre",className:"fixed inset-x-0 bottom-4 z-50 flex justify-center px-4 report-rise",children:(0,s.jsxs)("div",{className:"flex max-w-md items-center gap-3 rounded-xl border border-border bg-card/95 px-4 py-3 shadow-xl shadow-shadow/15 backdrop-blur",children:[(0,s.jsxs)("div",{className:"min-w-0 text-sm",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Un souci avec "}),(0,s.jsx)("span",{className:"font-semibold text-foreground",children:r.label}),(0,s.jsx)("span",{className:"text-muted-foreground",children:" ?"})]}),(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:el.map(({key:e,label:t})=>(0,s.jsx)("button",{onClick:()=>m(e),disabled:null!==a,className:(0,L.cn)("rounded-md border border-border/60 px-2.5 py-1 text-xs font-medium text-foreground/80 transition-colors","hover:border-warning/50 hover:bg-warning/10 hover:text-warning-emphasis disabled:opacity-50"),children:a===e?"…":t},e))}),(0,s.jsx)("button",{onClick:()=>{r&&ep(r.id),u()},"aria-label":"Fermer",className:"ml-1 flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground",children:(0,s.jsx)(ei.A,{className:"h-3.5 w-3.5"})})]})}):null}var eh=r(75340);let eg={fresh:{label:"V\xe9rifi\xe9e r\xe9cemment",className:"border-success/30 bg-success/10 text-success"},aging:{label:"V\xe9rification \xe0 confirmer",className:"border-warning/30 bg-warning/10 text-warning-emphasis"},stale:{label:"V\xe9rification ancienne",className:"border-destructive/30 bg-destructive/10 text-destructive"},unknown:{label:"Non encore v\xe9rifi\xe9e",className:"border-border/70 bg-secondary/30 text-muted-foreground"}};function eb(e,t,r=Date.now()){if("indeterminate"===t)return null;let s=function(e,t=Date.now()){if(!e)return"unknown";let r=new Date(e).getTime();if(!Number.isFinite(r))return"unknown";let s=Math.max(0,t-r);return s<=72e5?"fresh":s<=864e5?"aging":"stale"}(e,r);return"unknown"===s?null:eg[s]}var ej=r(30017),ev=r(34514);let eN={offers:[],refreshed_at:null,stale:!1,reason:null};function ey(e){return!0===e.link_only}function e_(e){return null!=e&&Number.isFinite(e)&&e>0?e:null}function ew(e){let t=e_(e);return null==t?"—":(0,L.$g)(t)}function ek(e,t,r,s){if(null==e_(e.last_price))return{quote:null,label:"Prix indisponible",missingProductPrice:!0};let n=(0,ej.Rt)(e,{fee:t,free:r,tiers:s});return n?{quote:n,label:`${n.isMinimum?"d\xe8s ":""}${(0,L.$g)(n.total)}`,missingProductPrice:!1}:{quote:null,label:"vendeur_tiers"===e.category?"Livraison inconnue":"\xc0 calculer",missingProductPrice:!1}}function eC(e,t,r,s){return(0,ej.Rt)(e,{fee:t,free:r,tiers:s})?.total??1/0}function e$(e){return e.merchant_name?.trim()??""}function eS(e){return e.seller_business?"Professionnel":"Particulier fiable"}function eA(e,t,r){let s=t?` ${t}`:"";return`Voir l'offre${s} chez ${e}${r?" — lien affili\xe9":""}`}function eP({product:e,highlightOfferId:t,highlightSite:r,outboundSource:a="offer_table",caseBoosterCount:i=null,initialEbayOffers:l=eN,onEbayDataChange:d}){let c=(0,B.U)(),u=(0,o.useRef)(new Map),[m,x]=(0,o.useState)(null),[h,g]=(0,o.useState)("delivered"),[b,j]=(0,o.useState)(!1),[v,N]=(0,o.useState)(l),y=d?l:v,_=y.offers,k="case"===e.product_type,S=e.case_packaging?.quantity??null,A=e=>S&&null!=e_(e)?(0,L.$g)(e/S):null,P=e=>i&&null!=e_(e)?(0,L.$g)(e/i):null,M=(0,o.useCallback)((t,r)=>{var s,n;if((0,Y.IZ)({placement:"product_offer",product_id:e.id,offer_id:t.id,merchant:r.site,price:r.price??-1,affiliated:r.affiliated,is_best_price:r.isCheapest}),s=r.site,n=r.stockStatus,"amazon"===s&&"invitation"===n)return;let a={...t,clickedAt:Date.now()};em(a),x(a)},[e.id]),T=(0,o.useMemo)(()=>(0,ej.sm)(e.offers.filter(e=>e.active)),[e.offers]),D=(0,o.useMemo)(()=>T.filter(ey),[T]),q=(0,o.useMemo)(()=>T.filter(e=>!ey(e)),[T]),F=(0,o.useMemo)(()=>q.filter(et.pI),[q]),V=(0,o.useMemo)(()=>q.filter(e=>!(0,et.pI)(e)),[q]),U=0===F.length&&V.length>0,G=b||U,H=F.reduce((e,t)=>
1(0,et.dN)(t)&&null!=t.last_price&&(null==e||t.last_price<e)?t.last_price:e,null),J=(0,o.useMemo)(()=>{let e=null;for(let t of F){let r=(0,ej.Rt)(t,c[t.site],!0);r&&(!e||r.total<e.total)&&(e={id:t.id,total:r.total})}return e?.id??null},[F,c]),Z=(0,o.useMemo)(()=>_.reduce((e,t)=>!e||t.delivered_price_eur<e.delivered_price_eur?t:e,null),[_]),W=(0,o.useMemo)(()=>_.reduce((e,t)=>!e||t.item_price_eur<e.item_price_eur?t:e,null),[_]),X=(0,o.useMemo)(()=>{let e=F.find(e=>e.id===J);return e?(0,ej.Rt)(e,c[e.site],!0)?.total??null:null},[F,J,c]),K=null!=Z&&(null==X||Z.delivered_price_eur<X),Q=(0,o.useCallback)(e=>{d?d(e):N(e)},[d]),er=(0,s.jsx)(I,{productId:e.id,initial:y,onDataChange:Q,bootstrapOnly:!0}),es=Z?(0,s.jsx)(I,{productId:e.id,initial:y,best:K}):null,en=(0,o.useMemo)(()=>[..._].sort((e,t)=>"item"===h?e.item_price_eur-t.item_price_eur:"merchant"===h?e.title.localeCompare(t.title,"fr"):e.delivered_price_eur-t.delivered_price_eur).slice(0,10),[_,h]),ei=(0,o.useMemo)(()=>(G?[...F,...V,...D]:[...F,...D]).sort((e,t)=>{let r=Number((0,et.pI)(t))-Number((0,et.pI)(e));if(0!==r)return r;if(e.catalog_product_is_assorted!==t.catalog_product_is_assorted)return e.catalog_product_is_assorted?1:-1;if("merchant"===h){let r=n.ej[e.site]?.label??e.site,s=n.ej[t.site]?.label??t.site;return r.localeCompare(s,"fr")}return"item"===h?(e.last_price??1/0)-(t.last_price??1/0):eC(e,c[e.site]?.fee,c[e.site]?.free,c[e.site]?.tiers)-eC(t,c[t.site]?.fee,c[t.site]?.free,c[t.site]?.tiers)||(e.last_price??1/0)-(t.last_price??1/0)}),[F,c,G,D,h,V]),el=(0,o.useMemo)(()=>{let e=ei.map(e=>({kind:"retail",offer:e}));if(k)return[...en.map(e=>({kind:"ebay-offer",offer:e})),...e];if(!Z||!W)return e;let t="item"===h?W.item_price_eur:Z.delivered_price_eur,r=ei.findIndex(e=>{if(!(0,et.pI)(e)||ey(e))return!0;let r=n.ej[e.site]?.label??e.site;if("merchant"===h)return 0>"eBay".localeCompare(r,"fr");let s="item"===h?e.last_price??1/0:eC(e,c[e.site]?.fee,c[e.site]?.free,c[e.site]?.tiers);return t<s||t===s&&0>"eBay".localeCompare(r,"fr")});return e.splice(r<0?e.length:r,0,{kind:"ebay-panel"}),e},[c,Z,W,en,k,h,ei]),eo=(null!=t?T.find(e=>e.id===t):null)??(r?T.find(e=>e.site===r):null),ed=eo?.id??null;return((0,o.useEffect)(()=>{eo&&!(0,et.pI)(eo)&&j(!0)},[eo]),(0,o.useEffect)(()=>{if(null==ed||window.matchMedia?.("(pointer: coarse)").matches)return;let e=null,t=!1,r=()=>{t=!0};window.addEventListener("wheel",r,{passive:!0,once:!0});let s=setTimeout(()=>{if(t)return;let r=u.current.get(ed);r&&(r.scrollIntoView({behavior:"smooth",block:"center"}),r.classList.add("spotlight-flash"),e=setTimeout(()=>r.classList.remove("spotlight-flash"),1400))},200);return()=>{clearTimeout(s),e&&clearTimeout(e),window.removeEventListener("wheel",r)}},[ed,b]),0!==T.length||Z)?(0,s.jsxs)(s.Fragment,{children:[er,(0,s.jsxs)("div",{className:"mb-5 flex flex-col justify-between gap-4 sm:flex-row sm:items-end",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-mono text-[10px] font-semibold uppercase tracking-wider text-primary",children:"Comparateur"}),(0,s.jsx)("h2",{className:"mt-1 text-lg font-semibold",children:U?"Marchands r\xe9f\xe9renc\xe9s":"Offres disponibles"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("label",{className:"flex h-10 items-center gap-3 rounded-lg border border-input bg-card px-3 text-xs shadow-sm focus-within:border-ring focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Trier par"}),(0,s.jsxs)("select",{value:h,onChange:e=>g(e.target.value),className:"min-w-40 bg-transparent font-semibold outline-none","aria-label":"Trier les offres",children:[(0,s.jsx)("option",{value:"item",children:"Prix hors livraison"}),(0,s.jsx)("option",{value:"delivered",children:"Prix livraison comprise"}),(0,s.jsx)("option",{value:"merchant",children:"Boutique"})]})]}),V.length>0&&!U&&(0,s.jsxs)("button",{type:"button",onClick:()=>j(e=>!e),"aria-expanded":b,className:"inline-flex h-10 items-center gap-2 rounded-lg border bg-card px-3 text-xs font-semibold text-muted-foreground shadow-sm transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[(0,s.jsx)(ea.A,{className:"h-3.5 w-3.5"}),b?"Masquer les ruptures":`Afficher ${V.length} rupture${V.length>
11?"s":""}`,(0,s.jsx)(p.A,{className:(0,L.cn)("h-3.5 w-3.5 transition-transform",b&&"rotate-180")})]})]})]}),U&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-dashed bg-secondary/20 px-4 py-3 text-sm text-muted-foreground",children:"Aucun stock disponible actuellement. Consultez les derni\xe8res pages produit connues chez nos marchands pour v\xe9rifier un \xe9ventuel retour."}),0!==ei.length||Z?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"space-y-2 xl:hidden",children:el.map(e=>{if("ebay-panel"===e.kind)return(0,s.jsx)("div",{children:es},"ebay");if("ebay-offer"===e.kind){let t=e.offer,r=t.id===W?.id,n=t.id===Z?.id,a="item"===h?r:"delivered"===h&&n;return(0,s.jsxs)("article",{"data-ebay-offer-id":t.id,className:(0,L.cn)("rounded-lg border p-3",a&&"border-success/25 bg-success/[0.04]"),children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[t.image_url?(0,s.jsx)(E.ZoomImage,{src:t.image_url,alt:t.title,className:"h-20 w-20 shrink-0 cursor-zoom-in rounded-md border bg-white",imgClassName:"object-contain",sizes:"80px",previewSize:360}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)(w.hY,{site:"ebay",variant:"offer"}),(0,s.jsx)("span",{className:"rounded border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[9px] font-bold uppercase text-primary-emphasis",children:"Marketplace"}),a?(0,s.jsx)("span",{className:"rounded bg-success/10 px-1.5 py-0.5 text-[9px] font-semibold text-success",children:"item"===h?"Meilleur prix produit":"Meilleur total livr\xe9"}):null]}),(0,s.jsx)("p",{className:"mt-2 line-clamp-2 text-xs font-medium leading-5",title:t.title,children:t.title}),(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:[eS(t)," \xb7 ",t.seller_feedback_pct.toLocaleString("fr-FR"),"% positifs \xb7 ",t.seller_feedback_score.toLocaleString("fr-FR")," \xe9valuations"]})]})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-end justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{className:(0,L.cn)("block font-mono text-base tabular-nums",a&&"text-success"),children:(0,L.$g)("item"===h?t.item_price_eur:t.delivered_price_eur)}),(0,s.jsx)("span",{className:"block text-[10px] text-muted-foreground",children:"item"===h?`Livr\xe9 ${(0,L.$g)(t.delivered_price_eur)}`:`Produit ${(0,L.$g)(t.item_price_eur)}`})]}),(0,s.jsxs)("div",{className:"max-w-48 text-center",children:[(0,s.jsxs)("a",{href:t.go_url,"data-outbound-impression":!0,target:"_blank",rel:"nofollow sponsored noopener","aria-label":`Voir cette offre eBay : ${t.title} — lien r\xe9mun\xe9r\xe9`,title:`Voir cette offre eBay : ${t.title} — lien r\xe9mun\xe9r\xe9`,onClick:()=>M({id:t.id,label:"eBay"},{site:"ebay",price:t.item_price_eur,affiliated:!0,isCheapest:r}),className:"inline-flex h-9 shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),(0,s.jsx)(z,{className:"mt-1"})]})]})]},`ebay-${t.id}`)}let t=e.offer,r=n.ej[t.site],i=(0,C.bA)(t,a),l=r?.label??t.site,o=e$(t);if(ey(t)){let e="grande_enseigne"!==t.category?n.wk[t.category]:null;return(0,s.jsx)("article",{className:(0,L.cn)("rounded-lg border p-3",eo?.id===t.id&&"outline outline-1 outline-primary/45"),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(w.hY,{site:t.site,variant:"offer"}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-semibold",children:r?.label??"Amazon"}),e&&(0,s.jsx)("span",{className:(0,L.cn)("rounded border px-1.5 py-0.5 text-[9px] font-bold uppercase",e.activeClass),children:e.short})]})]}),(0,s.jsxs)("a",{href:i.href,target:"_blank",rel:i.affiliated?"nofollow sponsored noopener":"nofollow noreferrer noopener","aria-label":eA(l,o,i.affiliated),title:eA(l,o,i.affiliated),className:"inline-flex h-9 shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5"})]})]})},t.id)}let d="grande_enseigne"!==t.category?n.wk[t.category]:null,u=`${l}${d?` ${d.short}`:""}`,m=(0,et.XG)(t),x=n.Uz[m],g=(0,et.dN)(t)&&null!=t.last_price&&null!=H&&t.last_price===H,b=t.id===J,j="item"===h?g:"delivered"===h&&b,v="vendeur_tiers"===t.category?void 0:c[t.site],{quote:N,label:y,missingProductPrice:_}=ek(t,v?.fee,v?.free,v?.tiers),k=eb(t.last_verified_at,t.last_verification_status);return(0,s.jsxs)("article",{className:(0,L.cn)("rounded-lg border p-3",j&&"border-success/25 bg-success/[0.04]",!(0,et.pI)(t)&&"border-dashed bg-secondary/10 opacity-75",eo?.id===t.id&&"outline outline-1 outline-primary/45"),children:[(0,s.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[(0,s.jsx)(w.hY,{site:t.site,variant:"offer"}),(0,s.jsxs)("div",{className:"min-w-0",children:[!(0,w.x3)(t.site)&&(0,s.jsx)("span",{className:"block break-words text-sm font-semibold leading-5",children:r?.label??t.site}),d&&(0,s.jsx)("span",{className:(0,L.cn)("mt-1 inline-flex rounded border px-1.5 py-0.5 text-[9px] font-bold uppercase",d.activeClass),children:d.short}),(0,s.jsx)(ev.A,{offer:t,merchant:l}),o&&(0,s.jsx)("div",{className:"mt-1 truncate text-[10px] text-muted-foreground",children:o})]})]}),(0,s.jsxs)("div",{className:"min-w-[5.75rem] text-right",children:[(0,s.jsx)("strong",{className:(0,L.cn)("block font-mono text-base tabular-nums",j?"text-success":"text-foreground"),children:"delivered"===h?y:ew(t.last_price)}),(0,s.jsx)("span",{className:"block text-[10px] leading-4 text-muted-foreground",children:"delivered"===h?(0,s.jsxs)(s.Fragment,{children:["TTC livr\xe9",(0,s.jsx)("br",{}),"Produit ",ew(t.last_price)]}):(0,s.jsxs)(s.Fragment,{children:["Prix produit",(0,s.jsx)("br",{}),"Livr\xe9 ",y]})})]})]}),(0,s.jsxs)("div",{className:"mt-3 flex items-end justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsxs)("span",{className:(0,L.cn)("inline-flex items-center gap-1 rounded border px-1.5 py-1 font-mono text-[10px]",x.bg,x.text),children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",x.dot)}),x.label]}),j&&(0,s.jsx)("span",{className:"rounded bg-success/10 px-1.5 py-1 text-[10px] font-semibold text-success",children:"item"===h?"Meilleur prix produit":"Meilleur total livr\xe9"}),k&&(0,s.jsx)("span",{className:(0,L.cn)("rounded border px-1.5 py-1 text-[10px]",k.className),children:k.label})]}),(t.delivery_delay||v?.time||t.delivery_fee||v?.fee)&&(0,s.jsxs)("details",{className:"group mt-2",children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-[10px] text-muted-foreground",children:["D\xe9tails livraison",(0,s.jsx)(p.A,{className:"h-3 w-3 transition-transform group-open:rotate-180"})]}),(0,s.jsxs)("div",{className:"mt-2 rounded-md border bg-secondary/30 p-2 text-[10px] leading-4 text-muted-foreground",children:[(0,s.jsxs)("p",{children:["Produit ",ew(t.last_price),N?` + livraison ${(0,L.$g)(N.fee)} = ${y}`:_?" \xb7 prix produit indisponible":" \xb7 port \xe0 calculer"]}),(0,s.jsxs)("p",{children:["D\xe9lai : ",(0,O.mw)(t.delivery_delay??v?.time)??"non communiqu\xe9"]}),(v?.free||t.delivery_fee)&&(0,s.jsx)("p",{children:v?.free?`Port offert ${(0,O.mw)(v.free)}`:(0,O.mw)(t.delivery_fee)})]})]})]}
1),(0,s.jsxs)("a",{href:i.href,"data-outbound-impression":!0,target:"_blank",rel:i.affiliated?"nofollow sponsored noopener":"nofollow noreferrer noopener","aria-label":eA(l,o,i.affiliated),title:eA(l,o,i.affiliated),onClick:e=>{(0,$.XZ)(e.currentTarget,i),M({id:t.id,label:u},{site:t.site,stockStatus:t.stock_status,price:t.last_price,affiliated:i.affiliated,isCheapest:g})},className:"inline-flex h-9 shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5"})]})]})]},t.id)})}),(0,s.jsxs)("div",{className:"hidden xl:block",children:[(S||i)&&(0,s.jsxs)("p",{className:"mb-3 text-right text-[10px] text-muted-foreground",children:[S&&(0,s.jsxs)(s.Fragment,{children:[S.toLocaleString("fr-FR")," produits dans la CASE"]}),S&&i&&(0,s.jsx)(s.Fragment,{children:" \xb7 "}),i&&(0,s.jsxs)(s.Fragment,{children:[i.toLocaleString("fr-FR")," boosters au total"]})," \xb7 prix unitaires indiqu\xe9s sous chaque montant"]}),(0,s.jsxs)("table",{className:"w-full table-fixed",children:[(0,s.jsxs)("caption",{className:"sr-only",children:["Comparaison des prix, stocks et conditions de livraison pour ",(0,ee.t)(e.name,e.tcg)]}),(0,s.jsxs)("colgroup",{children:[(0,s.jsx)("col",{className:"w-[15%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[22%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[10%]"}),(0,s.jsx)("col",{className:"w-[14%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[12%]"})]}),(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b border-border/60",children:[(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-left font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Boutique"}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-left font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Statut"}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-left font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Nom de l'offre",(0,s.jsx)(eh.I,{label:"\xc0 propos du nom de l’offre",align:"start",children:"D\xe9signation relev\xe9e sur la page du marchand. Elle peut diff\xe9rer du nom normalis\xe9 dans le catalogue PrixTCG."})]})}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Prix produit"}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:(0,s.jsxs)("span",{className:"inline-flex items-center justify-center gap-1",children:["Total livr\xe9",(0,s.jsx)(eh.I,{label:"Comprendre le total livr\xe9",children:"Prix du produit additionn\xe9 au tarif de livraison standard connu pour la France m\xe9tropolitaine."})]})}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:(0,s.jsxs)("span",{className:"inline-flex items-center justify-center gap-1",children:["Livraison",(0,s.jsx)(eh.I,{label:"Comprendre les informations de livraison",children:"D\xe9lai et frais indicatifs pour une livraison standard. Le montant final d\xe9pend du panier et de l’adresse."})]})}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:(0,s.jsxs)("span",{className:"inline-flex items-center justify-center gap-1",children:["V\xe9rifi\xe9",(0,s.jsx)(eh.I,{label:"Comprendre l’\xe9tat de v\xe9rification",align:"end",children:"Indique la fra\xeecheur de la derni\xe8re v\xe9rification concluante. Le prix et le stock du marchand font foi."})]})}),(0,s.jsx)("th",{scope:"col",className:"px-2 pb-3",children:(0,s.jsx)("span",{className:"sr-only",children:"Acc\xe9der \xe0 l’offre"})})]})}),(0,s.jsx)("tbody",{children:el.map(e=>{if("ebay-panel"===e.kind)return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:8,className:"border-b py-2",children:es})},"ebay");if("ebay-offer"===e.kind){let t=e.offer,r=t.id===W?.id,n=t.id===Z?.id,a="item"===h?r:"delivered"===h&&n;return(0,s.jsxs)("tr",{"data-ebay-offer-id":t.id,className:(0,L.cn)("h-[112px] border-b border-border/40 transition-colors hover:bg-secondary/30",a&&"bg-success/[0.04]"),children:[(0,s.jsx)("td",{className:"px-2 py-4 align-middle",children:(0,s.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,s.jsx)(w.hY,{site:"ebay",className:"mt-0.5",variant:"offer"}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("strong",{className:"block truncate text-sm text-foreground",children:"eBay"}),(0,s.jsx)("span",{className:"mt-1 inline-flex rounded border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-[9px] font-bold uppercase text-primary-emphasis",children:"Marketplace"})]})]})}),(0,s.jsx)("td",{className:"px-2 py-4",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border bg-success/10 px-2 py-1 font-mono text-[9px] font-semibold uppercase text-success",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-success","aria-hidden":"true"}),"En stock"]})}),(0,s.jsx)("td",{className:"px-2 py-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[t.image_url?(0,s.jsx)(E.ZoomImage,{src:t.image_url,alt:t.title,className:"h-14 w-14 shrink-0 cursor-zoom-in rounded-md border bg-white",imgClassName:"object-contain",sizes:"56px",previewSize:360}):null,(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"line-clamp-2 text-xs leading-5 text-foreground",title:t.title,children:t.title}),(0,s.jsxs)("span",{className:"mt-1 block text-[9px] text-muted-foreground",children:[eS(t)," \xb7 ",t.seller_feedback_pct.toLocaleStr
1ing("fr-FR"),"% positifs \xb7 ",t.seller_feedback_score.toLocaleString("fr-FR")," \xe9valuations"]})]})]})}),(0,s.jsxs)("td",{className:"px-2 py-4 text-center",children:[(0,s.jsx)("strong",{className:(0,L.cn)("font-mono text-base font-semibold tabular-nums",r&&"text-success"),children:(0,L.$g)(t.item_price_eur)}),A(t.item_price_eur)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[A(t.item_price_eur)," / produit"]}),P(t.item_price_eur)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[P(t.item_price_eur)," / booster"]})]}),(0,s.jsxs)("td",{className:"px-2 py-4 text-center",children:[(0,s.jsx)("strong",{className:(0,L.cn)("font-mono text-base font-semibold tabular-nums",n&&"text-success"),children:(0,L.$g)(t.delivered_price_eur)}),A(t.delivered_price_eur)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[A(t.delivered_price_eur)," / produit livr\xe9"]}),P(t.delivered_price_eur)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[P(t.delivered_price_eur)," / booster livr\xe9"]}),"delivered"===h&&n?(0,s.jsx)("span",{className:"mt-0.5 block text-[9px] font-semibold text-success",children:"Meilleur total livr\xe9"}):null]}),(0,s.jsx)("td",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:0===t.shipping_price_eur?"Livraison offerte":`${(0,L.$g)(t.shipping_price_eur)} de port`}),(0,s.jsx)("td",{className:"px-2 py-4 text-center",children:(0,s.jsx)("span",{className:"rounded border border-success/25 bg-success/10 px-2 py-1 text-[9px] font-semibold uppercase text-success",children:"R\xe9cent"})}),(0,s.jsx)("td",{className:"px-2 py-4 text-right",children:(0,s.jsxs)("div",{className:"ml-auto max-w-44 text-center",children:[(0,s.jsxs)("a",{href:t.go_url,"data-outbound-impression":!0,target:"_blank",rel:"nofollow sponsored noopener","aria-label":`Voir cette offre eBay : ${t.title} — lien r\xe9mun\xe9r\xe9`,title:`Voir cette offre eBay : ${t.title} — lien r\xe9mun\xe9r\xe9`,onClick:()=>M({id:t.id,label:"eBay"},{site:"ebay",price:t.item_price_eur,affiliated:!0,isCheapest:r}),className:"inline-flex min-h-10 items-center justify-center gap-1 whitespace-nowrap rounded-lg bg-primary px-2 text-[11px] font-semibold text-primary-foreground shadow-sm transition-all hover:-translate-y-px hover:brightness-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),(0,s.jsx)(z,{className:"mt-1"})]})})]},`ebay-${t.id}`)}let t=e.offer,r=n.ej[t.site],i=(0,C.bA)(t,a),l=r?.label??t.site,o=e$(t),d="grande_enseigne"!==t.category?n.wk[t.category]:null;if(ey(t)){let e=eA(l,o,i.affiliated);return(0,s.jsxs)("tr",{ref:e=>{e?u.current.set(t.id,e):u.current.delete(t.id)},"data-offer-id":t.id,"data-offer-site":t.site,className:(0,L.cn)("h-[92px] border-b border-border/40 transition-colors hover:bg-secondary/30",eo?.id===t.id&&"outline outline-1 -outline-offset-1 outline-primary/45"),children:[(0,s.jsx)("td",{className:"px-2 py-4 align-middle",children:(0,s.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,s.jsx)(w.hY,{site:t.site,className:"mt-0.5",variant:"offer"}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("strong",{className:"block truncate text-sm",children:l}),d&&(0,s.jsxs)("span",{"aria-label":d.label,className:(0,L.cn)("mt-1 inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wide",d.activeClass),children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",d.dot),"aria-hidden":"true"}),d.short]})]})]})}),(0,s.jsx)("td",{className:"px-2 py-4 text-xs text-muted-foreground",children:"Lien seul"}),(0,s.jsx)("td",{className:"px-2 py-4 text-sm leading-5",children:o}),(0,s.jsx)("td",{className:"px-2 py-4 text-center text-muted-foreground",children:"—"}),(0,s.jsx)("td",{className:"px-2 py-4 text-center text-muted-foreground",children:"—"}),(0,s.jsx)("td",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:"Chez le marchand"}),(0,s.jsx)("td",{className:"px-2 py-4 text-center text-muted-foreground",children:"—"}),(0,s.jsx)("td",{className:"px-2 py-4 text-right",children:(0,s.jsxs)("a",{href:i.href,target:"_blank",rel:i.affiliated?"nofollow sponsored noopener":"nofollow noreferrer noopener","aria-label":e,title:e,className:"inline-flex min-h-10 items-center justify-center gap-1 whitespace-nowrap rounded-lg bg-primary px-2 text-[11px] font-semibold text-primary-foreground shadow-sm transition-all hover:-translate-y-
1px hover:brightness-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})]})})]},t.id)}let m=(0,et.XG)(t),x=n.Uz[m],g=(0,et.dN)(t)&&null!=t.last_price&&null!=H&&t.last_price===H,b=t.id===J,j="item"===h?g:"delivered"===h&&b,v="vendeur_tiers"===t.category?void 0:c[t.site],{quote:N,label:y,missingProductPrice:_}=ek(t,v?.fee,v?.free,v?.tiers),k=(0,O.mw)(t.delivery_delay??v?.time)??"D\xe9lai inconnu",S=N?`${N.isMinimum?"d\xe8s ":""}${(0,L.$g)(N.fee)}`:(0,O.mw)(t.delivery_fee??v?.fee)??"Port \xe0 calculer",I=eb(t.last_verified_at,t.last_verification_status),T=eA(l,o,i.affiliated);return(0,s.jsxs)("tr",{ref:e=>{e?u.current.set(t.id,e):u.current.delete(t.id)},"data-offer-id":t.id,"data-offer-site":t.site,className:(0,L.cn)("h-[104px] border-b border-border/40 transition-colors hover:bg-secondary/30",j&&"bg-success/[0.04]",!(0,et.pI)(t)&&"bg-secondary/10 text-muted-foreground",eo?.id===t.id&&"outline outline-1 -outline-offset-1 outline-primary/45"),children:[(0,s.jsx)("td",{className:"px-2 py-4 align-middle",children:(0,s.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,s.jsx)(w.hY,{site:t.site,className:"mt-0.5",variant:"offer"}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("strong",{className:"block truncate text-sm text-foreground",children:l}),(0,s.jsx)(ev.A,{offer:t,merchant:l}),d&&(0,s.jsxs)("span",{"aria-label":d.label,className:(0,L.cn)("mt-1 inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wide",d.activeClass),children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",d.dot),"aria-hidden":"true"}),d.short]})]})]})}),(0,s.jsx)("td",{className:"px-2 py-4",children:(0,s.jsxs)("span",{className:(0,L.cn)("inline-flex items-center gap-1 rounded border px-2 py-1 font-mono text-[9px] font-semibold uppercase",x.bg,x.text),children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",x.dot),"aria-hidden":"true"}),x.label]})}),(0,s.jsx)("td",{className:"px-2 py-4",children:o&&(0,s.jsxs)("div",{className:"flex items-start gap-1",children:[(0,s.jsx)("span",{className:"line-clamp-2 text-sm leading-5 text-foreground",children:o}),(0,s.jsxs)(eh.I,{label:`Voir le nom complet de l’offre chez ${l}`,align:"end",side:"top",className:"mt-0.5",children:[(0,s.jsxs)("span",{className:"block font-medium",children:["Nom relev\xe9 chez ",l]}),(0,s.jsx)("span",{className:"mt-1 block text-muted-foreground",children:o})]})]})}),(0,s.jsxs)("td",{className:"px-2 py-4 text-center",children:[(0,s.jsx)("strong",{className:(0,L.cn)("font-mono text-base font-semibold tabular-nums text-foreground",g&&"text-success"),children:ew(t.last_price)}),A(t.last_price)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[A(t.last_price)," / produit"]}),P(t.last_price)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[P(t.last_price)," / booster"]})]}),(0,s.jsxs)("td",{className:"px-2 py-4 text-center",children:[(0,s.jsx)("strong",{className:(0,L.cn)("font-mono text-base font-semibold tabular-nums text-foreground",b&&"text-success"),children:y}),A(N?.total)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[A(N?.total)," / produit livr\xe9"]}),P(N?.total)&&(0,s.jsxs)("span",{className:"mt-0.5 block text-[9px] text-muted-foreground",children:[P(N?.total)," / booster livr\xe9"]}),"delivered"===h&&b&&(0,s.jsx)("span",{className:"mt-0.5 block text-[9px] font-semibold text-success",children:"Meilleur total livr\xe9"})]}),(0,s.jsx)("td",{className:"px-2 py-4",children:(0,s.jsxs)("div",{className:"flex items-start justify-center gap-1.5",children:[(0,s.jsx)(R.A,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,s.jsxs)("span",{className:"min-w-0 text-left",children:[(0,s.jsxs)("details",{className:"group relative",children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-xs font-medium text-foreground",children:[(0,s.jsx)("span",{children:k}),(0,s.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 transition-transform group-open:rotate-180","aria-hidden":"true"})]}),(0,s.jsxs)("div",{className:"absolute bottom-full right-0 z-20 mb-2 w-64 roun
1ded-md border bg-popover p-3 text-left text-[11px] leading-4 text-popover-foreground shadow-lg",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Produit ",ew(t.last_price),N?` + livraison ${(0,L.$g)(N.fee)} = ${y}`:_?" \xb7 prix produit indisponible":" \xb7 port \xe0 calculer"]}),(0,s.jsxs)("p",{className:"mt-1 text-muted-foreground",children:["D\xe9lai : ",k]}),v?.free&&(0,s.jsxs)("p",{className:"text-success",children:["Port offert ",(0,O.mw)(v.free)]})]})]}),(0,s.jsxs)("span",{className:"mt-1 flex items-center gap-0.5 text-[10px] text-muted-foreground",children:[S,(0,s.jsx)(eh.I,{label:`D\xe9tail des frais de livraison chez ${l}`,align:"end",side:"top",children:N?`Le total affich\xe9 additionne ${ew(t.last_price)} de produit et ${(0,L.$g)(N.fee)} de livraison.`:"Les frais exacts seront calcul\xe9s par le marchand selon le panier et l’adresse."})]})]})]})}),(0,s.jsx)("td",{className:"px-2 py-4 text-center",children:(0,s.jsx)("div",{className:"flex flex-col items-center gap-1",children:I?(0,s.jsxs)("span",{"aria-label":I.label,className:(0,L.cn)("rounded border px-2 py-1 text-[9px] font-semibold uppercase",I.className),children:[(0,s.jsx)("span",{className:"sr-only",children:I.label}),(0,s.jsx)("span",{"aria-hidden":"true",children:"V\xe9rifi\xe9e r\xe9cemment"===I.label?"R\xe9cent":"V\xe9rification ancienne"===I.label?"Ancien":"\xc0 confirmer"})]}):(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"})})}),(0,s.jsx)("td",{className:"px-2 py-4 text-right",children:(0,s.jsxs)("a",{href:i.href,"data-outbound-impression":!0,target:"_blank",rel:i.affiliated?"nofollow sponsored noopener":"nofollow noreferrer noopener","aria-label":T,title:T,onClick:e=>{(0,$.XZ)(e.currentTarget,i),M({id:t.id,label:l},{site:t.site,stockStatus:t.stock_status,price:t.last_price,affiliated:i.affiliated,isCheapest:g})},className:"inline-flex min-h-10 items-center justify-center gap-1 whitespace-nowrap rounded-lg bg-primary px-2 text-[11px] font-semibold text-primary-foreground shadow-sm transition-all hover:-translate-y-px hover:brightness-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:["Voir l'offre",(0,s.jsx)(f.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})]})})]},t.id)})})]})]})]}):(0,s.jsx)("div",{className:"flex h-24 items-center justify-center rounded-lg border border-dashed text-sm text-muted-foreground",children:"Aucune offre en stock actuellement"}),k&&en.length>0?(0,s.jsx)("p",{className:"mt-3 text-[9px] leading-relaxed text-muted-foreground",children:"Marketplace eBay \xb7 jusqu'\xe0 10 annonces de cartons fabricant scell\xe9s, neuves et en achat imm\xe9diat. Chaque annonce eBay est v\xe9rifi\xe9e s\xe9par\xe9ment et reste exclue de l'historique de prix retail."}):null,(0,s.jsx)("p",{className:"mt-3 text-[9px] leading-relaxed text-muted-foreground",children:"Le total livr\xe9 utilise le frais communiqu\xe9 par l’offre ou, \xe0 d\xe9faut, le bar\xe8me standard du marchand. Les montants \xab d\xe8s \xbb restent indicatifs et peuvent varier selon le panier ou l’adresse."}),(0,s.jsx)(ef,{clickedOffer:m,onResolved:()=>x(null)})]}):(0,s.jsxs)(s.Fragment,{children:[er,(0,s.jsx)("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"Aucun vendeur disponible actuellement"})]})}var eR=r(79694),eE=r(9083),eL=r(76821),ez=r(88772),eI=r(39658),eM=r(79792);let eT=[{key:"image",label:"Image"},{key:"ean",label:"EAN"},{key:"release_date",label:"Date de sortie"},{key:"category",label:"Cat\xe9gorie"},{key:"content",label:"Contenu"}],eD={image:"Expliquez quel visuel devrait \xeatre utilis\xe9 ou ce qui ne correspond pas.",ean:"Indiquez l’EAN correct.",release_date:"Indiquez la date de sortie correcte.",category:"Indiquez la cat\xe9gorie correcte.",content:"Indiquez les s\xe9ries et le nombre de boosters r\xe9ellement inclus."};function eq({product:e,className:t}){let[r,a]=(0,o.useState)(!1),[i,l]=(0,o.useState)(null),[d,c]=(0,o.useState)(""),[u,m]=(0,o.useState)(""),[x,p]=(0,o.useState)(!1),f=(0,o.useMemo)(()=>i?"image"===i?e.image_url?"Image actuellement renseign\xe9e":"Aucune image":"ean"===i?e.ean??"Aucun EAN":"release_date"===i?e.release_date?(0,L.So)(e.release_date,{}):"Aucune date":"category"===i?(0,n.e7)(e.product_type,e.tcg):e.booster_composition?.boosters.length?e.booster_composition.boosters.map(e=>`${e.set_code??e.extension} \xd7${e.quantity}`).join(" \xb7 "):"Aucun contenu renseign\xe9":null,[i,e]),h=()=>{l(null),c(""),m("")},g=async t=>{if(t.preventDefault(),i&&!(d.trim().length<2)){p(!0);try{await (0,ez.k)();let t=await (0,eL.J)("feedback_product_error");await (0,k.nr)("/api/feedback",{method:"POST",body:{kind:"product_error",product_id:e.id,product_field:i,suggested_value:d.trim(),source_url:u.trim()||void 0,recaptcha_token:t}}),_.oR.success("Merci, la correction a bien \xe9t\xe9 signal\xe9e"),a(!1),h()}catch(e){(0,X.N7)("product.errorReport",e),_.oR.error((0,X.Rq)(e,"Signalement impossible."))}finally{p(!1)}}};return(0,s.jsxs)(D.lG,{open:r,onOpenChange:e=>{a(e),e||x||h()},children:[(0,s.jsx)(D.zM,{asChild:!0,children:(0,s.jsxs)(T.$,{variant:"ghost",className:(0,L.cn)("gap-1.5",t),"aria-label":"Signaler une erreur",children:[(0,s.jsx)(eE.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sm:hidden",children:"Signaler"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Signaler une erreur"})]})}),(0,s.jsx)(D.Cf,{className:"max-h-[90vh] overflow-y-auto sm:max-w-xl",children:(0,s.jsxs)("form",{onSubmit:g,children:[(0,s.jsxs)(D.c7,{children:[(0,s.jsx)(D.L3,{children:"Signaler une erreur produit"}),(0,s.jsxs)(D.rr,{children:["Aidez-nous \xe0 corriger \xab ",e.name," \xbb. Une source permet de v\xe9rifier et d’appliquer la correction plus rapidement."]})]}),(0,s.jsxs)("div",{className:"mt-5 space-y-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(eM.J,{children:"Information incorrecte"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:eT.map(e=>
1(0,s.jsx)("button",{type:"button","aria-pressed":i===e.key,onClick:()=>l(e.key),className:(0,L.cn)("rounded-md border px-3 py-2 text-xs font-medium transition-colors",i===e.key?"border-primary bg-primary/10 text-primary-emphasis":"border-border text-muted-foreground hover:bg-secondary hover:text-foreground"),children:e.label},e.key))})]}),i&&f&&(0,s.jsxs)("div",{className:"rounded-md border border-border/60 bg-muted/25 px-3 py-2",children:[(0,s.jsx)("div",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Valeur actuelle"}),(0,s.jsx)("div",{className:"mt-1 text-sm text-foreground/80",children:f})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(eM.J,{htmlFor:"product-error-suggestion",children:"Correction propos\xe9e"}),(0,s.jsx)("textarea",{id:"product-error-suggestion",required:!0,minLength:2,maxLength:2e3,value:d,onChange:e=>c(e.target.value),placeholder:i?eD[i]:"S\xe9lectionnez d’abord l’information incorrecte.",disabled:!i||x,className:"min-h-28 w-full resize-y rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(eM.J,{htmlFor:"product-error-source",children:"Source recommand\xe9e"}),(0,s.jsx)(eI.p,{id:"product-error-source",type:"url",value:u,onChange:e=>m(e.target.value),placeholder:"https://site-officiel-ou-marchand.fr/produit",disabled:x}),(0,s.jsx)("p",{className:"text-xs leading-5 text-muted-foreground",children:"De pr\xe9f\xe9rence une page officielle ou une fiche marchand montrant clairement l’information correcte."})]})]}),(0,s.jsx)(D.Es,{className:"mt-6",children:(0,s.jsxs)(T.$,{type:"submit",disabled:!i||d.trim().length<2||x,children:[x&&(0,s.jsx)(b.A,{className:"h-4 w-4 animate-spin"}),x?"Envoi…":"Envoyer le signalement"]})})]})})]})}var eF=r(17082),eO=r(41757);function eB({product:e}){let t=e.available_cases??[],r=e.case_packaging?.contained_product;return 0!==t.length||r?(0,s.jsx)("aside",{"aria-label":"Relation avec les CASE scell\xe9es",className:"mt-4 rounded-lg border border-primary/25 bg-primary/[0.04] p-3",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"mt-0.5 rounded-md bg-primary/10 p-2 text-primary-emphasis","aria-hidden":"true",children:(0,s.jsx)(eF.A,{className:"size-4"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-foreground",children:r?"CASE fabricant scell\xe9e":"Disponible aussi en CASE scell\xe9e"}),r?(0,s.jsxs)(u(),{href:(0,eO.p0)({...r,normalized_name:r.name}),prefetch:!1,className:"mt-1.5 block w-fit text-sm font-semibold text-primary underline-offset-4 hover:underline",children:["Contient ",e.case_packaging?.quantity," \xd7 ",r.name]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Le carton fabricant pour acheter plusieurs exemplaires scell\xe9s."}),(0,s.jsx)("div",{className:"mt-2 flex flex-col gap-1.5",children:t.map(e=>(0,s.jsxs)(u(),{href:(0,eO.p0)({...e.case_product,normalized_name:e.case_product.name}),prefetch:!1,className:"w-fit text-sm font-semibold text-primary underline-offset-4 hover:underline",children:[e.case_product.name," \xb7 ",e.quantity," \xd7 ce produit"]},e.case_product.id))})]})]})]})}):null}var eV=r(88766),eU=r(10234),eG=r(90769),eH=r(54869),eJ=r(43447),eZ=r(69624),eY=r(46395),eW=r(97625),eX=r(97212),eK=r(1937);let eQ="anonymous-signup-prompt:viewed-products",e0="anonymous-signup-prompt:shown",e1="anonymous-signup-prompt:dismissed-at";function e5({productId:e,nextPath:t,disabled:r=!1}){let[n,a]=(0,o.useState)(!1),i=(0,o.useMemo)(()=>`/register?next=${encodeURIComponent(t)}`,[t]),l=(0,o.useMemo)(()=>`/login?next=${encodeURIComponent(t)}`,[t]),d=(0,o.useMemo)(()=>`/api/auth/google/start?next=${encodeURIComponent(t)}`,[t]),c=(0,o.useMemo)(()=>`/api/auth/discord/login/start?next=${encodeURIComponent(t)}&source=register`,[t]);function m(e){if(a(e),!e&&n){try{window.localStorage.setItem(e1,String(Date.now()))}catch{}
1(0,Y.sx)("anonymous_signup_prompt_dismissed")}}return(0,o.useEffect)(()=>{let t=function(){try{let e=JSON.parse(window.sessionStorage.getItem(eQ)??"[]");return Array.isArray(e)?e.filter(e=>Number.isInteger(e)&&e>0):[]}catch{return[]}}(),s=t.includes(e)?t:[...t,e];try{window.sessionStorage.setItem(eQ,JSON.stringify(s))}catch{return}if(r||s.length<4||window.sessionStorage.getItem(e0)||function(){try{let e=Number(window.localStorage.getItem(e1));return Number.isFinite(e)&&Date.now()-e<6048e5}catch{return!1}}())return;(0,Y.sx)("anonymous_signup_prompt_eligible",{distinct_products:s.length});let n=window.setTimeout(()=>{document.querySelector('[role="dialog"][aria-modal="true"]')||(window.sessionStorage.setItem(e0,"1"),a(!0),(0,Y.sx)("anonymous_signup_prompt_shown",{distinct_products:s.length}))},1200);return()=>window.clearTimeout(n)},[r,e]),(0,s.jsx)(D.lG,{open:n,onOpenChange:m,children:(0,s.jsxs)(D.Cf,{className:"max-w-md overflow-hidden p-0",children:[(0,s.jsxs)("div",{className:"bg-gradient-to-br from-primary/15 via-primary/5 to-background px-6 pb-5 pt-7",children:[(0,s.jsx)("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-sm",children:(0,s.jsx)(eY.A,{className:"h-5 w-5","aria-hidden":!0})}),(0,s.jsxs)(D.c7,{className:"text-left",children:[(0,s.jsx)(D.L3,{className:"text-xl leading-tight",children:"Ne perds pas les produits que tu surveilles"}),(0,s.jsx)(D.rr,{className:"pt-1 text-sm leading-relaxed",children:"Cr\xe9e gratuitement ton compte PrixTCG pour retrouver tes produits et recevoir une alerte de stock ou de prix (sauf Amazon)."})]})]}),(0,s.jsxs)("div",{className:"space-y-3 px-6 pb-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)(eW.A,{className:"h-4 w-4 text-primary","aria-hidden":!0}),"Inscription rapide, alertes gratuites"]}),(0,s.jsx)(T.$,{asChild:!0,className:"h-11 w-full",children:(0,s.jsxs)("a",{href:d,onClick:()=>(0,Y.sx)("anonymous_signup_prompt_clicked",{method:"google"}),children:[(0,s.jsx)(eX.J,{}),"Continuer avec Google"]})}),(0,s.jsx)(T.$,{asChild:!0,variant:"outline",className:"h-10 w-full",children:(0,s.jsxs)("a",{href:c,onClick:()=>(0,Y.sx)("anonymous_signup_prompt_clicked",{method:"discord"}),children:[(0,s.jsx)(eK.EI,{className:"h-4 w-4 text-[#5865F2]"}),"Continuer avec Discord"]})}),(0,s.jsx)(T.$,{asChild:!0,variant:"outline",className:"h-10 w-full",children:(0,s.jsx)(u(),{href:i,onClick:()=>(0,Y.sx)("anonymous_signup_prompt_clicked",{method:"email"}),children:"S’inscrire avec un e-mail"})}),(0,s.jsxs)("p",{className:"text-center text-xs text-muted-foreground",children:["D\xe9j\xe0 un compte ?"," ",(0,s.jsx)(u(),{className:"font-medium text-foreground hover:underline",href:l,children:"Se connecter"})]}),(0,s.jsx)("button",{type:"button",className:"block w-full text-center text-xs text-muted-foreground underline-offset-4 hover:underline",onClick:()=>m(!1),children:"Continuer sans compte"})]})]})})}var e2=r(9118);let e3=(0,m.default)(()=>r.e(3136).then(r.bind(r,93136)).then(e=>e.GroupedProductEanDialog),{loadableGenerated:{webpack:()=>[93136]},ssr:!1}),e4=(0,m.default)(()=>r.e(7095).then(r.bind(r,17095)).then(e=>e.ImagePipelinePanel),{loadableGenerated:{webpack:()=>[17095]},ssr:!1}),e9=(0,m.default)(()=>r.e(2516).then(r.bind(r,62516)).then(e=>e.AdminCheckHistory),{loadableGenerated:{webpack:()=>[62516]},ssr:!1}),e6=(0,m.default)(()=>Promise.all([r.e(8582),r.e(4019)]).then(r.bind(r,88582)).then(e=>e.AlertCreateDialog),{loadableGenerated:{webpack:()=>[88582]},ssr:!1});function e7(e){return"fr"===e?"Fran\xe7ais":"en"===e?"Anglais":"jp"===e?"Japonais":e.toUpperCase()}function e8(e){var t,r,s,n;let a;return e.set_code?e.set_name?(t=e.set_code,r=e.set_name,s=e.series,n=e.tcg,a=`${(0,L.qc)(r)}-${t.toLowerCase()}`,s&&(0,eU.Ru)(n)?`/${n}/series/${(0,L.qc)(s)}/${a}`:`/${n}/extensions/${a}`):`/${e.tcg}/catalogue?${new URLSearchParams({set:e.set_code,lang:e.language??(0,eU.xn)(e.tcg)}).toString()}`:null}function te({initialProduct:e,initialHistory:t=[],initialEbayOffers:r={offers:[],refreshed_at:null,stale:!1,reason:null},initialStatsAsOf:a,similarProducts:c=[],compositionBoosterProducts:m=[],caseBoosterCount:S=null,caseSpecialContents:A=[],caseContainedProduct:P=null,caseCompositionBoosterProducts:R=[],initialVariantProducts:E=[],pullRateCatalog:I=[],initialOpenings:M=[],productC
1ontent:D,priceHistoryContent:q,openingsContent:ea,similarProductsContent:ei}){var el,eo,ed;let ec,eu,em,{id:ex}=(0,d.useParams)(),ep=(0,d.useRouter)(),ef=(0,d.useSearchParams)(),{user:eh}=(0,Q.A)(),eg=(0,eZ.r)(),eb=(0,B.U)(),[ej,ev]=(0,o.useState)(r),[eN,ey]=(0,o.useState)(!1),[e_,ew]=(0,o.useState)(!1),[ek,eC]=(0,o.useState)(!1),[e$,eS]=(0,o.useState)(null),eA=(0,K.S)(),eE=(0,o.useCallback)(()=>ep.refresh(),[ep]),eL=(0,o.useCallback)(()=>{let e=`${window.location.pathname}${window.location.search}`;ep.push(`/register?next=${encodeURIComponent(e)}`)},[ep]);(0,o.useEffect)(()=>{if(!eh||"alert"!==ef.get("intent"))return;let e=window.setTimeout(()=>{eC(!0),(0,Y.sx)("anonymous_signup_prompt_completed");let e=new URLSearchParams(ef.toString());e.delete("intent");let t=e.toString();ep.replace(`${window.location.pathname}${t?`?${t}`:""}`,{scroll:!1})},0);return()=>window.clearTimeout(e)},[ep,ef,eh]);let ez=(0,o.useCallback)(async()=>{if(e&&await eA({title:"Supprimer le produit ?",description:`\xab ${e.name} \xbb sera retir\xe9 de la base. Action irr\xe9versible.`,confirmLabel:"Supprimer",destructive:!0}))try{await (0,k.nr)(`/api/products/${e.id}`,{method:"DELETE"}),_.oR.success(`Produit "${e.name}" supprim\xe9`),ep.replace("/")}catch(e){(0,X.N7)("product.delete",e),_.oR.error((0,X.Rq)(e,"Suppression impossible."))}},[e,ep,eA]),eI=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=()=>{let e=(0,eH.tK)(window.location.hash);eS(e),null!=e&&window.history.replaceState(window.history.state,"",`${window.location.pathname}${window.location.search}`)};return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let eM=(0,o.useMemo)(()=>{if(!e?.is_assorted||0===E.length)return e;let t=[...E.flatMap(e=>e.offers.map(t=>({...t,catalog_product_name:e.name,catalog_product_ean:e.ean,catalog_product_is_assorted:!1}))),...e.offers.map(t=>({...t,catalog_product_name:e.name,catalog_product_ean:e.ean,catalog_product_is_assorted:!0}))],r={};for(let e of t){let t=r[e.site];(!t||(e.last_price??1/0)<(t.last_price??1/0))&&(r[e.site]=e)}let s=t.filter(e=>(0,et.dN)(e)&&null!=e.last_price).map(e=>e.last_price);return{...e,offers:t,sites:r,min_price:s.length?Math.min(...s):null,in_stock_anywhere:t.some(et.pI)}},[e,E]),eT=(0,o.useMemo)(()=>void 0,[e]),eD=(0,o.useMemo)(()=>{if(!eM)return null;let e=eM.offers.length?eM.offers:Object.values(eM.sites),t=e.filter(e=>!e.link_only&&(0,et.dN)(e)&&null!=e.last_price).map(e=>({entry:e,total:(0,O.Nl)(e.last_price,e.delivery_fee,eb[e.site]?.fee,eb[e.site]?.free,eb[e.site]?.tiers)?.total??1/0})).sort((e,t)=>e.total-t.total)[0],r=ej.offers.reduce((e,t)=>!e||t.delivered_price_eur<e.delivered_price_eur?t:e,null),s=null!=r&&r.delivered_price_eur<(t?.total??1/0),n=s?r.delivered_price_eur:t&&Number.isFinite(t.total)?t.total:null,a=s?null:t?.entry??null,i=eM.retail_reference_price,l=eM.retail_reference_price_is_estimated,o=(0,et.bx)(e,{releaseDate:eM.release_date,hasEbayOffer:ej.offers.length>0}),d=eM.offers.filter(e=>e.active),c=d.filter(et.pI),u=c.length,m=c.filter(e=>"vendeur_tiers"===e.category).length;return{bestPrice:n,bestSite:a,ebayBest:s?r:null,retailReference:i,retailReferenceEstimated:l,globalStatus:o,inStockCount:u,marketplaceCount:m,retailCount:u-m,availableOfferCount:u+ej.offers.length,total:d.length}},[eM,eb,ej]),eF=eD?.bestSite??null,eY=eD?.ebayBest??null,eW=eD?.bestPrice??null,eX=(ec=(el=ef.get("source"))&&V.has(el)?el:"unknown",U.has(ec)?ec:null),eK=eF?.url?(0,C.bA)(eF,eX??"best_offer"):eY?{href:eY.go_url,affiliated:!0}:null,eQ=eF&&"grande_enseigne"!==eF.category?n.wk[eF.category]:null,e0=eF?`${n.ej[eF.site]?.label??eF.site}${eQ?` ${eQ.short}`:""}`:eY?"eBay":null,e1=eY?`Disponible d\xe8s ${(0,L.$g)(eY.delivered_price_eur)} livraison comprise sur eBay. Comparez les offres, les frais de livraison et les disponibilit\xe9s.`:(0,eO.A6)(e??e,{history:t,now:new Date(a)});(0,o.useEffect)(()=>{let t;if(!e)return;eI.current!==e.id&&(eI.current=e.id,function(e,t="product_detail"){(0,Z.v)()&&fetch("/go/product-views",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({product_id:e,source:t,event_id:J()}),credentials:"same-origin",keepalive:!0}
1).catch(()=>void 0)}(e.id,eX??"product_detail"));let r=window.setTimeout(()=>{t=function(e=document){let t=new Set,r=new IntersectionObserver(e=>{let s=[];for(let n of e){if(!n.isIntersecting||!(n.target instanceof HTMLAnchorElement))continue;if(function(e){let t=(e.getAttribute("href")??"").match(H);return!!t&&(fetch(`/go/ebay/${t[1]}/${t[2]}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:J()}),credentials:"same-origin",keepalive:!0}).catch(()=>void 0),!0)}(n.target)){r.unobserve(n.target);continue}let e=function(e){let t=e.getAttribute("href")??"",r=t.match(G)?.[1];return r?{token:r,source:new URL(t,window.location.origin).searchParams.get("source")??"unknown",event_id:J()}:null}(n.target);if(!e)continue;let a=`${e.token}:${e.source}`;r.unobserve(n.target),t.has(a)||(t.add(a),s.push(e))}s.length&&function(e){for(let t=0;t<e.length;t+=50)fetch("/go/impressions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:e.slice(t,t+50)}),credentials:"same-origin",keepalive:!0}).catch(()=>void 0)}(s)},{threshold:.25});return e.querySelectorAll("a[data-outbound-impression]").forEach(e=>r.observe(e)),()=>r.disconnect()}()},0);return()=>{window.clearTimeout(r),t?.()}},[eX,e]);let tt=async()=>{if(!e||eN)return;let t=(eM?.offers??e.offers).filter(e=>!!e.url).map(e=>e.id);if(0===t.length)return void _.oR.error("Aucun site scrapable.");ey(!0);try{let e=await (0,k.nr)("/api/worker/scrape-now",{method:"POST",body:{offer_ids:t}});_.oR.success(`Scrape lanc\xe9 pour ${e.queued} site${e.queued>1?"s":""} — r\xe9sultats dans 10–60s`),window.setTimeout(eE,25e3)}catch(e){(0,X.N7)("product.scrapeNow",e),_.oR.error((0,X.Rq)(e,"Scrape impossible."))}finally{ey(!1)}};if(!e)return(0,s.jsx)(er.PageShell,{children:(0,s.jsxs)("div",{className:"flex h-64 flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,s.jsx)("p",{children:"Produit introuvable."}),(0,s.jsx)(u(),{href:"/",prefetch:!1,className:"text-sm underline-offset-2 hover:underline",children:"← Retour aux produits"})]})});let tr=e.language??(0,eU.xn)(e.tcg),ts=[e,...e.language_alternatives??[]].sort((e,t)=>["fr","en","jp"].indexOf(e.language??"fr")-["fr","en","jp"].indexOf(t.language??"fr")),tn=(0,ee.t)(e.name,e.tcg),ta=(0,eH.N9)(ef)??e$,ti=new URLSearchParams(ef.toString());ti.delete(eH.U4),ti.delete("offer"),ti.delete("site");let tl=ti.toString(),to=(0,eU.yH)("/catalogue",e.tcg),td=tl?`${to}?${tl}`:to,tc=ej.offers.length>0&&eD?.inStockCount===0,tu=tc&&eD?.globalStatus==="in_stock"?{...n.Uz.in_stock,label:"Disponible sur eBay"}:n.Uz[eD?.globalStatus??"unknown"],tm=eg.has(e.id),tx=e.assorted_variants?.filter(t=>(0,eV.Y_)(e.name,t.name))??[],tp=!!(D||e.case_packaging||e.booster_composition||e.content?.components?.length||e.promo_cards?.length);return(0,s.jsxs)(er.PageShell,{children:[(0,s.jsx)(W,{id:e.id,name:e.name,path:(0,eO.p0)(e)}),(0,s.jsx)(F,{active:eD?.globalStatus==="preorder",children:(0,s.jsxs)("div",{className:i().page,children:[(0,s.jsxs)("nav",{"aria-label":"Fil d’Ariane",className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[(0,s.jsxs)(u(),{href:td,prefetch:!1,className:"inline-flex shrink-0 items-center gap-1.5 transition-colors hover:text-foreground",children:[(0,s.jsx)(x.A,{className:"h-4 w-4"}),"Catalogue"]}),e.series&&(0,eU.Ru)(e.tcg)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"/"}),(0,s.jsx)(u(),{href:(0,eU.yH)(`/series/${(0,L.qc)(e.series)}`,e.tcg),prefetch:!1,className:"shrink-0 transition-colors hover:text-foreground",children:e.series})]}),(0,s.jsx)("span",{"aria-hidden":"true",children:"/"}),(0,s.jsx)("span",{className:"truncate text-foreground/80","aria-current":"page",children:tn})]}),(0,s.jsxs)("div",{className:i().product,children:[(0,s.jsxs)("div",{className:i().gallery,children:[(0,s.jsx)(en.ProductGallery,{product:e,compactMobile:!0}),(0,s.jsx)("section",{id:"product-content","aria-label":"Contenu et taux de drop",className:i().composition,children:D??(0,s.jsx)(eR.ProductContentSection,{product:e,compositionBoosterProducts:m,caseBoosterCount:S,caseSpecialContents:A,caseContainedProduct:P,caseCompositionBoosterProducts:R,pullRateCatalog:I})})]}),(0,s.jsxs)("div",{className:i().identity,children:[(0,s.jsx)("h1",{className:"text-xl font-semibold leading-[1.15] tracking-tight text-foreground sm:text-2xl",children:tn}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[ts.length>1?(0,s.jsxs)(eJ.rI,{children:[(0,s.jsx)(eJ.ty,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded border bg-background px-2 py-0.5 text-xs font-medium text-foreground
1/80 hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Choisir une autre langue de ce produit","aria-label":`Langue actuelle : ${e7(tr)}. Choisir une autre \xe9dition`,children:[(0,s.jsx)(e2.p,{language:tr}),tr.toUpperCase(),(0,s.jsx)(p.A,{className:"size-3","aria-hidden":"true"})]})}),(0,s.jsx)(eJ.SQ,{align:"start",children:ts.map(t=>{let r=t.language??(0,eU.xn)(t.tcg);return(0,s.jsx)(eJ._2,{asChild:!0,disabled:t.id===e.id,children:(0,s.jsxs)(u(),{href:(0,eO.p0)(t),prefetch:!1,className:"flex items-center gap-2",children:[(0,s.jsx)(e2.p,{language:r}),(0,s.jsxs)("span",{children:[r.toUpperCase()," \xb7 ",e7(r)]})]})},t.id)})})]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border bg-background px-2 py-0.5 text-xs font-medium text-foreground/80",title:`Langue de l’\xe9dition : ${e7(tr)}`,children:[(0,s.jsx)(e2.p,{language:tr}),tr.toUpperCase()]}),e.product_type&&(0,s.jsx)(u(),{href:(0,eU.yH)(`/types/${(0,L.qc)(e.product_type)}/${e.language??"fr"}`,e.tcg),prefetch:!1,className:"px-1 py-0.5 text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",children:(0,n.e7)(e.product_type,e.tcg)}),e.case_packaging?.contained_product.product_type&&(0,s.jsx)(u(),{href:(0,eU.yH)(`/types/${(0,L.qc)(e.case_packaging.contained_product.product_type)}/${e.language??"fr"}`,e.tcg),prefetch:!1,title:"Type du produit contenu dans le carton",className:"px-1 py-0.5 text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",children:(0,n.e7)(e.case_packaging.contained_product.product_type,e.tcg)}),e.series&&(0,eU.Ru)(e.tcg)&&(0,s.jsx)(u(),{href:(0,eU.yH)(`/series/${(0,L.qc)(e.series)}`,e.tcg),prefetch:!1,className:"px-1 py-0.5 text-xs text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",children:e.series}),e.is_popular&&(0,s.jsx)("span",{className:"px-1 py-0.5 text-xs text-warning-emphasis",title:"Parmi les produits les plus cliqu\xe9s par des visiteurs uniques ces 30 derniers jours",children:"Populaire"}),e.is_assorted&&(0,s.jsx)("span",{className:"px-1 py-0.5 text-xs text-info",children:"Mod\xe8le al\xe9atoire"}),(0,s.jsxs)("span",{className:(0,L.cn)("inline-flex items-center gap-1 rounded border px-2 py-0.5 text-xs",tu.chip),children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",tu.dot)}),tu.label,!tc&&eD&&eD.total>0&&(0,s.jsxs)("span",{className:"ml-0.5 text-[11px]",children:["\xb7 ",eD.inStockCount," sur ",eD.total," offre",eD.total>1?"s":""]})]})]}),(e.assorted_parent||tx.length>0)&&(0,s.jsxs)("div",{className:"mt-3 border-l-2 border-info/50 pl-3 text-sm",children:[e.assorted_parent&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Existe aussi en mod\xe8le al\xe9atoire"}),(0,s.jsxs)(u(),{href:(0,eO.p0)({...e.assorted_parent,normalized_name:e.assorted_parent.name}),prefetch:!1,className:"mt-1 block font-medium text-info hover:underline",children:[e.assorted_parent.name,e.assorted_parent.ean?` (${e.assorted_parent.ean})`:""]})]}),tx.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Mod\xe8les possibles"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:tx.map(e=>(0,s.jsxs)(u(),{href:(0,eO.p0)({...e,normalized_name:e.name}),prefetch:!1,className:"rounded border border-info/20 bg-background/60 px-2 py-1 text-xs text-info hover:bg-info/10",children:[(0,ee.t)(e.name,e.tcg),e.ean?` (${e.ean})`:""]},e.id))})]})]}),(0,s.jsx)(eB,{product:e})]}),(0,s.jsx)("div",{className:i().buybox,children:(0,s.jsxs)("div",{className:"grid gap-3 lg:grid-cols-[minmax(0,1fr)_180px]",children:[(0,s.jsxs)("div",{className:(0,L.cn)("rounded-lg border border-success/25 bg-success/[0.04] p-4",i().primaryOffer),children:[(0,s.jsx)("div",{className:"text-xs font-medium text-success",children:"Meilleur total livr\xe9"}),(0,s.jsx)("div",{className:(0,L.cn)("mt-0.5 font-mono text-2xl font-semibold tabular-nums text-foreground",i().primaryPrice),children:(0,L.$g)(eW)}),(0,s.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:(eF||eY)&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,s.jsx)(w.hY,{site:eY?"ebay":eF?.site??"",variant:"inline"}),(0,s.jsxs)("span",{children:["chez ",eY?"eBay":n.ej[eF.site]?.label??eF.site]}),eQ&&(0,s.jsxs)("span",{className:(0,L.cn)("inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] font-medium",eQ.activeClass),title:eQ.label,children:[(0,s.jsx)("span",{className:(0,L.cn)("h-1.5 w-1.5 rounded-full",eQ.dot)}),eQ.short]})]})}),(eF||eY)&&(0,s.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:"Livraison standard comprise"}),eD?.retailReference!=null&&(0,s.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[eD.retailReferenceEstimated?"Prix conseill\xe9 estim\xe9":"Prix conseill\xe9"," : ",(0,L.$g)(eD.retailReference)]}),(eF||eY)&&eK&&(0,s.jsxs)("div",{className:i().primaryCta,children:[(0,s.jsx)(T.$,{asChild:!0,size:"lg",className:"h-12 w-full text-sm font-semibold",children:(0,s.jsxs)("a",{href:eK.href,"data-outboun
1d-impression":!0,target:"_blank",rel:eK.affiliated?"nofollow sponsored noopener":"nofollow noreferrer noopener",onClick:t=>{(0,$.XZ)(t.currentTarget,eK),(0,Y.IZ)({placement:"product_primary_offer",product_id:e.id,offer_id:eY?.id??eF.id,merchant:eY?"ebay":eF.site,price:eY?.delivered_price_eur??eF.last_price??-1,affiliated:eK.affiliated,is_best_price:!0})},"aria-label":`Acheter chez ${e0}${eK.affiliated?" — lien affili\xe9":""}`,children:["Acheter chez ",eY?"eBay":n.ej[eF.site]?.label??eF.site,(0,s.jsx)(f.A,{className:"h-4 w-4"})]})}),(0,s.jsx)(T.$,{asChild:!0,variant:"outline",className:"mt-2 hidden h-9 w-full lg:flex",children:(0,s.jsx)("a",{href:"#offres",children:(eo=ej.offers.length+(eD?.marketplaceCount??0),ed=eD?.retailCount??0,eu=`${eo} offre${eo>1?"s":""} marketplace`,em=`${ed} offre${ed>1?"s":""} retail`,`${eu} \xb7 ${em}`)})}),eY?(0,s.jsx)(z,{className:"mt-1 text-center"}):null]})]}),(0,s.jsx)("div",{className:"hidden items-center justify-center px-4 py-3 text-center lg:flex",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-mono text-2xl font-semibold tabular-nums text-foreground",children:eD?.availableOfferCount??0}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:["offre",eD?.availableOfferCount===1?"":"s"," disponible",eD?.availableOfferCount===1?"":"s"]})]})})]})}),(0,s.jsxs)("div",{className:i().actions,children:[(0,s.jsxs)("div",{className:"grid grid-cols-4 divide-x divide-border/50 border-t border-border/50",children:[(0,s.jsxs)(T.$,{variant:"ghost",className:(0,L.cn)("h-12 rounded-none gap-1.5",tm&&"text-warning"),onClick:()=>{eh?eg.toggle(e.id):eL()},children:[(0,s.jsx)(h.A,{className:(0,L.cn)("h-4 w-4",tm&&"fill-current")}),tm?"Dans la wishlist":"Wishlist"]}),(0,s.jsxs)(T.$,{variant:"ghost",className:"h-12 rounded-none gap-1.5",onClick:()=>{eh?eC(!0):eL()},children:[(0,s.jsx)(g.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sm:hidden",children:"Alerte"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Cr\xe9er une alerte"})]}),(0,s.jsx)(l.ShareButton,{className:"h-12 rounded-none gap-1.5 border-0",content:{kind:"product",id:e.id,title:e.name,path:(0,eO.p0)(e),imageUrl:e.image_url}}),(0,s.jsx)(eq,{product:e,className:"h-12 rounded-none"})]}),eh?.is_admin&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-border/50 px-4 py-2",children:[(0,s.jsxs)(T.$,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground",onClick:tt,disabled:eN,children:[eN?(0,s.jsx)(b.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(j.A,{className:"h-4 w-4"}),"Forcer un scrape"]}),(0,s.jsxs)(eJ.rI,{children:[(0,s.jsx)(eJ.ty,{asChild:!0,children:(0,s.jsx)(T.$,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground","aria-label":"Actions produit",children:(0,s.jsx)(v.A,{className:"h-4 w-4"})})}),(0,s.jsxs)(eJ.SQ,{align:"start",children:[(0,s.jsxs)(eJ._2,{onClick:()=>ew(!0),children:[(0,s.jsx)(N.A,{className:"h-4 w-4"}),"Modifier le produit"]}),(0,s.jsx)(eJ.mB,{}),(0,s.jsxs)(eJ._2,{onClick:ez,className:"text-destructive focus:text-destructive",children:[(0,s.jsx)(y.A,{className:"h-4 w-4"}),"Supprimer"]})]})]})]})]}),(0,s.jsxs)("nav",{"aria-label":"Sections de la fiche produit",className:i().navigation,children:[tp&&(0,s.jsx)("a",{href:"#product-content",children:"Contenu"}),(0,s.jsx)("a",{href:"#offres",children:"Offres"}),(0,s.jsx)("a",{href:"#product-details",children:"D\xe9tails"}),(0,s.jsx)("a",{href:"#product-prices",children:"Prix"}),(0,s.jsx)("a",{href:"#product-similar",children:"Similaires"})]}),(0,s.jsx)("div",{className:i().offers,children:(0,s.jsx)(es.Zp,{id:"offres",className:"scroll-mt-20 border bg-card shadow-none",children:(0,s.jsxs)(es.Wu,{className:"p-3 sm:p-4",onClickCapture:eT?e=>{e.target.closest("a")&&(e.preventDefault(),e.stopPropagation())}:void 0,children:[eT?(0,s.jsx)("p",{id:"merchant-demo",className:"mb-3 rounded-lg bg-amber-50 px-3 py-2 text-sm text-amber-900",children:"D\xe9monstration DEV \xb7 30 marchands \xb7 prix et stocks fictifs \xb7 liens d’achat d\xe9sactiv\xe9s."}):null,(0,s.jsx)(eP,{product:eT??eM??e,initialEbayOffers:ej,onEbayDataChange:ev,highlightOfferId:ta,outboundSource:eX??"offer_table",caseBoosterCount:S})]})})}),(0,s.jsxs)("section",{id:"product-details","aria-labelledby":"product-details-heading",className:i().details,children:[(0,s.jsx)("h2",{id:"product-details-heading",className:"mb-4 text-xl font-semibold lg:hidden",children:"D\xe9tails du produit"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-line text-sm leading-6 text-foreground
1/80","data-product-introduction":!0,children:e1}),e.description?.trim()&&(0,s.jsxs)("section",{className:"mt-5","aria-labelledby":"product-description-title",children:[(0,s.jsx)("h2",{id:"product-description-title",className:"text-base font-semibold text-foreground",children:"Description"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-line text-sm leading-6 text-foreground/80","data-product-description":!0,children:e.description.trim()})]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-x-6 gap-y-3 border-t border-border/50 pt-4 sm:grid-cols-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Langue"}),ts.length>1?(0,s.jsxs)(eJ.rI,{children:[(0,s.jsx)(eJ.ty,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:"mt-0.5 inline-flex items-center gap-1.5 rounded text-sm font-medium text-foreground/80 transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Choisir une autre langue de ce produit","aria-label":`Langue : ${e7(tr)}. Choisir une autre \xe9dition`,children:[(0,s.jsx)(e2.p,{language:tr}),e7(tr),(0,s.jsx)(p.A,{className:"size-3.5","aria-hidden":"true"})]})}),(0,s.jsx)(eJ.SQ,{align:"start",children:ts.map(t=>{let r=t.language??(0,eU.xn)(t.tcg);return(0,s.jsx)(eJ._2,{asChild:!0,disabled:t.id===e.id,children:(0,s.jsxs)(u(),{href:(0,eO.p0)(t),prefetch:!1,className:"flex items-center gap-2",children:[(0,s.jsx)(e2.p,{language:r}),(0,s.jsxs)("span",{children:[r.toUpperCase()," \xb7 ",e7(r)]})]})},t.id)})})]}):(0,s.jsxs)("div",{className:"mt-0.5 inline-flex items-center gap-1.5 text-sm font-medium text-foreground/80",children:[(0,s.jsx)(e2.p,{language:tr}),e7(tr)]})]}),e.original_name&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Nom original"}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium text-foreground/80",children:e.original_name})]}),(e.set_code||e.set_name)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Extension"}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium text-foreground/80",children:e.set_code?(0,s.jsx)(u(),{href:e8(e),prefetch:!1,className:"font-medium transition-colors hover:text-primary hover:underline",children:e.set_name?`${e.set_name} (${e.set_code})`:e.set_code}):e.set_name})]}),e.official_set_code&&e.official_set_code!==e.set_code&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:eU.ii[e.tcg].officialSetCodeLabel}),(0,s.jsx)("div",{className:"mt-0.5 font-mono text-sm font-medium text-foreground/80",children:e.official_set_code})]}),e.series&&(0,eU.Ru)(e.tcg)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"S\xe9rie"}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium text-foreground/80",children:(0,s.jsx)(u(),{href:(0,eU.yH)(`/series/${(0,L.qc)(e.series)}`,e.tcg),prefetch:!1,className:"font-medium transition-colors hover:text-primary hover:underline",children:e.series})})]}),e.release_date&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Sortie"}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium text-foreground/80",children:(0,L.So)(e.release_date,{day:"2-digit",month:"2-digit",year:"numeric"})})]}),(e.ean||e.is_assorted)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"EAN"}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium text-foreground/80",children:e.ean??"Non applicable"})]})]}),(0,eO.Sk)(e)&&(0,s.jsxs)("section",{"aria-labelledby":"pokemon-30-observatory-heading",className:"border-t border-border/50 pt-4",children:[(0,s.jsx)("h2",{id:"pokemon-30-observatory-heading",className:"text-sm font-semibold text-foreground/90",children:"Pok\xe9mon 30 ans 2026"}),(0,s.jsxs)("p",{className:"mt-2 text-sm leading-6 text-foreground/85",children:["Retrouvez le calendrier des sorties, les prix, les pr\xe9commandes et les stocks de la gamme dans"," ",(0,s.jsx)(u(),{className:"font-medium text-primary underline-offset-4 hover:underline",href:eG.Rf,children:"le Barom\xe8tre Pok\xe9mon 30 ans"}),"."]})]})]})]}),eh?.is_admin===!0&&(0,s.jsx)(e9,{offers:e.offers}),q??(0,s.jsx)(eR.ProductHistorySection,{product:e,history:t,statsAsOf:a}),(0,s.jsx)("div",{className:"border-t pt-6",children:(0,s.jsxs)("section",{"aria-labelledby":"product-summary-heading",children:[(0,s.jsxs)("h2",{id:"product-summary-heading",className:"text-base font-semibold",children:["Prix et disponibilit\xe9 de ",tn]}),(0,s.jsxs)("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:["PrixTCG compare les offres publiques actuellement observ\xe9es pour ce produit ",eU.ii[e.tcg].label,". Les stocks et tarifs peuvent changer entre le dernier relev\xe9 et l’ouverture du site marchand."]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-x-4 gap-y-3 text-xs",children:[e.set_code&&(0,s.jsxs)(u(),{href:e8(e),prefetch:!1,className:"text-muted-foreground underline underline-offset-4 hover:text-foreground",children:["Extension ",e.set_name?`${e.set_name} (${e.set_code})`:e.set_code]}),[...new Set(e.offers.filter(e=>e.active).map(e=>e.site))].map(t=>(0,s.jsxs)(u(),{href:(0,eU.yH)(`/marchands/${t}`,e.tcg),prefetch:!1,title:`Voir la fiche du marchand ${n.ej[t]?.label??t}`,"aria-label":`Voir la fiche du marchand ${n.ej[t]?.label??t}`,className:"inline-flex items-center gap-1.5 text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",children:[(0,s.jsx)(w.hY,{site:t,variant:"inline"}),!(0,w.x3)(t)&&(n.ej[t]?.label??t)]},t))]})]})}),ea??(0,s.jsx)(eR.ProductOpeningsSection,{product:e,openings:M}),(0,s.jsx)("div",{id:"product-similar",className:"scroll-mt-32",children:ei??(0,s.jsx)(eR.ProductSimilarSection,{product:e,products:c})}),eh?.is_admin&&(0,s.jsx)(e4,{productId:e.id,productType:e.product_type,onDecision:eE})]})}),eh?.is_admin&&e_&&(0,s.jsx)(e3,{open:e_,onOpenChange:ew,product:e,onSaved:()=>{ew(!1),eE()}}),e&&ek&&(0,s.jsx)(e6,{open:ek,onOpenChange:eC,alert:null,products:[],fixedProduct:eM??e,onSaved:eE}),!eh&&e&&(0,s.jsx)(e5,{productId:e.id,nextPath:`${(0,eO.p0)(e)}?intent=alert`,disabled:ek})]})}},75340:(e,t,r)=>{"use strict";r.d(t,{I:()=>l});var s=r(95155),n=r(12115),a=r(14577),i=r(91337);function l({label:e,children:t,align:r="center",side:o="bottom",className:d}
1){let c=(0,n.useId)(),[u,m]=(0,n.useState)(!1);return(0,s.jsxs)("span",{className:(0,i.cn)("relative inline-flex align-middle",d),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[(0,s.jsx)("button",{type:"button","aria-label":e,"aria-describedby":c,"aria-expanded":u,onFocus:()=>m(!0),onBlur:()=>m(!1),onKeyDown:e=>{"Escape"===e.key&&m(!1)},className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",children:(0,s.jsx)(a.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),(0,s.jsx)("span",{id:c,role:"tooltip","aria-hidden":!u,className:(0,i.cn)("absolute z-30 w-64 rounded-md border bg-popover px-3 py-2 text-left font-sans text-[11px] font-normal normal-case leading-4 tracking-normal text-popover-foreground shadow-lg transition-opacity","bottom"===o&&"top-full mt-2","top"===o&&"bottom-full mb-2","start"===r&&"left-0","center"===r&&"left-1/2 -translate-x-1/2","end"===r&&"right-0",u?"visible opacity-100":"pointer-events-none invisible opacity-0"),children:t})]})}},76821:(e,t,r)=>{"use strict";r.d(t,{J:()=>a});let s="6Ld3RlAtAAAAAF7cHNMfScUO3YMbYDNmj89rrEV4",n=null;async function a(e){if(!s)return;await (!s||window.grecaptcha?Promise.resolve():n||(n=new Promise((e,t)=>{let r=document.createElement("script");r.src=`https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(s)}`,r.async=!0,r.defer=!0,r.onload=()=>e(),r.onerror=()=>t(Error("Chargement reCAPTCHA impossible")),document.head.appendChild(r)})));let t=window.grecaptcha;if(!t)throw Error("reCAPTCHA indisponible");return new Promise((r,n)=>{t.ready(()=>{t.execute(s,{action:e}).then(r).catch(n)})})}},79694:(e,t,r)=>{"use strict";r.d(t,{ProductContentSection:()=>et,ProductHistorySection:()=>er,ProductOpeningsSection:()=>es,ProductSimilarSection:()=>en});var s=r(95155),n=r(37206),a=r(38285),i=r(98500),l=r.n(i),o=r(10360),d=r(81259),c=r(12115),u=r(76721),m=r(5790),x=r(1275),p=r(4474),f=r(74350),h=r(75340),g=r(85973);function b(e){return e.toLocaleString("fr-FR",{minimumFractionDigits:0,maximumFractionDigits:2})}function j(e){return(0,g.Zn)(e.pull_rates.rates).map(e=>({...e,label:(0,g.vc)(e.rarity_key)}))}function v({editions:e,compactOnly:t=!1}){let r=(0,c.useRef)(null),n=e.filter(e=>e.pull_rates&&(0,g.Mn)(e.pull_rates.rates).length>0);if(0===n.length)return null;let a=1===n.length?n[0]:null,i=a?j(a):[],l=a?[]:n.slice(0,3).map(e=>({edition:e,rates:j(e)})),o=a?`Voir les taux de drop pour ${a.seo_name}`:`Voir les taux de drop pour ${n.length} extensions`;return(0,s.jsx)("div",{className:t?"shrink-0":"mt-4 border-t border-border/50 pt-3",children:(0,s.jsxs)(f.lG,{children:[(0,s.jsx)(f.zM,{asChild:!0,children:(0,s.jsx)("button",{type:"button","aria-label":o,className:t?"group inline-flex items-center gap-1 text-xs font-medium text-foreground/75 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring":"group w-full text-left text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:t?(0,s.jsxs)(s.Fragment,{children:["Voir tous les taux",(0,s.jsx)(u.A,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-semibold text-foreground/85",children:[(0,s.jsx)(m.A,{className:"size-3.5","aria-hidden":"true"}),"Taux de drop"]}),!a&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[n.length," extensions",(0,s.jsx)(u.A,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})]}),a&&i.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mt-1 block text-sm text-foreground",children:i.map((e,t)=>(0,s.jsxs)("span",{children:[t>0&&(0,s.jsx)("span",{className:"mx-1.5 text-muted-foreground",children:"\xb7"}),e.label," ",(0,s.jsxs)("strong",{className:"font-semibold tabular-nums",children:[b(e.probability_percent)," %"]})]}
1,e.rarity_key))}),(0,s.jsxs)("span",{className:"mt-1 flex flex-wrap items-center justify-between gap-x-3 gap-y-1 italic",children:[(0,s.jsxs)("span",{children:["Donn\xe9es bas\xe9es sur ",a.pull_rates.sample_size_is_minimum?"+":"",a.pull_rates.sample_size.toLocaleString("fr-FR")," boosters"]}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 font-medium not-italic text-foreground/75",children:["Voir tous les taux",(0,s.jsx)(u.A,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})]})]}),!a&&l.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"mt-1.5 block space-y-0.5 text-foreground",children:[l.map(({edition:e,rates:t})=>(0,s.jsxs)("span",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-2",children:[(0,s.jsx)("span",{className:"font-mono font-medium text-foreground/75",children:e.code}),(0,s.jsx)("span",{children:t.map((e,t)=>(0,s.jsxs)("span",{children:[t>0&&(0,s.jsx)("span",{className:"mx-1.5 text-muted-foreground",children:"\xb7"}),e.label," ",(0,s.jsxs)("strong",{className:"font-semibold tabular-nums",children:[b(e.probability_percent)," %"]})]},e.rarity_key))})]},`${e.language}:${e.code}`)),n.length>l.length&&(0,s.jsxs)("span",{className:"block text-muted-foreground",children:["+ ",n.length-l.length," autre",n.length-l.length>1?"s":""," extension",n.length-l.length>1?"s":""]})]}),(0,s.jsxs)("span",{className:"mt-1 flex flex-wrap items-center justify-between gap-x-3 gap-y-1 italic",children:[(0,s.jsx)("span",{children:"Estimations par booster selon chaque extension"}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 font-medium not-italic text-foreground/75",children:["Voir tous les taux",(0,s.jsx)(u.A,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})]})]})]})})}),(0,s.jsxs)(f.Cf,{className:"max-h-[85vh] max-w-lg overflow-y-auto",onOpenAutoFocus:e=>{e.preventDefault(),r.current?.focus()},children:[(0,s.jsx)(f.c7,{children:(0,s.jsx)(f.L3,{ref:r,tabIndex:-1,children:"Taux de drop observ\xe9s"})}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Probabilit\xe9 moyenne par booster, estim\xe9e par TCGplayer \xe0 partir d'ouvertures. Ces r\xe9sultats ne sont ni officiels ni garantis."}),(0,s.jsx)("div",{className:"space-y-6",children:n.map(e=>{let t=e.pull_rates;return(0,s.jsxs)("section",{"aria-labelledby":`pull-rates-${e.language}-${e.code}`,children:[(0,s.jsxs)("div",{className:"mb-2 flex items-baseline justify-between gap-3 border-b pb-2",children:[(0,s.jsxs)("h3",{id:`pull-rates-${e.language}-${e.code}`,className:"font-medium text-foreground",children:[e.seo_name," ",(0,s.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:["(",e.code,")"]})]}),(0,s.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:[t.sample_size_is_minimum?"Plus de ":"",t.sample_size.toLocaleString("fr-FR")," boosters"]})]}),(0,s.jsx)("dl",{className:"space-y-1.5 text-sm",children:(0,g.Mn)(t.rates).map(e=>{let r=(0,g.vc)(e.rarity_key),n=(0,g.b7)(e.rarity_key);return(0,s.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4 py-0.5",children:[(0,s.jsx)("dt",{children:(0,s.jsx)("abbr",{title:n,className:"no-underline",children:r})}),(0,s.jsxs)("dd",{className:"inline-flex items-center justify-end gap-1 tabular-nums font-medium text-foreground",children:[b(e.probability_percent)," %",(0,s.jsxs)(h.I,{label:`Comprendre le calcul pour ${r} — ${n}`,align:"end",side:"top",children:[(0,s.jsx)("span",{className:"mb-1 block font-medium",children:n}),"Environ 1 booster sur ",(0,g.YW)(e.probability_percent),", calcul\xe9 \xe0 partir de ",t.sample_size_is_minimum?"plus de ":"",t.sample_size.toLocaleString("fr-FR")," boosters."]})]})]},e.rarity_key)})}),(0,s.jsx)(p.$,{asChild:!0,variant:"link",className:"mt-2 h-auto px-0 text-xs",children:(0,s.jsxs)("a",{href:t.source_url,target:"_blank",rel:"noopener noreferrer",children:["Source TCGplayer ",(0,s.jsx)(x.A,{className:"ml-1 size-3","aria-hidden":"true"})]})})]},`${e.language}:${e.code}`)})})]})]})})}var N=r(41757);function y(e){return!!e?.booster_composition&&e?.product_type!=="booster"&&e?.product_type!=="sleeved-booster"}function _({packaging:e,boosterCount:t,specialContents:r,containedProduct:n,boosterProducts:i,pullRateEditions:c=[]}){let u=e.contained_product,m=(0,N.p0)({...u,normalized_name:u.name}),x=1===e.quantity&&1===t&&("booster"===u.product_type||"sleeved-booster"===u.product_type);return(0,s.jsxs)("div",{className:"mt-4 border-t border-border/50 pt-4",children:[(0,s.jsx)("p",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground",children:"Contenu : carton 
1scell\xe9"}),(0,s.jsxs)("div",{className:"mt-2 rounded-md bg-muted/35 p-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[u.image_url&&(0,s.jsx)(o.ZoomImage,{src:u.image_url,alt:u.name,className:"h-20 w-14 shrink-0 cursor-zoom-in",sizes:"56px",previewSize:320}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)(l(),{href:m,prefetch:!1,className:"line-clamp-3 text-sm font-medium text-primary hover:underline",children:u.name}),(0,s.jsxs)("span",{className:"mt-1 block font-mono text-xs font-semibold text-foreground",children:["\xd7",e.quantity]}),t&&!x&&(0,s.jsxs)("span",{className:"mt-1 block font-mono text-[10px] text-muted-foreground",children:[t.toLocaleString("fr-FR")," boosters au total"]})]})]}),(0,s.jsx)(d.Y,{components:r,multiplier:e.quantity,excludePromotionalBoosters:y(n)})]}),y(n)&&(0,s.jsxs)("div",{className:"relative ml-5 border-l border-primary/25 pb-1 pl-5 pt-4",children:[(0,s.jsx)("span",{className:"absolute left-0 top-7 h-px w-4 bg-primary/25","aria-hidden":"true"}),(0,s.jsxs)("p",{className:"mb-2 font-mono text-[9px] uppercase tracking-wider text-muted-foreground",children:["Chaque ","display"===u.product_type?"display":"produit"," contient"]}),(0,s.jsx)(a.BoosterCompositionPreview,{composition:n.booster_composition,boosterProducts:i,tcg:n.tcg,language:n.language,pullRateEditions:c,pullRateAction:(0,s.jsx)(v,{editions:c,compactOnly:!0}),specialComponents:r,embedded:!0})]})]})}var w=r(5772),k=r(45216),C=r(94088),$=r(24551),S=r(92571),A=r(65738),P=r(29572),R=r(66609),E=r(9726),L=r(22356),z=r(91337);function I({productId:e,productPath:t,initialOpenings:r}){let{user:n}=(0,E.A)(),[a,i]=(0,c.useState)(r??[]),[o,d]=(0,c.useState)(void 0===r),[u,m]=(0,c.useState)(!1),[x,h]=(0,c.useState)(2),[g,b]=(0,c.useState)(""),[j,v]=(0,c.useState)(null),[N,y]=(0,c.useState)(!1),[_,M]=(0,c.useState)(!1),[T,D]=(0,c.useState)(null),[q,F]=(0,c.useState)(null),O=(0,c.useMemo)(()=>j?URL.createObjectURL(j):null,[j]),B=`${t}#vos-ouvertures`;async function V(t){if(t.preventDefault(),!n)return void m(!0);if(!j)return void R.oR.error("Ajoute une photo de ton ouverture.");let r=new FormData;r.append("hype",String(x)),r.append("comment",g),r.append("photo",j),y(!0);try{let t=await (0,L.nr)(`/api/products/${e}/openings`,{method:"POST",body:r});i(e=>[t,...e]),b(""),v(null),h(2),M(!1),R.oR.success("Ton ouverture est publi\xe9e !")}catch{R.oR.error("Publication impossible. V\xe9rifie la photo et r\xe9essaie.")}finally{y(!1)}}async function U(t){D(t.id);try{await (0,L.nr)(`/api/products/${e}/openings/${t.id}`,{method:"DELETE"}),i(e=>e.filter(e=>e.id!==t.id)),F(null),R.oR.success("Ouverture supprim\xe9e.")}catch{R.oR.error("Impossible de supprimer cette ouverture.")}finally{D(null)}}return(0,c.useEffect)(()=>()=>{O&&URL.revokeObjectURL(O)},[O]),(0,c.useEffect)(()=>{let t=new AbortController;return(0,L.nr)(`/api/products/${e}/openings`,{signal:t.signal}).then(i).catch(e=>{e instanceof DOMException&&"AbortError"===e.name||R.oR.error("Impossible de charger les ouvertures.")}).finally(()=>{t.signal.aborted||d(!1)}),()=>t.abort()},[e]),(0,s.jsxs)("section",{id:"vos-ouvertures","aria-labelledby":"openings-heading",className:"scroll-mt-20 space-y-4 border-t border-border pt-6",children:[(0,s.jsx)("div",{className:"px-1",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary-emphasis",children:(0,s.jsx)(k.A,{className:"h-5 w-5","aria-hidden":!0})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{id:"openings-heading",className:"text-lg font-semibold tracking-tight sm:text-xl",children:"Vos ouvertures"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Les pulls et impressions partag\xe9s par la communaut\xe9."})]})]}),_?(0,s.jsxs)(p.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>M(!1),children:[(0,s.jsx)(C.A,{className:"h-4 w-4","aria-hidden":!0})," Fermer"]}):(0,s.jsxs)(p.$,{type:"button",size:"sm",onClick:function(){n?M(!0):m(!0)},children:[(0,s.jsx)($.A,{className:"h-4 w-4","aria-hidden":!0})," Partager mon ouverture"]})]})}),(0,s.jsx)("div",{className:"grid gap-4 sm:grid-cols-2",children:o?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Chargement des ouvertures…"}):0===a.length?(0,s.jsx)("p",{className:"rounded-lg border border-dashed p-5 text-center text-sm text-muted-foreground",children:"Aucune ouverture partag\xe9e pour le moment."}):a.map(e=>(0,s.jsxs)("article",{className:"overflow-hidden rounded-xl border border-border/70 bg-card",children:[(0,s.jsx)(w.default,{src:e.photo_url,alt:`Ouverture partag\xe9e par ${e.author_name}`,width:672,height:504,className:"aspect-[4/3] w-full object-cover"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-col p-4 sm:p-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold",children:e.author_name}),(0,s.jsx)("time",{className:"mt-0.5 block text-xs text-muted-foreground",dateTime:e.created_at,children:(0,z.IR)(new Date(e.created_at),{day:"2-digit",month:"long",year:"numeric"})})]}),e.can_delete&&(0,s.jsxs)(p.$,{type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive",disabled:T===e.id,onClick:()=>F(e),children:[T===e.id?(0,s.jsx)(S.A,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):(0,s.jsx)(A.A,{className:"h-4 w-4","aria-hidden":!0}),"Supprimer"]})]}),(0,s.jsxs)("p",{className:"mt-3 inline-flex w-fit items-center gap-2 rounded-full bg-primary/[0.07] px-3 py-1.5 text-xs font-medium text-foreground","aria-label":`${e.hype} flamme${e.hype>1?"s":""}`,children:[(0,s.jsx)("span",{children:"\uD83D\uDD25".repeat(e.hype)}),(0,s.jsx)("span",{children:1===e.hype?"Tranquille":2===e.hype?"Tr\xe8s cool":"Incroyable"})]}),(0,s.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-sm leading-6 text-foreground
1/90",children:e.comment})]})]},e.id))}),_&&(0,s.jsxs)("form",{onSubmit:V,className:"grid gap-5 rounded-xl border border-border/70 bg-card p-4 sm:p-6 lg:grid-cols-[240px_1fr]",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("label",{className:"group relative flex aspect-[4/3] cursor-pointer flex-col items-center justify-center overflow-hidden rounded-xl border border-dashed border-border bg-secondary/25 p-4 text-center transition hover:border-primary/50 hover:bg-primary/[0.04] lg:aspect-square",children:[O?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.default,{src:O,alt:"Aper\xe7u de la photo \xe0 publier",fill:!0,unoptimized:!0,className:"object-cover"}),(0,s.jsx)("span",{className:"absolute inset-x-3 bottom-3 rounded-lg bg-background/90 px-3 py-2 text-xs font-medium shadow-sm backdrop-blur",children:"Changer la photo"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-background text-primary shadow-sm ring-1 ring-border",children:(0,s.jsx)(P.A,{className:"h-5 w-5","aria-hidden":!0})}),(0,s.jsx)("span",{className:"mt-3 text-sm font-medium",children:"Ajouter une photo"}),(0,s.jsx)("span",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:"JPEG, PNG ou WebP"})]}),(0,s.jsx)("input",{"aria-label":"Ajouter une photo",className:"sr-only",type:"file",accept:"image/jpeg,image/png,image/webp",required:!0,onChange:e=>v(e.target.files?.[0]??null)})]})}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,s.jsxs)("fieldset",{children:[(0,s.jsx)("legend",{className:"text-sm font-medium",children:"\xc0 quel point cette ouverture t’a emball\xe9 ?"}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-3 gap-2","aria-label":"Niveau de hype",children:[1,2,3].map(e=>(0,s.jsxs)("button",{type:"button","aria-pressed":x===e,onClick:()=>h(e),className:`rounded-lg border px-2 py-2.5 text-center transition-all ${x===e?"border-primary/40 bg-background shadow-sm ring-1 ring-primary/20":"border-border bg-secondary/30 text-muted-foreground hover:bg-background/60"}`,"aria-label":`${e} flamme${e>1?"s":""} — ${1===e?"Tranquille":2===e?"Tr\xe8s cool":"Incroyable"}`,children:[(0,s.jsx)("span",{className:"block text-base",children:"\uD83D\uDD25".repeat(e)}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] font-medium",children:1===e?"Tranquille":2===e?"Tr\xe8s cool":"Incroyable"})]},e))})]}),(0,s.jsxs)("label",{className:"grid flex-1 gap-2 text-sm font-medium",children:["Tes pulls en quelques mots",(0,s.jsx)("textarea",{required:!0,minLength:1,maxLength:1e3,value:g,onChange:e=>b(e.target.value),placeholder:"Qu’as-tu tir\xe9 ? Une surprise, une d\xe9ception, une carte incroyable…",className:"min-h-28 resize-y rounded-xl border border-input bg-background px-4 py-3 font-normal leading-6 shadow-inner shadow-shadow/[0.03] placeholder:text-muted-foreground/70 focus-visible:border-primary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"})]}),(0,s.jsx)("div",{className:"flex justify-end border-t border-border/50 pt-4",children:(0,s.jsxs)(p.$,{type:"submit",className:"w-full shadow-sm sm:w-auto",disabled:N,children:[N?(0,s.jsx)(S.A,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):(0,s.jsx)($.A,{className:"h-4 w-4","aria-hidden":!0}),"Publier mon ouverture"]})})]})]}),(0,s.jsx)(f.lG,{open:u,onOpenChange:m,children:(0,s.jsxs)(f.Cf,{className:"max-w-md",children:[(0,s.jsxs)(f.c7,{children:[(0,s.jsx)(f.L3,{children:"Partage ton ouverture"}),(0,s.jsx)(f.rr,{children:"Cr\xe9e un compte gratuit ou connecte-toi pour publier ta photo et raconter ton ouverture."})]}),(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsx)(p.$,{asChild:!0,children:(0,s.jsx)(l(),{href:`/register?next=${encodeURIComponent(B)}`,children:"Cr\xe9er un compte"})}),(0,s.jsx)(p.$,{asChild:!0,variant:"outline",children:(0,s.jsx)(l(),{href:`/login?next=${encodeURIComponent(B)}`,children:"Se connecter"})})]})]})}),(0,s.jsx)(f.lG,{open:null!=q,onOpenChange:e=>{e||null!=T||F(null)},children:(0,s.jsxs)(f.Cf,{className:"max-w-md overflow-hidden p-0",children:[(0,s.jsx)("div",{className:"bg-gradient-to-br from-destructive/[0.10] via-background to-background px-6 pb-5 pt-6",children:(0,s.jsxs)("div",{className:"flex items-start gap-4",children:[(0,s.jsx)("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-destructive/10 text-destructive ring-1 ring-destructive/15",children:(0,s.jsx)(A.A,{className:"h-5 w-5","aria-hidden":!0})}),(0,s.jsxs)(f.c7,{className:"text-left",children:[(0,s.jsx)(f.L3,{children:"Supprimer cette ouverture ?"}),(0,s.jsx)(f.rr,{children:"La photo et le commentaire seront supprim\xe9s d\xe9finitivement."})]})]})}),q&&(0,s.jsxs)("div",{className:"mx-6 flex items-center gap-3 rounded-xl border bg-secondary/20 p-3",children:[(0,s.jsx)(w.default,{src:q.photo_url,alt:"Aper\xe7u de l’ouverture \xe0 supprimer",width:64,height:64,className:"h-16 w-16 rounded-lg object-cover"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("p",{className:"text-sm font-medium",children:["\uD83D\uDD25".repeat(q.hype)," ",1===q.hype?"Tranquille":2===q.hype?"Tr\xe8s cool":"Incroyable"]}),(0,s.jsx)("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-muted-foreground",children:q.comment})]})]}),(0,s.jsxs)(f.Es,{className:"px-6 pb-6 pt-2",children:[(0,s.jsx)(p.$,{type:"button",variant:"outline",disabled:null!=T,onClick:()=>F(null),children:"Garder"}),(0,s.jsxs)(p.$,{type:"button",variant:"destructive",disabled:!q||null!=T,onClick:()=>q&&void U(q),children:[null!=T?(0,s.jsx)(S.A,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):(0,s.jsx)(A.A,{className:"h-4 w-4","aria-hidden":!0}),null!=T?"Suppression…":"Supprimer d\xe9finitivement"]})]})]})})]})}var M=r(9118);function T({cards:e}){return e.length?(0,s.jsxs)("section",{className:"mt-5 border-t border-border/50 pt-5","aria-labelledby":"promo-cards-title",children:[(0,s.jsx)("h2",{id:"promo-cards-title",className:"text-sm font-semibold",children:e.length>1?"Cartes promo incluses":"Carte promo incluse"}),(0,s.jsx)("div",{className:"mt-3 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-2",children:e.map(e=>{let t=e.external_identifiers.tcgdex,r=`${e.language}:${e.set_id}:${e.number}:${t??e.name}`;return(0,s.jsxs)("article",{className:"min-w-0 rounded-lg border bg-secondary/20 p-2",children:[e.image_url&&(0,s.jsx)("div",{className:"relative aspect-[2.5/3.5] overflow-hidden rounded-md bg-muted",children:(0,s.jsx)(w.default,{src:e.image_url,alt:`${e.name}, carte ${e.set_id} ${e.number}`,fill:!0,sizes:"(max-width: 640px) 42vw, 140px",className:"object-contain"})}),(0,s.jsx)("p",{className:"mt-2 truncate text-xs font-medium",title:e.name,children:e.name}),(0,s.jsxs)("p",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:[e.set_id," \xb7 ",e.number," \xb7"]}),(0,s.jsx)(M.p,{language:e.language??"fr"}),(0,s.jsxs)("span",{children:[(e.language??"fr").toUpperCase(),e.quantity>1?` \xb7 \xd7${e.quantity}`:""]})]}),(0,s.jsxs)("a",{href:e.source_url,target:"_blank",rel:"noreferrer",className:"mt-1 inline-flex items-center gap-1 text-[10px] text-primary hover:underline",title:`Voir la fiche source ${e.source} de ${e.name}`,"aria-label":`Voir la fiche source ${e.source} de ${e.name}`,children:["Source ",e.source,(0,s.jsx)(x.A,{className:"h-2.5 w-2.5","aria-hidden":"true"})]})]},r)})})]}):null}var D=r(38291),q=r(87788);let F={low:"Faible",medium:"Moyenne",high:"Forte"},O={low:"warning",medium:"secondary",high:"success"};function B({history:e,offers:t,asOf:r,compact:n=!1}){var a,i,l,o;let d=(0,c.useMemo)(()=>(0,q.A)(e,t,new Date(r)),[r,e,t]),u=F[d.confidence],m=`${d.activeMerchantCount.toLocaleStr
1ing("fr-FR")} boutique${1===d.activeMerchantCount?"":"s"}`;return(0,s.jsxs)("section",{"aria-labelledby":"retail-market-stats-title",className:(0,z.cn)("min-w-0 flex flex-col",n?"gap-3":"gap-4"),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{id:"retail-market-stats-title",className:(0,z.cn)("font-medium",n?"text-xs text-muted-foreground":"text-sm text-foreground"),children:"Boutiques suivies en France"}),!n&&(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Prix produits hors livraison \xb7 offres retail observ\xe9es par PrixTCG"})]}),d.lastObservedAt&&(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Derni\xe8re observation"," ",(0,s.jsx)("time",{dateTime:d.lastObservedAt,children:(0,z.IR)(d.lastObservedAt,{dateStyle:"medium",timeStyle:"short"})})]})]}),(0,s.jsxs)("dl",{className:(0,z.cn)("grid gap-x-4 gap-y-3",n?"grid-cols-2 lg:grid-cols-4":"sm:grid-cols-2 lg:grid-cols-4"),children:[(0,s.jsxs)("div",{className:n?"min-w-0":"rounded-xl border border-surface-border bg-card p-4 text-card-foreground",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Prix m\xe9dian actuel"}),(0,s.jsx)("dd",{className:(0,z.cn)("font-mono font-semibold tabular-nums text-foreground",n?"mt-1 text-xs sm:text-sm":"mt-2 text-xl"),children:null==d.currentMedian?(0,s.jsx)("span",{"data-nosnippet":!0,children:"Donn\xe9es insuffisantes"}):null==(a=d.currentMedian)?"Donn\xe9es insuffisantes":(0,z.$g)(a)})]}),(0,s.jsxs)("div",{className:n?"min-w-0":"rounded-xl border border-surface-border bg-card p-4 text-card-foreground",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"\xc9volution sur 30 jours"}),(0,s.jsx)("dd",{className:(0,z.cn)("font-mono font-semibold tabular-nums",n?"mt-1 text-xs sm:text-sm":"mt-2 text-xl",null==d.trend30Percent||.05>Math.abs(d.trend30Percent)?"text-foreground":d.trend30Percent<0?"text-success":"text-destructive"),children:null==d.trend30Percent?(0,s.jsx)("span",{"data-nosnippet":!0,children:"Donn\xe9es insuffisantes"}):null==(i=d.trend30Percent)?"Donn\xe9es insuffisantes":new Intl.NumberFormat("fr-FR",{style:"percent",signDisplay:"always",minimumFractionDigits:1,maximumFractionDigits:1}).format(i/100)})]}),(0,s.jsxs)("div",{className:n?"min-w-0":"rounded-xl border border-surface-border bg-card p-4 text-card-foreground",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Zone habituelle sur 90 jours"}),(0,s.jsx)("dd",{className:(0,z.cn)("font-mono font-semibold tabular-nums text-foreground",n?"mt-1 text-xs sm:text-sm":"mt-2 text-xl"),children:null==d.typicalLow90||null==d.typicalHigh90?(0,s.jsx)("span",{"data-nosnippet":!0,children:"Donn\xe9es insuffisantes"}):(l=d.typicalLow90,o=d.typicalHigh90,null==l||null==o?"Donn\xe9es insuffisantes":`${(0,z.$g)(l)} – ${(0,z.$g)(o)}`)})]}),(0,s.jsxs)("div",{className:n?"min-w-0":"rounded-xl border border-surface-border bg-card p-4 text-card-foreground",children:[(0,s.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:"Couverture"}),(0,s.jsxs)("dd",{children:[(0,s.jsx)("div",{className:(0,z.cn)("font-mono font-semibold tabular-nums text-foreground",n?"mt-1 text-xs sm:text-sm":"mt-2 text-xl"),children:m}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1 text-[11px] text-muted-foreground",children:[(0,s.jsx)("span",{children:"Confiance"}),(0,s.jsx)(D.E,{variant:O[d.confidence],"aria-label":`Confiance ${u.toLocaleLowerCase("fr-FR")}`,children:u})]})]})]})]}),(0,s.jsx)("p",{className:(0,z.cn)("text-[11px] leading-4 text-muted-foreground",n&&"sr-only"),children:"Chaque boutique contribue au maximum une fois au calcul. Cet indicateur d\xe9crit les offres retail suivies, pas le march\xe9 de la revente."})]})}var V=r(2606),U=r(4363),G=r(84111),H=r(63076),J=r(13442),Z=r(10234);function Y({product:e}){let t=(0,G.t)(e.name,e.tcg),r=(0,H.bx)(e.offers,{releaseDate:e.release_date}),n=J.Uz[r];return(0,s.jsxs)(l(),{href:(0,N.p0)(e),prefetch:!1,className:"group flex flex-col overflow-hidden rounded-lg border border-surface-border bg-card shadow-sm shadow-shadow/[0.05] transition-[border-color,box-shadow,transform] hover:border-primary/35 hover:shadow-md hover:shadow-
1primary/[0.08] motion-safe:hover:-translate-y-px",children:[(0,s.jsx)("div",{className:"relative aspect-square border-b border-media-border bg-media",children:e.case_packaging?(0,s.jsx)(U.CaseProductVisual,{packaging:e.case_packaging,alt:t,className:"h-full w-full rounded-none border-0 shadow-none",sizes:"(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 200px",previewSize:360,loading:"lazy"}):e.image_url?(0,s.jsx)(o.ZoomImage,{src:e.image_url,alt:t,className:"h-full w-full cursor-zoom-in",sizes:"(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 200px",imgClassName:"object-contain p-3",loading:"lazy"}):(0,s.jsx)("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:(0,s.jsx)(V.A,{className:"h-6 w-6"})})}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.product_type&&(0,s.jsx)("span",{className:(0,z.cn)("w-fit rounded px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-wide",J.XW[e.product_type]??"bg-secondary text-muted-foreground"),children:(0,J.e7)(e.product_type,e.tcg)}),(0,s.jsxs)("span",{className:(0,z.cn)("inline-flex items-center gap-1 rounded border px-1.5 py-0.5 font-mono text-[10px]",n.chip),children:[(0,s.jsx)("span",{className:(0,z.cn)("h-1.5 w-1.5 rounded-full",n.dot)}),n.label]})]}),(0,s.jsx)("h3",{className:"line-clamp-2 text-sm font-medium leading-snug text-foreground/90 transition-colors group-hover:text-primary",children:t}),(0,s.jsx)("div",{className:"mt-auto flex items-baseline gap-1 pt-1",children:null!=e.min_price?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"d\xe8s"}),(0,s.jsx)("span",{className:"font-mono text-sm font-semibold tabular-nums text-foreground",children:(0,z.$g)(e.min_price)})]}):(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Prix indisponible"})})]})]})}function W({products:e,series:t,tcg:r}){return 0===e.length?null:(0,s.jsxs)("section",{"aria-labelledby":"similar-heading",className:"space-y-4 border-t border-border pt-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h2",{id:"similar-heading",className:"text-sm font-medium text-foreground/80",children:"Produits similaires"}),t&&(0,Z.Ru)(r)&&(0,s.jsx)(l(),{href:(0,Z.yH)(`/series/${(0,z.qc)(t)}`,r),prefetch:!1,className:"shrink-0 text-xs text-muted-foreground transition-colors hover:text-foreground",children:"Voir toute la s\xe9rie →"})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:e.map(e=>(0,s.jsx)(Y,{product:e},e.id))})]})}let X={price_down:"bg-success",in_stock:"bg-success",detected:"bg-muted-foreground/50",price_up:"bg-destructive",out_of_stock:"bg-destructive"},K={price_down:"text-success",in_stock:"text-success",detected:"text-muted-foreground",price_up:"text-destructive",out_of_stock:"text-destructive"};function Q({history:e}){let t=(0,c.useMemo)(()=>(function(e){let t={},r=[];for(let s of[...e].reverse()){let e=s.site,n=t[s.offer_id],a=null!=s.price&&Number.isFinite(s.price)&&s.price>0?s.price:null,i=null==s.in_stock?null:s.in_stock?"in_stock":"out_of_stock";if(n){let t=null!=a&&null!=n.price&&Math.abs(a-n.price)>=.01,l=null!=a&&null!=n.price?Math.max(a,n.price)/Math.min(a,n.price):null,o=t&&null!=l&&l<2,d=null!=i&&i!==n.status;if(o&&null!=a&&null!=n.price){let t=a-n.price;r.push({key:String(s.id),kind:t<0?"price_down":"price_up",site:e,category:s.category,message:`${t<0?"Baisse":"Hausse"} de prix — ${(0,z.$g)(n.price)} → ${(0,z.$g)(a)} (${t>0?"+":""}${(0,z.$g)(t)})`,date:s.scraped_at})}d&&("in_stock"===i?r.push({key:`${s.id}_s`,kind:"in_stock",site:e,category:s.category,message:"En stock",date:s.scraped_at}):"out_of_stock"===i&&r.push({key:`${s.id}_s`,kind:"out_of_stock",site:e,category:s.category,message:"Rupture de stock",date:s.scraped_at}))}else(null!=a||null!=i)&&r.push({key:String(s.id),kind:null!=a?"detected":"in_stock"===i?"in_stock":"out_of_stock",site:e,category:s.category,message:null!=a?`Prix d\xe9tect\xe9 — ${(0,z.$g)(a)}`:"in_stock"===i?"En stock":"Rupture de stock",date:s.scraped_at});t[s.offer_id]={price:a??n?.price??null,status:i}}return r.reverse().slice(0,25)})(e),[e]),[r,n]=(0,c.useState)(!1);return 0===t.length?(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Aucun \xe9v\xe9nement"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("ul",{className:"space-y-2",children:(r?t:t.slice(0,10)).map(e=>{let t=e.site?J.ej[e.site]:null,r="vendeur_tiers"===e.category?J.wk[e.category].short:null;return(0,s.jsxs)("li",{className:"flex items-start gap-2.5 text-xs",children:[(0,s.jsx)("span",{className:(0,z.cn)("mt-1 h-2 w-2 flex-shrink-0 rounded-full",X[e.kind])}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:(0,z.cn)("font-medium",K[e.kind]),children:e.message}),e.site&&(0,s.jsxs)("span",{className:"ml-1 text-muted-foreground",children:[t?.label??e.site,r?` ${r}`:""]})]}),(0,s.jsx)("span",{className:"flex-shrink-0 text-muted-foreground tabular-nums",children:(0,z.om)(e.date)})]},e.key)})}),t.length>10&&(0,s.jsx)("button",{onClick:()=>n(e=>!e),className:"mt-3 text-[11px] text-muted-foreground underline-offset-2 transition-colors hover:text-foreground hover:underline",children:r?"Voir moins":`Voir ${t.length-10} de plus`})]})}let ee=(0,n.default)(()=>r.e(4734).then(r.bind(r,64734)).then(e=>e.PriceChart),{loadableGenerated:{webpack:()=>[64734]},ssr:!1,loading:()=>(0,s.jsx)("div",{className:"h-[220px] animate-pulse rounded-lg bg-muted"})});function et({product:e,compositionBoosterProducts:t=[],caseBoosterCount:r=null,caseSpecialContents:n=[],caseContainedProduct:i=null,caseCompositionBoosterProducts:l=[],pullRateCatalog:o=[]}){let c=y(e)?e.booster_composition.boosters.map(e=>({code:e.set_code,name:e.extension})):y(i)?i.booster_composition.boosters.map(e=>({code:e.set_code,name:e.extension})):[{code:e.set_code,name:e.set_name}],u="pokemon"===e.tcg?(0,g.w1)(o,c):[],m=y(e)||y(i);return e.case_packaging||y(e)||e.content?.components?.length||e.promo_cards?.length||u.length?(0,s.jsxs)(s.Fragment,{children:[e.case_packaging&&(0,s.jsx)(_,{packaging:e.case_packaging,boosterCount:r,specialContents:n,containedProduct:i,boosterProducts:l,pullRateEditions:u}),y(e)&&(0,s.jsx)(a.BoosterCompositionPreview,{composition:e.booster_composition,boosterProducts:t,tcg:e.tcg,language:e.language,pullRateEditions:u,pullRateAction:(0,s.jsx)(v,{editions:u,compactOnly:!0}),specialComponents:e.content?.components??[]}),(0,s.jsx)(d.Y,{components:e.content?.components??[],excludePromotionalBoosters:y(e)}),(0,s.jsx)(T,{cards:e.promo_cards??[]}),"pokemon"===e.tcg&&!m&&(0,s.jsx)(v,{editions:u})]}):null}function er({product:e,history:t,statsAsOf:r}){let n=null==e.cardmarket?void e.min_price:void 0,a=e.cardmarket??n;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{id:"product-prices","aria-label":"\xc9volution du prix",className:"scroll-mt-32 border-t pt-6",children:[n&&(0,s.jsx)("p",{className:"mb-2 text-xs text-muted-foreground",children:"D\xe9mo DEV \xb7 courbe Cardmarket fictive"}),(0,s.jsx)(ee,{history:t,cardmarket:a,retailReferencePrice:e.retail_reference_price,children:!e.is_assorted&&(0,s.jsx)(B,{history:t,offers:e.offers,asOf:r,compact:!0})})]}),(0,s.jsxs)("section",{"aria-labelledby":"product-events-heading",className:"border-t pt-5",children:[(0,s.jsx)("h2",{id:"product-events-heading",className:"mb-3 text-sm font-medium",children:"Historique du stock & des prix"}),(0,s.jsx)(Q,{history:t})]})]})}function es({product:e,openings:t}){return(0,s.jsx)(I,{productId:e.id,productPath:(0,N.p0)(e),initialOpenings:t})}function en({product:e,products:t}){return 0===t.length?null:(0,s.jsx)(W,{products:t,series:(0,Z.Ru)(e.tcg)?e.series:null,tcg:e.tcg})}},79792:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var s=r(95155),n=r(12115),a=r(28136),i=r(91337);let l=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)(a.b,{ref:r,className:(0,i.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));l.displayName=a.b.displayName},79984:(e,t,r)=>{"use strict";r.d(t,{BT:()=>d,Wu:()=>c,ZB:()=>o,Zp:()=>i,aR:()=>l});var s=r(95155),n=r(12115),a=r(91337);let i=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("rounded-xl border border-surface-border bg-card text-card-foreground shadow-sm shadow-shadow/[0.06]",e),...t}));
1i.displayName="Card";let l=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",e),...t}));l.displayName="CardHeader";let o=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("font-semibold leading-none tracking-tight",e),...t}));o.displayName="CardTitle";let d=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("text-sm text-muted-foreground",e),...t}));d.displayName="CardDescription";let c=n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("p-6 pt-0",e),...t}));c.displayName="CardContent",n.forwardRef(({className:e,...t},r)=>(0,s.jsx)("div",{ref:r,className:(0,a.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter"},97212:(e,t,r)=>{"use strict";r.d(t,{J:()=>a});var s=r(95155),n=r(91337);function a({className:e}){return(0,s.jsxs)("svg",{viewBox:"0 0 24 24",className:(0,n.cn)("h-4 w-4",e),"aria-hidden":"true",focusable:"false",children:[(0,s.jsx)("path",{fill:"#4285F4",d:"M23.49 12.27c0-.79-.07-1.55-.2-2.27H12v4.51h6.47a5.53 5.53 0 0 1-2.39 3.63v2.96h3.82c2.24-2.06 3.59-5.1 3.59-8.83Z"}),(0,s.jsx)("path",{fill:"#34A853",d:"M12 24c3.24 0 5.96-1.07 7.95-2.9l-3.82-2.96c-1.06.71-2.41 1.13-4.13 1.13-3.13 0-5.78-2.11-6.72-4.95H1.33v3.05A12 12 0 0 0 12 24Z"}),(0,s.jsx)("path",{fill:"#FBBC05",d:"M5.28 14.32A7.21 7.21 0 0 1 4.9 12c0-.81.14-1.59.38-2.32V6.63H1.33A12 12 0 0 0 0 12c0 1.94.47 3.78 1.33 5.37l3.95-3.05Z"}),(0,s.jsx)("path",{fill:"#EA4335",d:"M12 4.73c1.76 0 3.34.61 4.59 1.8l3.44-3.44C17.95 1.15 15.23 0 12 0A12 12 0 0 0 1.33 6.63l3.95 3.05C6.22 6.84 8.87 4.73 12 4.73Z"})]})}}}]);

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.