PageSourceSearch

https://mazeed.sa/_nuxt/xchljEat.js

js mazeed.sa collected 2026-10-02 15:43:39 UTC 3,699 bytes, 1 lines download raw bytes

1import{j as T,P as _,S as A}from"./CaVH226W.js";import{bG as O,be as Q,aV as k,br as L,bb as x,bf as j}from"./RminBxZ_.js";import{P as S,a as u}from"./n0jR5VhA.js";import{b as r,l as H}from"./Bb4g8rqR.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="f67a42ea-c176-4cf4-983b-37e1f81bb5fc",o._sentryDebugIdIdentifier="sentry-dbid-f67a42ea-c176-4cf4-983b-37e1f81bb5fc")}catch{}})();const W=O("ProductsFilteredList",()=>{const o=Q(),s=r(),c=r(),n=r(),p=r(),i=r(!1),d=r(!1),h=r(0),l=r(0),v=r(!1),F=r(!1),y=r(1e3),f=r(1),w=r(12),R=k(),t=r({sortValue:S.relevance}),I=r([]),b=r(),V=async e=>{var g;i.value=!0;const a=await L(T,e);a.value&&(p.value=(g=a.value)==null?void 0:g.searchAutoCompleteProducts),i.value=!1},E=e=>{if(!e.length){t.value.storeIds=[];return}if(t.value.storeIds||(t.value.storeIds=[]),t.value.storeIds){const a=t.value.storeIds.indexOf(e);a!==-1?t.value.storeIds.splice(a,1):t.value.storeIds.push(e)}},M=e=>{if(!e.length){t.value.categoryIds=[];return}if(t.value.categoryIds||(t.value.categoryIds=[]),t.value.categoryIds){const a=t.value.categoryIds.indexOf(e);a!==-1?t.value.categoryIds.splice(a,1):t.value.categoryIds.push(e)}},C=async(e,a,g=!0)=>{switch(l.value=0,f.value=1,e){case u.sort:t.value.sortValue=a.toString();break;case u.rating:t.value.rating===a?t.value.rating=0:t.value.rating=a;break;case u.range:t.value.range=a.toString();break;case u.store:E(a.toString());break;case u.category:M(a.toString());break;case u.query:t.value.query=a.toString();break}g&&G(),await m()},D=H(()=>{const e={categoryIds:t.value.categoryIds,storeIds:t.value.storeIds,collectionIds:t.value.collectionIds};if(t.value.rating&&(e.rating={from:Number(t.value.rating),to:5}),t.value.range){const a=t.value.range.split(",");a.length&&(e.price={},Number(a[0])&&(e.price.from=Number(a[0])),Number(a[1])&&(e.price.to=Number(a[1])))}return{filters:e,limit:w.value,offset:l.value,query:t.value.query,sorting:t.value.sortValue}}),N=async()=>{f.value++,v.value=!0,l.value=l.value+w.value;const e=await P();e&&s.value&&(s.value=[...s.value,...e.searchProductsList.nodes],n.value=e.searchProductsList.pageInfo),v.value=!1},q=async()=>{try{const e=await L(_,D.value);e.value&&(h.value=e.value.searchFiltersPriceRangeGet.min,y.value=e.value.searchFiltersPriceRangeGet.max,I.value=e.value.searchFiltersStoresList.nodes,b.value=e.value.searchFiltersStoresList.pageInfo)}catch(e){x().catchGraphqlError(e)}},G=()=>{o.replace({path:k().path,query:j({...R.query,...t.value})})},P=async()=>{try{return(await L(A,D.value)).value}catch(e){x().catchGraphqlError(e)}},m=async()=>{d.value=!0,await q();const e=await P();e&&(s.value=e.searchProductsList.nodes,n.value=e.searchProductsList.pageInfo,c.value=e.searchStoresList.nodes),d.value=!1};return{productsList:s,searchStoresList:c,searchedProducts:p,isSearchLoading:i,productFiltersData:t,productFilterRangeMin:h,productFilterRangeMax:y,isProductListLoading:d,productListPageInfo:n,storesList:I,storesListPageInfo:b,isMoreProductsLoading:v,filterModalStatus:F,contentLoadedCount:f,searchProducts:V,updateFilterData:C,fetchProductInputsFiltersData:q,fetchSearchedProductsList:P,onProductSearchHandler:m,fetchMoreProducts:N,resetFilters:(e,a=!0)=>{t.value={...t.value,rating:0,range:"",query:"",categoryIds:[],storeIds:e?t.value.storeIds:[],sortValue:S.relevance},a&&G(),m()},$reset:()=>{s.value=[],c.value=[],p.value=[],i.value=!1,d.value=!1,F.value=!1,h.value=0,f.value=1,y.value=1e3,t.value={sortValue:S.relevance},n.value=void 0,b.value=void 0,l.value=0,v.value=!1,I.value=[]}}});export{W as u};

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.