PageSourceSearch

https://rezixsnkrs.com/assets/AdminCatalog-Cib0xXsh.js

js rezixsnkrs.com collected 2026-10-02 01:41:37 UTC 19,414 bytes, 1 lines download raw bytes

1import{r as d,j as e}from"./vendor-react-DjhEi87Y.js";import{H as Pe,s as g,c7 as pe,I as Y,A as qe,v as Ke,t as Ie,w as Oe,J as Fe,D as Ge,o as He,p as Ve,q as Xe,B as Ye,E as Ze}from"./index-CSaaeOAk.js";import{I as Z}from"./input-CHjMbTXM.js";import{B as D}from"./button-CzMtciak.js";import{c as T,C as Je}from"./CatalogImagePreview-xCibDBoE.js";import{L as E,br as ge,Y as Qe,bs as We,n as J,ap as es,V as ss,X as fe,q as ts,P as be,a4 as as,aa as je,p as rs}from"./vendor-icons-BAsfzkFD.js";import"./vendor-supabase-BwNLGjrE.js";const os=450,Q=1e3,Ne=150;function ns(c){return new Promise(u=>window.setTimeout(u,c))}function we(c){return[c.size_eu&&`EU ${c.size_eu}`,c.size_label,c.size_us&&`US ${c.size_us}`,c.size_uk&&`UK ${c.size_uk}`,c.size_cm&&`${c.size_cm} CM`].find(Boolean)??null}function ve(c){const u=new Set;let j=0;for(const N of c){N.barcode&&(j+=1);const k=we(N);k&&u.add(k)}return{codes:j,sizes:u.size}}function hs(){const{toast:c}=Pe(),[u,j]=d.useState([]),[N,k]=d.useState(null),[Ee,W]=d.useState(!0),[C,_e]=d.useState(""),[_,ee]=d.useState(null),[m,y]=d.useState(null),[Se,U]=d.use
1State(null),[v,R]=d.useState(""),[L,P]=d.useState(""),[q,K]=d.useState("men"),[w,I]=d.useState(!0),[O,se]=d.useState(!1),[ke,F]=d.useState([]),[Ce,G]=d.useState(new Map),[ye,te]=d.useState(!0),[ze,ae]=d.useState(null),[$e,re]=d.useState(null),[oe,ne]=d.useState(null),[ie,b]=d.useState(null),[H,z]=d.useState(new Map),[$,A]=d.useState(!1),S=d.useRef(0),[x,B]=d.useState({running:!1,total:0,done:0,found:0,failed:0,current:null}),de=d.useCallback(async()=>{W(!0);const s=500,t=[];let r=0,n=!0,a=w;for(;n;){const i=g.from("sneaker_catalog").select(a?"id,name,sku,size_type,image_path,source_url,created_at":"id,name,sku,image_path,source_url,created_at",r===0?{count:"exact"}:void 0).order("created_at",{ascending:!1}).range(r,r+s-1),{data:o,error:l,count:h}=await i;if(l){if(a&&pe(l)){I(!1),a=!1,t.length=0,r=0,n=!0;continue}break}a&&I(!0),r===0&&k(h??null);const f=(o??[]).map(p=>({...p,size_type:Y(p.size_type)}));t.push(...f),n=f.length===s&&(h==null||t.length<h),r+=s}j(t),W(!1)},[w]),M=d.useCallback(async s=>{const t=S.current+1;if(S.current=t,s.length===0){S.current===t&&(z(new Map),A(!1));return}A(!0);const r=[],n=[];for(let l=0;l<s.length;l+=Ne)n.push(l);let a;try{a=await Promise.all(n.map(async l=>{const h=s.slice(l,l+Ne),f=[];let p=0,me=!0;for(;me;){const{data:Le,error:xe}=await g.from("sneaker_catalog_barcodes").select("catalog_id, barcode, size_label, size_eu, size_us, size_uk, size_cm").in("catalog_id",h).range(p,p+Q-1);if(xe)throw xe;const he=Le??[];f.push(...he),me=he.length===Q,p+=Q}return f}))}catch{S.current===t&&A(!1);return}for(const l of a)r.push(...l);const i=new Map,o=new Map;for(const l of r){const h=o.get(l.catalog_id)??{codes:0,sizes:0};h.codes+=l.barcode?1:0;const f=we(l);if(f){const p=i.get(l.catalog_id)??new Set;p.add(f),i.set(l.catalog_id,p),h.sizes=p.size}o.set(l.catalog_id,h)}S.current===t&&(z(o),A(!1))},[]),V=d.useCallback(async()=>{te(!0);try{const{data:s,error:t}=await g.from("catalog_suggestions").select("id, user_id, stockx_url, note, status, created_at, reviewed_at").order("created_at",{ascending:!1}).limit(100);if(t)throw t;const r=s??[];F(r);const n=[...new Set(r.map(a=>a.user_id))];if(n.length>0){const{data:a,error:i}=await g.from("profiles").select("id, name, email, avatar_url").in("id",n);if(i)throw i;G(new Map((a??[]).map(o=>[o.id,o])))}else G(new Map)}catch{F([]),G(new Map)}finally{te(!1)}},[]);d.useEffect(()=>{de()},[de]),d.useEffect(()=>{M(u.map(s=>s.id))},[u,M]),d.useEffect(()=>{V()},[V]);const le=u.filter(s=>{var r;if(!C.trim())return!0;const t=C.toLowerCase();return s.name.toLowerCase().includes(t)||(((r=s.sku)==null?void 0:r.toLowerCase().includes(t))??!1)}),Ae=s=>{U(s.id),R(s.name),P(s.sku??""),K(Y(s.size_type))},Be=()=>{U(null),R(""),P(""),K("men")},Me=async s=>{if(!v.trim())return;se(!0);const t={name:v.trim(),normalized_name:v.trim().toLowerCase(),sku:L.trim()||null,...w?{size_type:q}:{}};let{error:r}=await g.from("sneaker_catalog").update(t).eq("id",s);if(r&&w&&pe(r)){I(!1);const{size_type:n,...a}=t;r=(await g.from("sneaker_catalog").update(a).eq("id",s)).error}r?c({title:"Modification impossible",description:r.message,variant:"destructive"}):(j(n=>n.map(a=>a.id===s?{...a,name:v.trim(),sku:L.trim()||null,size_type:q}:a)),U(null)),se(!1)},De=async s=>{ee(s.id);try{const{error:t}=await g.from("sneaker_catalog").delete().eq("id",s.id);if(t)throw t;if(j(r=>r.filter(n=>n.id!==s.id)),s.image_path){const{error:r}=await g.storage.from("sneaker-catalog").remove([s.image_path])}}catch{}finally{y(null),ee(null)}},Te=async s=>{await navigator.clipboard.writeText(s.stockx_url),re(s.id),window.setTimeout(()=>re(null),1200)},ce=async(s,t)=>{ae(s.id);const{data:{user:r}}=await g.auth.getUser(),{error:n}=await g.from("catalog_suggestions").update({status:t,reviewed_at:new Date().toISOString(),reviewed_by:(r==null?void 0:r.id)??null}).eq("id",s.id);n||F(a=>a.map(i=>i.id===s.id?{...i,status:t,reviewed_at:new Date().toISOString()}:i)),ae(null)},Ue=async s=>{b(null),ne(s.id);try{const{data:t,error:r}=await g.functions.invoke("enrich-catalog-barcodes",{body:{catalog_id:s.id}});if(r||(t==null?void 0:t.success)===!1)b((t==null?void 0:t.message)||(r==null?void 0:r.message)||"Enrichissement UPC/EAN impossible.");else{const n=Number((t==null?void 0:t.upserted)??0),a=Number((t==null?void 0:t.skipped_conflicts)??0),i=ve(Array.isArray(t==null?void 0:t.barcodes)?t.barcodes:[]);(i.codes>0||i.sizes>0)&&z(o=>{const l=new Map(o);return l.set(s.id,i),l}),M(u.map(o=>o.id)),n>0?(c({title:"Codes bo\xEEte ajout\xE9s",description:`${n} code${n>1?"s":""} associ\xE9${n>1?"s":""} \xE0 ${s.name}.`,imageUrl:T("sneaker-catalog",s.image_path),variant:"success",duration:5500}),b(`${n} code${n>1?"s":""} bo\xEEte associ\xE9${n>1?"s":""} \xE0 ${s.name}.${a?` ${a} code${a>1?"s":""} ignor\xE9${a>1?"s":""} car d\xE9j\xE0 li\xE9${a>1?"s":""} \xE0 une autre paire.`:""}`)):a>0?b(`Aucun code ajout\xE9 pour ${s.name} : ${a} code${a>1?"s":""} d\xE9j\xE0 li\xE9${a>1?"s":""} \xE0 une autre paire.`):b(`Aucun code bo\xEEte trouv\xE9 pour ${s.name}.`)}}catch(t){b(t instanceof Error?t.message:"Enrichissement UPC/EAN impossible.")}finally{ne(null)}},Re=async()=>{var n;const s=u.filter(a=>{var o;if(!((o=a.sku)!=null&&o.trim()))return!1;const i=H.get(a.id);return((i==null?void 0:i.sizes)??0)===0&&((i==null?void 0:i.codes)??0)===0});if(s.length===0){b("Toutes les paires charg\xE9es avec SKU ont d\xE9j\xE0 des codes bo\xEEte.");return}b(null),B({running:!0,total:s.length,done:0,found:0,failed:0,current:((n=s[0])==null?void 0:n.name)??null});let t=0,r=0;for(let a=0;a<s.length;a+=1){const i=s[a];B(o=>({...o,current:i.name}));try{const{data:o,error:l}=await g.functions.invoke("enrich-catalog-barcodes",{body:{catalog_id:i.id}});if(l||(o==null?void 0:o.success)===!1)r+=1;else{t+=Number((o==null?void 0:o.upserted)??0);const h=ve(Array.isArray(o==null?void 0:o.barcodes)?o.barcodes:[]);z(f=>{const p=new Map(f);
1return(h.codes>0||h.sizes>0)&&p.set(i.id,h),p})}}catch{r+=1}B(o=>{var l;return{...o,done:a+1,found:t,failed:r,current:((l=s[a+1])==null?void 0:l.name)??null}}),a<s.length-1&&await ns(os)}await M(u.map(a=>a.id)),B(a=>({...a,running:!1,current:null})),t>0&&c({title:"Codes bo\xEEte ajout\xE9s",description:`${t} code${t>1?"s":""} associ\xE9${t>1?"s":""} sur ${s.length} paire${s.length>1?"s":""}.`,variant:"success",duration:6500}),b(`${t} code${t>1?"s":""} bo\xEEte ajout\xE9${t>1?"s":""} sur ${s.length} paire${s.length>1?"s":""} trait\xE9e${s.length>1?"s":""}.${r?` ${r} \xE9chec${r>1?"s":""}.`:""}`)},X=ke.filter(s=>s.status==="pending"),ue=u.filter(s=>{var r;if($||!((r=s.sku)!=null&&r.trim()))return!1;const t=H.get(s.id);return((t==null?void 0:t.sizes)??0)===0&&((t==null?void 0:t.codes)??0)===0}).length;return e.jsxs("div",{className:"w-full space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"Catalogue"}),e.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[u.length," paire",u.length!==1?"s":""," charg\xE9e",u.length!==1?"s":"",N!=null&&N!==u.length?` sur ${N}`:""," dans la base."]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:x.running||$||ue===0,onClick:()=>void Re(),title:"Enrichir toutes les paires charg\xE9es qui ont un SKU mais aucun code bo\xEEte",children:[x.running||$?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5"}),"Codes manquants (",ue,")"]}),e.jsxs(D,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",onClick:()=>void V(),children:[e.jsx(Qe,{className:"h-3.5 w-3.5"}),"Actualiser"]})]})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("p",{className:"text-xs font-medium text-foreground",children:"Propositions membres"})]}),e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[X.length," en attente"]})]}),ye?e.jsx("div",{className:"space-y-2 p-4",children:[1,2].map(s=>e.jsx("div",{className:"h-12 rounded bg-muted animate-pulse"},s))}):X.length===0?e.jsx("div",{className:"px-4 py-6 text-center",children:e.jsx("p",{className:"text-xs text-muted-foreground",children:"Aucune proposition en attente."})}):e.jsx("div",{className:"divide-y divide-border",children:X.map(s=>{var a;const t=Ce.get(s.user_id),r=((a=t==null?void 0:t.name)==null?void 0:a.trim())||(t==null?void 0:t.email)||"Membre",n=ze===s.id;return e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3",children:[e.jsxs(qe,{className:"mt-0.5 h-8 w-8 border border-border bg-muted",children:[e.jsx(Ke,{src:Ie(t==null?void 0:t.avatar_url,s.user_id
1),alt:""}),e.jsx(Oe,{className:"text-[10px]",children:r.slice(0,2).toUpperCase()})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("a",{href:s.stockx_url,target:"_blank",rel:"noopener noreferrer",className:"block truncate text-xs font-medium text-foreground hover:underline",children:s.stockx_url.replace(/^https?:\/\//,"")}),e.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["Propos\xE9 par ",r," \xB7 ",new Date(s.created_at).toLocaleDateString("fr-FR")]}),s.note&&e.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground rounded bg-muted/20 px-2 py-1",children:s.note})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("button",{onClick:()=>void Te(s),className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground",title:"Copier le lien",children:$e===s.id?e.jsx(J,{className:"h-3.5 w-3.5 text-emerald-500"}):e.jsx(es,{className:"h-3.5 w-3.5"})}),e.jsx("a",{href:s.stockx_url,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground",title:"Ouvrir StockX",children:e.jsx(ss,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>void ce(s,"processed"),disabled:n,className:"p-1.5 rounded hover:bg-emerald-500/10 text-muted-foreground hover:text-emerald-500 disabled:opacity-50",title:"Marquer comme ajout\xE9",children:n?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(J,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>void ce(s,"rejected"),disabled:n,className:"p-1.5 rounded hover:bg-red-500/10 text-muted-foreground hover:text-red-500 disabled:opacity-50",title:"Rejeter",children:e.jsx(fe,{className:"h-3.5 w-3.5"})})]})]},s.id)})})]}),e.jsxs("div",{className:"relative",children:[e.jsx(ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(Z,{className:"pl-8 h-8 text-xs",placeholder:"Rechercher par nom ou SKU\u2026",value:C,onChange:s=>_e(s.target.value)})]}),ie&&e.jsx("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-xs text-muted-foreground",children:ie}),x.running&&e.jsxs("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("span",{children:["Enrichissement codes bo\xEEte \xB7 ",x.done,"/",x.total,x.current?` \xB7 ${x.current}`:""]}),e.jsxs("span",{children:[x.found," ajout\xE9",x.found>1?"s":""," \xB7 ",x.failed," \xE9chec",x.failed>1?"s":""]})]}),e.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full rounded-full bg-emerald-500 transition-all",style:{width:`${x.total?Math.round(x.done/x.total*100):0}%`}})})]}),Ee?e.jsx("div",{className:"space-y-2",children:[1,2,3,4,5].map(s=>e.jsx("div",{className:"h-14 rounded-lg bg-muted animate-pulse"},s))}):le.length===0?e.jsxs("div",{className:"rounded-lg border border-border bg-card p-10 text-center",children:[e.jsx(be,{className:"h-8 w-8 mx-auto text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:C?"Aucun r\xE9sultat.":"Catalogue vide."})]}):e.jsx("div",{className:"rounded-lg border border-border bg-card overflow-hidden",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border bg-muted/20",children:[e.jsx("th",{className:"text-left px-3 py-2.5 font-medium text-muted-foreground w-12",children:"Photo"}),e.jsx("th",{className:"text-left px-3 py-2.5 font-medium text-muted-foreground",children:"Nom"}),e.jsx("th",{className:"text-left px-3 py-2.5 font-medium text-muted-foreground w-36",children:"SKU"}),w&&e.jsx("th",{className:"text-left px-3 py-2.5 font-medium text-muted-foreground w-24",children:"Type"}),e.jsx("th",{className:"text-left px-3 py-2.5 font-medium text-muted-foreground w-28",children:"Ajout\xE9 le"}),e.jsx("th",{className:"px-3 py-2.5 w-20"})]})}),e.jsx("tbody",{children:le.map(s=>{const t=Se===s.id,r=_===s.id,n=T("sneaker-catalog",s.image_path),a=H.get(s.id),i=$&&!a;return e.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/20 transition-colors",children:[e.jsx("td",{className:"px-3 py-2.5",children:e.jsx(Je,{src:n,name:s.name})}),e.jsx("td",{className:"px-3 py-2.5",children:t?e.jsx(Z,{value:v,onCh
1ange:o=>R(o.target.value),className:"h-7 text-xs",autoFocus:!0}):e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium text-foreground truncate max-w-xs",children:s.name}),s.source_url&&e.jsx("a",{href:s.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground truncate block max-w-xs",children:s.source_url.replace("https://","").slice(0,45)})]})}),e.jsx("td",{className:"px-3 py-2.5",children:t?e.jsx(Z,{value:L,onChange:o=>P(o.target.value),className:"h-7 text-xs font-mono",placeholder:"SKU (optionnel)"}):e.jsx("span",{className:"text-muted-foreground font-mono",children:s.sku??"\u2014"})}),w&&e.jsx("td",{className:"px-3 py-2.5",children:t?e.jsxs("select",{value:q,onChange:o=>K(Y(o.target.value)),className:"h-7 rounded-md border border-input bg-background px-2 text-xs text-foreground",children:[e.jsx("option",{value:"men",children:"Men"}),e.jsx("option",{value:"gs",children:"GS"})]}):e.jsx("span",{className:"rounded border border-border bg-muted/30 px-2 py-1 text-[11px] font-medium text-muted-foreground",children:Fe(s.size_type)})}),e.jsx("td",{className:"px-3 py-2.5 text-muted-foreground",children:new Date(s.created_at).toLocaleDateString("fr-FR")}),e.jsx("td",{className:"px-3 py-2.5",children:e.jsx("div",{className:"flex items-center gap-1 justify-end",children:t?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>Me(s.id),disabled:O||!v.trim(),className:"p-1.5 rounded hover:bg-emerald-500/10 text-emerald-500 disabled:opacity-50",title:"Sauvegarder",children:O?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(J,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:Be,disabled:O,className:"p-1.5 rounded hover:bg-muted text-muted-foreground",title:"Annuler",children:e.jsx(fe,{className:"h-3.5 w-3.5"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>void Ue(s),disabled:oe===s.id||!s.sku,className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground disabled:opacity-40",title:s.sku?"Enrichir UPC/EAN tailles":"SKU requis pour enrichir",children:oe===s.id?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ge,{className:"h-3.5 w-3.5"})}),e.jsx("span",{className:"min-w-8 rounded border border-border bg-muted/20 px-1.5 py-1 text-center text-[10px] font-medium text-muted-foreground",title:i?"Chargement des codes bo\xEEte":`${(a==null?void 0:a.codes)??0} code${((a==null?void 0:a.codes)??0)>1?"s":""} bo\xEEte \xB7 ${(a==null?void 0:a.sizes)??0} taille${((a==null?void 0:a.sizes)??0)>1?"s":""}`,children:i?"...":(a==null?void 0:a.codes)??0}),e.jsx("button",{onClick:()=>Ae(s),className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground",title:"Modifier",children:e.jsx(as,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>y(s),disabled:r,className:"p-1.5 rounded hover:bg-red-500/10 text-muted-foreground hover:text-red-500 disabled:opacity-50",title:"Supprimer",children:r?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(je,{className:"h-3.5 w-3.5"})})]})})})]},s.id)})})]})}),e.jsx(Ge,{open:m!==null,onOpenChange:s=>{!s&&!_&&y(null)},children:e.jsxs(He,{className:"w-[min(92vw,28rem)] gap-0 overflow-hidden p-0",children:[e.jsx(Ve,{className:"border-b border-border px-5 py-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-red-500/20 bg-red-500/10 text-red-400",children:e.jsx(rs,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(Xe,{children:"Supprimer du catalogue ?"}),e.jsx(Ye,{className:"mt-1.5",children:"Cette action retire la paire du catalogue Rezix et supprime sa photo associ\xE9e."})]})]})}),m&&e.jsx("div",{className:"px-5 py-4",children:e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-muted/20 p-3",children:[T("sneaker-catalog",m.image_path)?e.jsx("img",{src:T("sneaker-catalog",m.image_path)??"",alt:"",className:"h-14 w-14 rounded-md border border-border bg-white object-contain"}):e.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-md border border-border bg-muted",children:e.jsx(be,{className:"h-5 w-5 text-muted-foreground"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"line-clamp-2 text-sm font-medium text-foreground",children:m.name}),m.sku&&e.jsx("p",{className:"mt-1 font-mono text-[11px] text-muted-foreground",children:m.sku})]})]})}),e.jsxs(Ze,{className:"border-t border-border px-5 py-4",children:[e.jsx(D,{type:"button",variant:"outline",size:"sm",onClick:()=>y(null),disabled:!!_,children:"Annuler"}),e.jsxs(D,{type:"button",variant:"destructive",size:"sm",onClick:()=>m&&void De(m),disabled:!m||_===(m==null?void 0:m.id),className:"gap-1.5",children:[m&&_===m.id?e.jsx(E,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(je,{className:"h-3.5 w-3.5"}),"Supprimer"]})]})]})})]})}export{hs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.