PageSourceSearch

https://1bazar.ru/_nuxt/C3AuLy_h.js

js 1bazar.ru collected 2026-10-09 23:50:17 UTC 7,210 bytes, 1 lines download raw bytes

1import{D as e,E as t,On as n,Zn as r,_ as i,b as a,bt as o,g as s,k as c,mt as l,o as u,tr as d,v as f,y as p}from"./B8D2lM98.js";import{w as m}from"./BC7yJqS7.js";import{g as h}from"./BIKYXcYg.js";import{t as g}from"./5G39QaEQ.js";import{t as _}from"./BT0XwRFK.js";import{t as v}from"./D_DmKUli.js";import{r as y}from"#entry";import{t as b}from"./D6ae8Use.js";var x=[`pickup`,`transport_company`],S={pickup:`Самовывоз`,transport_company:`Доставка транспортной компанией`},C={pickup:`Самовывоз`,transport_company:`Доставка`},w=`Стоимость и сроки будут рассчитаны при оформлении.`;function T(e){return S[e]??e}function E(e){return C[e]??e}function D(e){return e?e.filter(e=>e.type!==`pickup`||!!(e.locality?.display_name&&e.locality.display_name.trim().length>0)).sort((e,t)=>{let n=e.type,r=t.type,i=x.indexOf(n),a=x.indexOf(r);return(i===-1?999:i)-(a===-1?999:a)}):[]}function O(e){return e?Array.from(new Set(e)).sort((e,t)=>{let n=x.indexOf(e),r=x.indexOf(t);return(n===-1?999:n)-(r===-1?999:r)}):[]}var k=[`aria-label`],A=[`title`,`aria-label`,`data-testid`],j=c({__name:`ProductReceivingBadges`,props:{options:{}},setup(e){let t=e,n=s(()=>D(t.options??[])),r=e=>e.type===`pickup`&&e.locality?.display_name?`Самовывоз · ${e.locality.display_name}`:E(e.type),i=e=>{if(e.type===`pickup`&&e.locality?.display_name)return`Самовывоз: ${e.locality.display_name}`},c=s(()=>n.value.length===0?`Способы получения недоступны`:`Способы получения: ${n.value.map(e=>e.type===`pickup`&&e.locality?.display_name?`Самовывоз: ${e.locality.display_name}`:E(e.type)).join(`, `)}`);return(e,t)=>n.value.length>0?(l(),a(`div`,{key:0,class:`product-receiving-badges flex flex-wrap gap-1 items-center`,"aria-label":c.value,role:`group`},[(l(!0),a(u,null,o(n.value,e=>(l(),a(`span`,{key:e.type,class:`inline-flex items-center px-1.5 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-700 leading-none truncate max-w-full`,title:i(e),"aria-label":i(e),"data-testid":`receiving-badge-${e.type}`},d(r(e)),9,A))),128))],8,k)):p(``,!0)}}),M={class:`relative`},N=[`src`,`alt`],P={key:0,class:`absolute top-2 left-2 flex gap-1`},F={key:0,class:`flex items-start justify-between`},I=[`title`],L={key:1},R=[`aria-label`,`aria-pressed`],z={key:1,class:`flex items-center gap-1 text-[11px] text-text-caption`},B={key:2,class:`text-[11px] text-text-caption`},V={key:3,class:`text-[11px] text-text-caption`},H={"data-testid":`product-card-purchase-row`,class:`mt-auto flex flex-wrap items-center gap-x-3 gap-y-1.5 pt-2`},U=c({__name:`ProductCard`,props:{imageSrc:{},imageAlt:{},title:{},price:{},availabilityStatus:{},availabilityLabel:{},productId:{},maker:{},meta:{},rating:{},reviews:{},trusted:{type:Boolean},gift:{type:Boolean},showFavorite:{type:Boolean},variant:{default:`flat`},compact:{type:Boolean,default:!1},placement:{default:`storefront`},productionLeadTimeDays:{default:null},receivingOptions:{}},emits:[`toggleFavorite`],setup(o,{emit:c}){let u=o,x=c,S=g(),C=y(),w=h(),T=s(()=>u.productId?C.isFavorited(u.productId):!1),E=s(()=>{switch(u.availabilityStatus){case`made_to_order`:return`text-[rgb(78,94,84)]`;case`out_of_stock`:return`text-[rgb(122,116,108)]`;default:return`text-[rgb(49,104,79)]`}}),D=s(()=>{switch(u.availabilityStatus){case`made_to_order`:return`bg-surface-inset`;case`out_of_stock`:return`bg-text-muted`;default:return`bg-success`}});function O(){if(!S.isAuthenticated){w.push({name:`auth-login`});return}u.productId&&(C.toggle(u.productId),x(`toggleFavorite`,!T.value))}return(s,c)=>(l(),a(`article`,{class:r([`group flex h-full flex-col overflow-hidden rounded-lg bg-background lg:cursor-pointer lg:transition-[transform,box-shadow] lg:duration-250 lg:ease-out lg:hover:-translate-y-0.5`,o.variant===`elevated`?`shadow-[0_1px_6px_rgba(31,28,26,0.08)] lg:hover:shadow-[0_4px_16px_rgba(31,28,26,0.12)]`:`border border-border lg:hover:border-transparent lg:hover:shadow-lg`])},[i(`div`,M,[i(`img`,{src:o.imageSrc,alt:o.imageAlt,loading:`lazy`,decoding:`async`,class:r([`w-full object-cover`,o.compact?`aspect-[160/180] sm:aspect-[1.2/1]`:`aspect-[262/328]`,(o.variant===`elevated`&&o.compact,``)])},null,10,N),o.trusted||o.gift?(l(),a(`div`,P,[o.trusted?(l(),a(`span`,{key:0,class:r([`flex items-center justify-center rounded-full bg-brand-ink text-white shadow-sm`,o.compact?`h-6 w-6`:`h-7 w-7`]),title:`Проверено`},[e(n(_),{class:r(o.compact?`size-3.5`:`size-4`)},null,8,[`class`])],2)):p(``,!0),o.gift?(l(),a(`span`,{key:1,class:r([`roun
1ded-sm border border-text-caption bg-background/85 font-medium text-muted-foreground`,o.compact?`px-1.5 py-0.5 text-[10px]`:`px-2 py-1 text-xs`])},` Подарок `,2)):p(``,!0)])):p(``,!0)]),i(`div`,{class:r([`flex flex-1 flex-col space-y-1`,o.variant===`elevated`?`px-3 pt-3 pb-4`:o.compact?`px-2 pt-1.5 pb-2`:`px-3 pt-2 pb-3`])},[o.maker||o.showFavorite&&o.productId?(l(),a(`div`,F,[o.maker?(l(),a(`span`,{key:0,class:`text-xs text-text-body truncate`,title:o.maker},d(o.maker),9,I)):(l(),a(`span`,L)),o.showFavorite&&o.productId?(l(),a(`button`,{key:2,type:`button`,class:r([`flex items-center justify-center rounded-full transition duration-200 active:scale-90 h-11 w-11 shrink-0 -mt-3 -mr-3 -mb-3`,T.value?`text-primary-dark opacity-100`:`text-text-caption lg:opacity-0 lg:pointer-events-none lg:group-hover:opacity-100 lg:group-hover:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto lg:hover:text-primary-dark`]),"aria-label":T.value?`Убрать из избранного`:`В избранное`,"aria-pressed":T.value,onClick:m(O,[`stop`,`prevent`])},[e(b,{active:T.value,class:`size-6 transition-colors duration-200`},null,8,[`active`])],10,R)):p(``,!0)])):p(``,!0),i(`h3`,{class:r([`font-medium text-text-heading`,o.compact?`text-[13px] leading-5`:`text-sm`])},d(o.title),3),o.rating&&o.reviews?(l(),a(`div`,z,[e(n(v),{class:`size-3 fill-primary text-primary`}),i(`span`,null,d(o.rating),1),c[0]||=i(`span`,null,`·`,-1),i(`span`,null,d(o.reviews),1)])):p(``,!0),o.placement===`portfolio`&&o.productionLeadTimeDays?(l(),a(`p`,B,` Срок изготовления: `+d(o.productionLeadTimeDays)+` дней `,1)):o.meta&&!o.compact?(l(),a(`p`,V,d(o.meta),1)):p(``,!0),o.receivingOptions&&o.receivingOptions.length>0?(l(),f(j,{key:4,options:o.receivingOptions},null,8,[`options`])):p(``,!0),i(`div`,H,[o.placement===`portfolio`?(l(),a(`span`,{key:0,class:r([`inline-flex items-center gap-1.5 text-right font-medium leading-none whitespace-nowrap text-[rgb(78,94,84)]`,o.compact?`text-[10.5px]`:`text-[11.5px]`])},[...c[1]||=[i(`span`,{class:`size-2 rounded-full bg-surface-inset`,"aria-hidden":`true`},null,-1),t(` Образец по индивидуальному заказу `,-1)]],2)):(l(),a(`span`,{key:1,class:r([`inline-flex items-center gap-1.5 text-right font-medium leading-none whitespace-nowrap`,o.compact?`text-[10.5px]`:`text-[11.5px]`,E.value])},[i(`span`,{class:r([`size-2 rounded-full`,D.value]),"aria-hidden":`true`},null,2),t(` `+d(o.availabilityLabel),1)],2))])],2)],2))}});export{O as a,D as i,w as n,T as r,U 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.