1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4635],{4604:function(e,t,s){s.d(t,{Z:function(){return d}});var a=s(4335);let r="/groups",i="/users",n="/items",l="/orders",c="/carts",o="/companies";var d={groups:{index:e=>(0,a.R1)(`${r}`,e),show:(e,t,s)=>(t={...t,id:void 0},(0,a.R1)(`${r}/${e}`,t,s))},users:{index:e=>(0,a.R1)(`${i}`,e),create:e=>(0,a.sg)(`${i}`,e),show:e=>(0,a.R1)(`${i}/${e}`),init:e=>(0,a.sg)("/init"),profile:()=>(0,a.R1)(`${i}/profile`),signIn:e=>(0,a.sg)("/sign_in",e),update:(e,t)=>(0,a.nc)(`${i}/${e}`,t),change_password:e=>(0,a.nc)(`${i}/change_password`,e),remember_password:e=>(0,a.sg)(`${i}/remember_password`,e)},items:{show:e=>(0,a.R1)(`${n}/${e}`),rand:()=>(0,a.R1)(`${n}/rand`),set_favorite:e=>(0,a.sg)(`${n}/${e}/set_favorite`)},orders:{sync:e=>(0,a.sg)(`${l}/sync`,e),init:()=>(0,a.R1)(`${l}/init`),checkOut:e=>(0,a.sg)(`${l}/checkout`,e),index:e=>(0,a.R1)(`${l}`,{page:e}),show:e=>(0,a.R1)(`${l}/${e}`)},search:{index:e=>(0,a.R1)("/search",e)},carts:{index:()=>(0,a.R1)(`${c}`),show:e=>(0,a.R1)(`${c}/${e}`),quote:(e,t)=>(0,a.sg)(`${c}/${e}/quote`,{excludedItemIds:t}),add_item:e=>(0,a.sg)(`${c}/add_item`,e),create_cart:e=>(0,a.sg)(`${c}`,e),move_item:e=>(0,a.sg)([c,"move_item"].join("/"),e),deleteItem:e=>(0,a.sg)([c,"delete_item"].join("/"),e),checkout:e=>(0,a.sg)([c,"checkout"].join("/"),e)},companies:{index:()=>(0,a.R1)(`${o}`),create:e=>(0,a.sg)(o,e),update:(e,t)=>(0,a.nc)([o,e].join("/"),t)}}},7670:function(e,t){t.Z=e=>e},284:function(e,t,s){var a=s(5893),r=s(7294),i=s(4006),n=s(2294);t.Z=({qty:e,setQty:t,onFocus:s,onBlur:l,handleSubmit:c,min:o})=>{let[d,u]=r.useState(e),m=r.useRef(null);return r.useEffect(()=>{e!==d&&o&&d&&parseInt(d)>o&&t(d)},[d]),r.useEffect(()=>{e!==d&&o&&d&&parseInt(d)<o&&u(e)},[e]),r.useEffect(()=>{d!==e&&t(d)},[d]),(0,a.jsxs)("div",{className:"InputNumber InputNumber--arrows flex h-8 relative w-full",children:[(0,a.jsx)("input",{ref:m,onChange:e=>{u(e.target.value)},onFocus:s,onBlur:l,value:d,onKeyPress:e=>{"Enter"===e.key&&c(),/[0-9]/.test(e.key)||e.preventDefault()},className:"rounded-md overflow-hidden border pl-2 relative w-full text-sm focus:border-blue-500 hover:border-blue-500"}),(0,a.jsxs)("div",{className:"absolute right-0 top-0 bottom-0 border-l m-[1px]",children:[(0,a.jsx)("span",{role:"button","aria-label":"УвелиÑиÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво",className:"flex items-center justify-center cursor-pointer h-[55%] px-2",onMouseDown:e=>{e.preventDefault(),m.current.focus(),u(e=>e?(parseInt(e)+1).toString():"1")},children:(0,a.jsx)(i.Z,{className:"h-2 w-2 text-gray-500"})}),(0,a.jsx)("span",{role:"button","aria-label":"УменÑÑиÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво",className:"flex items-center justify-center cursor-pointer h-[45%] px-2 border-t",onMouseDown:e=>{e.preventDefault(),m.current.focus(),u(e=>{if(e){let t=parseInt(e)-1;return t>0?t.toString():o?o.toString():""}})},children:(0,a.jsx)(n.Z,{className:"h-2 w-2 text-gray-500"})})]})]})}},8575:function(e,t,s){s.d(t,{Kv:function(){return b},O6:function(){return v},cW:function(){return h},dR:function(){return j}});var a=s(5893),r=s(7294),i=s(1664),n=s.n(i),l=s(5152),c=s.n(l),o=s(1163),d=s(895),u=s.n(d),m=s(640);let x=(0,r.createContext)(void 0),h=x.Provider,p=["search","catalog","product_page","other","unknown"],g=["regular","direct_analog","cross_analog","unknown"];function b(){let e=(0,r.useContext)(x),t=(0,o.useRouter)();if(e)return e;if("/search"===t.pathname)return{origin:"search",selection:"regular"};let s=/^\/(catalog|groups)(\/|$)/.test(t.pathname),a=/^\/items(\/|$)/.test(t.pathname);return{origin:"string"==typeof t.query.atOrigin&&p.includes(t.query.atOrigin)?t.query.atOrigin:s?"catalog":a?"product_page":"other",selection:a&&"string"==typeof t.query.atSelection&&g.includes(t.query.atSelection)?t.query.atSelection:"regular",sourceItemId:a&&"string"==typeof t.query.atSource?t.query.atSource:void 0}}function v(e,t,s=""){let a=new URLSearchParams({atOrigin:t.origin,atSelection:t.selection});return t.sourceItemId&&a.set("atSource",t.sourceItemId),`/items/${e.searchId}?${a.toString()}${s}`}function j({item:e,children:t,className:s}){let i=b(),l=(0,o.useRouter)(),[c,d]=r.useState(!1);r.useEffect(()=>d(!1),[l.asPath]);let x=t=>{if(t.defaultPrevented||"auxclick"===t.type&&1!==t.button)return;let s=u().get("token");fetch(`${(0,m.uR)().replace(/\/$/,"")}/commerce_events/analog_opened`,{method:"POST",keepalive:!0,credentials:"include",headers:{"Content-Type":"application/json",...s?{Authorization:s}:{}},body:JSON.stringify({item_id:e.id,origin:i.origin,request_id:crypto.randomUUID()})}).catch(()=>void 0)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{href:v(e,i,"#analogs"),prefetch:!1,"aria-haspopup":"dialog",onClick:e=>{!e.defaultPrevented&&(x(e),e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||0!==e.button||(e.preventDefault(),d(!0)))},onAuxClick:x,className:s,children:t}),c&&(0,a.jsx)(f,{item:e,onClose:()=>d(!1)})]})}let f=c()(()=>s.e(9795).then(s.bind(s,9795)),{loadableGenerated:{webpack:()=>[9795]},ssr:!1})},7516:function(e,t,s){s.d(t,{al:function(){return w},by:function(){return P}});var a=s(5893),r=s(8575),i=s(4184),n=s.n(i),l=s(7294),c=s(1664),o=s.n(c),d=s(9008),u=s.n(d),m=s(4003),x=s(6979),h=s(3681),p=s(4910),g=s(1594),b=s(7532),v=s(7449),j=s(9004),f=s(7670);s(6761),s(7555),s(7425);var N=s(9749);let y=e=>(null==e?void 0:e.large)||(null==e?void 0:e.item)||(null==e?void 0:e.thumb)||"",w=e=>{let t=[e.image,...e.images??[]].filter(e=>!!y(e)),s=t.filter(e=>!y(e).includes("no-photo"));return Array.from(new Map((s.length>0?s:t.slice(0,1)).map(e=>[y(e),e])).values())},P=({item:e,compact:t=!1})=>{let s=l.useMemo(()=>w(e),[e]),[r,i]=l.useState(0),[c,o]=l.useState(!1),d=s[r]??s[0]??e.image,u=s.length>1;
1return(0,a.jsxs)("div",{className:t?"min-w-0 w-full":"ProductCard_Gallery",children:[(0,a.jsxs)("div",{className:t?"relative flex h-40 items-center justify-center overflow-hidden rounded-lg bg-white sm:h-48":"ProductCard_ImageContainer",children:[(0,a.jsx)("button",{type:"button",className:t?"flex h-full w-full items-center justify-center p-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-red-700":"ProductCard_ImageOpen",onClick:()=>o(!0),"aria-label":`ÐÑкÑÑÑÑ Ð¸Ð·Ð¾Ð±Ñажение кÑÑпнее${u?`, ÑоÑо ${r+1} из ${s.length}`:""}`,children:(0,a.jsx)("img",{src:(0,f.Z)(y(d)),className:t?"h-full w-full object-contain":void 0,alt:`${e.title}${u?` â ÑоÑо ${r+1} из ${s.length}`:""}`,decoding:"async"})}),u&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"ProductCard_ImageCounter","aria-hidden":"true",children:[r+1," / ",s.length]}),(0,a.jsx)("button",{type:"button",className:"ProductCard_ImageNav ProductCard_ImageNav--previous",onClick:()=>{i(e=>(e-1+s.length)%s.length)},"aria-label":"ÐоказаÑÑ Ð¿ÑедÑдÑÑее изобÑажение",children:(0,a.jsx)("span",{"aria-hidden":"true",children:"â¹"})}),(0,a.jsx)("button",{type:"button",className:"ProductCard_ImageNav ProductCard_ImageNav--next",onClick:()=>{i(e=>(e+1)%s.length)},"aria-label":"ÐоказаÑÑ ÑледÑÑÑее изобÑажение",children:(0,a.jsx)("span",{"aria-hidden":"true",children:"âº"})})]})]}),u&&(0,a.jsx)("div",{className:"ProductCard_Thumbnails",role:"group","aria-label":"ФоÑогÑаÑии ÑоваÑа",children:s.map((e,t)=>(0,a.jsx)("button",{type:"button",className:n()("ProductCard_Thumbnail",{"ProductCard_Thumbnail--active":t===r}),onClick:()=>i(t),"aria-label":`ÐоказаÑÑ Ð¸Ð·Ð¾Ð±Ñажение ${t+1} из ${s.length}`,"aria-pressed":t===r,children:(0,a.jsx)("img",{src:(0,f.Z)(e.thumb||e.item||e.large),alt:"",loading:"lazy",decoding:"async"})},e.large||e.item||e.thumb||t))}),u&&(0,a.jsxs)("span",{className:"sr-only","aria-live":"polite",children:["Ðоказано изобÑажение ",r+1," из ",s.length]}),(0,a.jsx)(C,{images:s,itemTitle:e.title,activeIndex:r,isOpen:c,onActiveIndexChange:i,onClose:()=>o(!1)})]})},C=({images:e,itemTitle:t,activeIndex:s,isOpen:r,onActiveIndexChange:i,onClose:n})=>{let c=l.useRef(null),[o,d]=l.useState(1),u=e.length>1,j=e=>{let t=c.current;if(!t)return;let s=Math.min(4,Math.max(1,e));1===s?t.zoom.out():t.zoom.in(s)},N=()=>{var e;null===(e=c.current)||void 0===e||e.zoom.out(),d(1)},w=()=>{N(),n()};return(0,a.jsxs)(m.V,{as:"div",className:"ProductImageLightbox",open:r,onClose:w,children:[(0,a.jsx)("div",{className:"ProductImageLightbox-backdrop","aria-hidden":"true"}),(0,a.jsx)("div",{className:"ProductImageLightbox-viewport",children:(0,a.jsxs)(m.V.Panel,{className:"ProductImageLightbox-panel",children:[(0,a.jsxs)("header",{className:"ProductImageLightbox-toolbar",children:[(0,a.jsx)(m.V.Title,{className:"ProductImageLightbox-title",children:t}),(0,a.jsxs)("div",{className:"ProductImageLightbox-controls",children:[u&&(0,a.jsxs)("span",{className:"ProductImageLightbox-counter","aria-live":"polite",children:[s+1," / ",e.length]}),(0,a.jsx)("button",{type:"button",className:"ProductImageLightbox-control",onClick:()=>j(o-.5),disabled:o<=1,"aria-label":"УменÑÑиÑÑ Ð¸Ð·Ð¾Ð±Ñажение",children:(0,a.jsx)(x.Z,{"aria-hidden":"true"})}),(0,a.jsxs)("span",{className:"ProductImageLightbox-scale","aria-live":"polite",children:[o.toFixed(o%1==0?0:1),"\xd7"]}),(0,a.jsx)("button",{type:"button",className:"ProductImageLightbox-control",onClick:()=>j(o+.5),disabled:o>=4,"aria-label":"УвелиÑиÑÑ Ð¸Ð·Ð¾Ð±Ñажение",children:(0,a.jsx)(h.Z,{"aria-hidden":"true"})}),(0,a.jsx)("button",{type:"button",className:"ProductImageLightbox-control",onClick:N,disabled:o<=1,"aria-label":"СбÑоÑиÑÑ Ð¼Ð°ÑÑÑаб",children:(0,a.jsx)(p.Z,{"aria-hidden":"true"})}),(0,a.jsx)("button",{type:"button",className:"ProductImageLightbox-control ProductImageLightbox-close",onClick:w,"aria-label":"ÐакÑÑÑÑ ÑвелиÑенное изобÑажение",children:(0,a.jsx)(g.Z,{"aria-hidden":"true"})})]})]}),(0,a.jsxs)("div",{className:"ProductImageLightbox-stage",children:[(0,a.jsx)(v.tq,{className:"ProductImageLightbox-swiper",initialSlide:s,modules:[b.s5,b.N1,b.W_,b.LG],navigation:u,keyboard:{enabled:u,onlyInViewport:!1},zoom:{minRatio:1,maxRatio:4,toggle:!0},onSwiper:e=>{c.current=e},onSlideChange:e=>{e.zoom.out(),d(1),i(e.activeIndex)},onZoomChange:(e,t)=>
1d(t),children:e.map((s,r)=>(0,a.jsx)(v.o5,{children:(0,a.jsx)("div",{className:"swiper-zoom-container",children:(0,a.jsx)("img",{src:(0,f.Z)(y(s)),alt:`${t} â ÑоÑо ${r+1} из ${e.length}`,draggable:!1,decoding:"async"})})},y(s)))}),(0,a.jsx)("p",{className:"ProductImageLightbox-hint",children:"Ðвойной клик или жеÑÑ Ð´Ð²ÑÐ¼Ñ Ð¿Ð°Ð»ÑÑами Ð´Ð»Ñ Ð¿ÑиближениÑ"})]})]})})]})},k=({item:e})=>(0,a.jsx)("div",{className:n()("ProductCard_Specs"),children:[{title:"СÑÑана пÑоиÑÑ
ождениÑ",key:"country"},{title:"ÐÑименÑемоÑÑÑ",key:"applicability"},{title:"СÑок гаÑанÑии",key:"guaranteePeriod"},{title:"РазмеÑ",key:"size"},{title:"Тип",key:"type"},{title:"Ð Ñпаковке",key:"inPack"}].map(t=>(0,a.jsxs)("div",{className:n()("ProductCard_Spec"),children:[(0,a.jsx)("div",{className:n()("ProductCard_Spec_Title"),children:t.title}),(0,a.jsx)("div",{className:n()("ProductCard_Spec_Value"),children:e.properties[t.key]})]},t.key))}),I=({item:e,size:t="small",all:s=!1})=>{let{oemString:r}=e,i=r&&r.length>1&&r.replace(/;/g,",").replace(/\s/g,",").split(",").filter(e=>e.length>5);return s?(0,a.jsx)(a.Fragment,{children:i&&i.map((e,s)=>(0,a.jsx)(o(),{href:{pathname:"/search",query:{query:e,query_index:"part_number"}},className:n()("Product_OEM",["Product_OEM",t].join("_")),children:e},s))}):(0,a.jsx)(a.Fragment,{children:i&&i.slice(0,5).map((e,s)=>(0,a.jsx)(o(),{href:{pathname:"/search",query:{query:e,query_index:"part_number"}},className:n()("Product_OEM",["Product_OEM",t].join("_")),children:e},s))})};t.ZP=({item:e})=>{var t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(u(),{children:[(0,a.jsx)("title",{children:e.seoTitle}),(0,a.jsx)("meta",{name:"description",content:e.seoDescription})]}),(0,a.jsxs)("div",{className:n()("ProductCard"),children:[(0,a.jsx)("h1",{className:"ProductCard_Title",children:e.title}),(0,a.jsxs)("div",{className:"ProductCard_Meta",children:[(0,a.jsxs)("div",{className:"ProductCard_MetaItem",children:[(0,a.jsx)("span",{children:"Ðод ÑоваÑа:"}),(0,a.jsx)("p",{className:"font-medium",children:null==e?void 0:e.properties.code})]}),(0,a.jsxs)("div",{className:"ProductCard_MetaItem",children:[(0,a.jsx)("span",{children:"ÐÑÑикÑл:"}),(0,a.jsx)("p",{className:"font-medium",children:null==e?void 0:e.article})]})]}),(0,a.jsx)(N.Iu,{item:e}),e.hasAnalogs&&(0,a.jsx)(r.dR,{item:e,className:"mb-4 inline-flex text-sm font-medium text-red-700 underline underline-offset-4 hover:text-red-900",children:"ÐÑÑÑ Ð°Ð½Ð°Ð»Ð¾Ð³Ð¸"}),(0,a.jsxs)("div",{className:n()("ProductCard_Row"),children:[(0,a.jsx)(P,{item:e}),(0,a.jsxs)("div",{className:n()("ProductCard_Right"),children:[e.group&&(0,a.jsx)(o(),{href:`/catalog/${e.group.link}`,children:e.group.title}),(0,a.jsx)("h3",{children:"ХаÑакÑеÑиÑÑики"}),(0,a.jsx)(k,{item:e}),(0,a.jsx)(j.G,{feature:e.accountingFeature,className:"mt-2",tnved:null===(t=e.properties)||void 0===t?void 0:t.tnved})]})]}),e.oemString&&e.oemString.length>1&&(0,a.jsxs)("div",{className:"ProductCard_Section",children:[(0,a.jsx)("h3",{children:"OEM"}),(0,a.jsx)(I,{item:e,size:"middle",all:!0})]}),e.text&&e.text.length>1&&(0,a.jsxs)("div",{className:"ProductCard_Section",children:[(0,a.jsx)("h3",{children:"ÐпиÑание"}),(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e.text}})]})]})]})}},9004:function(e,t,s){s.d(t,{G:function(){return p}});var a=s(5893),r=s(7294),i=s(5675),n=s.n(i),l=s(1664),c=s.n(l),o=s(4003),d=s(1594);let u={marking:"ÐаÑкиÑовка",osu:"ÐСУ"},m={marking:"ЧÐ",osu:"ÐСУ"},x=new Set(["ÐаÑÑÑмеÑиÑ","ÐаÑÑÑмеÑнÑе и коÑмеÑиÑеÑкие ÑÑедÑÑва и бÑÑÐ¾Ð²Ð°Ñ Ñ
имиÑ"]),h=({feature:e,tnved:t})=>{let s="string"==typeof t?t.trim():"";return"ÐаÑÑÑмеÑнÑеÐÐоÑмеÑиÑеÑкиеСÑедÑÑваÐÐÑÑоваÑХимиÑ"===e.code||x.has(e.name)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:["ÐÐ»Ñ ÑÑого ÑоваÑа пÑименÑеÑÑÑ Ð¾Ð±ÑзаÑелÑÐ½Ð°Ñ Ð¼Ð°ÑкиÑовка. ТоваÑÐ½Ð°Ñ Ð³ÑÑппа â"," ",(0,a.jsx)("strong",{children:"\xabÐоÑмеÑика, бÑÑÐ¾Ð²Ð°Ñ Ñ
Ð¸Ð¼Ð¸Ñ Ð¸ ÑоваÑÑ Ð»Ð¸Ñной гигиенÑ\xbb"}),"."," ",s&&(0,a.jsxs)(a.Fragment,{children:["Ðод ТÐÐÐÐ: ",(0,a.jsx)("strong",{children:s}),"."]})]}),(0,a.jsxs)("p",{children:["ÐÑоÑмиÑÑ Ð¿Ð¾ÐºÑÐ¿ÐºÑ Ð¼Ð¾Ð³ÑÑ ÐºÐ»Ð¸ÐµÐ½ÑÑ, коÑоÑÑе иÑполÑзÑÑÑ ÐÐРи подклÑÑили ÑÑÑ ÑоваÑнÑÑ Ð³ÑÑÐ¿Ð¿Ñ Ð² лиÑном кабинеÑе \xabЧеÑÑного знака\xbb."," ",(0,a.jsx)("a",{href:"https://markirovka.crpt.ru/",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-blue-700 underline decoration-blue-300 underline-offset-2 hover:text-blue-900",children:"ÐÑкÑÑÑÑ Ð»Ð¸ÑнÑй кабинеÑ"}),"."]}),(0,a.jsx)("p",{children:"СейÑÐ°Ñ ÑÐ²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¿Ð¾ ÑÑой гÑÑппе пеÑедаÑÑÑÑ Ð² Ñежиме ÐСУ â обÑÑмно-ÑоÑÑового ÑÑÑÑа."})]}):"ÐоÑоÑнÑеÐаÑла"===e.code||"ÐоÑоÑнÑе маÑла"===e.name?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:["Ð¢Ð¾Ð²Ð°Ñ Ð²Ñ
Ð¾Ð´Ð¸Ñ Ð² маÑкиÑÑемÑÑ Ð³ÑÑппÑ"," ",(0,a.jsx)("strong",{children:"\xabСмазоÑнÑе маÑеÑÐ¸Ð°Ð»Ñ Ð¸ авÑомобилÑнÑе жидкоÑÑи\xbb"}),"."," ",s&&(0,a.jsxs)(a.Fragment,{children:["Ðод ТÐÐÐÐ: ",(0,a.jsx)("strong",{children:s}),"."]})]}),(0,a.jsxs)("p",{children:["ÐокÑменÑÑ Ð¿Ð¾ поÑÑавке ÐланеÑа ÐвÑо пеÑедаÑÑ ÑеÑез ÑлекÑÑоннÑй докÑменÑообоÑоÑ. ÐеÑед оÑоÑмлением заказа ÑбедиÑеÑÑ, ÑÑо ваÑа оÑганизаÑÐ¸Ñ Ð¿Ð¾Ð´ÐºÐ»ÑÑена к опеÑаÑоÑÑ ÐÐÐ."," ",(0,a.jsx)(c(),{href:"/edo",className:"font-medium text-blue-700 underline decoration-blue-300 underline-offset-2 hover:text-blue-900",children:"ÐодÑобнее об ÐÐÐ"}),"."]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:e.description||"ÐаннÑй ÑÐ¾Ð²Ð°Ñ Ð¿Ð¾Ð´Ð»ÐµÐ¶Ð¸Ñ ÑÑеÑÑ Ð² ÑиÑÑеме \xabЧеÑÑнÑй знак\xbb."}),s&&(0,a.jsxs)("p",{children:["Ðод ТÐÐÐÐ: ",(0,a.jsx)("strong",{children:s}),"."]})]})},p=({feature:e,className:t="",iconOnly:s=!1,tnved:i})=>{let[l,c]=r.useState(!1);if(!(null==e?void 0:e.usageKind))return null;
1let x=u[e.usageKind],p=[e.name,x,e.description].filter(Boolean).join(". ");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:`inline-flex items-center gap-1 rounded bg-[#EAE60E] ${s?"px-1 py-0.5":"px-1.5 py-0.5"} text-[10px] font-semibold leading-none text-[#4B4D50] transition-colors hover:bg-[#F4F024] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#737000] ${t}`,title:p,"aria-label":`ÐÑкÑÑÑÑ Ð¸Ð½ÑоÑмаÑиÑ: ${p}`,onClick:()=>c(!0),children:[(0,a.jsx)(n(),{src:"/static/svg/true_symbol_icon.svg",width:16,height:16,className:"shrink-0",alt:"","aria-hidden":"true",unoptimized:!0}),(0,a.jsx)("span",{children:s?m[e.usageKind]:"ЧеÑÑнÑй знак"})]}),(0,a.jsxs)(o.V,{as:"div",className:"relative z-[1100]",open:l,onClose:c,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-[1px]","aria-hidden":"true"}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,a.jsxs)(o.V.Panel,{className:"w-full max-w-xl overflow-hidden rounded-xl bg-white text-left shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 bg-[#EAE60E] px-5 py-4",children:[(0,a.jsx)(n(),{src:"/static/svg/true_symbol_icon.svg",width:32,height:32,className:"shrink-0",alt:"","aria-hidden":"true",unoptimized:!0}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)(o.V.Title,{className:"text-lg font-bold leading-6 text-[#3F4144]",children:"ЧеÑÑнÑй знак"}),(0,a.jsx)("p",{className:"mt-0.5 text-xs font-medium text-[#5E6063]",children:e.name})]}),(0,a.jsx)("button",{type:"button",className:"rounded-md p-1 text-[#4B4D50] hover:bg-black/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#737000]",onClick:()=>c(!1),"aria-label":"ÐакÑÑÑÑ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾ маÑкиÑовке",children:(0,a.jsx)(d.Z,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,a.jsx)("div",{className:"space-y-4 px-5 py-5 text-sm leading-6 text-zinc-700",children:(0,a.jsx)(h,{feature:e,tnved:i})})]})})})]})]})}},4635:function(e,t,s){s.d(t,{Z:function(){return E}});var a=s(5893),r=s(7294),i=s(8575),n=s(1272);function l({article:e,labelOnly:t=!1}){let[s,i]=r.useState(""),l=async()=>{try{await navigator.clipboard.writeText(e),i("СкопиÑовано")}catch{i("Ðе ÑдалоÑÑ ÑкопиÑоваÑÑ")}};return t?(0,a.jsxs)("span",{className:"relative inline-flex items-center gap-1",children:["аÑÑикÑл",e&&(0,a.jsx)("button",{type:"button",onClick:l,"aria-label":"ÐопиÑоваÑÑ Ð°ÑÑикÑл",title:s||"ÐопиÑоваÑÑ Ð°ÑÑикÑл",className:"inline-flex text-black opacity-60 transition-opacity hover:opacity-100 focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-black",children:(0,a.jsx)(n.Z,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),(0,a.jsx)("span",{role:"status",className:"sr-only",children:s})]}):e?(0,a.jsx)("span",{className:"block pr-1 py-0.5 text-left [overflow-wrap:anywhere]",children:e}):null}var c=s(1664),o=s.n(c),d=s(5457),u=s(7670),m=s(1163),x=s(4003),h=s(7516),p=s(4224),g=s(4604),b=s(4184),v=s.n(b),j=s(4622),f=s(7371),N=s(3204),y=s(1429),w=s(3431),P=s(1594),C=s(3282),k=s(9089),I=s(1943),T=s(9004),$=s(9749);let _=e=>(null==e?void 0:e.item)||(null==e?void 0:e.thumb)||(null==e?void 0:e.large)||"",S=({isOpen:e,onClose:t,item:s})=>(0,a.jsxs)(x.V,{as:"div",className:"ProductItemModal relative z-[1000]",open:e,onClose:t,children:[(0,a.jsx)("div",{className:"ProductItemModal-backdrop fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,a.jsx)("div",{className:"ProductItemModal-scroll fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"ProductItemModal-positioner",children:(0,a.jsxs)(x.V.Panel,{className:"ProductItemModal-panel text-sm",children:[(0,a.jsx)(x.V.Title,{as:"span",className:"sr-only",children:s.title}),(0,a.jsx)("button",{type:"button",className:"ProductItemModal-close",onClick:t,"aria-label":"ÐакÑÑÑÑ ÐºÐ°ÑÑоÑÐºÑ ÑоваÑа",children:(0,a.jsx)(P.Z,{"aria-hidden":"true"})}),(0,a.jsx)("div",{className:"ProductItemModal-content",children:(0,a.jsx)(h.ZP,{item:s})})]})})})]}),M=({isOpen:e,onClose:t,item:s})=>(0,a.jsxs)(x.V,{as:"div",className:"relative z-[1000]",open:e,onClose:t,children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex items-stretch justify-center p-4 text-center min-h-[500px] max-h-screen",children:(0,a.jsxs)(x.V.Panel,{className:" max-w-screen-xl transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all flex flex-col",children:[(0,a.jsx)(x.V.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:s.title}),(0,a.jsx)("div",{className:"absolute top-5 right-5",children:(0,a.jsx)(P.Z,{className:"h-6 cursor-pointer",onClick:t})}),(0,a.jsx)("img",{src:"https://planeta-avtodv.ru/uploads/images/3/b6fa7cb2-5037-4809-97d4-49dcc8e87642.jpg"}),(0,a.jsx)("h1",{children:"СÑÐ¿ÐµÑ Ð¿ÑÐ¿ÐµÑ Ð°ÐºÑиÑ"}),(0,a.jsxs)("a",{children:["ÐодÑобнее ",(0,a.jsx)(I.Z,{})]})]})})})]});var Z=({item:e,compact:t=!1})=>{var s,n,c,x,b,P,I,Z,R,q;let E=(0,i.Kv)(),[F,O]=r.useState(e.isFavorite),[L,z]=r.useState(void 0),[K,V]=r.useState(!1),[A,B]=r.useState(!1),[D,G]=r.useState(0),{canOrder:Q,withDiscounts:J}=(0,j.Z)(),[U,W]=r.useState(!1),[X,Y]=r.useState(!1),[H,ee]=r.useState(!1),et=r.useRef(!1),es=r.useRef(null),ea=r.useRef(null),er=r.useRef(null),ei=r.useRef(!1),en=r.useRef(new Set),el=r.useMemo(()=>(0,h.al)(e),[e]),ec=el[D]??el[0]??e.image,eo=el.length>1,ed=(0,u.Z)(_(ec)),eu=async()=>{z((await g.Z.items.show(e.searchId)).item)};r.useEffect(()=>O(e.isFavorite),[e.isFavorite]);let em=t=>{if(!t.metaKey&&!t.ctrlKey&&!t.shiftKey&&!t.altKey&&!(t.button>0)){if(t.preventDefault(),ei.current){ei.current=!1,ea.current&&(clearTimeout(ea.current),ea.current=null);return}eu(),ee(!0),(0,C.ZP)("hit",`/items/${e.searchId}`),k.ZP.send({hitType:"pageview",page:`/items/${e.searchId}`})}},ex=(0,m.useRouter)();r.useEffect(()=>{et.current=!1,W(!1)},[ex]),r.useEffect(()=>()=>{es.current&&clearTimeout(es.current),ea.current&&clearTimeout(ea.current)},[]);let eh=()=>
1{eo&&el.forEach(e=>{let t=(0,u.Z)(_(e));!t||en.current.has(t)||(new window.Image().src=t,en.current.add(t))})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:`ProductTable-row ${K?"Product--flash":""}`,children:[(0,a.jsxs)("button",{type:"button",className:`ProductTable-cell-image flex justify-center items-center ${t?"md:!h-16 md:!w-16 !p-1":""}`,onMouseEnter:()=>{eh(),es.current&&clearTimeout(es.current),es.current=setTimeout(()=>B(!0),300)},onMouseLeave:()=>{es.current&&(clearTimeout(es.current),es.current=null),B(!1)},onClick:em,"aria-label":`ÐÑкÑÑÑÑ ÐºÐ°ÑÑоÑÐºÑ ÑоваÑа: ${e.title}${eo?`, ÑоÑо ${D+1} из ${el.length}`:""}`,children:[(0,a.jsx)("div",{style:{background:"#fff"},className:`ProductTable-ThumbImage ${A?"ProductTable-ThumbImage--shown flex justify-center items-center":""}`,children:(0,a.jsx)("img",{src:ed,alt:"",decoding:"async"})}),(0,a.jsxs)("div",{className:"ProductTable-ImageStage",onMouseMove:e=>{if(!eo)return;let t=e.currentTarget.getBoundingClientRect();if(t.width<=0)return;let s=Math.max(0,Math.min(t.width-.01,e.clientX-t.left)),a=Math.min(el.length-1,Math.floor(s/t.width*el.length));G(e=>e===a?e:a)},onTouchStart:e=>{if(!eo)return;eh();let t=e.touches[0];er.current=t?{x:t.clientX,y:t.clientY}:null},onTouchEnd:e=>{let t=er.current,s=e.changedTouches[0];if(er.current=null,!eo||!t||!s)return;let a=s.clientX-t.x,r=s.clientY-t.y;32>Math.abs(a)||Math.abs(a)<=Math.abs(r)||(ei.current=!0,ea.current&&clearTimeout(ea.current),ea.current=setTimeout(()=>{ei.current=!1,ea.current=null},500),G(e=>Math.max(0,Math.min(el.length-1,e+(a<0?1:-1)))))},onTouchCancel:()=>{er.current=null},children:[(0,a.jsx)("img",{src:ed,alt:"",decoding:"async"}),eo&&(0,a.jsxs)("span",{className:"ProductTable-ImageCounter","aria-hidden":"true",children:[(0,a.jsx)("span",{className:"ProductTable-ImageCounterCurrent",children:D+1}),(0,a.jsxs)("span",{children:[" / ",el.length]})]})]})]}),(0,a.jsxs)("div",{className:"ProductTable-content",children:[(0,a.jsxs)("div",{className:`ProductTable-content-props ProductTable-cell ${t?"md:!grid md:!w-44 md:shrink-0 md:grid-cols-[auto_minmax(0,1fr)] md:content-start md:gap-x-2 md:gap-y-1":""}`,children:[(0,a.jsx)("span",{className:"ProductTable-content-props-title",children:"код"}),(0,a.jsx)("span",{className:"ProductTable-content-props-value",children:e.code}),(0,a.jsx)("span",{className:`ProductTable-content-props-title ${t?"md:!mt-0":"mt-2"}`,children:(0,a.jsx)(l,{article:e.article,labelOnly:!0})}),(0,a.jsx)("span",{className:"ProductTable-content-props-value",children:(0,a.jsx)(l,{article:e.article})})]}),(0,a.jsxs)("div",{className:"ProductTable-content-body ProductTable-cell mt-1 ml-2",children:[(0,a.jsxs)("div",{className:"ProductTable-cell-title",children:[(0,a.jsx)(o(),{href:(0,i.O6)(e,E),onClick:e=>em(e),className:"text-black",children:(0,a.jsx)("span",{className:v()({new_span:e.isNew}),children:e.title})}),(null===(n=e.properties)||void 0===n?void 0:null===(s=n.extra)||void 0===s?void 0:s.length)>1&&(0,a.jsx)("div",{className:"text-xs",children:(0,a.jsxs)("span",{children:[" ",e.properties.extra]})}),e.properties&&e.properties.type.length>1&&(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"Ñип:"}),(0,a.jsxs)("span",{children:[" ",e.properties.type]})]}),(null===(x=e.properties)||void 0===x?void 0:null===(c=x.size)||void 0===c?void 0:c.length)>1&&(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"ÑазмеÑ:"}),(0,a.jsxs)("span",{children:[" ",e.properties.size]})]}),(null===(P=e.properties)||void 0===P?void 0:null===(b=P.tnved)||void 0===b?void 0:b.length)>1&&(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsx)("span",{className:"text-gray-600",children:"код ТÐÐÐÐ:"}),(0,a.jsxs)("span",{children:[" ",e.properties.tnved]})]}),null===(I=e.catalogItemProperties)||void 0===I?void 0:I.map(e=>(0,a.jsxs)("div",{className:"text-xs space-x-1",children:[(0,a.jsxs)("span",{className:"text-gray-500",children:[e.title,":"]}),(0,a.jsx)("span",{children:e.value})]},e.id)),(0,a.jsx)(T.G,{feature:e.accountingFeature,className:"ProductTable-accounting-feature-mobile mt-1",iconOnly:!0,tnved:null===(Z=e.properties)||void 0===Z?void 0:Z.tnved})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,a.jsx)($.Ee,{item:e}),(0,a.jsx)($.nI,{item:e}),e.title.includes("Ð ÐСÐÐ ÐÐÐÐÐ")&&(0,a.jsx)("div",{className:"text-[11px] rounded-md px-2 flex space-x-1 my-1 cursor-pointer bg-[#00e2ff] font-medium",onClick:()=>Y(!0),children:(0,a.jsx)("span",{children:"Ð ÐСÐÐ ÐÐÐÐÐ"})}),e.title.includes("ÐÐЦÐЯ")&&(0,a.jsx)("div",{className:"text-[11px] rounded-md px-2 flex space-x-1 my-1 cursor-pointer bg-[#00e2ff] font-medium",onClick:()=>Y(!0),children:(0,a.jsx)("span",{children:"ÐÐЦÐЯ"})}),e.title.includes("CEAT")&&(0,a.jsx)("div",{className:"text-[11px] rounded-md px-2 flex space-x-1 my-1 cursor-pointer bg-[#fe6449] font-medium",onClick:()=>Y(!0),children:(0,a.jsx)("span",{children:"Ð ÐÐÐÐ ÐÐÐРСÐÐÐÐÐÐРЦÐÐЫ -40%"})})]}),e.hasAnalogs&&(0,a.jsx)("div",{className:"mt-1",children:(0,a.jsxs)(i.dR,{item:e,className:"inline-flex items-center gap-1 text-xs font-normal text-gray-500 hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-gray-500",children:[(0,a.jsx)(f.Z,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"ÐоказаÑÑ Ð°Ð½Ð°Ð»Ð¾Ð³Ð¸"]})})]}),(Q||(null===(R=e.accountingFeature)||void 0===R?void 0:R.usageKind))&&(0,a.jsxs)("div",{className:"ProductTable-cell ProductTable-actions mt-1 flex items-start gap-2 border-r border-r-slate-300 pr-2",children:[(0,a.jsx)(T.G,{feature:e.accountingFeature,className:"ProductTable-accounting-feature-desktop",iconOnly:!0,tnved:null===(q=e.properties)||void 0===q?void 0:q.tnved}),Q&&(0,a.jsx)("button",{type:"button",className:"flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center",onClick:()=>{g.Z.items.set_favorite(e.id),O(!F)},"aria-label":F?"УдалиÑÑ ÑÐ¾Ð²Ð°Ñ Ð¸Ð· избÑанного":"ÐобавиÑÑ ÑÐ¾Ð²Ð°Ñ Ð² избÑанное",children:(0,a.jsx)(N.Z,{className:v()("h-5","w-5","stroke-[1.5]",{"text-red-600":F},{"fill-red-200":F})})})]}),J&&(0,a.jsx)("div",{className:"ProductTable-cell-price ProductTable-cell mt-1",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold tracking-tighter",children:(0,d.Z)(e.price)}),e.priceBefore!==e.price&&(0,a.jsx)("div",{className:"text-sm decoration-2 text-gray-500 line-through font-semibold decoration-orange-600/70",children:(0,d.Z)(e.priceBefore)}),(0,a.jsx)($.et,{item:e}),e.isRemote&&"Ð½ÐµÑ Ð½Ð° Ñкладе"!==e.avaiableQty&&(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"ProductTable-remote-label text-xs font-semibold cursor-pointer bg-[#fec949] whitespace-nowrap rounded-md px-1 py-1",children:"13 дней"})})]})}),!J&&(0,a.jsxs)("div",{className:"ProductTable-cell-price ProductTable-cell mt-1",children:[(0,a.jsx)("span",{className:"font-semibold ",children:(0,d.Z)(e.price)}),e.priceBefore!==e.price&&(0,a.jsx)("div",{className:"text-xs decoration-2 text-gray-500 line-through font-semibold decoration-orange-600/70",children:(0,d.Z)(e.priceBefore)}),(0,a.jsx)($.et,{item:e}),!Q&&e.avaiable&&(0,a.jsxs)("div",{className:"flex space-x-1 text-blue-400",children:[(0,a.jsx)(y.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"в налиÑии"})]}),!Q&&!e.avaiable&&(0,a.jsxs)("div",{className:"flex space-x-1 text-red-400",children:[(0,a.jsx)(w.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"в пÑÑи"})]}),e.isRemote&&"Ð½ÐµÑ Ð½Ð° Ñкладе"!==e.avaiableQty&&(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"ProductTable-remote-label text-xs font-semibold cursor-pointer bg-[#fec949] whitespace-nowrap rounded-md px-1 py-1",children:"13 дней"})})]}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"ProductTable-cell ProductTable-cell-qty mt-1",children:[(0,a.jsx)("span",{className:"ProductTable-stock-label",children:"ÐÑÑаÑок:"}),(0,a.jsx)("span",{className:"text-sm",children:e.avaiableQty})]}),(0,a.jsx)("div",{className:"ProductTable-cell-form ProductTable-cell",children:(0,a.jsx)(p.Z,{item:e})})]})]})]}),(0,a.jsx)(S,{isOpen:H,onClose:()=>ee(!1),item:L||e}),(0,a.jsx)(M,{isOpen:X,onClose:()=>Y(!1),item:e})]})},R=({compact:e=!1})=>{let{canOrder:t}=(0,j.Z)();return(0,a.jsxs)("div",{className:"ProductTable-head",children:[(0,a.jsx)("div",{className:`ProductTable-head-image ${e?"md:!w-16":""}`}),(0,a.jsxs)("div",{className:"ProductTable-head-body",children:[(0,a.jsx)("div",{className:`ProductTable-head-props ${e?"md:!w-44":""}`}),(0,a.jsx)("div",{className:"ProductTable-head-content"}),(0,a.jsx)("div",{className:"ProductTable-head-price",children:"Цена"}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"ProductTable-cell ProductTable-actions",style:{marginTop:"8px",paddingRight:10}}),(0,a.jsx)("div",{className:"ProductTable-head-qty",children:"ÐÑÑаÑок"}),(0,a.jsx)("div",{className:"ProductTable-head-order"})]})]})]})};let q=e=>{let t=(0,i.Kv)();return e.items.length>0?(0,a.jsx)(i.cW,{value:e.sourceAttribution||t,children:(0,a.jsxs)("div",{className:"ProductsTable",children:[(0,a.jsx)(R,{compact:e.compact}),(0,a.jsx)("div",{className:"ProductTable-body",children:e.items.map((t,s)=>(0,a.jsx)(Z,{item:t,compact:e.compact},t.id))})]})}):null};q.defaultProps={items:[]};var E=q},4224:function(e,t,s){var a=s(5893),r=s(8575),i=s(6979),n=s(3681),l=s(9472),c=s(1594),o=s(6651),d=s(5350),u=s(7294),m=s(5192),x=s(4622),h=s(8100),p=s(4335),g=s(4003),b=s(4315),v=s(9302),j=s(284);let f=e=>e.isOwner?e.name:e.userName,N=({cartTitle:e,currentQty:t,pending:s,onChange:r})=>{let[l,c]=u.useState(t.toString()),o=t>0?1:0,d=(0,v.Z)(async e=>{await r(e)||c(t.toString())},500);u.useEffect(()=>{d.cancel(),c(t.toString())},[t,d]),u.useEffect(()=>()=>d.cancel(),[d]);let m=e=>{if(!s){if(!Number.isFinite(e)||e===t||e<o){d.cancel(),c(t.toString());return}c(e.toString()),d.callback(e)}},x=Number.parseInt(l,10),h=Number.isNaN(x)?t:x;return(0,a.jsxs)("div",{className:`MobileCartSheet-counter ${s?"MobileCartSheet-counter--pending":""}`,"aria-busy":s,children:[(0,a.jsx)("button",{type:"button",onClick:()=>m(Math.max(o,h-1)),disabled:s||h<=o,"aria-label":`УменÑÑиÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво в коÑзине ${e}`,children:(0,a.jsx)(i.Z,{"aria-hidden":"true"})}),(0,a.jsx)("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*","aria-label":`ÐолиÑеÑÑво ÑоваÑа в коÑзине ${e}
1`,value:l,onChange:e=>{/^\d*$/.test(e.target.value)&&c(e.target.value)},onBlur:()=>m(Number.parseInt(l,10)),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},disabled:s}),(0,a.jsx)("button",{type:"button",onClick:()=>m(Math.max(1,h+1)),disabled:s,"aria-label":`УвелиÑиÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво в коÑзине ${e}`,children:(0,a.jsx)(n.Z,{"aria-hidden":"true"})})]})},y=({item:e,carts:t,placements:s,currentCartId:i,canSelectCart:n,presentation:o="list"})=>{var d;let[m,x]=u.useState(!1),[b,v]=u.useState(null),[j,y]=u.useState(null),w=u.useRef(!1),P=new Map(s.map(e=>[e.id,e])),C=n?t:t.filter(e=>e.id===i),k=C.length>1,I=t.find(e=>e.id===i),T=Number((null===(d=P.get(i))||void 0===d?void 0:d.qty)||0),$=I?f(I):"ÐлавнаÑ",_=async(e,t)=>{if(w.current)return!1;w.current=!0,v(e),y(null);try{return await t(),await (0,h.JG)("carts"),!0}catch{return y("Ðе ÑдалоÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ ÐºÐ¾Ð»Ð¸ÑеÑÑво. ÐÑовеÑÑÑе Ñоединение и попÑобÑйÑе еÑÑ Ñаз."),!1}finally{w.current=!1,v(null)}},S=(0,r.Kv)(),M=(t,s)=>_(`qty:${t}`,async()=>{var a;let r=await p.hi.post("/carts/add_item",{itemId:e.id,qty:s,cartId:t,sourceAttribution:S});if((null===(a=r.data)||void 0===a?void 0:a.success)===!1)throw Error("add_item failed");return r}),Z=()=>{w.current||(x(!1),y(null))};return(0,a.jsxs)("div",{className:"card"===o?"block md:hidden":"OrderContainer-mobile",children:[(0,a.jsxs)("div",{className:`MobileCartAction-controls ${k?"":"MobileCartAction-controls--single"}`,children:[k?(0,a.jsx)("button",{type:"button",className:"MobileCartAction-more",onClick:()=>{y(null),x(!0)},"aria-label":"ÐÑкÑÑÑÑ Ð²ÑÐ±Ð¾Ñ ÐºÐ¾Ñзин",disabled:!!b,children:(0,a.jsx)(l.Z,{"aria-hidden":"true"})}):null,i&&(0,a.jsx)(N,{cartTitle:$,currentQty:T,pending:!!b,onChange:e=>M(i,e)})]}),j&&!m&&(0,a.jsx)("div",{className:"MobileCartAction-error",role:"alert",children:j}),k?(0,a.jsxs)(g.V,{as:"div",className:"MobileCartSheet",open:m,onClose:Z,children:[(0,a.jsx)("div",{className:"MobileCartSheet-backdrop","aria-hidden":"true"}),(0,a.jsx)("div",{className:"MobileCartSheet-positioner",children:(0,a.jsxs)(g.V.Panel,{className:"MobileCartSheet-panel",children:[(0,a.jsxs)("div",{className:"MobileCartSheet-header",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(g.V.Title,{className:"MobileCartSheet-title",children:"ÐоÑзинÑ"}),(0,a.jsx)("p",{className:"MobileCartSheet-subtitle",children:"ÐолиÑеÑÑво ÑоваÑа в каждой коÑзине"})]}),(0,a.jsx)("button",{type:"button",className:"MobileCartSheet-close",onClick:Z,"aria-label":"ÐакÑÑÑÑ Ð²ÑÐ±Ð¾Ñ ÐºÐ¾ÑзинÑ",disabled:!!b,children:(0,a.jsx)(c.Z,{"aria-hidden":"true"})})]}),j&&(0,a.jsx)("div",{className:"MobileCartSheet-error",role:"alert",children:j}),(0,a.jsx)("div",{className:"MobileCartSheet-list",children:C.map(e=>{let t=P.get(e.id),s=Number((null==t?void 0:t.qty)||0),r=f(e);return(0,a.jsxs)("div",{className:"MobileCartSheet-row",children:[(0,a.jsx)("span",{className:"MobileCartSheet-cartName",children:r}),(0,a.jsx)(N,{cartTitle:r,currentQty:s,pending:!!b,onChange:t=>M(e.id,t)})]},e.id)})})]})})]}):null]})},w=({item:e,cart:t,cartIds:s,cartSelectable:i=!1})=>{let[n,l]=u.useState(t?t.qty:void 0),[c,d]=u.useState(!1),m=(0,r.Kv)(),x=u.useRef(!1),g=async s=>{let a;if(console.log(n),s&&s.preventDefault(),a=s?n||1:n,t){d(!0);try{await p.hi.post("/carts/add_item",{itemId:e.id,qty:a||0,cartId:t.id,sourceAttribution:m}),(0,h.JG)("carts")}catch(e){d(!1)}}},b=(0,v.Z)(()=>{g()},500);return(0,a.jsxs)("div",{children:[(0,a.jsx)("form",{onSubmit:g,children:(0,a.jsxs)("div",{className:"flex space-x-1",children:[(0,a.jsx)(j.Z,{qty:n,setQty:e=>{console.log(e),l(e),!1===x.current&&t&&t.qty&&b.callback()},onFocus:()=>{x.current=!0},onBlur:()=>{x.current=!1,(null==t?void 0:t.qty)&&g()},handleSubmit:g}),(0,a.jsx)("button",{type:"submit",className:`border px-2 rounded-md ${(null==t?void 0:t.qty)===n&&n||c?"bg-blue-400":""}`,children:(0,a.jsx)(o.Z,{className:"h-5 w-5"})})]})}),t&&i&&(0,a.jsx)(P,{cartIds:s,cart:t,item:e})]})},P=({cartIds:e,cart:t,item:s})=>{let r=async e=>{await p.hi.post("/carts/move_item",e),(0,h.JG)("carts")},[i]=(0,m.Z)();return(0,a.jsx)("div",{children:(0,a.jsx)(b.v,{children:(0,a.jsxs)("div",{className:"relative mt-1 select-none",children:[(0,a.jsxs)(b.v.Button,{className:"relative text-xs w-full cursor-pointer rounded-lg bg-white py-1 pl-1 pr-10 text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm",children:[(0,a.jsx)("span",{className:"block truncate text-xs",children:t.isOwner?t.name:t.userName}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:(0,a.jsx)(d.Z,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),(0,a.jsxs)(b.v.Items,{className:"z-10 min-w-[180px] absolute mt-1 max-h-60 right-0 overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:[(0,a.jsx)("div",{className:"px-3 py-2 select-none text-xs font-medium bg-gray-200",children:"ÐеÑемеÑÑиÑÑ Ð² коÑзин
1Ñ:"}),i&&i.list&&i.list.map(i=>e&&e.includes(i.id)?null:(0,a.jsx)(b.v.Item,{children:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"block truncate cursor-pointer px-3 py-2 hover:bg-orange-200 border-b text-xs",onClick:()=>{t&&(r({itemId:s.id,cartId:t.id,targetCartId:i.id}),(0,h.JG)("carts"))},children:i.isOwner?i.name:i.userName})})},i.id))]})]})})})},C=({cartIds:e,cart:t,item:s})=>{let i=(0,r.Kv)(),l=async e=>{await p.hi.post("/carts/add_item",{...e,sourceAttribution:i}),(0,h.JG)("carts")},[c]=(0,m.Z)();return(0,a.jsx)("div",{children:(0,a.jsx)(b.v,{children:(0,a.jsxs)("div",{className:"relative mt-1 select-none",children:[(0,a.jsxs)(b.v.Button,{className:"relative text-xs w-full cursor-pointer rounded-md bg-white py-1 text-left border focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm",children:[(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 left-2 flex items-center pr-3",children:(0,a.jsx)(n.Z,{className:"h-4 w-4 text-gray-800","aria-hidden":"true"})}),(0,a.jsx)("span",{className:"block truncate text-xs ml-8",children:"ÐаказаÑÑ ÐµÑе"})]}),(0,a.jsxs)(b.v.Items,{className:"z-10 min-w-[180px] absolute mt-1 max-h-60 right-0 overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:[(0,a.jsx)("div",{className:"px-3 py-2 select-none text-xs font-medium bg-gray-200",children:"ÐаказаÑÑ Ð² коÑзинÑ:"}),c&&c.list&&c.list.map(r=>e&&e.includes(r.id)?null:(0,a.jsx)(b.v.Item,{children:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"block truncate cursor-pointer px-3 py-2 hover:bg-orange-200 border-b text-xs",onClick:()=>{t&&(l({itemId:s.id,qty:1,cartId:r.id}),(0,h.JG)("carts"))},children:r.isOwner?r.name:r.userName})})},r.id))]})]})})})};t.Z=({item:e,presentation:t="list"})=>{var s,r;let{canSelectCart:i}=(0,x.Z)(),[n]=(0,m.Z)(),l=null==n?void 0:null===(s=n.cartItems)||void 0===s?void 0:s[e.id],c=(null==l?void 0:l.carts)||[],o=(null==l?void 0:l.cartIds)||[];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"card"===t?"hidden md:block":"OrderContainer-desktop",children:[n&&c.length>0&&(0,a.jsx)("div",{className:"Product-carts space-y-2",children:c.map(t=>(0,a.jsx)(w,{item:e,cart:t,cartIds:o,cartSelectable:i},t.id))}),n&&!l&&n.currentId&&(0,a.jsx)(w,{item:e,cart:{id:n.currentId,qty:void 0,name:"Ð½Ð¾Ð²Ð°Ñ ÐºÐ¾Ñзина",isOwner:!0,userName:""},cartIds:[]}),n&&l&&i&&(0,a.jsx)(C,{item:e,cartIds:o,cart:{}})]}),n&&(null===(r=n.list)||void 0===r?void 0:r.length)>0&&(0,a.jsx)(y,{item:e,carts:n.list,placements:c,currentCartId:n.currentId,canSelectCart:i,presentation:t})]})}},9749:function(e,t,s){s.d(t,{Ee:function(){return u},Iu:function(){return x},et:function(){return m},nI:function(){return d},o7:function(){return c}});var a=s(5893),r=s(1664),i=s.n(r),n=s(5457);let l=e=>`â${e.percent}% Ð¾Ñ ${e.minimumQuantity} ÑÑ.`;function c({detail:e,className:t=""}){return(0,a.jsxs)("span",{className:`inline-flex w-fit max-w-full items-center gap-1 ${t}`,children:[(0,a.jsx)("span",{className:"inline-flex items-center rounded-[3px] bg-[#fec949] px-1.5 py-1 text-[10px] font-bold uppercase leading-none !text-black",children:"ÐкÑиÑ"}),(0,a.jsx)("span",{className:"inline-flex items-center whitespace-nowrap rounded-[3px] border border-[#fec949] bg-white px-1.5 py-[3px] text-[10px] font-bold leading-none !text-black",children:e})]})}let o=e=>{var t;return null===(t=e.promotionOffers)||void 0===t?void 0:t[0]};function d({item:e}){var t;let s=null===(t=e.rewardCampaignOffers)||void 0===t?void 0:t[0];return s?(0,a.jsx)(i(),{href:s.path,className:"inline-flex w-fit rounded-[3px] !text-black transition-opacity hover:!text-black hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-1",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(c,{detail:"ÐокÑпка идÑÑ Ð² заÑÑÑ"})}):null}function u({item:e}
1){let t=o(e);if(!t)return null;let s=e.promotionOffers.length>1?`Ðо â${t.percent}% по акÑиÑм`:l(t);return(0,a.jsx)(i(),{href:t.path,className:"inline-flex w-fit rounded-[3px] !text-black transition-opacity hover:!text-black hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-1",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(c,{detail:s})})}function m({item:e}){let t=o(e);return!t||t.unitPrice>=e.price?null:(0,a.jsxs)("div",{className:"mt-0.5 whitespace-nowrap text-[11px] font-semibold text-blue-700",children:[(0,n.Z)(t.unitPrice)," Ð¾Ñ ",t.minimumQuantity," ÑÑ."]})}function x({item:e}){let t=o(e);return(0,a.jsxs)("section",{className:"my-3 flex flex-wrap items-start justify-between gap-3","aria-label":"Цена и акÑии",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[t?(0,a.jsx)(u,{item:e}):null,(0,a.jsx)(d,{item:e})]}),(0,a.jsxs)("div",{className:"ml-auto text-right",children:[(0,a.jsx)("div",{className:"whitespace-nowrap text-base font-semibold text-slate-950",children:(0,n.Z)(e.price)}),(0,a.jsx)(m,{item:e})]})]})}}}]);
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.