1import{f as e,p as t,u as n}from"./DPIWPpqu.js";import{At as r,H as i,J as a,K as o,L as ee,X as te,_ as s,b as ne,d as c,f as l,g as re,it as u,jt as d,kt as f,l as p,lt as m,o as ie,ot as ae,p as h,r as g,tt as oe,u as _,z as v}from"./3qFTgqMB.js";import{c as se,d as y}from"./D6KTsZBg.js";import{t as ce}from"./CGy_rVNT.js";import{n as le}from"./CY0Xe-U8.js";import{t as ue}from"./f7tlExPD.js";import{n as de}from"./Cb5P07u_.js";import{t as fe}from"./DYvMby-D.js";import{D as pe,M as me,N as he,O as ge,P as _e,n as ve,w as ye,x as be}from"#entry";import{t as xe}from"./CfdZTv5f2.js";import{t as Se}from"./DKUzY5y0.js";import{t as Ce}from"./DgOu_RWl.js";var we={class:`shop-page shop-template-page font-exo`},Te={class:`breadcrumb mb-0 py-26 bg-main-two-50`},Ee={class:`container container-lg`},De={class:`breadcrumb-wrapper flex-between flex-wrap gap-16`},Oe={class:`mb-0`},ke={class:`flex items-center gap-8 flex-wrap`},Ae={class:`text-sm text-main-600`},je={class:`shop py-80 shop-results-section`},Me={class:`container container-lg`},Ne={class:`row`},Pe={class:`xl:w-3/12 flex-grow-0 flex-shrink-0 basis-auto`},Fe={key:0,class:`shop-sidebar__box border border-gray-100 rounded-8 p-32 mb-32`},Ie={class:`max-h-540 overflow-y-auto scroll-sm`},Le=[`href`,`onClick`],Re={class:`shop-sidebar__box border border-gray-100 rounded-8 p-32 mb-32`},ze={class:`custom--range`},Be={class:`shop-range-track`},Ve=[`value`],He=[`value`],Ue={class:`flex-between flex-wrap-reverse gap-8 mt-24`},We={class:`custom--range__content flex items-center gap-8`},Ge={class:`custom--range__prices text-neutral-600 text-start text-md font-[500]`},Ke={class:`shop-sidebar__box border border-gray-100 rounded-8 p-32 mb-32`},qe={class:`shop-rating-list`},Je=[`for`],Ye=[`id`,`checked`,`onClick`],Xe={class:`shop-rating-stars`,"aria-hidden":`true`},Ze={class:`sr-only`},Qe={class:`shop-sidebar__box border border-gray-100 rounded-8 p-32 mb-32`},$e={class:`shop-search-filter shop-brand-search mb-24`},et={class:`max-h-540 overflow-y-auto scroll-sm`},tt=[`href`,`onClick`],nt={key:0,class:`mb-0`},rt={class:`xl:w-9/12 flex-grow-0 flex-shrink-0 basis-auto`,"aria-label":`Product results`},it={class:`shop-mobile-result-count`},at={key:0},ot={key:1},st={class:`shop-mobile-filter-bar`,"aria-label":`Product sorting and filters`},ct={key:0},lt={key:1},ut={class:`flex-between gap-16 flex-wrap mb-40 shop-toolbar shop-desktop-toolbar`},dt={key:0,class:`text-gray-900`},ft={key:1,class:`text-gray-900`},pt={class:`relative flex items-center gap-16 flex-wrap shop-toolbar-actions`},mt={class:`list-grid-btns flex items-center gap-16`},ht={class:`relative text-gray-500 flex items-center gap-4 text-14`},gt=[`value`],_t=[`value`],vt={key:0,class:`shop-active-filters`},yt={key:0},bt={key:1},xt={key:2},St={key:3},Ct={key:4},wt={key:0,class:`shop-mobile-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`shop-mobile-sort-title`},Tt={class:`shop-mobile-modal__sheet shop-mobile-modal__sheet--bottom`},Et={class:`shop-mobile-modal__header`},Dt={class:`shop-mobile-sort-list`},Ot=[`checked`,`onChange`],kt={key:1,class:`shop-mobile-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`shop-mobile-filter-title`},At={class:`shop-mobile-modal__sheet shop-mobile-modal__sheet--filter`},jt={class:`shop-mobile-modal__header`},Mt={class:`shop-mobile-filter-form`},Nt={key:0,class:`shop-mobile-filter-group`},Pt={class:`shop-mobile-filter-chips`},Ft=[`href`,`onClick`],It={class:`shop-mobile-filter-group`},Lt={class:`shop-search-filter shop-brand-search`},Rt={class:`shop-mobile-filter-chips`},zt=[`href`,`onClick`],Bt={class:`shop-mobile-filter-group`},Vt={class:`shop-range-track`},Ht=[`value`],Ut=[`value`],Wt={class:`shop-mobile-filter-group`},Gt={class:`shop-mobile-filter-chips shop-mobile-rating-chips`},Kt=[`onClick`],qt={"aria-hidden":`true`},Jt={key:1,class:`list-grid-wrapper shop-product-skeleton-grid`,role:`status`,"aria-label":`Loading products`},Yt={key:3,class:`shop-mobile-product-grid`},Xt={key:4,class:`state-message`},Zt={key:5,class:`pagination flex items-center justify-center flex-wrap gap-16`},Qt=[`href`],$t=[`href`],en=[`href`],b=0,x=5e4,S=ne({__name:`index`,async setup(ne){let S,C,w=e(),T=t(),E=p(()=>ge(w.query.sort)),tn=[{label:`Popular`,value:`best`},{label:`Latest`,value:`latest`}
1,{label:`Price: Low to High`,value:`priceasc`},{label:`Price: High to Low`,value:`pricedesc`}],nn=e=>String(e||``).replace(/[-_]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),D=u(12),O=u(12),k=()=>{let[e=``,t=``]=String(w.query.price||``).split(`-`,2);return{min:String(w.query.min||e||``),max:String(w.query.max||t||``)}},rn=k(),A=u(rn.min),j=u(rn.max),M=u(``),N=u(!1),P=u(!1),F=u(!1),I=u(!1),L=u(`grid`),R=ue(`shop-filter-categories`,()=>[]),z=ae([]),B=ae([]),an=p(()=>{let e=!!(w.query.price||w.query.min||w.query.max),t=k(),n=Math.min(x,Math.max(b,Number(t.min||b))),r=Math.min(x,Math.max(n,Number(t.max||x)));return{s:w.query.s,int_source:w.query.int_source===`search`?`search`:void 0,sort:E.value,price:e?`${n}-${r}`:void 0,rating:w.query.rating,brand:w.query.brand,category:w.query.category}}),on=p(()=>JSON.stringify(an.value)),V=p(()=>{let e=Number(w.query.page||1);return Number.isFinite(e)&&e>0?e:1}),sn=e=>{let t=e?.products?.item_list||e?.item_list;return Array.isArray(t)?t:[]},cn=e=>e?.products?.pagination||e?.pagination||null,ln=e=>{let t=e;return String(t.item_id||t.product_id||t.ic||t.product_url||t.item_name_full||t.item_name||``)},un=(e,t)=>e.products&&typeof e.products==`object`?(e.products={...e.products,item_list:t},e):(e.item_list=t,e),dn=async e=>{let t=window.location.pathname+window.location.search,r=await ce(`/api/storefront/products`,{baseURL:void 0,query:{...an.value,page:e},headers:{...t?{"x-original-url":t}:{}}});return r.redirect_url&&await n(r.redirect_url,{redirectCode:301,external:r.redirect_url.startsWith(`http`)}),r.data},fn=async(e,t)=>{let n=cn(e),r=Number(n?.per_page||32),i=Number(n?.last_page||t),a=[...sn(e)];if(!r||a.length>=r||t>=i)return e;let o=new Set(a.map(ln).filter(Boolean));for(let e=t+1;e<=i&&a.length<r;e+=1){let t=await dn(e).catch(()=>null);if(!t)break;for(let e of sn(t)){let t=ln(e);if(!(t&&o.has(t))&&(t&&o.add(t),a.push(e),a.length>=r))break}}return un(e,a)},pn=async e=>{let t=await fe.products({...an.value,page:e});return ye(await fn(t,e))},mn=p(()=>`storefront-products:${on.value}:page:${V.value}`),{data:H,pending:hn}=([S,C]=a(async()=>de(mn,async()=>{try{return await pn(V.value)}catch{return null}},{default:()=>null,watch:[on,V]})),S=await S,C(),S);if(H.value&&typeof H.value==`object`&&H.value.redirect_url){let e=String(H.value.redirect_url);[S,C]=a(()=>n(e,{redirectCode:301,external:e.startsWith(`http`)})),await S,C()}let U=p(()=>hn.value||I.value),W=p(()=>he(H.value)),G=p(()=>String(w.query.s||``).trim()?`search_${String(w.query.s)}`:`product_shop`),gn=p(()=>String(w.query.s||``).trim()?`Search: ${String(w.query.s).trim()}`:`Product Shop`);Se(W,G,gn);let _n=p(()=>_e(W.value)),K=p(()=>W.value),q=p(()=>me(H.value)),{collectionPageSchema:vn,schemaScript:yn}=ve(),J=p(()=>z.value.length?z.value:R.value),bn=p(()=>J.value.slice(0,D.value)),xn=p(()=>D.value<J.value.length),Y=p(()=>B.value.length?B.value:be(H.value)),X=p(()=>{let e=M.value.trim().toLowerCase();return(e?Y.value.filter(t=>t.name.toLowerCase().includes(e)):Y.value).slice(0,O.value)}),Sn=p(()=>{let e=M.value.trim().toLowerCase();return e?Y.value.filter(t=>t.name.toLowerCase().includes(e)).length:Y.value.length}),Cn=p(()=>O.value<Sn.value),wn=p(()=>tn.find(e=>e.value===E.value)?.label||`Popular`),Tn=p(()=>String(w.query.s||``).trim()),En=p(()=>Tn.value||`Shop`),Z=p(()=>Math.min(x,Math.max(b,Number(A.value||b)))),Q=p(()=>Math.min(x,Math.max(b,Number(j.value||x)))),Dn=p(()=>Math.min(100,Math.max(0,Math.min(Z.value,Q.value)/x*100))),On=p(()=>Math.min(100,Math.max(0,Math.max(Z.value,Q.value)/x*100))),kn=p(()=>({left:`${Dn.value}%`,right:`${100-On.value}%`})),An=p(()=>Number(q.value?.total||K.value.length)),jn=p(()=>Number(q.value?.per_page||K.value.length||20)),Mn=p(()=>Math.max(1,Number(q.value?.last_page||Math.ceil(An.value/Math.max(1,jn.value))||1))),Nn=p(()=>Number(q.value?.from||(K.value.length?(V.value-1)*jn.value+1:0))),Pn=p(()=>K.value.length?Nn.value+K.value.length-1:0),Fn=p(()=>{let e=Mn.value,t=V.value,n=Math.max(1,Math.min(t-3,e-6)),r=Math.min(e,n+6);return Array.from({length:r-n+1},(e,t)=>n+t)});o(()=>[w.query.price,w.query.min,w.query.max],()=>{let e=k();A.value=e.min,j.value=e.max}),o(()=>w.fullPath,()=>{N.value=!1,P.value=!1,F.value=!1}),o(H,e=>{if(e&&typeof e==`object`&&e.redirect_url){let t=String(e.redirect_url);n(t,{redirectCode:301,external:t.startsWith(`http`)});return}I.value=!1;let t=pe(e?.categories||[]),r=be(e);!z.value.length&&t.length&&(z.value=t,R.value=t,window.sessionStorage.setItem(`tudo-shop-filter-categories`,JSON.stringify(t))),!B.value.length&&r.length&&(B.value=r)},{immediate:!0});let $=e=>{let t={...w.query};delete t.color,Object.entries(e).forEach(([e,n])=>{if(n===void 0||n===``){delete t[e];return}t[e]=String(n)}),Object.prototype.hasOwnProperty.call(e,`page`)||delete t.page;let n={path:`/products`,query:t};T.resolve(n).fullPath!==w.fullPath&&(I.value=!0,T.push(n).catch(()=>{I.value=!1}))},In=(e,t)=>{let n=e.split(`?`)[0];
1return n.startsWith(t)?decodeURIComponent(n.replace(t,``).replace(/\/$/,``)):``},Ln=e=>{let t=In(e,`/category/`);t&&$({category:t})},Rn=e=>{let t=In(e,`/brand/`);t&&$({brand:t})},zn=e=>{P.value=!1,$({sort:e})},Bn=e=>{let t=new URLSearchParams;Object.entries(w.query).forEach(([e,n])=>{if(!(e===`page`||e===`color`||n===void 0)){if(Array.isArray(n)){n.forEach(n=>{n!==null&&t.append(e,String(n))});return}n!==null&&t.set(e,String(n))}}),e>1&&t.set(`page`,String(e));let n=t.toString();return n?`/products?${n}`:`/products`},Vn=()=>{let e=Math.min(Z.value,Q.value),t=Math.max(Z.value,Q.value);$({min:void 0,max:void 0,price:e===b&&t===x?void 0:`${e}-${t}`}),F.value=!1},Hn=()=>{A.value=``,j.value=``,F.value=!1,T.push({path:`/products`,query:{s:w.query.s||void 0,sort:E.value}})},Un=e=>{let t=Math.min(Number(e),Q.value);A.value=String(Math.max(b,t))},Wn=e=>{let t=Math.max(Number(e),Z.value);j.value=String(Math.min(x,t))},Gn=e=>{F.value=!1,$({rating:w.query.rating===e?void 0:e})},Kn=()=>{O.value+=12};return o(M,()=>{O.value=12}),le(()=>({title:`Shop Products | Tudo.lk`,meta:[{name:`robots`,content:`noindex, follow`},{name:`description`,content:`Shop products from Tudo.lk marketplace vendors with filters, brands, categories and deals.`}],script:[yn(`storefront-products-page-schema`,vn({name:`Shop Products | Tudo.lk`,description:`Shop products from Tudo.lk marketplace vendors with filters, brands, categories and deals.`,url:w.fullPath,products:K.value,itemListName:`Tudo.lk products`,listOffset:(V.value-1)*jn.value}))]})),ee(()=>{let e=window.sessionStorage.getItem(`tudo-shop-filter-categories`);if(e&&!R.value.length)try{let t=JSON.parse(e);Array.isArray(t)&&t.length&&(R.value=t)}catch{window.sessionStorage.removeItem(`tudo-shop-filter-categories`)}}),(e,t)=>{let n=xe,a=Ce;return v(),h(`main`,we,[_(`div`,Te,[_(`div`,Ee,[_(`div`,De,[_(`h6`,Oe,d(m(En)),1),_(`ul`,ke,[t[21]||=re(`<li class="text-sm"><a href="/" class="text-gray-900 flex items-center gap-8 hover-text-main-600"><i class="ph ph-house"></i> Home </a></li><li class="flex items-center"><i class="ph ph-caret-right"></i></li>`,2),_(`li`,Ae,d(m(En)),1)])])])]),_(`section`,je,[_(`div`,Me,[_(`div`,Ne,[_(`div`,Pe,[_(`aside`,{class:f([`shop-sidebar`,{active:m(N),"shop-sidebar-open":m(N)}]),"aria-label":`Shop filters`},[_(`button`,{type:`button`,class:`shop-sidebar__close xl:hidden flex w-32 h-32 flex items-center justify-center border border-gray-100 rounded-[50%] hover-bg-main-600 absolute right-0 mr-[10px] mt-8 hover-text-white hover-border-main-600`,"aria-label":`Close filters`,onClick:t[0]||=e=>N.value=!1},[...t[22]||=[_(`i`,{class:`ph ph-x`},null,-1)]]),m(J).length?(v(),h(`div`,Fe,[t[24]||=_(`h6`,{class:`text-xl border-b border-gray-100 pb-24 mb-24`},`Product Category`,-1),_(`ul`,Ie,[(v(!0),h(g,null,i(m(bn),e=>(v(),h(`li`,{key:e.name,class:`mb-24`},[_(`a`,{href:e.href,class:`text-gray-900 hover-text-main-600`,onClick:y(t=>Ln(e.href),[`prevent`])},d(e.name),9,Le)]))),128))]),m(xn)?(v(),h(`button`,{key:0,type:`button`,class:`shop-filter-more mt-24`,onClick:t[1]||=e=>D.value+=12},[...t[23]||=[s(` See More `,-1),_(`i`,{class:`ph ph-caret-down`},null,-1)]])):l(``,!0)])):l(``,!0),_(`div`,Re,[t[26]||=_(`h6`,{class:`text-xl border-b border-gray-100 pb-24 mb-24`},`Filter by Price`,-1),_(`div`,ze,[_(`div`,Be,[_(`span`,{class:`shop-range-track__active`,style:r(m(kn))},null,4),_(`input`,{class:`shop-range-input shop-range-input--min`,type:`range`,min:b,max:x,step:`100`,value:m(Z),"aria-label":`Minimum price`,onInput:t[2]||=e=>Un(e.target.value)},null,40,Ve),_(`input`,{class:`shop-range-input shop-range-input--max`,type:`range`,min:b,max:x,step:`100`,value:m(Q),"aria-label":`Maximum price`,onInput:t[3]||=e=>Wn(e.target.value)},null,40,He)]),_(`div`,Ue,[_(`button`,{type:`button`,class:`btn btn-main h-40 flex items-center`,onClick:Vn},`Filter`),_(`div`,We,[t[25]||=_(`span`,{class:`text-gray-500 text-md flex-shrink-0`},`Price:`,-1),_(`span`,Ge,d(m(Z))+` - `+d(m(Q)),1)])])])]),_(`div`,Ke,[t[28]||=_(`h6`,{class:`text-xl border-b border-gray-100 pb-24 mb-24`}
1,`Filter by Rating`,-1),_(`div`,qe,[(v(!0),h(g,null,i(m(_n),e=>(v(),h(`label`,{key:e.value,for:`rating-${e.value}`},[_(`input`,{id:`rating-${e.value}`,type:`radio`,name:`rating`,checked:m(w).query.rating===e.value,onClick:t=>Gn(e.value)},null,8,Ye),_(`span`,Xe,[(v(),h(g,null,i(5,t=>_(`span`,{key:t,class:f({filled:t<=Number(e.value)})},d(t<=Number(e.value)?`â
`:`â`),3)),64))]),t[27]||=_(`small`,{"aria-hidden":`true`},`& up`,-1),_(`span`,Ze,d(e.value)+` stars and up`,1)],8,Je))),128))])]),_(`div`,Qe,[t[33]||=_(`h6`,{class:`text-xl border-b border-gray-100 pb-24 mb-24`},`Filter by Brand`,-1),_(`div`,$e,[te(_(`input`,{"onUpdate:modelValue":t[4]||=e=>oe(M)?M.value=e:null,type:`search`,placeholder:`Search brands`},null,512),[[se,m(M)]]),t[29]||=_(`button`,{type:`button`,"aria-label":`Search brands`},[_(`i`,{class:`ph ph-magnifying-glass`})],-1)]),_(`ul`,et,[(v(!0),h(g,null,i(m(X),e=>(v(),h(`li`,{key:e.id,class:`mb-24`},[_(`a`,{href:e.href,class:`shop-brand-link`,onClick:y(t=>Rn(e.href),[`prevent`])},[t[30]||=_(`span`,{class:`shop-brand-radio`,"aria-hidden":`true`},null,-1),_(`span`,null,d(e.name),1)],8,tt)]))),128)),m(X).length?l(``,!0):(v(),h(`li`,nt,[...t[31]||=[_(`span`,{class:`shop-empty-filter`},`No brands found`,-1)]]))]),m(Cn)?(v(),h(`button`,{key:0,type:`button`,class:`shop-filter-more mt-24`,onClick:Kn},[...t[32]||=[s(` Load More `,-1),_(`i`,{class:`ph ph-caret-down`},null,-1)]])):l(``,!0)])],2)]),m(N)?(v(),h(`div`,{key:0,class:`side-overlay active`,onClick:t[5]||=e=>N.value=!1})):l(``,!0),_(`section`,rt,[_(`div`,it,[m(q)?(v(),h(`span`,at,`Showing `+d(m(Nn))+`-`+d(m(Pn))+` of `+d(m(An))+` result`,1)):(v(),h(`span`,ot,`Showing products`))]),_(`div`,st,[_(`button`,{type:`button`,onClick:t[6]||=e=>P.value=!0},[t[34]||=_(`i`,{class:`ph ph-sort-ascending`,"aria-hidden":`true`},null,-1),t[35]||=s(` Sort `,-1),_(`small`,null,d(m(wn)),1)]),_(`button`,{type:`button`,onClick:t[7]||=e=>F.value=!0},[t[36]||=_(`i`,{class:`ph ph-funnel-simple`,"aria-hidden":`true`},null,-1),t[37]||=s(` Filter `,-1),m(w).query.price||m(w).query.rating||m(w).query.brand||m(w).query.category?(v(),h(`small`,ct,`Active`)):(v(),h(`small`,lt,`All products`))])]),_(`div`,ut,[m(q)?(v(),h(`span`,dt,`Showing `+d(m(Nn))+`-`+d(m(Pn))+` of `+d(m(An))+` result`,1)):(v(),h(`span`,ft,`Showing products`)),_(`div`,pt,[_(`div`,mt,[_(`button`,{type:`button`,class:f([`w-44 h-44 flex items-center justify-center border rounded-6 text-2xl list-btn`,m(L)===`list`?`border-main-600 text-white bg-main-600`:`border-gray-100`]),"aria-label":`List view`,onClick:t[8]||=e=>L.value=`list`},[...t[38]||=[_(`i`,{class:`ph ph-list-dashes`},null,-1)]],2),_(`button`,{type:`button`,class:f([`w-44 h-44 flex items-center justify-center border rounded-6 text-2xl grid-btn`,m(L)===`grid`?`border-main-600 text-white bg-main-600`:`border-gray-100`]),"aria-label":`Grid view`,onClick:t[9]||=e=>L.value=`grid`},[...t[39]||=[_(`i`,{class:`ph ph-squares-four`},null,-1)]],2)]),_(`div`,ht,[t[40]||=_(`label`,{for:`sorting`,class:`text-inherit flex-shrink-0`},`Sort by:`,-1),_(`select`,{id:`sorting`,class:`form-control common-input px-14 py-14 text-inherit rounded-6 w-auto`,value:m(E),onChange:t[10]||=e=>$({sort:e.target.value})},[(v(),h(g,null,i(tn,e=>_(`option`,{key:e.value,value:e.value},d(e.label),9,_t)),64))],40,gt)])])]),m(w).query.s||m(w).query.price||m(w).query.rating||m(w).query.brand||m(w).query.category?(v(),h(`div`,vt,[m(w).query.s?(v(),h(`span`,yt,`Search: `+d(m(w).query.s),1)):l(``,!0),m(w).query.category?(v(),h(`span`,bt,`Category: `+d(nn(m(w).query.category)),1)):l(``,!0),m(w).query.price?(v(),h(`span`,xt,`Price: `+d(m(w).query.price),1)):l(``,!0),m(w).query.rating?(v(),h(`span`,St,d(m(w).query.rating)+` stars`,1)):l(``,!0),m(w).query.brand?(v(),h(`span`,Ct,`Brand: `+d(nn(m(w).query.brand)),1)):l(``,!0),_(`button`,{type:`button`,onClick:Hn},`Clear all`)])):l(``,!0),(v(),c(ie,{to:`body`},[m(P)?(v(),h(`div`,wt,[_(`button`,{type:`button`,class:`shop-mobile-modal__backdrop`,"aria-label":`Close sort options`,onClick:t[11]||=e=>P.value=!1}),_(`div`,Tt,[_(`header`,Et,[t[42]||=_(`h2`,{id:`shop-mobile-sort-title`},`Sort`,-1),_(`button`,{type:`button`,"aria-label":`Close sort options`,onClick:t[12]||=e=>P.value=!1},[...t[41]||=[_(`i`,{class:`ph ph-x`},null,-1)]])]),_(`div`,Dt,[(v(),h(g,null,i(tn,e=>_(`label`,{key:e.value},[_(`input`,{type:`radio`,name:`mobile-sort`,checked:m(E)===e.value,onChange:t=>zn(e.value)},null,40,Ot),_(`span`,null,d(e.label),1)])),64))])])])):l(``,!0),m(F)?(v(),h(`div`,kt,[_(`button`,{type:`button`,class:`shop-mobile-modal__backdrop`,"aria-label":`Close filters`,onClick:t[13]||=e=>F.value=!1}),_(`div`,At,[_(`header`,jt,[t[44]||=_(`h2`,{id:`shop-mobile-filter-title`},`Filter`,-1),_(`button`,{type:`button`,"aria-label":`Close filters`,onClick:t[14]||=e=>F.value=!1},[...t[43]||=[_(`i`,{class:`ph ph-x`},null,-1)]])]),_(`div`,Mt,[m(J).length?(v(),h(`section`,Nt,[t[45]||=_(`h3`,null,`Category`,-1),_(`div`,Pt,[_(`button`,{type:`button`,class:`shop-mobile-filter-chip`,onClick:t[15]||=e=>$({category:void 0})}
1,`All`),(v(!0),h(g,null,i(m(bn),e=>(v(),h(`a`,{key:e.name,href:e.href,class:`shop-mobile-filter-chip`,onClick:y(t=>Ln(e.href),[`prevent`])},d(e.name),9,Ft))),128))]),m(xn)?(v(),h(`button`,{key:0,type:`button`,class:`shop-mobile-filter-more`,onClick:t[16]||=e=>D.value+=12},` See More `)):l(``,!0)])):l(``,!0),_(`section`,It,[t[47]||=_(`h3`,null,`Brand`,-1),_(`div`,Lt,[te(_(`input`,{"onUpdate:modelValue":t[17]||=e=>oe(M)?M.value=e:null,type:`search`,placeholder:`Search brands`},null,512),[[se,m(M)]]),t[46]||=_(`button`,{type:`button`,"aria-label":`Search brands`},[_(`i`,{class:`ph ph-magnifying-glass`})],-1)]),_(`div`,Rt,[_(`button`,{type:`button`,class:`shop-mobile-filter-chip`,onClick:t[18]||=e=>$({brand:void 0})},`All`),(v(!0),h(g,null,i(m(X),e=>(v(),h(`a`,{key:e.id,href:e.href,class:`shop-mobile-filter-chip`,onClick:y(t=>Rn(e.href),[`prevent`])},d(e.name),9,zt))),128))]),m(Cn)?(v(),h(`button`,{key:0,type:`button`,class:`shop-mobile-filter-more`,onClick:Kn},` Load More `)):l(``,!0)]),_(`section`,Bt,[t[48]||=_(`h3`,null,`Price`,-1),_(`div`,Vt,[_(`span`,{class:`shop-range-track__active`,style:r(m(kn))},null,4),_(`input`,{class:`shop-range-input shop-range-input--min`,type:`range`,min:b,max:x,step:`100`,value:m(Z),"aria-label":`Minimum price`,onInput:t[19]||=e=>Un(e.target.value)},null,40,Ht),_(`input`,{class:`shop-range-input shop-range-input--max`,type:`range`,min:b,max:x,step:`100`,value:m(Q),"aria-label":`Maximum price`,onInput:t[20]||=e=>Wn(e.target.value)},null,40,Ut)])]),_(`section`,Wt,[t[49]||=_(`h3`,null,`Rating`,-1),_(`div`,Gt,[(v(!0),h(g,null,i(m(_n),e=>(v(),h(`button`,{key:e.value,type:`button`,class:f([`shop-mobile-filter-chip`,{active:m(w).query.rating===e.value}]),onClick:t=>Gn(e.value)},[_(`span`,qt,d(`â
`.repeat(Number(e.value))),1)],10,Kt))),128))])]),_(`div`,{class:`shop-mobile-filter-actions`},[_(`button`,{type:`button`,class:`shop-mobile-filter-reset`,onClick:Hn},`Reset`),_(`button`,{type:`button`,class:`shop-mobile-filter-apply`,onClick:Vn},`Apply`)])])])])):l(``,!0)])),m(U)?(v(),h(`div`,Jt,[(v(),h(g,null,i(12,e=>_(`article`,{key:e,class:`shop-product-skeleton`})),64))])):m(K).length?(v(),h(`div`,{key:2,class:f([`list-grid-wrapper home-listing-grid shop-desktop-product-grid`,{"list-view":m(L)===`list`}])},[(v(!0),h(g,null,i(m(K),(e,t)=>(v(),c(n,{key:e.href||e.name,product:e,"list-id":m(G),"list-name":m(gn),"list-index":t,compact:``},null,8,[`product`,`list-id`,`list-name`,`list-index`]))),128))],2)):l(``,!0),!m(U)&&m(K).length?(v(),h(`div`,Yt,[(v(!0),h(g,null,i(m(K),(e,t)=>(v(),c(a,{key:`mobile-${e.href||e.name}`,product:e,"list-id":m(G),"list-name":m(gn),"list-index":t},null,8,[`product`,`list-id`,`list-name`,`list-index`]))),128))])):l(``,!0),!m(U)&&!m(K).length?(v(),h(`p`,Xt,`No products found.`)):l(``,!0),!m(U)&&m(K).length&&m(Mn)>1?(v(),h(`ul`,Zt,[_(`li`,{class:f([`page-item`,{disabled:m(V)===1}])},[_(`a`,{class:`page-link h-64 w-64 flex items-center justify-center text-xxl rounded-8 font-[500] text-neutral-600 border border-gray-100`,href:Bn(m(V)-1),"aria-label":`Previous page`},[...t[50]||=[_(`i`,{class:`ph ph-arrow-left`},null,-1)]],8,Qt)],2),(v(!0),h(g,null,i(m(Fn),e=>(v(),h(`li`,{key:e,class:f([`page-item`,{active:e===m(V)}])},[_(`a`,{class:`page-link h-64 w-64 flex items-center justify-center text-md rounded-8 font-[500] text-neutral-600 border border-gray-100`,href:Bn(e)},d(String(e).padStart(2,`0`)),9,$t)],2))),128)),_(`li`,{class:f([`page-item`,{disabled:m(V)===m(Mn)}])},[_(`a`,{class:`page-link h-64 w-64 flex items-center justify-center text-xxl rounded-8 font-[500] text-neutral-600 border border-gray-100`,href:Bn(m(V)+1),"aria-label":`Next page`},[...t[51]||=[_(`i`,{class:`ph ph-arrow-right`},null,-1)]],8,en)],2)])):l(``,!0)])])])])])}}});export{S as default};
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.