PageSourceSearch

https://markethacker.ru/assets/ozon-search-CfNeHMJ3.js

js markethacker.ru collected 2026-10-02 02:07:22 UTC 61,327 bytes, 2 lines download raw bytes

1import{k as E,h as b,G as K,v as ae,m as e,q as Y,X as pe,K as le,N as ye,T as ke,E as ue,y as J,w as Z,F as Se,B as Ce,D as Ae,A as $e,I as Me}from"./index-BhuuQD9y.js";import{M as z,a as Fe,l as Q,T as ne}from"./MhShell-Cbejmf_i.js";import{E as R}from"./eye-x9lTuTW0.js";import{S as L}from"./shopping-cart-CiOvX5MW.js";import{F as Ee,C as ee,G as ie,a as Oe,L as W,M as Be,A as Pe,S as ze,B as re,H as Re,b as _e,c as Ve,d as De}from"./AttentionAudit-Mc1F9Vo2.js";import{M as he}from"./mouse-pointer-click-DaHLf1_c.js";import{T as Te}from"./truck-CTLhi32O.js";import{P as se}from"./percent-wBt4aiQW.js";import{F as ge}from"./flame-Bik0_g14.js";import{W as be}from"./wallet-sO7ZU_x5.js";import{Z as oe}from"./zap-Dah-fsUc.js";import{P as Le}from"./package-oNVqdsaN.js";import{R as Ge}from"./ruler-D7n1uQZh.js";import{E as T}from"./eye-off-B2CqyrMi.js";import{S as U}from"./star-By9Bx_5C.js";import{A as Ie}from"./activity-DliOxpLL.js";import"./arrow-right-DfMwkIJk.js";import"./wrench-CeVsxVf-.js";import"./check-DVd4CU5_.js";import"./image-BuQU88l3.js";const Ue=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],He=E("award",Ue);const Ke=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],We=E("box",Ke);const Ze=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],qe=E("boxes",Ze);const Xe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],fe=E("circle-check",Xe);const Ye=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],je=E("credit-card",Ye);const Je=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],ce=E("gauge",Je);const Qe=[["path",{d:"m15 11-1 9",key:"5wnq3a"}],["path",{d:"m19 11-4-7",key:"cnml18"}],["path",{d:"M2 11h20",key:"3eubbj"}],["path",{d:"m3.5 11 1.6 7.4a2 2 0 0 0 2 1.6h9.8a2 2 0 0 0 2-1.6l1.7-7.4",key:"yiazzp"}],["path",{d:"M4.5 15.5h15",key:"13mye1"}],["path",{d:"m5 11 4-7",key:"116ra9"}],["path",{d:"m9 11 1 9",key:"1ojof7"}]],es=E("shopping-basket",Qe);const ss=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],ve=E("timer",ss),D="#005BFF",ts="#CCFF00",P="#2a1b4a",G="#15803d",u=(s,l=0)=>s.toLocaleString("ru-RU",{minimumFractionDigits:l,maximumFractionDigits:l}),A=(s,l=2)=>`${(s*100).toFixed(l)}%`;function as(s){let l=0;for(let a=0;a<s.length;a++)l=(l*31+s.charCodeAt(a))%1e5;return l}function ls(s){const l=as(s.sku),a=B=>l*(B*7+13)%1e3/1e3,i=28,n=Math.round(500+a(1)*3500),c=s.priceOzon||900,t=n*c,o=Math.round(n*(900+a(2)*1600)),p=Math.round(o*(.06+a(3)*.12)),d=Math.round(p*(.22+a(4)*.45)),f=.74+a(5)*.24,w=Math.round(2+a(6)*20),j=Math.round(20+a(7)*12e3),h=w>6?Math.round(t*(.05+a(8)*.5)):0,N=Math.round(a(9)*100)/100,v=Math.round(a(10)*55)/100,g=s.isAd?Math.round((.02+a(11)*.09)*1e3)/1e3:Math.round(a(11)*.02*1e3)/1e3,C=Math.round(a(12)*7),y=s.isAd?4+Math.round(a(13)*3):Math.round(a(13)*3),k=Math.round((.4+a(14)*40)*10)/10,M=Math.round(60+a(15)*1200),x=a(16)>.35?"FBO":"FBS",r=Math.round(c*(.35+a(17)*.5)),m=Math.round((a(18)*40-12)*100)/100,$=p?Math.round(n/f/p*.9*1e4)/1e4:0,S=d?Math.round(n/f/d*1e4)/1e4:0,O=o?Math.round(n/o*1e4)/1e4:0;return{days:i,units:n,avgPrice:c,minPrice:r,gmv:t,dynamics:m,impressions:o,searchViews:p,pdpViews:d,buyoutRate:f,daysOutOfStock:w,stockEnd:j,lostSales:h,promoShare:N,promoDiscount:v,adShare:g,daysPromo:C,daysAds:y,volume:k,cardAge:M,scheme:x,cartFromSearch:$,cartFromPdp:S,imprToOrder:O,dailyGmv:Math.round(t/i),dailyUnits:Math.round(n/i)}}function ns(s){const l="Продажи и цена",a="Трафик и конверсия",i="Остатки и упущенное",n="Реклама и акции",c="Карточка";return[{id:"gmv",label:"Оборот",full:"Заказано на сумму, ₽",value:`${u(s.gmv)} ₽`,icon:ee,group:l},{id:"dyn",label:"Динамика",full:"Динамика оборота, %",value:`${s.dynamics>0?"+":""}${s.dynamics}%`,icon:ye,group:l}
1,{id:"units",label:"Заказы",full:"Заказано, штуки",value:`${u(s.units)} шт`,icon:L,group:l},{id:"avgp",label:"Ср. цена",full:"Средняя цена, ₽",value:`${u(s.avgPrice)} ₽`,icon:ke,group:l},{id:"minp",label:"Мин. цена",full:"Минимальная цена, ₽",value:`${u(s.minPrice)} ₽`,icon:ue,group:l},{id:"buy",label:"Выкуп",full:"Доля выкупа, %",value:A(s.buyoutRate,1),icon:fe,group:l},{id:"dgmv",label:"₽/день",full:"Среднесуточные продажи, ₽",value:`${u(s.dailyGmv)} ₽`,icon:ce,group:l},{id:"dunits",label:"шт/день",full:"Среднесуточные продажи, штуки",value:`${u(s.dailyUnits)} шт`,icon:ce,group:l},{id:"imp",label:"Показы",full:"Показы всего",value:u(s.impressions),icon:R,group:a},{id:"sv",label:"Просм. поиск",full:"Просмотры в поиске и каталоге",value:u(s.searchViews),icon:K,group:a},{id:"pv",label:"Просм. карт.",full:"Просмотры карточки",value:u(s.pdpViews),icon:ae,group:a},{id:"i2o",label:"Показ→заказ",full:"Конверсия из показа в заказ, %",value:A(s.imprToOrder,2),icon:he,group:a},{id:"c2s",label:"Корзина/поиск",full:"В корзину из поиска и каталога, %",value:A(s.cartFromSearch,2),icon:L,group:a},{id:"c2p",label:"Корзина/карт.",full:"В корзину из карточки, %",value:A(s.cartFromPdp,2),icon:L,group:a},{id:"lost",label:"Упущено",full:"Упущенные продажи, ₽",value:`${u(s.lostSales)} ₽`,icon:le,group:i},{id:"oos",label:"Без остатка",full:"Дней без остатка",value:`${s.daysOutOfStock} из ${s.days}`,icon:ve,group:i},{id:"stock",label:"Остаток",full:"Остаток на конец периода, штуки",value:`${u(s.stockEnd)} шт`,icon:qe,group:i},{id:"scheme",label:"Схема",full:"Схема работы",value:s.scheme,icon:Te,group:i},{id:"pdisc",label:"Скидка акций",full:"Скидка за счет акций",value:A(s.promoDiscount,0),icon:se,group:n},{id:"pshare",label:"Доля акций",full:"Доля суммы заказов по акциям, %",value:A(s.promoShare,0),icon:ge,group:n},{id:"dpromo",label:"Дней в акциях",full:"Дней в акциях",value:`${s.daysPromo} из 7`,icon:J,group:n},{id:"dads",label:"Дней с РК",full:"Дней с продвижением",value:`${s.daysAds} из 7`,icon:z,group:n},{id:"adshare",label:"ДРР",full:"Доля рекламных расходов, %",value:A(s.adShare,1),icon:be,group:n},{id:"vol",label:"Объём",full:"Объем товара, л",value:`${s.volume} л`,icon:We,group:c},{id:"created",label:"Создана",full:"Дата создания карточки товара",value:new Date(Date.now()-s.cardAge*864e5).toLocaleDateString("ru-RU"),icon:J,group:c}]}function rs(s){const l="Продажи и цена",a="Трафик и конверсия",i="Остатки и упущенное",n="Реклама и акции",c="Карточка",t=s.impressions?s.pdpViews/s.impressions:0,o=s.impressions?s.searchViews/s.impressions:0,p=s.impressions?s.units/s.impressions*1e3:0,d=s.impressions?s.gmv/s.impressions*1e3:0,f=s.pdpViews?s.units/s.pdpViews:0,w=s.pdpViews?s.gmv/s.pdpViews:0,j=s.days-s.daysOutOfStock,h=j?s.units/j:0,N=j?s.gmv/j:0,v=h?s.stockEnd/h:0,g=s.gmv+s.lostSales,C=g?s.lostSales/g:0,y=s.gmv*s.adShare,k=s.gmv-y,M=s.gmv*s.promoShare,x=s.volume?s.gmv/s.volume:0;return[{id:"k_sv",label:"Sales Velocity",full:"Sales Velocity, шт./день",value:`${u(h,1)} шт`,icon:oe,group:l,formula:"Заказано, шт / дни продаж при наличии"},{id:"k_rv",label:"Revenue Velocity",full:"Revenue Velocity, ₽/день",value:`${u(N)} ₽`,icon:oe,group:l,formula:"Оборот / дни продаж при наличии"},{id:"k_r1k",label:"Revenue/1K",full:"Revenue per 1K Impressions, ₽",value:`${u(d)} ₽`,icon:ee,group:l,formula:"Оборот / показы × 1000"},{id:"k_vr",label:"View Rate",full:"View Rate (доля просмотров карточки)",value:A(t,2),icon:R,group:a,formula:"Просмотры карточки / показы"},{id:"k_svr",label:"Search Vis.",full:"Search Visibility Rate",value:A(o,2),icon:K,group:a,formula:"Просмотры в поиске / показы"},{id:"k_o1k",label:"Orders/1K",full:"Orders per 1K Impressions",value:u(p,2),icon:he,group:a,formula:"Заказ
1ы / показы × 1000"},{id:"k_pdp",label:"PDP CR",full:"PDP Conversion Rate",value:A(f,2),icon:se,group:a,formula:"Заказы / просмотры карточки"},{id:"k_rpv",label:"₽/просмотр",full:"Revenue per PDP View, ₽",value:`${u(w)} ₽`,icon:ee,group:a,formula:"Оборот / просмотры карточки"},{id:"k_isd",label:"Дней продаж",full:"In-Stock Selling Days",value:`${j} дн`,icon:ve,group:i,formula:"Дни периода − дни без остатка"},{id:"k_dos",label:"DOS",full:"Days of Supply (запас в днях)",value:`${u(v,1)} дн`,icon:Le,group:i,formula:"Остаток / Sales Velocity"},{id:"k_pot",label:"Potential GMV",full:"Potential GMV, ₽",value:`${u(g)} ₽`,icon:ue,group:i,formula:"Оборот + упущенные продажи"},{id:"k_lost",label:"Lost Sales Rate",full:"Lost Sales Rate",value:A(C,1),icon:le,group:i,formula:"Упущенные / Potential GMV"},{id:"k_ad",label:"Расход на РК",full:"Estimated Ad Spend, ₽",value:`${u(y)} ₽`,icon:z,group:n,formula:"Оборот × ДРР"},{id:"k_net",label:"После РК",full:"Net Revenue after Ads, ₽",value:`${u(k)} ₽`,icon:be,group:n,formula:"Оборот − расход на РК"},{id:"k_pgmv",label:"Promo GMV",full:"Promo GMV, ₽",value:`${u(M)} ₽`,icon:ge,group:n,formula:"Оборот × доля заказов по акциям"},{id:"k_pdep",label:"Promo Dep.",full:"Promo Dependency Rate",value:A(s.promoShare,0),icon:se,group:n,formula:"Promo GMV / оборот"},{id:"k_rl",label:"₽ на литр",full:"Revenue per Liter, ₽/л",value:`${u(x)} ₽`,icon:Ge,group:c,formula:"Оборот / объём товара"},{id:"k_age",label:"Возраст",full:"Card Age, дней",value:`${u(s.cardAge)} дн`,icon:J,group:c,formula:"Сегодня − дата создания карточки"}]}const is=["Продажи и цена","Трафик и конверсия","Остатки и упущенное","Реклама и акции","Карточка"];function de({t:s,kind:l,on:a}){const i=s.icon,n=l==="ozon"?D:G,c=l==="ozon"?"#eef4ff":"#ecfdf3";return e.jsxs("div",{title:s.formula?`${s.full}
2Формула: ${s.formula}`:s.full,className:`rounded-lg border px-2 py-1.5 transition-all duration-300 ${a?"opacity-100 translate-y-0":"opacity-0 translate-y-1"}`,style:{background:c,borderColor:`${n}33`},children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{className:"h-3 w-3 shrink-0",style:{color:n}}),e.jsx("span",{className:"truncate text-[9px] uppercase tracking-wide",style:{color:`${P}99`},children:s.label})]}),e.jsx("div",{className:"mt-0.5 truncate text-[12px] font-bold tabular-nums",style:{color:P},children:s.value})]})}function os({card:s,onClose:l}){const[a,i]=b.useState(0),[n,c]=b.useState(0),t=b.useMemo(()=>ls(s),[s]),o=b.useMemo(()=>ns(t),[t]),p=b.useMemo(()=>rs(t),[t]),d=o.length+p.length;b.useEffect(()=>{const r=m=>m.key==="Escape"&&l();return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[l]),b.useEffect(()=>{if(n>=d)return;const r=setTimeout(()=>c(m=>m+1),n<o.length?45:70);return()=>clearTimeout(r)},[n,d,o.length]),b.useEffect(()=>{if(n<d){n>=o.length&&i($=>$<1?1:$);return}const r=setTimeout(()=>i($=>$<2?2:$),250),m=setTimeout(()=>i($=>$<3?3:$),1100);return()=>{clearTimeout(r),clearTimeout(m)}},[n,d,o.length]);const f=()=>{c(d),i(3)},w=Math.round(Math.min(n,d)/d*100),j=t.days-t.daysOutOfStock,h=[{label:"Показы",v:t.impressions,icon:R},{label:"Просмотры в поиске",v:t.searchViews,icon:K},{label:"Просмотры карточки",v:t.pdpViews,icon:ae},{label:"В корзину",v:Math.max(1,Math.round(t.units/t.buyoutRate)),icon:L},{label:"Заказы",v:t.units,icon:fe}],N=h.slice(1).map((r,m)=>({...r,cr:h[m].v?r.v/h[m].v:0,from:h[m].label})),v=N.reduce((r,m)=>m.cr<r.cr?m:r,N[0]),g=[];g.push(`Узкое место воронки — переход «${v.from} → ${v.label}»: ${A(v.cr,2)}.`),t.promoShare>=.6&&g.push(`Зависимость от акций ${A(t.promoShare,0)} оборота — маржа держится на скидке.`),t.daysOutOfStock>6&&g.push(`${t.daysOutOfStock} из ${t.days} дней без остатка, упущено ${u(t.lostSales)} ₽.`);const C=j?t.units/j:0,y=C?t.stockEnd/C:0;
2y<14&&g.push(`Запас ${u(y,1)} дн. при скорости ${u(C,1)} шт/день — риск нового out-of-stock.`),t.buyoutRate<.85&&g.push(`Доля выкупа ${A(t.buyoutRate,1)} — ожидания от карточки расходятся с товаром.`),t.adShare>.06&&g.push(`ДРР ${A(t.adShare,1)} — реклама съедает ${u(t.gmv*t.adShare)} ₽ оборота.`);const k=[];t.daysOutOfStock>6&&k.push({p:"P0",t:`Закрыть дефицит: поставка на ${t.scheme==="FBO"?"склад FBO":"FBS-склад"} под скорость ${u(C,1)} шт/день (цель DOS ≥ 30 дн.).`}),v.label==="Просмотры карточки"?k.push({p:"P0",t:"Переработать главное фото и первый экран: показ есть, в карточку не заходят."}):v.label==="В корзину"?k.push({p:"P0",t:"Усилить галерею и блок характеристик — в карточку заходят, но не кладут в корзину."}):k.push({p:"P0",t:"Проверить релевантность запросов и позиции: показы не конвертируются в просмотры."}),t.promoShare>=.6&&k.push({p:"P1",t:"Снять зависимость от акций: тест цены −5% без промо на 7 дней и сравнить Revenue/1K."}),t.buyoutRate<.85&&k.push({p:"P1",t:"Добавить в карточку размеры/масштаб и реальные фото, чтобы снизить возвраты."}),k.push({p:"P1",t:`Держать Revenue per PDP View выше ${u(t.pdpViews?t.gmv/t.pdpViews:0)} ₽ как контрольную метрику после правок.`});const M=t.lostSales>t.gmv*.2?"Основные потери — не в конверсии, а в наличии товара.":v.cr<.1?"Трафик есть, но карточка теряет его на входе — проблема в контенте.":"Воронка ровная, рост даёт масштабирование трафика и запас на складе.",x=r=>{const m=o.filter(S=>S.group===r),$=p.filter(S=>S.group===r);return!m.length&&!$.length?null:e.jsxs("div",{className:"rounded-xl border border-[#e2d8f5] bg-white p-2.5",children:[e.jsx("div",{className:"mb-1.5 text-[10px] font-bold uppercase tracking-wider text-[#6b5a8a]",children:r}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5 sm:grid-cols-3 lg:grid-cols-5",children:[m.map(S=>e.jsx(de,{t:S,kind:"ozon",on:n>o.indexOf(S)},S.id)),$.map(S=>e.jsx(de,{t:S,kind:"calc",on:n>o.length+p.indexOf(S)},S.id))]})]},r)};return e.jsx("div",{className:"fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto bg-black/60 p-3 backdrop-blur-sm",onClick:l,children:e.jsxs("div",{className:"mt-6 w-full max-w-[1080px] overflow-hidden rounded-2xl bg-[#f6f5fb] shadow-2xl",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3",style:{background:P},children:[e.jsx("span",{className:"mt-0.5 grid h-8 w-8 place-items-center rounded-lg",style:{background:ts},children:e.jsx(Y,{className:"h-4 w-4",style:{color:P}})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"truncate text-sm font-bold text-white",children:"AI-анализ конверсий"}),e.jsx("span",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-[10px] text-white/80",children:s.sku})]}),e.jsxs("p",{className:"truncate text-[11px] text-white/60",children:[s.title," · ",s.brand," · период ",t.days," дн."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a<3&&e.jsxs("button",{onClick:f,className:"flex items-center gap-1 rounded-lg bg-white/10 px-2 py-1.5 text-[11px] font-semibold text-white hover:bg-white/20",children:[e.jsx(Ee,{className:"h-3 w-3"})," Пропустить анимацию"]}),e.jsx("button",{onClick:l,className:"grid h-7 w-7 place-items-center rounded-lg bg-white/10 text-white hover:bg-white/20",children:e.jsx(pe,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"border-b border-[#e2d8f5] bg-white px-4 py-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px]",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:D}})," данные Ozon"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:G}})," рассчитано MarketHacker"]}
2),e.jsxs("span",{className:"ml-auto font-semibold tabular-nums text-[#6b5a8a]",children:[a===0?"Считываем данные Ozon":a===1?"Считаем KPI":a===2?"Строим воронку":"Готово"," · ",w,"%"]})]}),e.jsx("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-[#eee7fb]",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-200",style:{width:`${w}%`,background:`linear-gradient(90deg, ${D}, ${G})`}})})]}),e.jsxs("div",{className:"max-h-[72vh] space-y-2.5 overflow-y-auto p-3",children:[is.map(x),a>=2&&e.jsxs("div",{className:"rounded-xl border border-[#e2d8f5] bg-white p-3",children:[e.jsx("div",{className:"mb-2 text-[10px] font-bold uppercase tracking-wider text-[#6b5a8a]",children:"Воронка конверсии"}),e.jsx("div",{className:"flex flex-col gap-1.5",children:h.map((r,m)=>{const $=r.icon,S=r.v/h[0].v*100,O=m>0?N[m-1]:null,B=O&&O.label===v.label;return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex w-[170px] shrink-0 items-center gap-1.5 text-[11px] text-[#2a1b4a]",children:[e.jsx($,{className:"h-3.5 w-3.5",style:{color:D}})," ",r.label]}),e.jsxs("div",{className:"relative h-6 flex-1 overflow-hidden rounded bg-[#f2eefc]",children:[e.jsx("div",{className:"h-full rounded transition-all duration-700",style:{width:`${Math.max(S,1.5)}%`,background:B?"#f43f5e":D,opacity:B?.85:.75}}),e.jsx("span",{className:"absolute inset-y-0 flex items-center text-[11px] font-bold tabular-nums",style:{left:S>14?8:`calc(${Math.max(S,1.5)}% + 6px)`,color:S>
214?"#ffffff":P},children:u(r.v)})]}),e.jsx("div",{className:"w-[110px] shrink-0 text-right text-[11px] font-semibold tabular-nums",children:O?e.jsxs("span",{style:{color:B?"#e11d48":G},children:[A(O.cr,2),B?" ← узкое":""]}):e.jsx("span",{className:"text-[#9c8cbc]",children:"—"})})]},r.label)})})]}),a>=3&&e.jsxs("div",{className:"rounded-xl border p-3",style:{borderColor:`${P}22`,background:"linear-gradient(135deg,#ffffff,#f7f3ff)"},children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{className:"h-4 w-4",style:{color:"#8A2BE2"}}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-[#6b5a8a]",children:"Выводы ИИ"})]}),e.jsx("p",{className:"mt-1.5 text-sm font-semibold text-[#2a1b4a]",children:M}),e.jsxs("div",{className:"mt-2.5 grid gap-2.5 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-[10px] font-bold uppercase tracking-wider text-[#6b5a8a]",children:"Что нашли"}),e.jsx("ul",{className:"space-y-1",children:g.map(r=>e.jsxs("li",{className:"flex gap-1.5 text-[12px] leading-snug text-[#2a1b4a]",children:[e.jsx(le,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"})," ",r]},r))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-[10px] font-bold uppercase tracking-wider text-[#6b5a8a]",children:"Что делать"}),e.jsx("ul",{className:"space-y-1",children:k.map(r=>e.jsxs("li",{className:"flex gap-1.5 text-[12px] leading-snug text-[#2a1b4a]",children:[e.jsx("span",{className:`mt-0.5 shrink-0 rounded px-1 text-[9px] font-bold ${r.p==="P0"?"bg-rose-100 text-rose-700":"bg-[#f3eeff] text-[#8A2BE2]"}`,children:r.p}),r.t]},r.t))})]})]})]})]})]})})}function Ls(){return e.jsxs(e.Fragment,{children:[e.jsx(Fe,{}),e.jsx(us,{})]})}const te=[{pos:1,title:"Родиола розовая экстракт 60 капсул",brand:"GLS",seller:"GLS Pharma",sku:"1419928442",warehouse:"Хоругвино",delivery:"Завтра",priceOzon:476,priceOld:1270,rating:4.9,reviews:37805,isAd:!1,bust:0,category:"БАДы",action:"Распродажа",badges:["Оригинал","Бестселлер"],hue:"#5B5BD6",tag:"rival"},{pos:2,title:"L-Arginine Pro Premium 120 капсул",brand:"Ultrabalance",seller:"Ultrabalance",sku:"1284773902",warehouse:"Тверь",delivery:"7 июня",priceOzon:1826,priceOld:1826,rating:4.9,reviews:7612,isAd:!0,bust:12,category:"Спортпит",action:"",badges:["Оригинал"],hue:"#2a2a2a"},{pos:3,title:"Омега-3 1000мг VitaMeal 180 капсул",brand:"VitaMeal",seller:"VitaMeal",sku:"0827384721",warehouse:"Софьино",delivery:"Завтра",priceOzon:613,priceOld:2100,rating:4.9,reviews:227064,isAd:!1,bust:0,category:"БАДы",action:"Распродажа",badges:["Оригинал","Хит продаж"],hue:"#FFD166"},{pos:4,title:"Комплекс витаминов А–цинк 60 капсул",brand:"Healthis",seller:"Healthcare Solutions",sku:"1019283746",warehouse:"Хоругвино",delivery:"Завтра",priceOzon:402,priceOld:725,rating:4.9,reviews:1011890,isAd:!0,bust:22,category:"БАДы",action:"Скидка дня",badges:["Оригинал","Топ-рейтинг"],hue:"#7FDBDA",tag:"own"},{pos:5,title:"Магний B6 хелат 90 таблеток",brand:"MIXTERRA",seller:"Market Team",sku:"0918273645",warehouse:"Рязань",delivery:"2 дня",priceOzon:359,priceOld:715,rating:4.8,reviews:2328,isAd:!1,bust:0,category:"БАДы",action:"",badges:["Новинка"],hue:"#B0BEC5"}],F=Array.from({length:32}).map((s,l)=>{const a=te[l%te.length];return{...a,pos:l+1,sku:String(Number(a.sku)+l*17),isAd:l%4===0,bust:l%4===0?6+l%30:0,tag:l===3?"own":l===0?"rival":null}}),Ne=[38,45,49,52,60,65,71,70,78,84,91,98],cs=["июн '25","июл '25","авг '25","сен '25","окт '25","ноя '25","дек '25","янв '26","фев '26","мар '26","апр '26","май '26"],ds=[4120,4780,5290,5610,6480,7020,7710,7580,8460,9050,9880,10620],I="#005BFF",H="#F91155",we="#8A2BE2",xs="#CCFF00";function ms({data:s,color:l=we,width:a=88,height:i=26}){const n=Math.min(...s),c=Math.max(...s),t=a/(s.length-1),o=s.map((d,f)=>`${f*t},${i-(d-n)/(c-n||1)*(i-4)-2}`).join(" "),p=`oz-sg-${l.replace("#","")}`;return e.jsxs("svg",{width:a,height:i,className:"overflow-visible",children:[e.jsx("polyline",{fill:"none",stroke:l,strokeWidth:1.8,points:o}),e.jsx("polyline",{fill:`url(#${p})`,stroke:"none",points:`0,${i} ${o} ${a},${i}`,opacity:.18}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:p,x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:l,stopOpacity:.6}),e.jsx("stop",{offset:"100%",stopColor:l,stopOpacity:0})]})})]})}function ps({data:s,labels:l,values:a,expanded:i,onToggle:n,color:c=we}
2){const[t,o]=b.useState(null),p=i?180:64,d=8,f=8,w=8,j=i?22:14;return e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:n,title:i?"Свернуть":"Раскрыть",className:"absolute right-1 top-1 z-10 grid h-6 w-6 place-items-center rounded-md bg-white/80 text-[#8A2BE2] ring-1 ring-[#8A2BE2]/20 hover:bg-white",children:i?e.jsx(Ve,{className:"h-3 w-3"}):e.jsx(De,{className:"h-3 w-3"})}),e.jsx("div",{className:"w-full",style:{height:p},children:e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",width:"100%",height:"100%",className:"block touch-none",onMouseLeave:()=>o(null),onMouseMove:h=>{const N=h.currentTarget.getBoundingClientRect(),v=(h.clientX-N.left)/N.width*100,C=(100-d-f)/(s.length-1),y=Math.max(0,Math.min(s.length-1,Math.round((v-d)/C)));o(y)},children:(()=>{const h=Math.min(...s),N=Math.max(...s),v=100-d-f,g=100-w-j,C=v/(s.length-1),y=s.map((r,m)=>({x:d+m*C,y:w+(1-(r-h)/(N-h||1))*g})),k=y.map(r=>`${r.x},${r.y}`).join(" "),M=`${d},${100-j} ${k} ${100-f},${100-j}`,x=`oz-freq-grad-${c.replace("#","")}`;return e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:x,x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:c,stopOpacity:.45}),e.jsx("stop",{offset:"100%",stopColor:c,stopOpacity:0})]})}),i&&e.jsx("g",{stroke:"#2a1b4a",strokeOpacity:.06,strokeWidth:.15,children:[0,.25,.5,.75,1].map(r=>e.jsx("line",{x1:d,x2:100-f,y1:w+r*g,y2:w+r*g,vectorEffect:"non-scaling-stroke"},r))}),e.jsx("polygon",{points:M,fill:`url(#${x})`}),e.jsx("polyline",{fill:"none",stroke:c,strokeWidth:1.6,vectorEffect:"non-scaling-stroke",points:k}),y.map((r,m)=>e.jsx("circle",{cx:r.x,cy:r.y,r:t===m?1.4:.6,fill:t===m?xs:c,stroke:c,strokeWidth:t===m?.5:0,vectorEffect:"non-scaling-stroke"},m)),t!==null&&e.jsx("line",{x1:y[t].x,x2:y[t].x,y1:w,y2:100-j,stroke:c,strokeOpacity:.35,strokeDasharray:"1 1",strokeWidth:.4,vectorEffect:"non-scaling-stroke"})]})})()})}),e.jsx("div",{className:"mt-1 flex justify-between text-[9px] text-gray-400",children:i?l.map((h,N)=>e.jsx("span",{className:t===N?"font-semibold text-[#8A2BE2]":"",children:h.split(" ")[0]},N)):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:l[0]}),e.jsx("span",{children:l[Math.floor(l.length/3)]}),e.jsx("span",{children:l[Math.floor(2*l.length/3)]}),e.jsx("span",{children:l[l.length-1]})]})}),t!==null&&e.jsxs("div",{className:"pointer-events-none absolute z-20 -translate-x-1/2 -translate-y-full rounded-md bg-[#2a1b4a] px-2 py-1 text-[10px] font-semibold text-white shadow-lg",style:{left:`${d+t*(100-d-f)/(s.length-1)}%`,top:4},children:[e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-[#CCFF00]/90",children:l[t]}),e.jsxs("div",{className:"tabular-nums",children:[a[t].toLocaleString("ru-RU")," ",e.jsx("span",{className:"text-white/60",children:"показов"})]})]})]})}function xe({children:s,tone:l="lime",className:a=""}){const i={lime:"bg-[#CCFF00] text-[#2a1b4a]",violet:"bg-[#8A2BE2] text-white",slate:"bg-[#2a1b4a] text-[#CCFF00]",ozon:"bg-[#005BFF] text-white"};return e.jsx("span",{className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px] font-semibold tracking-tight ${i[l]} ${a}`,children:s})}function us(){const[s,l]=b.useState("grid5"),[a,i]=b.useState("all"),[n,c]=b.useState("web"),[t,o]=b.useState(1),[p,d]=b.useState(!0),[f,w]=b.useState(!0),[j,h]=b.useState(!0),[N,v]=b.useState(!0),[g,C]=b.useState(()=>{const x={};return F.forEach(r=>x[r.sku]=r.tag??null),x}),y=F.filter(x=>x.isAd).length,k=F.length-y,M=b.useMemo(()=>a==="ads"?F.filter(x=>x.isAd):a==="organic"?F.filter(x=>!x.isAd):F,[a]);return e.jsxs("div",{className:"min-h-screen bg-[#f4f4f8] text-[#2a1b4a]",children:[e.jsxs("header",{className:"bg-white",children:[e.jsxs("div",{className:"mx-auto flex max-w-[1480px] items-center gap-3 px-6 py-2.5",children:[e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"text-[26px] font-extrabold leading-none",style:{color:I,letterSpacing:"-0.02em"},children:"ozon"})}),e.jsxs("button",{className:"flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold text-white",style:{background:I},children:[e.jsx(ie,{className:"h-4 w-4"})," Каталог"]}),e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("button",{className:"absolute left-2 top-1/2 flex -translate-y-1/2 items-center gap-1 rounded-md px-2 py-1 text-xs text-gray-500 hover:bg-gray-50",children:["Везде ",e.jsx(Z,{className:"h-3 w-3"})]}),e.jsx("input",{defaultValue:"бад",className:"w-full rounded-l-lg border border-r-0 border-black/10 bg-white py-2.5 pl-20 pr-9 text-sm outline-none focus:border-[#005BFF]/40"}),e.jsx("button",{className:"absolute right-9 top-1/2 -translate-y-1/2 text-gray-300 hover:text-gray-500",children:e.jsx(pe,{className:"h-4 w-4"})})]}),e.jsx("button",{className:"rounded-r-lg px-4 py-2.5 text-white -ml-3",style:{background:I},children:e.jsx(K,{className:"h-4 w-4"})}),e.jsxs("div",{className:"hidden gap-5 text-[11px] text-gray-600 md:flex",children:[e.jsx("span",{className:"text-center",children:"Профиль"}
2),e.jsx("span",{className:"text-center",children:"Заказы"}),e.jsx("span",{className:"text-center",children:"Избранное"}),e.jsx("span",{className:"text-center",children:"Корзина"})]})]}),e.jsxs("div",{className:"mx-auto flex max-w-[1480px] items-center gap-2 overflow-x-auto px-6 pb-3 text-sm",children:[e.jsxs("button",{className:"flex items-center gap-1 whitespace-nowrap rounded-full bg-white px-3 py-1.5 font-medium ring-1 ring-black/10 text-gray-700",children:["Популярные ",e.jsx(Z,{className:"h-3.5 w-3.5 text-gray-400"})]}),["Все фильтры","Цена","Бренд","Доставка","Категория","Рейтинг","Акции"].map(x=>e.jsxs("button",{className:"flex items-center gap-1 whitespace-nowrap rounded-full border border-black/10 bg-white px-3 py-1.5 text-gray-700",children:[x," ",e.jsx(Z,{className:"h-3.5 w-3.5 text-gray-400"})]},x)),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx("button",{onClick:()=>l("grid4"),className:`grid h-8 w-8 place-items-center rounded ${s==="grid4"?"bg-[#005BFF] text-white":"text-gray-400"}`,children:e.jsx(ie,{className:"h-4 w-4"})}),e.jsx("button",{onClick:()=>l("grid5"),className:`grid h-8 w-8 place-items-center rounded ${s==="grid5"?"bg-[#005BFF] text-white":"text-gray-400"}`,children:e.jsx(Oe,{className:"h-4 w-4"})})]})]})]}),e.jsx(Se,{}),e.jsxs("main",{className:"mx-auto max-w-[1480px] px-6 py-3 space-y-3",children:[e.jsx(hs,{showSegments:p,setShowSegments:d,device:n,setDevice:c,page:t,setPage:o,sumAds:y,sumOrg:k,setTab:i}),p?e.jsx(bs,{onHide:()=>d(!1),setTab:i}):e.jsx(X,{label:"Аналитика по сегментам",onShow:()=>d(!0)}),j?e.jsxs("section",{className:"overflow-hidden rounded-2xl border border-black/5 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[#8A2BE2]/15 bg-gradient-to-r from-[#faf8ff] to-white px-4 py-2.5 text-[#2a1b4a]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:Q,alt:"MarketHacker",className:"h-6 w-6"}),e.jsx("h3",{className:"text-sm font-semibold tracking-tight",children:"Выдача 1–100 · подробная таблица"}),e.jsx("span",{className:"rounded-md bg-[#8A2BE2]/10 px-2 py-0.5 text-[10px] text-[#8A2BE2]",children:"кэш · 2 мин назад"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("button",{onClick:()=>w(x=>!x),className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2.5 py-1.5 hover:bg-[#2a1b4a]/10",children:[f?e.jsx(T,{className:"h-3.5 w-3.5"}):e.jsx(R,{className:"h-3.5 w-3.5"})," Схема 1–100"]}),e.jsxs("button",{className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2.5 py-1.5 hover:bg-[#2a1b4a]/10",children:[e.jsx(Ce,{className:"h-3.5 w-3.5"})," Колонки"]}),e.jsxs("button",{className:"flex items-center gap-1 rounded-md bg-[#CCFF00] px-2.5 py-1.5 font-semibold text-[#2a1b4a] ring-1 ring-[#8A2BE2]/20 hover:brightness-105",children:[e.jsx(Ae,{className:"h-3.5 w-3.5"})," Excel"]}),e.jsx("button",{onClick:()=>h(!1),title:"Скрыть блок",className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1.5 text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:e.jsx(T,{className:"h-3.5 w-3.5"})})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-b border-black/5 bg-white px-5 py-2.5",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[#f3f3f6] p-1 text-sm",children:[["all","Общая выдача",F.length],["ads","Реклама",y],["organic","Органика",k]].map(([x,r,m])=>e.jsxs("button",{onClick:()=>i(x),className:`flex items-center gap-2 rounded-md px-3 py-1.5 transition ${a===x?"bg-[#8A2BE2] text-white shadow-sm":"text-gray-600 hover:bg-white"}`,children:[r,e.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${a===x?"bg-white/25 text-white":"bg-black/5 text-gray-500"}`,children:m})]},x))}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-[#CCFF00]"})," Свои товары"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-[#8A2BE2]"})," Конкуренты"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-fuchsia-500"})," Реклама"]})]})]}),e.jsxs("div",{className:"flex",children:[f&&e.jsx(js,{cards:F,tags:g}),e.jsx("div",{className:"flex-1 overflow-x-auto",children:e.jsx(vs,{rows:M,tags:g,setTag:(x,r)=>C(m=>({...m,[x]:r}))})})]})]}):e.jsx(X,{label:"Выдача 1–100 · подробная таблица",onShow:()=>h(!0)}),N?e.jsxs("section",{className:"overflow-hidden rounded-2xl border border-[#8A2BE2]/15 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[#8A2BE2]/15 bg-gradient-to-r from-[#faf8ff] to-white px-4 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:Q,alt:"MH",className:"h-5 w-5"}),e.jsx("h3",{className:"text-sm font-semibold tracking-tight text-[#2a1b4a]",children:"Карточки топ-выдачи Ozon · MH-оверлей"}),e.jsx("span",{className:"rounded-md bg-[#8A2BE2]/10 px-2 py-0.5 text-[10px] text-[#8A2BE2]",children:s==="grid5"?"5 в ряд":"4 в ряд"})]}),e.jsxs("button",{onClick:()=>v(!1),title:"Скрыть блок",className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1.5 text-xs text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:[e.jsx(T,{className:"h-3.5 w-3.5"})," Скрыть"]})]}),e.jsx("div",{className:`grid gap-3 p-3 ${s==="grid5"?"grid-cols-5":"grid-cols-4"}`,children:te.slice(0,s==="grid5"?5:4).map(x=>e.jsx(fs,{c:x,tag:g[x.sku]??null,setTag:r=>C(m=>({...m,[x.sku]:r}))},x.sku))})]}):e.jsx(X,{label:"Карточки топ-выдачи Ozon",onShow:()=>v(!0)}),e.jsx("p",{className:"pt-2 text-center text-xs text-gray-400",children:"Все данные — демонстрационные. UI MarketHacker рендерится поверх реальной выдачи Ozon через расширение для браузера."})]})]})}function hs(s){const l=s.sumAds+s.sumOrg,a=Math.round(s.sumOrg/l*100),i=100-a;return e.jsx("div",{className:"overflow-hidden rounded-2xl border border-[#8A2BE2]/15 bg-white text-[#2a1b4a] shadow-[0_8px_28px_-14px_rgba(138,43,226,0.25)]",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2 border-r border-[#2a1b4a]/10 pr-3",children:[e.jsx("img",{src:Q,alt:"MH",className:"h-6 w-6"}),e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8A2BE2]",children:"MarketHacker · OZON"})]}),e.jsxs("button",{onClick:()=>s.setShowSegments(!s.showSegments),className:"flex items-center gap-2 rounded-lg bg-[#f6f5fb] px-2.5 py-1.5 text-left hover:bg-[#efeaff]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-[#2a1b4a]/50",children:"Частотность / мес"}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-sm font-bold tabular-nums",children:"10 620"}),e.jsx("span",{className:"text-[10px] font-semibold text-emerald-600",children:"+8%"})]})]}),e.jsx(ms,{data:Ne,color:"#8A2BE2"})]}),e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-[#f6f5fb] p-1",children:[e.jsxs("button",{onClick:()=>s.setTab("organic"),className:"flex items-center gap-1.5 rounded-md bg-emerald-50 px-2 py-1 text-[11px] font-semibold text-emerald-700 hover:bg-emerald-100",children:[e.jsx(W,{className:"h-3 w-3"}),"Орг.",e.jsxs("span",{className:"rounded bg-emerald-500/15 px-1 text-[10px] tabular-nums",children:[s.sumOrg," · ",a,"%"]})]}),e.jsxs("button",{onClick:()=>s.setTab("ads"),className:"flex items-center gap-1.5 rounded-md bg-fuchsia-50 px-2 py-1 text-[11px] font-semibold text-fuchsia-700 hover:bg-fuchsia-100",children:[e.jsx(z,{className:"h-3 w-3"}),"Рек.",e.jsxs("span",{className:"rounded bg-fuchsia-500/15 px-1 text-[10px] tabular-nums",children:[s.sumAds," · ",i,"%"]})]})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-[#f6f5fb] p-0.5",children:[e.jsx(q,{active:s.device==="web",onClick:()=>s.setDevice("web"),icon:e.jsx(Be,{className:"h-3.5 w-3.5"}),label:"Web"}),e.jsx(q,{active:s.device==="ios",onClick:()=>s.setDevice("ios"),icon:e.jsx(Pe,{className:"h-3.5 w-3.5"}),label:"iOS"}),e.jsx(q,{active:s.device==="android",onClick:()=>s.setDevice("android"),icon:e.jsx(ze,{className:"h-3.5 w-3.5"}),label:"Android"})]}),e.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg bg-[#f6f5fb] p-0.5",children:[e.jsx("button",{onClick:()=>s.setPage(1),className:`rounded px-2 py-1 text-[11px] font-semibold tabular-nums ${s.page===1?"bg-[#CCFF00] text-[#2a1b4a]":"text-[#2a1b4a]/60 hover:text-[#2a1b4a]"}`,children:"1–100"}),e.jsx("button",{onClick:()=>s.setPage(2),className:`rounded px-2 py-1 text-[11px] font-semibold tabular-nums ${s.page===2?"bg-[#CCFF00] text-[#2a1b4a]":"text-[#2a1b4a]/60 hover:text-[#2a1b4a]"}`,children:"101–200"})]}),e.jsxs("button",{onClick:()=>s.setShowSegments(!s.showSegments),className:"flex items-center gap-1 rounded-lg border border-[#8A2BE2]/30 bg-[#8A2BE2]/8 px-2.5 py-1.5 text-[11px] font-semibold text-[#8A2BE2] hover:bg-[#8A2BE2]/15",children:[e.jsx(ae,{className:"h-3.5 w-3.5"}),s.showSegments?"Свернуть аналитику":"Аналитика"]})]})]})})}function q({active:s,onClick:l,icon:a,label:i}){return e.jsxs("button",{onClick:l,className:`flex items-center gap-1 rounded-md px-2 py-1 text-[11px] ${s?"bg-[#CCFF00] text-[#2a1b4a] font-semibold":"text-[#2a1b4a]/55 hover:text-[#2a1b4a]"}`,children:[a,i]})}const gs=[{range:"3.8–4.0",pct:3,color:"#FF5C7C"},{range:"4.1–4.3",pct:7,color:"#C7A0FF"},{range:"4.4–4.6",pct:16,color:"#8A2BE2"},{range:"4.7–4.9",pct:62,color:"#A8E000"},{range:"5.0",pct:12,color:"#CCFF00"}],me=[{range:"0 – 10",pct:5},{range:"11 – 100",pct:12},{range:"101 – 1 000",pct:24},{range:"1 001 – 10 000",pct:33},{range:"10 001+",pct:26}];function bs({onHide:s,setTab:l}){const[a,i]=b.useState(!1);return e.jsxs("div",{className:"relative grid grid-cols-12 gap-3 rounded-2xl border border-black/5 bg-white p-3 shadow-sm",children:[s&&e.jsxs("button",{onClick:s,title:"Скрыть блок",className:"absolute right-2 top-2 z-10 flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1 text-[10px] text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:[e.jsx(T,{className:"h-3 w-3"})," Скрыть"]}),e.jsxs("div",{className:`${a?"col-span-12":"col-span-3"} rounded-xl border border-black/5 bg-[#faf8ff] p-3 transition-all`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Частотность запроса"}),e.jsx($e,{className:"h-4 w-4 text-emerald-500"})]}),e.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[#2a1b4a]",children:"10 620"}),e.jsx("span",{className:"text-xs text-gray-500",children:"мес"}),e.jsx("span",{className:"text-sm font-semibold text-[#2a1b4a]",children:"354"}),e.jsx("span",{className:"text-xs text-gray-500",children:"день"}),e.jsx("span",{className:"ml-auto text-xs font-semibold text-emerald-600",children:"+8.3% м/м"})]}),e.jsx("div",{className:"mt-3",children:e.jsx(ps,{data:Ne,labels:cs,values:ds,expanded:a,onToggle:()=>i(n=>!n)})})]}),e.jsxs("div",{className:"col-span-3 rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Светофор выдачи"}),e.jsxs("div",{className:"mt-3 flex items-end gap-2",children:[e.jsxs("button",{onClick:()=>l("organic"),className:"flex-1 rounded-lg bg-emerald-50 p-3 text-left ring-1 ring-emerald-200 hover:ring-emerald-400",children:[e.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase text-emerald-700",children:[e.jsx(W,{className:"h-3 w-3"})," Органика"]}),e.jsx("div",{className:"mt-1 text-2xl font-bold text-emerald-700",children:"73"}),e.jsx("div",{className:"text-[11px] text-emerald-600",children:"73% выдачи"})]}),e.jsxs("button",{onClick:()=>l("ads"),className:"flex-1 rounded-lg bg-fuchsia-50 p-3 text-left ring-1 ring-fuchsia-200 hover:ring-fuchsia-400",children:[e.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase text-fuchsia-700",children:[e.jsx(z,{className:"h-3 w-3"})," Реклама"]}),e.jsx("div",{className:"mt-1 text-2xl font-bold text-fuchsia-700",children:"27"}),e.jsx("div",{className:"text-[11px] text-fuchsia-600",children:"27% выдачи"})]})]}),e.jsxs("div",{className:"mt-3 flex h-2 overflow-hidden rounded-full",children:[e.jsx("div",{className:"bg-emerald-400",style:{width:"73%"}}),e.jsx("div",{className:"bg-fuchsia-400",style:{width:"27%"}})]}),e.jsx("p",{className:"mt-2 text-[10px] text-gray-400",children:"Клик по сегменту — фильтр таблицы."})]}),e.jsxs("div",{className:"col-span-3 rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Рейтинги в ТОП‑100"}),e.jsx(U,{className:"h-3.5 w-3.5 text-amber-400",fill:"#fbbf24"})]}),e.jsx("div",{className:"mt-3 space-y-1.5",children:gs.map(n=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-16 text-[11px] text-gray-600",children:n.range}),e.jsx("div",{className:"relative h-2 flex-1 overflow-hidden rounded-full bg-black/5",children:e.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full",style:{width:`${n.pct}%`,background:n.color}})}),e.jsxs("span",{className:"w-8 text-right text-[11px] font-semibold text-[#2a1b4a]",children:[n.pct,"%"]})]},n.range))})]}),e.jsxs("div",{className:"col-span-3 space-y-3",children:[e.jsxs("div",{className:"rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Кол‑во оценок"}),e.jsx("div",{className:"mt-2 flex h-4 overflow-hidden rounded-md",children:me.map((n,c)=>e.jsxs("div",{className:"flex items-center justify-center text-[9px] font-semibold",style:{width:`${n.pct}%`,background:["#E9DDFF","#C7A0FF","#8A2BE2","#A8E000","#CCFF00"][c],color:c===2?"white":"#2a1b4a"},children:[n.pct,"%"]},n.range))}),e.jsx("div",{className:"mt-1.5 flex justify-between text-[9px] text-gray-400",children:me.map(n=>e.jsx("span",{children:n.range},n.range))})]}),e.jsxs("div",{className:"rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Цена с Ozon Картой, ₽"}),e.jsx(Ie,{className:"h-3.5 w-3.5 text-[#8A2BE2]"})]}),e.jsxs("div",{className:"relative mt-3 h-8",children:[e.jsx("div",{className:"absolute inset-x-0 top-1/2 h-1.5 -translate-y-1/2 roun
2ded-full bg-gradient-to-r from-[#CCFF00] via-[#8A2BE2] to-[#FF5C7C]"}),e.jsxs("div",{className:"absolute left-0 top-0 flex flex-col items-start",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#2a1b4a]",children:"72 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"мин"})]}),e.jsxs("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 flex flex-col items-center",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#8A2BE2]",children:"496 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"медиана"})]}),e.jsxs("div",{className:"absolute right-0 top-0 flex flex-col items-end",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#2a1b4a]",children:"2 184 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"макс"})]})]})]})]})]})}function X({label:s,onShow:l}){return e.jsxs("button",{onClick:l,className:"flex w-full items-center justify-between rounded-xl border border-dashed border-[#8A2BE2]/30 bg-white/60 px-4 py-2 text-xs text-[#2a1b4a]/60 hover:border-[#8A2BE2]/60 hover:bg-white hover:text-[#2a1b4a]",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(T,{className:"h-3.5 w-3.5"}),"Блок скрыт: ",e.jsx("b",{className:"font-semibold",children:s})]}),e.jsxs("span",{className:"flex items-center gap-1 rounded-md bg-[#CCFF00] px-2 py-1 font-semibold text-[#2a1b4a]",children:[e.jsx(R,{className:"h-3 w-3"})," Показать"]})]})}function fs({c:s,tag:l,setTag:a}){const i=s.priceOld>s.priceOzon?Math.round((s.priceOld-s.priceOzon)/s.priceOld*100):0,[n,c]=b.useState(!1),[t,o]=b.useState(!1);return e.jsxs("div",{className:"group relative overflow-hidden rounded-2xl bg-white shadow-sm ring-1 ring-black/5 transition hover:shadow-md",children:[e.jsxs("div",{className:"absolute inset-x-0 top-0 z-20 flex items-center justify-between gap-1 bg-gradient-to-b from-[#2a1b4a]/80 via-[#2a1b4a]/40 to-transparent px-2 pb-5 pt-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"grid h-5 w-5 place-items-center rounded-md bg-[#CCFF00] text-[10px] font-black text-[#2a1b4a] tabular-nums",children:s.pos}),s.isAd?e.jsxs(xe,{tone:"violet",className:"!text-[9px]",children:[e.jsx(z,{className:"h-2.5 w-2.5"})," С РЕКЛАМОЙ"]}):e.jsxs(xe,{tone:"lime",className:"!text-[9px]",children:[e.jsx(W,{className:"h-2.5 w-2.5"})," БЕЗ РК"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:()=>a(l==="own"?null:"own"),title:"Свой товар",className:`grid h-5 w-5 place-items-center rounded ${l==="own"?"bg-[#CCFF00] text-[#2a1b4a]":"bg-white/15 text-white hover:bg-white/25"}`,children:e.jsx(re,{className:"h-3 w-3"})}),e.jsx("button",{onClick:()=>a(l==="rival"?null:"rival"),title:"Конкурент",className:`grid h-5 w-5 place-items-center rounded ${l==="rival"?"bg-[#8A2BE2] text-white":"bg-white/15 text-white hover:bg-white/25"}`,children:e.jsx(ne,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"relative h-[200px] overflow-hidden",style:{background:`linear-gradient(135deg, ${s.hue}, #ffffff)`},children:[e.jsx("div",{className:"absolute inset-0 grid place-items-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-black/40",children:s.brand}),e.jsx("div",{className:"px-4 text-center text-xl font-black uppercase leading-none text-black/70",children:s.title.split(" ").slice(0,2).join(" ")})]})}),e.jsx("button",{className:"absolute right-2 top-12 grid h-7 w-7 place-items-center rounded-full bg-white/80 text-gray-700 hover:bg-white",children:e.jsx(Re,{className:"h-3.5 w-3.5"})}),s.action&&e.jsx("div",{className:"absolute bottom-2 left-2",children:e.jsx("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-bold text-white",style:{background:H},children:s.action})})]}),e.jsxs("div",{className:"px-3 pt-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsxs("span",{className:"text-base font-bold",style:{color:H},children:[s.priceOzon," ₽"]}),i>0&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-xs text-gray-400 line-through",children:[s.priceOld," ₽"]}),e.jsxs("span",{className:"ml-auto inline-flex items-center rounded bg-rose-50 px-1 text-[10px] font-semibold text-rose-600",children:["−",i,"%"]})]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-500",children:[e.jsx(je,{className:"h-3 w-3 text-emerald-500"}),"с Ozon Картой"]}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.badges.map(p=>e.jsxs("span",{className:"inline-flex items-center gap-0.5 rounded bg-emerald-50 px-1.5 py-0.5 text-[9px] font-semibold text-emerald-700",children:[p==="Оригинал"?e.jsx(He,{className:"h-2.5 w-2.5"}):e.jsx(U,{className:"h-2.5 w-2.5"})," ",p]},p))}),e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[11px]",children:[e.jsx(U,{className:"h-3 w-3 fill-amber-400 text-amber-400"}),e.jsx("span",{className:"font-semibold",children:s.rating}),e.jsxs("span",{className:"text-gray-400",children:["· ",s.reviews.toLocaleStr
2ing("ru-RU")," оц."]})]}),e.jsxs("button",{className:"mt-2 flex w-full items-center justify-center gap-1 rounded-lg px-3 py-1.5 text-xs font-semibold text-white",style:{background:I},children:[e.jsx(es,{className:"h-3.5 w-3.5"})," ",s.delivery]})]}),e.jsxs("div",{className:"mt-2 space-y-1 border-t border-dashed border-[#8A2BE2]/25 bg-[#faf8ff] px-3 py-2 text-[11px] text-[#2a1b4a]",children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wide text-[#8A2BE2]",children:"MarketHacker"}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-2 gap-y-0.5 leading-tight",children:[e.jsx(_,{k:"Артикул",v:s.sku}),e.jsx(_,{k:"Склад",v:s.warehouse}),e.jsx(_,{k:"Бренд",v:s.brand}),e.jsx(_,{k:"Доставка",v:s.delivery}),e.jsx(_,{k:"Продавец",v:s.seller,full:!0})]}),e.jsxs("button",{onClick:()=>c(!0),className:"mt-1.5 flex w-full items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-[11px] font-bold transition hover:brightness-95",style:{background:"#CCFF00",color:"#2a1b4a"},children:[e.jsx(Y,{className:"h-3.5 w-3.5"})," AI-анализ конверсий"]}),e.jsxs("button",{onClick:()=>o(!0),className:"mt-1 flex w-full items-center justify-center gap-1 rounded-md border border-[#8A2BE2]/40 px-2 py-1 text-[10px] font-medium text-[#2a1b4a] transition hover:bg-[#8A2BE2]/5",children:[e.jsx(R,{className:"h-3 w-3"})," ИИ-анализ внимания"]})]}),n&&e.jsx(os,{card:{sku:s.sku,title:s.title,brand:s.brand,pos:s.pos,priceOzon:s.priceOzon,priceOld:s.priceOld,reviews:s.reviews,isAd:s.isAd,warehouse:s.warehouse},onClose:()=>c(!1)}),t&&e.jsx(_e,{marketplace:"ozon",card:{sku:s.sku,title:s.title,brand:s.brand,hue:s.hue},onClose:()=>o(!1)})]})}function _({k:s,v:l,full:a}){return e.jsxs("div",{className:`flex items-baseline gap-1 ${a?"col-span-2":""}`,children:[e.jsx("span",{className:"text-[9px] uppercase tracking-wide text-[#2a1b4a]/45",children:s}),e.jsx("span",{className:"truncate text-[11px] font-medium text-[#2a1b4a] tabular-nums",children:l})]})}function js({cards:s,tags:l}){const a=new Set([3,27,64]),i=new Set([0,11,38,55,82]),n=Array.from({length:100}).map((c,t)=>{const o=s[t%s.length],p=t*7%5===0;let d=l[String(Number(o.sku)+t)]??null;return d||(a.has(t)?d="own":i.has(t)&&(d="rival")),{i:t,isAd:p,tag:d}});return e.jsxs("div",{className:"w-[200px] shrink-0 border-r border-black/5 bg-[#fafafb] p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-500",children:"Схема 1–100"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"heatmap"})]}),e.jsx("div",{className:"grid grid-cols-5 gap-1",children:n.map(c=>{const t=c.isAd?"bg-fuchsia-200 text-fuchsia-800":"bg-emerald-100 text-emerald-800",o=c.tag==="own"?"ring-2 ring-[#CCFF00] ring-offset-1 ring-offset-[#fafafb]":c.tag==="rival"?"ring-2 ring-[#8A2BE2] ring-offset-1 ring-offset-[#fafafb]":"";return e.jsxs("div",{title:`Поз. ${c.i+1} · ${c.isAd?"реклама":"органика"}${c.tag==="own"?" · свой":c.tag==="rival"?" · конкурент":""}`,className:`group/cell relative grid h-7 cursor-pointer place-items-center rounded text-[9px] font-semibold tabular-nums transition hover:scale-110 ${t} ${o}`,children:[c.i+1,c.tag==="own"&&e.jsx("span",{className:"absolute -right-1 -top-1 grid h-3 w-3 place-items-center rounded-sm bg-[#CCFF00] text-[#2a1b4a]",children:e.jsx(re,{className:"h-2 w-2 fill-current"})}),c.tag==="rival"&&e.jsx("span",{className:"absolute -right-1 -top-1 grid h-3 w-3 place-items-center rounded-sm bg-[#8A2BE2] text-white",children:e.jsx(ne,{className:"h-2 w-2"})})]},c.i)})}),e.jsxs("div",{className:"mt-3 space-y-1.5 text-[10px] text-gray-500",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-emerald-100 ring-1 ring-emerald-300"})," Органика"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-fuchsia-200 ring-1 ring-fuchsia-300"})," Реклама"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-white ring-2 ring-[#CCFF00]"})," Свой товар"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-white ring-2 ring-[#8A2BE2]"})," Конкурент"]})]})]})}const V=[{id:"tag",label:"",w:36,min:28},{id:"pos",label:"Поз.",w:64,min:48,sortable:!0}
2,{id:"name",label:"Артикул · Название",w:280,min:160,sortable:!0},{id:"cat",label:"Категория",w:100,min:70,sortable:!0},{id:"brand",label:"Бренд",w:110,min:70,sortable:!0},{id:"rating",label:"Рейтинг · Оценки",w:120,min:90,sortable:!0},{id:"price",label:"Цена (Ozon Карта)",w:130,min:100,sortable:!0},{id:"badges",label:"Бейджи",w:160,min:100},{id:"wh",label:"Приор. склад",w:130,min:90},{id:"action",label:"Акция",w:120,min:80,sortable:!0}];function vs({rows:s,tags:l,setTag:a}){const[i,n]=b.useState(()=>V.map(t=>t.w)),c=(t,o)=>{o.preventDefault(),o.stopPropagation();const p=o.clientX,d=i[t],f=V[t].min,w=h=>{const N=Math.max(f,d+(h.clientX-p));n(v=>v.map((g,C)=>C===t?N:g))},j=()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",j),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",w),window.addEventListener("mouseup",j)};return e.jsxs("table",{className:"min-w-full text-sm",style:{tableLayout:"fixed",width:i.reduce((t,o)=>t+o,0)},children:[e.jsx("colgroup",{children:i.map((t,o)=>e.jsx("col",{style:{width:t}},V[o].id))}),e.jsx("thead",{className:"sticky top-0 bg-[#fafafb] text-[11px] uppercase tracking-wide text-gray-500",children:e.jsx("tr",{children:V.map((t,o)=>e.jsxs("th",{className:"relative border-b border-black/5 px-3 py-2 text-left font-semibold",children:[e.jsxs("button",{className:"flex items-center gap-1 hover:text-[#2a1b4a]",children:[t.label,t.sortable&&e.jsx(Me,{className:"h-3 w-3 text-gray-300"})]}),o<V.length-1&&e.jsx("span",{onMouseDown:p=>c(o,p),className:"absolute right-0 top-0 z-10 h-full w-1.5 cursor-col-resize select-none hover:bg-[#8A2BE2]/40",title:"Потяните, чтобы изменить ширину"})]},t.id))})}),e.jsx("tbody",{children:s.map(t=>{const o=l[t.sku]??null,p=t.priceOld>t.priceOzon?Math.round((t.priceOld-t.priceOzon)/t.priceOld*100):0;return e.jsxs("tr",{className:`border-b border-black/5 transition hover:bg-[#CCFF00]/[0.06] ${o==="own"?"bg-[#CCFF00]/[0.08]":o==="rival"?"bg-[#8A2BE2]/[0.05]":""}`,children:[e.jsx("td",{className:"px-2 py-2",children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("button",{onClick:()=>a(t.sku,o==="own"?null:"own"),className:`grid h-4 w-4 place-items-center rounded ${o==="own"?"bg-[#CCFF00] text-[#2a1b4a]":"bg-black/5 text-gray-400 hover:bg-black/10"}`,children:e.jsx(re,{className:"h-2.5 w-2.5"})}),e.jsx("button",{onClick:()=>a(t.sku,o==="rival"?null:"rival"),className:`grid h-4 w-4 place-items-center rounded ${o==="rival"?"bg-[#8A2BE2] text-white":"bg-black/5 text-gray-400 hover:bg-black/10"}`,children:e.jsx(ne,{className:"h-2.5 w-2.5"})})]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-sm font-bold text-[#2a1b4a]",children:t.pos}),t.isAd?e.jsx("span",{title:`+${t.bust} поз. от рекламы`,className:"grid h-4 w-4 place-items-center rounded bg-fuchsia-500/15 text-fuchsia-600",children:e.jsx(z,{className:"h-2.5 w-2.5"})}):e.jsx("span",{className:"grid h-4 w-4 place-items-center rounded bg-emerald-500/15 text-emerald-600",children:e.jsx(W,{className:"h-2.5 w-2.5"})})]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-9 w-9 shrink-0 rounded",style:{background:`linear-gradient(135deg, ${t.hue}, #ffffff)`}}),e.jsxs("div",{className:"min-w-0 leading-tight",children:[e.jsx("div",{className:"truncate text-[12px] font-medium text-[#2a1b4a]",children:t.title}),e.jsxs("div",{className:"text-[10px] text-gray-400",children:["SKU ",t.sku]})]})]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs text-gray-600",children:e.jsx("div",{className:"truncate",children:t.category})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs font-medium text-[#2a1b4a]",children:e.jsx("div",{className:"truncate",children:t.brand})}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[e.jsx(U,{className:"h-3 w-3 fill-amber-400 text-amber-400"}),e.jsx("span",{className:"font-semibold",children:t.rating}),e.jsxs("span",{className:"text-gray-400",children:["· ",t.reviews>1e3?`${Math.round(t.reviews/1e3)}
2k`:t.reviews]})]})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsxs("span",{className:"text-sm font-bold",style:{color:H},children:[t.priceOzon," ₽"]}),p>0&&e.jsxs("span",{className:"text-[10px] text-gray-400 line-through",children:[t.priceOld," ₽"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5 text-[9px] text-emerald-600",children:[e.jsx(je,{className:"h-2.5 w-2.5"})," Ozon Карта"]})]}),e.jsx("td",{className:"overflow-hidden px-3 py-2",children:e.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[t.badges.slice(0,2).map(d=>e.jsx("span",{className:"inline-flex items-center rounded bg-emerald-50 px-1 py-0.5 text-[9px] font-semibold text-emerald-700",children:d},d)),t.badges.length>2&&e.jsxs("span",{className:"text-[9px] text-gray-400",children:["+",t.badges.length-2]}),t.badges.length===0&&e.jsx("span",{className:"text-[10px] text-gray-300",children:"—"})]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs text-gray-600",children:e.jsx("div",{className:"truncate",children:t.warehouse})}),e.jsx("td",{className:"px-3 py-2",children:t.action?e.jsx("span",{className:"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-bold text-white",style:{background:H},children:t.action}):e.jsx("span",{className:"text-[10px] text-gray-400",children:"без акции"})})]},t.pos+t.sku)})})]})}export{Ls as component};

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.