PageSourceSearch

https://www.sharm-design.ru/_nuxt/DGJC15gX.js

js sharm-design.ru collected 2026-10-07 17:38:39 UTC 6,999 bytes, 1 lines download raw bytes

1import{_ as e,v as t}from"./DelGHXOQ.js";import{Bt as n,H as r,Lt as i,Q as a,W as o,d as s,dt as c,f as l,h as u,i as d,m as f,tt as p,v as m,vt as h,y as g,z as _}from"./CperuJCl.js";import{a as v,x as y}from"#entry";import{t as b}from"./hswQcFgp.js";var x=new Set([`6586fd69b4442int161700obrabotkaweb.webp`,`6ab69d99c3114chatgpt.image.20.sent.2026.g.183317.png`,`6ab69f06e8400sharmkitchen2048x1757.webp`,`6ab6a1e518c3bsharmkitchencatalog1440x960.webp`,`6ab6a43a86742sharmkitchenrio1440x1260.webp`,`64e893a55c8f230.0.webp`]),S=e=>e===`interior`||e===`isolated`;function C(e={},t){if(typeof t!=`string`||!t)return`isolated`;if(t===(e?.image||e?.mini_image)&&S(e?.image_presentation))return e.image_presentation;let n=(e?.images||e?.mini_images||[]).find(e=>e?.image===t&&S(e.presentation));return n?n.presentation:x.has(t)?`interior`:`isolated`}var w={class:`store-product-card store-product-card--retail`},T=[`src`,`alt`,`aria-hidden`,`loading`,`fetchpriority`],E=[`src`,`alt`,`loading`,`fetchpriority`],D=[`aria-label`,`aria-pressed`],O={key:0,class:`store-product-image-tabs`,"aria-label":`Фотографии товара`},k=[`aria-label`,`aria-pressed`,`onMouseenter`,`onFocus`,`onClick`],A={class:`store-product-body`},ee={key:0,class:`store-product-rating`},te={class:`store-product-swatches`},ne=[`src`,`alt`,`title`],re={key:0},ie={class:`store-product-price`},ae={key:0,class:`store-product-sale`},j={key:1},M={key:1,class:`store-product-sleeping`},N={class:`store-product-meta`},P={key:0},F={key:1},I={__name:`Product`,props:{product:{type:Object,required:!0},typePage:{type:String,default:`catalog`},eager:Boolean},emits:[`custom-event`],setup(x,{emit:S}){let I=x,L=S,{$store:R}=e(),z=t().public.mediaBase,B=c(0),V=s(()=>`/product/`+I.product.slug),H=s(()=>{let e=String(I.product.sleeping_place||``).trim(),t=Number(I.product.params?.sleeping_area_width),n=Number(I.product.params?.sleeping_area_depth),r=e&&!/^(?:0|нет|-|—)$/i.test(e)?e.replace(/\s*[xх×]\s*/gi,` × `):t>0&&n>0?`${t} × ${n}`:``;return r?/см\.?$/i.test(r)?r:`${r} см`:``}),U=s(()=>[...new Set([I.product.image||I.product.mini_image,...(I.product.images||I.product.mini_images||[]).map(e=>typeof e==`string`?e:e.image)].filter(Boolean))].slice(0,6)),W=s(()=>C(I.product,U.value[B.value])===`interior`),G=c(!1),K=b({count:()=>U.value.length,move:e=>{B.value=(B.value+e+U.value.length)%U.value.length}}),q=s(()=>[...new Map([I.product.color,...(I.product.params_third?.color_product||[]).map(e=>e.product?.color)].filter(Boolean).map(e=>[e.id,e])).values()]),J=s(()=>{let e=I.product.product_reviews||[];return e.length?(e.reduce((e,t)=>e+Number(t.rating),0)/e.length).toFixed(1).replace(`.0`,``):``}),oe=s(()=>{let e=I.product.product_reviews?.length||0,t=new Intl.PluralRules(`ru`).select(e);return e+` `+{one:`отзыв`,few:`отзыва`,many:`отзывов`,other:`отзыва`}[t]}),Y=s(()=>R.getters[`favorite/data`].some(e=>e.id===I.product.id)),X=e=>new Intl.NumberFormat(`ru-RU`,{style:`currency`,currency:`RUB`,maximumFractionDigits:0}).format(Number(e)||0),Z=e=>e?z+`/storage/products/thumb/480/`+e:`/favicon.ico`;function se(e){e?.pointerType&&e.pointerType!==`mouse`||G.value||U.value.length<2||(G.value=!0,U.value.slice(1).forEach(e=>{let t=new Image;t.src=Z(e)}))}function ce(e){if(K.track(e),K.active||e.pointerType!==`mouse`||U.value.length<2)return;let t=e.currentTarget.getBoundingClientRect();if(!t.width)return;let n=Math.min(Math.max(e.clientX-t.left,0),t.width-1);B.value=Math.min(U.value.length-1,Math.floor(n/t.width*U.value.length))}function Q(e){e?.pointerType&&e.pointerType!==`mouse`||(B.value=0)}function le(){R.commit(Y.value?`favorite/delete`:`favorite/add`,I.product.id)}function $(){R.commit(`cart/add`,{...I.product,image:I.product.image||I.product.mini_image,size_price:0}),L(`custom-event`,!0)}return a(()=>I.product.id,()=>{B.value=0,G.value=!1,K.cancel()}),(e,t)=>{let a=v,s=o(`v-icon`),c=o(`v-rating`);return _(),u(`article`,w,[l(`div`,{class:i([`store-product-media`,{"store-product-media--interior":h(W)}]),onPointerleave:Q,onPointercancel:Q},[g(a,{to:h(V),"aria-label":x.product.title,class:i([`store-product-image`,{"swiper-no-swiping":h(U).length>1}]),onPointerdown:h(K).start,onPointerup:h(K).end,onPointercancel:h(K).cancel,onLostpointercapture:h(K).cancel,onClickCapture:h(K).click,onDragstart:t[0]||=y(()=>{},[`prevent`]),onPointerenter:se,onPointermove:ce},{default:p(()=>[l(`img`,{src:Z(h(U)[h(B)]),class:i({"store-product-image-spacer":h(W)}),alt:h(W)?``:x.product.title,"aria-hidden":h(W)?!0:void 0,loading:x.eager?`eager`:`lazy`,fetchpriority:x.eager?`high`:`auto`,width:`480`,height:`360`}
1,null,10,T),h(W)?(_(),u(`img`,{key:0,class:`store-product-interior-image`,src:Z(h(U)[h(B)]),alt:x.product.title,loading:x.eager?`eager`:`lazy`,fetchpriority:x.eager?`high`:`auto`,width:`480`,height:`360`},null,8,E)):f(``,!0)]),_:1},8,[`to`,`aria-label`,`class`,`onPointerdown`,`onPointerup`,`onPointercancel`,`onLostpointercapture`,`onClickCapture`]),l(`button`,{class:i([`store-product-favorite`,{selected:h(Y)}]),"aria-label":h(Y)?`Убрать из избранного`:`Добавить в избранное`,"aria-pressed":h(Y),onClick:le},[g(s,{size:`21`},{default:p(()=>[m(n(h(Y)?`mdi-heart`:`mdi-heart-outline`),1)]),_:1})],10,D),h(U).length>1?(_(),u(`div`,O,[(_(!0),u(d,null,r(h(U),(e,t)=>(_(),u(`button`,{key:e,class:i({active:h(B)===t}),"aria-label":`Фото `+(t+1),"aria-pressed":h(B)===t,onMouseenter:e=>B.value=t,onFocus:e=>B.value=t,onClick:e=>B.value=t},null,42,k))),128))])):f(``,!0)],34),l(`div`,A,[l(`h3`,null,[g(a,{to:h(V)},{default:p(()=>[m(n(x.product.title),1)]),_:1},8,[`to`])]),Number(h(J))>0?(_(),u(`div`,ee,[g(c,{readonly:``,"half-increments":``,"model-value":Number(h(J)),"aria-label":`Оценка ${h(J)} из 5`},null,8,[`model-value`,`aria-label`]),l(`strong`,null,n(h(J)),1),l(`span`,null,n(h(oe)),1)])):f(``,!0),l(`div`,te,[(_(!0),u(d,null,r(h(q).slice(0,4),e=>
1(_(),u(`img`,{key:e.id,src:h(z)+e.image,alt:e.title,title:e.title,width:`18`,height:`18`,loading:`lazy`},null,8,ne))),128)),h(q).length>4?(_(),u(`span`,re,`+`+n(h(q).length-4),1)):f(``,!0)]),l(`div`,ie,[x.product.sale>0?(_(),u(`span`,ae,`−`+n(x.product.sale)+`%`,1)):f(``,!0),l(`strong`,null,n(X(x.product.final_price)),1),x.product.sale>0?(_(),u(`del`,j,n(X(x.product.price)),1)):f(``,!0)]),h(H)?(_(),u(`div`,M,[t[1]||=l(`span`,null,`Спальное место`,-1),l(`strong`,null,n(h(H)),1)])):f(``,!0),l(`div`,N,[x.product.width&&x.product.depth&&x.product.height?(_(),u(`span`,P,n(x.product.width)+` × `+n(x.product.depth)+` × `+n(x.product.height)+` см`,1)):f(``,!0),x.product.estimated_delivery_time?(_(),u(`span`,F,`Доставка: `+n(x.product.estimated_delivery_time)+` `+n(/^\d+$/.test(String(x.product.estimated_delivery_time))?`дн.`:``),1)):f(``,!0)]),l(`button`,{class:`store-product-add`,onClick:$},[g(s,{size:`18`},{default:p(()=>[...t[2]||=[m(`mdi-cart-plus`,-1)]]),_:1}),t[3]||=m(` В корзину`,-1)])])])}}};export{I as t};

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.