PageSourceSearch

https://kleidio.com/_next/static/chunks/14139agrlkiyz.js?dpl=dpl_8L6XorYSmkWfE2Z5WNjMV8z3RLbA

js kleidio.com collected 2026-10-02 01:34:15 UTC 119,124 bytes, 112 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,168447,e=>{"use strict";e.i(950382);var t=e.i(414294),r=e.i(430878),n=e.i(736218),a=e.i(994654),i=e.i(94194),s=e.i(39811),l=e.i(149075),o=e.i(353926),d=e.i(653415),c=e.i(41200);let u=(0,c.default)("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),m=(0,c.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var h=e.i(846601),g=e.i(271);let x=(0,c.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var p=e.i(738377),f=e.i(5674),b=e.i(513653),v=e.i(982373);let y=(0,c.default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var k=e.i(689535);let j=(0,c.default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);var N=e.i(686866);let w=(0,c.default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var _=e.i(151357),S=e.i(947131),z=e.i(549475),L=e.i(469585);let M=[{id:"stone-island",brand:"Stone Island",category:"Hoodie",data:{attributes:{},meta:{photos_analyzed:4,model:"demo",processing_ms:0},listing:{title:"Stone Island Shadow Project Hoodie Schwarz Reflective Größe L",description:`✨ Stone Island Shadow Project Hoodie aus der SS22 Kollektion mit reflektierendem 3M-Detail.
2
3Aus der hochbegehrten Shadow Project Linie — die technische Sub-Brand von Stone Island. Charakteristisch: minimalistisches Design, taktische Details und Premium-Materialien Made in Italy.
4
5━━━━━━━━━━━━━━━
6
7📋 DETAILS
8🏷️ Marke: Stone Island
9👕 Modell: Shadow Project (SS22)
10📏 Gr\xf6\xdfe: L
11🧵 Material: 100% Baumwolle
12🎨 Farbe: Schwarz
13✨ Zustand: Sehr gut
14
15📐 MA\xdfE (flach gemessen)
16• Brustweite: [eintragen] cm
17• L\xe4nge: [eintragen] cm
18• \xc4rmell\xe4nge: [eintragen] cm
19
20━━━━━━━━━━━━━━━
21
22💬 \xdcBER DAS ST\xdcCK
233M-Reflective-Print am R\xfccken kommt im Dunkeln voll zur Geltung. Compass-Badge am linken \xc4rmel, original und makellos gestickt. Saubere Schnittf\xfchrung typisch f\xfcr die Shadow Project Linie.
24✅ Originaler Tag mit 6-stelliger Artikel-Nr. vorhanden
25✅ Authentizit\xe4t gepr\xfcft
26
27━━━━━━━━━━━━━━━
28
29📦 VERSAND & TRUST
30✅ Versand mit DHL nach Zahlungseingang (1-3 Werktage)
31✅ Sicher verpackt im Polybag/Karton
32✅ Aus tierfreiem Nichtraucher-Haushalt
33💬 Bei Fragen gerne anschreiben
34
35━━━━━━━━━━━━━━━
36
37#stoneisland #shadowproject #ss22 #stoneislandhoodie #archive #streetwear #italianmadeinitaly #reflective #vintedfinds #unisex`,pricing:{sell_low:120,sell_target:200,sell_high:320,buy_max:70,margin_target_pct:65,reasoning:"Stone Island TOP-Tier · Shadow Project Hot-Piece · Sehr gut Zustand. SS22-Kollektion ist bei Sammlern stark gefragt."},hashtags:["stoneisland","shadowproject","ss22","stoneislandhoodie","archive","streetwear","italianmadeinitaly","reflective","vintedfinds","unisex"],measurements_to_request:[],cross_platform:{ebay_title:"Stone Island Shadow Project Hoodie SS22 Reflective Schwarz Gr. L Original",kleinanzeigen_title:"Stone Island Shadow Project Hoodie SS22 Schwarz Größe L"},warnings:[],uncertainty_notes:[]}}},{id:"carhartt",brand:"Carhartt",category:"Jacke",data:{attributes:{},meta:{photos_analyzed:5,model:"demo",processing_ms:0},listing:{title:"Carhartt Detroit Jacket Vintage 90s Workwear Braun Größe XL",description:`✨ Original Carhartt Detroit Jacket aus den 90ern — der Workwear-Klassiker schlechthin.
38
39Heritage Workwear mit Patina und Charakter — die Detroit Jacket ist das ikonische Carhartt-Modell mit Cord-Kragen und Blanket-Lining. Diese hier hat die typische 90er-Era-Schnittf\xfchrung mit boxy fit.
40
41━━━━━━━━━━━━━━━
42
43📋 DETAILS
44🏷️ Marke: Carhartt
45👕 Modell: Detroit Jacket (Heritage Workwear)
46📏 Gr\xf6\xdfe: XL
47🧵 Material: 12oz Duck Canvas (100% Baumwolle), Blanket-Lining
48🎨 Farbe: Braun (Carhartt Brown)
49✨ Zustand: Gut (mit Vintage-Patina)
50
51📐 MA\xdfE (flach gemessen)
52• Brustweite: [eintragen] cm
53• L\xe4nge: [eintragen] cm
54• \xc4rmell\xe4nge: [eintragen] cm
55• Schulterbreite: [eintragen] cm
56
57━━━━━━━━━━━━━━━
58
59💬 \xdcBER DAS ST\xdcCK
60C-Logo Patch am Brustkorb gerade aufgen\xe4ht, "Carhartt" Schriftzug klar lesbar. Cord-Kragen mit der typischen Workwear-Heritage. Patina an Saum und Manschetten — geh\xf6rt zum Look, kein Mangel.
61
62━━━━━━━━━━━━━━━
63
64📦 VERSAND & TRUST
65✅ Versand mit DHL nach Zahlungseingang (1-3 Werktage)
66✅ Sicher verpackt im Polybag/Karton
67✅ Aus tierfreiem Nichtraucher-Haushalt
68💬 Bei Fragen gerne anschreiben
69
70━━━━━━━━━━━━━━━
71
72#carhartt #detroitjacket #carharttvintage #heritageworkwear #90svintage #workwear #vintagejacke #brownjacket #vintedfinds #unisex #archive`,pricing:{sell_low:50,sell_target:100,sell_high:200,buy_max:30,margin_target_pct:70,reasoning:"Carhartt PREMIUM-Tier · Detroit Jacket Hot-Piece · 90s-Era treibt Sammler-Wert."},hashtags:["carhartt","detroitjacket","carharttvintage","heritageworkwear","90svintage","workwear","vintagejacke","brownjacket","vintedfinds","unisex","archive"],measurements_to_request:[],cross_platform:{ebay_title:"Carhartt Detroit Jacket Vintage 90s Heritage Workwear Braun Gr. XL",kleinanzeigen_title:"Vintage Carhartt Detroit Jacket 90s Braun Größe XL"},warnings:[],uncertainty_notes:[]}}},{id:"polo-rl",brand:"Polo Ralph Lauren",category:"Polo",data:{attributes:{},meta:{photos_analyzed:3,model:"demo",processing_ms:0},listing:{title:"Polo Ralph Lauren Big Pony Italia Polo Hemd Königsblau Größe M",description:`✨ Polo Ralph Lauren Big Pony Polo mit "Italia"-Stickung und gro\xdfer Nummer 5 — Sammler-Variante.
73
74Aus der gefragten Big-Pony-Linie mit Country-Stickung. Diese Italia-Edition ist deutlich seltener als das Basic-Polo und hebt sich durch die Brust-Stickung in Gold deutlich ab.
75
76━━━━━━━━━━━━━━━
77
78📋 DETAILS
79🏷️ Marke: Polo Ralph Lauren
80👕 Modell: Big Pony "Italia" (mit Land-Stickung)
81📏 Gr\xf6\xdfe: M
82🧵 Material: 100% Baumwoll-Piqu\xe9
83🎨 Farbe: K\xf6nigsblau
84✨ Zustand: Sehr gut
85
86📐 MA\xdfE (flach gemessen)
87• Brustweite: [eintragen] cm
88• L\xe4nge: [eintragen] cm
89• \xc4rmell\xe4nge: [eintragen] cm
90
91━━━━━━━━━━━━━━━
92
93💬 \xdcBER DAS ST\xdcCK
94Pony korrekt gestickt — Pferd nach links, klare Stickerei in Gold. "Italia"-Stickung \xfcber Brust prominent. Wei\xdfe Kn\xf6pfe ohne RL-Print typisch f\xfcr die Linie.
95✅ Originaler "Polo by Ralph Lauren" Tag innen
96✅ Authentizit\xe4t gepr\xfcft
97
98━━━━━━━━━━━━━━━
99
100📦 VERSAND & TRUST
101✅ Versand mit DHL nach Zahlungseingang (1-3 Werktage)
102✅ Sicher verpackt im Polybag/Karton
103✅ Aus tierfreiem Nichtraucher-Haushalt
104💬 Bei Fragen gerne anschreiben
105
106━━━━━━━━━━━━━━━
107
108#poloralphlauren #ralphlauren #bigpony #poloitalia #countrypony #ralphlaurenpolo #poloshirt #vintagepolo #vintedfinds #unisex`,pricing:{sell_low:50,sell_target:65,sell_high:75,buy_max:16,margin_target_pct:75,reasoning:"Polo RL PREMIUM-Tier · Big Pony mit Land-Stickung verdoppelt Wert vs Basic-Polo · Sehr gut Zustand."},hashtags:["poloralphlauren","ralphlauren","bigpony","poloitalia","countrypony","ralphlaurenpolo","poloshirt","vintagepolo","vintedfinds","unisex"],measurements_to_request:[],cross_platform:{ebay_title:"Polo Ralph Lauren Big Pony Italia Polo Hemd Königsblau Gr. M",kleinanzeigen_title:"Polo Ralph Lauren Big Pony Italia Königsblau Größe M"},warnings:[],uncertainty_notes:[]}}}];
108var C=e.i(192258),E=e.i(893450),D=e.i(706867);let P="kl_pending_listing";function I(){try{return window.location.pathname.startsWith("/account")}catch{return!1}}function T(e){try{let t=localStorage.getItem(e);if(!t)return null;let r=null;try{r=JSON.parse(t)}catch{r=null}if(!r||"number"!=typeof r.at||Date.now()-r.at>864e5)return localStorage.removeItem(e),null;return r}catch{return null}}function F(e){try{localStorage.setItem(P,JSON.stringify({at:Date.now(),data:e}))}catch{}}let A="kl_pending_photo";var B=e.i(440926),K=e.i(652464),R=e.i(999644),$=e.i(347431),O=e.i(715968),V=e.i(437939),U=e.i(720161),W=e.i(881248),H=e.i(857926);let G="kil_pending_req";function J(){try{localStorage.removeItem(G)}catch{}}let q=(0,r.createContext)({locked:!1,onLocked:()=>{}}),Z=[.22,1,.36,1],X={duration:.22,ease:Z},Y={duration:.13,ease:Z},Q=["image/jpeg","image/png","image/webp","image/heic","image/heif"];async function ee(e){return(0,K.downscaleToFile)(e,{maxDimension:1024,quality:.72})}function et(e){return"number"==typeof e&&Number.isFinite(e)?`${Math.max(0,Math.round(e)-1)},99`:"—"}function er(){return(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none -z-10",style:{background:"radial-gradient(ellipse 55% 48% at 0% 0%, rgb(var(--brand-rgb)/0.11), transparent 72%), radial-gradient(ellipse 48% 42% at 100% 22%, rgb(var(--brand-rgb)/0.09), transparent 72%), radial-gradient(ellipse 42% 32% at 48% 82%, rgba(92,239,205,0.055), transparent 76%)"}})}function en({dragActive:e,hasFiles:r,onDragOver:a,onDragLeave:i,onDrop:s,onClick:l}){return(0,t.jsx)("div",{onDragOver:a,onDragLeave:i,onDrop:s,onClick:l,role:"button",tabIndex:0,"aria-label":"Bis zu 8 Fotos hochladen: klicken oder hierher ziehen",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())},className:`group glass-card relative rounded-3xl cursor-pointer transition-all duration-300 overflow-hidden ${e?"!border-[var(--primary)] !bg-[var(--primary)]/[0.08] scale-[1.01]":"hover:!border-[var(--primary)]/50"}`,style:{backgroundImage:e?"radial-gradient(circle at 50% 50%, rgb(var(--brand-rgb)/0.12), transparent 70%)":"none",backdropFilter:"none",WebkitBackdropFilter:"none"},children:(0,t.jsxs)("div",{className:`flex flex-col items-center justify-center text-center transition-all ${r?"py-8 px-6":"py-16 px-6"}`,children:[(0,t.jsxs)(n.motion.div,{animate:e?{scale:1.15}:{scale:1},transition:{duration:.2},className:"relative w-14 h-14 rounded-2xl flex items-center justify-center mb-4",style:{background:"var(--brand)",boxShadow:"0 8px 24px -4px rgb(var(--brand-rgb)/0.4)"},children:[(0,t.jsx)(o.Upload,{size:22,className:"text-[var(--on-brand)]",strokeWidth:2.4}),(0,t.jsx)("div",{className:"absolute inset-0 rounded-2xl shimmer-overlay"})]}),(0,t.jsx)("p",{className:"text-base font-semibold text-[var(--foreground)] mb-1 tracking-tight",children:e?"Lass los!":"Bis zu 8 Fotos hochladen"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:e?(0,t.jsx)(t.Fragment,{children:"Werde gleich analysiert"}):(0,t.jsxs)(t.Fragment,{children:["oder per ",(0,t.jsx)("span",{className:"text-[var(--primary)] font-medium",children:"Drag & Drop"})," · ⌘V einfügen"]})})]})})}function ea({previews:e,onRemove:r,onClear:i,onAdd:s}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3 px-1",children:[(0,t.jsxs)("p",{className:"text-xs font-semibold text-[var(--muted-foreground)]",children:[e.length," ",(0,t.jsxs)("span",{className:"opacity-50",children:["/ ",8]})]}),(0,t.jsx)("button",{onClick:i,className:"text-xs font-medium text-[var(--muted-foreground)] hover:text-[var(--destructive)] transition",children:"Alle entfernen"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-2",children:[(0,t.jsx)(a.AnimatePresence,{children:e.map((e,a)=>(0,t.jsxs)(n.motion.div,{layout:!0,initial:{opacity:0,scale:.85,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.85},transition:{duration:.25,ease:Z},className:"relative aspect-square rounded-xl overflow-hidden border border-[var(--border)] group hover:border-[var(--primary)]/40 transition",children:[(0,t.jsx)("img",{src:e,alt:"Hochgeladenes Produktfoto",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-110"}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),r(a)},className:"absolute top-1 right-1 w-6 h-6 rounded-full bg-black/80 backdrop-blur text-white opacity-0 group-hover:opacity-100 transition-all flex items-center justify-center hover:bg-black hover:scale-110",children:(0,t.jsx)(o.X,{size:11})})]},e))}),e.length<8&&(0,t.jsx)("button",{onClick:s,className:"aspect-square rounded-xl border border-dashed border-[var(--border)] hover:border-[var(--primary)] hover:bg-[var(--primary)]/[0.05] flex items-center justify-center text-[var(--muted-foreground)] hover:text-[var(--primary)] transition group",children:(0,t.jsx)("span",{className:"text-2xl leading-none transition-transform group-hover:scale-110 group-hover:rotate-90",children:"+"})})]})]})}let ei=["Stone Island","C.P. Company","Carhartt","Nike","Adidas","Polo Ralph Lauren","Ralph Lauren","Lacoste","Fred Perry","Tommy Hilfiger","The North Face","Burberry","Acne Studios","Maison Margiela","Off-White","Arcteryx","Patagonia","True Religion","Dolce & Gabbana","Diesel","Iceberg","Sergio Tacchini","Ellesse","Champion","Polo Sport","Tommy Jeans"],es=["Hoodie","Pullover","Sweater","Polo","Hemd","T-Shirt","Jacke","Trackjacket","Trainingsanzug","Weste","Mantel","Jeans","Hose","Trackpants","Shorts","Kleid","Rock","Schuhe","Sneaker","Schal","Mütze","Tasche"];function el({anon:e,onStart:n}){return(0,r.useEffect)(()=>{(0,R.track)("naechstes_piece_view",{anon:e})},[e]),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-3 rounded-2xl border border-[var(--border)] bg-[var(--fill-1)] p-4 sm:p-5",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--foreground)]",children:"Noch ein Piece?"}),(0,t.jsx)("p",{className:"mt-0.5 text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:"Fotos wählen, der Rest läuft wie eben. Dieses Listing bleibt stehen, bis du das nächste startest."})]}),(0,t.jsxs)("button",{type:"button",onClick:n,className:"flex items-center justify-center gap-2 rounded-2xl px-5 py-3 text-[length:var(--fs-body)] font-semibold text-[var(--on-brand)] transition-transform active:scale-[0.99] max-sm:w-full",style:{background:"var(--brand)",boxShadow:"0 8px 24px -4px rgb(var(--brand-rgb)/0.4)"},children:[(0,t.jsx)(p.Images,{size:18,strokeWidth:2,"aria-hidden":!0})," Nächstes Piece listen ",(0,t.jsx)(d.ArrowRight,{size:16,"aria-hidden":!0})]})]})}function eo({open:e,onToggle:r,hints:i,onChange:s}){let l=[i.brand,i.category,i.size].filter(e=>e.trim().length>0).length;return(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--fill-1)] overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-[var(--fill-1)] transition",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(f.Lightbulb,{size:15,className:"shrink-0 text-[var(--gold)]","aria-hidden":!0}),(0,t.jsxs)("span",{className:"text-sm font-medium text-[var(--foreground)] truncate",children:["Schon bek
108annt? ",(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Optional vorab ausfüllen"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0 ml-2",children:[l>0&&(0,t.jsxs)("span",{className:"text-[length:var(--fs-caption)] font-semibold text-[var(--primary)] bg-[var(--primary)]/10 px-2 py-0.5 rounded-full",children:[l,"/3"]}),(0,t.jsx)("span",{className:`text-xs text-[var(--muted-foreground)] transition-transform ${e?"rotate-180":""}`,"aria-hidden":!0,children:"▾"})]})]}),(0,t.jsx)(a.AnimatePresence,{initial:!1,children:e&&(0,t.jsx)(n.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:Z},className:"overflow-hidden",children:(0,t.jsxs)("div",{className:"px-4 pb-4 pt-1 space-y-3 border-t border-[var(--border)]",children:[(0,t.jsx)(ed,{label:"Marke",placeholder:"z.B. Stone Island",value:i.brand,onChange:e=>s({...i,brand:e}),suggestions:ei}),(0,t.jsx)(ed,{label:"Kategorie",placeholder:"z.B. Hoodie",value:i.category,onChange:e=>s({...i,category:e}),suggestions:es}),(0,t.jsx)(ed,{label:"Größe",placeholder:"z.B. L, 42, XL",value:i.size,onChange:e=>s({...i,size:e})}),(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] leading-relaxed",children:"Die KI nutzt deine Eingaben als sicheren Anhaltspunkt, die Foto-Analyse läuft trotzdem für alle anderen Details."})]})})})]})}function ed({label:e,placeholder:r,value:n,onChange:a,suggestions:i}){let s=`hints-${e.toLowerCase()}-list`;return(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-[length:var(--fs-meta)] font-semibold text-[var(--muted-foreground)] mb-1.5",children:e}),(0,t.jsx)("input",{type:"text",list:i?s:void 0,value:n,onChange:e=>a(e.target.value),placeholder:r,className:"w-full h-9 px-3 rounded-lg bg-[var(--fill-2)] border border-[var(--border)] text-sm text-[var(--foreground)] placeholder:text-[var(--muted-foreground)]/60 focus:outline-none focus:border-[var(--primary)]/50 focus:bg-[var(--fill-3)] transition"}),i&&(0,t.jsx)("datalist",{id:s,children:i.map(e=>(0,t.jsx)("option",{value:e},e))})]})}function ec({disabled:e,loading:r,onClick:a}){return(0,t.jsxs)("button",{type:"button",onClick:a,disabled:e,className:`group relative h-14 w-full overflow-hidden rounded-3xl font-semibold text-[length:var(--fs-body)] transition-transform duration-150 ease-out motion-reduce:transition-none ${e?"cursor-not-allowed":"transform-gpu text-[var(--on-brand)] hover:-translate-y-px active:translate-y-0 active:scale-[0.98]"}`,style:e?{background:"linear-gradient(135deg, rgb(var(--brand-rgb)/0.13) 0%, rgb(var(--brand-rgb)/0.04) 100%)",color:"var(--brand)",border:"1px solid var(--brand-bd)",boxShadow:"0 0 26px -10px rgb(var(--brand-rgb)/0.45), inset 0 1px 0 rgba(255,255,255,0.05)"}:{background:"linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #1E3A8A 100%)",boxShadow:"0 8px 24px -4px rgb(var(--brand-rgb)/0.4), inset 0 1px 0 rgba(255,255,255,0.25)"},children:[!e&&(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 bg-white/10 opacity-0 transition-opacity duration-150 group-hover:opacity-100 motion-reduce:transition-none"}),(0,t.jsxs)("span",{className:"relative z-10 inline-flex items-center justify-center gap-2.5",children:[(0,t.jsx)(n.motion.span,{animate:r?{rotate:360}:{},transition:r?{duration:2,repeat:1/0,ease:"linear"}:{},children:(0,t.jsx)(o.Sparkles,{size:17,strokeWidth:2.4})}),r?"Listing wird erstellt …":"Listing erstellen"]})]})}function eu(){let[e,s]=(0,r.useState)(0),l=(0,i.useReducedMotion)();(0,r.useEffect)(()=>{if(l)return;let e=setInterval(()=>{s(e=>(e+1)%M.length)},6500);return()=>clearInterval(e)},[l]);let o=M[e];return(0,t.jsxs)(n.motion.div,{initial:{opacity:0}
108,animate:{opacity:1},exit:{opacity:0,transition:Y},transition:X,className:"relative",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 px-1",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-[var(--primary)]/10 border border-[var(--primary)]/20",children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--primary)] opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[var(--primary)]"})]}),(0,t.jsxs)("span",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--primary)]",children:["Live-Beispiel · ",o.brand]})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:M.map((r,n)=>(0,t.jsx)("button",{onClick:()=>s(n),className:"grid place-items-center h-6 min-w-6 shrink-0 rounded-full","aria-label":`Demo ${n+1}`,"aria-current":n===e,children:(0,t.jsx)("span",{className:`h-1.5 rounded-full transition-all ${n===e?"w-8 bg-[var(--primary)]":"w-1.5 bg-[var(--border)]"}`})},n))})]}),(0,t.jsx)(a.AnimatePresence,{mode:"wait",children:(0,t.jsx)(n.motion.div,{initial:{opacity:0,y:12*!l},animate:{opacity:1,y:0},exit:{opacity:0,y:l?0:-12},transition:{duration:.3,ease:Z},children:(0,t.jsx)(ej,{data:o.data,isDemo:!0})},o.id)})]})}let em=[{Icon:k.Search,text:"Erkenne Brand und Era…"},{Icon:m,text:"Schätze Marktpreis für DACH…"},{Icon:y,text:"Schreibe deine Beschreibung…"},{Icon:j,text:"Finalisiere dein Vinted-Listing…"}];function eh({sourceReady:e,recovering:s,prep:l}){let d,[c,u]=(0,r.useState)(0),m=(0,i.useReducedMotion)();(0,r.useEffect)(()=>{if(m)return;let e=setInterval(()=>{u(e=>(e+1)%em.length)},2400);return()=>clearInterval(e)},[m]);let h=[...l?[{label:`Fotos verkleinern (${Math.min(l.done,l.total)}/${l.total})`,done:l.done>=l.total}]:[],{label:"Marke & Era erkennen",done:e},{label:"DACH-Marktpreis berechnen",done:e},{label:"Titel & Beschreibung schreiben",done:!1}],g=h.findIndex(e=>!e.done);return(0,t.jsxs)(n.motion.div,{initial:{opacity:0}
108,animate:{opacity:1},exit:{opacity:0,transition:Y},transition:X,className:"glass-card rounded-3xl flex flex-col items-center justify-center text-center min-h-[520px] relative overflow-hidden p-10",children:[(0,t.jsx)("div",{className:"kil-cone absolute inset-0 pointer-events-none","aria-hidden":!0}),(0,t.jsx)("div",{className:"relative mb-6",children:(0,t.jsx)(H.Objekt3D,{name:"lade-listing",groesse:136,className:"kl-schweben"})}),(0,t.jsx)("h3",{className:"text-2xl font-semibold mb-6 tracking-tight",children:"Magic in progress"}),(0,t.jsx)("div",{className:"w-full max-w-[260px] space-y-2.5",children:h.map((e,r)=>{let n=r===g;return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-left",children:[(0,t.jsx)("span",{className:`grid h-5 w-5 shrink-0 place-items-center rounded-full transition-colors ${e.done?"bg-[var(--primary)] text-[var(--on-brand)]":n?"border border-[var(--primary)]":"border border-[var(--border)]"}`,children:e.done?(0,t.jsx)(o.Check,{size:12,strokeWidth:3}):n?(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--primary)] animate-pulse"}):null}),(0,t.jsxs)("span",{className:`text-sm ${e.done||n?"text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:[e.label,n?"…":""]})]},e.label)})}),(0,t.jsx)("div",{className:"min-h-6 mt-6 flex items-center justify-center",children:s?(0,t.jsxs)(n.motion.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.3,ease:Z},className:"text-[length:var(--fs-meta)] text-[var(--foreground)] font-medium flex items-center gap-2 text-center max-w-[280px]",children:[(0,t.jsx)(w,{size:15,className:"shrink-0","aria-hidden":!0}),"Verbindung wackelt, wir holen dein Ergebnis. Einen Moment, nicht schließen …"]}):(0,t.jsx)(a.AnimatePresence,{mode:"wait",children:(0,t.jsxs)(n.motion.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.3,ease:Z},className:"text-[length:var(--fs-meta)] text-[var(--muted-foreground)] flex items-center gap-2",children:[(d=em[c].Icon,(0,t.jsx)(d,{size:15,className:"shrink-0 text-[var(--brand)]","aria-hidden":!0})),em[c].text]},c)})})]})}function eg({intel:e,loadingListing:r}){let a=(0,i.useReducedMotion)(),s=e.pricing??{},l="number"==typeof s.sell_low?s.sell_low:null,d="number"==typeof s.sell_target?s.sell_target:null,c="number"==typeof s.buy_max?s.buy_max:null,u="string"==typeof s.tier?s.tier:null,m="string"==typeof s.trend_velocity_2026?s.trend_velocity_2026:null,h="string"==typeof s.sub_line_matched?s.sub_line_matched:null,g=e.attributes?.brand?.detected??"Unbekannte Marke",x=e.attributes?.brand?.confidence??"—",p=e.attributes?.category?.primary??null,f=e.attributes?.era?.detected??null,b=e.attributes?.condition?.detected??null,v=null;return d&&c&&(v=d>=2.5*c?{label:"Top Deal",color:"var(--green)"}:d>=1.8*c?{label:"Solider Flip",color:"var(--cyan)"}:{label:"Marge knapp",color:"var(--gold)"}),(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:12*!a},animate:{opacity:1,y:0},exit:{opacity:0,transition:Y},transition:X,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"glass-card rounded-3xl p-6 relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-4 right-4 flex items-center gap-2",children:(0,t.jsxs)("span",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--muted-foreground)]",children:["⚡ Source-Intel · ",(e.meta?.processing_ms_step1??0)/1e3<10?(e.meta.processing_ms_step1/1e3).toFixed(1):"—","s"]})}),(0,t.jsxs)("div",{className:"flex items-baseline gap-3 mb-2",children:[(0,t.jsx)("h3",{className:"text-2xl font-semibold tracking-tight",children:g}),"HIGH"===x?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[length:var(--fs-caption)] text-[var(--primary)]",title:"Hohe Erkennungs-Sicherheit",children:[(0,t.jsx)(o.Check,{size:11,strokeWidth:3})," sicher erkannt"]}):"MEDIUM"===x?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[length:var(--fs-caption)] text-[var(--gold)]",title:"Mittlere Sicherheit, bitte kurz gegenchecken",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--gold)]"})," wahrscheinlich · kurz prüfen"]}):"LOW"===x?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[length:var(--fs-caption)] text-[var(--gold)]",title:"Unsicher, bitte selbst checke
108n",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--gold)]"})," unsicher · selbst checken"]}):null]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs text-[var(--muted-foreground)] mb-5",children:[h&&(0,t.jsx)("span",{className:"px-2 py-1 rounded-full border border-[var(--primary)] text-[var(--primary)] font-medium",children:h}),p&&(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)]",children:p}),f&&(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)]",children:f}),b&&(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)]",children:b}),u&&(0,t.jsxs)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)]",children:[u,"-Tier"]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:gap-3 mb-4",children:[(0,t.jsxs)("div",{className:"text-center p-3 rounded-2xl border-2 border-[var(--primary)]",children:[(0,t.jsx)("div",{className:"text-[length:var(--fs-meta)] text-[var(--primary)] font-semibold mb-1",children:"⚡ Schnell weg"}),(0,t.jsx)("div",{className:"text-2xl sm:text-3xl font-bold tabular-nums",style:{color:"var(--primary)"},children:null!==l?`€${et(l)}`:"—"})]}),(0,t.jsxs)("div",{className:"text-center p-3 rounded-2xl bg-[var(--muted)]",children:[(0,t.jsx)("div",{className:"text-[length:var(--fs-meta)] text-[var(--muted-foreground)] font-semibold mb-1",children:"Maximum"}),(0,t.jsx)("div",{className:"text-2xl sm:text-3xl font-bold tabular-nums",children:null!==d?`€${et(d)}`:"—"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 p-3 rounded-2xl bg-[var(--muted)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[length:var(--fs-meta)] text-[var(--muted-foreground)] mb-0.5",children:"Max. Einkaufspreis"}),(0,t.jsx)("div",{className:"text-lg font-semibold tabular-nums",children:null!==c?`€${c}`:"—"})]}),v&&(0,t.jsxs)("div",{className:"px-4 py-2 rounded-full text-sm font-semibold flex items-center gap-2",style:{background:`color-mix(in srgb, ${v.color} 13%, transparent)`,color:v.color,border:`1px solid color-mix(in srgb, ${v.color} 33%, transparent)`},children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"size-1.5 rounded-full",style:{background:v.color}}),v.label]}),m&&(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["Trend: ",(0,t.jsx)("span",{className:"font-medium",children:m})]})]})]}),r&&(0,t.jsxs)("div",{className:"glass-card rounded-3xl p-6 relative overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)(n.motion.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},className:"w-5 h-5 rounded-full border-2 border-[var(--primary)] border-t-transparent"}),(0,t.jsx)("h4",{className:"text-sm font-semibold",children:"Vollständiges Listing wird erstellt…"}),(0,t.jsx)("span",{className:"text-xs text-[var(--muted-foreground)] ml-auto",children:"Titel · Beschreibung · Hashtags"})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"h-4 bg-[var(--muted)] rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 bg-[var(--muted)] rounded animate-pulse w-5/6"}),(0,t.jsx)("div",{className:"h-4 bg-[var(--muted)] rounded animate-pulse w-3/4"}),(0,t.jsx)("div",{className:"h-4 bg-[var(--muted)] rounded animate-pulse w-4/5"})]})]})]})}function ex({message:e,code:r,onRetry:a}){return(0,t.jsxs)(n.motion.div,{initial:{opacity:0}
108,animate:{opacity:1},exit:{opacity:0,transition:Y},transition:X,className:"rounded-3xl border border-[var(--destructive)]/30 bg-[var(--destructive)]/5 p-8",title:r??void 0,children:[(0,t.jsx)("h3",{className:"font-semibold text-[var(--destructive)] mb-1 text-lg",children:"Kurz nicht geklappt"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:e}),a?(0,t.jsx)("button",{onClick:a,className:"mt-5 inline-flex items-center gap-2 rounded-xl border border-[var(--border)] px-4 py-2 text-sm font-medium transition hover:border-[var(--primary)]/40 hover:bg-[var(--fill-1)]",children:"Erneut versuchen"}):null]})}let ep={vinted:"Vinted",ebay:"eBay",kleinanzeigen:"Kleinanzeigen"},ef={vinted:8e3,ebay:12e4,kleinanzeigen:75e3},eb=[2,2,0];function ev({small:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-block animate-spin rounded-full border-2 border-current border-t-transparent ${e?"size-3":"size-4"}`})}let ey=["Herren","Damen","Kinder"];function ek({listing:e,title:a,pricing:i,description:s,attributes:l,photoFiles:d,departmentHint:c,savedItemId:u=null,onSaved:m}){let h,g,{locked:x,onLocked:p}=(0,r.useContext)(q),[f,v]=(0,r.useState)(c??(h=[l?.category?.primary,l?.category?.secondary,...l?.style_tags??[]].filter(Boolean).join(" ").toLowerCase(),(g=(...e)=>e.some(e=>h.includes(e)))("kinder","baby","jungen","mädchen","madchen","kids","kleinkind","säugling")?"Kinder":g("kleid","rock","bluse","high heel","pumps","handtasche","leggings","bikini","damen")?"Damen":g("anzug","krawatte","sakko","boxershorts","herren")?"Herren":"Damen")),{version:y}=(0,$.useKleidioPublish)(),k=(0,O.useExtensionLage)(),[j,N]=(0,r.useState)({vinted:"idle",ebay:"idle",kleinanzeigen:"idle"}),[w,S]=(0,r.useState)({vinted:null,ebay:null,kleinanzeigen:null}),z=(0,r.useRef)(null),L=null!==y,M=function(e){if(!e)return!1;let t=e.split(".").map(e=>parseInt(e,10)||0);for(let e=0;e<3;e++){let r=t[e]??0,n=eb[e];if(r>n)break;if(r<n)return!1}return!0}(y),C=(e,t)=>N(r=>({...r,[e]:t})),E=(0,r.useRef)(u);(0,r.useEffect)(()=>{u&&(E.current=u)},[u]);let D=(0,r.useRef)(null);async function P(e){let t=E.current;if(!t)return;let r=i?.sell_target??i?.sell_low??null,n="number"==typeof r&&Number.isFinite(r)?Math.max(0,Math.round(r)-1)+.99:null;try{await fetch(`/api/inventory/${t}/listings`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({platform:e,listed_price_cents:null!==n?Math.round(100*n):null})})}catch{}}async function I(){if(z.current)return z.current;let e=await Promise.all(d.slice(0,8).map(async(e,t)=>({name:e.name||`kleidio-${t+1}.jpg`,dataUrl:await (0,K.downscaleToDataUrl)(e,{maxDimension:1280,maxChars:9e5})})));return z.current=e,e}async function T(t){if(x&&1)return void p();if("sending"!==j[t]){C(t,"sending"),S(e=>({...e,[t]:null}));try{let r=await I(),n=l?.condition?.detected,o=i?.sell_target??i?.sell_low??null,c="number"==typeof o&&Number.isFinite(o)?Math.max(0,Math.round(o)-1)+.99:null,u={title:a,description:s,price:c,category_search:l?.category?.primary||void 0,category_department:f,brand:l?.brand?.detected||void 0,size:l?.size?.detected||void 0,condition:n?_.CONDITION_LABELS_DE[n]:void 0,color:l?.color?.primary||void 0,material:l?.material?.detected||void 0,photos:r},h=`kp-${Date.now()}-${t}`,g=o=>{if(o.source!==window)return;let c=o.data;if(c&&"kleidio-ext"===c.source&&"publish-ack"===c.type&&c.ref===h)if(window.removeEventListener("message",g),clearTimeout(x),c.ok)C(t,"done"),(0,R.track)("marketplace_publish_ok",{platform:t,department:f,photos:r.length}),"vinted"===t&&(0,R.track)("vinted_publish_ok",{department:f,photos:r.length}),(async()=>{E.current||(D.current||(D.current=ez({title:a,description:s,color:l?.color?.primary??null,material:l?.material?.detected??null,brand:l?.brand?.detected??null,category:l?.category?.primary??null,pricing:i??e.pricing,size:l?.size?.detected??null,condition:n?_.CONDITION_LABELS_DE[n]:null,photoFile:d[0]??null,source:"publish"}).then(e=>e.ok&&e.itemId?(E.current=e.itemId,m?.(e.itemId),e.itemId):null)),await D.current),await P(t)})().catch(()=>{});else{C(t,"error");let e="string"==typeof c.fehler&&c.fehler||"string"==typeof c.hinweis&&c.hinweis||"";S(r=>({...r,[t]:e||"Übergabe fehlgeschlagen."})),(0,R.track)("marketplace_publish_fail",{platform:t,...(0,V.publishFehlerAus)(c)})}};window.addEventListener("message",g);let x=setTimeout(()=>{window.removeEventListener("message",g),C(t,"error"),S(e=>({...e,[t]:"Keine Antwort von der Erweiterung. Ist sie installiert und aktiv?"})),(0,R.track)("marketplace_publish_fail",{platform:t,reason:"timeout",ms:ef[t]})},ef[t]);(0,R.track)("marketplace_publish_click",{platform:t,department:f,photos:r.length,ext:L}),"vinted"===t&&(0,R.track)("vinted_publish_click",{department:f,photos:r.length,ext:L}),window.postMessage({source:"kleidio-web",type:"publish",listing:u,land:"de",platform:t,ref:h},window.location.origin)}catch{C(t,"error"),S(e=>({...e,[t]:"Fotos konnten nicht aufbereitet werden."}))}}}return L?(0,t.jsx)(n.motion.div,{initial:{opacity:0,y:8}
108,animate:{opacity:1,y:0},transition:X,className:"rounded-2xl border border-[var(--brand-bd)] bg-[var(--brand-2)] p-4 sm:p-5",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"mt-0.5 grid size-9 shrink-0 place-items-center rounded-xl bg-[var(--brand)] text-[var(--on-brand)]",children:(0,t.jsx)(o.Sparkles,{size:18})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--text)]",children:"Veröffentlichen"}),(0,t.jsxs)("p",{className:"mt-0.5 text-[length:var(--fs-meta)] leading-snug text-[var(--text-2)]",children:["Öffnet dein Verkaufsformular vorbefüllt."," ",(0,t.jsx)("strong",{className:"font-semibold text-[var(--text)]",children:"„Einstellen“ klickst du selbst."})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-meta)] text-[var(--text-3)]",children:"Abteilung"}),(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-[var(--line-1)] bg-[var(--bg-2)] p-0.5",children:ey.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>v(e),"aria-pressed":f===e,className:`rounded-md px-2.5 py-1 text-[length:var(--fs-meta)] font-medium transition-colors ${f===e?"bg-[var(--brand)] text-[var(--on-brand)]":"text-[var(--text-2)] hover:text-[var(--text)]"}`,children:e},e))})]}),L?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>T("vinted"),disabled:"sending"===j.vinted,className:"mt-3 inline-flex w-full items-center justify-center gap-2 rounded-xl bg-[var(--brand)] px-4 py-2.5 text-[length:var(--fs-caption)] font-semibold text-[var(--on-brand)] transition-[filter] hover:brightness-105 disabled:opacity-60",children:"sending"===j.vinted?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev,{})," Übergebe …"]}):"done"===j.vinted?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Check,{size:16,strokeWidth:3})," Vinted geöffnet. Nochmal?"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Sparkles,{size:16})," Auf Vinted veröffentlichen"]})}),M?(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"shrink-0 text-[length:var(--fs-meta)] text-[var(--text-3)]",children:"Auch auf"}),["ebay","kleinanzeigen"].map(e=>{let r=j[e];return(0,t.jsxs)("button",{type:"button",onClick:()=>T(e),disabled:"sending"===r,className:`inline-flex items-center justify-center gap-1.5 rounded-lg border px-3 py-1.5 text-[length:var(--fs-meta)] font-medium transition-colors disabled:opacity-60 ${"done"===r?"border-[var(--green-bd)] text-[var(--green)]":"border-[var(--line-1)] text-[var(--text-2)] hover:border-[var(--brand-bd)] hover:text-[var(--text)]"}`,children:["sending"===r?(0,t.jsx)(ev,{small:!0}):"done"===r?(0,t.jsx)(o.Check,{size:13,strokeWidth:3}):null,ep[e]]},e)})]}):null]}):(0,t.jsxs)("div",{className:"mt-3 rounded-xl border border-[var(--line-1)] bg-[var(--bg-2)] p-3",children:[(0,t.jsxs)("p",{className:"text-[length:var(--fs-meta)] leading-snug text-[var(--text-2)]",children:["Mit der kostenlosen"," ",(0,t.jsx)("strong",{className:"text-[var(--text)]",children:"Kleidio-Publish"}),"-Erweiterung landet dieses Listing mit einem Klick vorbefüllt in deinem Verkaufsformular, Titel, Beschreibung, Preis, Kategorie und Fotos inklusive. Du prüfst und stellst selbst ein."]}),(0,t.jsx)("div",{className:"mt-3 flex flex-col [&>span]:w-full",children:(0,t.jsxs)(O.ExtensionInstallieren,{von:"tool",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl bg-[var(--brand)] px-4 py-2.5 text-[length:var(--fs-caption)] font-semibold text-[var(--on-brand)] transition-[filter] hover:brightness-105",children:[(0,t.jsx)(o.Sparkles,{size:16})," Kostenlos für Chrome installieren"]})}),(0,t.jsx)("p",{className:`mt-2 text-[length:var(--fs-meta)] text-[var(--text-3)] ${"ok"===k?"":"hidden"}`,children:"Nach der Installation einfach hierher zurückwechseln, der Rest geht automatisch."}),(0,t.jsxs)("p",{className:"mt-2 text-[length:var(--fs-meta)] text-[var(--text-3)]",children:["Ohne Extension: Beschreibung oben kopieren und im"," ",(0,t.jsx)("a",{href:"https://www.vinted.de/items/new",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-[var(--text)]",children:"Vinted-Verkaufsformular"})," ","einfügen."]})]}),["vinted","ebay","kleinanzeigen"].map(e=>w[e]?(0,t.jsxs)("p",{className:"mt-2 text-[length:var(--fs-meta)] text-[var(--gold)]",children:[ep[e],": ",w[e]]},e):null),Object.values(j).includes("done")?(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-xl border border-[var(--green-bd)] bg-[var(--bg-2)] p-3 text-[length:var(--fs-meta)] text-[var(--text)]",children:[(0,t.jsx)(o.Check,{size:16,className:"mt-0.5 shrink-0 text-[var(--green)]"}),(0,t.jsxs)("span",{children:["Formular im neuen Tab geöffnet. Titel, Beschreibung, Preis, Kategorie und Fotos sind vorbefüllt."," ",(0,t.jsx)("strong",{children:"Versand/Paketgröße (und ggf. Größe) trägst du dort noch ein, dann prüfen und selbst einstellen."})]})]}):null,(0,t.jsxs)("p",{className:"mt-2 flex items-center gap-1.5 text-[length:var(--fs-meta)] text-[var(--text-3)]",children:[(0,t.jsx)(b.Lock,{size:12,className:"shrink-0","aria-hidden":!0})," Kein Auto-Upload · Marktplatz-Daten werden nicht ausgelesen."]})]})]})}):(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[length:var(--fs-meta)] text-[var(--text-3)]",children:[(0,t.jsx)(o.Sparkles,{size:13,className:"text-[var(--primary)]","aria-hidden":!0}),(0,t.jsx)("span",{children:"Mit der Chrome-Erweiterung landet das Listing mit einem Klick vorbefüllt im Vinted-Formular."}),(0,t.jsx)("span",{children:(0,t.jsx)(O.ExtensionInstallieren,{form:"link",von:"tool",className:"font-semibold text-[var(--primary)] underline underline-offset-2",children:"Kostenlos installieren"})}
108),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("a",{href:"https://www.vinted.de/items/new",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-[var(--text)]",children:"Vinted-Formular öffnen"})]})}function ej({data:e,isDemo:a=!1,unknownBrand:i=null,enginePricing:l=null,einschaetzung:o=null,photoFile:d=null,photoFiles:c=[],departmentHint:u=null,studioNudge:m=null,anonSave:h=null,showInventarNudge:g=!1,initialItemId:x=null,copied:p=!1,onStudioClick:f}){let b,{listing:y}=e,[k,j]=(0,r.useState)(!!x),[N,w]=(0,r.useState)(!1),[_,L]=(0,r.useState)(x),M=e=>{j(!0),e&&L(e)},C=e=>e.includes("#")?e:`${e}
109
110${y.hashtags.map(e=>e.startsWith("#")?e:`#${e}`).join(" ")}`,E=e.attributes?.category?.primary??null,[D,P]=(0,r.useState)({});(0,r.useEffect)(()=>{if(a)return;let e=!0;return fetch("/api/account/listing-prefs").then(e=>e.ok?e.json():null).then(t=>{e&&t?.prefs&&P(t.prefs)}).catch(()=>{}),()=>{e=!1}},[a]);let I=(0,S.massFamilie)(E),[T,F]=(0,r.useState)(null);(0,r.useEffect)(()=>{F(null)},[y.title]);let A=T??(0,z.masseStandard)(D,I),B=e=>(0,S.filterMasse)((0,z.applyTextbausteine)((0,S.polishDescription)((0,S.stripMetaLines)(e),E),D),A),K=(0,S.listMasse)((0,S.polishDescription)((0,S.stripMetaLines)(y.descriptions?.lang??y.description),E)),$=K.map(e=>({name:e,on:null===A||A.includes(e)})),[O,V]=(0,r.useState)(!1),U=async()=>{let e=null===A?K:A;V(!0);try{let t={...D,masse:{...D.masse??{},[I??"sonst"]:e}},r=await fetch("/api/account/listing-prefs",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(401===r.status)return void s.toast.error("Zum Merken bitte einloggen.");if(!r.ok)return void s.toast.error("Konnte die Auswahl nicht speichern.");P(t),F(null),s.toast.success(`Gemerkt: ab jetzt bei ${"hose"===I?"Hosen":"oberteil"===I?"Oberteilen":"dieser Kategorie"} nur ${e.length?e.join(", "):"keine Maße"}.`)}catch{s.toast.error("Netzwerk-Fehler.")}finally{V(!1)}},W=y.descriptions?{kurz:B(y.descriptions.kurz),mittel:B(y.descriptions.mittel),lang:C(B(y.descriptions.lang))}:{kurz:b=C(B(y.description)),mittel:b,lang:b},H=W.kurz!==W.lang,[G,J]=(0,r.useState)("mittel"),[q,Z]=(0,r.useState)(y.title);(0,r.useEffect)(()=>{Z(y.title)},[y.title]);let X=W[G],[Y,Q]=(0,r.useState)(X),ee=(0,r.useRef)({});(0,r.useEffect)(()=>{ee.current={}},[y.title]),(0,r.useEffect)(()=>{Q((0,S.masseEinsetzen)(X,ee.current))},[X]);let et=(0,S.leereMasseWeg)(Y),[er,en]=(0,r.useState)(!1),[ea,ei]=(0,r.useState)(""),[es,el]=(0,r.useState)(!1),[eo,ed]=(0,r.useState)(!1),ec=parseFloat(ea.replace(",",".").trim()),eu=Number.isFinite(ec)&&ec>=0&&""!==ea.trim(),em=async()=>{if(_&&eu&&!es){el(!0);try{(await fetch(`/api/inventory/${_}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ek_cents:Math.round(100*ec)})})).ok?ed(!0):s.toast.error("EK konnte nicht gespeichert werden.")}catch{s.toast.error("EK konnte nicht gespeichert werden.")}finally{el(!1)}}},eh=(0,r.useRef)(!1);(0,r.useEffect)(()=>{!p||k||a||eh.current||N||(eh.current=!0,(async()=>{w(!0);try{let{ok:t,itemId:r}=await ez({title:q,description:et,color:e.attributes?.color?.primary??null,material:e.attributes?.material?.detected??null,brand:e.attributes?.brand?.detected??null,category:e.attributes?.category?.primary??null,pricing:l??y.pricing,photoFile:d,source:"ki-listing"});t&&(M(r),en(!0),(0,R.track)("result_kept",{kind:"listing",how:"autosave"}))}catch{}finally{w(!1)}})())},[p,k,N,a]);let eg=[...y.warnings??[],...y.uncertainty_notes??[]];return(0,t.jsxs)(n.motion.div,{initial:{opacity:0}
110,animate:{opacity:1},exit:{opacity:0},className:"space-y-5",children:[eg.length>0&&(0,t.jsx)(n.motion.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:"rounded-2xl border border-[var(--gold-bd)] bg-[var(--gold-2)] p-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-[var(--gold-2)] flex items-center justify-center mt-0.5",children:(0,t.jsx)("span",{className:"text-[var(--gold)] text-base",children:"ℹ️"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--gold)] mb-1",children:"Nur für dich · NICHT in Vinted kopieren"}),(0,t.jsx)("ul",{className:"text-sm text-[var(--foreground)] space-y-1 leading-relaxed",children:eg.map((e,r)=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)("span",{className:"text-[var(--gold)]/70",children:"•"}),(0,t.jsx)("span",{children:e})]},r))})]})]})}),(0,t.jsx)(eC,{title:q,onTitle:Z,disableCopy:a}),h,(0,t.jsx)(eP,{description:Y,copyValue:et,onDescription:Q,variants:H?W:null,descLen:G,onLen:J,disableCopy:a,masse:$,onMasse:(e,t)=>{let r=null===A?K:A;F(t?[...new Set([...r,e])]:r.filter(t=>t!==e))},onMasseStandard:a?void 0:U,masseBusy:O,luecken:a?null:(0,t.jsx)(eI,{offen:(0,S.offeneMasse)(Y),onEintragen:e=>{ee.current={...ee.current,...e},Q(t=>(0,S.masseEinsetzen)(t,e))},onOhne:()=>{(0,R.track)("masse_weggelassen",{anzahl:(0,S.offeneMasse)(Y).length}),Q((0,S.leereMasseWeg)(Y))}})}),(0,t.jsx)(eD,{pricing:y.pricing,enginePricing:l,unknownBrand:i,einschaetzung:o}),a?null:(0,t.jsx)(ek,{listing:y,title:q,pricing:l??y.pricing,description:et,attributes:e.attributes,photoFiles:c,departmentHint:u,savedItemId:_,onSaved:M},y.title),m,er?(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-x-2.5 gap-y-2 text-[12.5px] text-[var(--text-2)]",children:[(0,t.jsx)("span",{className:"grid size-5 place-items-center rounded-md bg-[var(--green-2)]",children:(0,t.jsx)(v.Package,{size:12,"aria-hidden":!0})}),(0,t.jsx)("span",{children:"Im Inventar gespeichert."}),eo?(0,t.jsx)("span",{className:"font-medium text-[var(--green)]",children:"EK gespeichert ✓"}):_?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("label",{htmlFor:"ek-quick",className:"text-[var(--muted-foreground)]",children:"Einkaufspreis"}),(0,t.jsx)("input",{id:"ek-quick",inputMode:"decimal",value:ea,onChange:e=>ei(e.target.value),onKeyDown:e=>{"Enter"===e.key&&em()},placeholder:"z. B. 12,50",className:"w-24 rounded-lg border border-[var(--border)] bg-[var(--fill-1)] px-2.5 py-1.5 text-[12.5px] text-[var(--foreground)] outline-none focus:border-[var(--primary)] transition-colors"}),(0,t.jsx)("button",{type:"button",onClick:()=>void em(),disabled:!eu||es,className:"rounded-lg bg-[var(--brand-2)] px-2.5 py-1.5 font-semibold text-[var(--primary)] transition-opacity disabled:opacity-40",children:es?"…":"OK"})]}):null,(0,t.jsx)("a",{href:"/account/inventar",className:"underline underline-offset-2 transition-colors hover:text-[var(--text)]",children:"ansehen"})]}):null,!g||a||k?null:(0,t.jsx)(eL,{title:q,description:et,color:e.attributes?.color?.primary??null,material:e.attributes?.material?.detected??null,brand:e.attributes?.brand?.detected??null,category:e.attributes?.category?.primary??null,pricing:l??y.pricing,photoFile:d,onSaved:M,busy:N,onBusy:w}),a?null:(0,t.jsx)(eN,{onStudioClick:f}),!a&&(y.cross_platform?.ebay_title||y.cross_platform?.kleinanzeigen_title)?(0,t.jsx)(ew,{cp:y.cross_platform}):null,!a&&(0,t.jsx)(eS,{title:q,description:et,hashtags:y.hashtags??[]}),!a&&!er&&(0,t.jsx)(eM,{title:q,description:et,color:e.attributes?.color?.primary??null,material:e.attributes?.material?.detected??null,brand:e.attributes?.brand?.detected??null,category:e.attributes?.category?.primary??null,pricing:l??y.pricing,photoFile:d,alreadySaved:k,savedItemId:_,onSaved:M,busy:N,onBusy:w})]})}function eN({onStudioClick:e}){return(0,t.jsxs)("div",{className:"glass-card rounded-3xl p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)(g.Eye,{size:16,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--primary)]",children:"Damit dein Piece gesehen wird"})]}),(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] leading-relaxed text-[var(--muted-foreground)] mb-3",children:["Ein gutes Listing ist die halbe Miete, den Rest macht Vinted selbst. Der Algorithmus zeigt ",(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:"neue & erneuerte"})," Listings zuerst. Ein perfekter Titel bringt nichts, wenn das Piece unten in der Suche liegt."]}),(0,t.jsxs)("ul",{className:"space-y-2 text-[length:var(--fs-caption)] text-[var(--foreground)]",children:[(0,t.jsxs)("li",{className:"flex gap-2.5",children:[(0,t.jsx)("span",{className:"text-[var(--primary)] font-bold",children:"1."}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Alle 2–3 Tage neu einstellen"}),' (löschen & neu hochladen, nicht nur „hochholen"). Das ist der stärkste Hebel für Aufrufe.']})]}),(0,t.jsxs)("li",{className:"flex gap-2.5",children:[(0,t.jsx)("span",{className:"text-[var(--primary)] font-bold",children:"2."}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Cover-Foto entscheidet den Klick."})," Ein sauberes, helles erstes Bild schlägt jeden Titel. → ",(0,t.jsx)("a",{href:"/studio",onClick:e?t=>{t.metaKey||t.ctrlKey||t.shiftKey||0!==t.button||(t.preventDefault(),e())}:void 0,className:"text-[var(--primary)] underline underline-offset-2",children:"Foto-Studio"})]})]}),(0,t.jsxs)("li",{className:"flex gap-2.5",children:[(0,t.jsx)("span",{className:"text-[var(--primary)] font-bold",children:"3."}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Preis anfangs nicht zu hoch."}),' Die ersten Stunden zählen: bekommt ein Piece kein Interesse, begräbt Vinted es. Lieber mit „⚡ Schnell weg" starten und später erhöhen.']})]})]}),(0,t.jsx)("a",{href:"/ratgeber/vinted-keine-aufrufe",className:"mt-4 inline-flex items-center gap-1 text-[12.5px] font-medium text-[var(--primary)] hover:underline",children:"Warum bekomme ich keine Aufrufe? → Der komplette Guide"})]})}function ew({cp:e}){let n=(0,r.useContext)(q),[a,i]=(0,r.useState)(null),s=[e.ebay_title?{key:"ebay",label:"eBay",title:e.ebay_title}:null,e.kleinanzeigen_title?{key:"ka",label:"Kleinanzeigen",title:e.kleinanzeigen_title}
110:null].filter(Boolean);return(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--stroke)] bg-[var(--bg-2)] p-5",children:[(0,t.jsx)("h3",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--text)]",children:"Auch auf eBay & Kleinanzeigen einstellen"}),(0,t.jsx)("p",{className:"mt-1 text-[length:var(--fs-caption)] text-[var(--text-3)]",children:"Andere Plattform, andere Suchbegriffe: diese Titel sind dafür optimiert. Beschreibung kannst du von oben übernehmen."}),(0,t.jsx)("div",{className:"mt-3 space-y-2",children:s.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-[var(--stroke)] bg-[var(--fill-1)] px-3.5 py-2.5",children:[(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block text-[length:var(--fs-meta)] text-[var(--text-3)]",children:e.label}),(0,t.jsx)("span",{className:"block truncate text-[13.5px] text-[var(--text)]",children:e.title})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{var t,r;return t=e.key,r=e.title,void navigator.clipboard?.writeText(r).then(()=>{n.locked||(0,R.track)("result_kept",{kind:"listing",how:"copy"}),n.onCopied?.(),i(t),setTimeout(()=>i(null),1500)}).catch(()=>{})},className:"shrink-0 rounded-full border border-[var(--stroke)] px-3 py-1.5 text-[length:var(--fs-meta)] text-[var(--text-2)] transition-colors hover:border-[var(--brand-bd)] hover:text-[var(--text)]",children:a===e.key?"✓ Kopiert":"Kopieren"})]},e.key))})]})}let e_=[{lang:"fr",flag:"🇫🇷",label:"Frankreich"},{lang:"it",flag:"🇮🇹",label:"Italien"},{lang:"es",flag:"🇪🇸",label:"Spanien"},{lang:"nl",flag:"🇳🇱",label:"Niederlande"},{lang:"pl",flag:"🇵🇱",label:"Polen"},{lang:"en",flag:"🇬🇧",label:"International"}];function eS({title:e,description:n,hashtags:a}){let i=(0,r.useContext)(q),[s,l]=(0,r.useState)({}),[o,d]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),g=async t=>{if(!o&&!s[t]){d(t);try{let r=await fetch("/api/tools/listing-translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,description:n,hashtags:a,lang:t})}),i=await r.json();if(403===r.status&&"pro_required"===i.error||401===r.status)return void u(!0);i.ok&&i.title&&i.description&&l(e=>({...e,[t]:{title:i.title,description:i.description,hashtags:i.hashtags??[]}}))}catch{}finally{d(null)}}},p=(e,t)=>{navigator.clipboard?.writeText(t).then(()=>{i.locked||(0,R.track)("result_kept",{kind:"listing",how:"copy"}),i.onCopied?.(),h(e),setTimeout(()=>h(null),1500)}).catch(()=>{})};return(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--stroke)] bg-[var(--bg-2)] p-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("h3",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--text)]",children:[(0,t.jsx)(x,{size:16,className:"mr-1.5 inline-block -translate-y-px text-[var(--brand)]","aria-hidden":!0}),"In anderen Märkten verkaufen"]}),(0,t.jsx)("span",{className:"rounded-full border border-[var(--brand-bd)] bg-[var(--brand-2)] px-2 py-0.5 text-[length:var(--fs-meta)] font-semibold uppercase tracking-wider text-[var(--brand)]",children:"Pro"})]}),(0,t.jsx)("p",{className:"mt-1 text-[length:var(--fs-caption)] text-[var(--text-3)]",children:"Vinted läuft auch in FR, IT, ES & Co.: fremdsprachige Listings erreichen Käufer, die dort oft mehr zahlen. Ein Klick übersetzt marktgerecht (Marke & Größen bleiben exakt)."}),(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:e_.map(e=>{let r=!!s[e.lang];return(0,t.jsxs)("button",{type:"button",disabled:null!==o,onClick:()=>g(e.lang),className:`inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[length:var(--fs-caption)] transition-colors disabled:opacity-50 ${r?"border-[var(--brand-bd)] bg-[var(--brand-2)] text-[var(--text)]":"border-[var(--stroke)] text-[var(--text-2)] hover:border-[var(--brand-bd)] hover:text-[var(--text)]"}`,children:[(0,t.jsx)("span",{"aria-hidden":!0,children:e.flag}),e.label,o===e.lang?(0,t.jsx)("span",{className:"size-3 animate-spin rounded-full border-2 border-[var(--stroke)] border-t-[var(--brand)]"}):r?"✓":null]},e.lang)})}),c?(0,t.jsxs)("div",{className:"mt-4 rounded-xl border border-[var(--brand-bd)] bg-[var(--brand-2)] px-4 py-3 text-[13.5px] text-[var(--text-2)]",children:[(0,t.jsx)("strong",{className:"text-[var(--text)]",children:"Pro-Feature."})," Übersetze jedes Listing in 6 Vinted-Märkte."," ",(0,t.jsx)("a",{href:"/pricing",className:"font-semibold text-[var(--brand)] hover:underline",children:"7 Tage gratis testen →"})]}):null,e_.filter(e=>s[e.lang]).map(e=>{let r=s[e.lang];return(0,t.jsxs)("div",{className:"mt-4 rounded-xl border border-[var(--stroke)] bg-[var(--fill-1)] p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("span",{className:"text-[length:var(--fs-caption)] font-semibold text-[var(--text)]",children:[e.flag," ",e.label]}),(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>p(`${e.lang}-t`,r.title),className:"rounded-full border border-[var(--stroke)] px-2.5 py-1 text-[11.5px] text-[var(--text-2)] transition-colors hover:border-[var(--brand-bd)] hover:text-[var(--text)]",children:m===`${e.lang}-t`?"✓ Kopiert":"Titel kopieren"}),(0,t.jsx)("button",{type:"button",onClick:()=>p(`${e.lang}-d`,`${r.description}${r.hashtags.length?`
111
112${r.hashtags.join(" ")}`:""}`),className:"rounded-full border border-[var(--stroke)] px-2.5 py-1 text-[11.5px] text-[var(--text-2)] transition-colors hover:border-[var(--brand-bd)] hover:text-[var(--text)]",children:m===`${e.lang}-d`?"✓ Kopiert":"Beschreibung kopieren"})]})]}),(0,t.jsx)("p",{className:"mt-2 text-[13.5px] font-medium text-[var(--text)]",children:r.title}),(0,t.jsx)("p",{className:"mt-1.5 whitespace-pre-wrap text-[12.5px] leading-relaxed text-[var(--text-2)]",children:r.description}),r.hashtags.length?(0,t.jsx)("p",{className:"mt-1.5 text-[length:var(--fs-meta)] text-[var(--text-3)]",children:r.hashtags.join(" ")}):null]},e.lang)})]})}async function ez(e){let t=null;if(e.photoFile)try{let r=(0,C.createClient)(),{data:{user:n}}=await r.auth.getUser();if(n){let a=await ee(e.photoFile),i=`${n.id}/${crypto.randomUUID()}.jpg`,{error:s}=await r.storage.from("inventory").upload(i,a,{contentType:"image/jpeg",upsert:!1});s||(t=i)}}catch{}let r=e.pricing,n=await fetch("/api/inventory",{method:"POST",..."u">typeof AbortSignal&&"timeout"in AbortSignal?{signal:AbortSignal.timeout(45e3)}:{},headers:{"content-type":"application/json"}
112,body:JSON.stringify({title:e.title,description:e.description??void 0,color:e.color??void 0,material:e.material??void 0,brand:e.brand,category:e.category,ek_cents:"number"==typeof e.ekCents?e.ekCents:void 0,purchase_date:e.purchaseDate,size:e.size??void 0,condition:e.condition??void 0,price_low:"number"==typeof r?.sell_low?r.sell_low:null,price_target:"number"==typeof r?.sell_target?r.sell_target:null,price_high:"number"==typeof r?.sell_high?r.sell_high:null,image_path:t,source:e.source})}),a=null;try{let e=await n.json();a="string"==typeof e?.item?.id?e.item.id:null}catch{}return{ok:n.ok,status:n.status,itemId:a}}function eL({title:e,description:n,color:a,material:i,brand:l,category:o,pricing:d,photoFile:c,onSaved:u,busy:m,onBusy:h}){let[g,x]=(0,r.useState)(!1),p=(0,r.useContext)(q);async function f(){if(!g&&!m){(0,R.track)("cross_feature_click",{from:"listing_postcopy",to:"inventar",position:"inline",n:(0,W.aktuelleNudgeNummer)((0,W.nudgeKey)({from:"listing_postcopy",to:"inventar"}))}),x(!0),h(!0);try{let{ok:t,status:r,itemId:m}=await ez({title:e,description:n,color:a,material:i,brand:l,category:o,pricing:d,photoFile:c,source:"ki-listing"});t?(u(m),(0,R.track)("result_kept",{kind:"listing",how:"save",via:"nudge"}),s.toast.success("Im Inventar gespeichert",{action:{label:"Ansehen",onClick:()=>{window.location.href="/account/inventar"}}})):401===r?p.onLocked():s.toast.error("Speichern fehlgeschlagen, bitte erneut versuchen.")}catch{s.toast.error("Netzwerk-Fehler beim Speichern.")}finally{x(!1),h(!1)}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.TrackShown,{event:"cross_feature_shown",props:{from:"listing_postcopy",to:"inventar",position:"inline"}}),(0,t.jsxs)("button",{type:"button",onClick:()=>{f()},disabled:g||m,className:"mt-4 flex w-full items-start gap-3 rounded-xl border border-[var(--brand-bd)] bg-[var(--brand-2)] p-4 text-left transition-[filter] hover:brightness-110 disabled:opacity-70",children:[(0,t.jsx)("span",{className:"mt-0.5 grid size-9 shrink-0 place-items-center rounded-lg bg-[var(--brand)] text-[var(--on-brand)]",children:(0,t.jsx)(v.Package,{size:17,"aria-hidden":!0})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-[length:var(--fs-ui)] font-semibold text-[var(--text)]",children:g?"Wird übernommen…":"Listing kopiert ✓ Piece ins Inventar?"}),(0,t.jsx)("span",{className:"mt-0.5 block text-[12.5px] leading-snug text-[var(--text-2)]",children:"Ein Klick. Kleidio behält Liegezeit, Marge und den Preis-Check im Blick, sobald es auf Vinted steht. Einkaufspreis kannst du später nachtragen."})]})]})]})}function eM({title:e,description:n,color:a,material:i,brand:l,category:o,pricing:d,photoFile:c=null,alreadySaved:u=!1,savedItemId:m=null,onSaved:h,busy:g=!1,onBusy:x}){let p,f,b=(0,r.useContext)(q),[y,k]=(0,r.useState)(""),[j,N]=(0,r.useState)((p=new Date,f=e=>String(e).padStart(2,"0"),`${p.getFullYear()}-${f(p.getMonth()+1)}-${f(p.getDate())}`)),[w,_]=(0,r.useState)(!1),[S,z]=(0,r.useState)(!1),[L,M]=(0,r.useState)(!1),C=S||u,E=parseFloat(y.replace(",",".").trim()),D=Number.isFinite(E)&&E>=0,P=(0,r.useRef)(!1);(0,r.useEffect)(()=>{!u||S||P.current||m&&y.trim()&&D&&(P.current=!0,fetch(`/api/inventory/${m}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ek_cents:Math.round(100*E)})}).catch(()=>{}))},[u,S,m,y,D,E]);let I="number"==typeof d?.sell_target?d.sell_target:0,T=D&&I?Math.round(I-E):null,F=D&&E>0&&I?Math.round((I-E)/E*100):null,A=null;async function B(){if(!w&&!g){if(b.locked)return void b.onLocked();if(y.trim()&&!D)return void s.toast.error("Der Einkaufspreis sieht ungültig aus.");_(!0),x?.(!0);try{let{ok:t,status:r,itemId:u}=await ez({title:e,description:n,color:a,material:i,brand:l,category:o,pricing:d,ekCents:y.trim()&&D?Math.round(100*E):void 0,purchaseDate:j,photoFile:c,source:"ki-listing"});t?(z(!0),h?.(u),(0,R.track)("result_kept",{kind:"listing",how:"save"}),s.toast.success("Im Inventar gespeichert",{action:{label:"Ansehen",onClick:()=>{window.location.href="/account/inventar"}}})):401===r?b.onLocked():s.toast.error("Speichern fehlgeschlagen, bitte erneut versuchen.")}catch{s.toast.error("Netzwerk-Fehler beim Speichern.")}finally{_(!1),x?.(!1)}}}return null!==F&&(A=F>=150?{label:"Top-Flip",color:"var(--green)"}:F>=70?{label:"Solider Flip",color:"var(--green)"}:F>=25?{label:"Dünne Marge",color:"var(--gold)"}:{label:"Lohnt kaum",color:"var(--destructive)"}),(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--fill-1)] p-5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)(v.Package,{size:16,className:"shrink-0","aria-hidden":!0}),(0,t.jsx)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--muted-foreground)]",children:"Ins Inventar aufnehmen"})]}),C?(0,t.jsxs)("p",{className:"text-[13.5px] text-[var(--foreground)]",children:["✓ Gespeichert."," ",(0,t.jsx)("a",{href:"/account/inventar",className:"text-[var(--primary)] underline underline-offset-2 hover:opacity-80",children:"Inventar ansehen →"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:B,disabled:w||g,style:{background:"var(--primary)",color:"var(--on-brand)"},className:"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-[length:var(--fs-ui)] font-semibold transition-transform hover:scale-[1.01] disabled:opacity-70",children:w?"Speichern…":b.locked?"Konto zum Speichern":"Ins Inventar übernehmen"}),L?null:(0,t.jsx)("button",{type:"button",onClick:()=>M(!0),className:"mt-2.5 w-full text-center text-[length:var(--fs-caption)] text-[var(--muted-foreground)] underline underline-offset-2 transition-colors hover:text-[var(--foreground)]",children:"Einkaufspreis gleich mit erfassen"}),L?(0,t.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-3",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsxs)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] mb-1 block",children:["Einkaufspreis (€) ",(0,t.jsx)("span",{className:"opacity-60",children:"· optional"})]}),(0,t.jsx)("input",{inputMode:"decimal",value:y,onChange:e=>k(e.target.value),placeholder:"z. B. 12,50",className:"w-full rounded-xl border border-[var(--border)] bg-[var(--fill-1)] px-3 py-2.5 text-sm text-[var(--foreground)] outline-none focus:border-[var(--primary)] transition-colors"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] mb-1 block",children:"Kaufdatum"}),(0,t.jsx)("input",{type:"date",value:j,onChange:e=>N(e.target.value),className:"w-full rounded-xl border border-[var(--border)] bg-[var(--fill-1)] px-3 py-2.5 text-sm text-[var(--foreground)] outline-none focus:border-[var(--primary)] transition-colors"})]})]}):null,L&&null!==T&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1 text-[length:var(--fs-caption)]",children:[(0,t.jsxs)("span",{className:"text-[var(--muted-foreground)]",children:["bei Ziel-VK €",I,":"]}),(0,t.jsxs)("span",{className:"font-semibold text-[var(--foreground)] tabular-nums",children:["Marge ",T>=0?"+":"",T," €"]}),null!==F&&(0,t.jsxs)("span",{className:"text-[var(--muted-foreground)] tabular-nums",children:["· ROI ",F,"%"]}),A&&(0,t.jsxs)("span",{className:"font-semibold",style:{color:A.color},children:["· ",A.label]})]}),L?(0,t.jsx)("p",{className:"mt-3 text-center text-[length:var(--fs-caption)] leading-relaxed text-[var(--muted-foreground)]",children:"Preis noch unklar? Einfach leer lassen, du k
112annst ihn im Inventar mit einem Klick nachtragen."}):null,c&&(0,t.jsx)("p",{className:"mt-2 text-center text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:"📷 Ein Vorschaubild wird in deinem Inventar gespeichert (nur für dich)."})]})]})}function eC({title:e,onTitle:r,disableCopy:a}){let s=(0,i.useReducedMotion)(),l=r??(()=>{});return(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:12*!s},animate:{opacity:1,y:0},transition:{duration:.24,ease:Z},className:"glass-card rounded-3xl p-7 relative overflow-hidden min-h-[200px] flex flex-col justify-between",children:[(0,t.jsx)("div",{className:"absolute -top-20 -right-20 w-48 h-48 rounded-full pointer-events-none",style:{background:"radial-gradient(circle, rgb(var(--brand-rgb)/0.18), transparent 70%)",filter:"blur(20px)"}}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4 relative",children:[(0,t.jsx)(o.Sparkles,{size:11,className:"text-[var(--primary)]"}),(0,t.jsxs)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--primary)]",children:["Titel · ",(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] font-semibold tracking-normal normal-case",children:"tippen zum Bearbeiten"})]})]}),(0,t.jsx)("textarea",{value:e,onChange:e=>l(e.target.value.slice(0,100)),rows:2,"aria-label":"Titel bearbeiten",className:"w-full resize-none bg-transparent font-bold leading-[1.1] tracking-tight text-[var(--foreground)] break-words outline-none focus:bg-[var(--fill-1)] rounded-lg -mx-1 px-1",style:{fontSize:"clamp(22px, 2.6vw, 32px)"}}),/\[eintrag/i.test(e)&&r?(0,t.jsx)(eE,{onSetzen:t=>l(e.replace(/\[eintrag[a-zäöü]*\]?/i,t).slice(0,100))}):null]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-5 border-t border-[var(--border)]",children:[(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)] font-medium tabular-nums",children:[e.length," ",(0,t.jsx)("span",{className:"opacity-50",children:"/ 100 Zeichen"})]}),(0,t.jsx)(eT,{value:e,label:"Titel",disabled:a,onCopiedOk:()=>(0,R.track)("listing_title_copied",{len:e.length})})]})]})}function eE({onSetzen:e}){let[n,a]=(0,r.useState)("");return(0,t.jsxs)("form",{className:"relative mt-3 flex flex-wrap items-center gap-2 rounded-xl border border-[var(--gold-bd)] bg-[var(--gold-2)] px-3 py-2",onSubmit:t=>{t.preventDefault(),n.trim()&&e(n.trim().slice(0,20))},children:[(0,t.jsx)("span",{className:"text-[13px] leading-snug text-[var(--gold)]",children:"Größe fehlt im Titel. Welche steht auf dem Etikett?"}),(0,t.jsx)("input",{value:n,onChange:e=>a(e.target.value),placeholder:"z. B. M oder W32","aria-label":"Größe",maxLength:20,className:"min-h-10 w-28 rounded-lg border border-[var(--border)] bg-[var(--bg-2)] px-2 text-base text-[var(--foreground)] outline-none focus:border-[var(--primary)] sm:text-sm"}),(0,t.jsx)("button",{type:"submit",disabled:!n.trim(),className:"min-h-10 rounded-lg bg-[var(--primary)] px-3 text-[13px] font-semibold text-[var(--on-brand)] disabled:opacity-50",children:"Eintragen"})]})}function eD({pricing:e,enginePricing:r=null,unknownBrand:a=null,einschaetzung:s=null}){let l=(0,i.useReducedMotion)(),d=s?.basis.index??null,c=s?.basis.persoenlich??null,m=c?c.faktor<=.97?`${Math.round((1-c.faktor)*100)} % unter Markt`:c.faktor>=1.03?`${Math.round((c.faktor-1)*100)} % \xfcber Markt`:"auf Marktniveau":null,h=r??e;return(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:12*!l},animate:{opacity:1,y:0},transition:{delay:.05,duration:.24,ease:Z},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)(o.Sparkles,{size:11,className:"text-[var(--primary)]"}),(0,t.jsx)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--primary)]",children:"Verkaufspreis"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"rounded-2xl p-5 border",style:{background:"linear-gradient(160deg, rgb(var(--brand-rgb)/0.10), var(--fill-1))",borderColor:"rgb(var(--brand-rgb)/0.24)"},children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] font-semibold text-[var(--primary)] mb-2.5 flex items-center gap-1.5",children:"⚡ Schnell weg"}),(0,t.jsxs)("p",{className:"font-black tabular-nums leading-none text-[var(--foreground)] flex items-baseline",style:{fontFamily:"var(--display)",fontSize:"clamp(24px, 3.2vw, 38px)",letterSpacing:"-0.03em"},children:[(0,t.jsx)("span",{style:{color:"var(--primary)",fontSize:"0.55em"},children:"€"}),et(h.sell_low)]}),(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] mt-2.5",children:"verkauft schnell"})]}),(0,t.jsxs)("div",{className:"rounded-2xl p-5 border border-[var(--border)]",style:{background:"var(--fill-1)"},children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] font-semibold text-[var(--muted-foreground)] mb-2.5 flex items-center gap-1.5",children:"💰 Maximum"}),(0,t.jsxs)("p",{className:"font-black tabular-nums leading-none text-[var(--foreground)] flex items-baseline",style:{fontFamily:"var(--display)",fontSize:"clamp(24px, 3.2vw, 38px)",letterSpacing:"-0.03em"},children:[(0,t.jsx)("span",{style:{color:"var(--muted-foreground)",fontSize:"0.55em"},children:"€"}),et(h.sell_target)]}),(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] mt-2.5",children:"braucht Geduld"})]})]}),(d||c)&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5 text-[length:var(--fs-caption)] leading-relaxed text-[var(--muted-foreground)]",children:[d&&(0,t.jsxs)("p",{className:"flex items-start gap-1.5",children:[(0,t.jsx)(u,{size:13,className:"mt-[3px] shrink-0 text-[var(--primary)]","aria-hidden":"true"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"font-semibold text-[var(--foreground)] tabular-nums",children:["Wirklich verkauft: ~",d.median_eur," €"]})," (Median), meist ",d.p25_eur," bis ",d.p75_eur," €",(0,t.jsx)("br",{}),d.n," echte Verkäufe · letzte ",d.fenster_tage," Tage · Vinted DE"]})]}),c&&m&&(0,t.jsxs)("p",{className:"flex items-start gap-1.5",children:[(0,t.jsx)(N.UserRound,{size:13,className:"mt-[3px] shrink-0 text-[var(--muted-foreground)]","aria-hidden":"true"}),(0,t.jsxs)("span",{children:["An dich angepasst: du verkaufst im Schnitt ",m," (aus ",c.n," eigenen Verkäufen)"]})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] font-medium text-[var(--muted-foreground)] tabular-nums",children:["EK-Limit ≤ €",h.buy_max]}),"string"==typeof h.reasoning&&h.reasoning.trim()&&(0,t.jsxs)("details",{className:"text-[length:var(--fs-caption)] group",children:[(0,t.jsxs)("summary",{className:"cursor-pointer text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors list-none inline-flex items-center gap-1 select-none",children:[(0,t.jsx)("span",{className:"opacity-40",children:"·"})," Warum dieser Preis?"]}),(0,t.jsx)("p",{className:"mt-1.5 text-[length:var(--fs-caption)] leading-relaxed text-[var(--muted-foreground)] max-w-prose",children:h.reasoning})]})]}),a&&(0,t.jsxs)("div",{className:"relative mt-3 rounded-xl px-3 py-2.5 text-[length:var(--fs-caption)] leading-relaxed text-[var(--muted-foreground)]",style:{background:"var(--gold-2)",border:"1px solid var(--gold-bd)"},children:[(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:a})," ","ist noch nicht in unserer Preis-Datenbank. Die Spanne oben ist nur ein generischer Richtwert. Kostenlose Experten-Einschätzung:"," ",(0,t.jsx)("a",{href:"https://discord.gg/vintagelab",target:"_blank",rel:"noopener",className:"underline underline-offset-2 text-[var(--foreground)] hover:text-[var(--primary)]",children:"#price-check im VintageLab-Discord"}),"."]})]})}function eP({description:e,copyValue:r,onDescription:a,variants:s,descLen:l,onLen:d,disableCopy:c,masse:u,onMasse:m,onMasseStandard:h,masseBusy:g,luecken:x}){let p=(0,i.useReducedMotion)(),f=a??(()=>{}
112),b=e.split(/\s+/).filter(Boolean).length;return(0,t.jsxs)(n.motion.div,{initial:{opacity:0,y:12*!p},animate:{opacity:1,y:0},transition:{delay:.1,duration:.24,ease:Z},className:"glass-card rounded-3xl p-7 relative overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 flex-wrap gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Sparkles,{size:11,className:"text-[var(--primary)]"}),(0,t.jsxs)("p",{className:"text-[length:var(--fs-meta)] font-semibold text-[var(--primary)]",children:["Beschreibung · ",(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] font-semibold tracking-normal normal-case",children:"bearbeitbar"})]}),(0,t.jsxs)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] ml-2",children:[b," Wörter · paste-ready"]})]}),(0,t.jsx)(eT,{value:r??e,label:"Beschreibung",large:!0,disabled:c,onCopiedOk:()=>(0,R.track)("listing_desc_copied",{edited:e!=e,delta:e.length-e.length,orig_len:e.length,cur_len:e.length,tags_removed:e.includes("#")&&!e.includes("#"),masse_gefuellt:(0,S.masseStand)(e).gefuellt,masse_offen:(0,S.masseStand)(e).offen})})]}),s?(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:"Länge"}),(0,t.jsx)("div",{className:"inline-flex rounded-full border border-[var(--line-2)] bg-[var(--fill-1)] p-0.5",children:[{k:"kurz",label:"Kurz"},{k:"mittel",label:"Mittel"},{k:"lang",label:"Lang"}].map(({k:e,label:r})=>(0,t.jsx)("button",{type:"button",onClick:()=>d(e),"aria-pressed":l===e,className:`rounded-full px-3 py-1 text-[length:var(--fs-caption)] font-semibold transition-colors ${l===e?"bg-[var(--primary)] text-[var(--on-brand)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:r},e))}),(0,t.jsx)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:"kurz"===l?"knapp & natürlich":"lang"===l?"voll & auffindbar":"ausgewogen"})]}):null,u&&u.length&&m?(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:"Maße"}),(0,t.jsx)("div",{className:"inline-flex flex-wrap gap-1 rounded-full border border-[var(--line-2)] bg-[var(--fill-1)] p-0.5",children:u.map(({name:e,on:r})=>(0,t.jsx)("button",{type:"button",onClick:()=>m(e,!r),"aria-pressed":r,className:`rounded-full px-3 py-1 text-[length:var(--fs-caption)] font-semibold capitalize transition-colors ${r?"bg-[var(--primary)] text-[var(--on-brand)]":"text-[var(--muted-foreground)] line-through hover:text-[var(--foreground)]"}`,children:e},e))}),h?(0,t.jsx)("button",{type:"button",onClick:h,disabled:g,className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)] underline underline-offset-2 hover:text-[var(--foreground)] disabled:opacity-60",children:g?"merkt …":"als Standard merken"}):null]}):null,(0,t.jsx)("textarea",{value:e,onChange:e=>f(e.target.value),"aria-label":"Beschreibung bearbeiten",className:"w-full resize-y bg-transparent text-[length:var(--fs-body)] leading-[1.65] text-[var(--foreground)] whitespace-pre-wrap font-[400] min-h-[220px] max-h-[420px] overflow-y-auto pr-2 outline-none focus:bg-[var(--fill-1)] rounded-lg"}),x]})}function eI({offen:e,onEintragen:n,onOhne:a}){let[i,s]=(0,r.useState)({});if(!e.length)return null;let l=e.filter(e=>""!==(i[e]??"").trim());return(0,t.jsxs)("form",{className:"mt-4 rounded-2xl border border-[var(--border)] bg-[var(--fill-1)] p-4",onSubmit:t=>{t.preventDefault(),(()=>{if(!l.length)return;let t=Object.fromEntries(l.map(e=>[e,i[e]]));(0,R.track)("masse_eingetragen",{anzahl:l.length,offen:e.length}),n(t),s({})})()},children:[(0,t.jsx)("p",{className:"text-[13px] font-semibold text-[var(--foreground)]",children:"Maße eintragen"}),(0,t.jsx)("p",{className:"mt-0.5 text-[12.5px] text-[var(--muted-foreground)]",children:"Käufer fragen oft danach. Flach gemessen, in cm."}),(0,t.jsx)("div",{className:"mt-3 grid gap-2.5 sm:grid-cols-2",children:e.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2.5",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block text-[13px] text-[var(--foreground)]",children:e}),(0,t.jsx)("span",{className:"block text-[11.5px] leading-snug text-[var(--muted-foreground)]",children:(0,S.messhilfe)(e)})]}),(0,t.jsx)("input",{inputMode:"decimal",value:i[e]??"",onChange:t=>s(r=>({...r,[e]:t.target.value})),placeholder:"cm","aria-label":`${e} in cm`,maxLength:6,className:"min-h-10 w-20 rounded-lg border border-[var(--border)] bg-[var(--bg-2)] px-2 text-right text-base text-[var(--foreground)] outline-none focus:border-[var(--primary)] sm:text-sm"})]},e))}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("button",{type:"submit",disabled:!l.length,className:"min-h-10 rounded-lg bg-[var(--primary)] px-3.5 text-[13px] font-semibold text-[var(--on-brand)] disabled:opacity-50",children:"Eintragen"}),(0,t.jsx)("button",{type:"button",onClick:a,className:"min-h-10 rounded-lg px-3 text-[13px] text-[var(--muted-foreground)] underline underline-offset-2 hover:text-[var(--foreground)]",children:"Ohne Maße"}),(0,t.jsx)("span",{className:"text-[11.5px] text-[var(--muted-foreground)]",children:"Leere Maße lassen wir beim Kopieren weg."})]})]})}function eT({value:e,label:n,large:a=!1,disabled:i=!1,onCopiedOk:d}){let c=(0,r.useContext)(q),[u,m]=(0,r.useState)(!1),h=async()=>
112{if(i)return void s.toast.info("Demo-Beispiel. Lade Fotos hoch, um dein eigenes Listing zu generieren");if(c.locked)return void c.onLocked();if(!await (0,l.copyText)(e,{silent:!0}))return void s.toast.error("Kopieren nicht möglich, bitte den Text von Hand markieren.");(0,R.track)("result_kept",{kind:"listing",how:"copy"}),d?.();try{navigator.vibrate?.(8)}catch{}s.toast.success(`${n??"Text"} kopiert`),m(!0),setTimeout(()=>m(!1),1500),c.onCopied?.()};return(0,t.jsxs)("button",{onClick:h,className:`inline-flex items-center gap-1.5 rounded-lg font-medium transition-all shrink-0 ${a?"px-3.5 py-2 text-[length:var(--fs-caption)]":"px-3 py-1.5 text-[length:var(--fs-meta)]"} ${i?"bg-[var(--fill-2)] text-[var(--muted-foreground)] opacity-60 cursor-help":u?"bg-[var(--success)]/15 text-[var(--success)] scale-105":"bg-[var(--fill-2)] hover:bg-[var(--primary)]/15 text-[var(--muted-foreground)] hover:text-[var(--primary)] border border-[var(--line-1)] hover:border-[var(--primary)]/20"}`,children:[u?(0,t.jsx)(o.Check,{size:12,strokeWidth:2.6}):c.locked&&!i?(0,t.jsx)("span",{"aria-hidden":!0,className:"text-[length:var(--fs-caption)] leading-none",children:"🔒"}):(0,t.jsx)(o.Copy,{size:12,strokeWidth:2.2}),i?"Beispiel":u?"Kopiert":c.locked?"Konto":"Kopieren"]})}let eF="/signup?next=/account/ki-listing";async function eA(e,t,r,n){t&&F(t),(0,R.track)("signup_clicked",{provider:e,source:n});try{let n=(0,C.createClient)();(0,R.stashAnonForOAuth)();let{error:a}=await n.auth.signInWithOAuth({provider:e,options:{redirectTo:`${window.location.origin}/auth/callback?next=${encodeURIComponent(t?"/account/ki-listing?resume_listing=1":"/account/ki-listing")}`}});a&&(s.toast.error(`${"discord"===e?"Discord":"Google"}-Login fehlgeschlagen, bitte erneut versuchen.`),r())}catch{s.toast.error("Keine Verbindung zur Anmeldung. Bitte versuche es erneut."),r()}}function eB({size:e=18}){return(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M19.27 5.33A16.9 16.9 0 0 0 15 4l-.26.5a12.6 12.6 0 0 1 3.74 1.9 13.6 13.6 0 0 0-11.96 0A12.6 12.6 0 0 1 10.26 4.5 16.9 16.9 0 0 0 6 5.33 17.5 17.5 0 0 0 3 17.4 16.8 16.8 0 0 0 8.13 20l.9-1.36c-.86-.32-1.66-.74-2.38-1.25l.3-.22a11.9 11.9 0 0 0 10.1 0l.3.22c-.72.51-1.52.93-2.38 1.25L15.87 20A16.8 16.8 0 0 0 21 17.4a17.5 17.5 0 0 0-1.73-12.07ZM9.5 15c-.83 0-1.5-.78-1.5-1.75S8.67 11.5 9.5 11.5s1.5.78 1.5 1.75S10.33 15 9.5 15Zm5 0c-.83 0-1.5-.78-1.5-1.75s.67-1.75 1.5-1.75 1.5.78 1.5 1.75S15.33 15 14.5 15Z"})})}function eK({result:e,onEmail:n}){let[a,i]=(0,r.useState)(!1),[s,l]=(0,r.useState)(!1),o=a||s;return(0,r.useEffect)(()=>{(0,R.track)("save_bar_shown",{position:"top"})},[]),(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--brand-bd)] bg-[var(--brand-2)] px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 basis-[240px]",children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-ui)] font-semibold text-[var(--foreground)]",children:"Dein Listing ist fertig."}),(0,t.jsx)("p",{className:"mt-0.5 text-[12.5px] leading-snug text-[var(--muted-foreground)]",children:"Kostenloses Konto, dann kopierst und speicherst du es. 5 Listings im Monat gratis."})]}),(0,t.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{l(!0),eA("google",e,()=>l(!1),"save_bar")},disabled:o,style:{background:"#fff",color:"#1f1f1f",boxShadow:"inset 0 0 0 1px var(--line-2)"},className:"flex items-center justify-center gap-2 rounded-xl px-3.5 py-2.5 text-[13.5px] font-semibold transition-transform active:scale-[0.98] disabled:opacity-60",children:[(0,t.jsx)(eO,{}),s?"Weiter…":"Google"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>{i(!0),eA("discord",e,()=>i(!1),"save_bar")},disabled:o,style:{background:"#5865F2",color:"#fff"},className:"flex items-center justify-center gap-2 rounded-xl px-3.5 py-2.5 text-[13.5px] font-semibold transition-transform active:scale-[0.98] disabled:opacity-60",children:[(0,t.jsx)(eB,{size:16}),a?"Weiter…":"Discord"]})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{e&&F(e),n()},className:"mt-2 text-[11.5px] text-[var(--muted-foreground)] underline-offset-2 hover:text-[var(--foreground)] hover:underline",children:"oder mit E-Mail"})]})}function eR({open:e,onClose:i,children:s}){return(0,r.useEffect)(()=>
112{if(!e)return;let t=e=>{"Escape"===e.key&&i()};document.addEventListener("keydown",t);let r=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=r}},[e,i]),(0,t.jsx)(a.AnimatePresence,{children:e&&(0,t.jsxs)(n.motion.div,{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:Y,children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-[var(--scrim)] backdrop-blur-sm",onClick:i,"aria-hidden":!0}),(0,t.jsxs)(n.motion.div,{role:"dialog","aria-modal":"true",initial:{opacity:0,scale:.96,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:6},transition:X,className:"relative w-full max-w-[400px] rounded-2xl border border-[var(--border)] bg-[var(--card)] p-6 shadow-2xl",children:[(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":"Schließen",className:"absolute right-3.5 top-3.5 grid h-7 w-7 place-items-center rounded-lg text-[var(--muted-foreground)] hover:bg-[var(--fill-2)] hover:text-[var(--foreground)] transition-colors",children:(0,t.jsx)(o.X,{size:15})}),s]})]})})}function e$({open:e,onClose:n,hasResult:a,result:i}){let[s,l]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1);async function u(e){let t="discord"===e?c:l;t(!0),await eA(e,i,()=>t(!1),"wall")}return(0,t.jsxs)(eR,{open:e,onClose:n,children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full bg-[var(--success)]/12 px-2.5 py-1 text-[length:var(--fs-caption)] font-medium text-[var(--success)]",children:[(0,t.jsx)(o.Check,{size:12,strokeWidth:2.6}),a?"Dein Listing ist fertig":"Gratis-Listing genutzt"]}),(0,t.jsx)("h3",{className:"mt-3 text-[19px] font-semibold leading-snug text-[var(--foreground)]",children:"Kostenloses Konto erstellen, um dein Listing zu kopieren"}),(0,t.jsxs)("p",{className:"mt-2 text-[13.5px] leading-relaxed text-[var(--muted-foreground)]",children:["Erstell dein Konto und ",(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:"liste gleich deinen ganzen Schrank"}),":",(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:"5 Listings pro Monat gratis"}),", kopieren & speichern inklusive. Ein volles Profil verkauft schneller als ein einzelnes Piece."]}),(0,t.jsxs)("button",{type:"button",onClick:()=>u("google"),disabled:d||s,style:{background:"#ffffff",color:"#1f1f1f",boxShadow:"inset 0 0 0 1px var(--line-2)"},className:"mt-5 flex w-full items-center justify-center gap-2.5 rounded-xl px-4 py-3 text-[length:var(--fs-ui)] font-semibold transition-transform hover:scale-[1.02] disabled:opacity-70",children:[(0,t.jsx)(eO,{}),s?"Weiter…":"Mit Google fortfahren"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>u("discord"),disabled:d||s,style:{background:"#5865F2",color:"#ffffff"},className:"mt-2.5 flex w-full items-center justify-center gap-2.5 rounded-xl px-4 py-3 text-[length:var(--fs-ui)] font-semibold transition-transform hover:scale-[1.02] disabled:opacity-70",children:[(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M19.27 5.33A16.9 16.9 0 0 0 15 4l-.26.5a12.6 12.6 0 0 1 3.74 1.9 13.6 13.6 0 0 0-11.96 0A12.6 12.6 0 0 1 10.26 4.5 16.9 16.9 0 0 0 6 5.33 17.5 17.5 0 0 0 3 17.4 16.8 16.8 0 0 0 8.13 20l.9-1.36c-.86-.32-1.66-.74-2.38-1.25l.3-.22a11.9 11.9 0 0 0 10.1 0l.3.22c-.72.51-1.52.93-2.38 1.25L15.87 20A16.8 16.8 0 0 0 21 17.4a17.5 17.5 0 0 0-1.73-12.07ZM9.5 15c-.83 0-1.5-.78-1.5-1.75S8.67 11.5 9.5 11.5s1.5.78 1.5 1.75S10.33 15 9.5 15Zm5 0c-.83 0-1.5-.78-1.5-1.75s.67-1.75 1.5-1.75 1.5.78 1.5 1.75S15.33 15 14.5 15Z"})}),d?"Weiter…":"Mit Discord fortfahren"]}),(0,t.jsx)("a",{href:i?`${eF}%3Fresume_listing%3D1`:eF,onClick:()=>{i&&F(i)},className:"mt-2.5 flex w-full items-center justify-center gap-2 rounded-xl border border-[var(--border)] bg-[var(--fill-1)] px-4 py-3 text-[length:var(--fs-ui)] font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--fill-3)]",children:"Mit E-Mail"}),(0,t.jsxs)("p",{className:"mt-3.5 text-center text-[11.5px] text-[var(--muted-foreground)]",children:["💎 VintageLab ",(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:"PRO/ELITE"}),"? Mit Discord bis zu"," ",(0,t.jsx)("strong",{className:"text-[var(--foreground)]",children:"30 Gratis-Listings/Monat"})," statt 5."]}),(0,t.jsxs)("p",{className:"mt-2 text-center text-[11.5px] text-[var(--muted-foreground)]",children:["Schon ",(0,t.jsxs)("strong",{className:"text-[var(--foreground)]",children:["1300+"," Reseller"]})," nutzen kleidio · keine Kreditkarte"]})]})}function eO(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 48 48","aria-hidden":!0,
112children:[(0,t.jsx)("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),(0,t.jsx)("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}function eV({open:e,onClose:r,limit:n,trialEligible:a,variant:i,monthValue:s,monthCount:l,photoCount:d,onCheckout:c,tier:u=null,liteOffer:m=!1,perkTier:h=null}){if("lite"===u)return(0,t.jsx)(eH,{open:e,onClose:r,limit:n});if("value"===i)return(0,t.jsx)(eJ,{open:e,onClose:r,limit:n,trialEligible:a,monthValue:s,monthCount:l,photoCount:d,onCheckout:c,liteOffer:m,perkTier:h});let g=Math.round(L.KLEIDIO_PUBLIC_FACTS.proListingsPerMonth/Math.max(1,n));return(0,t.jsxs)(eR,{open:e,onClose:r,children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full bg-[var(--primary)]/12 px-2.5 py-1 text-[length:var(--fs-caption)] font-medium text-[var(--primary)]",children:[(0,t.jsx)(o.Sparkles,{size:12}),"Gratis-Limit erreicht"]}),(0,t.jsxs)("h3",{className:"mt-3 text-[19px] font-semibold leading-snug text-[var(--foreground)]",children:["Du hast diesen Monat ",n," Listings erstellt 🎉"]}),(0,t.jsxs)("p",{className:"mt-2 text-[13.5px] leading-relaxed text-[var(--muted-foreground)]",children:["Hol dir ",(0,t.jsxs)("strong",{className:"text-[var(--foreground)]",children:[g,"× mehr"]})," mit Pro, genug für jeden Verkauf."]}),(0,t.jsx)(eU,{perkTier:h,limit:n}),(0,t.jsxs)("div",{className:"mt-4 rounded-xl border border-[var(--primary)]/30 bg-[var(--primary)]/[0.06] p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--foreground)]",children:"Pro"}),(0,t.jsx)("span",{className:"rounded-full bg-[var(--primary)] px-2 py-0.5 text-[length:var(--fs-caption)] font-bold text-[var(--on-brand)]",children:"EMPFOHLEN"})]}),(0,t.jsx)("p",{className:"mt-1 text-[length:var(--fs-meta)] text-[var(--muted-foreground)]",children:"14,99 € / Monat · ≈ 5 Cent pro Listing"}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1.5 text-[length:var(--fs-caption)] text-[var(--foreground)]",children:[(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Check,{size:13,strokeWidth:2.6,className:"text-[var(--primary)]"}),"300 Listings / Monat ",(0,t.jsxs)("span",{className:"text-[var(--muted-foreground)]",children:["(",g,"× mehr)"]})]}),(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Check,{size:13,strokeWidth:2.6,className:"text-[var(--primary)]"}),"Alle ",L.KLEIDIO_PUBLIC_FACTS.pricingBrandCount,"Marken & DACH-Marktpreise"]}),(0,t.jsxs)("li",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Check,{size:13,strokeWidth:2.6,className:"text-[var(--primary)]"}),"Titel, Beschreibung & Hashtags ohne Limit"]})]}),(0,t.jsx)("a",{href:"/checkout?plan=pro",onClick:()=>(0,R.track)("purchase_intent",{where:"listing_limit",trial:a,variant:"classic"}),style:{background:"var(--primary)",color:"var(--on-brand)"},className:"mt-4 flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-[length:var(--fs-ui)] font-semibold transition-transform hover:scale-[1.02]",children:a?"7 Tage gratis testen":"Pro freischalten"}),(0,t.jsx)("p",{className:"mt-2 text-center text-[11.5px] text-[var(--muted-foreground)]",children:a?"danach 14,99 €/Monat · monatlich kündbar":"14,99 €/Monat · monatlich kündbar"})]}),m?(0,t.jsx)(eW,{variant:"classic"}):null,n<=L.KLEIDIO_PUBLIC_FACTS.freeListingsPerMonth?(0,t.jsxs)("a",{href:"/login?next=/account/ki-listing",onClick:()=>(0,R.track)("purchase_intent",{where:"listing_limit",kind:"discord_perk"}),className:"mt-3 flex items-start gap-2.5 rounded-xl border border-[var(--border)] bg-[var(--fill-1)] p-3 transition-colors hover:border-[var(--primary)]/40",children:[(0,t.jsx)("span",{className:"mt-0.5 text-[15px] leading-none","aria-hidden":!0,
112children:"💎"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"block text-[length:var(--fs-caption)] font-semibold text-[var(--foreground)]",children:["Schon VintageLab-Member? Dann sind es ",L.KLEIDIO_PUBLIC_FACTS.vintageLabEliteListingsPerMonth," statt ",n,"."]}),(0,t.jsx)("span",{className:"mt-0.5 block text-[11.5px] leading-snug text-[var(--muted-foreground)]",children:"Mit Discord einloggen, PRO und ELITE bekommen mehr Gratis-Listings pro Monat. Kostet nichts extra."})]})]}):null,(0,t.jsx)("p",{className:"mt-3 text-center text-[11.5px] text-[var(--muted-foreground)]",children:"Jederzeit kündbar · Limit setzt sich am Monatsanfang zurück"})]})}function eU({perkTier:e,limit:r}){return e?(0,t.jsxs)("p",{className:"mt-2 text-[12.5px] leading-snug text-[var(--muted-foreground)]",children:["Deine ",r," Listings kommen aus deinem VintageLab ",e,". Kleidio Pro ist ein eigenes Abo mit"," ",L.KLEIDIO_PUBLIC_FACTS.proListingsPerMonth," Listings."]}):null}function eW({variant:e}){return(0,t.jsxs)("a",{href:"/checkout?plan=lite",onClick:()=>(0,R.track)("purchase_intent",{where:"listing_limit",plan:"lite",variant:e}),className:`mt-3 block ${"value"===e?"rounded-[10px]":"rounded-xl"} border border-[var(--border)] p-3 transition-colors hover:border-[var(--primary)]/40`,children:[(0,t.jsx)("span",{className:"block text-[length:var(--fs-caption)] font-semibold text-[var(--foreground)]",children:"Nur ab und zu am Listen? Lite für 6,99 € im Monat"}),(0,t.jsx)("span",{className:"mt-0.5 block text-[11.5px] leading-snug text-[var(--muted-foreground)]",children:"50 Listings im Monat, gilt sofort, monatlich kündbar."})]})}function eH({open:e,onClose:r,limit:n}){return(0,t.jsxs)(eR,{open:e,onClose:r,children:[(0,t.jsx)("p",{className:"text-[length:var(--fs-caption)] font-medium text-[var(--muted-foreground)]",children:"Lite-Limit erreicht"}),(0,t.jsxs)("h3",{className:"mt-2 text-[19px] font-semibold leading-snug text-[var(--foreground)]",children:["Deine ",n," Listings für diesen Monat sind aufgebraucht."]}),(0,t.jsxs)("div",{className:"mt-4 rounded-[10px] border border-[var(--border)] bg-[var(--fill-1)] p-4",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--foreground)]",children:"Pro"}),(0,t.jsx)("span",{className:"text-[length:var(--fs-meta)] text-[var(--muted-foreground)]",children:"14,99 € / Monat"})]}),(0,t.jsx)("p",{className:"mt-1 text-[length:var(--fs-caption)] leading-snug text-[var(--muted-foreground)]",children:"300 Listings im Monat. Gilt sofort, heute zahlst du nur den Aufpreis für den Rest des Monats."}),(0,t.jsx)("a",{href:"/account/billing?pro=1",onClick:()=>(0,R.track)("purchase_intent",{where:"listing_limit",plan:"pro",from:"lite"}),style:{background:"var(--primary)",color:"var(--on-brand)"},className:"mt-4 flex w-full items-center justify-center gap-2 rounded-[10px] px-4 py-3 text-center text-[length:var(--fs-ui)] font-semibold",children:"Zurück auf Pro"})]}),(0,t.jsx)("p",{className:"mt-3 text-center text-[11.5px] text-[var(--muted-foreground)]",children:"Oder warte bis zum Monatsanfang, dann geht es mit Lite weiter."})]})}let eG=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];function eJ({open:e,onClose:n,limit:a,trialEligible:i,monthValue:s,monthCount:l,photoCount:o,onCheckout:d,liteOffer:c=!1,perkTier:u=null}){let[m,h]=(0,r.useState)(!1),g=eG[new Date().getMonth()],x=null!==s&&s>0&&null!==l&&l>0;return(0,t.jsxs)(eR,{open:e,onClose:n,children:[(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] font-medium text-[var(--muted-foreground)]",children:["Gratis-Limit für ",g," erreicht"]}),(0,t.jsx)("h3",{className:"mt-2 text-[19px] font-semibold leading-snug text-[var(--foreground)]",children:x?(0,t.jsxs)(t.Fragment,{children:["Deine ",l," Listings diesen Monat: Preisvorschläge zusammen"," ",(0,t.jsxs)("span",{className:"text-[var(--green)]",children:[s.toLocaleString("de-DE")," €"]})]}):(0,t.jsxs)(t.Fragment,{children:["Du hast diesen Monat ",a," Listings erstellt."]})}),(0,t.jsx)(eU,{perkTier:u,limit:a}),o>0?(0,t.jsxs)("p",{className:"mt-2 text-[13.5px] leading-relaxed text-[var(--muted-foreground)]",children:["Dein nächstes Listing ist vorbereitet (",o," ",1===o?"Foto":"Fotos","). Mit Pro wird es direkt nach dem Start erstellt, du musst nichts neu hochladen."]}):null,(0,t.jsxs)("div",{className:"mt-4 rounded-[10px] border border-[var(--border)] bg-[var(--fill-1)] p-4",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[length:var(--fs-body)] font-semibold text-[var(--foreground)]",children:"Pro"}),(0,t.jsx)("span",{className:"text-[length:var(--fs-meta)] text-[var(--muted-foreground)]",children:"14,99 € / Monat"})]}),(0,t.jsxs)("p",{className:"mt-1 text-[length:var(--fs-caption)] leading-snug text-[var(--muted-foreground)]",children:["300 Listings im Monat, alle ",L.KLEIDIO_PUBLIC_FACTS.pricingBrandCount," Marken mit DACH-Marktpreisen."]}
112),(0,t.jsx)("a",{href:"/checkout?plan=pro",onClick:e=>{e.preventDefault(),m||(h(!0),d())},style:{background:"var(--primary)",color:"var(--on-brand)"},className:"mt-4 flex w-full items-center justify-center gap-2 rounded-[10px] px-4 py-3 text-center text-[length:var(--fs-ui)] font-semibold",children:m?"Einen Moment…":i?o>0?"7 Tage gratis testen und Listing erstellen":"7 Tage gratis testen":o>0?"Pro starten und Listing erstellen":"Pro freischalten"}),(0,t.jsx)("p",{className:"mt-2 text-center text-[11.5px] text-[var(--muted-foreground)]",children:i?"danach 14,99 €/Monat · monatlich kündbar":"14,99 €/Monat · monatlich kündbar"})]}),c?(0,t.jsx)(eW,{variant:"value"}):null,a<=L.KLEIDIO_PUBLIC_FACTS.freeListingsPerMonth?(0,t.jsxs)("a",{href:"/login?next=/account/ki-listing",onClick:()=>(0,R.track)("purchase_intent",{where:"listing_limit",kind:"discord_perk",variant:"value"}),className:"mt-3 block rounded-[10px] border border-[var(--border)] p-3 transition-colors hover:border-[var(--primary)]/40",children:[(0,t.jsxs)("span",{className:"block text-[length:var(--fs-caption)] font-semibold text-[var(--foreground)]",children:["Schon VintageLab-Member? Dann sind es ",L.KLEIDIO_PUBLIC_FACTS.vintageLabEliteListingsPerMonth," statt ",a,"."]}),(0,t.jsx)("span",{className:"mt-0.5 block text-[11.5px] leading-snug text-[var(--muted-foreground)]",children:"Mit Discord einloggen, PRO und ELITE bekommen mehr Gratis-Listings im Monat."})]}):null,(0,t.jsx)("p",{className:"mt-3 text-center text-[11.5px] text-[var(--muted-foreground)]",children:"Das Gratis-Limit setzt sich am Monatsanfang zurück."})]})}e.s(["ListingTool",0,function(){let e=(0,r.useRef)(null),n=(0,r.useRef)(null),[i,l]=(0,r.useState)([]),d=(0,r.useRef)(!1),[c,u]=(0,r.useState)([]),[m,g]=(0,r.useState)(!1),[x,f]=(0,r.useState)("idle"),[v,y]=(0,r.useState)(null),k=v?.einschaetzung??null,j=(0,r.useMemo)(()=>{let e=v?.pricing??null;return e&&k&&e.sell_target?{...e,sell_low:k.schnell,sell_target:k.ziel,sell_high:k.premium,buy_max:Math.round(e.buy_max*(k.ziel/e.sell_target))}:e},[v,k]),[N,w]=(0,r.useState)(null),[_,S]=(0,r.useState)(null),[z,L]=(0,r.useState)(null),[M,C]=(0,r.useState)(!1),[F,O]=(0,r.useState)(!1),[V,H]=(0,r.useState)({brand:"",category:"",size:""}),[Z,X]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=t=>(e.get(t)??"").trim().slice(0,60),r={brand:t("marke"),category:t("kategorie"),size:t("groesse")};(r.brand||r.category||r.size)&&Promise.resolve().then(()=>{H(r),O(!0),(0,R.track)("listing_hints_prefilled",{quelle:e.get("utm_campaign")??"link"})})},[]);let[Y,ee]=(0,r.useState)(!1),[et,ei]=(0,r.useState)(null),[es,ed]=(0,r.useState)(!1),em=e=>{(0,R.track)("signup_wall_shown",{trigger:e}),ed(!0)},[ep,ef]=(0,r.useState)(!1),[eb,ev]=(0,r.useState)(!0),[ey,ek]=(0,r.useState)({variant:"classic",value:null,count:null,tier:null,liteOffer:!1,perkTier:null}),eN=(0,r.useRef)(!1),ew=(0,r.useRef)(!1),e_=(0,r.useRef)(null),[eS,ez]=(0,r.useState)(!1),[eL,eM]=(0,r.useState)(!1),[eC,eE]=(0,r.useState)(null),[eD,eP]=(0,r.useState)(null),[eI,eT]=(0,r.useState)(null),[eF,eA]=(0,r.useState)(null),eB=async(e,t)=>{let r="listing_tips"!==e;(0,R.track)("cross_feature_click",{from:e,to:"studio",...t?{position:t}:{},...r?{n:(0,W.aktuelleNudgeNummer)((0,W.nudgeKey)({from:e,to:"studio"}))}:{nudge:!1}});try{let e=i[0],t=e?await (0,D.fileToDataUrl)(e):eD;t&&(0,D.stashForStudio)({dataUrl:t,filename:e?.name||"kleidio-foto.jpg"})}catch{}let n=window.location.pathname.startsWith("/account");window.location.href=n?"/account/studio":"/studio"},[eR,eO]=(0,r.useState)(null),eU=!!N?.listing?.title&&eR===N.listing.title,eW=(0,r.useMemo)(()=>N&&eU?(0,W.nudgeAusgereizt)((0,W.nudgeKey)({from:"listing_postcopy",to:"studio"}))?null:"listing_postcopy":null,[N,eU]),eH="inline",eG=N&&!Y&&(i[0]||eD)&&eW?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.TrackShown,{event:"cross_feature_shown",props:{from:eW,to:"studio",position:eH}},`${eW}-${eH}`),(0,t.jsxs)("button",{type:"button",onClick:()=>{eB(eW,eH)},className:"mt-4 flex w-full items-start gap-3 rounded-xl border border-[var(--brand-bd)] bg-[var(--brand-2)] p-4 text-left transition-[filter] hover:brightness-110",children:["listing_postcopy"===eW&&(c[0]||eD)?(0,t.jsx)("img",{src:c[0]??eD??void 0,alt:"",className:"mt-0.5 size-12 shrink-0 rounded-lg object-cover ring-1 ring-[var(--brand-bd)]"}):(0,t.jsx)("span",{className:"mt-0.5 grid size-9 shrink-0 place-items-center rounded-lg bg-[var(--brand)] text-[var(--on-brand)]",children:(0,t.jsx)(o.Sparkles,{className:"h-4 w-4"})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-[length:var(--fs-ui)] font-semibold text-[var(--text)]",children:"listing_postcopy"===eW?"Listing kopiert ✓ Jetzt das Verkaufsfoto":"Jetzt noch das Foto dazu: 2 Bilder gratis"}),(0,t.jsx)("span",{className:"mt-0.5 block text-[12.5px] leading-snug text-[var(--text-2)]",children:"listing_postcopy"===eW?"Try-On oder Flat-Lay aus genau diesem Foto. Es ist schon im Studio, ein Klick reicht. Die ersten 2 Bilder sind gratis.":"Model-Bild (Try-On) oder sauberes Flat-Lay aus genau diesem Piece. Dein Foto ist schon im Studio, ein Klick reicht."})]})]})]}):null,[eJ,eq]=(0,r.useState)(null),[eZ,eX]=(0,r.useState)("ohne"),eY=(0,r.useRef)(!0);(0,r.useEffect)(()=>(eY.current=!0,()=>{eY.current=!1}),[]);let eQ=(0,r.useCallback)(async e=>{let t=[];for(let r of e){if(i.length+t.length>=8){s.toast.error("Max. 8 Fotos");break}if(!Q.includes(r.type)&&!(0,K.isHeicLike)(r)){s.toast.error(`"${r.name}": ung\xfcltiger Typ, bitte JPEG, PNG, WebP oder HEIC verwenden`);continue}if(r.size>0x1900000){s.toast.error(`"${r.name}": \xfcber 25 MB`);continue}t.push(r)}if(0===t.length)return;0!==i.length||d.current||(d.current=!0,(0,R.track)("listing_upload_started"));let r=await Promise.all(t.map(e=>(0,K.isHeicLike)(e)?(0,K.downscaleToDataUrl)(e,{maxDimension:512,maxChars:4e5}
112).catch(()=>URL.createObjectURL(e)):URL.createObjectURL(e)));l(e=>[...e,...t]),u(e=>[...e,...r])},[i.length]),e0=e=>{e.target.files&&eQ(Array.from(e.target.files)),e.target.value=""};(0,r.useEffect)(()=>{"source_ready"!==x||window.innerWidth>=1024||requestAnimationFrame(()=>document.getElementById("kil-result")?.scrollIntoView({behavior:"smooth",block:"start"}))},[x]),(0,r.useEffect)(()=>{let e=new URL(window.location.href),t="1"===e.searchParams.get("resume_listing");t&&(e.searchParams.delete("resume_listing"),window.history.replaceState(window.history.state,"",e.toString()));let r=function(){let e=T(P);if(!e?.data||!I())return null;try{localStorage.removeItem(P)}catch{}return e.data}(),n=function(){let e=T(A);if(!e?.dataUrl||!I())return null;try{localStorage.removeItem(A)}catch{}return e.dataUrl}();if(!r){t&&eM(!0);return}if(w(r),ee(!1),n){let e=(0,D.dataUrlToFile)(n,"kleidio-foto.jpg");e?(d.current=!0,eQ([e])):eP(n)}f("complete"),requestAnimationFrame(()=>document.getElementById("kil-result")?.scrollIntoView({behavior:"smooth",block:"start"})),s.toast.success("Dein Listing ist wieder da, jetzt kannst du es kopieren.")},[]),(0,r.useEffect)(()=>{if(!N||!Y||!i[0])return;let e=!1;return(0,K.downscaleToDataUrl)(i[0],{maxDimension:1024,maxChars:1e6}).then(t=>{!e&&t&&function(e){try{localStorage.setItem(A,JSON.stringify({at:Date.now(),dataUrl:e}))}catch{}}(t)}).catch(()=>{}),()=>{e=!0}},[N,Y,i]),(0,r.useEffect)(()=>{let e=(0,D.takeForListing)();if(!e?.dataUrl)return;e.department&&eT(e.department),e.itemId&&eA(e.itemId);let t=(0,D.dataUrlToFile)(e.dataUrl,e.filename||"kleidio-foto.jpg");t&&(eQ([t]),requestAnimationFrame(()=>document.getElementById("tool")?.scrollIntoView({behavior:"smooth",block:"start"})))},[]),(0,r.useEffect)(()=>{let e=e=>{let t=[...e.clipboardData?.items??[]].find(e=>e.type.startsWith("image/")),r=t?.getAsFile();r&&eQ([r])};return window.addEventListener("paste",e),()=>window.removeEventListener("paste",e)},[eQ]);let e1=()=>{c.forEach(URL.revokeObjectURL),l([]),u([])},e2=(0,r.useCallback)((e,t=null)=>{let r=e.listing;if(!r)return!1;let n={attributes:e.attributes||t,listing:r,meta:e.meta};eO(null),eq(null),y(null),S(null),w(n),ee(!0===e.anonymous),eX("karte"===e.naechstes?"karte":"ohne"),(0,R.track)("listing_generated",{anon:!0===e.anonymous}),(0,R.track)("listing_result_viewed",{anon:!0===e.anonymous});let a=e.usage;return a&&"number"==typeof a.used_this_month&&"number"==typeof a.limit&&(ei({used_this_month:a.used_this_month,limit:a.limit}),a.limit-a.used_this_month!=1||ew.current||(ew.current=!0,s.toast.message("Noch 1 Listing diesen Monat übrig."))),f("complete"),J(),!0},[]),e5=(0,r.useCallback)(async(e,t)=>{let r=Date.now()+9e4,n="reopen"===t;do{if(!eY.current)break;try{let r=await fetch(`/api/tools/ai-listing-generator?request_id=${encodeURIComponent(e)}`,{cache:"no-store"});if(r.ok){let e=await r.json();if(e?.ready&&e.listing&&eY.current&&e2(e.listing))return(0,R.track)("listing_recovered",{via:t}),!0}}catch{}if(n)break;await new Promise(e=>setTimeout(e,2e3))}while(Date.now()<r)return!1},[e2]);(0,r.useEffect)(()=>{let e,t=null;try{t=localStorage.getItem(G)}catch{return}if(!t)return;try{e=JSON.parse(t)}catch{J();return}let r="string"==typeof e.id?e.id:null,n="number"==typeof e.ts?e.ts:0;!r||Date.now()-n>18e5?J():(async()=>{await e5(r,"reopen")||J()})()},[]);let e3=async()=>{if((0,R.track)("purchase_intent",{where:"listing_limit",trial:eb,variant:ey.variant,photos:i.length}),"value"===ey.variant&&i.length>0)try{let e=await Promise.all(i.slice(0,6).map(e=>(0,K.downscaleToDataUrl)(e,{maxDimension:1280,maxChars:7e5})));(0,B.stashPaywallResume)(e.filter(e=>"string"==typeof e&&e.length>0))}catch{}window.location.href="/checkout?plan=pro"},e4=async()=>{if(N&&eA(null),0===i.length||m)return;(0,R.track)("listing_generation_started",{photos:i.length});let e=Date.now(),t="upload",r=(0,$.extensionGeraet)(),n=Math.round(i.reduce((e,t)=>e+t.size,0)/1e5)/10,a=0,l=s=>{(0,R.track)("listing_abandoned",{kind:"listing",phase:t,elapsed_ms:Date.now()-e,photos:i.length,persisted:s.persisted,prep_fertig:a,mb:n,geraet:r.geraet,browser:r.familie})};window.addEventListener("pagehide",l),g(!0),eE(null),f("analyzing"),S(null),L(null),ez(!1),y(null),w(null),X(i);let o=function(){try{let e="u">typeof crypto?crypto:void 0;if(e?.randomUUID)return e.randomUUID();if(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[0]}${r[1]}${r[2]}${r[3]}-${r[4]}${r[5]}-${r[6]}${r[7]}-${r[8]}${r[9]}-${r[10]}${r[11]}${r[12]}${r[13]}${r[14]}${r[15]}`}}catch{}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}();e_.current=o;try{localStorage.setItem(G,JSON.stringify({id:o,ts:Date.now()}))}catch{}let d=async()=>{ez(!0);try{return await e5(o,"poll")}finally{ez(!1)}},c=i.slice(0,8),u=Math.floor(4e6/Math.max(1,c.length));eE({done:0,total:c.length});let h=Date.now(),x=Array(c.length);{let e=0,t=async()=>{for(;e<c.length;){let t=e++;x[t]=await (0,K.downscaleToFileResult)(c[t],{maxDimension:1024,quality:.72,targetBytes:u}),a++,eE(e=>e?{...e,done:e.done+1}:e)}};await Promise.all([t(),t()])}eE(e=>e?{...e,done:e.total}:e),(0,R.track)("listing_prep_done",{ms:Date.now()-h,photos:c.length,heic:c.filter(K.isHeicLike).length,failed:x.filter(e=>e.reason).length,mb:n,max_mb:Math.round(Math.max(...c.map(e=>e.size))/1e5)/10,geraet:r.geraet,browser:r.familie});let p=[],b=0,v=0,k=0;for(let e of x){if(b+e.file.size>4e6){e.reason?k++:v++;continue}p.push(e.file),b+=e.file.size}if(0===p.length){let e=k>0?"decode_failed":"too_large";(0,R.track)("upload_failed",{kind:"listing",reason:e,anzahl:x.length,mimes:Array.from(new Set(x.map(e=>e.file.type||"leer"))).join(","),endungen:Array.from(new Set(x.map(e=>(e.file.name.match(/\.[^.]+$/)?.[0]??"-").toLowerCase()))).join(","),maxKb:Math.max(...x.map(e=>Math.round(e.file.size/1024)))}),S(k>0?"Dein Gerät konnte dieses Foto nicht verkleinern, und in Originalgröße ist es zu groß für den Upload. Schick es dir einmal selbst per WhatsApp oder E-Mail und lade die Kopie hoch, die ist automatisch kleiner.":"Dein Foto ist zu groß für den Upload. Bitte ein kleineres Bild oder JPEG/PNG statt HEIC verwenden."),f("error"),g(!1),window.removeEventListener("pagehide",l);return}v+k>0&&s.toast.warning(`${v+k} Foto(s) konnten nicht mitgeschickt werden. Tipp: Achte darauf, dass dein Marken-/Gr\xf6\xdfen-Tag unter den behaltenen Fotos ist, es ist das wichtigste f\xfcr die Erkennung.`);let j=new FormData;p.forEach((e,t)=>j.append(`photo_${t}`,e)),V.brand.trim()&&j.append("hint_brand",V.brand.trim()),V.category.trim()&&j.append("hint_category",V.category.trim()),V.size.trim()&&j.append("hint_size",V.size.trim());let _=new AbortController,z=setTimeout(()=>_.abort(),15e4),M=null,C=()=>
112{M&&clearTimeout(M),M=setTimeout(()=>_.abort(),25e3)};t="vision";let E=!1,D=(e,t)=>{E||(E=!0,(0,R.track)("generation_failed",{kind:"listing",reason:e.slice(0,80),photos:p.length,...t}))};try{let e=await fetch("/api/tools/ai-listing-generator",{method:"POST",body:j,signal:_.signal,headers:{"X-Request-Id":o}});if(!e.ok){let t=await e.json().catch(()=>({})),r=413===e.status?"Fotos zu groß für den Upload. Bitte weniger oder kleinere Fotos nehmen (idealerweise 3–6 klare Bilder).":("string"==typeof t.message?t.message:null)||("string"==typeof t.error?t.error:null)||"Generierung fehlgeschlagen";if(L("string"==typeof t.error?t.error:`http_${e.status}`),401===e.status){em("signup_required"),f("idle");return}if(402===e.status){"number"==typeof t.used_this_month&&"number"==typeof t.limit&&ei({used_this_month:t.used_this_month,limit:t.limit}),ev(!1!==t.trial_eligible);let e="value"===t.paywall_variant?"value":"classic",r="string"==typeof t.tier?t.tier:null,n=!0===t.lite_offer,a="lite"===t.lite_test||"kontrolle"===t.lite_test?t.lite_test:null,s="PRO"===t.perk_tier||"ELITE"===t.perk_tier?t.perk_tier:null;ek({variant:e,value:"number"==typeof t.month_value_eur?t.month_value_eur:null,count:"number"==typeof t.month_listing_count?t.month_listing_count:null,tier:r,liteOffer:n,perkTier:s}),(0,R.track)("paywall_shown",{where:"listing",trial:!1!==t.trial_eligible,variant:e,photos:i.length,tier:r,lite_offer:n,lite_test:a}),ef(!0),f("idle");return}D("string"==typeof t.error?t.error:`http_${e.status}`,{where:"http",status:e.status}),S(r),s.toast.error(r),f("error");return}if(!e.body)throw Error("Streaming not supported by this browser");let r=e.body.getReader(),n=new TextDecoder,a="",l=!1,c=!1,u=!1,m=null;for(C();;){let{done:e,value:i}=await r.read();if(e)break;C();let o=(a+=n.decode(i,{stream:!0})).split("\n");for(let e of(a=o.pop()??"",o)){let r,n=e.trim();if(n){try{r=JSON.parse(n)}catch{console.warn("[ai-listing] Malformed NDJSON line:",n);continue}if("source_intel"===r.type){let e=r;y(e),m=e.attributes,f("source_ready"),l=!0,t="listing"}else if("listing"===r.type)c=!0,e2(r,m);else if("error"===r.type){u=!0;let e="string"==typeof r.stage?r.stage:"unknown",t="string"==typeof r.message?r.message:`Fehler in Stufe "${e}"`,n="string"==typeof r.error?r.error:"unknown",a="string"==typeof r.detail?r.detail:"";D(n,{where:"stream",stage:e.slice(0,40),...a?{detail:a.slice(0,80)}:{}}),L(a?`${n} \xb7 ${a}`:n),y(null),w(null),S(t),s.toast.error(t),f("error")}}}}if(!c&&!u&&!await d()){y(null);let e=l?"Listing konnte nicht erstellt werden. Bitte erneut versuchen.":"Keine Daten empfangen.";D(l?"no_listing":"no_data",{where:"stream_empty"}),S(e),L(l?"no_listing":"no_data"),s.toast.error(e),f("error")}}catch(t){let e=t instanceof DOMException&&"AbortError"===t.name;if(!await d()){let r=e?"Verbindung unterbrochen, bitte erneut versuchen (am besten mit WLAN).":"Verbindung abgebrochen, bevor das Ergebnis ankam. Oft hilft: VPN oder Adblocker kurz aus, anderer Browser, oder WLAN statt Mobilfunk, dann erneut versuchen.";D(e?"timeout":"network",{where:"exception",detail:(t instanceof Error?t.name:"unknown").slice(0,40),online:"u"<typeof navigator||navigator.onLine}),S(r),L(e?"timeout":t instanceof Error?`network \xb7 ${t.message}`:"network"),s.toast.error(r),f("error")}}finally{window.removeEventListener("pagehide",l),clearTimeout(z),M&&clearTimeout(M),g(!1),ez(!1)}};return(0,r.useEffect)(()=>{let e=new URL(window.location.href);if("paywall"!==e.searchParams.get("resume"))return;e.searchParams.delete("resume"),window.history.replaceState(window.history.state,"",e.toString());let t=(0,B.takePaywallResume)();if(!t)return;let r=t.map((e,t)=>(0,D.dataUrlToFile)(e,`kleidio-foto-${t+1}.jpg`)).filter(e=>null!==e);r.length&&(d.current=!0,eN.current=!0,(0,R.track)("paywall_resume",{photos:r.length}),eQ(r))},[]),(0,r.useEffect)(()=>{eN.current&&0!==i.length&&!m&&(eN.current=!1,s.toast.success("Pro ist aktiv. Dein Listing wird jetzt erstellt."),e4())},[i,m]),(0,t.jsxs)("div",{className:"kil-scope relative isolate",children:[(0,t.jsx)(er,{}),(0,t.jsx)(E.ServiceNotice,{}),eL&&(0,t.jsxs)("div",{role:"status",className:"mb-5 rounded-xl border border-[var(--line-1)] bg-[var(--bg-1)] p-4 text-sm leading-relaxed",children:[(0,t.jsx)("p",{className:"font-medium",children:"Dein vorbereitetes Listing ist hier nicht gespeichert."}),(0,t.jsx)("p",{className:"mt-1 text-[var(--text-2)]",children:"Öffne den Browser, in dem du es erstellt hast, und melde dich dort an. Wenn die Registrierungsseite noch offen ist, wähle „E-Mail bestätigt? Hier weiter“. Der Entwurf bleibt dort bis zu 24 Stunden gespeichert, sofern die Browserdaten nicht gelöscht wurden."}),(0,t.jsx)("button",{type:"button",className:"mt-2 min-h-11 underline",onClick:()=>eM(!1),children:"Verstanden"})]}),(0,t.jsxs)("div",{className:"relative grid grid-cols-1 gap-8 lg:grid-cols-[440px_1fr]",children:[(0,t.jsx)("div",{className:"kil-input-panel",id:"kil-upload",children:(0,t.jsxs)("div",{className:"kil-input-sticky space-y-5",children:[(0,t.jsx)("div",{className:"hidden sm:block",children:(0,t.jsx)(en,{dragActive:M,hasFiles:c.length>0,onDragOver:e=>{e.preventDefault(),C(!0)},onDragLeave:()=>C(!1),onDrop:e=>{e.preventDefault(),C(!1),e.dataTransfer.files&&eQ(Array.from(e.dataTransfer.files))},onClick:()=>e.current?.click()})}),(0,t.jsxs)("div",{className:"sm:hidden space-y-3",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n.current?.click(),className:"flex w-full items-center justify-center gap-2 rounded-2xl px-4 py-4 text-[length:var(--fs-body)] font-semibold text-[var(--on-brand)] active:scale-[0.99] transition-transform",style:{background:"var(--brand)",boxShadow:"0 8px 24px -4px rgb(var(--brand-rgb)/0.4)"},children:[(0,t.jsx)(h.Camera,{size:18,strokeWidth:2,"aria-hidden":!0})," Foto aufnehmen"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e.current?.click(),className:"flex w-full items-center justify-center gap-2 rounded-2xl border border-[var(--border)] bg-[var(--fill-1)] px-4 py-4 text-[length:var(--fs-body)] font-medium text-[var(--foreground)] active:scale-[0.99] transition-transform",children:[(0,t.jsx)(p.Images,{size:18,strokeWidth:1.9,"aria-hidden":!0})," Aus Galerie wählen"]})]}),(0,t.jsx)("input",{ref:e,type:"file",accept:Q.join(","),multiple:!0,onChange:e0,className:"hidden"}),(0,t.jsx)("input",{ref:n,type:"file",accept:"image/*",capture:"environment",onChange:e0,className:"hidden"}),(0,t.jsxs)("div",{className:"-mt-2 space-y-1 text-center",children:[(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:["Beste Ergebnisse: Front · Rück · Tag · Detail",(0,t.jsx)("span",{className:"sm:hidden",children:" · bis 8 Fotos"})]}),(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] text-[var(--muted-foreground)]",children:[(0,t.jsx)(b.Lock,{size:12,className:"mr-1 inline-block -translate-y-
112px","aria-hidden":!0}),"Analyse-Fotos nicht dauerhaft gespeichert · DSGVO-konform"]})]}),c.length>0&&(0,t.jsx)(ea,{previews:c,onRemove:e=>{URL.revokeObjectURL(c[e]),l(t=>t.filter((t,r)=>r!==e)),u(t=>t.filter((t,r)=>r!==e))},onClear:e1,onAdd:()=>e.current?.click()}),(0,t.jsx)(eo,{open:F,onToggle:()=>O(e=>!e),hints:V,onChange:H}),(0,t.jsx)(ec,{disabled:0===i.length||m,loading:m,onClick:e4}),et&&(0,t.jsxs)("p",{className:"text-[length:var(--fs-caption)] text-center text-[var(--muted-foreground)]",children:[et.used_this_month,"/",et.limit," Listings diesen Monat genutzt"]})]})}),(0,t.jsxs)("div",{className:"min-w-0",id:"kil-result",children:[(0,t.jsx)(q.Provider,{value:{locked:Y,onLocked:()=>em("copy_gate"),onCopied:()=>{if(eO(N?.listing?.title??null),!N||Y)return void eq(null);let e=!!(i[0]||eD)&&!(0,W.nudgeAusgereizt)((0,W.nudgeKey)({from:"listing_postcopy",to:"studio"})),t=(0,W.aktuelleNudgeNummer)((0,W.nudgeKey)({from:"listing_postcopy",to:"studio"}))>0,r=!(0,W.nudgeAusgereizt)((0,W.nudgeKey)({from:"listing_postcopy",to:"inventar"}));eq(e&&!t?"studio":r?"inventar":e?"studio":null)}},children:(0,t.jsx)(a.AnimatePresence,{mode:"wait",children:N?(0,t.jsx)(ej,{data:N,initialItemId:eF,enginePricing:j,einschaetzung:k,photoFile:(Z??i)[0]??null,photoFiles:Z??i,departmentHint:eI,unknownBrand:v?.pricing?.brand_in_db===!1?v?.pricing?.detected_brand??null:null,studioNudge:"studio"===eJ?eG:null,anonSave:Y?(0,t.jsx)(eK,{result:N,onEmail:()=>em("save_bar_email")}):null,showInventarNudge:"inventar"===eJ,copied:eU&&!Y,onStudioClick:()=>{eB("listing_tips")}},"result"):m?(0,t.jsx)(eh,{sourceReady:!!v,recovering:eS,prep:eC},"loading"):v?(0,t.jsx)(eg,{intel:v,loadingListing:!1},"intel"):_?(0,t.jsx)(ex,{message:_,code:z,onRetry:e4},"error"):(0,t.jsx)(eu,{},"demo")})}),!N||m||Y||"karte"!==eZ?null:(0,t.jsx)(el,{anon:Y,onStart:()=>{(0,R.track)("naechstes_piece_click",{anon:Y}),X(e=>e??i),e1(),H({brand:"",category:"",size:""}),document.getElementById("kil-upload")?.scrollIntoView({behavior:"smooth",block:"start"}),e.current?.click()}})]})]}),(0,t.jsx)(e$,{open:es,onClose:()=>ed(!1),hasResult:!!N,result:N}),(0,t.jsx)(eV,{open:ep,onClose:()=>ef(!1),limit:et?.limit??5,trialEligible:eb,variant:ey.variant,monthValue:ey.value,monthCount:ey.count,photoCount:i.length,onCheckout:e3,tier:ey.tier,liteOffer:ey.liteOffer,perkTier:ey.perkTier})]})}],168447)}]);

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.