1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
import{A as e,At as t,F as n,G as r,M as i,Nt as a,Pt as o,R as s,_ as c,c as l,d as u,f as d,g as f,h as ee,i as p,k as m,l as h,nt as g,t as _,u as v,ut as y,v as b}from"./_plugin-vue_export-helper-1xMDlcEE.js";import{l as x,r as te}from"./BasicIcon-DPmc0iaK.js";import{n as ne}from"./dist-Bc4P4ngC.js";import{o as S}from"./format-C72AoJ2H.js";import{n as C}from"./http-CU_N-R2R.js";import{C as re,a as ie,c as ae,i as oe,l as se,o as ce,s as w}from"./index-DYwnTikp.js";import{t as T}from"./IconChevronBack-BsHmfODG.js";import{t as le}from"./PageSkeleton-DYdjm4l9.js";import{n as ue,r as de,t as fe}from"./crm-CgnSby61.js";import{t as pe}from"./useGoBack-DnRfwA4b.js";import{t as me}from"./useTouchSwipe-C8fUyAcQ.js";import{t as he}from"./bannerLink-BW8t2Oqp.js";import{t as ge}from"./IconBookmark-CQq-TOS-.js";import{t as _e}from"./IconHeart-CvzbNH_T.js";import{n as E,t as D}from"./AddressCompletionModal-DV8NqYZ8.js";import{n as O,t as ve}from"./productAvailability-B5nVr_sJ.js";async function ye(){return C(`/suggestions/me`)}var be=`/assets/level-medal-Avpe4Lqa.webp`,xe=`/assets/quick-categories-grid-MFEfEUjL.webp`,Se=`/assets/quick-catalog-request-Ck7EqicC.webp`,Ce=`/assets/latest-order-status-CfJ1sx5U.webp`,k={class:`suggest-panel`,"aria-label":`پیشنهاد اختصاصی`},A={class:`suggest-panel__head`},j={key:0,class:`suggest-panel__empty`},M={key:1,class:`suggest-panel__row scroll-x`},N=[`onClick`],P={key:0,class:`suggest-product__chip suggest-product__chip--oos`},F={key:1,class:`suggest-product__chip`},I=[`aria-label`,`aria-pressed`,`onClick`],L={class:`suggest-product__body`},R={class:`suggest-product__name`},z={class:`suggest-product__desc`},B={key:0,class:`suggest-product__swatches`},V={key:0,class:`suggest-product__swatch suggest-product__swatch--more`},H={class:`suggest-product__specs`},U={class:`suggest-product__spec`},W={class:`suggest-product__spec-copy`},we={class:`suggest-product__spec-val`},Te={class:`suggest-product__spec`},G={class:`suggest-product__spec-copy`},K={class:`suggest-product__spec-val`},q={class:`suggest-product__spec`},Ee={class:`suggest-product__spec-copy`},J={class:`suggest-product__spec-val`},Y=[`disabled`,`onClick`],X=4,De=_(b({__name:`HomeSuggestionsSection`,props:{items:{}},setup(e){let t=e,r=re(),s=se(),{requesting:m,addressModalOpen:g,addressError:_,requestCatalog:v,submitAddressAndRequest:b,closeAddressModal:te}=E();function ne(e){return e.note?.trim()||e.subtitle?.trim()||`مشابه خریدهای قبلی شما`}function C(e){let t=e.colors?.length??0;return t>X?t-X:0}function ie(e){return{id:e.productId,name:e.productName,code:e.productCode,categoryId:``,season:`all_season`,widthCm:e.widthCm??0,composition:e.composition??``,weightGrams:e.weightGrams,colors:e.colors??(e.color?[e.color]:[]),colorImages:e.colorImages,tags:[],isNew:!!e.isNew,imageUrl:e.imageUrl,subtitle:e.subtitle,rollMeters:1,catalogName:e.catalogName,catalogCode:e.catalogCode,color:e.color,isActive:e.productIsActive!==!1}}function ae(e){r.push({path:`/product`,query:{id:e.productId}})}async function oe(e){await s.toggle(e)}async function w(e){await v(ie(e))}let T=l(()=>t.items.length>0);function le(e){return e.composition?.trim()||`—`}function ue(e){return e.widthCm?`${S(e.widthCm)} cm`:`—`}function de(e){return e.weightGrams?`${S(e.weightGrams)} گرم`:`—`}return(t,l)=>(i(),d(`section`,k,[h(`header`,A,[l[3]||=ee(`<div class="suggest-panel__titles" data-v-58849343><h3 class="suggest-panel__title" data-v-58849343><span class="suggest-panel__sparkles" aria-hidden="true" data-v-58849343><svg width="18" height="18" viewBox="0 0 24 24" fill="none" data-v-58849343><path d="M12 2l1.2 4.2L17.5 8 13.2 9.2 12 13.5 10.8 9.2 6.5 8l4.3-1.8L12 2Z" fill="#c9a227" data-v-58849343></path><path d="M19 14l.7 2.4 2.4.7-2.4.7-.7 2.4-.7-2.4-2.4-.7 2.4-.7.7-2.4Z" fill="#d4af37" data-v-58849343></path></svg></span> پیشنهادهای اختصاصی برای شما </h3><p class="suggest-panel__sub" data-v-58849343>بر اساس خریدهای قبلی و علاقهمندیهای شما</p></div>`,1),h(`button`,{type:`butto
|