"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3950],{586:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(37876);i(14232);var l=i(28343),r=i(41316),s=i(60595),o=i(62712);let a=()=>(0,n.jsx)(l.jB,{children:(0,n.jsx)(r.Ay,{container:!0,spacing:{xs:2,sm:3,md:3},children:[...Array(6)].map((e,t)=>(0,n.jsx)(r.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(s.A,{sx:{padding:"20px"},children:(0,n.jsxs)(r.Ay,{container:!0,spacing:2,justifyContent:"center",alignItems:"center",children:[(0,n.jsx)(r.Ay,{item:!0,xs:4,children:(0,n.jsx)(o.A,{width:"100%",height:"108px",variant:"rounded"})}),(0,n.jsxs)(r.Ay,{item:!0,xs:8,children:[(0,n.jsx)(o.A,{width:"50%",height:"20px",variant:"text"}),(0,n.jsx)(o.A,{width:"80%",height:"20px",variant:"text"})]})]})})},t))})})},2793:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(37876),l=i(6482);i(14232);let r=e=>{let{openPopover:t,anchorEl:i,placement:r,handleClose:s,children:o,top:a,left:d}=e;return(0,n.jsx)(l.Ay,{sx:{top:a,left:d},open:t,anchorEl:i,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:r},children:o})}},3864:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(37876),l=i(14232),r=i(35268),s=i(84812),o=i(60795),a=i(35003),d=i(6482),c=i(94089),x=i(82),p=i(17203),u=i(73078),h=i(52904);let g=(0,r.Ay)(s.A)(e=>{let{theme:t,border:i}=e;return{border:"true"===i&&"1px solid ".concat(t.palette.neutral[400]),borderRadius:"5px",padding:"7px 16px",textTransform:"capitalize"}}),m=e=>{var t;let{handleSortBy:i,sortBy:r}=e,[s,m]=l.useState(null),{t:v}=(0,x.Bd)(),j=!!s,A=[{name:v("High to Low"),value:"high"},{name:v("Low to High"),value:"low"}],f=v("Sort by:"),b=(e,t)=>(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,children:[(0,n.jsx)(h.A,{src:null===c.A||void 0===c.A?void 0:c.A.src,height:"12px",width:"12px",objectFit:"contain"}),(0,n.jsx)(a.A,{fontSize:"13px",sx:{color:e=>e.palette.neutral[600]},children:"".concat(f," ").concat(e)}),"true"===t&&(j?(0,n.jsx)(u.A,{sx:{color:e=>e.palette.text.secondary}}):(0,n.jsx)(p.A,{sx:{color:e=>e.palette.text.secondary}}))]});return(0,n.jsxs)("div",{children:[(0,n.jsx)(g,{border:"true",onClick:e=>{m(e.currentTarget)},children:b((null==(t=A.find(e=>e.value===r))?void 0:t.name)||v("Default"),"true")}),(0,n.jsx)(d.Ay,{id:j?"simple-popover":void 0,open:j,anchorEl:s,onClose:()=>{m(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{style:{width:(null==s?void 0:s.clientWidth)||"auto"}},children:A.map(e=>(0,n.jsx)(g,{onClick:()=>{var t;return t=e.value,void(null==i||i(t),m(null))},children:b(e.name,"false")},e.value))})]})}},4955:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(37876),l=i(60795),r=i(60595),s=i(62712);i(14232);var o=i(28343);let a=e=>{let{width:t}=e;return(0,n.jsxs)(l.A,{p:"10px",alignItems:"center",justifyContent:"center",sx:{borderRadius:"6px",backgroundColor:e=>e.palette.background.default,width:t||"210px"},spacing:1,children:[(0,n.jsx)(r.A,{sx:{height:"180px",width:"100%"},children:(0,n.jsx)(s.A,{variant:"ractangle",height:"100%",width:"100%"})}),(0,n.jsx)(o.jB,{alignItems:"flex-start",justifyContent:"flex-start",children:(0,n.jsx)(s.A,{variant:"text",width:"100px"})}),(0,n.jsxs)(o.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(s.A,{variant:"text",width:"80px"}),(0,n.jsx)(s.A,{variant:"text",width:"40px"})]})]})}},7937:(e,t,i)=>{i.d(t,{A:()=>x});var n=i(37876),l=i(14232),r=i(82179),s=i(28343),o=i(80885),a=i(16076),d=i(58725);let c=e=>{var t,i;let{item:c,checkHandler:x,selectedItems:p}=e,[u,h]=(0,l.useState)(!0),g=()=>{h(e=>!e)},m=e=>!!(null==p?void 0:p.find(t=>t===e));return(0,n.jsxs)(s.iv,{children:[(0,n.jsxs)(r.A,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(o.A,{item:c,checkHandler:x,isChecked:()=>m(null==c?void 0:c.id)}),(null==c||null==(t=c.childes)?void 0:t.length)>0&&(0,n.jsx)(n.Fragment,{children:u?(0,n.jsx)(a.A,{onClick:g,color:"primary",sx:{cursor:"pointer"}}):(0,n.jsx)(d.A,{color:"primary",onClick:g,sx:{cursor:"pointer"}})})]}),u&&(0,n.jsx)(n.Fragment,{children:null==c||null==(i=c.childes)?void 0:i.map((e,t)=>(0,n.jsx)(s.jB,{sx:{padding:"0px 16px"},children:(0,n.jsx)(o.A,{item:e,checkHandler:x,isChecked:()=>m(null==e?void 0:e.id)})},t))})]})};c.propTypes={};let x=c},10206:(e,t,i)=>{i.d(t,{$k:()=>g,DE:()=>h});var n=i(37876),l=i(35268),r=i(89037),s=i(48843),o=i(66703),a=i(6995),d=i(9552),c=i(29053);let x=(0,l.Ay)(r.A)(e=>{let{theme:t,isdisabled:i,left:n,width:l,height:r}=e;return{zIndex:1,top:"50%",left:n||"0px",display:i?"none":"flex",backgroundColor:t.palette.neutral[100],borderRadius:"50%",height:l||"38px",width:r||"38px",alignItems:"center",justifyContent:"center"}}),p=(0,l.Ay)(r.A)(e=>{let{theme:t,isdisabled:i,width:n,height:l}=e;return{zIndex:1,right:0,display:i?"none":"flex",backgroundColor:t.palette.neutral[100],borderRadius:"50%",height:l||"38px",width:n||"38px",alignItems:"center",justifyContent:"center",border:"1px solid"}}),u=(0,l.Ay)(r.A)(e=>{let{theme:t,right:i,isdisabled:n,noboxshadow:l}=e;return{top:0,height:"100%",width:"73px",background:l?"inherit":"true"===i?"linear-gradient(270deg, rgba(75, 86, 107, 0.15) 0%, rgba(75, 86, 107, 0) 100%)":"linear-gradient(to right, rgba(75, 86, 107, 0.15) 0%, rgba(75, 86, 107, 0) 100%)",zIndex:1,right:"true"===i&&0,left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex"}}),h=e=>{let{onClick:t,className:i,noboxshadow:l,displayNoneOnMobile:r,width:x,height:h}=e,g=(0,o.A)(),m=(0,a.A)(g.breakpoints.down("sm"));return(0,n.jsx)(u,{isdisabled:!!m&&!!r||(null==i?void 0:i.includes("slick-disabled")),right:"true",noboxshadow:!0,children:(0,n.jsx)(p,{width:x,height:h,className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,s.Z)()?(0,n.jsx)(d.A,{size:30,color:g.palette.neutral[600]}):(0,n.jsx)(c.A,{size:30,color:g.palette.neutral[600]})})})},g=e=>{let{left:t,onClick:i,className:l,noboxshadow:r,displayNoneOnMobile:p,width:h,height:g}=e,m=(0,o.A)(),v=(0,a.A)(m.breakpoints.down("sm"));return(0,n.jsx)(u,{isdisabled:!!v&&!!p||(null==l?void 0:l.includes("slick-disabled")),noboxshadow:!0,children:(0,n.jsx)(x,{width:h,height:g,left:t,className:"client-nav client-prev ".concat(l),onClick:i,isdisabled:null==l?void 0:l.includes("slick-disabled"),children:"rtl"===(0,s.Z)()?(0,n.jsx)(c.A,{size:30,color:m.palette.neutral[600]}):(0,n.jsx)(d.A,{size:30,color:m.palette.neutral[600]})})})}},11261:(e,t,i)=>{i.d(t,{E:()=>o});var n=i(1992),l=i(60398),r=i(77165);let s=async(e,t)=>{if("parcel"===e){let{data:e}=await l.A.get("api/v1/get-parcel-cancellation-reasons?offset=1&limit=10&user_type=customer&cancellation_type=".concat("pending"===t?"before_pickup":"after_pickup"));return e}{let{data:e}=await l.A.get("api/v1/customer/order/cancellation-reasons?offset=1&limit=10&type=customer");return e}},o=(e,t)=>(0,n.useQuery)("cancel-reasons",()=>s(e,t),{enabled:!1,onError:r.P1})},12162:(e,t,i)=>{i.d(t,{M:()=>r});var n=i(35268),l=i(58582);let r=(0,n.Ay)(l.A)(e=>{let{theme:t,minHeight:i,minHeightForCustomCard:n}=e;return{minHeight:i&&"16vh"||n&&"30vh",position:"relative",width:"100%",height:"100%",textAlign:"center",padding:"1.875rem",boxSizing:"border-box",boxShadow:"0px 0px 2px rgba(145, 158, 171, 0.2), 0px 12px 24px -4px rgba(145, 158, 171, 0.1)",border:"1px solid rgba(65, 83, 179, 0.3)",[t.breakpoints.up("sm")]:{minHeight:i&&"14vh"||n&&"20vh"}}})},14573:(e,t,i)=>{i.d(t,{A:()=>A});var n=i(37876),l=i(21398),r=i(60595),s=i(38388),o=i(7227),a=i(35003),d=i(21459),c=i(82179);i(62139);var x=i(89099),p=i(74695),u=i(75186),h=i(28343),g=i(65269);i(52904);var m=i(37571),v=i(4012);let j=(0,d.A)(r.A)(e=>{let{theme:t}=e;return{padding:"20px",cursor:"pointer",border:"1px solid",borderColor:"#EAEEF2",transition:"all ease 0.5s","&:hover":{boxShadow:"0px 10px 20px rgba(88, 110, 125, 0.1)",img:{transform:"scale(1.1)"},".MuiTypography-body1:first-child":{color:t.palette.primary.main,letterSpacing:"0.02em"}},".MuiTypography-body1:first-child":{transition:"all ease 0.5s"}}}),A=e=>{let t=(0,l.u)(),{data:i}=e,r=(0,p.wA)(),d=(0,x.useRouter)(),A=(0,g.D)(),{ref:f,isEllipsed:b}=(0,v.A)(null==i?void 0:i.name);return(0,n.jsx)(h.jB,{children:(0,n.jsx)(j,{...e,onClick:()=>{e.onClick?e.onClick(i):(r((0,u.oA)(i)),d.push("/parcel-delivery-info",void 0,{shallow:!0}))},sx:{borderColor:(null==e?void 0:e.selected)?t.palette.primary.main:""},children:(0,n.jsxs)(c.A,{direction:"row",alignItems:"center",gap:3,children:[(0,n.jsx)(s.A,{sx:{img:{width:"72px",height:"72px"}},children:(0,n.jsx)(m.A,{width:72,height:72,src:null==i?void 0:i.image_full_url,objectFit:"contain"})}),(0,n.jsxs)(c.A,{width:"100%",children:[(0,n.jsx)(o.A,{title:(null==i?void 0:i.name)||"",placement:"bottom",arrow:!0,disableHoverListener:!b,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(a.A,{ref:f,fontSize:{xs:"14px",sm:"18px",md:"18px"},fontWeight:"500",component:"h3",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"},children:null==i?void 0:i.name})}),(0,n.jsx)(a.A,{fontSize:{xs:"12px",sm:"14px",md:"14px"},color:t.palette.neutral[400],className:A.multiLineEllipsis,maxHeight:"40px",children:null==i?void 0:i.description})]})]})})})}},15162:(e,t,i)=>{i.d(t,{A:()=>n});let n={src:"/_next/static/media/newnoitem.ce0d5560.png",height:800,width:800,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAMFBMVEVMaXEuLi4kJCRKSkpLS0tra2sjIyMzMzNcXFwFBQW4uLixsbF+fn5jY2OVlZXFxcWvksngAAAACnRSTlMAhjpQaN9tpN4LIWFJawAAAAlwSFlzAAAD6AAAA+gBtXtSawAAADlJREFUeJwdxscRwCAQBME5A0h7mPyzpaRXN3gfozvE2WvtE4RKKgWo5iwB2VQtAUyyT16zx/+BJxc8OgFXsfNx9gAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},15946:(e,t,i)=>{i.d(t,{H:()=>r}),i(14232);var n=i(10841),l=i.n(n);let r=e=>l()(e).format("ll")},20699:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(1992),l=i(77165),r=i(60398),s=i(64907),o=i(85784);let a=async(e,t,i)=>{let{data:n}=await r.A.get("".concat(s.n_,"?sort_by=").concat(e,"&name=").concat(t,"&type=").concat("halal"!==i?i:"","&halal=").concat(+("halal"===i)));return n};function d(e,t,i){return(0,n.useQuery)(["top-offer-near-me",(0,o.E)()],()=>a(e,t,i),{enabled:!0,staleTime:6e4,cacheTime:6e4,onError:l.P1})}},22139:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(37876);i(14232);let l=e=>(0,n.jsx)("div",{children:(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M5.91163 10.8596V9.70405H8.22274V10.8596H5.91163ZM3.60052 7.97071V6.81516H10.5339V7.97071H3.60052ZM1.86719 5.08182V3.92627H12.2672V5.08182H1.86719Z",fill:"#152e6e"})})});l.propTypes={};let r=l},26501:(e,t,i)=>{i.d(t,{A:()=>q});var n=i(37876),l=i(62712),r=i(6995),s=i(38388),o=i(60795),a=i(35003),d=i(41316),c=i(84812),x=i(74441),p=i(26489),u=i(97914),h=i(48230),g=i.n(h),m=i(28343),v=i(21398),j=i(76252),A=i(51615),f=i(87285),b=i(89099),w=i(14232),y=i(74695),S=i(79113),k=i(17203),T=i(73078),C=i(35268),_=i(6482),R=i(82),E=i(52904),I=i(94089);let B=(0,C.Ay)(c.A)(e=>{let{theme:t,border:i}=e;return{border:"true"===i&&"1px solid ".concat(t.palette.neutral[400]),borderRadius:"5px",padding:"7px 16px"}}),M=e=>{let{handleSortBy:t,sortBy:i}=e,[l,r]=w.useState(null),{t:s}=(0,R.Bd)(),d=e=>{null==t||t(e),r(null)},c=!!l,x=(e,t)=>{let i;switch(e){case"AtoZ":i=s("Sort by : A to Z");break;case"ZtoA":i=s("Sort by : Z to A");break;default:i=s("Sort by : Default")}return(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,children:[(0,n.jsx)(E.A,{src:I.A.src,height:"12px",width:"12px",objectfit:"contain"}),(0,n.jsx)(a.A,{fontSize:"13px",sx:{color:e=>e.palette.neutral[600]},children:i}),"true"===t&&(0,n.jsx)(n.Fragment,{children:c?(0,n.jsx)(T.A,{sx:{color:e=>e.palette.text.secondary}}):(0,n.jsx)(k.A,{sx:{color:e=>e.palette.text.secondary}})})]})};return(0,n.jsxs)("div",{children:[(0,n.jsx)(B,{border:"true",onClick:e=>{r(e.currentTarget)},children:x(i,"true")}),(0,n.jsxs)(_.Ay,{fullWidth:!0,id:c?"simple-popover":void 0,open:c,anchorEl:l,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{style:{width:(null==l?void 0:l.clientWidth)||"auto"}},children:[(0,n.jsx)(B,{onClick:()=>d("AtoZ"),children:x("AtoZ","false")}),(0,n.jsx)(B,{onClick:()=>d("ZtoA"),children:x("ZtoA","false")}),(0,n.jsx)(B,{onClick:()=>d("default"),children:x("default","false")})]})]})};var L=i(82179),D=i(89037);let z={src:"/_next/static/media/product.992a3f63.png"};var F=i(37571);let W=e=>{let{image:t,name:i,stock:l,id:s,horizontal:o,baseUrl:d,items_count:c}=e,x=(0,v.u)(),p=t||z.src;return(0,r.A)("(max-width: 991px)"),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(L.A,{sx:{flexDirection:o?"column":"row",textAlign:o?"center":"",alignItems:"center",columnGap:"8px",position:"relative",transition:"all ease .3s",padding:"10px",borderRadius:"4px",":hover":{boxShadow:o?"":x.shadows[14]},a:{position:"absolute",inset:"0"}},children:[(0,n.jsx)(g(),{href:"/home?brand_id=".concat(s,"&data_type=brand")}),(0,n.jsx)(L.A,{sx:{maxWidth:o?{xs:"200px"}:{xs:"45px",md:"60px",lg:"70px"},marginBottom:o?"10px":"0",img:{maxWidth:"100%",transition:"all ease .3s",height:"unset",objectFit:"contain",aspectRatio:"1"}},className:"brand-card-image",children:(0,n.jsx)(F.A,{src:p,loading:"lazy",width:200,height:200,alt:"Brand"})}),(0,n.jsxs)(D.A,{width:o?"100%":"0",flexGrow:"1",children:[i&&(0,n.jsx)(a.A,{variant:"h6",sx:{fontSize:o?"18px":{xs:"14px !important"},display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:{xs:"1",sm:"2"},overflow:"hidden",textOverflow:"ellipsis",fontWeight:"600"},component:"h3",children:i}),(0,n.jsxs)(a.A,{variant:"body2",sx:{opacity:"0.8",fontSize:{xs:"10px",md:"14px"}},component:"span",children:[c," ",(0,u.t)("Products")]})]})]})})};W.propTypes={};let P=(0,w.memo)(W);var O=i(85784);let Z=(0,j.A)(l.A)(e=>{let{theme:t}=e;return{background:t.palette.background.sklenton,maxWidth:"100%"}}),H=(0,j.A)(s.A)(e=>{let{theme:t}=e;return{borderRadius:"10px",padding:"10px",background:t.palette.background.default,border:"1px solid ".concat(t.palette.divider),transition:"all ease .3s",":hover":{boxShadow:t.shadows[14]},[t.breakpoints.up("xl")]:{".brand-card-image":{maxWidth:"100px",marginRight:"5px"}}}}),N=(0,j.A)(o.A)(e=>{let{theme:t}=e;return{flexDirection:"row",gap:1,".MuiBox-root:first-of-type":{[t.breakpoints.down("md")]:{display:"none"},":hover":{boxShadow:t.shadows[18]}}}}),V=(0,j.A)(s.A)(e=>{let{theme:t}=e;return{width:{xs:"100%"},maxWidth:{lg:"200px",xl:"270px"},background:t.palette.background.paper,":hover":{boxShadow:t.shadows[4]},borderRadius:"5px",[t.breakpoints.up("xs")]:{padding:"17px 35px 22px"},[t.breakpoints.up("md")]:{padding:"15px 20px 20px",boxShadow:t.shadows[3]},[t.breakpoints.up("xl")]:{padding:"17px 35px 22px"}}}),X=(0,j.A)(o.A)(e=>{let{theme:t,datalength:i}=e;return{width:"575px",flexGrow:"1",borderRadius:"5px",position:"relative",".MuiBox-root:first-of-type":{display:"none"},alignItems:"center",background:t.palette.background.paper,boxShadow:t.shadows[3],[t.breakpoints.up("xs")]:{padding:"20px 15px"},[t.breakpoints.up("md")]:{padding:"20px 5px","&::before":{position:"absolute",content:"''",left:"0",top:"50%",height:"1px",width:"100%",opacity:i>4?"1":"0",backgroundColor:(0,x.X4)(t.palette.neutral[400],.2)},":hover":{boxShadow:t.shadows[4]}},[t.breakpoints.up("xl")]:{padding:"45px 30px"},[t.breakpoints.down("md")]:{display:"grid",gridTemplateColumns:"1fr 1fr",width:"100%",gap:".5rem","> .MuiBox-root":{borderRadius:".25rem"},".MuiBox-root:first-of-type":{display:"flex",gridRow:"span 4",justifyContent:"center",padding:".25rem",img:{maxWidth:"80px"}}}}}),q=e=>{var t;let{viewAll:i}=e,[x,h]=(0,w.useState)("Default"),j=(0,v.u)();(0,w.useRef)();let k=(0,r.A)("(max-width: 991px)"),{brands:T}=(0,y.d4)(e=>null==e?void 0:e.brands),{configData:C}=(0,y.d4)(e=>null==e?void 0:e.configData),_=(0,y.wA)(),{refetch:R,isLoading:E,isFetching:I}=(0,A.A)(e=>{_((0,S.VO)(e))});(0,w.useEffect)(()=>{R()},[T,(0,O.E)()]);let B=null==C||null==(t=C.base_urls)?void 0:t.brand_image_url,[L,D]=(0,w.useState)(T);(0,w.useEffect)(()=>{T&&("AtoZ"===x?D([...T].sort((e,t)=>e.name.localeCompare(t.name))):"ZtoA"===x?D([...T].sort((e,t)=>t.name.localeCompare(e.name))):D(T))},[T,x]);let z=(0,b.useRouter)();return((0,w.useEffect)(()=>{E||I||(null==T?void 0:T.length)!==0||!i||z.push("/home")},[E,I]),i)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(s.A,{paddingBlock:"32px",children:(0,n.jsxs)(f.A,{children:[(null==L?void 0:L.length)>0?(0,n.jsxs)(o.A,{direction:"row",flexWrap:"wrap",justifyContent:"space-between",marginBottom:"30px",paddingBottom:"20px",borderBottom:"1px solid ".concat(j.palette.divider),gap:2,children:[(0,n.jsxs)(s.A,{width:{xs:"100%",sm:"0"},flexGrow:"1",children:[(0,n.jsx)(p.A,{text:"Brands",textAlign:"left",component:"h2"}),(0,n.jsx)(a.A,{variant:"body1",children:(0,u.t)("Explore the Trusted and Trendsetting Brands")})]}),(0,n.jsx)(M,{handleSortBy:e=>{h(e)},sortBy:x})]}):E||I?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{variant:"text",width:"80px"}),(0,n.jsx)(l.A,{variant:"text",width:"60px"})]}):"",E||I?(0,n.jsx)(n.Fragment,{}):(null==L?void 0:L.length)>0&&(0,n.jsx)(d.Ay,{container:!0,spacing:2,children:null==L?void 0:L.map((e,t)=>(0,n.jsx)(d.Ay,{item:!0,xs:6,md:3,children:(0,n.jsx)(H,{children:(0,n.jsx)(P,{name:null==e?void 0:e.name,image:null==e?void 0:e.image_full_url,stock:null==e?void 0:e.items_count,id:null==e?void 0:e.id,baseUrl:B,items_count:null==e?void 0:e.items_count})})},null==e?void 0:e.id))})]})})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.jB,{justifyContent:"space-between",flexDirection:"row",children:(null==T?void 0:T.length)>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{text:"Brands",component:"h2"}),(0,n.jsx)(g(),{href:{pathname:"/all-brands"},children:(0,n.jsx)(c.A,{variant:"text",sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"}},children:(0,u.t)("View all")})})]}):E||I?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{variant:"text",width:"80px"}),(0,n.jsx)(l.A,{variant:"text",width:"60px"})]}):""}),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(s.A,{sx:{paddingTop:"15px"},children:E||I?(0,n.jsxs)(N,{children:[(0,n.jsx)(V,{children:(0,n.jsx)(Z,{width:240,variant:"rounded",animation:!1,height:260})}),(0,n.jsxs)(X,{direction:"row",flexWrap:"wrap",children:[(0,n.jsx)(V,{children:(0,n.jsx)(Z,{width:k?"100%":240,variant:"rounded",animation:!1,height:k?400:260})}),Array(10).fill().map((e,t)=>(0,n.jsx)(s.A,{sx:{width:{md:"25%"},padding:"5px"},children:(0,n.jsx)(Z,{width:"100%",variant:"rounded",animation:!1,height:80})},t)).slice(1,9)]})]}):(null==T?void 0:T.length)>0&&(0,n.jsxs)(N,{children:[(0,n.jsx)(V,{children:(0,n.jsx)(P,{name:T[0].name,image:T[0].image_full_url,stock:T[0].items_count,horizontal:!0,id:T[0].id,baseUrl:B,items_count:T[0].items_count})}),(0,n.jsxs)(X,{datalength:null==T?void 0:T.length,direction:"row",flexWrap:"wrap",children:[(0,n.jsx)(V,{children:(0,n.jsx)(P,{name:T[0].name,image:T[0].image_full_url,stock:T[0].items_count,horizontal:!0,id:T[0].id,baseUrl:B,items_count:T[0].items_count})}),null==T?void 0:T.map((e,t)=>(0,n.jsx)(s.A,{sx:{width:{md:"25%"},padding:"5px"},children:(0,n.jsx)(P,{name:null==e?void 0:e.name,image:null==e?void 0:e.image_full_url,stock:null==e?void 0:e.items_count,id:null==e?void 0:e.id,baseUrl:B,items_count:null==e?void 0:e.items_count})},null==e?void 0:e.id)).slice(1,9)]})]})})})]})}},26709:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(60398),l=i(1992),r=i(64907),s=i(77165);let o=async()=>{let{data:e}=await n.A.get(r.i3);return e};function a(){return(0,l.useQuery)("parcel-categorys",o,{enabled:!1,onError:s.P1})}},31301:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(37876);let l=()=>(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{x:"0.186275",y:"0.186275",width:"15.6275",height:"15.6275",rx:"7.81373",fill:"#9DA7BC",stroke:"currentColor",strokeWidth:"0.372549"}),(0,n.jsx)("rect",{x:"5.66211",y:"4.68848",width:"7.5454",height:"0.93329",transform:"rotate(45 5.66211 4.68848)",fill:"currentColor"}),(0,n.jsx)("rect",{x:"5",y:"10.024",width:"7.5487",height:"0.936582",transform:"rotate(-45 5 10.024)",fill:"currentColor"})]})},44211:(e,t,i)=>{i.d(t,{A:()=>R});var n=i(37876),l=i(14232),r=i(66703),s=i(60795),o=i(35003),a=i(74441),d=i(84812),c=i(82);i(89099);var x=i(74695),p=i(74033),u=i(1992),h=i(97685),g=i(26091);i(12162);var m=i(77165),v=i(3801),j=i(51499),A=i(63995),f=i(11261),b=i(29978),w=i(35502),y=i(85779),S=i(38388),k=i(31450),T=i(99035),C=i(74748);let _=e=>{let{id:t,handleOrderDetailsClose:i,amount:_,setOpenPaymentMethod:R,setPaymentFailedData:E,refetchTrackData:I}=e,B=(0,r.A)(),[M,L]=(0,l.useState)(!1),[D,z]=(0,l.useState)(null),[F,W]=(0,l.useState)(null),{t:P}=(0,c.Bd)(),O=(0,x.wA)(),{data:Z,refetch:H}=(0,f.E)(),{guestUserInfo:N}=(0,x.d4)(e=>e.guestUserInfo),{refetch:V,data:X}=(0,T.H)(t,e=>{e&&(null==E||E(e))});(0,l.useEffect)(()=>{t&&V()},[t]),(0,l.useEffect)(()=>{H().then()},[]);let q=JSON.parse(window.localStorage.getItem("currentLatLng")),{data:Y}=(0,u.useQuery)(["zoneId",location],async()=>b.k.getZoneId(q),{retry:1}),Q={order_id:t,_method:"put",guest_id:(0,w.W)()},{mutate:G,isLoading:J}=(0,u.useMutation)("order-payment-method-update",g.X.FailedPaymentMethodUpdate),{mutate:U,isLoading:K}=(0,u.useMutation)("order-payment-method-update",g.X.FailedPaymentMethodCancel),$=e=>{h.oR.success(e.data.message),O((0,p.gG)()),L(!1),null==I||I(),null==i||i()},ee=()=>{O((0,p.gG)()),U({...Q,reason:"Order payment canceled"},{onSuccess:$,onError:m.Jm})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.A,{width:"100%",alignItems:"center",justifyContent:"center",spacing:1,p:"2rem 6rem",borderRadius:"20px",children:[(0,n.jsx)(y.A,{sx:{fontSize:"50px",color:e=>e.palette.error.main}}),(0,n.jsxs)(s.A,{spacing:2,alignItems:"center",textAlign:"center",children:[(0,n.jsx)(o.A,{fontWeight:"500",fontSize:"1rem",color:B.palette.primary.main,children:"".concat(P("Order")," #").concat(t)}),(0,n.jsx)(o.A,{fontWeight:"500",fontSize:"1rem",color:B.palette.primary.dark,children:P("Your order is placed but")}),(0,n.jsx)(o.A,{component:"span",backgroundColor:(0,a.X4)(B.palette.error.light,.3),fontSize:"18px",fontWeight:"600",color:B.palette.error.main,padding:"5px 10px",borderRadius:"5px",children:P("Payment failed !!")}),(0,n.jsxs)(S.A,{sx:{padding:"1rem",borderRadius:"5px",backgroundColor:(0,a.X4)(B.palette.neutral[600],.1),minWidth:"235px"},children:[(0,n.jsx)(o.A,{fontSize:"0.9rem",color:B.palette.neutral[700],children:P("Due Amount")}),(0,n.jsx)(o.A,{fontSize:"20px",fontWeight:"700",color:B.palette.neutral[1e3],children:(0,k.Yi)((null==X?void 0:X.partially_paid_amount)>0?(null==X?void 0:X.order_amount)-(null==X?void 0:X.partially_paid_amount):null==X?void 0:X.order_amount)})]}),(0,n.jsx)(o.A,{sx:{maxWidth:"235px"},children:P("Please choose an option from below to continue with this order")}),(0,w.g)()?(0,n.jsx)(d.A,{variant:"contained",onClick:()=>{null==R||R(!0),null==i||i()},sx:{maxWidth:"250px"},children:P("Pay Now")}):null,(null==X?void 0:X.cash_on_delivery)&&(0,n.jsx)(v.A,{loading:J,variant:"contained",fullWidth:!0,onClick:()=>{(null==X?void 0:X.maximum_cod_order_amount)>(null==X?void 0:X.order_amount)?G(Q,{onSuccess:$,onError:m.Jm}):h.oR.error(C.zK)},sx:{maxWidth:"250px"},children:P("Switch to Cash On Delivery")}),(0,n.jsx)(v.A,{sx:{maxWidth:"250px"},variant:"outlined",color:"error",fullWidth:!0,onClick:()=>void ee(),loading:K,children:P("Cancel Order")})]})]}),(0,n.jsx)(j.A,{openModal:M,setModalOpen:L,handleClose:()=>L(!1),children:(0,n.jsx)(A.A,{cancelReason:D,setCancelReason:z,cancelReasonsData:Z,setModalOpen:L,handleOnSuccess:ee,orderLoading:J,additionalInfo:F,setAdditionalInfo:W,cancelLoading:K})})]})};_.propTypes={};let R=_},50687:(e,t,i)=>{i.d(t,{t:()=>n,z:()=>l});let n=[{label:"Available for Now",value:"available_now",checked:!1},{label:"Discounted",value:"discounted",checked:!1}],l=[{label:"Currently Open",value:"currently_open",checked:!1},{label:"Top Rated",value:"top_rated",checked:!1},{label:"Discounted",value:"discounted",checked:!1},{label:"Popular",value:"popular",checked:!1},{label:"Free delivery",value:"free_delivery",checked:!1},{label:"Available for Now",value:"available_now",checked:!1},{label:"Coupon Applicable Restaurants",value:"coupon",checked:!1}]},51615:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(64907),l=i(1992),r=i(35502),s=i(60398),o=i(77165);let a=async()=>{(0,r.g)();let{data:e}=await s.A.get(n.Tc);return e};function d(e){return(0,l.useQuery)("get-brandlists",()=>a(),{enabled:!1,onSuccess:e,onError:o.P1})}},52501:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(37876);i(14232);var l=i(39889),r=i(35268),s=i(89037),o=i(82179),a=i(35003),d=i(10841),c=i.n(d);let x=(0,r.Ay)(s.A)(e=>{let{theme:t}=e;return{backgroundColor:t.palette.primary.main,color:t.palette.whiteContainer.main,width:"42px",height:"42px",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",borderRadius:"4px"}}),p=()=>(0,n.jsx)("span",{children:"This campaign is over"}),u=e=>{let{days:t,hours:i,minutes:l,seconds:r,completed:s}=e;return s?(0,n.jsx)(p,{}):(0,n.jsxs)(o.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsxs)(o.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(x,{children:t}),(0,n.jsx)(a.A,{color:"neutral[100]",children:"DD"})]}),(0,n.jsx)(a.A,{children:":"}),(0,n.jsxs)(o.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(x,{children:i}),(0,n.jsx)(a.A,{color:"neutral[100]",children:"HH"})]}),(0,n.jsx)(a.A,{children:":"}),(0,n.jsxs)(o.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(x,{children:l}),(0,n.jsx)(a.A,{color:"neutral[100]",children:"MM"})]}),(0,n.jsx)(a.A,{children:":"}),(0,n.jsxs)(o.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(x,{children:r}),(0,n.jsx)(a.A,{color:"neutral[100]",children:"SS"})]})]})},h=e=>{let{endDate:t}=e,i=c()(t),r=c()(),s=i.diff(r);return(0,n.jsx)(l.Ay,{date:Date.now()+s,renderer:u})}},57604:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(37876),l=i(60795),r=i(62712);i(14232);let s=()=>(0,n.jsx)(l.A,{direction:"row",spacing:2,children:[void 0,void 0,void 0,void 0].map(e=>(0,n.jsxs)(l.A,{display:"flex",alignItems:"center",children:[(0,n.jsx)(r.A,{variant:"rectangular",animation:"wave",width:30,height:30}),(0,n.jsx)(r.A,{variant:"text",animation:"wave",width:20})]},e))})},58106:(e,t,i)=>{i.d(t,{_:()=>a,n:()=>c}),i(14232);var n=i(1992),l=i(77165),r=i(60398),s=i(64907);let o=async e=>{let{limit:t,offset:i}=e,{data:n}=await r.A.get("".concat(s.gc,"?limit=").concat(t,"&offset").concat(i));return n};function a(e){return(0,n.useQuery)("flash-sales",()=>o(e),{enabled:!1,onError:l.Jm})}let d=async e=>{let{limit:t,offset:i,id:n}=e,{data:l}=await r.A.get("".concat(s.Fm,"?limit=").concat(t,"&offset=").concat(i,"&flash_sale_id=").concat(n));return l};function c(e){return(0,n.useInfiniteQuery)("flash-sales-items",t=>{let{pageParam:i=1}=t;return d({...e,pageParam:i})},{getNextPageParam:(e,t)=>{var i;let n=t.length+1;return(null==e||null==(i=e.products)?void 0:i.length)>0?n:void 0},getPreviousPageParam:(e,t)=>e.prevCursor,enabled:!1,onError:l.Jm,cacheTime:"0"})}},61549:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(60398),l=i(1992),r=i(77165),s=i(64907),o=i(85784);let a=async()=>{let{data:e}=await n.A.get(s.kc);return e};function d(){return(0,l.useQuery)(["basic-cam",(0,o.E)()],a,{enabled:!0,staleTime:6e4,cacheTime:6e4,onError:r.P1})}},63995:(e,t,i)=>{i.d(t,{A:()=>b});var n=i(37876),l=i(14232),r=i(44395),s=i(35003),o=i(97914),a=i(80553),d=i(71918),c=i(76572),x=i(18952),p=i(24779),u=i(64266),h=i(67906),g=i(60795),m=i(1912),v=i(84812),j=i(3801),A=i(9329),f=i(28343);i(97685);let b=e=>{var t,i,b,w,y,S;let{cancelReason:k,orderLoading:T,setCancelReason:C,cancelReasonsData:_,setModalOpen:R,handleOnSuccess:E,additionalInfo:I,setAdditionalInfo:B,isParcel:M,orderStatus:L,setReturnFareOpenModal:D,configData:z,loading:F,cancelLoading:W}=e,[P,O]=(0,l.useState)();return(0,n.jsx)(n.Fragment,{children:M?(0,n.jsx)(A.e,{width:"27rem",children:(0,n.jsxs)(f.jB,{spacing:1,children:[(0,n.jsx)(a.A,{sx:{padding:"10px 24px"},children:(0,n.jsxs)(f.jB,{children:[(0,n.jsxs)(x.A,{component:"fieldset",children:[(0,n.jsx)(s.A,{fontWeight:"500",fontSize:"14px",paddingY:".5rem",children:(0,o.t)("Please select cancellation reason")}),(0,n.jsx)(g.A,{spacing:1,children:_&&(null==_||null==(t=_.data)?void 0:t.length)>0&&(null==_||null==(i=_.data)?void 0:i.map(e=>(0,n.jsx)(d.A,{checked:Array.isArray(k)?k.includes(e.reason):k===e.reason,onChange:t=>{let i=t.target.checked,n=e.reason;Array.isArray(k)?i?C([...k,n]):C(k.filter(e=>e!==n)):i?C(k?[k,n]:[n]):C([])},control:(0,n.jsx)(u.A,{}),label:e.reason,labelPlacement:"start",sx:{justifyContent:"space-between",marginLeft:0,marginRight:0,border:(Array.isArray(k)?k.includes(e.reason):k===e.reason)?"none":"1px solid #F3F3F3",borderRadius:"8px",padding:"0px 10px",transition:"all 0.2s ease-in-out",boxShadow:(Array.isArray(k)?k.includes(e.reason):k===e.reason)?"0 2px 8px rgba(0, 0, 0, 0.1)":"none",backgroundColor:(Array.isArray(k)?k.includes(e.reason):k===e.reason)?"rgba(174, 175, 175, 0.04)":"transparent","& .MuiFormControlLabel-label":{color:(Array.isArray(k)?k.includes(e.reason):k===e.reason)?"#000000":"inherit",fontWeight:(Array.isArray(k)?k.includes(e.reason):k===e.reason)?"500":"normal"},"&:hover":{backgroundColor:"rgba(210, 215, 220, 0.02)"}}},null==e?void 0:e.id)))})]}),(0,n.jsx)(s.A,{mt:"10px",fontWeight:"600",fontSize:"14px",children:(0,o.t)("Comments")}),(0,n.jsx)(m.A,{sx:{marginTop:".5rem"},id:"outlined-multiline-static",label:"Type here your cancel reason...",multiline:!0,fullWidth:!0,rows:4,variant:"outlined",value:I,onChange:e=>B(e.target.value)})]})}),(0,n.jsx)(h.A,{sx:{paddingX:"20px"},children:(0,n.jsxs)(g.A,{direction:"column",alignItems:"center",justifyContent:"center",width:"100%",spacing:2,children:["pending"===L||(null==z?void 0:z.parcel_cancellation_basic_setup)&&(null==z||null==(b=z.parcel_cancellation_basic_setup)?void 0:b.return_fee_status)!=="1"?(0,n.jsx)(j.A,{loading:T,onClick:E,variant:"contained",sx:{width:"100%"},children:(0,o.t)("Submit")}):(0,n.jsx)(j.A,{loading:T,onClick:()=>{D(!0),R(!1)},variant:"contained",sx:{width:"100%"},children:(0,o.t)("Next")}),(0,n.jsx)(s.A,{onClick:()=>R(!1),fontWeight:"600",sx:{textDecoration:"underline",cursor:"pointer",color:"#000"},variant:"body2",children:(0,o.t)("Continue Delivery")})]})})]})}):(0,n.jsx)(A.e,{width:"22rem",children:(0,n.jsxs)(f.jB,{spacing:1,children:[(0,n.jsx)(r.A,{id:"alert-dialog-title",sx:{padding:"10px 24px"},children:(0,n.jsx)(s.A,{textAlign:"center",variant:"h6",children:(0,o.t)("What’s Wrong With This Order?")})}),(0,n.jsx)(a.A,{sx:{padding:"10px 24px"},children:(0,n.jsxs)(f.jB,{children:[(0,n.jsxs)(x.A,{component:"fieldset",children:[(null==_||null==(w=_.data)?void 0:w.length)>0&&(0,n.jsx)(s.A,{fontWeight:"600",variant:"h6",paddingY:".5rem",children:(0,o.t)("Cancel Reason")}),(0,n.jsx)(c.A,{"aria-label":"gender",name:"gender1",value:k,onChange:e=>{"object"==typeof e&&e.target?C(e.target.value):C(e)},children:_&&(null==_||null==(y=_.data)?void 0:y.length)>0&&(null==_||null==(S=_.data)?void 0:S.map(e=>(0,n.jsx)(d.A,{value:e.reason,checked:e.reason==k&&k,editable:!0,control:(0,n.jsx)(p.A,{}),label:e.reason},null==e?void 0:e.id)))})]}),(0,n.jsx)(s.A,{mt:"10px",fontWeight:"600",fontSize:"14px",children:(0,o.t)("Comments")}),(0,n.jsx)(m.A,{sx:{marginTop:".5rem"},id:"outlined-multiline-static",label:"Type here your cancel reason...",multiline:!0,fullWidth:!0,rows:4,variant:"outlined",value:I,onChange:e=>B(e.target.value)})]})}),(0,n.jsx)(h.A,{sx:{paddingX:"20px"},children:(0,n.jsxs)(g.A,{direction:"row",alignItems:"center",justifyContent:"center",width:"100%",spacing:2,children:[(0,n.jsx)(v.A,{variant:"contained",onClick:()=>{R(!1)},sx:{width:"100%",backgroundColor:e=>e.palette.neutral[300],color:e=>e.palette.neutral[1e3],"&:hover":{backgroundColor:e=>e.palette.neutral[400]}},children:(0,o.t)("Back")}),(0,n.jsx)(j.A,{loading:W||T,onClick:E,variant:"contained",sx:{width:"100%"},children:(0,o.t)("Submit")})]})})]})})})}},71827:(e,t,i)=>{i.d(t,{d:()=>o});var n=i(1992),l=i(64907),r=i(60398);let s=async e=>{let{data:t}=await r.A.post("".concat(l.yf),e);return t},o=()=>(0,n.useMutation)("update-payment-method",s)},77930:(e,t,i)=>{i.d(t,{A:()=>E});var n=i(37876),l=i(62712),r=i(10206),s=i(14232),o=i(19357),a=i(28343),d=i(79561),c=i(35268),x=i(41316),p=i(35003),u=i(74441),h=i(89037),g=i(82179),m=i(62139),v=i(89099),j=i(82),A=i(65269),f=i(10602),b=i(52904),w=i(31975);let y=(0,c.Ay)(a.iv)(e=>{let{theme:t,hover:i}=e;return{position:"relative",height:"180px",boxShadow:"true"===i?"0px 10px 20px rgba(88, 110, 125, 0.1)":"none",borderRadius:"10px",cursor:"pointer",transition:"all ease .3s","&:hover":{img:{transform:"scale(1.05)"}}}}),S=(0,c.Ay)(a.iv)(e=>{let{theme:t,hover:i}=e;return{position:"absolute",width:"calc(100% + 2px)",left:"-1px",bottom:"-1px",zIndex:"2",transition:"all ease .3s",background:"true"===i?t.palette.background.paper:(0,u.X4)(t.palette.background.paper,.9),borderRadius:"40px 0px 10px 10px",height:"93px",padding:"12px"}}),k=e=>{let{data:t}=e,i=(0,A.D)(),[l,r]=(0,s.useState)(!1),{t:o}=(0,j.Bd)(),a=(0,v.useRouter)();return(0,n.jsxs)(y,{hover:l?"true":"false",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),onClick:()=>{a.push({pathname:"/store/[id]",query:{id:"".concat((null==t?void 0:t.slug)?null==t?void 0:t.slug:null==t?void 0:t.id),module_id:"".concat(null==t?void 0:t.module_id),module_type:(0,f.c)(),store_zone_id:"".concat(null==t?void 0:t.zone_id)}})},children:[(0,n.jsx)(b.A,{src:null==t?void 0:t.cover_photo,alt:null==t?void 0:t.name,height:"100%",width:"100%",obejctfit:"contained",borderRadius:"10px"}),(0,n.jsx)(S,{hover:l?"true":"false",children:(0,n.jsxs)(x.Ay,{container:!0,children:[(0,n.jsx)(x.Ay,{item:!0,xs:3,sm:3,md:2.5,children:(0,n.jsx)(h.A,{sx:{border:".4px solid",width:"37px",height:"37px",borderRadius:"37px",borderColor:"#72D9FF"},children:(0,n.jsx)(b.A,{src:null==t?void 0:t.logo,alt:null==t?void 0:t.name,height:"100%",width:"100%",obejctfit:"contained",borderRadius:"37px"})})}),(0,n.jsx)(x.Ay,{item:!0,xs:9,sm:9,md:9.5,children:(0,n.jsx)(g.A,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",spacing:2,children:(0,n.jsxs)(g.A,{alignItems:"flex-start",spacing:1,children:[(0,n.jsx)(m.oD,{text:null==t?void 0:t.name,placement:"bottom",arrow:"false",children:(0,n.jsx)(p.A,{variant:"subtitle1",className:i.singleLineEllipsis,maxHeight:"20px",component:"h3",children:null==t?void 0:t.name})}),(0,n.jsx)(w.A,{text:null==t?void 0:t.address}),(0,n.jsxs)(p.A,{variant:"body2",color:"primary.main",fontWeight:"500",children:[(null==t?void 0:t.total_items)===1?null==t?void 0:t.total_items:(null==t?void 0:t.total_items)-1,(null==t?void 0:t.total_items)>2&&"+"," ",o("Items")]})]})})})]})})]})};k.propTypes={};var T=i(4955),C=i(26489),_=i(81765);let R=e=>{var t,i,c,x,p,u,h,g;let{title:m,configData:v,slide:j}=e,{data:A,refetch:f,fetchNextPage:b,isFetchingNextPage:w,isLoading:y}=(0,d.A)({type:"all",offset:1,limit:20});(0,s.useEffect)(()=>{f()},[]);let S=[];A&&(null==A||null==(i=A.pages)?void 0:i.length)>0&&(null==A||null==(p=A.pages)||null==(x=p[0])||null==(c=x.stores)?void 0:c.length)>0&&(null==A||null==(g=A.pages)||null==(h=g[0])||null==(u=h.stores)||u.forEach(e=>(null==e?void 0:e.featured)===1&&S.push(e)));let R={dots:!1,infinite:!1,speed:500,slidesToShow:null!=j?j:4,slidesToScroll:1,nextArrow:(0,n.jsx)(r.DE,{}),prevArrow:(0,n.jsx)(r.$k,{}),responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:3,infinite:!1}},{breakpoint:1250,settings:{slidesToShow:3.5,slidesToScroll:2,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:700,settings:{slidesToShow:2.5,slidesToScroll:2,initialSlide:2}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:479,settings:{slidesToShow:1.7,slidesToScroll:1}},{breakpoint:420,settings:{slidesToShow:1.3,slidesToScroll:1}}]};return(0,n.jsx)(_.t,{children:y?(0,n.jsxs)(a.jB,{spacing:1,children:[(0,n.jsx)(l.A,{width:"200px"}),(0,n.jsx)(o.A,{...R,children:[...Array(6)].map((e,t)=>(0,n.jsx)(T.A,{width:"290px"},t))})]}):(0,n.jsx)(n.Fragment,{children:A&&(null==A||null==(t=A.pages)?void 0:t.length)>0&&(null==S?void 0:S.length)>0&&(0,n.jsxs)(a.jB,{alignItems:"flex-start",justyfyContent:"flex-start",children:[y?(0,n.jsx)(l.A,{variant:"text",width:"110px"}):(0,n.jsx)(C.A,{text:m,component:"h2"}),(0,n.jsx)(a.Z7,{nopadding:"true",sx:{"& .slick-slider":{"& .slick-list":{paddingY:"16px"}}},children:(0,n.jsx)(o.A,{...R,children:null==S?void 0:S.map((e,t)=>{let{name:i,address:l,logo:r,cover_photo:s,total_items:o,slug:a,id:d,module_id:c,zone_id:x}=e,p={name:i,address:l,logo:null==e?void 0:e.logo_full_url,cover_photo:null==e?void 0:e.cover_photo_full_url,total_items:o,slug:a,id:d,module_id:c,zone_id:x};return(0,n.jsx)(k,{data:p},t)})})})]})})})};R.propTypes={};let E=R},79561:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(60398),l=i(64907),r=i(1992),s=i(77165);let o=async e=>{let{offset:t,limit:i,type:r,pageParam:s,filteredData:o}=e,{data:a}=await n.A.get("".concat(l.WD,"/").concat("take away"===r?"take_away":r,"?offset=").concat(s,"&limit=").concat(i,"&store_type=").concat(o));return a};function a(e){let{offset:t,limit:i,type:n,filteredData:l}=e;return(0,r.useInfiniteQuery)([n,null==e?void 0:e.currentTab,l,t],t=>{let{pageParam:i=1}=t;return o({...e,pageParam:i})},{getNextPageParam:(e,t)=>{var i;let n=t.length+1;return(null==e||null==(i=e.stores)?void 0:i.length)>0?n:void 0},getPreviousPageParam:(e,t)=>e.prevCursor,enabled:!1,onError:s.Jm,cacheTime:"0"})}},80271:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(60398),l=i(1992),r=i(64907),s=i(35502);let o=async()=>{if((0,s.g)()){let{data:e}=await n.A.get(r.FR);return e}};function a(){return(0,l.useQuery)("coupons-list",o,{enabled:!1})}},81765:(e,t,i)=>{i.d(t,{t:()=>rG,A:()=>rJ});var n=i(37876),l=i(35268),r=i(35003),s=i(89037),o=i(89099),a=i.n(o),d=i(14232),c=i(74695),x=i(35502),p=i(1992),u=i(64907),h=i(60398),g=i(77165);let m=async e=>{if((0,x.g)()){let{data:e}=await h.A.get("".concat(u.Or));return e}},v=async e=>{let{data:t}=await h.A.get("".concat(u.hP,"?order_id=").concat(e));return t};var j=i(75834),A=i(82991),f=i(64660),b=i(21398),w=i(76252),y=i(63481),S=i(60795),k=i(74441);let T=async()=>{let{data:e}=await h.A.get(u._v);return e};var C=i(15946),_=i(31301),R=i(31450),E=i(97914),I=i(56631),B=i(52904);let M={src:"/_next/static/media/cash-back.2bf05204.svg"},L=(0,w.A)(s.A)(e=>{let{theme:t}=e;return{position:"fixed",cursor:"pointer",display:"flex",bottom:"23px",right:"5%",zIndex:"999",[t.breakpoints.down("lg")]:{bottom:"63px"},[t.breakpoints.down("sm")]:{bottom:"53px",img:{width:"50px",height:"50px"}}}});(0,w.A)(s.A)(e=>{let{theme:t}=e;return{position:"fixed",display:"none",bottom:"0",right:"0",width:"100%",height:"100%",zIndex:"999",background:(0,k.X4)(t.palette.neutral[900],.9),[t.breakpoints.down("1200")]:{display:"block"}}});let D=(0,w.A)(s.A)(e=>{let{theme:t}=e;return{position:"fixed",bottom:"100px",right:"23px",zIndex:"99999",overflowY:"auto",width:"293px",maxHeight:"calc(100dvh - 200px)",[t.breakpoints.down("lg")]:{bottom:"130px"},[t.breakpoints.down("sm")]:{bottom:"110px",maxHeight:"calc(100dvh - 170px)"}}}),z=(0,w.A)(s.A)(e=>{let{theme:t}=e;return{background:t.palette.background.default,padding:"10px",borderRadius:"5px",fontSize:"10px",boxShadow:t.shadows[14],".box-top":{background:t.palette.background.custom7,padding:"8px",borderRadius:"3px",mb:2,".MuiTypography-h6":{fontSize:"14px"}}}}),F=()=>{var e;let[t,i]=(0,d.useState)(!1),l=(0,b.u)(),o=(0,c.wA)(),{refetch:a}=(e=e=>{o((0,I.xF)(e))},(0,p.useQuery)("cashback",()=>T(),{enabled:!1,staleTime:1e4,cacheTime:5e3,onSuccess:e,onError:g.P1})),{cashbackList:x}=(0,c.d4)(e=>e.cashbackList);if((0,d.useEffect)(()=>{x||a()},[]),(null==x?void 0:x.length)>0)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L,{onClick:()=>i(!t),children:(0,n.jsx)(B.A,{width:"68px",height:"72px",src:M.src,alt:"cashback"})}),(0,n.jsx)(D,{children:(0,n.jsx)(y.A,{in:t,children:(0,n.jsxs)(s.A,{position:"relative",padding:"16px",paddingTop:"0",sx:{background:(0,k.X4)(l.palette.neutral[1e3],.2),borderRadius:"8px"},children:[(0,n.jsx)(S.A,{onClick:()=>i(!t),position:"sticky",top:"0",justifyContent:"flex-end",direction:"row",children:(0,n.jsx)(s.A,{sx:{cursor:"pointer",transform:"translateX(16px)"},children:(0,n.jsx)(_.A,{})})}),(0,n.jsx)(S.A,{gap:"10px",children:x.map((e,t)=>(0,n.jsxs)(z,{children:[(0,n.jsx)(s.A,{className:"box-top",children:(0,n.jsxs)(r.A,{variant:"h6",children:[(null==e?void 0:e.cashback_type)==="amount"?(0,R.Yi)(null==e?void 0:e.cashback_amount):(null==e?void 0:e.cashback_amount)+"%"," ",(0,E.t)(null==e?void 0:e.title)]})}),(0,n.jsxs)(S.A,{direction:"row",px:1,children:[(0,n.jsxs)(s.A,{component:"span",children:[(0,E.t)("Min Spent")," ",(0,R.Yi)(null==e?void 0:e.min_purchase)]}),(0,n.jsx)(s.A,{component:"span",mx:"4px",children:"|"}),(0,n.jsx)(s.A,{component:"span",children:(0,C.H)(null==e?void 0:e.end_date)})]})]},t))})]})})})]})};var W=i(10602),P=i(80604),O=i(95080),Z=i(28343),H=i(53832),N=i(51499);let V={src:"/_next/static/media/start.f33caee9.png"};var X=i(66703),q=i(71733),Y=i(84812),Q=i(27874),G=i(6995),J=i(60595),U=i(41316),K=i(82179),$=i(23140),ee=i(65276);let et=e=>{let{distance:t}=e,{configData:i}=(0,c.d4)(e=>e.configData),n=(t/1e3).toFixed(null==i?void 0:i.digit_after_decimal_point);return t?Number.parseInt(n)>1e3?(0,E.t)("1k+ km"):"".concat((t/1e3).toFixed(null==i?void 0:i.digit_after_decimal_point),"km "):"0 km"};var ei=i(97685),en=i(82),el=i(65269),er=i(51707),es=i(74748),eo=i(50106),ea=i(89890),ed=i(62139),ec=i(37571);let ex=()=>{switch((0,W.c)()){case P.A.GROCERY:return{borderRadiusButton:"5px",borderRadiusSmallImage:"4px",smallImageGap:"8px",smallImageMarginLeft:"false",border:"false"};case P.A.PHARMACY:return{borderRadiusButton:"100px",borderRadiusSmallImage:"50%",smallImageGap:"0px",smallImageMarginLeft:"true",border:"true"};case P.A.ECOMMERCE:return{borderRadiusButton:"5px",borderRadiusSmallImage:"4px",smallImageGap:"8px",smallImageMarginLeft:"false",border:"false"};case P.A.FOOD:return{borderRadiusButton:"2px",borderRadiusSmallImage:"4px",smallImageGap:"8px",smallImageMarginLeft:"false",border:"false"}}},ep=(0,l.Ay)(s.A)(e=>{let{theme:t,margin_left:i,is_border:n,width:l,height:r}=e;return{position:"relative",height:null!=r?r:"30px",width:null!=l?l:"30px",marginLeft:"true"===i?"-5px":"0px",border:"true"===n?"1px solid ".concat(t.palette.background.default):"none",[t.breakpoints.down("sm")]:{height:"21px",width:"21px"}}}),eu=e=>{let{distance:t}=e,{t:i}=(0,en.Bd)();return(0,n.jsxs)(K.A,{sx:{background:"rgba(255, 255, 255, 0.9)",borderRadius:"0px 5px 5px 0px",p:"5px",color:"primary.main"},direction:"row",alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(Q.A,{color:"primary.main",sx:{fontSize:"16px"}}),(0,n.jsxs)(r.A,{variant:(0,er.u)()?"body3":"body1",children:[(0,n.jsx)("b",{children:(0,n.jsx)(et,{distance:t})})," ",i("From You")]})]})},eh=e=>{var t;let{item:i,isVisited:l}=e,a=(0,el.D)(),x=(0,X.A)(),p=(0,G.A)(x.breakpoints.down("sm")),[u,h]=(0,d.useState)(!1),{t:g}=(0,en.Bd)(),{mutate:m}=(0,$.S)(),{mutate:v}=(0,ee.P)(),j=(0,c.wA)(),A=(0,o.useRouter)(),{wishLists:b}=(0,c.d4)(e=>e.wishList),[w,y]=(0,d.useState)(!1);(0,d.useEffect)(()=>{C()},[b]);let S=()=>{A.push({pathname:"/store/[id]",query:{id:"".concat((null==i?void 0:i.slug)?null==i?void 0:i.slug:null==i?void 0:i.id),module_id:"".concat(null==i?void 0:i.module_id),module_type:(0,W.c)(),store_zone_id:"".concat(null==i?void 0:i.zone_id)}})},T=null==i?void 0:i.cover_photo_full_url,C=()=>{var e;(null==b||null==(e=b.store)?void 0:e.find(e=>e.id===(null==i?void 0:i.id)))?y(!0):y(!1)};return(0,n.jsxs)(J.A,{onClick:S,sx:{background:x.palette.neutral[100],padding:"10px",width:{xs:"220px",md:"280px"},cursor:"pointer","&:hover":{img:{transform:"scale(1.1)"}},".MuiTypography-subtitle2":{transition:"all ease 0.5s"},"&:hover .MuiTypography-subtitle2":{color:x.palette.primary.main,letterSpacing:"0.02em"}},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[(0,n.jsxs)(s.A,{sx:{borderRadius:"10px",position:"relative",height:{xs:"100px",md:"132px"},width:"100%",img:{width:"100%",height:"100%",objectFit:"cover"}},children:[(0,n.jsx)(ec.A,{src:T,alt:null==i?void 0:i.name,height:p?100:132,width:261,obejctFit:"cover",borderRadius:"10px"}),(0,W.c)()!==P.A.FOOD&&(0,n.jsx)(s.A,{sx:{position:"absolute",bottom:12,left:0,zIndex:2},children:(0,n.jsx)(eu,{distance:null==i?void 0:i.distance})}),(0,n.jsx)(ea.Q,{hover:u,children:(0,n.jsx)(ed.Ay,{quickViewHandleClick:()=>{S()},isHover:u,addToWishlistHandler:e=>{e.stopPropagation(),localStorage.getItem("token")?m(null==i?void 0:i.id,{onSuccess:e=>{e&&(j((0,f.wz)(i)),y(!0),ei.Ay.success(null==e?void 0:e.message))},onError:e=>{ei.Ay.error(e.response.data.message)}}):ei.Ay.error(g(es.F))},removeFromWishlistHandler:e=>{e.stopPropagation(),v(null==i?void 0:i.id,{onSuccess:e=>{j((0,f.Rz)(null==i?void 0:i.id)),y(!1),ei.Ay.success(e.message,{id:"wishlist"})},onError:e=>{ei.Ay.error(e.response.data.message)}})},isWishlisted:w})})]}),(0,n.jsx)(Z.iv,{sx:{mt:"10px"},children:(0,n.jsxs)(U.Ay,{container:!0,spacing:1.5,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:8.5,md:9,children:[(0,n.jsx)(ed.oD,{text:null==i?void 0:i.name,placement:"bottom",arrow:"false",children:(0,n.jsx)(r.A,{className:a.singleLineEllipsis,fontSize:{xs:"12px",md:"14px"},fontWeight:"500",component:"h3",children:null==i?void 0:i.name})}),(0,n.jsx)(r.A,{color:"text.secondary",className:a.multiLineEllipsis,height:"40px",fontSize:"12px",children:null==i?void 0:i.address})]}),(0,n.jsx)(U.Ay,{item:!0,xs:3.5,md:3,children:(0,n.jsx)(eo.A,{rating:null==i?void 0:i.avg_rating})})]})}),l&&(0,n.jsx)(Z.iv,{sx:{mt:"15px"},children:(0,n.jsxs)(U.Ay,{container:!0,spacing:1,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(U.Ay,{item:!0,xs:7,children:(0,n.jsx)(em,{products:null==i?void 0:i.items})}),(0,n.jsx)(U.Ay,{item:!0,xs:5,align:"right",children:(0,n.jsx)(Y.A,{variant:"contained",sx:{fontSize:"10px",borderRadius:null==ex||null==(t=ex())?void 0:t.borderRadiusButton,padding:{xs:"4px 10px",sm:"8px 16px"},backgroundColor:e=>(0,W.c)()===P.A.FOOD?e.palette.moduleTheme.food:e.palette.primary.main,"&:hover":{backgroundColor:e=>(0,W.c)()===P.A.FOOD&&(0,k.X4)(e.palette.moduleTheme.food,.7)}},onClick:S,children:g("Visit Again")})})]})})]})};eh.propTypes={};var eg=i(68628);let em=e=>{var t,i,l;let{products:r,width:o,height:a,justifyContent:d}=e,{configData:x}=(0,c.d4)(e=>e.configData);return(0,n.jsx)(n.Fragment,{children:(null==r?void 0:r.length)>0&&(0,n.jsxs)(Z.jB,{direction:"row",flexWrap:"wrap",justifyContent:null!=d?d:"flex-start",gap:null==ex||null==(t=ex())?void 0:t.smallImageGap,children:[r.map((e,t)=>{if(t<3){var i,l,r,s;return(0,n.jsx)(ep,{width:o,height:a,margin_left:(null==ex||null==(i=ex())?void 0:i.smallImageMarginLeft)==="true"&&0!==t?"true":"false",is_border:null==ex||null==(l=ex())?void 0:l.border,children:(0,n.jsx)(B.A,{src:null!=(s=null==e?void 0:e.image_full_url)?s:e,alt:null==e?void 0:e.name,height:"100%",width:"100%",obejctfit:"contained",borderRadius:null==ex||null==(r=ex())?void 0:r.borderRadiusSmallImage})},t)}}),(null==r?void 0:r.length)>3&&(0,n.jsxs)(s.A,{sx:{marginLeft:(null==ex||null==(i=ex())?void 0:i.smallImageMarginLeft)==="true"?"-5px":"0px",height:{xs:"21px",sm:"30px"},width:{xs:"21px",sm:"30px"},display:"flex",alignItems:"center",justifyContent:"center",borderRadius:null==ex||null==(l=ex())?void 0:l.borderRadiusSmallImage,fontSize:"10px",fontWeight:"700",color:"whiteContainer.main",backgroundColor:e=>(0,k.X4)(e.palette.neutral[600],.4)},children:["+ ",(null==r?void 0:r.length)-3]})]})})};var ev=i(28249);let ej=e=>{let{handleClose:t,handleRateButtonClick:i,productImage:l}=e,s=(0,X.A)();return(0,n.jsxs)(Z.jB,{p:"1rem 2rem",justifyContent:"center",alignItems:"center",spacing:1.4,children:[(0,n.jsx)(q.A,{onClick:()=>t(),sx:{position:"absolute",top:5,right:8},children:(0,n.jsx)(ev.A,{sx:{fontSize:{xs:"18px",md:"24px"}}})}),(0,n.jsx)(B.A,{src:V.src,width:"66px",height:"66px"}),(0,n.jsx)(r.A,{fontSize:{xs:"13px",sm:"15px"},textAlign:"center",fontWeight:"600",children:(0,E.t)("How was your experience with your last order ?")}),(0,n.jsx)(r.A,{fontSize:{xs:"10px",sm:"12px"},fontWeight:"400",color:s.palette.neutral[600],children:(0,E.t)("Share us your valuable feedbacks")}),(0,n.jsx)(Z.jB,{justifyContent:"center",alignItems:"center",children:(0,n.jsx)(em,{products:l,width:"36px",height:"36px",justifyContent:"center"})}),(0,n.jsx)(Y.A,{onClick:()=>i(),variant:"contained",sx:{p:{xs:"5px 10px 5px 10px",sm:"8px 15px 8px 15px",md:"7px 15px 7px 15px"},fontSize:{xs:"12px",sm:"12px",md:"14px"},"&:hover":{backgroundColor:e=>e.palette.primary.dark,color:e=>e.palette.whiteContainer.main}},children:(0,E.t)("Give Review")})]})};var eA=i(17701),ef=i(85784);let eb=async e=>{let{offset:t,type:i}=e,{data:n}=await h.A.get("".concat(u.N6,"?type=").concat(i));return n};function ew(e){return(0,p.useQuery)(["new-arrival-stores",null==e?void 0:e.type,(0,ef.E)()],()=>eb(e),{enabled:!0,cacheTime:3e5,staleTime:24e4,onError:g.Jm})}let ey=async()=>{let{data:e}=await h.A.get("".concat(u.bq));return e},eS=()=>(0,p.useQuery)(["visit again",(0,x.g)(),(0,ef.E)()],()=>ey(),{enabled:!!(0,x.g)(),cacheTime:3e5,staleTime:24e4,onError:g.P1}),ek=async()=>{let{data:e}=await h.A.get(u.gS);return e};var eT=i(4955),eC=i(84735),e_=i(36867),eR=i(33769),eE=i(28419),eI=i(62712),eB=i(7227),eM=i(26101),eL=i(14568),eD=i.n(eL),ez=i(36414),eF=i(31829);let eW=e=>{let{video:t,playing:i,setPlaying:l,ended:r,setEnded:s,height:o,isMargin:a}=e,c=(0,d.useRef)(null),[x,p]=(0,d.useState)(!0);return(0,n.jsxs)(S.A,{sx:{position:"relative",margin:a&&"0px 25px -110px",boxShadow:e=>"dark"===e.palette.mode?"0px 15px 30px rgba(0, 0, 0, 0.8)":"0px 15px 30px rgba(150, 150, 154, 0.40)",borderRadius:"10px",overflow:"hidden",height:null!=o?o:"200px",backgroundColor:e=>e.palette.neutral[400],zIndex:1},children:[(0,n.jsx)(eD(),{ref:c,url:t,width:"100%",height:"100%",playing:i,onEnded:()=>{l(!1),s(!0)},controls:!0,muted:!0,onPause:()=>{l(!1)},onPlay:()=>{l(!0)}}),i?null:(0,n.jsx)(q.A,{onClick:e=>{e.stopPropagation(),r&&(c.current.seekTo(0),s(!1)),l(!i)},sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:e=>e.palette.neutral[100],"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"},color:e=>e.palette.neutral[500]},children:r?(0,n.jsx)(ez.A,{sx:{fontSize:"2rem"}}):(0,n.jsx)(eF.A,{sx:{fontSize:"2rem"}})})]})};var eP=i(4012);let eO=e=>{let{item:t,itemLength:i,activeSlideData:l,onlyShimmer:a,index:x,sliderRef:p,data:u}=e,h=(0,o.useRouter)(),g=(0,X.A)(),m=(0,c.wA)(),v=(0,G.A)(g.breakpoints.down("md")),[j,A]=(0,d.useState)(!1),[b,w]=(0,d.useState)(!1),{wishLists:y}=(0,c.d4)(e=>e.wishList),[S,T]=(0,d.useState)(!1),{mutate:C}=(0,$.S)(),{mutate:_}=(0,ee.P)(),{ref:R,isEllipsed:I}=(0,eP.A)(null==t?void 0:t.title);(0,d.useEffect)(()=>{M()},[y]);let M=()=>{var e;(null==y||null==(e=y.store)?void 0:e.find(e=>{var i;return e.id===(null==t||null==(i=t.store)?void 0:i.id)}))?T(!0):T(!1)};(0,d.useEffect)(()=>{u&&(()=>{var e,n,r;if(l){if(i>3||v){b||(null==t?void 0:t.id)!==(null==l?void 0:l.id)||(null==l?void 0:l.add_type)!=="video_promotion"||A(!0);return}if(0===x&&"video_promotion"===t.add_type)return A(!0);if(1===x&&"video_promotion"===t.add_type){(b||(null==(e=u[0])?void 0:e.add_type)!=="video_promotion")&&A(!0);return}2===x&&"video_promotion"===t.add_type&&(b||(null==(n=u[1])?void 0:n.add_type)!=="video_promotion"&&(null==(r=u[0])?void 0:r.add_type)!=="video_promotion")&&A(!0)}})()},[i,l,x]),(0,d.useEffect)(()=>{b&&p.current&&p.current.slickPlay()},[b]),(0,d.useEffect)(()=>{if(b&&(null==u?void 0:u.length)>0){var e,t,n,l,r,s,o,a,d,c;let x=(null==(n=p.current)||null==(t=n.innerSlider)||null==(e=t.state)?void 0:e.currentSlide)+1;if(x{var i,n,l,r,s,o;e.stopPropagation(),h.push({pathname:"/store/[id]",query:{id:"".concat((null==t||null==(i=t.store)?void 0:i.slug)?null==t||null==(n=t.store)?void 0:n.slug:null==t||null==(l=t.store)?void 0:l.id),module_id:"".concat(null==t||null==(r=t.store)?void 0:r.module_id),module_type:(0,W.c)(),store_zone_id:"".concat(null==t||null==(s=t.store)?void 0:s.zone_id),distance:null==t||null==(o=t.store)?void 0:o.distance}})};return(0,n.jsxs)(s.A,{sx:{maxWidth:"450px",cursor:"pointer",transition:"all 0.3s ease","&:hover":{boxShadow:g.shadows[6]}},children:[a?(0,n.jsx)(K.A,{onClick:e=>L(e),sx:{position:"relative",margin:"0px 20px -110px",borderRadius:"10px"},children:(0,n.jsx)(eI.A,{variant:"rounded",width:"100%",height:200})}):(0,n.jsx)(n.Fragment,{children:(null==t?void 0:t.add_type)==="store_promotion"?(0,n.jsx)(K.A,{onClick:e=>L(e),sx:{position:"relative",margin:"0px 20px -110px",borderRadius:"10px"},children:(0,n.jsxs)(K.A,{position:"relative",children:[((null==t?void 0:t.is_rating_active)===1||1===t.is_review_active)&&((null==t?void 0:t.average_rating)>0||(null==t?void 0:t.reviews_comments_count)>0)&&(0,n.jsxs)(K.A,{maxWidth:"90px",width:"100%",position:"absolute",bottom:"10px",right:"10px",alignItems:"center",zIndex:"1",flexDirection:"row",backgroundColor:g.palette.primary.main,borderRadius:"6px",padding:"5px",gap:"5px",children:[1===t.is_review_active&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e_.A,{size:18,color:g.palette.neutral[100]}),(0,n.jsx)(r.A,{color:g.palette.neutral[100],fontSize:"14px",fontWeight:"600",children:null==t?void 0:t.average_rating.toFixed(1)})]}),1===t.is_review_active&&(0,n.jsxs)(r.A,{color:g.palette.neutral[100],fontSize:"14px",children:["(",null==t?void 0:t.reviews_comments_count,")"]})]}),(0,n.jsx)(B.A,{boxShadow:"dark"===g.palette.mode?"0px 15px 30px rgba(0, 0, 0, 0.8)":"0px 15px 30px rgba(150, 150, 154, 0.40)",src:null==t?void 0:t.cover_image_full_url,width:"100%",height:"200px",objectFit:"cover",borderRadius:"10px",bg:"#ddd"})]})}):(0,n.jsx)(eW,{ended:b,setEnded:w,playing:j,setPlaying:A,video:null==t?void 0:t.video_attachment_full_url,isMargin:!0})}),(0,n.jsx)(K.A,{onClick:e=>L(e),paddingTop:"130px",paddingBottom:"20px",paddingInline:"25px",sx:{boxShadow:"0px -4.412px 29.412px rgba(150, 150, 154, 0.20)",width:"100%",height:"100%",borderRadius:"15px",backgroundColor:e=>e.palette.neutral[100]},children:(null==t?void 0:t.add_type)==="store_promotion"?(0,n.jsxs)(K.A,{flexDirection:"row",gap:"1rem",width:"100%",children:[(0,n.jsx)(K.A,{sx:{border:"1px solid ".concat((0,k.X4)(g.palette.primary.main,.5)),borderRadius:"50%"},children:a?(0,n.jsx)(eI.A,{variant:"circular",width:70,height:70}):(0,n.jsx)(B.A,{src:null==t?void 0:t.profile_image_full_url,width:"70px",height:"70px",objectFit:"cover",borderRadius:"50%"})}),(0,n.jsxs)(K.A,{width:0,flexGrow:1,children:[(0,n.jsxs)(K.A,{flexDirection:"row",gap:".6rem",width:"100%",justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(eB.A,{title:(null==t?void 0:t.title)||"",placement:"bottom",arrow:!0,disableHoverListener:!I,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(r.A,{ref:R,sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",whiteSpace:"wrap",wordWrap:"break-word"},color:g.palette.neutral[1e3],fontSize:{xs:"16px",sm:"18px",md:"20px"},fontWeight:"600",component:"h3",children:a?(0,n.jsx)(eI.A,{width:"70%",variant:"text"}):null==t?void 0:t.title})}),S?(0,n.jsx)(q.A,{onClick:e=>(e=>{var i;e.stopPropagation(),_(null==t||null==(i=t.store)?void 0:i.id,{onSuccess:e=>{var i;m((0,f.Rz)(null==t||null==(i=t.store)?void 0:i.id)),T(!1),ei.Ay.success(e.message,{id:"wishlist"})},onError:e=>{ei.Ay.error(e.response.data.message)}})})(e),sx:{padding:"4px"},children:(0,n.jsx)(eM.A,{color:g.palette.primary.main,size:20})}):(0,n.jsx)(q.A,{onClick:e=>(e=>{if(e.stopPropagation(),localStorage.getItem("token")){var i;C(null==t||null==(i=t.store)?void 0:i.id,{onSuccess:e=>{e&&(m((0,f.wz)(null==t?void 0:t.store)),T(!0),ei.Ay.success(null==e?void 0:e.message))},onError:e=>{ei.Ay.error(e.response.data.message)}})}else ei.Ay.error((0,E.t)(es.F))})(e),sx:{flexShrink:0,transition:"all 0.3s ease","&:hover":{backgroundColor:e=>e.palette.primary.main,"& svg":{color:"#fff"}}},children:(0,n.jsx)(eR.A,{color:g.palette.primary.main})})]}),a?(0,n.jsx)(r.A,{fontSize:{xs:"13px",sm:"14px",md:"14px"},width:"50%",children:(0,n.jsxs)(K.A,{children:[(0,n.jsx)(eI.A,{width:"100%",variant:"text"}),(0,n.jsx)(eI.A,{width:"100%",variant:"text"})]})}):(0,n.jsx)(r.A,{sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"2",WebkitBoxOrient:"vertical"},fontSize:{xs:"13px",sm:"14px",md:"14px"},color:g.palette.neutral[500],children:null==t?void 0:t.description})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",color:e=>e.palette.neutral[1e3]},fontSize:{xs:"16px",sm:"18px",md:"20px"},fontWeight:"600",children:a?(0,n.jsx)(eI.A,{width:"70%",variant:"text"}):null==t?void 0:t.title}),(0,n.jsxs)(K.A,{flexDirection:"row",gap:"20px",justifyContent:"space-between",children:[a?(0,n.jsx)(r.A,{fontSize:{xs:"13px",sm:"14px",md:"14px"},width:"50%",children:(0,n.jsxs)(K.A,{children:[(0,n.jsx)(eI.A,{width:"100%",variant:"text"}),(0,n.jsx)(eI.A,{width:"100%",variant:"text"})]})}):(0,n.jsx)(r.A,{sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"2",WebkitBoxOrient:"vertical"},fontSize:{xs:"13px",sm:"14px",md:"14px"},color:g.palette.neutral[500],children:null==t?void 0:t.description}),(0,n.jsx)(q.A,{onClick:e=>L(e),padding:"10px",sx:{borderRadius:"10px",border:"1.5px solid ".concat(g.palette.primary.main),transition:"all 0.3s ease","&:hover":{backgroundColor:g.palette.primary.main,"& svg":{color:"#fff"}}},children:(0,n.jsx)(eE.A,{color:g.palette.primary.main})})]})]})})]})};var eZ=i(77914),eH=i(19357);let eN=()=>{let e,t=(0,X.A)(),i=(0,d.useRef)(null),[l,o]=(0,d.useState)(0),[a,c]=(0,d.useState)(null),x=(0,G.A)(t.breakpoints.down("sm")),{data:u,isLoading:h,refetch:m,isFetched:v}=(0,p.useQuery)(["getAdds",(0,ef.E)()],()=>ek(),{enabled:!0,onError:g.P1,retry:1,staleTime:6e4,cacheTime:6e4,onSuccess:e}),j={autoplay:!0,infinite:(null==u?void 0:u.length)>3,speed:500,slidesToShow:3,slidesToScroll:1,prevArrow:(0,n.jsx)(eC.q,{}),nextArrow:(0,n.jsx)(eC.I,{}),beforeChange:(e,t)=>o(t),afterChange:e=>{var t,n,l,r,s;o(e);let a=null==i||null==(l=i.current)||null==(n=l.innerSlider)||null==(t=n.state)?void 0:t.currentSlide,d=(null==u?void 0:u.length)>0&&u[a||0];c(d),(null==d?void 0:d.add_type)==="video_promotion"&&(null==i||null==(s=i.current)||null==(r=s.slickPause)||r.call(s))},responsive:[{breakpoint:2e3,settings:{slidesToShow:3,slidesToScroll:1,infinite:(null==u?void 0:u.length)>3}},{breakpoint:1600,settings:{slidesToShow:3,slidesToScroll:1,infinite:(null==u?void 0:u.length)>3}},{breakpoint:1340,settings:{slidesToShow:3,slidesToScroll:1,infinite:(null==u?void 0:u.length)>3}},{breakpoint:1075,settings:{slidesToShow:3,slidesToScroll:1,infinite:(null==u?void 0:u.length)>3}},{breakpoint:999,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:850,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:770,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:670,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:540,settings:{slidesToShow:1,slidesToScroll:1,infinite:!0}},{breakpoint:495,settings:{slidesToShow:1,slidesToScroll:1,infinite:!0}},{breakpoint:460,settings:{slidesToShow:1,slidesToScroll:1,infinite:!0}},{breakpoint:400,settings:{slidesToShow:1,slidesToScroll:1,infinite:!0}},{breakpoint:370,settings:{slidesToShow:1,slidesToScroll:1,infinite:!1}}]};return(0,d.useEffect)(()=>{(()=>{if(u&&u.length>0){var e,t,n,l,r,s,o,a,d,x;let p=u[0],h=u[1],g=u[2];c(p),"video_promotion"===p.add_type?null==i||null==(t=i.current)||null==(e=t.slickPause)||e.call(t):(null==h?void 0:h.add_type)==="video_promotion"&&"video_promotion"!==p.add_type?(null==i||null==(l=i.current)||null==(n=l.slickPause)||n.call(l),null==i||null==(s=i.current)||null==(r=s.slickNext)||r.call(s),c(h)):(null==g?void 0:g.add_type)==="video_promotion"&&"video_promotion"!==h.add_type&&(null==i||null==(a=i.current)||null==(o=a.slickPause)||o.call(a),null==i||null==(x=i.current)||null==(d=x.slickNext)||d.call(x),setTimeout(()=>{var e,t,n,l;null==i||null==(t=i.current)||null==(e=t.slickPause)||e.call(t),null==i||null==(l=i.current)||null==(n=l.slickNext)||n.call(l),c(g)},500))}})()},[u]),(0,n.jsx)(n.Fragment,{children:v&&(null==u?void 0:u.length)===0?null:(0,n.jsx)(s.A,{sx:{backgroundImage:"url('/static/paidAdds.png')",marginTop:"10px",backgroundRepeat:"no-repeat",backgroundSize:"cover",borderRadius:"10px"},children:(0,n.jsxs)(s.A,{sx:{background:"linear-gradient(0deg, rgba(255, 255, 255, 0.00) 0%, ".concat(t.palette.neutral[100]," 100%)"),borderRadius:"inherit"},children:[(0,n.jsxs)(K.A,{padding:"20px 20px 0px 20px",children:[(0,n.jsx)(r.A,{fontSize:{xs:"16px",md:"20px"},fontWeight:{xs:"500",md:"700"},mb:"5px",component:"h2",children:(0,E.t)("Highlights for you")}),(0,n.jsx)(eZ.A,{textAlign:"left",text:"See our most popular restaurant and foods",component:"p"})]}),(0,n.jsx)(Z.jB,{children:(0,n.jsx)(Z.jB,{children:(0,n.jsx)(Z.Z7,{padding:x?"5px":"16px",children:(null==u?void 0:u.length)>0?(0,n.jsx)(eH.A,{...j,ref:i,children:null==u?void 0:u.map((e,t)=>(0,n.jsx)(eO,{data:u,activeSlideData:a,itemLength:null==u?void 0:u.length,item:e,index:t,sliderRef:i},null==e?void 0:e.id))}):(0,n.jsx)(eH.A,{...j,ref:i,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eO,{onlyShimmer:!0},t))})})})})]})})})},eV=async()=>{let{data:e}=await h.A.get(u.sO);return e};function eX(){return(0,p.useQuery)("other-banners",eV,{enabled:!1,cacheTime:3e5,onError:g.P1})}var eq=i(87285),eY=i(41681),eQ=i(27924),eG=i.n(eQ),eJ=i(44211);let eU=e=>{let{configData:t,handleOrderDetailsClose:i}=e,[l,r]=(0,d.useState)(!1),{t:s}=(0,en.Bd)();return setTimeout(()=>{r(!0)},500),(0,n.jsx)(Z.jB,{padding:{xs:"40px 15px",md:"45px 45px 40px"},alignItems:"center",children:(0,n.jsx)(eJ.A,{id:e.id,configData:t,handleOrderDetailsClose:i,amount:"300"})})};eU.propTypes={};var eK=i(77917),e$=i(62320);let e0=e=>{let{orderDetailsModalOpen:t}=e,i=(0,c.wA)(),{configData:l}=(0,c.d4)(e=>e.configData),s=(0,X.A)();(0,x.W)();let a=(0,o.useRouter)(),{status:p,totalAmount:u,order_id:h,token:g,flag:m}=a.query,{t:v}=(0,en.Bd)(),{total:j}=a.query,[A,f]=(0,d.useState)(""),{guestUserOrderId:b,guestUserInfo:w}=(0,c.d4)(e=>e.guestUserInfo),{orderDetailsModal:y,offlineInfoStep:T}=(0,c.d4)(e=>e.offlinePayment),{orderInformation:C}=(0,c.d4)(e=>e.utilsData),_=()=>{i((0,e$.s0)(!1)),i((0,O.s0)(!1))};return(0,d.useEffect)(()=>{if(g)try{let e=eG().decode(g);if("string"==typeof e)for(let t of e.split("&&")){let[e,i]=t.split("=");if("attribute_id"===e)return void f(i)}else console.error("Decoded token is not a string:",e)}catch(e){console.error("Error decoding token:",e)}else console.error("Token is missing.")},[g]),(0,n.jsxs)(N.A,{openModal:t,handleClose:()=>_(),children:[(0,n.jsx)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"flex-end",sx:{position:"relative"},children:(0,n.jsx)(q.A,{onClick:()=>_(),sx:{zIndex:"99",position:"absolute",top:10,right:10,backgroundColor:e=>e.palette.neutral[100],borderRadius:"50%",[s.breakpoints.down("md")]:{top:10,right:5}},children:(0,n.jsx)(eY.A,{sx:{fontSize:"24px",fontWeight:"500"}})})}),m&&"fail"===m||"cancel"===m?(0,n.jsx)(eU,{id:h||A,configData:l,handleOrderDetailsClose:_}):(0,n.jsxs)(Z.jB,{padding:{xs:"40px 15px",md:"45px 45px 40px"},alignItems:"center",gap:"20px",children:[(0,n.jsx)(eK.A,{sx:{height:"56px",width:"56px",color:(0,k.X4)(s.palette.primary.main,.9)}}),(0,n.jsx)(r.A,{fontSize:"18px",fontWeight:"700",children:"".concat(v("Order Placed Successfully"))}),(0,n.jsxs)(r.A,{fontWeight:"400",textAlign:"center",maxWidth:"380px",children:["We will begin processing your order shortly. Your Order ID is",(0,n.jsxs)(r.A,{component:"span",fontWeight:600,children:[" ",b||h]}),", placed using the phone number",(0,n.jsxs)(r.A,{component:"span",fontWeight:600,children:[" ",(null==w?void 0:w.phone)||(null==C?void 0:C.phone)||"+880170987654"]}),"."]}),(0,n.jsx)(r.A,{fontWeight:"400",textAlign:"center",maxWidth:"380px",children:"Please keep this Order ID handy for track your order in future We’ve also emailed the details to you"}),(0,n.jsxs)(S.A,{direction:"row",alignItems:"center",justifyContent:"space-between",width:"100%",maxWidth:"370px",padding:".25rem .25rem .25rem .75rem",marginBlock:"15px",borderRadius:"999rem",sx:{border:"1px dashed ".concat(s.palette.neutral[400])},children:[(0,n.jsxs)(r.A,{fontWeight:700,children:[v("Order ID")," #",b||h]}),(0,n.jsx)(Y.A,{variant:"contained",sx:{borderRadius:"999rem",padding:"6px 20px",textTransform:"capitalize",minWidth:"auto"},onClick:()=>{navigator.clipboard.writeText(b||h),ei.Ay.success(v("Order ID copied!"))},children:v("Copy")})]}),(0,n.jsx)(Y.A,{onClick:()=>{i((0,O.s0)(!1)),a.push("/track-order",void 0,{shallow:!0})},variant:"contained",children:v("Track Order")})]})]})},e1=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{width:"100%",height:"360px",position:"relative",marginTop:"20px",img:{width:"100%",height:"100%"},"&:hover":{img:{transform:"scale(1.02)"}},[t.breakpoints.down("sm")]:{height:"120px"}}});(0,l.Ay)(Z.jB)(e=>{let{theme:t}=e;return{position:"absolute",top:0}}),(0,l.Ay)(r.A)(e=>{let{theme:t}=e;return{fontFamily:"Quicksand",fontWeight:"700",fontSize:"16px",[t.breakpoints.up("sm")]:{fontSize:"2.5rem"}}}),(0,l.Ay)(Y.A)(e=>{let{theme:t}=e;return{backgroundColor:t.palette.primary.customType2,marginTop:"10px"}});let e2=e=>{let{bannerData:t}=e,{t:i}=(0,en.Bd)();return(0,n.jsx)(n.Fragment,{children:(null==t?void 0:t.bottom_section_banner)&&(0,n.jsx)(e1,{children:(0,n.jsx)(ec.A,{src:null==t?void 0:t.bottom_section_banner_full_url,height:360,width:1440,objectFit:"cover"})})})};e2.propTypes={},i(65776),i(6104);let e5=async e=>{let t=e?"".concat(u._K,"?feature=").concat(e):u._K,{data:i}=await h.A.get(t);return i};function e3(e){return(0,p.useQuery)(["banners",e||"all",(0,ef.E)()],()=>e5(e),{enabled:!0,cacheTime:3e5,cacheTime:6e4,onError:g.P1})}var e4=i(6664),e6=i(70987);let e8=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{cursor:"pointer",borderRadius:"10px",width:"100%",height:"234px",position:"relative",overflow:"hidden",img:{width:"100%",height:"100%"},"&:hover":{img:{transform:"scale(1.04)"}},[t.breakpoints.down("md")]:{height:"200px"},[t.breakpoints.down("sm")]:{height:"150px"}}}),e7=e=>{var t;let{feature:i}=e,l=(0,o.useRouter)(),r=(0,X.A)(),s=(0,G.A)(r.breakpoints.down("sm")),a=(0,G.A)(r.breakpoints.down("xs")),{selectedModule:x}=(0,c.d4)(e=>e.utilsData),{banners:p}=(0,c.d4)(e=>e.storedData),{data:u,refetch:h,isFetched:g}=e3(i),[m,v]=(0,d.useState)([]),[j,A]=(0,d.useState)(),[f,b]=(0,d.useState)(!1),{configData:w}=(0,c.d4)(e=>e.configData);(0,c.wA)(),(0,d.useEffect)(()=>{p&&y()},[p]);let y=()=>{var e,t,i,n,l,r;let s=[];"food"===(0,W.c)()?((null==p||null==(e=p.banners)?void 0:e.length)>0&&(null==p||null==(i=p.banners)||i.forEach(e=>s.push(e))),(null==p||null==(t=p.campaigns)?void 0:t.length)>0&&(null==p||null==(n=p.campaigns)||n.forEach(e=>s.push({...e,isCampaign:!0})))):(null==p||null==(l=p.banners)?void 0:l.length)>0&&(null==p||null==(r=p.banners)||r.forEach(e=>s.push({...e}))),v(s)},S={dots:!1,infinite:m.length>2,slidesToShow:(()=>{switch((0,W.c)()){case P.A.GROCERY:return m.length,2;case P.A.PHARMACY:if(1===m.length)return 1;if(2===m.length)return 2;return 3;case P.A.ECOMMERCE:if(m.length>1)return 2;return 1;case P.A.FOOD:if(1===m.length)return 1;if(2===m.length)return 2;return 3}})(),slidesToScroll:1,autoplay:!0,speed:800,autoplaySpeed:4e3,cssEase:"linear",responsive:[{breakpoint:600,settings:{slidesToShow:1.1,slidesToScroll:1}}]};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.jB,{sx:{mt:"10px","& .slick-list":{marginRight:{xs:"-10px",sm:"-20px"}},"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"}}},children:g?(null==m?void 0:m.length)>0&&(0,n.jsx)(Z.Z7,{children:(0,n.jsx)(eH.A,{...S,children:m.map((e,t)=>(0,n.jsx)(e8,{onClick:(null==e?void 0:e.type)==="default"&&(null==e?void 0:e.link)===null?void 0:()=>(e=>{if(null==e?void 0:e.isCampaign)l.push({pathname:"/campaigns/[id]",query:{id:"".concat(null==e?void 0:e.id),module_id:"".concat((0,ef.E)())}},void 0,{scroll:!1}).then(()=>{setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)});else if((null==e?void 0:e.type)==="default")window.open(null==e?void 0:e.link,"_blank");else{var t,i,n,r,s,o,a;(null==e?void 0:e.type)==="store_wise"?l.push({pathname:"/store/[id]",query:{id:"".concat((null==e||null==(t=e.store)?void 0:t.slug)?null==e||null==(i=e.store)?void 0:i.slug:null==e||null==(n=e.store)?void 0:n.id),module_id:"".concat((0,ef.E)()),store_zone_id:"".concat(null==e||null==(r=e.store)?void 0:r.zone_id)}},void 0,{shallow:!0}):(null==e?void 0:e.type)==="item_wise"&&((null==x?void 0:x.module_type)!=="ecommerce"?(A(null==e?void 0:e.item),b(!0)):l.push({pathname:"/product/[id]",query:{id:"".concat((null==e||null==(s=e.item)?void 0:s.slug)?null==e||null==(o=e.item)?void 0:o.slug:null==e||null==(a=e.item)?void 0:a.id),module_id:"".concat((0,ef.E)())}},void 0,{shallow:!0}))}})(e),sx:{cursor:(null==e?void 0:e.type)==="default"&&(null==e?void 0:e.link)===null?"default":"pointer"},children:(0,n.jsx)(ec.A,{src:null==e?void 0:e.image_full_url,alt:null==e?void 0:e.title,height:a?"150":s?"200":"234",width:624,objectFit:"cover",borderRadius:"10px"})},t))})}):(0,n.jsx)(eH.A,{...S,children:[void 0,void 0].map((e,t)=>(0,n.jsx)(e8,{children:(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%"})},t))})}),f&&j&&(0,n.jsx)(e6.A,{product:j,image:"".concat(null==w||null==(t=w.base_urls)?void 0:t.item_image_url,"/").concat(null==j?void 0:j.image),open:f,handleModalClose:()=>{b(!1)},setOpen:b})]})};e7.propTypes={};let e9=async e=>{let{offset:t,type:i}=e,{data:n}=await h.A.get("".concat(u.Ic,"?type=").concat(i));return n};var te=i(24987);let tt=(0,l.Ay)(J.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",width:"100%",padding:"15px",margin:"15px"}}),ti=(0,l.Ay)(J.A)(e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",padding:"15px",width:"100%",marginInline:"15px"}}),tn=(0,l.Ay)(J.A)(e=>{let{theme:t,marginBottom:i}=e;return{display:"flex",justifyContent:"center",padding:"15px",width:"100%",marginBottom:i||""}}),tl=(0,l.Ay)(S.A)(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",justifyContent:"center"}}),tr=e=>{let{marginBottom:t}=e,i=(0,X.A)(),l=(0,G.A)(i.breakpoints.down("md"));return(0,n.jsx)(tn,{marginBottom:t,children:(0,n.jsxs)(S.A,{padding:"0 10px 0 10px",children:[(0,n.jsx)(eI.A,{variant:"rectangular",animation:"pulse",width:l?140:200,height:l?130:190}),(0,n.jsxs)(tl,{padding:"1rem",spacing:1,children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"30%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"20%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"70%"})]})]})})};var ts=i(26489),to=i(9552),ta=i(29053),td=i(48843),tc=i(79568);let tx=(0,l.Ay)(s.A)(e=>{let{theme:t,right:i,isdisabled:n,noBackground:l,isRtl:r,rightSpace:s}=e;return{top:0,height:"100%",width:"42px",transition:"background-image 0.3s ease-in-out, transform 0.3s ease-in-out",transform:"translateX(0)",background:"true"===l?null:"true"===i?"linear-gradient(270deg, ".concat("rtl"===r?"rgba(255, 255, 255, 0)":t.palette.neutral[100]," 0%, ").concat("rtl"===r?t.palette.neutral[100]:"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 100%)"):"linear-gradient(".concat("rtl"===r?"to left":"to right",", ").concat("rtl"===r?"rgba(255, 255, 255, 0)":"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 0%, ").concat("rtl"===r?t.palette.neutral[100]:"rgba(255, 255, 255, 0)"," 100%)"),zIndex:1,right:"true"===i&&"-8px",left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",borderTopRightRadius:"12px",borderBottomRightRadius:"12px",[t.breakpoints.down("sm")]:{display:"none"}}}),tp=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i}=e;return{zIndex:1,top:"50%",left:0,display:i?"none":"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.8)",boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",height:"35px",width:"35px",borderRadius:"50%"}}),tu=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i}=e;return{top:"50%",zIndex:1,right:8,display:i?"none":"flex",backgroundColor:"rgba(255, 255, 255, 0.8)",borderRadius:"50%",boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",alignItems:"center",justifyContent:"center",height:"35px",width:"35px"}}),th={dots:!1,infinite:!1,speed:500,slidesToShow:5,slidesToScroll:1,cssEase:"linear",responsive:[{breakpoint:300,settings:{slidesToShow:1.5,slidesToScroll:1}},{breakpoint:500,settings:{slidesToShow:1.6,slidesToScroll:1}},{breakpoint:700,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:750,settings:{slidesToShow:3,slidesToScroll:2}},{breakpoint:900,settings:{slidesToShow:3.2,slidesToScroll:1}},{breakpoint:1150,settings:{slidesToShow:4,slidesToScroll:3}},{breakpoint:1300,settings:{slidesToShow:5,slidesToScroll:1}}],prevArrow:(0,n.jsx)(e=>{let{onClick:t,className:i,displayNoneOnMobile:l,noBackground:r,lanDirection:s}=e,o=(0,X.A)(),a=(0,G.A)(o.breakpoints.down("sm")),d=(0,td.Z)();return(0,n.jsx)(tx,{isdisabled:!!a&&!!l||(null==i?void 0:i.includes("slick-disabled")),noBackground:r?"true":"false",isRtl:d,children:(0,n.jsx)(tp,{className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,td.Z)()?(0,n.jsx)(ta.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600]}}):(0,n.jsx)(to.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600]}})})})},{displayNoneOnMobile:!0}),nextArrow:(0,n.jsx)(e=>{let{onClick:t,className:i,displayNoneOnMobile:l,noBackground:r,rightSpace:s}=e,o=(0,X.A)(),a=(0,G.A)(o.breakpoints.down("sm"));return(0,n.jsx)(tx,{isdisabled:!!a&&!!l||(null==i?void 0:i.includes("slick-disabled")),right:"true",noBackground:r?"true":"false",isRtl:(0,td.Z)(),rightSpace:s,children:(0,n.jsx)(tu,{className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,td.Z)()?(0,n.jsx)(to.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600]}}):(0,n.jsx)(ta.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600]}})})})},{displayNoneOnMobile:!0})};var tg=i(5427),tm=i(603),tv=i(60230),tj=i(56393),tA=i(71948);let tf=(0,l.Ay)(Y.A)(e=>{let{theme:t}=e;return{height:"30px",minWidth:"0px",width:"30px",border:"1px solid ".concat(t.palette.primary.main)}}),tb=e=>{let{selectedMenuIndex:t,setSelectedMenuIndex:i,menus:l,setFilteredData:r}=e,s=(0,X.A)(),o=(0,G.A)(s.breakpoints.down("md")),[a,c]=d.useState(null),x=(e,t)=>{c(null),(null==t?void 0:t.value)&&r(null==t?void 0:t.value),"number"==typeof e&&i(e)};return(0,n.jsx)("div",{children:o?(0,n.jsxs)(K.A,{children:[(0,n.jsx)(tf,{onClick:e=>{c(e.currentTarget)},variant:"outlined",children:(0,n.jsx)(tg.A,{fontSize:"small"})}),(0,n.jsx)(tm.A,{id:"basic-menu",anchorEl:a,open:!!a,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},children:l.map((e,i)=>(0,n.jsx)(tv.A,{onClick:()=>x(i,(null==e?void 0:e.value)?null==e?void 0:e.value:e),selected:i===t,children:(0,E.t)((null==e?void 0:e.label)?null==e?void 0:e.label:e)},i))})]}):(0,n.jsx)(tj.A,{variant:"scrollable",scrollButtons:"auto",children:l.map((e,l)=>(0,n.jsx)(tA.A,{sx:{cursor:"pointer",ml:3*(0!=l),color:t===l?"primary.main":"inherit",fontWeight:t===l?"700":"inherit",transition:"all ease 0.5s","&:hover":{color:"primary.main"}},onClick:()=>((e,t)=>{(null==t?void 0:t.value)&&r(null==t?void 0:t.value),i(e)})(l,e),label:(null==e?void 0:e.label)?null==e?void 0:e.label:e,value:(0,E.t)((null==e?void 0:e.value)?null==e?void 0:e.value:e)},l))})})};tb.propTypes={};var tw=i(28888),ty=i(38993),tS=i(9648),tk=i(55871);function tT(){let e=(0,tw._)(["\n 0% { transform: translateX(0px); }\n 100% { transform: translateX(-3px); }\n"]);return tT=function(){return e},e}function tC(){let e=(0,tw._)(["\n 0% { transform: translateX(0px); }\n 100% { transform: translateX(3px); }\n"]);return tC=function(){return e},e}let t_=(0,ty.i7)(tT()),tR=(0,ty.i7)(tC()),tE=(0,l.Ay)(s.A)(e=>{let{theme:t,right:i,isdisabled:n,ishovered:l,noboxshadow:r,isRtl:s,noBackground:o}=e;return{top:0,height:"100%",width:"73px",background:o||r?"inherit":"true"===i?"linear-gradient(270deg, ".concat("rtl"===s?"rgba(255, 255, 255, 0)":t.palette.neutral[100]," 0%, ").concat("rtl"===s?t.palette.neutral[100]:"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 100%)"):"linear-gradient(".concat("rtl"===s?"to left":"to right",", ").concat("rtl"===s?"rgba(255, 255, 255, 0)":"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 0%, ").concat("rtl"===s?t.palette.neutral[100]:"rgba(255, 255, 255, 0)"," 100%)"),zIndex:1,right:"true"===i&&(o?"-8px":0),left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",opacity:+!!l,transition:"opacity 0.3s ease-in-out",borderTopRightRadius:o?"12px":0,borderBottomRightRadius:o?"12px":0,[t.breakpoints.down("sm")]:{display:"none"}}}),tI=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n,width:l,height:r,variant:s}=e;return{zIndex:1,top:"50%",left:"primary"===s?0:"0px",display:i?"none":"flex",alignItems:"center",justifyContent:"center",width:l||"38px",height:r||"38px",borderRadius:"50%",backgroundColor:n||"primary"===s?t.palette.primary.main:t.palette.neutral[100],cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(t_," 0.8s ease-in-out infinite alternate"),boxShadow:"primary"===s?"rgba(149, 157, 165, 0.2) 0px 8px 24px":"none","&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),tB=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n,width:l,height:r,variant:s}=e;return{zIndex:1,top:"50%",right:8*("primary"===s),display:i?"none":"flex",alignItems:"center",justifyContent:"center",width:l||"38px",height:r||"38px",borderRadius:"50%",backgroundColor:n||"primary"===s?t.palette.primary.main:t.palette.neutral[100],cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(tR," 0.8s ease-in-out infinite alternate"),boxShadow:"primary"===s?"rgba(149, 157, 165, 0.2) 0px 8px 24px":"none",border:"white"===s?"1px solid":"none","&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),tM=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,width:r,height:s,isHovered:o,variant:a="white",noboxshadow:c,noBackground:x,rightSpace:p}=e,u=(0,X.A)(),h=(0,G.A)(u.breakpoints.down("sm")),[g,m]=(0,d.useState)(!1);return(0,n.jsx)(tE,{isdisabled:!!h&&!!l||(null==i?void 0:i.includes("slick-disabled")),right:"true",ishovered:o,noboxshadow:c,isRtl:(0,td.Z)(),noBackground:x,children:(0,n.jsx)(tB,{width:r,height:s,variant:a,className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:g,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(tk.A,{sx:{fontSize:"30px",color:g||"primary"===a?"white":u.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(tS.A,{sx:{fontSize:"30px",color:g||"primary"===a?"white":u.palette.neutral[600],transition:"color 0.3s ease"}})})})},tL=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,width:r,height:s,left:o,isHovered:a,variant:c="white",noboxshadow:x,noBackground:p}=e,u=(0,X.A)(),h=(0,G.A)(u.breakpoints.down("sm")),[g,m]=(0,d.useState)(!1);return(0,n.jsx)(tE,{isdisabled:!!h&&!!l||(null==i?void 0:i.includes("slick-disabled")),ishovered:a,noboxshadow:x,isRtl:(0,td.Z)(),noBackground:p,children:(0,n.jsx)(tI,{width:r,height:s,left:o,variant:c,className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:g,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(tS.A,{sx:{fontSize:"30px",color:g||"primary"===c?"white":u.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(tk.A,{sx:{fontSize:"30px",color:g||"primary"===c?"white":u.palette.neutral[600],transition:"color 0.3s ease"}})})})},tD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{variant:i="white",displayNoneOnMobile:l=!1,width:r,height:s,left:o,noboxshadow:a=!1,noBackground:d=!1,rightSpace:c}=t;return{nextArrow:(0,n.jsx)(tM,{displayNoneOnMobile:l,width:r,height:s,isHovered:e,variant:i,noboxshadow:a,noBackground:d,rightSpace:c}),prevArrow:(0,n.jsx)(tL,{displayNoneOnMobile:l,width:r,height:s,left:o,isHovered:e,variant:i,noboxshadow:a,noBackground:d})}},tz=e=>{var t,i,l;let{title:r,info:s,bannerIsLoading:o}=e,a=null==s?void 0:s.best_reviewed_section_banner_full_url,[x,u]=(0,d.useState)([]),[h,m]=(0,d.useState)(0),[v,j]=(0,d.useState)([]),[A,f]=(0,d.useState)(!1),[b,w]=(0,d.useState)(!1),y=(0,X.A)(),S=(0,G.A)(y.breakpoints.down("md")),k=(0,d.useRef)(null),{data:T,refetch:C,isRefetching:_,isLoading:R,isFetching:E}=(l={type:"all"},(0,p.useQuery)(["best-reviewed-items"],()=>e9(l),{enabled:!1,onError:g.Jm})),{bestReviewedItems:I}=(0,c.d4)(e=>e.storedData),M=(0,c.wA)(),L=[...new Set((()=>{let e=[];return I&&I.products&&I.products.forEach(t=>{(null==t?void 0:t.category_ids)&&(null==t||t.category_ids.forEach(t=>{e.push(t)}))}),e})().map(e=>JSON.stringify(e)))].map(JSON.parse);(0,d.useEffect)(()=>{0===I.products.length&&C()},[I]),(0,d.useEffect)(()=>{T&&M((0,e4.Mf)(T))},[T]),(0,d.useEffect)(()=>{T&&(u(["All",...null==L?void 0:L.map(e=>e.name)]),j(I.products))},[I.products]),(0,d.useEffect)(()=>{if(0===h)j(I.products),f(!0);else{var e;j(null==I||null==(e=I.products)?void 0:e.filter(e=>{var t;return null==e||null==(t=e.category_ids)?void 0:t.some(e=>{var t;return(null==(t=L[h-1])?void 0:t.id)===(null==e?void 0:e.id)})})),f(!0)}},[h]);let D={initialSlide:0,dots:!1,infinite:!1,speed:500,slidesToShow:(null==s?void 0:s.best_reviewed_section_banner)?4:5,slidesToScroll:2,cssEase:"linear",...tD(b,{displayNoneOnMobile:!0,variant:"primary",noBackground:!0}),responsive:[{breakpoint:350,settings:{slidesToShow:1.2,slidesToScroll:1,infinite:!1}},{breakpoint:450,settings:{slidesToShow:1.5,slidesToScroll:1,infinite:!1}},{breakpoint:550,settings:{slidesToShow:1.7,slidesToScroll:1}},{breakpoint:750,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:1150,settings:{slidesToShow:(null==s?void 0:s.best_reviewed_section_banner)?2.6:2.1,slidesToScroll:1}},{breakpoint:1200,settings:{slidesToShow:3.5,slidesToScroll:1}}]},z={dots:!1,infinite:!1,speed:500,slidesPerRow:1,rows:2,slidesToShow:(null==s?void 0:s.best_reviewed_section_banner)?2.1:2.7,slidesToScroll:1,cssEase:"linear",...tD(b,{displayNoneOnMobile:!0,variant:"primary",noBackground:!0}),responsive:[{breakpoint:300,settings:{slidesToShow:1.1,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:500,settings:{slidesToShow:1.1,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:700,settings:{slidesToShow:1.34,slidesPerRow:1,rows:2,slidesToScroll:2}},{breakpoint:750,settings:{slidesToShow:1.45,slidesPerRow:1,rows:2,slidesToScroll:2}},{breakpoint:900,settings:{slidesToShow:1.9,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:1150,settings:{slidesToShow:2.1,slidesPerRow:1,rows:2,slidesToScroll:3}},{breakpoint:1300,settings:{slidesToShow:2.3,slidesPerRow:1,rows:2,slidesToScroll:1}}]};return(0,n.jsx)(n.Fragment,{children:(0,W.c)()===P.A.FOOD?(0,n.jsx)(rG,{children:I&&(null==I||null==(t=I.products)?void 0:t.length)>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(Z.jB,{alignItems:S?"center":"flex-start",justyfyContent:"center",mt:"30px",spacing:1,children:[(0,n.jsx)(ts.A,{text:r,textAlign:"left",component:"h2"}),(0,n.jsx)(Z.iv,{children:(0,n.jsxs)(U.Ay,{container:!0,alignItems:"center",spacing:{xs:1.3,md:1.2,lg:1.5},children:[(null==s?void 0:s.best_reviewed_section_banner)&&!S&&(0,n.jsx)(U.Ay,{item:!0,xs:0,sm:0,lg:2.5,children:(0,n.jsx)(Z.iv,{sx:{position:"relative",height:{xs:"200px",sm:"300px",md:"352px"},margin:"10px",display:{xs:"none",md:"inherit"},"&:hover":{img:{transform:"scale(1.05)"}}},children:o?(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%"}):(0,n.jsx)(B.A,{src:a,height:"100%",width:"100%",borderRadius:".7rem",objectfit:"cover"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,lg:(null==s?void 0:s.best_reviewed_section_banner)?9.5:12,children:(0,n.jsx)(Z.Z7,{nopadding:"false",paddingBottom:"1rem",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,n.jsx)(K.A,{children:(0,n.jsx)(eH.A,{...z,children:null==I||null==(i=I.products)?void 0:i.map((e,t)=>(0,n.jsx)(te.Ay,{item:e,cardheight:"150px",cardWidth:"95%",horizontalcard:"true",cardFor:"food horizontal card"},t))})})})})]})})]})})}):(0,n.jsx)(n.Fragment,{children:E?(0,n.jsxs)(Z.jB,{spacing:1,children:[(0,n.jsx)(eI.A,{width:"200px"}),(0,n.jsx)(Z.Z7,{nopadding:"true",children:(0,n.jsx)(eH.A,{...th,children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(tr,{},t))})})]}):(0,n.jsx)(n.Fragment,{children:I&&v.length>0&&(0,n.jsxs)(rG,{sx:{paddingTop:"1rem"},children:[(0,n.jsxs)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(ts.A,{text:r,component:"h2"}),(0,n.jsx)(K.A,{maxWidth:"960px",width:S?"initial":"100%",children:(null==x?void 0:x.length)>0&&(0,n.jsx)(tb,{selectedMenuIndex:h,setSelectedMenuIndex:m,menus:x})})]}),(0,n.jsxs)(U.Ay,{container:!0,spacing:{xs:1,md:1,lg:1},children:[(null==s?void 0:s.best_reviewed_section_banner)&&!S&&(0,n.jsx)(U.Ay,{item:!0,xs:0,sm:0,lg:2.5,children:(0,n.jsx)(Z.iv,{sx:{position:"relative",height:{xs:"200px",sm:"300px",md:"352px"},paddingTop:"8px",display:{xs:"none",sm:"inherit"},"&:hover":{img:{transform:"scale(1.03)"}}},children:o?(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%"}):(0,n.jsx)(B.A,{src:a,height:"100%",width:"100%",borderRadius:".7rem",objectfit:"cover"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,lg:(null==s?void 0:s.best_reviewed_section_banner)?9.5:12,children:(0,n.jsx)(U.Ay,{item:!0,md:12,container:!0,position:"relative",children:(0,n.jsx)(Z.jB,{justifyContent:"right",children:(0,n.jsx)(Z.Z7,{onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,n.jsx)(eH.A,{ref:k,...D,children:null==v?void 0:v.map(e=>(0,n.jsx)(te.Ay,{item:e,cardheight:"340px",cardFor:"vertical",cardType:"vertical-type"},null==e?void 0:e.id))})})},A)})})]})]})})})})};tz.propTypes={};var tF=i(57933),tW=i(80271);let tP={src:"/_next/static/media/coupons_bg.3592ee56.png"},tO=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{background:(0,k.X4)(t.palette.primary.main,.3),border:"2px dashed ".concat(t.palette.neutral[100]),padding:"10px",display:"flex",alignItems:"center",justifyContent:"center",width:"fit-content",cursor:"pointer"}}),tZ={dots:!0,infinite:!1,speed:500,slidesToShow:1,slidesToScroll:1},tH=(0,l.Ay)(e=>{let{className:t,...i}=e;return(0,n.jsx)(eB.A,{...i,arrow:!0,classes:{popper:t}})})(e=>{let{theme:t}=e;return{["& .".concat(tF.A.arrow)]:{color:(0,k.X4)(t.palette.primary.main,.1)},["& .".concat(tF.A.tooltip)]:{backgroundColor:t.palette.toolTipColor,color:t.palette.whiteContainer.main,paddingTop:"5px",paddingLeft:"20px",paddingBottom:"5px",paddingRight:"20px",fontSize:"16px"}}}),tN=e=>{let{item:t}=e,{t:i}=(0,en.Bd)(),[l,o]=(0,d.useState)(null),[a,c]=(0,d.useState)(!1),x=i("get"),p=i("% discount"),u=i("discount"),h=i("min Order of");return(0,n.jsx)(s.A,{children:(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsxs)(r.A,{fontWeight:"bold",textAlign:"center",color:"whiteContainer.main",sx:{fontSize:{xs:"18px",md:"27px"},textTransform:"capitalize"},component:"h3",children:[(null==t?void 0:t.discount_type)==="percent"?"".concat(x," ").concat(null==t?void 0:t.discount).concat(p):"".concat(x," ").concat((0,R.Yi)(null==t?void 0:t.discount)," ").concat(u)," ",(0,n.jsx)(r.A,{fontWeight:"bold",textAlign:"center",color:"whiteContainer.main",component:"span",sx:{fontSize:{xs:"18px",md:"27px"}},children:"".concat(h," ").concat((0,R.Yi)(null==t?void 0:t.min_purchase))})]}),(0,n.jsx)(tH,{placement:"top",title:i(l?"Copied":"Copy"),children:(0,n.jsx)(tO,{onClick:()=>(e=>{o(e),navigator.clipboard.writeText(e).then(()=>{c(!0);let e=setTimeout(()=>{c(!1)},1e3);return()=>clearTimeout(e)}).catch(e=>{console.error("Failed to copy code:",e)})})(null==t?void 0:t.code),onMouseEnter:()=>l&&o(!1),children:(0,n.jsx)(r.A,{color:"whiteContainer.main",fontWeight:"bold",variant:"body2",children:a?i("Code")+(null==t?void 0:t.code)+i("has been copied"):i("Use Code : ")+(null==t?void 0:t.code)})})})]})})},tV=e=>{let{data:t,refetch:i,isLoading:l}=(0,tW.A)();return(0,d.useEffect)(()=>{i()},[]),(0,n.jsx)(n.Fragment,{children:t&&(null==t?void 0:t.length)>0&&(0,n.jsx)(s.A,{sx:{background:e=>(e=>"linear-gradient(".concat((0,k.X4)(e.palette.primary.main,.2),", ").concat((0,k.X4)(e.palette.primary.main,.2),"), url(").concat(null==tP?void 0:tP.src,")"))(e),backgroundSize:"cover",marginTop:"2rem",borderRadius:{xs:"0px",md:"5px"},padding:{xs:"25px",md:"15px"},minHeight:"135px","& .slick-dots":{top:"95px","& li":{backgroundColor:e=>e.palette.neutral[500],width:"5px",height:"5px",borderRadius:"50%","& button::before":{color:"transparent",borderRadius:"50%"}},"& li.slick-active button::before":{backgroundColor:e=>e.palette.neutral[100],width:"6px",height:"6px",borderRadius:"50%"}}},children:(0,n.jsx)(eH.A,{...tZ,children:null==t?void 0:t.map((e,t)=>(0,n.jsx)(tN,{item:e},t))})})})};tV.propTypes={};var tX=i(63231),tq=i(24880),tY=i(21459);let tQ=(0,tY.A)(K.A)(e=>{let{theme:t}=e;return{width:"100%",paddingTop:"10px",borderRadius:"50%",cursor:"pointer"}}),tG=e=>{let{categoryImage:t,name:i,id:l,categoryImageUrl:a,height:d,onlyshimmer:c,slug:x}=e,p=(0,o.useRouter)(),u=(0,b.u)(),h=(0,G.A)(u.breakpoints.down("md")),{ref:g,isEllipsed:m}=(0,eP.A)(i);return(0,n.jsx)(U.Ay,{item:!0,sx:{overflow:"hidden"},onClick:()=>{p.push({pathname:"/home",query:{search:"category",id:l,module_id:"".concat((0,ef.E)()),name:i&&i,data_type:"category"}})},children:(0,n.jsxs)(tQ,{justifyContent:"center",alignItems:"center",spacing:1,children:[(0,n.jsx)(s.A,{sx:{transition:"all ease 0.5s",borderRadius:"50%","&:hover":{boxShadow:"0px 10px 20px rgba(88, 110, 125, 0.1)",img:{transform:"scale(1.05)"}}},children:(0,n.jsx)(s.A,{sx:{borderRadius:"50%",overflow:"hidden",aspectRatio:"1",img:{aspectRatio:"1"}},children:c?(0,n.jsx)(K.A,{sx:{height:{xs:"56px",sm:"120px"},width:{xs:"56px",sm:"120px"}},children:(0,n.jsx)(eI.A,{variant:"circular",width:"100%",height:"100%"})}):(0,n.jsx)(ec.A,{src:a,alt:i,height:h?56:120,width:h?56:120,borderRadius:"50%",objectFit:"cover",bg:"#ddd"})})}),(0,n.jsx)(eB.A,{title:m?i:"",placement:"bottom",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(r.A,{ref:g,sx:{color:e=>e.palette.neutral[1e3],overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",transition:"all ease 0.3s","&:hover":{color:"primary.main"}},fontSize:{xs:"13px",sm:"14px",md:"16px"},fontWeight:"500",component:"h4",children:c?(0,n.jsx)(eI.A,{variant:"text",width:"50px"}):i})})]})})};tG.propTypes={};var tJ=i(48230),tU=i.n(tJ);let tK=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{cursor:"pointer",width:"122px",height:"183px",backgroundColor:t.palette.background.default,borderRadius:"60px",transition:"all ease 0.3s",overflow:"hidden","&:hover":{boxShadow:"0px 10px 20px rgba(88, 110, 125, 0.1)",img:{transform:"scale(1.05)"}},[t.breakpoints.down("md")]:{width:"100px",height:"150px",borderRadius:"45px"},[t.breakpoints.down("sm")]:{width:"90px",height:"140px",borderRadius:"40px"}}}),t$=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{position:"relative",width:"100%",height:"122px",overflow:"hidden",borderRadius:"60px 60px 0 0",[t.breakpoints.down("md")]:{height:"80px",borderRadius:"45px 45px 0 0"},[t.breakpoints.down("sm")]:{height:"70px",borderRadius:"40px 40px 0 0"}}}),t0=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{width:"100%",minHeight:"40px",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center"}}),t1=e=>{let{image:t,title:i,id:l,onlyshimmer:s}=e,[o,a]=(0,d.useState)(!1),{ref:c,isEllipsed:x}=(0,eP.A)(i);return(0,n.jsx)(tU(),{href:{pathname:"/home",query:{search:"category",id:l,module_id:"".concat((0,ef.E)()),name:i,data_type:"category"}},passHref:!0,legacyBehavior:!0,children:(0,n.jsx)("a",{style:{textDecoration:"none"},children:(0,n.jsxs)(tK,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[(0,n.jsx)(t$,{children:s?(0,n.jsx)(eI.A,{variant:"rectangular",width:"100%",height:"100%"}):(0,n.jsx)(ec.A,{src:t,alt:i,fill:!0,style:{objectFit:"cover"},sizes:"(max-width: 600px) 90px, 122px",bg:"#ddd"})}),(0,n.jsx)(eB.A,{title:x?i:"",placement:"bottom",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(t0,{children:(0,n.jsx)(r.A,{ref:c,textAlign:"center",component:"h4",noWrap:!0,sx:{fontSize:{xs:"12px",md:"14px"},lineHeight:"1.2",maxWidth:"100%",color:o?"primary.main":"text.primary"},children:s?(0,n.jsx)(eI.A,{width:"70px"}):i})})})]})})})},t2=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{backgroundColor:t.palette.background.paper,padding:"5px",border:"1px solid #EAEEF2",borderRadius:"10px",cursor:"pointer",width:"225px",transition:"all ease 0.5s",".MuiTypography-h7":{transition:"all ease 0.5s"},"&:hover":{boxShadow:"0px 10px 20px rgba(88, 110, 125, 0.1)",".MuiTypography-h7":{color:t.palette.primary.main,letterSpacing:"0.02em"},img:{transform:"scale(1.1)"}}}}),t5=(0,l.Ay)(Z.iv)(e=>{let{theme:t}=e;return{position:"relative",borderRadius:"10px",height:"115px"}}),t3=e=>{let{item:t,imageUrl:i,onlyshimmer:l}=e,{ref:s,isEllipsed:o}=(0,eP.A)(null==t?void 0:t.name),{t:a}=(0,en.Bd)(),d=(0,el.D)();return(0,n.jsx)(t2,{children:(0,n.jsx)(tU(),{href:{pathname:"/home",query:{search:"category",id:"".concat(null==t?void 0:t.id),module_id:"".concat((0,ef.E)()),name:(null==t?void 0:t.name)&&(null==t?void 0:t.name),data_type:"category"}},children:(0,n.jsxs)(U.Ay,{container:!0,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:6,container:!0,sx:{p:"8px"},alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eB.A,{title:o?null==t?void 0:t.name:"",placement:"bottom",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(Z.iv,{sx:{width:"100%",minWidth:0},children:(0,n.jsx)(r.A,{ref:s,variant:"h7",fontWeight:"400",className:d.multiLineEllipsis,component:"h4",children:l?(0,n.jsx)(eI.A,{variant:"text",width:"70px"}):null==t?void 0:t.name})})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(r.A,{variant:"body2",color:"customColor.textGray",component:"span",children:a("Explore Items")})})]}),(0,n.jsx)(U.Ay,{item:!0,xs:6,children:(0,n.jsx)(t5,{children:l?(0,n.jsx)(eI.A,{variant:"ractangle",height:"100%",width:"100%"}):(0,n.jsx)(ec.A,{height:115,width:106,src:i,borderRadius:"5px",objectFit:"cover",bg:"#ddd"})})})]})})})};t3.propTypes={};let t4=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",justifyContent:"center",height:"100px",width:"100px",borderRadius:"8px",padding:"5px","&:hover":{boxShadow:"0px 15px 25px rgba(88, 110, 125, 0.1)",border:"0px"},[t.breakpoints.down("sm")]:{height:"110px",width:"110px"}}}),t6=e=>{let{image:t,title:i,id:l,onlyshimmer:s}=e,[o,a]=(0,d.useState)(!1),{ref:c,isEllipsed:x}=(0,eP.A)(i),p=(0,el.D)(),u=(0,X.A)();return(0,G.A)(u.breakpoints.down("sm")),(0,G.A)(u.breakpoints.down("xs")),(0,n.jsx)(tU(),{href:{pathname:"/home",query:{search:"category",id:l,module_id:"".concat((0,ef.E)()),name:i&&i,data_type:"category"}},passHref:!0,children:(0,n.jsxs)(S.A,{alignItems:"center",justifyContent:"center",spacing:1,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),sx:{padding:".5rem",cursor:"pointer",height:{xs:"130px",md:"155px"},width:{xs:"100px",md:"124px"},backgroundColor:e=>e.palette.background.paper,border:e=>"1.5px solid ".concat((0,k.X4)(e.palette.neutral[400],.2)),borderRadius:"10px","&:hover":{boxShadow:"0px 10px 20px 0px rgba(88, 110, 125, 0.10)",border:e=>".5px solid ".concat(e.palette.primary.main),img:{transform:"scale(1.04)"}},"& > div":{minWidth:0}},children:[(0,n.jsx)(S.A,{sx:{position:"relative",height:{xs:"95px",md:"110px"},width:"100%",img:{width:"100%",height:"100%"}},children:s?(0,n.jsx)(eI.A,{width:"100%",height:"100%",variant:"rectangle"}):(0,n.jsx)(ec.A,{src:t,alt:i,height:110,width:106,objectFit:"cover",bg:"#ddd"})}),(0,n.jsx)(eB.A,{title:x?i:"",placement:"bottom",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(Z.iv,{sx:{px:"10px",width:"100%",minWidth:0},children:(0,n.jsx)(r.A,{ref:c,component:"h4",textAlign:"center",className:p.singleLineEllipsis,sx:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"},maxHeight:"20px",color:o?"primary.main":"text.primary",children:s?(0,n.jsx)(eI.A,{width:"70px",variant:"text",sx:{mx:"auto"}}):i})})})]})})};var t8=i(10206);function t7(){let e=(0,tw._)(["\n 0% { transform: translateX(0px); }\n 100% { transform: translateX(-3px); }\n"]);return t7=function(){return e},e}function t9(){let e=(0,tw._)(["\n 0% { transform: translateX(0px); }\n 100% { transform: translateX(3px); }\n"]);return t9=function(){return e},e}let ie=(0,ty.i7)(t7()),it=(0,ty.i7)(t9()),ii=(0,l.Ay)(s.A)(e=>{let{theme:t,right:i,isdisabled:n,ishovered:l}=e;return{top:0,height:"100%",width:"73px",background:"true"===i?"ltr"===t.direction?"linear-gradient(270deg, ".concat(t.palette.neutral[100]," 0%, rgba(255, 255, 255, 0) 100%)"):"linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, ".concat(t.palette.neutral[100]," 100%)"):"ltr"===t.direction?"linear-gradient(to right, ".concat(t.palette.neutral[100]," 0%, rgba(255, 255, 255, 0) 100%)"):"linear-gradient(to left, rgba(255, 255, 255, 0) 0%, ".concat(t.palette.neutral[100]," 100%)"),zIndex:1,right:"true"===i&&0,left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",opacity:+!!l,transition:"opacity 0.3s ease-in-out",[t.breakpoints.down("sm")]:{display:"none"}}}),il=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n}=e;return{zIndex:1,top:"40%",left:0,display:i?"none":"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:n?t.palette.primary.main:t.palette.neutral[100],cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(ie," 0.8s ease-in-out infinite alternate"),"&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),ir=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n}=e;return{top:"40%",zIndex:1,right:8,display:i?"none":"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:n?t.palette.primary.main:t.palette.neutral[100],cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(it," 0.8s ease-in-out infinite alternate"),"&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),is=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,isHovered:r}=e,s=(0,X.A)(),o=(0,G.A)(s.breakpoints.down("sm")),[a,c]=(0,d.useState)(!1);return(0,n.jsx)(ii,{isdisabled:!!o&&!!l||(null==i?void 0:i.includes("slick-disabled")),right:"true",ishovered:r,children:(0,n.jsx)(ir,{className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:a,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(to.A,{sx:{fontSize:"24px",color:a?"white":s.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(ta.A,{sx:{fontSize:"24px",color:a?"white":s.palette.neutral[600],transition:"color 0.3s ease"}})})})},io=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,isHovered:r}=e,s=(0,X.A)(),o=(0,G.A)(s.breakpoints.down("sm")),[a,c]=(0,d.useState)(!1);return(0,n.jsx)(ii,{isdisabled:!!o&&!!l||(null==i?void 0:i.includes("slick-disabled")),ishovered:r,children:(0,n.jsx)(il,{className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:a,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(ta.A,{sx:{fontSize:"24px",color:a?"white":s.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(to.A,{sx:{fontSize:"24px",color:a?"white":s.palette.neutral[600],transition:"color 0.3s ease"}})})})},ia=(0,l.Ay)(s.A)(e=>{let{theme:t,right:i,isdisabled:n,ishovered:l}=e;return{top:0,height:"100%",width:"73px",background:"inherit",zIndex:1,right:"true"===i&&0,left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",opacity:+!!l,transition:"opacity 0.3s ease-in-out",[t.breakpoints.down("sm")]:{display:"none"}}}),id=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n,width:l,height:r}=e;return{zIndex:1,top:"50%",left:"0px",display:i?"none":"flex",backgroundColor:n?t.palette.primary.main:t.palette.neutral[100],borderRadius:"50%",height:r||"38px",width:l||"38px",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(ie," 0.8s ease-in-out infinite alternate"),"&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),ic=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,isarrowhovered:n,width:l,height:r}=e;return{zIndex:1,right:0,display:i?"none":"flex",backgroundColor:n?t.palette.primary.main:t.palette.neutral[100],borderRadius:"50%",height:r||"38px",width:l||"38px",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.3s ease",animation:n?"none":"".concat(it," 0.8s ease-in-out infinite alternate"),"&:hover":{backgroundColor:t.palette.primary.main,transform:"scale(1.05)"}}}),ix=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,width:r,height:s,isHovered:o}=e,a=(0,X.A)(),c=(0,G.A)(a.breakpoints.down("sm")),[x,p]=(0,d.useState)(!1);return(0,n.jsx)(ia,{isdisabled:!!c&&!!l||(null==i?void 0:i.includes("slick-disabled")),right:"true",ishovered:o,children:(0,n.jsx)(ic,{width:r,height:s,className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:x,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(to.A,{sx:{fontSize:"30px",color:x?"white":a.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(ta.A,{sx:{fontSize:"30px",color:x?"white":a.palette.neutral[600],transition:"color 0.3s ease"}})})})},ip=e=>{let{onClick:t,className:i,displayNoneOnMobile:l,width:r,height:s,isHovered:o}=e,a=(0,X.A)(),c=(0,G.A)(a.breakpoints.down("sm")),[x,p]=(0,d.useState)(!1);return(0,n.jsx)(ia,{isdisabled:!!c&&!!l||(null==i?void 0:i.includes("slick-disabled")),ishovered:o,children:(0,n.jsx)(id,{width:r,height:s,className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),isarrowhovered:x,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:"rtl"===(0,td.Z)()?(0,n.jsx)(ta.A,{sx:{fontSize:"30px",color:x?"white":a.palette.neutral[600],transition:"color 0.3s ease"}}):(0,n.jsx)(to.A,{sx:{fontSize:"30px",color:x?"white":a.palette.neutral[600],transition:"color 0.3s ease"}})})})},iu=e=>{switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(is,{displayNoneOnMobile:!0,isHovered:e});case P.A.PHARMACY:return(0,n.jsx)(ix,{displayNoneOnMobile:!0,isHovered:e});case P.A.ECOMMERCE:return(0,n.jsx)(is,{displayNoneOnMobile:!0,isHovered:e});case P.A.FOOD:return(0,n.jsx)(ix,{displayNoneOnMobile:!0,isHovered:e})}},ih=e=>{switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(io,{displayNoneOnMobile:!0,isHovered:e});case P.A.PHARMACY:return(0,n.jsx)(ip,{displayNoneOnMobile:!0,isHovered:e});case P.A.ECOMMERCE:return(0,n.jsx)(io,{displayNoneOnMobile:!0,isHovered:e});case P.A.FOOD:return(0,n.jsx)(ip,{displayNoneOnMobile:!0,isHovered:e})}};(0,l.Ay)(tq.mg)(e=>{let{theme:t,language_direction:i}=e;return{minWidth:"20px",width:"10px",height:"30px",borderRadius:"50%",transform:"rtl"===i&&"rotate(180deg)"}}),(0,l.Ay)(tq.mg)(e=>{let{theme:t}=e;return{minWidth:"20px",width:"10px",height:"30px",borderRadius:"50%",color:"black",background:t.palette.neutral[200],"&:hover":{background:t.palette.neutral[400]}}});let ig=()=>{(0,c.wA)();let{featuredCategories:e}=(0,c.d4)(e=>e.storedData),t=(0,d.useRef)(null),{data:i,isFetched:l,refetch:r,isLoading:s}=(0,tX.M)(),[o,a]=d.useState(!1),x={dots:!1,infinite:!1,speed:500,slidesToShow:5,slidesToScroll:1,nextArrow:iu(o),prevArrow:ih(o),responsive:[{breakpoint:1450,settings:{slidesToShow:5,slidesToScroll:3,infinite:!1}},{breakpoint:1210,settings:{slidesToShow:4.5,slidesToScroll:3,infinite:!1}},{breakpoint:1100,settings:{slidesToShow:4,slidesToScroll:3,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:2,infinite:!1}},{breakpoint:980,settings:{slidesToShow:3.8,slidesToScroll:3,infinite:!1}},{breakpoint:840,settings:{slidesToShow:3.2,slidesToScroll:2,infinite:!1}},{breakpoint:785,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:730,settings:{slidesToShow:2.5,slidesToScroll:1,infinite:!1}},{breakpoint:630,settings:{slidesToShow:2.3,slidesToScroll:1,infinite:!1}},{breakpoint:570,settings:{slidesToShow:2.1,slidesToScroll:1,infinite:!1}},{breakpoint:520,settings:{slidesToShow:2,slidesToScroll:1,infinite:!1}},{breakpoint:500,settings:{slidesToShow:1.8,slidesToScroll:1,infinite:!1}},{breakpoint:460,settings:{slidesToShow:1.6,slidesToScroll:1,infinite:!1}},{breakpoint:400,settings:{slidesToShow:1.5,slidesToScroll:1}},{breakpoint:374,settings:{slidesToShow:1.4,slidesToScroll:1}},{breakpoint:280,settings:{slidesToShow:1,slidesToScroll:1}}]},p={dots:!1,infinite:!1,speed:500,slidesToShow:8.5,nextArrow:iu(o),prevArrow:ih(o),currentSlide:0,rtl:!0,responsive:[{breakpoint:1650,settings:{slidesToShow:8,infinite:!1}},{breakpoint:1450,settings:{slidesToShow:7,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:6.5,infinite:!1}},{breakpoint:840,settings:{slidesToShow:6.5,infinite:!1}},{breakpoint:790,settings:{slidesToShow:6,infinite:!1}},{breakpoint:700,settings:{slidesToShow:5,initialSlide:2}},{breakpoint:600,settings:{slidesToShow:4.2,initialSlide:2}},{breakpoint:475,settings:{slidesToShow:3.9}},{breakpoint:450,settings:{slidesToShow:3.7}},{breakpoint:420,settings:{slidesToShow:3.3}},{breakpoint:375,settings:{slidesToShow:2.7}}]},u={dots:!1,infinite:e.length>=7,speed:500,slidesToShow:7,slidesToScroll:3,nextArrow:iu(o),prevArrow:ih(o),responsive:[{breakpoint:1450,settings:{slidesToShow:8,slidesToScroll:3,infinite:e.length>=8}},{breakpoint:1024,settings:{slidesToShow:6,slidesToScroll:3,infinite:e.length>=6}},{breakpoint:850,settings:{slidesToShow:5,slidesToScroll:3,infinite:e.length>=5}},{breakpoint:790,settings:{slidesToShow:4.5,slidesToScroll:3,infinite:e.length>=5}},{breakpoint:600,settings:{slidesToShow:7,slidesToScroll:3,initialSlide:2,infinite:e.length>=7}},{breakpoint:500,settings:{slidesToShow:5,slidesToScroll:3,infinite:e.length>=5}}]};return(0,n.jsx)(Z.iv,{sx:{mt:"20px"},children:s?(0,n.jsx)(rG,{children:(0,n.jsx)(Z.Z7,{sx:{"& .slick-slider":{"& .slick-slide":{padding:{xs:"0px",md:"6px"},paddingBottom:{xs:"5px",sm:"10px",md:"20px !important"}}}},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(()=>{var e,i,l,r;switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(Z.iv,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...p,ref:t,children:(e=[...Array(10)],e.map((e,t)=>(0,n.jsx)(t6,{onlyshimmer:!0},t)))})});case P.A.PHARMACY:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...p,ref:t,children:(i=[...Array(10)],i.map((e,t)=>(0,n.jsx)(t1,{onlyshimmer:!0},t)))})});case P.A.ECOMMERCE:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...x,ref:t,children:(l=[...Array(6)],l.map((e,t)=>(0,n.jsx)(t3,{onlyshimmer:!0},t)))})});case P.A.FOOD:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...u,ref:t,children:(r=[...Array(8)],r.map((e,t)=>(0,n.jsx)(tG,{onlyshimmer:!0},t)))})})}})()})}):(null==i?void 0:i.data)&&(null==i?void 0:i.data.length)>0&&(0,n.jsx)(rG,{children:(null==i?void 0:i.data)&&(null==i?void 0:i.data.length)>0&&(0,n.jsx)(Z.Z7,{sx:{"& .slick-slider":{"& .slick-slide":{padding:{xs:"0px",md:"6px"},paddingBottom:{xs:"5px",sm:"10px",md:"20px !important"}}}},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(()=>{var e,l,r;switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(Z.iv,{sx:{"& .slick-slider":{}},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...p,ref:t,children:[...null==i?void 0:i.data].reverse().map((e,t)=>(0,n.jsx)(t6,{image:null==e?void 0:e.image_full_url,title:null==e?void 0:e.name,id:null==e?void 0:e.id,slug:null==e?void 0:e.slug},t))})});case P.A.PHARMACY:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...p,ref:t,children:null==(e=[...null==i?void 0:i.data].reverse())?void 0:e.map((e,t)=>(0,n.jsx)(t1,{image:null==e?void 0:e.image_full_url,title:null==e?void 0:e.name,slug:null==e?void 0:e.slug,id:null==e?void 0:e.id},t))})});case P.A.ECOMMERCE:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...x,ref:t,children:null==i||null==(l=i.data)?void 0:l.map((e,t)=>(0,n.jsx)(t3,{imageUrl:null==e?void 0:e.image_full_url,item:e},t))})});case P.A.FOOD:return(0,n.jsx)("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:(0,n.jsx)(eH.A,{...u,ref:t,children:null==i||null==(r=i.data)?void 0:r.map((e,t)=>(0,n.jsx)(tG,{id:null==e?void 0:e.id,categoryImage:null==e?void 0:e.image,name:null==e?void 0:e.name,slug:null==e?void 0:e.slug,categoryImageUrl:null==e?void 0:e.image_full_url,height:"40px"},null==e?void 0:e.id))})})}})()})})})},im=async e=>{let{store_id:t,limit:i,offset:n}=e,{data:l}=await h.A.get("api/v1/items/recommended?filter=all&limit=".concat(i,"&offset=").concat(n));return l},iv=(0,l.Ay)(Y.A)(e=>{let{theme:t}=e;return{height:"30px",minWidth:"0px",width:"30px",border:"1px solid ".concat(t.palette.primary.main)}}),ij=e=>{let{selectedMenuIndex:t,setSelectedMenuIndex:i,menus:l}=e,r=(0,X.A)(),s=(0,G.A)(r.breakpoints.down("md")),[o,a]=d.useState(null),c=e=>{a(null),i(e)};return(0,n.jsx)("div",{children:s?(0,n.jsxs)(K.A,{children:[(0,n.jsx)(iv,{onClick:e=>{a(e.currentTarget)},variant:"outlined",children:(0,n.jsx)(tg.A,{fontSize:"small"})}),(0,n.jsx)(tm.A,{id:"basic-menu",anchorEl:o,open:!!o,onClose:c,MenuListProps:{"aria-labelledby":"basic-button"},children:l.map((e,i)=>(0,n.jsx)(tv.A,{onClick:()=>c(i),selected:i===t,children:(0,E.t)(e)},i))})]}):(0,n.jsx)(tj.A,{variant:"scrollable",scrollButtons:"auto",children:l.map((e,l)=>(0,n.jsx)(tA.A,{sx:{cursor:"pointer",ml:3*(0!=l),color:t===l?"primary.main":"inherit",transition:"all ease 0.5s","&:hover":{color:"primary.main"}},onClick:()=>i(l),label:(0,E.t)(e),value:(0,E.t)(e)},l))})})};ij.propTypes={};let iA=e=>{var t,i,l,r,s;let o,[a,x]=(0,d.useState)([]),[u,h]=(0,d.useState)(0),[m,v]=(0,d.useState)([]),[j,A]=(0,d.useState)(!1),{t:f}=(0,en.Bd)(),b=(0,X.A)(),w=(0,G.A)(b.breakpoints.down("md")),{data:y,refetch:k,isLoading:T,isFetched:C}=(o={offset:1,limit:15},(0,p.useQuery)("recommend-products-in-home",()=>im(o),{enabled:!1,onError:g.P1}));(0,d.useEffect)(()=>{k()},[]);let{youWillLoveItems:_}=(0,c.d4)(e=>e.storedData),R=(0,c.wA)(),E=[...new Set(null==(t=(()=>{let e=[];if(_&&(null==_?void 0:_.products)){var t;null==_||null==(t=_.products)||t.forEach(t=>{if(t.category_ids){var i;null==t||null==(i=t.category_ids)||i.forEach(t=>{null==e||e.push(t)})}})}return e})())?void 0:t.map(e=>JSON.stringify(e)))].map(JSON.parse);return(0,d.useEffect)(()=>{var e;(null==_||null==(e=_.products)?void 0:e.length)===0&&k()},[_]),(0,d.useEffect)(()=>{y&&R((0,e4.qB)(y))},[y]),(0,d.useEffect)(()=>{(null==y?void 0:y.total_size)>0&&(x(["Recommended",...null==E?void 0:E.map(e=>e.name)]),v(e4.qB.products))},[e4.qB.products]),(0,d.useEffect)(()=>{if(0==u)v(null==_?void 0:_.products),A(!0);else{var e;v(null==_||null==(e=_.products)?void 0:e.filter(e=>{var t;return null==e||null==(t=e.category_ids)?void 0:t.some(e=>{var t;return(null==(t=E[u-1])?void 0:t.id)===(null==e?void 0:e.id)})})),A(!0)}},[u]),(0,n.jsx)(n.Fragment,{children:!C||(null==y||null==(i=y.items)?void 0:i.length)>0?(0,n.jsx)(rG,{children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mt:"30px",spacing:1,children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[C?(0,n.jsx)(n.Fragment,{children:(null==y||null==(l=y.items)?void 0:l.length)>0&&(0,n.jsx)(ts.A,{text:"Item That You’ll Love",component:"h2"})}):(0,n.jsx)(eI.A,{variant:"text",width:"110px"}),(0,n.jsx)(S.A,{maxWidth:"960px",width:w?"initial":"100%",children:(null==y||null==(r=y.items)?void 0:r.length)?(0,n.jsx)(n.Fragment,{children:(null==a?void 0:a.length)>0&&(0,n.jsx)(ij,{selectedMenuIndex:u,setSelectedMenuIndex:h,menus:a})}):null})]}),(0,n.jsx)(Z.jB,{children:C?(0,n.jsx)(Z.Z7,{nopadding:"true",children:(0,n.jsx)(eH.A,{...th,children:null==y||null==(s=y.items)?void 0:s.map((e,t)=>(0,n.jsx)(te.Ay,{cardType:"vertical-type",loveItem:"true",cardFor:"vertical",item:e},null==e?void 0:e.id))})}):(0,n.jsx)(Z.Z7,{nopadding:"true",children:(0,n.jsx)(eH.A,{...th,children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(tr,{},t))})})})]})}):null})};iA.propTypes={};var ib=i(28024),iw=i(96411),iy=i(77981),iS=i(94098),ik=i(59053);let iT={src:"/_next/static/media/map.c9cf3c97.png"},iC=(0,l.Ay)(Z.jB)(e=>{let{theme:t}=e;return{background:t.palette.neutral[100],border:"1px solid ".concat((0,k.X4)(t.palette.neutral[600],.2)),borderRadius:"10px",cursor:"pointer","&:hover img":{transform:"scale(1.04)"}}}),i_=(0,l.Ay)(Z.iv)(e=>{let{theme:t}=e;return{borderRadius:"10px 10px 0px 0px",height:"100px",opacity:2,position:"relative",overflow:"hidden",img:{width:"100%",height:"100%"}}}),iR=(0,l.Ay)(Z.jB)(e=>{let{theme:t}=e;return{paddingLeft:"25px",paddingRight:"25px",paddingBottom:"14px",[t.breakpoints.down("sm")]:{paddingLeft:"10px",paddingRight:"10px"}}}),iE=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"3px 5px",gap:"2px",background:t.palette.primary.main,boxShadow:"0px 3px 4px rgba(0, 0, 0, 0.08)",borderRadius:"10px",color:t.palette.whiteContainer.main}}),iI=(0,l.Ay)("span")(e=>{let{theme:t}=e;return{fontWeight:"bold"}}),iB=(0,l.Ay)("span")(e=>{let{theme:t}=e;return{height:"65px",width:"95px",border:"0.5px solid ".concat(t.palette.neutral[200]),borderRadius:"10px",position:"relative",marginTop:"-30px",overflow:"hidden",img:{width:"100%",height:"100%"},[t.breakpoints.down("sm")]:{height:"57px",width:"80px",marginTop:"-26px"}}}),iM=e=>{var t;let{item:i}=e,{wishLists:l}=(0,c.d4)(e=>e.wishList),[s,a]=(0,d.useState)(!1),x=null==(t=JSON.parse(window.localStorage.getItem("module")))?void 0:t.id,p=(0,el.D)(),{ref:u,isEllipsed:h}=(0,eP.A)(null==i?void 0:i.name),{t:g}=(0,en.Bd)(),{mutate:m}=(0,$.S)(),v=(0,c.wA)(),{mutate:j}=(0,ee.P)(),A=(0,o.useRouter)();(0,d.useEffect)(()=>{b()},[l]);let b=()=>{var e;(null==l||null==(e=l.store)?void 0:e.find(e=>e.id===(null==i?void 0:i.id)))?a(!0):a(!1)};return(0,n.jsxs)(iC,{onClick:()=>{A.push({pathname:"/store/[id]",query:{id:"".concat((null==i?void 0:i.slug)?null==i?void 0:i.slug:null==i?void 0:i.id),module_id:"".concat(x),distance:i.distance,store_zone_id:"".concat(null==i?void 0:i.zone_id)}})},children:[(0,n.jsx)(i_,{children:(0,n.jsx)(ec.A,{src:null==i?void 0:i.cover_photo_full_url,alt:null==i?void 0:i.name,height:100,width:281,borderRadius:"10px 10px 0px 0px",objectFit:"cover"})}),(0,n.jsxs)(iR,{spacing:.5,children:[(0,n.jsxs)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",mb:"10px",children:[(0,n.jsxs)(iB,{sx:{overflow:"hidden",borderRadius:"10px"},children:[(0,n.jsx)(ec.A,{src:null==i?void 0:i.logo_full_url,alt:null==i?void 0:i.name,height:65,width:95,objectfit:"cover"}),(0,n.jsx)(ik.A,{active:null==i?void 0:i.active,open:null==i?void 0:i.open,borderRadius:"10px"})]}),(0,n.jsxs)(Z.jB,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,pl:"7px",children:[(0,n.jsx)(iS.A,{rating:null==i?void 0:i.avg_rating,PrimaryColor:!0}),s?(0,n.jsx)(iw.A,{sx:{fontSize:{xs:"17px",md:"15px"}},color:"primary",onClick:e=>(e.stopPropagation(),void j(null==i?void 0:i.id,{onSuccess:e=>{v((0,f.Rz)(null==i?void 0:i.id)),a(!1),ei.Ay.success(e.message,{id:"wishlist"})},onError:e=>{ei.Ay.error(e.response.data.message)}}))}):(0,n.jsx)(iy.A,{sx:{fontSize:{xs:"17px",md:"15px"}},color:"primary",onClick:e=>(e=>{e.stopPropagation(),localStorage.getItem("token")?m(null==i?void 0:i.id,{onSuccess:e=>{e&&(v((0,f.wz)(i)),a(!0),ei.Ay.success(null==e?void 0:e.message))},onError:e=>{ei.Ay.error(e.response.data.message)}}):ei.Ay.error(g(es.F))})(e)})]})]}),h?(0,n.jsx)(ed.oD,{text:null==i?void 0:i.name,placement:"bottom",arrow:"false",children:(0,n.jsx)(r.A,{ref:u,className:p.singleLineEllipsis,fontSize:{xs:"13px",md:"16px"},fontWeight:"500",component:"h3",children:null==i?void 0:i.name})}):(0,n.jsx)(r.A,{ref:u,className:p.singleLineEllipsis,fontSize:{xs:"13px",md:"16px"},fontWeight:"500",component:"h3",children:null==i?void 0:i.name}),(0,n.jsx)(r.A,{textAlign:"flex-start",className:p.singleLineEllipsis,maxHeight:"20px",variant:"body2",color:"text.secondary",children:null==i?void 0:i.address}),(0,n.jsx)(Z.jB,{alignItems:"flex-start",pt:"12px",children:(0,n.jsxs)(iE,{children:[(0,n.jsx)(B.A,{src:iT.src,alt:g("map"),height:"14px",width:"13px",objectFit:"cover"}),(0,n.jsxs)(r.A,{children:[(0,n.jsx)(iI,{children:(0,n.jsx)(et,{distance:i.distance})}),g("from you")]})]})})]})]})};iM.propTypes={};let iL=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i}=e;return{zIndex:1,top:"50%",left:0,display:i?"none":"flex !important",backgroundColor:"".concat(t.palette.primary.main," !important"),color:"".concat(t.palette.neutral[100]," !important"),borderRadius:"50%",height:"38px !important",width:"38px !important",alignItems:"center !important",justifyContent:"center !important","&:hover":{backgroundColor:"".concat(t.palette.primary.dark," !important"),color:"".concat(t.palette.neutral[100]," !important")}}}),iD=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i}=e;return{zIndex:1,right:0,display:i?"none ":"flex !important",backgroundColor:"".concat(t.palette.primary.main," !important"),color:"".concat(t.palette.neutral[100]," !important"),borderRadius:"50%",height:"38px !important",width:"38px !important",alignItems:"center !important",justifyContent:"center !important","&:hover":{backgroundColor:"".concat(t.palette.primary.dark," !important"),color:"".concat(t.palette.neutral[100]," !important")}}}),iz=(0,l.Ay)(s.A)(e=>{let{theme:t,right:i,isdisabled:n}=e;return{top:0,height:"100%",width:"73px",background:"true"===i?"linear-gradient(".concat("rtl"===iF?"470deg":"270deg",", rgba(75, 86, 107, 0.15) 0%, rgba(75, 86, 107, 0) 100%)"):"linear-gradient(to right, rgba(75, 86, 107, 0.15) 0%, rgba(75, 86, 107, 0) 100%)",zIndex:1,right:"true"===i&&0,left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",[t.breakpoints.down("sm")]:{display:"none"}}}),iF=(0,td.Z)()?(0,td.Z)():"ltr",iW={dots:!1,infinite:!1,speed:500,slidesToShow:4,slidesToScroll:1,nextArrow:(0,n.jsx)(e=>{let{onClick:t,className:i}=e;return(0,n.jsx)(iz,{isdisabled:null==i?void 0:i.includes("slick-disabled"),right:"true",children:(0,n.jsx)(iD,{className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,td.Z)()?(0,n.jsx)(to.A,{sx:{fontSize:"30px"}}):(0,n.jsx)(ta.A,{sx:{fontSize:"30px"}})})})},{}),prevArrow:(0,n.jsx)(e=>{let{onClick:t,className:i}=e;return(0,n.jsx)(iz,{isdisabled:null==i?void 0:i.includes("slick-disabled"),children:(0,n.jsx)(iL,{className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,td.Z)()?(0,n.jsx)(ta.A,{sx:{fontSize:"30px"}}):(0,n.jsx)(to.A,{sx:{fontSize:"30px"}})})})},{}),responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:1,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:1,infinite:!1}},{breakpoint:760,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:695,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2,infinite:!1}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2,infinite:!1}},{breakpoint:480,settings:{slidesToShow:1.4,slidesToScroll:1,initialSlide:1,infinite:!0}},{breakpoint:340,settings:{slidesToShow:1.2,slidesToScroll:1,initialSlide:1,infinite:!0}}]},iP={dots:!1,infinite:!1,speed:500,slidesToShow:8,slidesToScroll:1,responsive:[{breakpoint:1450,settings:{slidesToShow:7,slidesToScroll:3,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:7,slidesToScroll:3,infinite:!1}},{breakpoint:840,settings:{slidesToShow:6.5,slidesToScroll:2,infinite:!1}},{breakpoint:760,settings:{slidesToShow:8,slidesToScroll:3,infinite:!1}},{breakpoint:695,settings:{slidesToShow:6,slidesToScroll:2,initialSlide:2}},{breakpoint:600,settings:{slidesToShow:5.2,slidesToScroll:2,initialSlide:2}},{breakpoint:480,settings:{slidesToShow:4.2,slidesToScroll:1,autoplay:!0}},{breakpoint:340,settings:{slidesToShow:2.5,slidesToScroll:1}}]},iO=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",height:"100px",width:"100px",borderRadius:"50%",boxShadow:"0px 4px 10px 0px rgba(0, 54, 85, 0.10)","&:hover":{boxShadow:"5px 0px 20px rgba(0, 54, 85, 0.15)",img:{transform:"scale(1.04)"}},[t.breakpoints.down("md")]:{height:"80px",width:"80px"},[t.breakpoints.down("sm")]:{height:"57px",width:"57px"}}}),iZ=(0,l.Ay)(Z.iv)(e=>{let{theme:t}=e;return{"& .slick-slide":{padding:"0 10px"},[t.breakpoints.down("sm")]:{"& .slick-slide":{padding:"0px"}}}}),iH=["Popular","Top Rated","New"],iN=()=>{var e;let{data:t,refetch:i,isFetching:l,isLoading:r}=ew({type:"all"}),[o,a]=(0,d.useState)(0),{configData:x}=(0,c.d4)(e=>e.configData),p=null==(e=JSON.parse(window.localStorage.getItem("module")))?void 0:e.id,u=(0,d.useRef)(null),{newArrivalStores:h}=(0,c.d4)(e=>e.storedData),[g,m]=(0,d.useState)([]),{data:v,refetch:j,isLoading:A}=(0,ib.N)({queryKey:"navbar-stores",type:"all"}),f=(0,c.wA)();(0,d.useEffect)(()=>{0===h.length&&i()},[h]),(0,d.useEffect)(()=>{var e;(null==t||null==(e=t.stores)?void 0:e.length)>0&&f((0,e4.Od)(null==t?void 0:t.stores))},[t]),(0,d.useEffect)(()=>{j()},[]),(0,d.useEffect)(()=>{var e;(null==v||null==(e=v.stores)?void 0:e.length)>0&&m(null==v?void 0:v.stores)},[v]);let b=e=>{a(e),0===e?m(null==v?void 0:v.stores):1===e?m(null==v?void 0:v.stores.sort((e,t)=>t.avg_rating-e.avg_rating)):m(null==v?void 0:v.stores.sort((e,t)=>new Date(t.created_at)-new Date(e.created_at)))},w=(0,n.jsx)(iZ,{sx:{"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"},paddingY:"10px"}},children:r?(0,n.jsx)(eH.A,{...iW,children:[...Array(6)].map((e,t)=>(0,n.jsx)(eT.A,{width:290},t))}):(0,n.jsx)(eH.A,{...iW,ref:u,children:null==g?void 0:g.map((e,t)=>(0,n.jsx)(iM,{configData:x,item:e},t))})});return(0,n.jsx)(rG,{sx:{paddingTop:"5px",gap:"1rem"},children:(()=>{var e;return(0,W.c)()===P.A.FOOD?(0,n.jsx)(n.Fragment,{children:h&&h.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:r?(0,n.jsx)(eI.A,{variant:"text",width:"110px"}):(0,n.jsx)(ts.A,{text:(0,E.t)("New Arrival Restaurants"),component:"h2"})}),(0,n.jsx)(iZ,{float:"left",sx:{"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"},paddingY:"10px"}},children:(0,n.jsx)(eH.A,{...iP,children:null==h?void 0:h.map((e,t)=>(0,n.jsx)(s.A,{children:(0,n.jsx)(tU(),{href:{pathname:"/store/[id]",query:{id:"".concat(null==e?void 0:e.id),module_id:"".concat(p),module_type:(0,W.c)(),store_zone_id:"".concat(null==e?void 0:e.zone_id)}},children:(0,n.jsx)(iO,{children:(0,n.jsxs)(s.A,{sx:{borderRadius:"50%",overflow:"hidden",width:"100%",img:{width:"100%",height:"100%"}},children:[(0,n.jsx)(ec.A,{src:null==e?void 0:e.logo_full_url,alt:null==e?void 0:e.title,height:100,width:100,objectFit:"cover",borderRadius:"50%"}),(0,n.jsx)(ik.A,{active:null==e?void 0:e.active,open:null==e?void 0:e.open,borderRadius:"50%"})]})})})},t))})})]})}):(0,n.jsx)(n.Fragment,{children:v&&(null==v||null==(e=v.stores)?void 0:e.length)>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[r?(0,n.jsx)(eI.A,{variant:"text",width:"110px"}):(0,n.jsx)(ts.A,{text:(0,E.t)("Best Store Nearby"),component:"h2"}),(0,n.jsx)(tb,{selectedMenuIndex:o,setSelectedMenuIndex:b,menus:iH})]}),0===o&&(0,n.jsx)(n.Fragment,{children:w}),1===o&&(0,n.jsx)(n.Fragment,{children:w}),2===o&&(0,n.jsx)(n.Fragment,{children:w})]})})})()})},iV=async e=>{let{offset:t,type:i}=e,{data:n}=await h.A.get("".concat(u.Td,"?limit=").concat(u.nV,"&offset=").concat(t,"&type=").concat(i));return n};var iX=i(58106),iq=i(57604);let iY=()=>(0,n.jsx)(ti,{children:(0,n.jsxs)(S.A,{children:[(0,n.jsx)(eI.A,{variant:"rectangular",animation:"pulse",width:270,height:260}),(0,n.jsxs)(tl,{padding:"1rem",spacing:1,children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"50%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"}),(0,n.jsx)(iq.A,{}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"})]})]})}),iQ=()=>(0,n.jsxs)(tt,{children:[(0,n.jsx)(eI.A,{variant:"rectangular",animation:"pulse",width:150,height:150}),(0,n.jsxs)(S.A,{padding:"1rem",children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"80%"}),(0,n.jsxs)(S.A,{direction:"row",spacing:2,children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",width:70,height:20}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",width:70,height:20})]})]})]});i(11324),i(97077),i(43672),i(26462),i(77611);let iG={dots:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,speed:800,autoplaySpeed:4e3};var iJ=i(23214),iU=i(52501);let iK=(0,l.Ay)(Z.jB)(e=>{let{theme:t}=e;return{marginTop:"10px",marginBottom:"10px"}}),i$=(0,l.Ay)(Z.Z7)(e=>{let{theme:t,isSmall:i}=e;return{"& .slick-dots":{top:"365px",maxWidth:"100px","& li":{backgroundColor:(0,k.X4)(t.palette.primary.main,.2),width:"8px",height:"3px","& button::before":{color:"transparent"}},"& li.slick-active button::before":{backgroundColor:t.palette.primary.main,width:"8px",height:"3px",borderRadius:"100px"}},[t.breakpoints.down("sm")]:{"& .slick-dots":{bottom:0,top:"480px"}}}}),i0=e=>{var t,i;let{flashSales:l}=e,a=(0,X.A)(),d=(0,o.useRouter)(),c=(0,G.A)(a.breakpoints.down("md"));return(0,n.jsxs)(Z.jB,{height:"100%",alignItems:"center",justifyContent:"flex-start",sx:{backgroundColor:e=>(0,k.X4)(e.palette.neutral[400],.1),padding:"4px",borderRadius:"10px",cursor:"pointer"},children:[(0,n.jsx)(r.A,{fontSize:"22px",fontWeight:"700",mt:"16px",children:(0,E.t)("Flash Sale")}),(null==l||null==(t=l.active_products)?void 0:t.length)>0&&(0,n.jsx)(iK,{alignItems:"center",justifyContent:"center",children:(0,n.jsx)(iU.A,{startDate:null==l?void 0:l.start_date,endDate:null==l?void 0:l.end_date})}),(0,n.jsx)(i$,{isSmall:c,children:(0,n.jsx)(eH.A,{...iG,children:null==l||null==(i=l.active_products)?void 0:i.slice(0,5).map((e,t)=>(0,n.jsx)(s.A,{children:(0,n.jsx)(te.Ay,{item:{...null==e?void 0:e.item},cardheight:"340px",cardFor:"flashSale",cardType:"vertical-type",sold:null==e?void 0:e.sold,stock:null==e?void 0:e.available_stock})},t))})}),(0,n.jsx)(S.A,{width:"100%",alignItems:"end",justifyContent:"center",children:(0,n.jsx)(r.A,{onClick:()=>{d.push({pathname:"/flash-sales",query:{id:null==l?void 0:l.id}})},sx:{textDecoration:"underLine",color:e=>e.palette.neutral[400]},fontSize:"16px",fontWeight:"600",marginRight:"10px",children:"See All"})})]})};i0.propTypes={};let i1=e=>{var t,i,l;let{title:r,subTitle:s}=e,{popularItemsNearby:o}=(0,c.d4)(e=>e.storedData),{t:a}=(0,en.Bd)(),{data:x,refetch:u,isLoading:h,isFetching:m}=(l={offset:1,type:"all"},(0,p.useQuery)(["popular-items-nearby",(0,ef.E)()],()=>iV(l),{enabled:!0,cacheTime:3e5,staleTime:3e5,onError:g.Jm})),{data:v,refetch:j,isLoading:A}=(0,iX._)({limit:2,offset:1}),f=(0,c.wA)();(0,d.useEffect)(()=>{j()},[]),(0,d.useEffect)(()=>{x&&f((0,e4.Hw)(x))},[x]),(0,d.useEffect)(()=>{u()},[]);let b=()=>{var e;return(!v||"object"!=typeof v||0!==Object.keys(v).length)&&!((null==v||null==(e=v.active_products)?void 0:e.length)<1)},w={dots:!1,infinite:!1,speed:500,slidesPerRow:1,rows:3,slidesToShow:b()?2:2.7,slidesToScroll:1,cssEase:"linear",rtl:"rtl"===(0,td.Z)(),responsive:[{breakpoint:320,settings:{slidesToShow:1,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:375,settings:{slidesToShow:1.1,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:450,settings:{slidesToShow:1.2,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:750,settings:{slidesToShow:1.5,slidesPerRow:2,rows:2,slidesToScroll:1}},{breakpoint:830,settings:{slidesToShow:1.55,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:900,settings:{slidesToShow:1.75,slidesPerRow:1,rows:2,slidesToScroll:1}},{breakpoint:1150,settings:{slidesToShow:1.8,slidesPerRow:1,rows:3,slidesToScroll:1}},{breakpoint:1300,settings:{slidesToShow:b()?2:2.5,slidesPerRow:1,rows:3,slidesToScroll:1}}],prevArrow:(0,n.jsx)(eC.q,{}),nextArrow:(0,n.jsx)(eC.I,{})};return(0,n.jsx)(rG,{children:x&&(null==x||null==(t=x.products)?void 0:t.length)>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mt:{xs:"10x",md:"16px"},spacing:1,children:[h?(0,n.jsx)(eI.A,{varient:"text",width:"110px"}):(0,n.jsx)(ts.A,{text:r,component:"h2"}),h?(0,n.jsx)(eI.A,{varient:"text",width:"310px"}):(0,n.jsx)(eZ.A,{text:a(s),component:"p"}),(0,n.jsx)(Z.iv,{children:(0,n.jsxs)(U.Ay,{container:!0,spacing:2,sx:{marginTop:"1px"},children:[h?(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,md:9,children:(0,n.jsx)(Z.Z7,{nopadding:"true",sx:{"& .slick-slide":{marginY:"-15px"}},children:(0,n.jsx)(eH.A,{...w,children:[...Array(15)].map((e,t)=>(0,n.jsx)(iQ,{},t))})})}):(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,md:b()?9:12,children:(0,n.jsx)(Z.Z7,{nopadding:"true",sx:{"& .slick-slide":{marginY:"-15px"}},children:(0,n.jsx)(eH.A,{currentSlide:0,...w,children:null==x||null==(i=x.products)?void 0:i.map((e,t)=>(0,n.jsx)(te.Ay,{item:e,cardheight:"160px",horizontalcard:"true",cardFor:"popular items"},t))})})}),A?(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:5,md:3,children:(0,n.jsx)(iY,{})}):(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:5,md:3,children:b()&&(0,n.jsx)(i0,{flashSales:v})})]})})]})})})},i2=async()=>{let{data:e}=await h.A.get(u.A);return e};var i5=i(74033);let i3=()=>(0,n.jsxs)(Z.jB,{spacing:3,children:[(0,n.jsx)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between"}),(0,n.jsx)(Z.jB,{direction:"row",alignItems:"center",spacing:1,children:[...Array(6)].map((e,t)=>(0,n.jsx)(t4,{children:(0,n.jsx)(eI.A,{width:"100%",height:"100%",variant:"rectangle"})},t))})]}),i4=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{position:"relative",width:"100%",borderRadius:"8px",maxHeight:"190px",maxWidth:"200px",overflow:"hidden",img:{width:"100%",height:"100%"},[t.breakpoints.up("md")]:{height:"190px"},"&:hover img":{transform:"scale(1.04)"}}}),i6=()=>(0,n.jsx)(n.Fragment,{children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:4,sm:4,md:2.4,align:"center",children:(0,n.jsx)(i4,{children:(0,n.jsx)(eI.A,{variant:"rectangle",height:"100%",width:"100%"})})},t))}),i8=e=>{let{runningCampaigns:t,handleClick:i,configData:l,isFetching:r}=e;return(0,n.jsxs)(U.Ay,{container:!0,spacing:2,children:[null==t?void 0:t.map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:4,sm:3,md:2.4,lg:2,align:"center",onClick:()=>i(e),sx:{cursor:"pointer"},children:(0,n.jsx)(i4,{children:(0,n.jsx)(ec.A,{src:null==e?void 0:e.image_full_url,alt:null==e?void 0:e.title,height:190,width:200,objectFit:"cover"})})},t)),r&&(0,n.jsx)(i6,{})]})};i8.propTypes={};let i7={dots:!1,infinite:!1,speed:500,slidesToShow:4,slidesToScroll:1,nextArrow:(0,n.jsx)(t8.DE,{}),prevArrow:(0,n.jsx)(t8.$k,{}),responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:3,infinite:!1}},{breakpoint:1250,settings:{slidesToShow:3.5,slidesToScroll:2,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:700,settings:{slidesToShow:2.5,slidesToScroll:2,initialSlide:2}},{breakpoint:550,settings:{className:"center",slidesToShow:1,slidesToScroll:1,centerMode:!0,centerPadding:"40px",initialSlide:0,infinite:!0}},{breakpoint:350,settings:{className:"center",slidesToShow:1,slidesToScroll:1,centerMode:!0,centerPadding:"20px",initialSlide:0,infinite:!0}}]},i9=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{height:"160px","&:hover img":{transform:"scale(1.04)"}}}),ne=e=>{let{runningCampaigns:t,handleClick:i,configData:l,isFetching:r}=e;return(0,n.jsx)(Z.Z7,{children:(0,n.jsx)(eH.A,{...i7,children:(null==t?void 0:t.length)>0&&(null==t?void 0:t.map((e,t)=>(0,n.jsx)(i9,{sx:{cursor:"pointer"},onClick:()=>i(e),children:(0,n.jsx)(B.A,{src:null==e?void 0:e.image_full_url,alt:null==e?void 0:e.title,height:"100%",width:"100%",objectfit:"cover",borderRadius:"8px"})},t)))})})};ne.propTypes={};let nt=()=>{var e;let{configData:t}=(0,c.d4)(e=>e.configData),[i,l]=(0,d.useState)(!1),[r,a]=(0,d.useState)({}),x=null==t||null==(e=t.base_urls)?void 0:e.campaign_image_url,{data:u,refetch:h,isFetching:m,isLoading:v}=(0,p.useQuery)(["item-campaigns",(0,td.f)()],i2,{enabled:!0,onError:g.P1,cacheTime:3e5,staleTime:12e4}),j=(0,o.useRouter)(),{runningCampaigns:A}=(0,c.d4)(e=>e.storedData),f=(0,c.wA)();(0,d.useEffect)(()=>{f((0,e4.Fs)(u))},[u]);let b=e=>{"ecommerce"===(0,W.c)()?(f((0,i5.Mo)(e)),j.push({pathname:"/product/[id]",query:{id:"".concat((null==e?void 0:e.slug)?null==e?void 0:e.slug:null==e?void 0:e.id),module_id:"".concat((0,ef.E)()),product_type:"campaign"}},void 0,{shallow:!0}).then(()=>{window.scrollTo({top:0,behavior:"smooth"})})):(a(e),l(!0))};return(0,n.jsxs)(n.Fragment,{children:[m?(0,n.jsx)(i3,{}):(0,n.jsx)(n.Fragment,{children:(null==u?void 0:u.length)>0?(0,n.jsxs)(rG,{alignItems:"flex-start",children:[(null==u?void 0:u.length)>0&&(0,n.jsx)(ts.A,{text:"Just For You",textAlign:"left",component:"h2"}),(0,n.jsx)(s.A,{sx:{width:"100%",mt:"1rem"},children:(()=>{switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(i8,{runningCampaigns:u,handleClick:b,configData:t,isFetching:m});case P.A.PHARMACY:return(0,n.jsx)(ne,{runningCampaigns:u,handleClick:b,configData:t,isFetching:m});case P.A.ECOMMERCE:case P.A.FOOD:return(0,n.jsx)(i8,{runningCampaigns:u,handleClick:b,configData:t,isFetching:m})}})()})]}):""}),i&&(0,n.jsx)(e6.A,{product:r,imageBaseUrl:x,open:i,handleModalClose:()=>{l(!1)},productUpdate:!0})]})},ni=async e=>{let{limit:t,offset:i,pageParam:n}=e,{data:l}=await h.A.get("".concat((null==e?void 0:e.currentTab)?(null==e?void 0:e.currentTab)===0?u.w3:u.JS:u.w3,"?limit=").concat(t,"&offset=").concat(n||i));return l},nn=e=>{var t,i,l,r,s,a,c,x,u,h;let{title:m}=e,{t:v}=(0,en.Bd)(),{data:j,refetch:A,isLoading:f,isFetching:b}=function(e){return(0,p.useQuery)(["discounted-product",(0,ef.E)(),null==e?void 0:e.currentTab],()=>ni(e),{enabled:!0,staleTime:6e4,cacheTime:6e4,onError:g.P1})}({offset:1,limit:15}),[w,y]=(0,d.useState)(!1),S=(0,td.Z)()?(0,td.Z)():"ltr",T=(0,o.useRouter)(),C={dots:!1,infinite:(null==j||null==(t=j.products)?void 0:t.length)>5,slidesToShow:f?1:5,cssEase:"ease-in-out",autoplay:!0,speed:800,autoplaySpeed:4e3,variableHeight:!0,...tD(w,{displayNoneOnMobile:!0,variant:"primary",noBackground:!0}),responsive:[{breakpoint:1200,settings:{slidesToShow:4,slidesToScroll:1,infinite:(null==j||null==(i=j.products)?void 0:i.length)>4}},{breakpoint:992,settings:{slidesToShow:3.5,infinite:(null==j||null==(l=j.products)?void 0:l.length)>3}},{breakpoint:821,settings:{slidesToShow:3.2,infinite:(null==j||null==(r=j.products)?void 0:r.length)>3}},{breakpoint:768,settings:{slidesToShow:3,infinite:(null==j||null==(s=j.products)?void 0:s.length)>3}},{breakpoint:576,settings:{slidesToShow:2,infinite:(null==j||null==(a=j.products)?void 0:a.length)>2}},{breakpoint:480,settings:{slidesToShow:1.8,infinite:(null==j||null==(c=j.products)?void 0:c.length)>1}},{breakpoint:360,settings:{slidesToShow:1.5,infinite:(null==j||null==(x=j.products)?void 0:x.length)>1}}]};return(0,n.jsx)(n.Fragment,{children:(null==j||null==(u=j.products)?void 0:u.length)>0&&(0,n.jsx)(rG,{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),sx:{cursor:"pointer",".slick-slide":{padding:"0 5px"}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mb:"10px",spacing:1,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[b?(0,n.jsx)(eI.A,{variant:"text",width:"110px"}):(0,n.jsx)(ts.A,{text:m||v("Special Offer"),component:"h2"}),b?(0,n.jsx)(eI.A,{width:"100px",variant:"80px"}):(0,n.jsx)(Y.A,{onClick:()=>{T.push({pathname:"/home",query:{search:"special-offer",module_id:(0,ef.E)(),data_type:"discounted"}}).then(()=>{window.scrollTo({top:0,behavior:"smooth"})})},variant:"text",sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"}},children:v("View all")})]}),(0,n.jsx)(tc.r,{direction:S,children:(0,n.jsx)(Z.iv,{sx:{paddingTop:{xs:"0px",sm:"0px"},padding:{xs:"10px",md:"20px"},backgroundColor:e=>(0,k.X4)(e.palette.neutral[400],.1),".slick-slider .slick-track":{marginY:"10px"}},children:(0,n.jsx)(n.Fragment,{children:b?(0,n.jsx)(eH.A,{...C,children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eT.A,{},t))}):(0,n.jsx)(eH.A,{...C,children:null==j||null==(h=j.products)?void 0:h.map((e,t)=>(0,n.jsx)(te.Ay,{item:e,specialCard:"true"},t))})})})})]})})})};var nl=i(16076),nr=i(58725),ns=i(60999),no=i(5723),na=i(48677),nd=i(2793),nc=i(40625),nx=i(79561),np=i(54202),nu=i(99074);i(22185),i(15162);var nh=i(46416);let ng=e=>{let t=(0,X.A)(),{selectedFilterValue:i,configData:l,totalDataCount:r,setTotalDataCount:s,filteredData:o}=e,[a,c]=(0,d.useState)(1),[x,p]=(0,d.useState)(12),[u,h]=(0,d.useState)([]),{ref:g,inView:m}=(0,nc.Wx)(),v=(0,d.useRef)(),j=(0,d.useRef)(),A=(0,G.A)(t.breakpoints.down("sm")),{data:f,refetch:b,fetchNextPage:w,isFetchingNextPage:y,isLoading:S,hasNextPage:k}=(0,nx.A)({type:i,offset:a,limit:x,filteredData:o});return(0,d.useEffect)(()=>{c(1)},[i,o]),(0,d.useEffect)(()=>{(()=>{var e,t;f&&(null==f||null==(e=f.pages)?void 0:e.length)>0&&(null==f||null==(t=f.pages)||t.forEach(e=>{(e=>{s(e.total_size),o===j.current||i===(null==v?void 0:v.current)?h(t=>(0,eg.R3)([...new Set([...t,...null==e?void 0:e.stores])],"id")):h(null==e?void 0:e.stores),j.current=o,v.current=i})(e)}))})()},[f]),(0,d.useEffect)(()=>{m&&w()},[m,i,o]),(0,d.useEffect)(()=>{b()},[o]),(0,n.jsxs)(Z.iv,{children:[(0,n.jsxs)(U.Ay,{container:!0,spacing:2,children:[(null==u?void 0:u.length)===0&&!S&&(0,n.jsx)(nh.A,{text:"Stores not found!"}),(null==u?void 0:u.length)>0&&!S&&(null==u?void 0:u.map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:6,md:3,children:(0,n.jsx)(np.A,{item:e,imageUrl:null==e?void 0:e.cover_photo_full_url})},t))),(S||y)&&(0,n.jsx)(Z.jB,{alignItems:"center",justifyContent:"center",mt:(null==u?void 0:u.length)===0?A?"7rem":"10rem":"3rem",children:(0,n.jsx)(nu.A,{})})]}),r!==u.length&&(0,n.jsx)(Z.iv,{ref:g})]})};ng.propTypes={};let nm=d.memo(ng);var nv=i(71918),nj=i(58582),nA=i(18952),nf=i(24779),nb=i(55815),nw=i(76572);let ny=e=>{switch((0,W.c)()){case P.A.GROCERY:case P.A.PHARMACY:case P.A.ECOMMERCE:return e.palette.primary.main;case P.A.FOOD:return e.palette.moduleTheme.food}},nS=(0,l.Ay)(Y.A)(e=>{let{theme:t}=e;return{height:"30px",minWidth:"0px",width:"30px",border:"1px solid ".concat(ny(t)),color:ny(t)}}),nk=e=>{let{label:t,data:i,selectedValue:l,handleOnChange:r}=e;return(0,n.jsxs)(nA.A,{children:[(0,n.jsx)(nb.A,{id:"demo-radio-buttons-group-label",children:t}),(0,n.jsx)(nw.A,{value:l,onChange:e=>{e.stopPropagation(),null==r||r(e.target.value)},children:(null==i?void 0:i.length)>0&&(null==i?void 0:i.map((e,t)=>(0,n.jsx)(nv.A,{value:null==e?void 0:e.value,control:(0,n.jsx)(nf.A,{sx:{"&, &.Mui-checked":{color:e=>ny(e)},"&.active":{color:e=>ny(e)}}}),label:null==e?void 0:e.label},t)))})]})},nT=e=>{let{selectedMenuIndex:t,setSelectedMenuIndex:i,menus:l,selectedFilterValue:r,setSelectedFilterValue:s}=e,[o,a]=(0,d.useState)({open:!1,anchorEl:null}),{t:c}=(0,en.Bd)(),x=[{label:"All",value:"all"},{label:"Newly Joined",value:"newly_joined"},{label:"Popular",value:"popular"},{label:"Top Rated",value:"top_rated"}];return(0,n.jsxs)("div",{children:[(0,n.jsx)(nS,{onClick:e=>{a({open:!0,anchorEl:e.currentTarget})},variant:"outlined",children:(0,n.jsx)(tg.A,{fontSize:"small"})}),(null==o?void 0:o.open)&&(0,n.jsx)(nd.A,{openPopover:null==o?void 0:o.open,anchorEl:null==o?void 0:o.anchorEl,placement:"bottom",handleClose:()=>{a({open:!1,anchorEl:null})},children:(0,n.jsx)(nj.A,{sx:{top:"100px",p:"20px",width:"220px"},children:(0,n.jsxs)(Z.jB,{spacing:1,children:[(0,n.jsx)(nk,{label:c("Delivery Type"),data:[{label:"All",value:"all"},{label:"Delivery",value:"home"},{label:"Takeaway",value:"takeaway"}],selectedValue:r,handleOnChange:e=>{s(e)}}),(0,n.jsx)(nk,{label:c("Categories"),data:x,selectedValue:(()=>{var e;return null==(e=x.find((e,i)=>i===t))?void 0:e.value})(),handleOnChange:e=>{i(x.findIndex((t,i)=>(null==t?void 0:t.value)===e))}})]})})})]})};nT.propTypes={};let nC=[{label:(0,E.t)("All"),value:"all"},{label:(0,E.t)("Newly Joined"),value:"newly_joined"},{label:(0,E.t)("Popular"),value:"popular"},{label:(0,E.t)("Top Rated"),value:"top_rated"}],n_=[{label:(0,E.t)("All"),value:"all"},{label:(0,E.t)("Delivery"),value:"delivery"},{label:(0,E.t)("Take Away"),value:"take_away"}],nR=e=>{let{selectedFilterValue:t,setSelectedFilterValue:i}=e,[l,o]=d.useState(null),a=!!l,{t:c}=(0,en.Bd)(),x=(0,X.A)(),p=(0,G.A)(x.breakpoints.down("sm"));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Y.A,{onClick:e=>{o(e.currentTarget)},variant:"text",children:[(0,n.jsx)(tg.A,{fontSize:"small"}),p?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{color:"customColor.textGray",children:c("Filter")}),a?(0,n.jsx)(nl.A,{sx:{color:e=>e.palette.customColor.textGray}}):(0,n.jsx)(nr.A,{color:"customColor.textGray",sx:{color:e=>e.palette.customColor.textGray}})]})]}),a&&(0,n.jsx)(nd.A,{openPopover:a,anchorEl:l,placement:"bottom",handleClose:()=>o(null),top:"10px",children:p?void 0:(0,n.jsx)(s.A,{sx:{width:120,bgcolor:"background.paper"},children:(0,n.jsx)(ns.A,{component:"nav","aria-label":"main mailbox folders",children:null==n_?void 0:n_.map((e,l)=>(0,n.jsx)(no.A,{selected:t===(null==e?void 0:e.value),onClick:()=>i(null==e?void 0:e.value),children:(0,n.jsx)(na.A,{primary:c(null==e?void 0:e.label)})},l))})})})]})},nE=e=>{let[t,i]=(0,d.useState)(0),[l,r]=(0,d.useState)("all"),[s,o]=(0,d.useState)("all"),[a,x]=(0,d.useState)(null),{configData:p}=(0,c.d4)(e=>e.configData),u=(0,X.A)(),h=(0,G.A)(u.breakpoints.down("md")),g=(0,E.t)("Stores");return(0,n.jsxs)(rG,{sx:{paddingTop:"1rem"},children:[(0,n.jsxs)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",py:"10px",pl:"20px",sx:{position:"sticky",top:{xs:"55px",md:"63px"},zIndex:100,background:e=>e.palette.neutral[300]},children:[a?(0,n.jsx)(ts.A,{text:"".concat(a," ").concat(g),component:"h2"}):(0,n.jsx)(eI.A,{variant:"text",width:"80px"}),h?(0,n.jsx)(nT,{selectedMenuIndex:t,setSelectedMenuIndex:i,selectedFilterValue:l,setSelectedFilterValue:r,menus:nC}):(0,n.jsxs)(K.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(tb,{selectedMenuIndex:t,setSelectedMenuIndex:e=>{i(e)},menus:nC,setFilteredData:o}),(0,n.jsx)(nR,{selectedFilterValue:l,setSelectedFilterValue:r})]})]}),(0,n.jsx)(Z.iv,{sx:{minHeight:"20vh",marginTop:"1rem"},children:(0,n.jsx)(nm,{selectedFilterValue:l,configData:p,totalDataCount:a,setTotalDataCount:x,filteredData:s})},"".concat(s).concat(l))]})};var nI=i(38388),nB=i(1468);let nM=()=>{let e=(0,X.A)();return(0,G.A)(e.breakpoints.down("sm")),(0,n.jsxs)(J.A,{sx:{background:e.palette.neutral[100],padding:"10px",width:{xs:"220px",md:"280px"}},children:[(0,n.jsx)(nI.A,{sx:{borderRadius:"10px",position:"relative",height:{xs:"100px",md:"132px"},width:"100%"},children:(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%",sx:{borderRadius:"10px"}})}),(0,n.jsx)(Z.iv,{sx:{mt:"10px"},children:(0,n.jsxs)(U.Ay,{container:!0,spacing:1.5,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:8.5,md:9,children:[(0,n.jsx)(eI.A,{variant:"text",width:"80%",height:20}),(0,n.jsx)(eI.A,{variant:"text",width:"100%",height:40})]}),(0,n.jsx)(U.Ay,{item:!0,xs:3.5,md:3,children:(0,n.jsx)(eI.A,{variant:"text",width:"100%",height:20})})]})})]})},nL=e=>{var t,i,l,r,s,o,a,c,p,u;let{configData:h,visitedStores:g,isVisited:m,isLoading:v}=e,j=(0,X.A)(),A=(0,x.g)(),f=(0,G.A)("(min-width:600px)"),[b,w]=(0,d.useState)(!1),y=()=>{switch((0,W.c)()){case P.A.GROCERY:return{mainPosition:"flex-start",heading:m?"Visit Again!":"Whats New",subHeading:"Get your recent purchase from the shop you recently ordered",bgColor:"dark"===j.palette.mode?"rgba(3, 157, 85, 0.05)":(0,k.X4)(j.palette.primary.main,.2)};case P.A.PHARMACY:return{mainPosition:m?"center":"flex-start",heading:m?"Visit Again!":"Whats New",subHeading:"Get your recent medicine from the store you recently ordered",bgColor:"dark"===j.palette.mode?"rgba(3, 157, 85, 0.05)":(0,k.X4)(j.palette.primary.main,.2)};case P.A.ECOMMERCE:return{mainPosition:"flex-start",heading:m?"Visit Again!":"Whats New",subHeading:"Get your recent purchase from the shop you recently ordered",bgColor:"dark"===j.palette.mode?"rgba(3, 157, 85, 0.05)":(0,k.X4)(j.palette.primary.main,.2)};case P.A.FOOD:return{mainPosition:"flex-start",heading:m?"Wanna Try Again!!":"Whats New",subHeading:"Get your recent food from the restaurant you recently ordered",bgColor:"dark"===j.palette.mode?"rgba(3, 157, 85, 0.05)":(0,k.X4)(j.palette.primary.main,.2)}}};if(!v&&(!g||0===g.length)&&!A)return null;let S={dots:!1,infinite:!1,speed:500,slidesToShow:4,slidesToScroll:1,...tD(b,{displayNoneOnMobile:!0,variant:"white"}),responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:3,infinite:!1}},{breakpoint:1250,settings:{slidesToShow:3.5,slidesToScroll:2,infinite:!1}},{breakpoint:1150,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:800,settings:{slidesToShow:2.7,slidesToScroll:2,infinite:!1}},{breakpoint:700,settings:{slidesToShow:2.5,slidesToScroll:2,initialSlide:2}},{breakpoint:600,settings:{slidesToShow:2.1,slidesToScroll:2,initialSlide:2}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:479,settings:{slidesToShow:1.8,slidesToScroll:1}},{breakpoint:450,settings:{slidesToShow:1.6,slidesToScroll:1}},{breakpoint:400,settings:{slidesToShow:1.5,slidesToScroll:1}},{breakpoint:350,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:310,settings:{slidesToShow:1,slidesToScroll:1}}]};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(Z.jB,{alignItems:null==y||null==(t=y())?void 0:t.mainPosition,justyfyContent:null==y||null==(i=y())?void 0:i.mainPosition,mt:f?"2px":"16px",spacing:{xs:2,md:1},paddingX:{xs:2,md:0},children:[f?(0,n.jsx)(eq.A,{children:(0,n.jsxs)(Z.jB,{alignItems:null==y||null==(l=y())?void 0:l.mainPosition,justyfyContent:null==y||null==(r=y())?void 0:r.mainPosition,mt:"10px",spacing:1,children:[(0,n.jsx)(nB.A,{text:null==y||null==(s=y())?void 0:s.heading,component:"h2"}),m&&(0,n.jsx)(eZ.A,{textAlign:null==y||null==(o=y())?void 0:o.mainPosition,text:null==y||null==(a=y())?void 0:a.subHeading,component:"p"})]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(nB.A,{text:null==y||null==(c=y())?void 0:c.heading,component:"h2"}),m&&(0,n.jsx)(eZ.A,{text:null==y||null==(p=y())?void 0:p.subHeading,component:"p"})]}),(0,n.jsx)(Z.Z7,{nopadding:"true",sx:{backgroundColor:null==y||null==(u=y())?void 0:u.bgColor,padding:{xs:"0px",md:"17px"},minHeight:"200px"},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:(0,n.jsx)(eH.A,{...S,children:v?[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(nM,{},t)):null==g?void 0:g.map((e,t)=>(0,n.jsx)(eh,{item:e,configData:h,isVisited:m},t))})})]})})};nL.propTypes={};var nD=i(61549);let nz=()=>{let e=(0,o.useRouter)(),{data:t,refetch:i,isFetched:l,isLoading:r}=(0,nD.A)(),s={dots:!1,infinite:(null==t?void 0:t.length)>2,slidesToShow:(null==t?void 0:t.length)==1?1:2,slidesToScroll:1,autoplay:!0,speed:800,autoplaySpeed:4e3,cssEase:"linear",responsive:[{breakpoint:600,settings:{slidesToShow:1.1,slidesToScroll:1}}]};return(0,n.jsx)(n.Fragment,{children:r?(0,n.jsx)(Z.jB,{sx:{mt:"10px","& .slick-list":{marginRight:{xs:"-10px",sm:"-20px"}},"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"}}},children:(0,n.jsx)(eH.A,{...s,children:[void 0,void 0].map((e,t)=>(0,n.jsx)(e8,{children:(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%"})},t))})}):(null==t?void 0:t.length)>0&&(0,n.jsx)(Z.jB,{sx:{mt:"10px","& .slick-list":{marginRight:{xs:"-10px",sm:"-20px"}},"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"}}},children:(0,n.jsx)(Z.Z7,{float:"center",children:(0,n.jsx)(eH.A,{...s,children:t.map((t,i)=>(0,n.jsx)(e8,{onClick:()=>(t=>{e.push({pathname:"/campaigns/[id]",query:{id:"".concat(null==t?void 0:t.id),module_id:"".concat((0,ef.E)())}},void 0,{shallow:!0}).then(()=>{setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100)})})(t),children:(0,n.jsx)(B.A,{src:null==t?void 0:t.image_full_url,alt:null==t?void 0:t.title,height:"100%",width:"100%",objectFit:"cover",borderRadius:"10px",bg:"#ddd"})},i))})})})})};nz.propTypes={};var nF=i(20699);let nW={src:"/_next/static/media/fire.612dd1de.svg"},nP=e=>{var t,i,l,r,s,o,a,c,x,p,u,h;let{title:g}=e,{t:m}=(0,en.Bd)(),{data:v,refetch:j,isLoading:A,isFetching:f}=(0,nF.A)("","",""),[b,w]=(0,d.useState)(!1),y=(0,td.Z)()?(0,td.Z)():"ltr",T={dots:!1,infinite:(null==v||null==(t=v.stores)?void 0:t.length)>3,slidesToShow:4,slidesToScroll:1,initialSlide:0,autoplay:!0,speed:800,autoplaySpeed:4e3,variableHeight:!0,...tD(b,{displayNoneOnMobile:!0,variant:"primary",noBackground:!0}),responsive:[{breakpoint:2e3,settings:{slidesToShow:4,slidesToScroll:1,infinite:(null==v||null==(i=v.stores)?void 0:i.length)>4}},{breakpoint:1600,settings:{slidesToShow:4,slidesToScroll:1,infinite:(null==v||null==(l=v.stores)?void 0:l.length)>4}},{breakpoint:1200,settings:{slidesToShow:4,slidesToScroll:1,infinite:(null==v||null==(r=v.stores)?void 0:r.length)>4}},{breakpoint:992,settings:{slidesToShow:3.5,infinite:(null==v||null==(s=v.stores)?void 0:s.length)>3}},{breakpoint:821,settings:{slidesToShow:3.2,infinite:(null==v||null==(o=v.stores)?void 0:o.length)>3}},{breakpoint:768,settings:{slidesToShow:2,infinite:(null==v||null==(a=v.stores)?void 0:a.length)>3}},{breakpoint:576,settings:{slidesToShow:1,infinite:(null==v||null==(c=v.stores)?void 0:c.length)>2}},{breakpoint:480,settings:{slidesToShow:1,infinite:(null==v||null==(x=v.stores)?void 0:x.length)>1}},{breakpoint:360,settings:{slidesToShow:1,infinite:(null==v||null==(p=v.stores)?void 0:p.length)>1}}]};return(0,n.jsx)(n.Fragment,{children:(null==v||null==(u=v.stores)?void 0:u.length)>0&&(0,n.jsx)(rG,{onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),sx:{cursor:"pointer",".slick-slide":{padding:"0 5px"}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",sx:{paddingTop:{xs:"0px",sm:"20px"},borderRadius:"10px",backgroundColor:e=>(0,k.X4)(e.palette.primary.main,.1)},mb:"10px",spacing:1,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[(0,n.jsx)(eq.A,{children:(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",marginTop:{xs:"10px"},children:[f?(0,n.jsx)(eI.A,{variant:"text",width:"110px"}):(0,n.jsxs)(S.A,{direction:"row",spacing:1,alignItems:"center",children:[(0,n.jsx)(B.A,{src:nW.src,width:"26px",height:"26px"}),(0,n.jsx)(ts.A,{text:g||m("Special Offer")})]}),f?(0,n.jsx)(eI.A,{width:"100px",variant:"80px"}):(0,n.jsx)(tU(),{href:{pathname:"/store/top-offer-nearby"},children:(0,n.jsx)(Y.A,{sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"},padding:{xs:"0px 0px",md:"9px 16px"}},children:m("See all")})})]})}),(0,n.jsx)(tc.r,{direction:y,children:(0,n.jsx)(Z.iv,{sx:{padding:{xs:"10px 10px 10px 10px",md:"5px 20px 20px 20px"}},children:(0,n.jsx)(n.Fragment,{children:f?(0,n.jsx)(eH.A,{...T,children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eT.A,{},t))}):(0,n.jsx)(Z.Z7,{children:(0,n.jsx)(eH.A,{...T,children:null==v||null==(h=v.stores)?void 0:h.map((e,t)=>(0,n.jsx)(np.A,{item:e,specialCard:"true",topoffer:!0,imageUrl:null==e?void 0:e.cover_photo_full_url},t))})})})})})]})})})},nO=async()=>{let{data:e}=await h.A.get("".concat(u.Yv));return e};var nZ=i(70200);let nH=(0,l.Ay)(Z.iv)(e=>{let{theme:t}=e;return{"& .slick-slide":{padding:"0 10px"},[t.breakpoints.down("sm")]:{"& .slick-slide":{padding:"0px"}}}}),nN=(0,l.Ay)(nI.A)(e=>{let{theme:t}=e;return{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px",paddingBottom:"12px",borderBottom:"2px solid ".concat((0,k.X4)(t.palette.primary.main,.12))}}),nV=(0,l.Ay)(S.A)(e=>{let{theme:t}=e;return{flexDirection:"row",alignItems:"center",gap:"10px"}}),nX=(0,l.Ay)(nI.A)(e=>{let{theme:t}=e;return{width:"38px",height:"38px",borderRadius:"10px",background:"linear-gradient(135deg, ".concat(t.palette.primary.main,", ").concat((0,k.X4)(t.palette.primary.main,.7),")"),display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",flexShrink:0,boxShadow:"0 4px 12px ".concat((0,k.X4)(t.palette.primary.main,.3))}}),nq=(0,l.Ay)(nI.A)(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",gap:"4px",color:t.palette.primary.main,cursor:"pointer",fontSize:"13px",fontWeight:500,padding:"6px 12px",borderRadius:"20px",border:"1px solid ".concat((0,k.X4)(t.palette.primary.main,.3)),transition:"all 0.2s ease",whiteSpace:"nowrap","&:hover":{background:(0,k.X4)(t.palette.primary.main,.08),borderColor:t.palette.primary.main}}}),nY=()=>{var e,t;let i,l=(0,d.useRef)(null),[s,o]=(0,d.useState)(!1);(0,X.A)();let{data:a,isLoading:c}=(0,p.useQuery)(["recommend-stores",(0,W.c)()],()=>nO(i),{cacheTime:3e5,onError:g.P1}),x={dots:!1,infinite:!1,speed:500,slidesToShow:4,slidesToScroll:1,...tD(s,{displayNoneOnMobile:!0,variant:"primary"}),responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:1,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:1,infinite:!1}},{breakpoint:760,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:695,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2,infinite:!1}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2,infinite:!1}},{breakpoint:480,settings:{slidesToShow:1.4,slidesToScroll:1,initialSlide:1,infinite:!1}},{breakpoint:340,settings:{slidesToShow:1.2,slidesToScroll:1,initialSlide:1,infinite:!1}}]},u=(0,n.jsx)(nH,{sx:{"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"},paddingY:"10px"}},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:c?(0,n.jsx)(eH.A,{...x,children:[...Array(6)].map((e,t)=>(0,n.jsx)(eT.A,{width:290},t))}):(0,n.jsx)(n.Fragment,{children:(null==a||null==(e=a.stores)?void 0:e.length)>0&&(0,n.jsx)(eH.A,{...x,ref:l,children:null==a||null==(t=a.stores)?void 0:t.map((e,t)=>(0,n.jsx)(np.A,{imageUrl:null==e?void 0:e.cover_photo_full_url,item:e},t))})})});return(0,n.jsx)(rG,{sx:{paddingTop:"5px",gap:"1rem"},children:(()=>{var e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(nN,{children:[(0,n.jsxs)(nV,{children:[(0,n.jsx)(nX,{children:(0,n.jsx)(nZ.A,{size:18})}),(0,n.jsx)(nI.A,{children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eI.A,{variant:"text",width:"150px",height:"28px"}),(0,n.jsx)(eI.A,{variant:"text",width:"200px",height:"18px"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{variant:"h6",fontWeight:"700",sx:{color:"text.primary",lineHeight:1.2,fontSize:{xs:"15px",sm:"18px"}},children:(0,E.t)("Recommended Store")}),(0,n.jsx)(r.A,{variant:"caption",sx:{color:"text.secondary",fontSize:{xs:"11px",sm:"12px"},display:"block",mt:"2px"},children:(0,E.t)("Handpicked stores you might love")})]})})]}),!c&&(null==a||null==(e=a.stores)?void 0:e.length)>0&&(0,n.jsx)(tU(),{href:"/stores",passHref:!0,children:(0,n.jsxs)(nq,{children:[(0,E.t)("View All"),(0,n.jsx)(ta.A,{size:14})]})})]}),u]})})()})},nQ=["All","Beauty","Bread & Juice","Drinks","Milks"],nG=e=>{let{configData:t}=e,i=(0,x.g)(),[l,r]=(0,d.useState)(!1),[s,o]=d.useState([]),{orderDetailsModalOpen:a,orderInformation:p}=(0,c.d4)(e=>e.utilsData),{data:u,refetch:h,isLoading:g}=eX(),{data:m,refetch:v,isFetching:j,isLoading:A}=eS(),{data:f,refetch:b,isFetching:w,isLoading:y}=ew({type:"all"});(0,d.useEffect)(()=>{var e;((null==m?void 0:m.length)>0||(null==f||null==(e=f.stores)?void 0:e.length)>0)&&((null==m?void 0:m.length)>0&&m?(o(m),r(!0)):(null==f?void 0:f.stores)&&o(null==f?void 0:f.stores))},[m,null==f?void 0:f.stores,(0,ef.E)()]);let S=(0,G.A)("(max-width:600px)");return(0,n.jsxs)(U.Ay,{container:!0,spacing:1,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sx:{marginTop:{xs:"-10px",sm:"10px"}},children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(ig,{configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nY,{})})}),i&&(0,n.jsx)(U.Ay,{item:!0,xs:12,mb:3,children:S?(0,n.jsx)(nL,{configData:t,isVisited:l,visitedStores:s,isLoading:A||y}):(0,n.jsx)(eq.A,{children:(0,n.jsx)(nL,{configData:t,isVisited:l,visitedStores:s,isFetching:w||j,isLoading:A||y})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,mb:3,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(eN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(i1,{title:"Most Popular Items",subTitle:"We provide best quality & fresh grocery items near your location"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nz,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nn,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nP,{title:"Top offers near me"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(e7,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(tz,{menus:nQ,title:"Best Reviewed Items",bannerIsLoading:g,info:u})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,mt:"10px",children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nt,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(iA,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,mb:2,children:S?(0,n.jsx)(tV,{}):(0,n.jsx)(eq.A,{children:(0,n.jsx)(tV,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(iN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(e2,{bannerData:u})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nE,{})})}),a&&!i&&(0,n.jsx)(e0,{orderDetailsModalOpen:a,orderInformation:p})]})};nG.propTypes={};var nJ=i(26501),nU=i(77930);let nK=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{cursor:"pointer",borderRadius:"10px",width:"100%",height:"230px",position:"relative",overflow:"hidden","&:hover img":{transform:"scale(1.1)"},[t.breakpoints.down("md")]:{height:"200px"},[t.breakpoints.down("sm")]:{height:"150px"}}}),n$=()=>{let e=(0,o.useRouter)(),{selectedModule:t}=(0,c.d4)(e=>e.utilsData),{banners:i}=(0,c.d4)(e=>e.storedData),{data:l,refetch:r,isFetched:s}=e3(),[a,x]=(0,d.useState)([]),[p,u]=(0,d.useState)(),[h,g]=(0,d.useState)(!1),{configData:m}=(0,c.d4)(e=>e.configData),v=(0,c.wA)();(0,d.useEffect)(()=>{0===i.campaigns.length&&r()},[i]),(0,d.useEffect)(()=>{(null==l?void 0:l.campaigns)&&v((0,e4.Yw)(l))},[l]),(0,d.useEffect)(()=>{i.banners.length>0&&j()},[i]);let j=()=>{var e,t;let n=[];(null==i||null==(e=i.banners)?void 0:e.length)>0&&(null==i||null==(t=i.banners)||t.forEach(e=>n.push(e))),x(n)},A={dots:!1,infinite:!0,slidesToShow:(()=>{switch((0,W.c)()){case P.A.GROCERY:if(a.length>1)return 2;return 1;case P.A.PHARMACY:if(1===a.length)return 1;if(2===a.length)return 2;return 3;case P.A.ECOMMERCE:if(a.length>1)return a.length;return 1}})(),slidesToScroll:1,autoplay:!0,speed:800,autoplaySpeed:4e3,cssEase:"linear",responsive:[{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1}}]};return(0,n.jsxs)(n.Fragment,{children:[s?(null==a?void 0:a.length)>0&&(0,n.jsx)(Z.jB,{sx:{mt:"30px","& .slick-list":{marginRight:{xs:"-10px",sm:"-20px"}},"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"}}},children:(0,n.jsx)(eH.A,{...A,children:a.map((i,l)=>(0,n.jsx)(nK,{onClick:()=>(i=>{var n,l,r,s,o,a,d;(null==i?void 0:i.type)==="default"&&e.push(null==i?void 0:i.link),(null==i?void 0:i.type)==="store_wise"?e.push({pathname:"/store/[id]",query:{id:"".concat((null==i||null==(n=i.store)?void 0:n.slug)?null==i||null==(l=i.store)?void 0:l.slug:null==i||null==(r=i.store)?void 0:r.id),module_id:"".concat((0,ef.E)()),store_zone_id:"".concat(null==i||null==(s=i.store)?void 0:s.zone_id)}},void 0,{shallow:!0}):(null==i?void 0:i.type)==="item_wise"&&((null==t?void 0:t.module_type)==="food"?(u(null==i?void 0:i.item),g(!0)):e.push({pathname:"/product/[id]",query:{id:"".concat((null==i||null==(o=i.item)?void 0:o.slug)?null==i||null==(a=i.item)?void 0:a.slug:null==i||null==(d=i.item)?void 0:d.id),module_id:"".concat((0,ef.E)())}},void 0,{shallow:!0}))})(i),children:(0,n.jsx)(B.A,{src:null==i?void 0:i.image_full_url,alt:null==i?void 0:i.title,height:"100%",width:"100%",objectfit:"cover",borderRadius:"10px"})},l))})}):(0,n.jsx)(Z.jB,{sx:{mt:"30px","& .slick-list":{marginRight:{xs:"-10px",sm:"-20px"}},"& .slick-slide":{paddingRight:{xs:"10px",sm:"20px"}}},children:(0,n.jsx)(eH.A,{...A,children:[void 0,void 0].map((e,t)=>(0,n.jsx)(nK,{children:(0,n.jsx)(eI.A,{variant:"rectangular",height:"100%",width:"100%"})},t))})}),h&&p&&(0,n.jsx)(e6.A,{product:p,image:"".concat((0,eg.VG)(null==p?void 0:p.storage,"item_image_url",m),"/").concat(null==p?void 0:p.image),open:h,handleModalClose:()=>{g(!1)},setOpen:g})]})};n$.propTypes={};let n0=async e=>{let{categoryId:t,page_limit:i,offset:n,type:l}=e,{data:r}=await h.A.get("".concat(u.JP,"/").concat(t,"?limit=").concat(i,"&offset=").concat(n,"&type=").concat(l));return r},n1=(0,l.Ay)(s.A)(e=>{let{theme:t,isdisabled:i,left:n}=e;return{zIndex:1,right:"true"!==n&&0,left:"true"==n&&0,background:"rgba(255, 255, 255, 0.6)",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.1)",width:"40px",height:"40px",borderRadius:"50%",color:t.palette.neutral[800],display:i?"none":"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.palette.neutral[800]},[t.breakpoints.down("sm")]:{display:"none"}}}),n2=e=>{let{onClick:t,className:i}=e;return(0,n.jsx)(n1,{className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,td.Z)()?(0,n.jsx)(to.A,{}):(0,n.jsx)(ta.A,{})})},n5=e=>{let{onClick:t,className:i}=e;return(0,n.jsx)(n1,{className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),left:"true",children:"rtl"===(0,td.Z)()?(0,n.jsx)(ta.A,{}):(0,n.jsx)(to.A,{})})},n3={dots:!1,infinite:!1,speed:300,slidesPerRow:1,rows:3,slidesToShow:2,slidesToScroll:1,autoplay:!0,cssEase:"linear",responsive:[{breakpoint:500,settings:{slidesToShow:1.2,slidesPerRow:1,rows:3,slidesToScroll:1}},{breakpoint:700,settings:{slidesToShow:1.5,slidesPerRow:2,rows:3,slidesToScroll:2}},{breakpoint:750,settings:{slidesToShow:2,slidesPerRow:2,rows:3,slidesToScroll:2}},{breakpoint:900,settings:{slidesToShow:1,slidesPerRow:2,rows:3,slidesToScroll:1}},{breakpoint:1150,settings:{slidesToShow:2,slidesPerRow:2,rows:3,slidesToScroll:3}},{breakpoint:1300,settings:{slidesToShow:2,slidesPerRow:2,rows:3,slidesToScroll:1}}],prevArrow:(0,n.jsx)(n5,{}),nextArrow:(0,n.jsx)(n2,{})},n4=e=>{var t,i,l;let r=(0,b.u)(),s=(0,G.A)(r.breakpoints.down("md")),o=(0,p.useQueryClient)(),{title:a}=e,[c,x]=(0,d.useState)(0),[u,h]=(0,d.useState)(null),{t:m}=(0,en.Bd)(),[v,j]=(0,d.useState)([]),{data:A,refetch:f,isLoading:w}=function(e,t){return(0,p.useQuery)(["categories-details-items",e.categoryId,e.page_limit,e.offset,e.type],()=>n0(e),{enabled:!!e.categoryId,onError:g.P1,staleTime:6e4,cacheTime:6e4,onSuccess:t})}({categoryId:u,page_limit:"20",offset:1,type:"all"},e=>{j(e)}),{data:y,refetch:S}=(0,tX.M)(e=>{if(e){var t;h(null==e||null==(t=e.data[0])?void 0:t.id)}}),k=null==y||null==(t=y.data)?void 0:t.filter(e=>1===e.featured),T=(0,d.useCallback)(()=>{let e=o.getQueryState("[categories-details-items-".concat(u,"]"));!e||e.isStale?f():j(null==e?void 0:e.data)},[v]);return(0,d.useEffect)(()=>{T()},[u]),(0,n.jsx)(n.Fragment,{children:(null==k?void 0:k.length)>0&&(0,n.jsxs)(rG,{sx:{marginTop:"30px",marginBottom:"20px"},children:[(0,n.jsx)(ts.A,{text:a,textAlign:"flex-start",component:"h2"}),(0,n.jsx)(Z.yw,{sx:{marginY:"10px"}}),(0,n.jsxs)(U.Ay,{container:!0,spacing:3,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:0,md:3,children:(0,n.jsx)(tj.A,{orientation:s?"horizontal":"vertical",variant:s&&"scrollable",scrollButtons:!0,children:null==k?void 0:k.map((e,t)=>(0,n.jsx)(tA.A,{textAlign:"flex-start",sx:{alignItems:"flex-start",marginLeft:s?"24px !important":"0px !important",fontSize:c===t?"700":"400",color:c===t?"primary.main":"text.secondary",cursor:"pointer"},onClick:()=>{var i;return i=null==e?void 0:e.id,void(x(t),h(i))},label:null==e?void 0:e.name},t))})}),(0,n.jsxs)(U.Ay,{item:!0,xs:12,sm:12,md:9,sx:{margin:{xs:"-4px",md:"-7.5px"},opacity:w?".5":"",transition:"all ease .3s",position:"relative","&::before":{position:"absolute",inset:"0",content:'""',zIndex:"999",display:w?"block":"none"}},children:[w?(0,n.jsx)(Z.jB,{sx:{height:"100%",position:"absolute",inset:"0",zIndex:"9999"},alignItems:"center",justifyContent:"center",children:(0,n.jsx)(nu.A,{})}):null,(0,n.jsxs)(Z.iv,{children:[(0,n.jsx)(Z.Z7,{nopadding:"true",children:(0,n.jsx)(eH.A,{...n3,children:null==v||null==(i=v.products)?void 0:i.map((e,t)=>(0,n.jsx)(te.Ay,{item:e,cardheight:"150px",cardWidth:"100%",horizontalcard:"true",cardFor:"popular items"},t))})}),(null==v||null==(l=v.products)?void 0:l.length)===0&&(0,n.jsx)(Z.jB,{sx:{height:"100%",padding:"2rem"},alignItems:"center",justifyContent:"center",children:(0,n.jsx)(nh.A,{text:"Items Not Found!",isItems:!0})})]})]})]})]})})};n4.propTypes={};let n6=async()=>{let{data:e}=await h.A.get(u.Qp);return e},n8=e=>{let{count:t}=e;return(0,n.jsx)(S.A,{display:"flex",flexDirection:"row",gap:"10px",children:[...Array(t)].map((e,t)=>(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"50px"},t))})},n7=e=>{let{selectedMenuIndex:t,setSelectedMenuIndex:i,menus:l}=e,r=(0,X.A)(),s=(0,G.A)(r.breakpoints.down("md")),[o,a]=d.useState(null),c=e=>{a(null),i(e)};return(0,n.jsx)("div",{children:s?(0,n.jsxs)("div",{children:[(0,n.jsx)(n9,{onClick:e=>{a(e.currentTarget)},variant:"outlined",children:(0,n.jsx)(tg.A,{fontSize:"small"})}),(0,n.jsx)(tm.A,{id:"basic-menu",anchorEl:o,open:!!o,onClose:c,MenuListProps:{"aria-labelledby":"basic-button"},children:l.map((e,i)=>(0,n.jsx)(tv.A,{onClick:()=>c(i),selected:i===t,children:(0,E.t)(e)},i))})]}):(0,n.jsx)(tj.A,{variant:"scrollable",scrollButtons:"auto",children:l.map((e,l)=>(0,n.jsx)(tA.A,{sx:{cursor:"pointer",ml:3*(0!=l),transition:"all ease 0.3s",color:t===l?"primary.main":"inherit","&:hover":{color:"primary.main"}},onClick:()=>i(l),label:(0,E.t)(e),value:(0,E.t)(e)},l))})})},n9=(0,l.Ay)(Y.A)(e=>{let{theme:t}=e;return{height:"30px",minWidth:"0px",width:"30px",border:"1px solid ".concat(t.palette.primary.main)}});n7.propTypes={};var le=i(73884);let lt=e=>{let{bannerData:t}=e,[i,l]=(0,d.useState)([]),[s,o]=(0,d.useState)([]),a=(null==t?void 0:t.new_arrival_section_banner)?8:10,[c,x]=(0,d.useState)(0),{data:u,refetch:h,isLoading:m}=(0,p.useQuery)("new-arrivals",()=>n6(),{enabled:!1,onError:g.P1}),v=(0,X.A)(),j=(0,G.A)(v.breakpoints.down("sm")),A=(0,G.A)(v.breakpoints.only("sm"));(0,d.useEffect)(()=>{h()},[]),(0,d.useEffect)(()=>{if(u){var e;l(["All",...null==u||null==(e=u.categories)?void 0:e.map(e=>e.name)]),o(null==u?void 0:u.products)}},[u]),(0,d.useEffect)(()=>{if(0==c)o(null==u?void 0:u.products);else{var e;o(null==u||null==(e=u.products)?void 0:e.filter((e,t)=>{var i;return e.category_id===(null==(i=u.categories[c-1])?void 0:i.id)}))}},[c]);let f=()=>(0,n.jsx)(nI.A,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2,pb:"12px",borderBottom:"2px solid ".concat((0,k.X4)(v.palette.primary.main,.12))},children:(0,n.jsxs)(S.A,{direction:"row",alignItems:"center",gap:"10px",children:[(0,n.jsx)(nI.A,{sx:{width:38,height:38,borderRadius:"10px",background:"linear-gradient(135deg, ".concat(v.palette.primary.main,", ").concat((0,k.X4)(v.palette.primary.main,.7),")"),display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",flexShrink:0,boxShadow:"0 4px 12px ".concat((0,k.X4)(v.palette.primary.main,.3))},children:(0,n.jsx)(le.A,{size:18})}),(0,n.jsx)(nI.A,{children:m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eI.A,{variant:"text",width:"130px",height:"28px"}),(0,n.jsx)(eI.A,{variant:"text",width:"190px",height:"18px"})]}):(null==u?void 0:u.products)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{variant:"h6",fontWeight:"700",sx:{color:"text.primary",lineHeight:1.2,fontSize:{xs:"15px",sm:"18px"}},children:"What's New"}),(0,n.jsx)(r.A,{variant:"caption",sx:{color:"text.secondary",fontSize:{xs:"11px",sm:"12px"},display:"block",mt:"2px"},children:"Fresh arrivals just for you"})]}):null})]})});return(0,n.jsx)(n.Fragment,{children:(()=>{var e,l;return j?(0,n.jsx)(rG,{justifyContent:"center",alignItems:"center",mt:"30px",children:(0,n.jsxs)(U.Ay,{container:!0,spacing:2.5,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:12,children:[(0,n.jsx)(f,{}),(0,n.jsx)(li,{sx:{mt:1},children:m?(0,n.jsx)(eI.A,{variant:"rectangular",width:"50px"}):(null==i?void 0:i.length)>0&&(0,n.jsx)(n7,{selectedMenuIndex:c,setSelectedMenuIndex:x,menus:i})})]}),(0,n.jsx)(U.Ay,{item:!0,xs:12,container:!0,spacing:2,children:(null==s?void 0:s.length)>0&&(null==s?void 0:s.slice(0,4).map(e=>(0,n.jsx)(U.Ay,{item:!0,xs:6,children:(0,n.jsx)(te.Ay,{item:e,cardheight:j?"240px":"290px",cardFor:"vertical",noMargin:!0})},null==e?void 0:e.id)))})]})}):(0,n.jsxs)(rG,{justifyContent:"center",alignItems:"center",mt:"30px",children:[(0,n.jsxs)(nI.A,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2,pb:"12px",borderBottom:"2px solid ".concat((0,k.X4)(v.palette.primary.main,.12)),flexWrap:"wrap",gap:1},children:[(0,n.jsxs)(S.A,{direction:"row",alignItems:"center",gap:"10px",children:[(0,n.jsx)(nI.A,{sx:{width:38,height:38,borderRadius:"10px",background:"linear-gradient(135deg, ".concat(v.palette.primary.main,", ").concat((0,k.X4)(v.palette.primary.main,.7),")"),display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",flexShrink:0,boxShadow:"0 4px 12px ".concat((0,k.X4)(v.palette.primary.main,.3))},children:(0,n.jsx)(le.A,{size:18})}),(0,n.jsx)(nI.A,{children:m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eI.A,{variant:"text",width:"130px",height:"28px"}),(0,n.jsx)(eI.A,{variant:"text",width:"190px",height:"18px"})]}):(null==u?void 0:u.products)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{variant:"h6",fontWeight:"700",sx:{color:"text.primary",lineHeight:1.2,fontSize:{xs:"15px",sm:"18px"}},children:"What's New"}),(0,n.jsx)(r.A,{variant:"caption",sx:{color:"text.secondary",fontSize:{xs:"11px",sm:"12px"},display:"block",mt:"2px"},children:"Fresh arrivals just for you"})]}):null})]}),(0,n.jsx)(li,{children:m?(0,n.jsx)(n8,{count:5}):(null==i?void 0:i.length)>0&&(null==u||null==(e=u.categories)?void 0:e.length)>0&&(0,n.jsx)(n7,{selectedMenuIndex:c,setSelectedMenuIndex:x,menus:i})})]}),(0,n.jsx)(nI.A,{sx:{width:"100%",mt:".3rem"},children:(0,n.jsx)(Z.jB,{children:(0,n.jsxs)(U.Ay,{container:!0,spacing:2,children:[(null==t?void 0:t.new_arrival_section_banner)&&(0,n.jsx)(U.Ay,{item:!0,sm:4,md:2.4,children:(0,n.jsx)(Z.iv,{sx:{position:"relative",height:"100%","&:hover":{img:{transform:"scale(1.02)"}}},children:m?(0,n.jsx)(eI.A,{variant:"rectangular",animation:"wave",height:"100%",width:"100%"}):(0,n.jsx)(B.A,{width:"100%",height:"100%",objectfit:"contain",src:null==t?void 0:t.new_arrival_section_banner_full_url})})}),m?(0,n.jsx)(U.Ay,{item:!0,sm:12,md:9.6,container:!0,spacing:2,children:[...Array(8)].map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,sm:4,md:3,children:(0,n.jsx)(tr,{marginBottom:"10px"})},t))}):(0,n.jsx)(U.Ay,{item:!0,container:!0,sm:12,md:(null==t?void 0:t.new_arrival_section_banner)?9.6:12,spacing:2,children:(null==s||null==(l=s.slice(0,a))?void 0:l.length)>0&&(e=>{var t,i;return A?null==e||null==(t=e.slice)?void 0:t.call(e,0,6):null==e||null==(i=e.slice)?void 0:i.call(e,0,8)})(s).map(e=>(0,n.jsx)(U.Ay,{item:!0,sm:4,md:(null==t?void 0:t.new_arrival_section_banner)?3:2.3,children:(0,n.jsx)(te.Ay,{item:e,cardheight:"300px",cardFor:"vertical",noMargin:!0})},null==e?void 0:e.id))})]})})})]})})()})},li=(0,w.A)(nI.A)({".MuiTypography-root":{whiteSpace:"pre"},position:"relative",zIndex:"3"});lt.propTypes={};var ln=i(93095);let ll=e=>{let{configData:t}=e,{orderDetailsModalOpen:i}=(0,c.d4)(e=>e.utilsData),[l,r]=d.useState([]),[s,o]=(0,d.useState)(!1),a=(0,x.g)(),{data:p,refetch:u,isLoading:h}=eX(),{data:g,refetch:m,isFetching:v}=eS(),{data:j,refetch:A,isFetching:f}=ew({type:"all"});return(0,d.useEffect)(()=>{(async()=>{try{await u(),a&&await m(),A()}catch(e){console.error("Error fetching data:",e)}})()},[a]),(0,d.useEffect)(()=>{var e;((null==g?void 0:g.length)>0||(null==j||null==(e=j.stores)?void 0:e.length)>0)&&((null==g?void 0:g.length)>0&&g?(r(g),o(!0)):(null==j?void 0:j.stores)&&r(null==j?void 0:j.stores))},[g,null==j?void 0:j.stores,(0,ef.E)()]),(0,n.jsxs)(U.Ay,{container:!0,gap:1,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sx:{marginTop:{xs:"-10px",sm:"10px"}},children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(ig,{configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nY,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nz,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,er.u)()?(0,n.jsx)(nL,{configData:t,visitedStores:l,isVisited:s,isFetching:f||v}):(0,n.jsx)(eq.A,{children:(0,n.jsx)(nL,{configData:t,visitedStores:l,isVisited:s,isFetching:v||f})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(eN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(i1,{title:"Most Popular Products",subTitle:"We provide best quality & valuable products around the world"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nP,{title:"Top offers near me"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(n$,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nn,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nU.A,{title:"Popular Store",configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(tz,{menus:["All","Beauty","Bread & Juice","Drinks","Milks"],title:"Best Reviewed Items",bannerIsLoading:h,url:"".concat(null==p?void 0:p.promotional_banner_url,"/").concat(null==p?void 0:p.best_reviewed_section_banner)})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(lt,{bannerData:p})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nt,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(iA,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(n4,{title:"Featured Categories"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nJ.A,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(ln.A,{bannerData:p})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nE,{})})}),i&&!a&&(0,n.jsx)(e0,{orderDetailsModalOpen:i})]})};ll.propTypes={};let lr=e=>{let{configData:t}=e,i=(0,x.g)(),[l,r]=(0,d.useState)(!1),[s,o]=d.useState([]),{orderDetailsModalOpen:a}=(0,c.d4)(e=>e.utilsData),{data:p,refetch:u,isLoading:h}=eX(),{data:g,refetch:m,isFetching:v}=eS(),{data:j,refetch:A,isFetching:f}=ew({type:"all"});return(0,d.useEffect)(()=>{(async()=>{try{await u(),i&&await m(),A()}catch(e){console.error("Error fetching data:",e)}})()},[i]),(0,d.useEffect)(()=>{var e;((null==g?void 0:g.length)>0||(null==j||null==(e=j.stores)?void 0:e.length)>0)&&((null==g?void 0:g.length)>0&&g?(o(g),r(!0)):(null==j?void 0:j.stores)&&o(null==j?void 0:j.stores))},[g,null==j?void 0:j.stores,(0,ef.E)()]),(0,n.jsxs)(U.Ay,{container:!0,gap:1,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sx:{marginTop:{xs:"-10px",sm:"10px"}},children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(ig,{configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nY,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,er.u)()?(0,n.jsx)(nL,{configData:t,visitedStores:s,isVisited:l,isFetching:f||v}):(0,n.jsx)(eq.A,{children:(0,n.jsx)(nL,{configData:t,isVisited:l,visitedStores:s,isFetching:f||v})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(eN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nn,{title:"Special Food Offers"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nP,{title:"Top offers near me"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(e7,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(tz,{title:"Best Reviewed Items",info:p})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(iA,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(iN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nt,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(n4,{title:"Featured Categories"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nE,{})})}),a&&!i&&(0,n.jsx)(e0,{orderDetailsModalOpen:a})]})};lr.propTypes={};let ls=(0,l.Ay)(nI.A)(e=>{let{theme:t}=e;return{position:"relative",width:"100%",overflow:"hidden"}}),lo={dots:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,autoplay:!0,dot:!0},la=()=>{var e;let{data:t,refetch:i,isLoading:l}=eX();return(0,d.useEffect)(()=>{i()},[]),(0,n.jsx)(n.Fragment,{children:l?(0,n.jsx)(eI.A,{width:"100%",height:"370px"}):(0,n.jsx)(n.Fragment,{children:t&&(0,n.jsx)(ls,{children:(0,n.jsx)(Z.Z7,{children:(0,n.jsx)(eH.A,{...lo,children:null==t||null==(e=t.banners)?void 0:e.map((e,t)=>(0,n.jsx)(S.A,{children:(0,n.jsx)(B.A,{src:e.value_full_url,objectfit:"contain",aspectRatio:"4/1"})},t))})})})})})},ld=async()=>{let{data:e}=await h.A.get(u.Pu);return e},lc=()=>{let e=(0,X.A)(),t=(0,G.A)(e.breakpoints.down("md"));return(0,n.jsxs)(S.A,{padding:"0 10px 0 10px",children:[(0,n.jsx)(eI.A,{variant:"rectangular",animation:"pulse",width:t?140:180,height:t?130:150}),(0,n.jsxs)(tl,{padding:"1rem",spacing:1,children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"120%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"40%"})]})]})},lx=e=>{let{width:t}=e;return(0,n.jsx)("svg",{preserveAspectRatio:"none",viewBox:"0 0 767 97",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{opacity:"0.2",children:[(0,n.jsx)("path",{d:"M767.001 0L761.799 0.131448V0.151672L767.001 0Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M751.459 0.71875L741.285 1.79058L741.327 1.87148L751.479 0.779421L751.459 0.71875Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M731.383 3.37891C728.145 3.99572 724.99 4.69342 721.899 5.48212L722.045 5.62369C725.095 4.83498 728.249 4.11705 731.467 3.49013L731.383 3.37891Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M712.935 8.05859L704.537 11.0415L704.83 11.2134L713.165 8.22038L712.935 8.05859Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M696.641 14.3398L689.183 17.8688L689.642 18.071L697.017 14.532L696.641 14.3398Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M682.102 21.5586L675.271 25.3707L675.856 25.6032L682.604 21.7811L682.102 21.5586Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M668.605 29.2422L662.067 33.1554L662.777 33.4385L669.253 29.495L668.605 29.2422Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M655.55 37.0898L649.032 41.0233L649.847 41.3367L656.302 37.3831L655.55 37.0898Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M642.472 44.9258L635.829 48.8087L636.685 49.1423L643.308 45.2595L642.472 44.9258Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M629.101 52.6406L622.228 56.4224L623.085 56.7965L629.937 52.9945L629.101 52.6406Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M615.229 60.1445L608.085 63.8049L608.941 64.1993L616.086 60.5288L615.229 60.1445Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M600.795 67.3828L593.274 70.8511L594.131 71.296L601.651 67.8075L600.795 67.3828Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M585.482 74.1797L577.418 77.3446L578.212 77.8401L586.317 74.6448L585.482 74.1797Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M569.082 80.3359L560.496 83.1571L561.227 83.7031L569.855 80.8617L569.082 80.3359Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M551.619 85.7656L542.511 88.152L543.138 88.7587L552.309 86.342L551.619 85.7656Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M533.11 90.2969L523.479 92.1473L523.981 92.8046L533.674 90.9238L533.11 90.2969Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M513.618 93.6758L503.548 94.8487L503.841 95.5565L514.015 94.3634L513.618 93.6758Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M493.311 95.6172L482.991 95.9408L483.033 96.689L493.479 96.3452L493.311 95.6172Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M472.652 95.8282L462.291 95.4844L462.144 96.2529L472.569 96.5865L472.652 95.8282Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M451.97 94.9364L441.712 94.168L441.42 94.9466L451.761 95.715L451.97 94.9364Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M431.559 93.1387L421.552 91.8242L421.071 92.6129L431.183 93.9173L431.559 93.1387Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M411.733 90.2346L402.145 88.3438L401.434 89.1122L411.148 91.0132L411.733 90.2346Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M392.808 86.1713L383.72 83.7344L382.822 84.4826L391.993 86.9297L392.808 86.1713Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M374.905 81.0845L366.319 78.2734L365.254 79.0015L373.923 81.8226L374.905 81.0845Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M357.856 75.34L349.458 72.3672L348.351 73.1053L356.749 76.0782L357.856 75.34Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M346.589 70.9425C343.748 69.9617 340.928 68.9808 338.17 68L337 68.7483C339.82 69.7493 342.661 70.72 345.482 71.6907L346.589 70.9425Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M336.32 68.0117L329.154 71.6418L330.303 72.1979L337.531 68.5476L336.32 68.0117Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M321.612 75.0898L313.695 78.3256L314.656 78.9222L322.678 75.6662L321.612 75.0898Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M305.316 81.2656L300.929 82.57L296.396 83.7935L297.127 84.4407L301.681 83.2172L306.173 81.8926L305.316 81.2656Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M287.227 86.1719L277.951 88.4268L278.599 89.0739L287.916 86.819L287.227 86.1719Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M268.528 90.5391L258.94 92.4502L259.441 93.0973L269.113 91.1761L268.528 90.5391Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M249.142 94.0898C245.841 94.5752 242.499 94.9898 239.115 95.3032L239.365 95.9605C242.812 95.6572 246.197 95.2325 249.539 94.7471L249.142 94.0898Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M228.858 95.807L218.497 95.7969L218.434 96.4339L228.9 96.4642L228.858 95.807Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M208.197 95.3103C204.792 95.0576 201.408 94.7239 198.065 94.2891L197.731 94.8856C201.115 95.3306 204.541 95.6744 207.988 95.9373L208.197 95.3103Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M188.288 92.6919C185.092 92.065 182 91.3269 178.992 90.5078L178.386 91.0235C181.415 91.8628 184.57 92.611 187.808 93.2481L188.288 92.6919Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M170.343 87.7686C167.585 86.7675 164.953 85.6856 162.425 84.543L161.61 84.9575C164.138 86.1204 166.812 87.2226 169.612 88.2337L170.343 87.7686Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M155.281 80.9249L148.763 77.0117L147.865 77.3353L154.404 81.2889L155.281 80.9249Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M142.746 72.9169C140.803 71.5316 138.756 70.1564 136.771 68.7812L135.894 69.0846C137.879 70.4598 139.905 71.8249 141.848 73.2203L142.746 72.9169Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M130.463 64.7438L123.757 60.8711L123.026 61.1846L129.627 65.0674L130.463 64.7438Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M116.613 57.1817L108.926 53.7539L108.382 54.0674L115.966 57.4952L116.613 57.1817Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M100.631 50.6704C97.7688 49.7098 94.7816 48.8301 91.7106 48.0312L91.3763 48.3245C94.4264 49.1233 97.3511 50.0131 100.192 50.9737L100.631 50.6704Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M82.2061 45.9386C78.9471 45.3319 75.6255 44.8263 72.2412 44.4219L72.1158 44.6747C75.4583 45.0892 78.759 45.6049 81.9762 46.2217L82.2061 45.9386Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M62.0039 43.449C58.5569 43.2165 55.0891 43.085 51.6004 43.0547V43.2468C55.0683 43.2873 58.5152 43.4288 61.9413 43.6715L62.0039 43.449Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M41.1764 43.2695C37.7085 43.4414 34.2825 43.7144 30.8773 44.0886L30.9399 44.2099C34.3242 43.8358 37.7503 43.583 41.1973 43.4212L41.1764 43.2695Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M20.9335 45.582C17.6954 46.1988 14.5618 46.9471 11.6162 47.847L11.6789 47.8875C14.6245 47.0078 17.758 46.2696 20.9961 45.6629L20.9335 45.582Z",fill:"#1D1D1B"}),(0,n.jsx)("path",{d:"M3.40585 51.0117L0.000660879 52.9228L3.42676 51.0218L3.40585 51.0117Z",fill:"#1D1D1B"})]})})},lp={dots:!1,infinite:!1,speed:500,slidesToShow:8,slidesToScroll:1,responsive:[{breakpoint:2400,settings:{slidesToShow:3,slidesToScroll:1,infinite:!1}},{breakpoint:2e3,settings:{slidesToShow:3,slidesToScroll:1,infinite:!1}},{breakpoint:1600,settings:{slidesToShow:3,slidesToScroll:1,infinite:!1}},{breakpoint:1450,settings:{slidesToShow:3,slidesToScroll:3,infinite:!1}},{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:840,settings:{slidesToShow:3,slidesToScroll:2,infinite:!1}},{breakpoint:790,settings:{slidesToShow:3,slidesToScroll:3,infinite:!1}},{breakpoint:700,settings:{slidesToShow:2,slidesToScroll:1,initialSlide:2}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2}},{breakpoint:480,settings:{slidesToShow:1.7,slidesToScroll:1}},{breakpoint:479,settings:{slidesToShow:1.7,slidesToScroll:1}},{breakpoint:420,settings:{slidesToShow:1.7,slidesToScroll:1}}]},lu=(0,tY.A)(K.A)(e=>{let{theme:t}=e;return{"& .slick-slider":{"& .slick-list":{"& .slick-track":{"& .slick-slide":{display:"flex",justifyContent:"center"}}}}}}),lh=()=>{var e;let t=(0,b.u)(),{data:i,refetch:l,isLoading:s}=(0,p.useQuery)("why-choose",ld,{enabled:!1,onError:g.P1});return((0,d.useEffect)(()=>{l()},[]),s)?(0,n.jsxs)(Z.jB,{sx:{position:"relative"},alignItems:"center",justifyContent:"center",mt:{xs:"20px",sm:"30px",md:"50px"},children:[(0,n.jsx)(K.A,{position:"absolute",top:"50px",maxWidth:"767px",width:"100%",children:(0,n.jsx)(lx,{width:"100%"})}),(0,n.jsx)(Z.jB,{children:(0,n.jsx)(lu,{children:(0,n.jsx)(eH.A,{...lp,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(lc,{},t))})})})]}):(null==i||null==(e=i.banners)?void 0:e.length)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(Z.jB,{sx:{position:"relative"},alignItems:"center",justifyContent:"center",mt:{xs:"20px",sm:"30px",md:"50px"},children:[(0,n.jsx)(K.A,{position:"absolute",top:"50px",maxWidth:"767px",width:"100%",children:(0,n.jsx)(lx,{width:"100%"})}),(0,n.jsx)(Z.jB,{children:(0,n.jsx)(lu,{children:(0,n.jsx)(eH.A,{...lp,children:null==i?void 0:i.banners.map((e,i)=>(0,n.jsxs)(K.A,{alignItems:"center",justifyContent:"center",maxWidth:"275px",width:"100%",display:"flex !important",spacing:{xs:1,sm:2,md:3},sx:{img:{width:"100%",height:"100%",aspectRatio:"1"}},children:[(0,n.jsx)(ec.A,{src:null==e?void 0:e.image_full_url,width:140,height:122,objectFit:"cover",smWidth:"64px",smHeight:"56px"}),(0,n.jsxs)(K.A,{spacing:{xs:1,sm:1,md:0},padding:"0 10px",children:[(0,n.jsx)(r.A,{textAlign:"center",width:"100%",maxWidth:"275px",fontSize:{xs:"12px",sm:"16px",md:"22px"},fontWeight:"700",sx:{wordWrap:"break-word"},component:"h3",children:null==e?void 0:e.title}),(0,n.jsx)(r.A,{width:"100%",maxWidth:"275px",fontSize:{xs:"10px",sm:"12px",md:"14px"},color:t.palette.neutral[400],textAlign:"center",sx:{wordWrap:"break-word"},children:e.short_description})]})]},i))})})})]})}):null},lg=async()=>{let{data:e}=await h.A.get(u.Zf);return e};var lm=i(38595),lv=i(3218);let lj=()=>(0,n.jsxs)(S.A,{spacing:1,children:[(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"100%"}),(0,n.jsx)(eI.A,{variant:"text",animation:"wave",height:20,width:"40%"})]});var lA=i(38390);let lf=e=>{let{steps:t,theme:i,isLoading:l}=e,s=(0,G.A)(i.breakpoints.down("sm"));return(0,n.jsx)(K.A,{children:l?(0,n.jsx)(lA.S,{orientation:"vertical",width:s?"32px":"45px",height:s?"32px":"45px",border:"0px",color:i.palette.primary.main,marginLeft:s?"27px":"2rem",marginTop:s?".5rem":"2rem",connectorHeight:"80px",parcel:"true",children:[void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(lm.A,{children:(0,n.jsx)(lv.A,{children:(0,n.jsx)(lj,{})})},t))}):(0,n.jsx)(lA.S,{orientation:"vertical",width:s?"32px":"45px",height:s?"32px":"45px",border:"0px",color:"dark"===i.mode?i.palette.primary.light:i.palette.primary.dark,marginLeft:s?"27px":"2rem",marginTop:s?".5rem":"2rem",connectorHeight:"80px",parcel:"true",children:null==t?void 0:t.map((e,t)=>(0,n.jsx)(lm.A,{children:(0,n.jsx)(lv.A,{children:(0,n.jsxs)(K.A,{children:[(0,n.jsx)(r.A,{fontSize:{xs:"14px",sm:"16",md:"20px"},fontWeight:"600",component:"h3",children:null==e?void 0:e.label}),(0,n.jsx)(r.A,{fontSize:{xs:"12px",sm:"14px",md:"14px"},children:null==e?void 0:e.description})]})})},t))})})};var lb=i(32889),lw=i(719);let ly=(0,l.Ay)(Z.jB)(e=>{let{}=e;return{position:"relative",maxWidth:"615px",width:"100%",paddingTop:"25px"}}),lS=(0,l.Ay)(S.A)(e=>{let{theme:t,showControls:i,showIcon:n}=e;return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1,backgroundColor:(0,k.X4)(t.palette.primary.main,.7),padding:"45px",borderRadius:"100%",display:n?"inline":"none"}}),lk=(0,l.Ay)(S.A)(e=>{let{theme:t}=e;return{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10,backgroundColor:t.palette.primary.main,borderRadius:"100%"}}),lT=(0,l.Ay)(lb.A)(e=>{let{theme:t}=e;return{fontSize:"50px",color:t.palette.whiteContainer.main}}),lC=(0,l.Ay)(lw.A)(e=>{let{theme:t}=e;return{fontSize:"50px",color:t.palette.whiteContainer.main}}),l_=e=>{let{videoUrl:t}=e,i=(0,X.A)(),l=(0,G.A)(i.breakpoints.down("sm")),[r,s]=(0,d.useState)(!1),[o,a]=(0,d.useState)(!0),[c,x]=(0,d.useState)(!1);return(0,n.jsxs)(ly,{onMouseEnter:()=>{x(!0),a(!0)},onMouseLeave:()=>{r||x(!1),a(!1)},children:[(0,n.jsx)(eD(),{url:t,playing:r,controls:!0,onEnded:()=>{s(!1)},onPause:()=>{s(!1)},onPlay:()=>{s(!0)},volume:1,width:"100%"}),!l&&(0,n.jsx)(lS,{showControls:c,showIcon:o,children:(0,n.jsx)(lk,{children:(0,n.jsx)(q.A,{"aria-label":"play",onClick:()=>{s(!r)},children:r?(0,n.jsx)(lC,{}):(0,n.jsx)(lT,{})})})})]})},lR=()=>{var e,t,i,l,s,o,a;let c=(0,b.u)(),{data:x,refetch:u,isLoading:h}=(0,p.useQuery)("video-content",lg,{enabled:!1,onError:g.P1}),m=(0,G.A)(c.breakpoints.down("sm"));(0,d.useEffect)(()=>{u()},[]);let v=[{label:null==x||null==(e=x.banner_contents[0])?void 0:e.value,description:null==x||null==(t=x.banner_contents[1])?void 0:t.value},{label:null==x||null==(i=x.banner_contents[2])?void 0:i.value,description:null==x||null==(l=x.banner_contents[3])?void 0:l.value},{label:null==x||null==(s=x.banner_contents[4])?void 0:s.value,description:null==x||null==(o=x.banner_contents[5])?void 0:o.value}];return(0,n.jsxs)(Z.jB,{mt:{xs:"20px",sm:"30px",md:"50px"},children:[(0,n.jsx)(r.A,{fontSize:{xs:"16px",sm:"18px",md:"22px"},fontWeight:"700",textAlign:{xs:"center",sm:"left",md:"left"},component:"h2",children:(0,E.t)("Easiest way to get services")}),(0,n.jsxs)(U.Ay,{container:!0,alignItems:"center",spacing:2,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:12,sm:6,md:7,children:[" ",h?(0,n.jsx)(S.A,{pt:"1rem",children:(0,n.jsx)(eI.A,{variant:"rectangular",animation:"pulse",width:"80%",height:400})}):(0,n.jsx)(S.A,{children:(null==x?void 0:x.banner_type)==="video"?(0,n.jsx)(l_,{videoUrl:null==x?void 0:x.banner_video}):(null==x?void 0:x.banner_type)==="video_content"?(0,n.jsx)(l_,{videoUrl:null==x?void 0:x.banner_video_content_full_url}):(0,n.jsx)(B.A,{src:null==x?void 0:x.banner_image_full_url,width:"615px",objectfit:"contain",padding:m?"20px 0px 0px 0px":"25px 25px 0px 0px",borderRadius:"10px",smWidth:"100%",smHeight:"100%"})})]}),(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:6,md:5,pl:{xs:"5px"},children:(null==x||null==(a=x.banner_contents)?void 0:a.length)>0&&(0,n.jsx)(lf,{steps:v,theme:c,isLoading:h})})]})]})};var lE=i(26709),lI=i(14573),lB=i(586);let lM=()=>{let e=(0,b.u)(),{data:t,refetch:i,isFetched:l,isLoading:s}=(0,lE.A)();return(0,d.useEffect)(()=>{i()},[]),(0,n.jsxs)(Z.jB,{spacing:2.5,sx:{paddingBottom:{xs:"20px",sm:"30px",md:"50px"},marginTop:"80px"},children:[(0,n.jsxs)(K.A,{justifyContent:"center",spacing:{xs:1,md:0},children:[(0,n.jsx)(nB.A,{text:"We Deliver Everything",component:"h2"}),(0,n.jsx)(r.A,{textAlign:"center",color:e.palette.neutral[400],fontSize:{xs:"12px",md:"14px"},children:(0,E.t)("What are you wish to send?")})]}),(0,n.jsx)(Z.jB,{children:(0,n.jsx)(U.Ay,{container:!0,spacing:{xs:2,sm:3,md:3},children:s?(0,n.jsx)(Z.jB,{sx:{marginTop:"24px"},children:(0,n.jsx)(lB.A,{})}):(0,n.jsx)(n.Fragment,{children:t&&(null==t?void 0:t.map(e=>(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:6,md:4,children:(0,n.jsx)(lI.A,{data:e})},e.id)))})})})]})};var lL=i(77174);let lD=e=>{let{configData:t}=e,{orderDetailsModalOpen:i}=(0,c.d4)(e=>e.utilsData),l=(0,x.g)(),r=(0,c.wA)();return(0,d.useEffect)(()=>{r((0,lL.aV)(null))},[]),(0,n.jsxs)(U.Ay,{container:!0,spacing:1,children:[(0,n.jsxs)(U.Ay,{item:!0,xs:12,children:[(0,n.jsx)(eq.A,{children:(0,n.jsx)(lM,{})}),(0,n.jsx)(la,{}),(0,n.jsxs)(eq.A,{children:[(0,n.jsx)(lh,{}),(0,n.jsx)(lR,{})]})]}),i&&!l&&(0,n.jsx)(e0,{orderDetailsModalOpen:i})]})},lz=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{threshold:t=.2,rootMargin:i="0px",triggerOnce:n=!0}=e,l=(0,d.useRef)(null),[r,s]=(0,d.useState)(!1),[o,a]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!l.current)return;let e=new IntersectionObserver(t=>{let[i]=t;i.isIntersecting?(s(!0),o||a(!0),n&&e.disconnect()):s(!1)},{threshold:t,rootMargin:i});return e.observe(l.current),()=>{e.disconnect()}},[t,i,n,o]),{ref:l,isIntersecting:r,hasTriggered:o}},lF=async()=>await h.A.get("".concat(u.tM));var lW=i(90233);i(62415);let lP=async e=>{let{conditionId:t,page_limit:i,offset:n}=e,{data:l}=await h.A.get("".concat(u.e8,"/").concat(t,"?limit=").concat(i,"&offset=").concat(n));return l},lO=(0,l.Ay)(Z.Z7)(e=>{let{theme:t,active:i}=e;return{color:"true"===i?t.palette.primary.main:"inherit",cursor:"pointer","& .slick-slide":{marginY:"-25px",paddingY:"20px"},"& .slick-dots":{marginBottom:"-40px","& li":{backgroundColor:(0,k.X4)(t.palette.primary.main,.2),width:"6px",height:"6px",borderRadius:"50%","& button::before":{color:"transparent"}},"& li.slick-active button::before":{top:"-2px",backgroundColor:t.palette.primary.main,width:"10px",height:"10px",borderRadius:"50%"}}}}),lZ=e=>{var t,i,l,r;let{title:s}=e,o=(0,X.A)(),a=(0,G.A)(o.breakpoints.down("md")),[c,x]=(0,d.useState)(0),[u,h]=(0,d.useState)(null),[m,v]=(0,d.useState)([]),j=(0,p.useQueryClient)(),{data:A,refetch:f,isLoading:b,isRefetching:w}=(0,p.useQuery)("common-condition",()=>lF(),{staleTime:48e4,cacheTime:48e4,onError:g.Jm}),{data:y,refetch:S,isLoading:k,isRefetching:T}=function(e,t){return(0,p.useQuery)(["common-condition-products",null==e?void 0:e.conditionId],()=>lP(e),{enabled:!!(null==e?void 0:e.conditionId),onError:g.P1,staleTime:6e4,cacheTime:6e4,onSuccess:t})}({conditionId:u,page_limit:"20",offset:1},e=>{v(e)});(0,d.useEffect)(()=>{var e;h(null==A||null==(e=A.data[0])?void 0:e.id)},[A]),(0,d.useEffect)(()=>{f()},[]);let C=(0,d.useCallback)(()=>{let e=j.getQueryState("[common-condition-products-".concat(u,"]"));!e||e.isStale?S():v(null==e?void 0:e.data)},[m]);(0,d.useEffect)(()=>{C()},[u]);let _={dots:!0,infinite:!1,speed:500,slidesToShow:4,slidesToScroll:4,slidesPerRow:1,rows:(null==y?void 0:y.total_size)>7?2:1,autoplay:!0,responsive:[{breakpoint:1450,settings:{slidesToShow:4,slidesToScroll:3,rows:(null==y?void 0:y.total_size)>7?2:1}},{breakpoint:1250,settings:{slidesToShow:3,slidesToScroll:2,rows:(null==y?void 0:y.total_size)>3?2:1}},{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:1,rows:(null==y?void 0:y.total_size)>4?2:1}},{breakpoint:590,settings:{slidesToShow:2,slidesToScroll:1,rows:(null==y?void 0:y.total_size)>2?2:1,dots:!1}},{breakpoint:700,settings:{slidesToShow:3,slidesToScroll:1,rows:(null==y?void 0:y.total_size)>3?2:1,dots:!1}},{breakpoint:360,settings:{slidesToShow:1,slidesToScroll:1,rows:4,dots:!1}},{breakpoint:320,settings:{slidesToShow:1,slidesToScroll:1,rows:5,dots:!1}}],prevArrow:(0,n.jsx)(n5,{}),nextArrow:(0,n.jsx)(n2,{})};return(0,n.jsxs)(rG,{sx:{marginBottom:"20px"},children:[(0,n.jsx)(ts.A,{text:s,textAlign:"flex-start",component:"h2"}),(0,n.jsx)(Z.yw,{sx:{marginY:"5px"}}),(0,n.jsxs)(U.Ay,{container:!0,spacing:{xs:1,sm:1,md:3},children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:0,md:3,children:(0,n.jsx)(Z.jB,{spacing:1,children:b&&w?(0,n.jsx)(n.Fragment,{children:[...Array(8)].map((e,t)=>(0,n.jsx)(eI.A,{variant:"text",width:"".concat(Math.floor(300*Math.random()),"px")},t))}):(0,n.jsx)(lW.A,{style:{maxHeight:"50vh"},children:(0,n.jsx)(tj.A,{orientation:a?"horizontal":"vertical",variant:a&&"scrollable",scrollButtons:!0,sx:{[o.breakpoints.down("md")]:{"& .MuiTabs-root":{minHeight:"0px !important"}}},children:null==A||null==(t=A.data)?void 0:t.map((e,t)=>(0,n.jsx)(tA.A,{textAlign:"flex-start",onClick:()=>{var i;return i=e.id,void(x(t),h(i))},label:null==e?void 0:e.name,sx:{alignItems:"flex-start",marginLeft:a?"24px !important":"0px !important",fontSize:c===t?"700":"400",color:c===t?"primary.main":"text.secondary",cursor:"pointer",[o.breakpoints.down("md")]:{padding:"0px 16px !important",minHeight:"0px !important"}}},t))})})})}),(0,n.jsxs)(U.Ay,{item:!0,xs:12,sm:12,md:9,sx:{opacity:k?".5":"",transition:"all ease .3s",position:"relative","&::before":{position:"absolute",inset:"0",content:'""',zIndex:"999",display:k?"block":"none"}},children:[k?(0,n.jsx)(Z.jB,{sx:{height:"100%",position:"absolute",inset:"0",zIndex:"9999"},alignItems:"center",justifyContent:"center",children:(0,n.jsx)(nu.A,{})}):null,(0,n.jsx)(n.Fragment,{children:(null==m||null==(i=m.products)?void 0:i.length)===0?(0,n.jsx)(Z.jB,{sx:{height:"100%",padding:"2rem"},alignItems:"center",justifyContent:"center",children:(0,n.jsx)(nh.A,{text:"Items Not Found!",isItems:!0})}):(0,n.jsx)(Z.iv,{children:(0,n.jsx)(lO,{children:(0,n.jsx)(eH.A,{..._,children:(null==m||null==(l=m.products)?void 0:l.length)>0&&(null==m||null==(r=m.products)?void 0:r.map(e=>(0,n.jsx)(te.Ay,{item:e,cardheight:"340px",cardFor:"vertical",cardType:"vertical-type",noMargin:"true",pharmaCommon:!0},null==e?void 0:e.id)))})})})})]})]})]})};lZ.propTypes={};let lH=["All","New","Baby Care","Womans Care","Mens"],lN=e=>{let{configData:t}=e,i=(0,x.g)(),[l,r]=(0,d.useState)(!1),{orderDetailsModalOpen:s}=(0,c.d4)(e=>e.utilsData),[o,a]=d.useState([]),{ref:p,hasTriggered:u}=lz({threshold:.2,triggerOnce:!0}),{data:h,refetch:g,isLoading:m}=eX(),{data:v,refetch:j,isFetching:A}=eS(),{data:f,refetch:b,isFetching:w}=ew({type:"all"});return(0,d.useEffect)(()=>{var e;((null==v?void 0:v.length)>0||(null==f||null==(e=f.stores)?void 0:e.length)>0)&&((null==v?void 0:v.length)>0&&v?(a(v),r(!0)):(null==f?void 0:f.stores)&&a(null==f?void 0:f.stores))},[v,null==f?void 0:f.stores,(0,ef.E)()]),(0,n.jsxs)(U.Ay,{container:!0,gap:1,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,sx:{marginTop:"10px"},children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(ig,{configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nY,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nz,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nL,{configData:t,visitedStores:o,isVisited:l,isFetching:A||w})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(eN,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(tz,{menus:lH,title:"Basic Medicine Nearby",bannerIsLoading:m,url:"".concat(null==h?void 0:h.promotional_banner_url,"/").concat(null==h?void 0:h.basic_section_nearby)})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nP,{title:"Top offers near me"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(e7,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nU.A,{title:"Featured Store",configData:t})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nt,{})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(lZ,{title:"Common Conditions"})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,sx:{position:"sticky",top:{xs:"47px",md:"92px"},zIndex:999},children:(0,n.jsx)(eq.A,{children:(0,n.jsx)(nE,{})})}),s&&!i&&(0,n.jsx)(e0,{orderDetailsModalOpen:s})]})};lN.propTypes={};let lV=(0,l.Ay)(r.A)(e=>{let{theme:t,active:i}=e;return{fontSize:"20px",cursor:"pointer",fontWeight:"true"===i?"700":"400"}}),lX=(0,l.Ay)(s.A)(e=>{let{theme:t,active:i}=e;return{backgroundColor:"true"===i?t.palette.primary.main:"inherit",borderRadius:"10px",width:"28px",height:"3px"}}),lq=e=>{let{tabs:t,currentTab:i,setCurrentTab:l}=e;return(0,n.jsx)(K.A,{direction:"row",alignItems:"center",spacing:5,children:(null==t?void 0:t.length)>0&&t.map((e,t)=>(0,n.jsxs)(K.A,{alignItems:"center",justifyContent:"center",spacing:1,children:[(0,n.jsx)(lV,{active:i===t?"true":"false",onClick:()=>l(t,e),children:(0,E.t)(null==e?void 0:e.name)}),(0,n.jsx)(lX,{active:i===t?"true":"false"})]},t))})};lq.propTypes={};var lY=i(3864),lQ=i(57014),lG=i(31975),lJ=i(46443),lU=i(64266),lK=i(75599);let l$=e=>{let{border:t,priceRange:i,filterDataAndFunctions:l,minMax:s,setMinMax:o}=e,{filterData:a,handleCheckbox:c,handleChangeRatings:x,getRatingValue:p,currentTab:u}=l,[h,g]=d.useState(null),m=!!h,{t:v}=(0,en.Bd)(),j=null==a?void 0:a.filter(e=>(null==e?void 0:e.value)!=="price"&&(null==e?void 0:e.value)!=="ratings"&&(null==e?void 0:e.value)!=="coupon"&&(null==e?void 0:e.value)!=="free_delivery"),A=Math.ceil(j.length/2),f=j.slice(0,A+1),b=j.slice(A+1),w=null==a?void 0:a.filter(e=>(null==e?void 0:e.value)==="coupon"||(null==e?void 0:e.value)==="free_delivery"||(null==e?void 0:e.value)==="fast_delivery"&&1===u);return(0,n.jsxs)("div",{children:[(0,n.jsxs)(Y.A,{onClick:e=>{g(e.currentTarget)},variant:t?"outlined":"text",sx:{color:e=>e.palette.customColor.textGray,borderColor:e=>e.palette.customColor.textGray},children:[(0,n.jsx)(tg.A,{fontSize:"small"}),(0,er.u)()?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{children:v("Filter")}),m?(0,n.jsx)(nl.A,{}):(0,n.jsx)(nr.A,{})]})]}),m&&(0,n.jsx)(nd.A,{openPopover:m,anchorEl:h,placement:"bottom",handleClose:()=>g(null),top:"10px",left:"-230px",children:(0,n.jsx)(nj.A,{sx:{p:"25px",width:"355px"},children:(0,n.jsx)(Z.iv,{children:(0,n.jsxs)(U.Ay,{container:!0,spacing:2,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(r.A,{fontWeight:"bold",children:v("Filter By")})}),(0,n.jsx)(U.Ay,{item:!0,xs:6,children:(null==a?void 0:a.length)>0&&(null==f?void 0:f.map((e,t)=>0===u&&(null==e?void 0:e.value)==="currently_open"||0===u&&(null==e?void 0:e.value)==="nearby"?null:(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"450"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>c(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)))}),(0,n.jsx)(U.Ay,{item:!0,xs:6,children:(null==a?void 0:a.length)>0&&(null==b?void 0:b.map((e,t)=>0===u&&(null==e?void 0:e.value)==="currently_open"||(null==e?void 0:e.value)==="coupon"||(null==e?void 0:e.value)==="free_delivery"||(null==e?void 0:e.value)==="fast_delivery"||1===u&&(null==e?void 0:e.value)==="available_now"||"food"!==(0,W.c)()?null:(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"420"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>c(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)))}),0!==u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(r.A,{fontWeight:"bold",children:v("Offers")})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(null==a?void 0:a.length)>0&&(null==w?void 0:w.map((e,t)=>0===u&&(null==e?void 0:e.value)==="currently_open"||0===u&&(null==e?void 0:e.value)==="nearby"||0===u&&(null==e?void 0:e.value)==="coupon"||0===u&&(null==e?void 0:e.value)==="free_delivery"?null:(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"450"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>c(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)))})]}),0===u?(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsxs)(Z.jB,{spacing:1,children:[(0,n.jsx)(r.A,{fontWeight:"bold",children:v("Price")}),(0,n.jsx)(iJ.A,{handleChangePrice:e=>{o(e)},minMax:s,priceFilterRange:s})]})}):null,(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsxs)(Z.jB,{spacing:1,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(r.A,{fontWeight:"bold",children:v("Ratings")}),(0,n.jsx)(lK.A,{ratingValue:p,fontSize:"20px",handleChangeRatings:x})]})})]})})})})]})};l$.propTypes={};var l0=i(22139),l1=i(6482),l2=i(94089);let l5=(0,l.Ay)(Y.A)(e=>{let{theme:t,border:i}=e;return{border:"true"===i&&"1px solid ".concat(t.palette.neutral[400]),borderRadius:"5px",padding:"7px 16px",textTransform:"capitalize"}}),l3=e=>{let{handleSortBy:t,newSort:i}=e,[l,s]=d.useState(null),{t:o}=(0,en.Bd)(),a=!!l,c=[{name:"Default",value:"default"},{name:"Fast Delivery",value:"fast_delivery"},{name:"Distance",value:"nearby"}],x=(e,t)=>(0,n.jsxs)(S.A,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,children:[(0,n.jsx)(B.A,{src:l2.A.src,height:"12px",width:"12px",objectFit:"contain"}),(0,n.jsx)(r.A,{fontSize:"13px",sx:{color:e=>e.palette.neutral[600]},children:o(e)}),"true"===t&&(a?(0,n.jsx)(nl.A,{sx:{color:e=>e.palette.text.secondary}}):(0,n.jsx)(nr.A,{sx:{color:e=>e.palette.text.secondary}}))]});return(0,n.jsxs)("div",{children:[(0,n.jsx)(l5,{border:"true",onClick:e=>{s(e.currentTarget)},children:x((null==i?void 0:i.replace("_"," "))||"Sort by","true")}),(0,n.jsx)(l1.Ay,{id:a?"simple-popover":void 0,open:a,anchorEl:l,onClose:()=>{s(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{style:{width:(null==l?void 0:l.clientWidth)||"auto"}},children:null==c?void 0:c.map(e=>(0,n.jsx)(l5,{onClick:()=>{var i;return i=null==e?void 0:e.value,void(null==t||t(i),s(null))},children:x(" ".concat(null==e?void 0:e.name),"false")},e))})]})},l4=(0,l.Ay)(s.A)(e=>{let{theme:t,active:i}=e;return{display:"flex",direction:"row",alignItems:"center",justifyContent:"center",height:"100%",gap:"5px",cursor:"pointer",color:"true"===i?t.palette.primary.main:t.palette.neutral[500]}}),l6=e=>{let{currentView:t,setCurrentView:i,handleSortBy:l,sortBy:r,totalDataCount:o,currentTab:a,tabs:c,isRefetching:x,setOpenSideDrawer:p,priceRange:u,filterDataAndFunctions:h,filterData:g,setFilterData:m,setIsClicked:v,isFetchingNextPage:j,minMax:A,setMinMax:f,handleSortByNew:b,newSort:w}=e,[y,S]=(0,d.useState)(!0),[k,T]=(0,d.useState)(!1),C=(0,d.useRef)(null),_=(0,X.A)(),R=(0,G.A)(_.breakpoints.down("sm"));(0,d.useEffect)(()=>{0===a?S(!0):S(!1)},[a]),(0,d.useEffect)(()=>{let e=()=>{C.current&&T(C.current.getBoundingClientRect().top<=63)};return window.addEventListener("scroll",e),e(),()=>{window.removeEventListener("scroll",e)}},[]);let I=(0,E.t)("Found");return(0,n.jsx)(Z.iv,{ref:C,sx:{marginBottom:"20px",position:"sticky",top:{xs:"55px",sm:"63px"},zIndex:10,backgroundColor:k?"background.paper":"transparent",paddingY:k?"10px":"0px",paddingX:k?"10px":"0px",transition:"all 0.2s ease"},children:(0,n.jsxs)(U.Ay,{container:!0,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(U.Ay,{item:!0,xs:9,md:6,children:j?(0,n.jsx)(eI.A,{variant:"text",width:"150px"}):(0,n.jsx)(nB.A,{textTransform:"capitalize",textAlign:"start",text:(()=>{var e;return"".concat(null!=o?o:0," ").concat(null==(e=c[a])?void 0:e.value," ").concat(I)})()})}),(0,n.jsxs)(U.Ay,{item:!0,xs:3,md:6,container:!0,spacing:2,children:[(0,n.jsx)(U.Ay,{item:!0,xs:3,md:2,children:y?(0,n.jsxs)(l4,{active:0===t?"true":"false",onClick:()=>i(0),children:[(0,n.jsx)(lQ.A,{}),R?null:(0,n.jsx)(lG.A,{text:"Grid view"})]}):null}),(0,n.jsx)(U.Ay,{item:!0,xs:4,md:2,children:y?(0,n.jsxs)(l4,{active:1===t?"true":"false",onClick:()=>i(1),children:[(0,n.jsx)(lJ.A,{sx:{fontSize:"30px"}}),R?null:(0,n.jsx)(lG.A,{text:"List view"})]}):null}),R?null:(0,n.jsx)(U.Ay,{item:!0,xs:0,md:5.5,align:"center",children:y?(0,n.jsx)(lY.A,{handleSortBy:l,sortBy:r}):null}),R?null:(0,n.jsx)(n.Fragment,{children:1===a&&(0,n.jsx)(U.Ay,{item:!0,xs:0,md:9.5,align:"right",children:(0,n.jsx)(l3,{handleSortBy:b,newSort:w})})}),(0,n.jsx)(U.Ay,{item:!0,xs:5,md:2.5,children:R?(0,n.jsx)(s.A,{onClick:()=>p(!0),sx:{display:"flex",alignItems:"center",justifyContent:"center",color:"primary.main",border:e=>"1px solid ".concat(e.palette.primary.main),borderRadius:{xs:"3px",sm:"8px"},paddingTop:"5px",cursor:"pointer","&:hover":{backgroundColor:e=>e.palette.primary.secondary}},children:(0,n.jsx)(l0.A,{})}):(0,n.jsx)(l$,{minMax:A,setMinMax:f,border:!0,priceRange:u,filterDataAndFunctions:h,filterData:g,setFilterData:m,currentTab:a})})]})]})})};l6.propTypes={};var l8=i(50687),l7=i(94683),l9=i(51615),re=i(24607),rt=i(95062),ri=i.n(rt),rn=i(69222),rl=i(80885);let rr=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{backgroundColor:"paper.default",boxShadow:"0px 4px 15px rgba(0, 0, 0, 0.05)",borderRadius:"10px",p:"1rem",color:t.palette.neutral[900]}}),rs=e=>{let{title:t,data:i,isFetching:l,showAll:o,searchValue:a,id:x,selectedBrandsHandler:p,cId:u,linkRouteTo:h}=e,{t:g}=(0,en.Bd)(),m=(0,c.wA)(),v=(0,c.d4)(e=>e.categoryIds.storeSelectedItems2),[j,f]=(0,d.useState)(!1),[b,w]=(0,d.useState)(null);(0,d.useEffect)(()=>{null==p||p(v)},[v]),(0,d.useEffect)(()=>{a===rn.kk.allCategories&&(null==i?void 0:i.length)>0?S({checked:!0,id:"all"}):y({checked:!0,id:parseInt(x)})},[i,a,x]);let y=e=>{let t,n=null==i?void 0:i.find(t=>(null==t?void 0:t.id)===(null==e?void 0:e.id)),l=[];if(n){var r,s;l=(null==n||null==(r=n.childes)?void 0:r.length)>0?[n.id,...null==(s=n.childes)?void 0:s.map(e=>e.id)]:[n.id]}else l.push(e.id);t=e.checked?[...v,...l.filter(e=>!v.includes(e))]:v.filter(e=>!l.includes(e)),"nav"===h?m((0,A.hn)([])):m((0,A.hn)(t))},S=e=>{let t=i.reduce((e,t)=>{var i,n;return e.push(t.id),(null==t?void 0:t.childes)&&(null==(i=t.childes)?void 0:i.length)>0&&(null==t||null==(n=t.childes)||n.forEach(t=>e.push(t.id))),e},[]);e.checked?(f(!0),m((0,A.hn)(t))):(f(!1),m((0,A.hn)([])))};return(0,n.jsxs)(Z.jB,{children:[(0,n.jsx)(r.A,{fontWeight:"bold",sx:{color:e=>e.palette.neutral[1e3],paddingBottom:"1rem"},children:g(t)}),(0,n.jsx)(rr,{children:(0,n.jsx)(Z.jB,{p:"1rem",children:(0,n.jsxs)(re.Z,{style:{maxHeight:"330px"},scrollbarMinSize:1,children:[o&&(0,n.jsx)(rl.A,{item:{name:"All",id:"all"},checkHandler:S,isChecked:j,selectedId:b,setSelectedId:w}),null==i?void 0:i.map((e,t)=>(0,n.jsx)(s.A,{children:(0,n.jsx)(rl.A,{item:e,checkHandler:y,selectedItems:v,isChecked:v.includes(e.id)})},t)),l&&[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(no.A,{children:(0,n.jsx)(na.A,{children:(0,n.jsx)(eI.A,{variant:"rectangle",height:"10px",width:"100%"})})},t))]})})})]})};rs.propTypes={title:ri().string.isRequired,data:ri().array.isRequired};var ro=i(7937);let ra=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{backgroundColor:"paper.default",boxShadow:"0px 4px 15px rgba(0, 0, 0, 0.05)",borderRadius:"10px",p:"1rem",color:t.palette.neutral[900]}}),rd=e=>{let{title:t,data:i,isFetching:l,showAll:s,searchValue:o,id:a,selectedCategoriesHandler:x}=e,{t:p}=(0,en.Bd)(),[u,h]=(0,d.useState)([]),[g,m]=(0,d.useState)(!1),[v,j]=(0,d.useState)(null),f=(0,c.wA)(),b=(0,c.d4)(e=>e.categoryIds.storeSelectedItems),w=(0,X.A)(),y=(0,G.A)(w.breakpoints.down("sm"));(0,d.useEffect)(()=>{j(a)},[a]),(0,d.useEffect)(()=>{null==x||x(y?b:u,g)},[u,b]),(0,d.useEffect)(()=>{o===rn.kk.allCategories&&(null==i?void 0:i.length)>0?k({checked:!0,id:"all"}):"category"===o&&S({checked:!0,id:parseInt(a)})},[i,o,a]),(0,d.useEffect)(()=>{let e=i.length+i.reduce((e,t)=>{var i;return e+((null==(i=t.childes)?void 0:i.length)||0)},0),t=Array.isArray(u)?[...new Set(u)]:[];e!==t.length||g||(m(!0),k({checked:!0,id:"all"})),e!==t.length&&g&&m(!1)},[i,u]);let S=e=>{if(m(!1),y){let t,n=null==i?void 0:i.find(t=>(null==t?void 0:t.id)===(null==e?void 0:e.id)),l=[];n?l=(null==n?void 0:n.childes.length)>0?[n.id,...n.childes.map(e=>e.id)]:[n.id]:l.push(e.id),t=e.checked?[...b,...l.filter(e=>!b.includes(e))]:b.filter(e=>!l.includes(e)),f((0,A.hr)(t))}else{let n=null==i?void 0:i.find(t=>(null==t?void 0:t.id)===(null==e?void 0:e.id)),l=[];if(n)if((null==n?void 0:n.childes.length)>0){var t;l=[null==n?void 0:n.id,...null==n||null==(t=n.childes)?void 0:t.map(e=>null==e?void 0:e.id)]}else l.push(null==n?void 0:n.id);else l.push(null==e?void 0:e.id);(null==e?void 0:e.checked)?(j(null==n?void 0:n.id),h(e=>[...e,...l])):h(e=>e.filter(e=>null==l?void 0:l.every(t=>t!==e)))}},k=e=>{if(y){let t=i.reduce((e,t)=>(e.push(t.id),t.childes&&t.childes.length>0&&t.childes.forEach(t=>e.push(t.id)),e),[]);e.checked?(m(!0),f((0,A.hr)(t))):(m(!1),f((0,A.hr)([])))}else if(null==e?void 0:e.checked){m(!0);let e=[];(null==i?void 0:i.length)>0&&i.forEach(t=>{var i,n;e.push(t.id),(null==t||null==(i=t.childes)?void 0:i.length)>0&&(null==t||null==(n=t.childes)||n.forEach(t=>e.push(t.id)))}),h(t=>[...t,...e])}else m(!1),h(e=>[])};return(0,n.jsxs)(Z.jB,{children:[(0,n.jsx)(r.A,{fontWeight:"bold",sx:{color:e=>e.palette.neutral[1e3],paddingBottom:"1rem"},children:p(t)}),(0,n.jsx)(ra,{children:(0,n.jsx)(Z.jB,{p:"1rem",children:(0,n.jsxs)(re.Z,{style:{maxHeight:"330px"},scrollbarMinSize:1,children:[s&&(0,n.jsx)(rl.A,{item:{name:"All",id:"all"},checkHandler:k,isChecked:g,selectedId:v,setSelectedId:j}),null==i?void 0:i.map((e,t)=>(0,n.jsx)(n.Fragment,{children:y?(0,n.jsx)(ro.A,{item:e,checkHandler:S,selectedItems:b},t):(0,n.jsx)(ro.A,{item:e,checkHandler:S,selectedItems:u},t)})),l&&[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(no.A,{children:(0,n.jsx)(na.A,{children:(0,n.jsx)(eI.A,{variant:"rectangle",height:"10px",width:"100%"})})},t))]})})})]})};rd.propTypes={title:ri().string.isRequired,data:ri().array.isRequired};var rc=i(79113);(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{backgroundColor:"paper.default",boxShadow:"0px 4px 15px rgba(0, 0, 0, 0.05)",borderRadius:"10px",p:"1rem",color:t.palette.neutral[900]}});let rx=e=>{let{open:t,onClose:i,isFetching:l,searchValue:r,id:o,brand_id:a,sideDrawer:x,selectedBrandsHandler:p,selectedCategoriesHandler:u,currentTab:h,fromNav:g,linkRouteTo:m}=e;(0,X.A)();let{t:v}=(0,en.Bd)(),j=(0,G.A)(e=>e.breakpoints.up("lg"),{noSsr:!0}),{categories:A}=(0,c.d4)(e=>e.storedData),{brands:f}=(0,c.d4)(e=>e.brands),b=(0,c.wA)(),{data:w,refetch:y}=(0,tX.E)(),{data:S,refetch:k}=(0,l9.A)(e=>{b((0,rc.VO)(e))});(0,d.useEffect)(()=>{0===A.length&&y()},[]),(0,d.useEffect)(()=>{f||k()},[]),(0,d.useEffect)(()=>{(null==w?void 0:w.data)&&b((0,e4.zw)(null==w?void 0:w.data))},[w]);let T=(0,n.jsxs)(Z.jB,{sx:{padding:!x&&"1rem"},spacing:3,children:[(null==A?void 0:A.length)>0&&(0,n.jsx)(rd,{title:"Categories",data:A,searchValue:r,id:o,showAll:!0,selectedCategoriesHandler:u,fromNav:g}),f&&1!==h&&"ecommerce"===(0,W.c)()&&(0,n.jsx)(rs,{linkRouteTo:m,title:"Brands",cId:o,data:f,id:a,searchValue:r,showAll:!0,selectedBrandsHandler:p})]});return j||x?(0,n.jsx)(s.A,{sx:{width:"100%",py:"3px",height:"100%"},children:T}):(0,n.jsx)(l7.Ay,{anchor:"left",onClose:i,open:t,PaperProps:{sx:{backgroundColor:"paper.default",width:280}},sx:{zIndex:e=>e.zIndex.appBar+100},variant:"temporary",children:T})};rx.propTypes={};let rp=e=>{let{item:t,handleSelection:i}=e;return(0,n.jsxs)(s.A,{sx:{padding:"2px 5px",border:e=>"1px solid ".concat(e.palette.primary.main),borderRadius:"5px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:"5px"},children:[(0,n.jsx)(r.A,{variant:"body2",children:null==t?void 0:t.label}),(0,n.jsx)(q.A,{sx:{borderRadius:"50%",padding:"3px"},onClick:()=>i(t),children:(0,n.jsx)(ev.A,{sx:{fontSize:"15px"}})})]})},ru=e=>{let{filterData:t}=e,i=(0,c.wA)(),{t:l}=(0,en.Bd)(),s=e=>{let n=null==t?void 0:t.map(t=>(null==t?void 0:t.value)===(null==e?void 0:e.value)?{...t,checked:!1}:t);i((0,A.FS)(n))};return(0,n.jsx)(Z.iv,{children:(null==t?void 0:t.length)>0&&(()=>{var e;return!!(null==t||null==(e=t.filter(e=>(null==e?void 0:e.value)!=="price"&&(null==e?void 0:e.value)!=="test"))?void 0:e.some(e=>null==e?void 0:e.checked))})()&&(0,n.jsxs)(Z.jB,{direction:"row",alignItems:"center",justifyContent:"flex-start",flexWrap:"wrap",gap:"10px",children:[(0,n.jsx)(r.A,{fontWeight:"bold",fontSize:"12px",sx:{color:e=>(0,k.X4)(e.palette.customColor.textGray,.8),marginRight:"10px"},children:l("Applied filters:")}),null==t?void 0:t.map((e,t)=>{if((null==e?void 0:e.checked)&&(null==e?void 0:e.value)!=="price"&&(null==e?void 0:e.value)!=="test")return(0,n.jsx)(rp,{item:e,handleSelection:s},t)})]})})};ru.propTypes={};let rh=(0,d.forwardRef)((e,t)=>{let{sidebarRef:i,sidebarScrollEnabled:l,searchValue:r,pageData:s,id:o,brand_id:a,currentTab:c,configData:x,isFetchingNextPage:p,currentView:u,filterData:h,setFilterData:g,selectedCategoriesHandler:m,selectedBrandsHandler:v,fromNav:j,linkRouteTo:A}=e,[f,b]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{let e=setTimeout(()=>{b(!0)},5e3);return()=>clearTimeout(e)},[]),(0,n.jsx)(Z.iv,{sx:{marginTop:"20px"},children:(0,n.jsxs)(U.Ay,{container:!0,children:[(0,n.jsx)(U.Ay,{item:!0,xs:0,sm:0,md:0,lg:3,sx:{display:{xs:"none",lg:"block"}},children:(0,n.jsx)(Z.iv,{ref:i,sx:{position:"sticky",top:"80px",height:"calc(100vh - 100px)"},children:(0,n.jsx)(rx,{searchValue:r,id:o,brand_id:a,selectedCategoriesHandler:m,fromNav:j,selectedBrandsHandler:v,currentTab:c,linkRouteTo:A})})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,md:12,lg:9,spacing:2.5,children:(0,n.jsxs)(Z.jB,{spacing:2,sx:{paddingTop:"1rem"},children:[(0,n.jsx)(ru,{filterData:h}),(0,n.jsx)(Z.iv,{ref:t,children:(0,n.jsxs)(U.Ay,{container:!0,spacing:2,children:[(()=>{var e,t,i,l,r,o;return 0===c?(0,n.jsx)(n.Fragment,{children:0===u?(0,n.jsx)(n.Fragment,{children:(null==s||null==(e=s.pages)?void 0:e.length)>0&&(0,n.jsx)(n.Fragment,{children:null==s||null==(t=s.pages)?void 0:t.map(e=>{var t;return null==e||null==(t=e.products)?void 0:t.map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:6,sm:4,md:3,children:(0,n.jsx)(te.Ay,{item:e,cardheight:"318px",cardFor:"vertical",cardType:"vertical-type"},null==e?void 0:e.id)},t))})})}):(0,n.jsx)(n.Fragment,{children:(null==s||null==(i=s.pages)?void 0:i.length)>0&&(0,n.jsx)(n.Fragment,{children:null==s||null==(l=s.pages)?void 0:l.map(e=>{var t;return null==e||null==(t=e.products)?void 0:t.map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:6,md:6,children:(0,n.jsx)(te.Ay,{item:e,cardheight:"150px",cardType:"vertical-type",horizontalcard:"true",cardFor:"list-view"},null==e?void 0:e.id)},t))})})})}):(0,n.jsx)(n.Fragment,{children:(null==s||null==(r=s.pages)?void 0:r.length)>0&&(0,n.jsx)(n.Fragment,{children:null==s||null==(o=s.pages)?void 0:o.map((e,t)=>{var i;return null==e||null==(i=e.stores)?void 0:i.map((e,t)=>(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:4,md:4,children:(0,n.jsx)(np.A,{item:e,imageUrl:null==e?void 0:e.cover_photo_full_url})},t))})})})})(),p&&(0,n.jsx)(U.Ay,{item:!0,xs:12,sm:12,md:12,sx:{paddingBlockEnd:"30px",paddingBlockStart:"30px"},children:(0,n.jsx)(S.A,{sx:{marginTop:"2rem"},children:(0,n.jsx)(nu.A,{})})}),(()=>{var e,t,i,l;if(0===c){if(!p&&(null==s||null==(t=s.pages[0])||null==(e=t.products)?void 0:e.length)===0)return(0,n.jsx)(nh.A,{text:"Items not found!"})}else if(!p&&(null==s||null==(l=s.pages[0])||null==(i=l.stores)?void 0:i.length)===0)return(0,n.jsx)(nh.A,{text:"Stores not found!"})})()]})})]})})]})})});rh.propTypes={};let rg=async e=>{let{data_type:t,currentTab:i,searchValue:n,offset:l,page_limit:r,selectedCategoriesIds:s,selectedBrands:o,filterValue:a,rating_count:d,minMax:c,pageParam:x}=e,p="undefined"!==s[0]?JSON.stringify(s):[],g="undefined"!==o[0]?JSON.stringify(o):[],m=(null==a?void 0:a.length)>0?JSON.stringify(a):[],{data:v}=await h.A.get("".concat(u.J$,"?name=").concat("searched"===t?n:"","&offset=").concat(x||l,"&data_type=").concat(t,"&list_type=").concat(0===i?"item":"store","&limit=12&category_ids=").concat(p,"&brand_ids=").concat(g,"&filter=").concat(m,"&rating_count=").concat(d,"&min_price=").concat(c[0],"&max_price=").concat(c[1]));return v},rm=e=>{var t,i;let{open:l,onClose:s,handleSortBy:o,sortBy:a,searchValue:d,id:c,brand_id:x,setPageData:p,selectedCategoriesHandler:u,selectedBrandsHandler:h,currentTab:g,handleChangeRatings:m,filterData:v,setFilterData:j,handleCheckbox:A,ratingValue:f,handleSortByNew:b,newSort:w}=e,{t:y}=(0,en.Bd)(),S=(0,n.jsx)(Z.jB,{sx:{mt:"42px"},children:(0,n.jsxs)(U.Ay,{container:!0,children:[(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsxs)(Z.jB,{spacing:1.5,children:[(0,n.jsx)(r.A,{fontWeight:"bold",children:y("Filter By")}),(0,n.jsx)(K.A,{width:"100%",justifyContent:"center",alignItems:"center",children:1!==g&&(0,n.jsx)(lY.A,{handleSortBy:o,sortBy:a})}),(0,n.jsx)(K.A,{width:"100%",justifyContent:"center",alignItems:"center",children:0!==g&&(0,n.jsx)(l3,{handleSortBy:b,sortBy:w})}),(0,n.jsx)(Z.iv,{children:(0,n.jsxs)(U.Ay,{container:!0,children:[(0,n.jsx)(U.Ay,{item:!0,xs:6,children:0===g?(0,n.jsx)(n.Fragment,{children:(null==v?void 0:v.length)>0&&(null==v||null==(i=v.slice(1,4))||null==(t=i.map)?void 0:t.call(i,(e,t)=>(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"450"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>A(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)))}):(0,n.jsx)(n.Fragment,{children:(null==v?void 0:v.length)>0&&(null==v?void 0:v.map((e,t)=>{if(t>=0&&t<=3)return(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"450"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>A(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)}))})}),0!==g&&(0,n.jsx)(U.Ay,{item:!0,xs:6,children:(null==v?void 0:v.length)>0&&(null==v?void 0:v.map((e,t)=>{if(t>=4&&t<=7)return(0,n.jsx)(nv.A,{sx:{"& .MuiFormControlLabel-label":{fontSize:"13px",fontWeight:(null==e?void 0:e.checked)&&"420"}},control:(0,n.jsx)(lU.A,{checked:null==e?void 0:e.checked,onChange:t=>A(e,t),name:null==e?void 0:e.label}),label:null==e?void 0:e.label},t)}))})]})})]})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsxs)(Z.jB,{spacing:1,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(r.A,{fontWeight:"bold",children:y("Ratings")}),(0,n.jsx)(lK.A,{ratingValue:f,fontSize:"20px",handleChangeRatings:m})]})}),(0,n.jsx)(U.Ay,{item:!0,xs:12,children:(0,n.jsx)(rx,{searchValue:d,id:c,brand_id:x,sideDrawer:!0,selectedBrandsHandler:h,selectedCategoriesHandler:u,currentTab:g})})]})});return(0,n.jsxs)(l7.Ay,{anchor:"right",onClose:s,open:l,PaperProps:{sx:{backgroundColor:"paper.default",width:"100%",padding:"15px"}},sx:{zIndex:e=>e.zIndex.appBar+100},variant:"temporary",children:[(0,n.jsx)(q.A,{onClick:()=>s(),sx:{position:"absolute",top:5,right:8},children:(0,n.jsx)(ev.A,{sx:{fontSize:{xs:"18px",md:"24px"}}})}),S]})};rm.propTypes={};let rv=e=>{var t;let{searchValue:i,configData:l,fromAllCategories:r,fromNav:s,routeTo:a,currentTab:x,setCurrentTab:u}=e,h=(0,o.useRouter)(),m=(0,c.wA)(),{data_type:v}=h.query,j=(0,X.A)(),f=(0,G.A)(j.breakpoints.down("md")),b=h.query.id,w=h.query.brand_id,[y,S]=(0,d.useState)(0),[T,C]=(0,d.useState)(0),[_,R]=(0,d.useState)(!1),[E,I]=(0,d.useState)([]),[B,M]=(0,d.useState)([0,2e7]),[L,D]=(0,d.useState)("all"),[z,F]=(0,d.useState)(b),[P,O]=(0,d.useState)(""),[H,N]=(0,d.useState)(""),[V,q]=(0,d.useState)(!1),[Y,Q]=(0,d.useState)(a),[J,U]=(0,d.useState)(!1),[K,$]=(0,d.useState)(0),ee=(0,d.useRef)(null),et=(0,d.useRef)(null),ei=(0,d.useRef)(null),{ref:en,inView:el}=(0,nc.Wx)({rootMargin:"0px 0px 80% 0px"}),{selectedBrands:er,selectedCategories:es,filterData:eo,rating_count:ea}=(0,c.d4)(e=>e.categoryIds);(0,d.useEffect)(()=>{m((0,A.aY)("brand"===v?[w]:[])),m((0,A.OH)("category"===v?[b]:[]))},[]);let ed=(0,d.useCallback)(()=>{if(!ee.current||!et.current||f)return;let e=ee.current.getBoundingClientRect(),t=window.scrollY,i=window.innerHeight,n=e.bottom+t,l=t+i>=n-.3*i;l!==J&&U(l)},[J,f]);(0,d.useEffect)(()=>{let e=()=>{ei.current||(ei.current=setTimeout(()=>{ed(),ei.current=null},16))};return window.addEventListener("scroll",e,{passive:!0}),()=>{window.removeEventListener("scroll",e),ei.current&&clearTimeout(ei.current)}},[ed]);let ec=(e,t)=>{(null==e?void 0:e.length)>0?(Q(""),m((0,A.OH)(t?[]:[...new Set(e)]))):m((0,A.OH)([]))},ex=e=>{if("nav"===Y)m((0,A.aY)([]));else{let t=e.filter(e=>!isNaN(e));t.length>0?m((0,A.aY)([...new Set(t)])):m((0,A.aY)([]))}},ep=[{name:"food"===(0,W.c)()?"Foods":"ecommerce"===(0,W.c)()?"Items":"pharmacy"===(0,W.c)()?"Medicines":"Groceries",value:"items"},{name:"food"===(0,W.c)()?"Restaurants":"Stores",value:"stores"}],eu={data_type:v,searchValue:i,category_id:z,selectedCategoriesIds:es,selectedBrands:er,page_limit:12,offset:T,type:L,currentTab:x,filterValue:E,rating_count:ea,minMax:B},{data:eh,refetch:eg,isFetching:em,isRefetching:ev,fetchNextPage:ej,isFetchingNextPage:eA,isLoading:ef}=function(e,t){return(0,p.useInfiniteQuery)(["search-products",null==e?void 0:e.currentTab,null==e?void 0:e.selectedCategoriesIds,null==e?void 0:e.selectedBrands,null==e?void 0:e.filterValue,null==e?void 0:e.rating_count,null==e?void 0:e.minMax,null==e?void 0:e.searchValue,null==e?void 0:e.selectedBrands],t=>{let{pageParam:i=1}=t;return rg({...e,pageParam:i})},{getNextPageParam:(t,i)=>{var n,l;let r=i.length+1;return((null==e?void 0:e.currentTab)===1?null==t||null==(n=t.stores)?void 0:n.length:null==t||null==(l=t.products)?void 0:l.length)>0?r:void 0},getPreviousPageParam:(e,t)=>e.prevCursor,retry:1,enabled:!1,onError:g.P1,cacheTime:3e5,onSuccess:t})}(eu,e=>{if(e){var t,i,n,l;(0===x?(null==e||null==(i=e.pages[0])||null==(t=i.products)?void 0:t.length)>0:(null==e||null==(l=e.pages[0])||null==(n=l.stores)?void 0:n.length)>0)||q(!0),C(e=>e+1)}});(0,d.useEffect)(()=>{ee.current&&$(ee.current.scrollHeight)},[eh]);let eb=(0,d.useRef)(eu.selectedCategoriesIds),ew=(0,d.useRef)(eu.selectedBrands),ey=(0,d.useRef)(eu.minMax),eS=(0,d.useRef)(eu.rating_count);(0,d.useEffect)(()=>{ek()},[]),(0,d.useEffect)(()=>{var e,t,i,n;let l=0===x?(null==eh||null==(t=eh.pages[0])||null==(e=t.products)?void 0:e.length)>0:(null==eh||null==(n=eh.pages[0])||null==(i=n.stores)?void 0:i.length)>0,r=eb.current!==eu.selectedCategoriesIds,s=ew.current!==eu.selectedBrands;eb.current=eu.selectedCategoriesIds;let o=eS.current!==eu.minMax;ey.current=eu.minMax;let a=eS.current!==eu.rating_count;ey.current=eu.rating_count,(!l&&r&&V||!l&&o&&V||!l&&a&&V||!l&&s&&V)&&eg()},[eh,eu.selectedCategoriesIds,eu.selectedBrands,eg,eo,null==eu?void 0:eu.minMax,ea,er]);let ek=()=>{let e=l8.z,t=null==e?void 0:e.map(e=>(null==e?void 0:e.value)!=="discounted"?e:"discounted"===v?{...e,checked:!0}:e);m((0,A.FS)(t))},eT=e=>{O(e),I(t=>{let i=new Set([...t]);return"low"===e?(null==i?void 0:i.has("high"))&&(null==i||i.delete("high")):(null==i?void 0:i.has("low"))&&(null==i||i.delete("low")),i.add(e),[...i]})},eC=e=>{N(e),I(t=>{let i=new Set([...t]);return["default","fast_delivery","nearby"].forEach(e=>{i.has(e)&&i.delete(e)}),["default","fast_delivery","nearby"].includes(e)&&i.add(e),[...i]})},e_=(e,t)=>{let i=null==eo?void 0:eo.map(i=>(null==i?void 0:i.value)===(null==e?void 0:e.value)?{...i,checked:t.target.checked}:i);m((0,A.FS)(i))};(0,d.useEffect)(()=>{let e=["default","fast_delivery","nearby","high","low"],t=[...new Set([...eo.filter(e=>e.checked).map(e=>e.value),...E.filter(t=>e.includes(t))])];t.length===E.length&&t.every((e,t)=>e===E[t])||I(t)},[eo]);let eR=e=>{m((0,A.GJ)(e))},eE={filterData:eo,setFilterData:A.FS,handleCheckbox:e_,handleChangeRatings:eR,getRatingValue:ea,currentTab:x};return(0,d.useEffect)(()=>{el&&ej()},[el,i,x,E,es,ea,B,er]),(0,n.jsx)(eq.A,{children:(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(Z.jB,{alignItems:"center",justifyContent:"center",sx:{marginTop:"20px",marginBottom:"20px"},children:(null==er?void 0:er.length)==0&&(0,n.jsx)(lq,{tabs:ep,currentTab:x,setCurrentTab:e=>{u(e),I([]),m((0,A.FS)(eo.map(e=>({...e,checked:!1}))))}})}),(0,n.jsx)(l6,{currentView:y,setCurrentView:S,handleSortBy:eT,sortBy:P,totalDataCount:null==eh||null==(t=eh.pages[0])?void 0:t.total_size,currentTab:x,tabs:ep,setOpenSideDrawer:R,filterDataAndFunctions:eE,isFetchingNextPage:eA||ef,minMax:B,setMinMax:M,handleSortByNew:eC,newSort:H}),(0,n.jsx)(Z.iv,{sx:{borderBottom:e=>"1px solid ".concat((0,k.X4)(e.palette.neutral[400],.4))}}),(0,n.jsxs)(Z.iv,{children:[(0,n.jsx)(rh,{ref:ee,sidebarRef:et,sidebarScrollEnabled:J,searchValue:i,id:b,brand_id:w,currentTab:x,configData:l,currentView:y,filterData:eo,selectedCategoriesHandler:ec,selectedBrandsHandler:ex,fromAllCategories:r,pageData:eh,isFetchingNextPage:eA||ef,fromNav:s,linkRouteTo:Y}),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Z.iv,{ref:en,sx:{height:"10px"}})})]}),_&&(0,n.jsx)(rm,{open:_,onClose:()=>R(!1),sortBy:P,handleSortBy:eT,searchValue:i,id:b,brand_id:w,selectedCategoriesHandler:ec,selectedBrandsHandler:ex,currentTab:x,handleChangeRatings:eR,filterData:eo,handleCheckbox:e_,ratingValue:ea,handleSortByNew:eC,newSort:H})]})})};rv.propTypes={};let rj=d.memo(rv);var rA=i(41065),rf=i(93445),rb=i(30528),rw=i(31873);let ry=async()=>{let{data:e}=await h.A.get("".concat(rw.ms));return e},rS=()=>{var e;(0,td.Z)()&&(0,td.Z)();let{data:t,isFetching:i,isLoading:l}=(0,p.useQuery)("vehicle-banner-lists",ry,{retry:!1,cacheTime:6e4,staleTime:3e4,refetchOnWindowFocus:!1,refetchOnMount:!1,onError:g.P1}),r={dots:!0,infinite:(null==t?void 0:t.banners.length)>3,slidesToShow:3,cssEase:"ease-in-out",autoplay:!0,speed:800,autoplaySpeed:4e3,variableHeight:!0,initialSlide:0,centerMode:!1,responsive:[{breakpoint:992,settings:{slidesToShow:2,infinite:(null==t?void 0:t.banners.length)>2}},{breakpoint:576,settings:{slidesToShow:1,infinite:(null==t?void 0:t.banners.length)>1}}]};return(0,n.jsx)(rG,{sx:{mt:{xs:"50px",md:"80px"},mb:"35px",".slick-slide":{padding:"0 10px"}},children:(0,n.jsx)(Z.jB,{alignItems:"center",justifyContent:"center",mb:3,spacing:1,children:(0,n.jsx)(Z.iv,{sx:{".slick-dots":{mt:0},".slick-track ":{marginLeft:"0px",marginRight:"0px"}},children:l?(0,n.jsx)(eH.A,{...r,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eI.A,{variant:"rounded",height:133,width:400},t))}):(0,n.jsx)(eH.A,{...r,children:null==t||null==(e=t.banners)?void 0:e.map((e,t)=>{let i=(0,n.jsx)(ec.A,{src:(null==e?void 0:e.image_full_url)||"",width:400,maxWidth:"100%",height:133,bg:"#ddd",borderRadius:20,objectFit:"cover"});return(null==e?void 0:e.type)==="store_wise"?(0,n.jsx)(tU(),{href:"/rental/provider-details/".concat(null==e?void 0:e.provider_id),children:(0,n.jsx)(s.A,{children:i})},t):(null==e?void 0:e.link)?(0,n.jsx)(tU(),{href:(null==e?void 0:e.link)||"",children:(0,n.jsx)(s.A,{sx:{img:{width:"100%"}},children:i})},t):(0,n.jsx)(s.A,{children:i},t)})})})})})};var rk=i(80213),rT=i(4376);let rC=async()=>{let{data:e}=await h.A.get("".concat(rw.NT));return e},r_=()=>{var e,t;let{t:i}=(0,en.Bd)(),l=(0,o.useRouter)(),{data:r,isFetching:a,isLoading:c}=(0,p.useQuery)("top-rated-vehicle-list",rC,{onError:g.P1}),x=(0,td.Z)()?(0,td.Z)():"ltr",[u,h]=(0,d.useState)(!1),[m,v]=(0,d.useState)(!1),[j,A]=(0,d.useState)(!0),f=(0,d.useRef)(null),b={dots:!1,infinite:!1,slidesToShow:4.2,cssEase:"ease-in-out",autoplay:!0,speed:800,autoplaySpeed:4e3,variableHeight:!0,swipeToSlide:!0,prevArrow:u&&m&&(0,n.jsx)(eC.q,{displayNoneOnMobile:!0}),nextArrow:u&&j&&(0,n.jsx)(eC.I,{displayNoneOnMobile:!0}),responsive:[{breakpoint:992,settings:{slidesToShow:2,swipeToSlide:!0}},{breakpoint:576,settings:{slidesToShow:1,swipeToSlide:!0}}],afterChange:e=>{(e=>{var t;let i=null==r||null==(t=r.vehicles)?void 0:t.length,n=window.innerWidth>=992?4:window.innerWidth>=576?2:1;v(e>0),A(ee.palette.neutral[700]}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mb:3,spacing:1,children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[(0,n.jsx)(eI.A,{variant:"text",width:"110px"}),(0,n.jsx)(eI.A,{width:"100px",variant:"80px"})]}),(0,n.jsx)(tc.r,{direction:x,children:(0,n.jsx)(Z.iv,{children:(0,n.jsx)(eH.A,{...b,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eI.A,{variant:"rounded",height:383,width:400},t))})})})]})}):(null==r||null==(e=r.vehicles)?void 0:e.length)>0?(0,n.jsx)(rG,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),sx:{cursor:"pointer",mb:"50px",".slick-slide":{padding:"10px",".MuiBox-root":{overflow:"visible"}},".slick-dots li button:before":{opacity:1,color:e=>e.palette.neutral[700]}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mb:3,spacing:1,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[(0,n.jsx)(ts.A,{text:i("Top Rated Vehicles"),component:"h2"}),(0,n.jsx)(Y.A,{variant:"text",onClick:()=>{l.push({pathname:"/rental/vehicle-search",query:{top_rated:1}})},sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"}},children:i("See all")})]}),(0,n.jsx)(tc.r,{direction:x,children:(0,n.jsx)(Z.iv,{sx:{".slick-track ":{marginLeft:"0px",marginRight:"0px"}},children:(0,n.jsx)(eH.A,{ref:f,...b,children:null==r||null==(t=r.vehicles)?void 0:t.map((e,t)=>(0,n.jsx)(s.A,{sx:{img:{borderRadius:".5rem"}},children:(0,n.jsx)(rT.A,{data:e})},t))})})})]})}):null})},rR=e=>{let{data:t}=e,i=(0,o.useRouter)(),l=null==t?void 0:t.image_full_url,a=null==t?void 0:t.name,d=null==t?void 0:t.id,{textRef:c,isEllipsed:x}=(0,eP.A)(a);return(0,n.jsx)(rk.oc,{onClick:()=>{i.push({pathname:"/rental/vehicle-search",query:{categoryId:d}})},children:(0,n.jsxs)(s.A,{sx:{padding:"23px 16px 16px 16px"},children:[(0,n.jsx)(K.A,{alignItems:"center",mb:1,children:(0,n.jsx)(ec.A,{width:180,height:120,src:l,objectFit:"cover"})}),x?(0,n.jsx)(eB.A,{title:a,placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{bgcolor:e=>e.palette.toolTipColor,"& .MuiTooltip-arrow":{color:e=>e.palette.toolTipColor}}}},children:(0,n.jsx)(r.A,{ref:c,sx:{textAlign:"center",color:e=>e.palette.neutral[500],fontWeight:"500",fontSize:"18px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})}):(0,n.jsx)(r.A,{ref:c,sx:{textAlign:"center",color:e=>e.palette.neutral[500],fontWeight:"500",fontSize:"18px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})]})})};var rE=i(4141);let rI=async()=>{let{data:e}=await h.A.get("".concat(rw.bl));return e},rB=()=>{var e,t;let{t:i}=(0,en.Bd)(),l=(0,o.useRouter)(),[r,a]=(0,d.useState)(!1),[x,u]=(0,d.useState)(!1),[h,m]=(0,d.useState)(!0),v=(0,d.useRef)(null),{data:j,isFetching:A,isLoading:f}=(()=>{let e=(0,c.wA)();return(0,p.useQuery)("category-list",rI,{cacheTime:6e4,staleTime:3e4,refetchOnWindowFocus:!1,refetchOnMount:!1,onSuccess:t=>{e((0,rE.T5)(t.vehicles))},onError:g.P1})})(),b={dots:!1,infinite:!1,slidesToShow:4.5,cssEase:"ease-in-out",autoplay:!1,speed:800,autoplaySpeed:4e3,variableHeight:!0,swipeToSlide:!0,prevArrow:r&&x&&(0,n.jsx)(eC.q,{displayNoneOnMobile:!0}),nextArrow:r&&h&&(0,n.jsx)(eC.I,{displayNoneOnMobile:!0}),responsive:[{breakpoint:992,settings:{slidesToShow:2,swipeToSlide:!0}},{breakpoint:576,settings:{slidesToShow:1,swipeToSlide:!0}}],afterChange:e=>{(e=>{let t=j.length,i=window.innerWidth>=1400?4:window.innerWidth>=1200?3:window.innerWidth>=992?2:1;u(e>0),m(e(0,n.jsx)(eI.A,{variant:"rounded",height:180,width:400},t))})})]})}):(null==j||null==(e=j.vehicles)?void 0:e.length)>0?(0,n.jsx)(rG,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),sx:{mb:"63px",cursor:"pointer",".slick-slide":{padding:"10px",".MuiBox-root":{overflow:"visible"}}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mb:3,spacing:1,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[(0,n.jsx)(ts.A,{text:i("Vehicle Categories"),component:"h2"}),(0,n.jsx)(Y.A,{variant:"text",onClick:()=>{l.push({pathname:"/rental/vehicle-search",query:{all_category:1}})},sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"}},children:i("See all")})]}),(0,n.jsx)(Z.iv,{sx:{".slick-track ":{marginLeft:"0px",marginRight:"0px"}},children:(0,n.jsx)(eH.A,{ref:v,...b,children:null==j||null==(t=j.vehicles)?void 0:t.map((e,t)=>(0,n.jsx)(s.A,{sx:{img:{borderRadius:".5rem"}},children:(0,n.jsx)(rR,{data:e})},t))})})]})}):null})},rM=()=>(0,n.jsxs)("svg",{width:"28",height:"29",viewBox:"0 0 28 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_10708_12651)",children:(0,n.jsx)("path",{d:"M24.6834 4.28559L22.0188 1.53343C21.6915 1.19739 21.3005 0.930075 20.8685 0.747167C20.4366 0.564258 19.9725 0.469436 19.5034 0.468262L14.0026 0.468262C12.6584 0.469959 11.3558 0.935033 10.3145 1.7851C9.27315 2.63517 8.55672 3.81824 8.28594 5.13493H8.16927C6.62274 5.13678 5.14009 5.75196 4.04653 6.84552C2.95297 7.93908 2.33779 9.42173 2.33594 10.9683V22.6349C2.33779 24.1815 2.95297 25.6641 4.04653 26.7577C5.14009 27.8512 6.62274 28.4664 8.16927 28.4683H15.1693C16.7158 28.4664 18.1985 27.8512 19.292 26.7577C20.3856 25.6641 21.0008 24.1815 21.0026 22.6349V22.5183C22.3193 22.2475 23.5024 21.5311 24.3524 20.4897C25.2025 19.4484 25.6676 18.1458 25.6693 16.8016V6.72159C25.671 5.81208 25.3172 4.9379 24.6834 4.28559ZM15.1693 26.1349H8.16927C7.24101 26.1349 6.35077 25.7662 5.6944 25.1098C5.03802 24.4534 4.66927 23.5632 4.66927 22.6349V10.9683C4.66927 10.04 5.03802 9.14977 5.6944 8.49339C6.35077 7.83701 7.24101 7.46826 8.16927 7.46826V16.8016C8.17112 18.3481 8.7863 19.8308 9.87986 20.9243C10.9734 22.0179 12.4561 22.6331 14.0026 22.6349H18.6693C18.6693 23.5632 18.3005 24.4534 17.6441 25.1098C16.9878 25.7662 16.0975 26.1349 15.1693 26.1349ZM19.8359 20.3016H14.0026C13.0743 20.3016 12.1841 19.9328 11.5277 19.2765C10.8714 18.6201 10.5026 17.7299 10.5026 16.8016V6.30159C10.5026 5.37334 10.8714 4.4831 11.5277 3.82672C12.1841 3.17034 13.0743 2.80159 14.0026 2.80159H18.6693V5.13493C18.6693 5.75377 18.9151 6.34726 19.3527 6.78484C19.7903 7.22243 20.3838 7.46826 21.0026 7.46826H23.3359V16.8016C23.3359 17.7299 22.9672 18.6201 22.3108 19.2765C21.6544 19.9328 20.7642 20.3016 19.8359 20.3016Z",fill:"#152e6e"})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_10708_12651",children:(0,n.jsx)("rect",{width:"28",height:"28",fill:"white",transform:"translate(0 0.464355)"})})})]}),rL=e=>{let t=(0,X.A)();return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"335",height:"101",fill:"none",viewBox:"0 0 335 101",preserveAspectRatio:"none",children:(0,n.jsx)("path",{fill:t.palette.background.paper,fillRule:"evenodd",d:"M10 .464h211.593a12.5 12.5 0 0 0 9.802 8.517v2.9a1.605 1.605 0 1 0 3.21 0v-2.77A12.5 12.5 0 0 0 245.407.464H325c5.523 0 10 4.478 10 10v80c0 5.523-4.477 10-10 10h-79.594a12.5 12.5 0 0 0-10.801-8.642v-2.779a1.605 1.605 0 1 0-3.21 0v2.908a12.5 12.5 0 0 0-9.801 8.513H10c-5.523 0-10-4.477-10-10v-80c0-5.522 4.477-10 10-10m224.605 21.482a1.605 1.605 0 1 0-3.21 0v6.71a1.605 1.605 0 1 0 3.21 0zm0 16.774a1.605 1.605 0 1 0-3.21 0v6.71a1.605 1.605 0 1 0 3.21 0zm0 16.775a1.605 1.605 0 1 0-3.21 0v6.71a1.605 1.605 0 1 0 3.21 0zm0 16.774a1.605 1.605 0 1 0-3.21 0v6.71a1.605 1.605 0 1 0 3.21 0z",clipRule:"evenodd"})})},rD=e=>{let{data:t}=e,i=(0,X.A)();return(0,n.jsxs)(rk._1,{children:[(0,n.jsx)(rL,{}),(0,n.jsxs)(s.A,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,n.jsxs)(K.A,{alignItems:"flex-start",gap:1,children:[(0,n.jsxs)(K.A,{direction:"row",alignItems:"center",gap:1,children:[(0,n.jsxs)(r.A,{variant:"body1",fontSize:18,color:i.palette.neutral[500],children:[(0,E.t)("Code"),":"]}),(0,n.jsx)(r.A,{variant:"body2",component:"div",fontSize:{xs:13,sm:18},fontWeight:600,lineHeight:1,sx:{whiteSpace:"wrap"},children:(null==t?void 0:t.code.length)>14?(null==t?void 0:t.code.slice(0,14))+"...":null==t?void 0:t.code})]}),(0,n.jsxs)(r.A,{variant:"body2",component:"div",children:[null==t?void 0:t.discount," % discount"]})]}),(0,n.jsx)(Y.A,{sx:{ml:{xs:-2,sm:0}},variant:"text",onClick:()=>(e=>{navigator.clipboard.writeText(e).then(()=>{(0,ei.Ay)(()=>(0,n.jsxs)("span",{children:[(0,E.t)("Code"),(0,n.jsx)("b",{style:{marginLeft:"4px",marginRight:"4px"},children:e}),(0,E.t)("has been copied")]}))}).catch(e=>{console.error("Failed to copy code:",e)})})(null==t?void 0:t.code),children:(0,n.jsx)(rM,{})})]})]})},rz=async()=>{let{data:e}=await h.A.get("".concat(u.i0));return e},rF=()=>{let e=(0,X.A)(),{t}=(0,en.Bd)(),[i,l]=(0,d.useState)(!1),{data:r,isFetching:o}=(0,p.useQuery)("coupon-list-vehicle",rz,{staleTime:3e5,cacheTime:6e5,refetchOnWindowFocus:!1,onError:g.P1}),a={dots:!1,infinite:!1,slidesToShow:3.1,cssEase:"ease-in-out",autoplay:!0,speed:800,autoplaySpeed:4e3,variableHeight:!0,prevArrow:i&&(0,n.jsx)(eC.q,{}),nextArrow:i&&(0,n.jsx)(eC.I,{}),responsive:[{breakpoint:992,settings:{slidesToShow:2}},{breakpoint:576,settings:{slidesToShow:1}}]};return(0,n.jsx)(n.Fragment,{children:(null==r?void 0:r.length)>0&&(0,n.jsx)(rG,{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),bgcolor:"dark"===e.palette.mode?e.palette.background.paper:(0,k.X4)(e.palette.primary.main,.05),sx:{mb:"60px",padding:"20px 20px 1px",borderRadius:2,cursor:"pointer",".slick-slide":{padding:"10px",".MuiBox-root":{overflow:"visible"}}},children:(0,n.jsxs)(Z.jB,{alignItems:"center",justyfyContent:"center",mb:3,spacing:1,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,n.jsxs)(Z.jB,{alignItems:"center",justifyContent:"space-between",direction:"row",children:[o?(0,n.jsx)(eI.A,{variant:"text",width:"110px"}):(0,n.jsx)(ts.A,{text:t("Coupons"),component:"h2",sx:{color:e=>e.palette.neutral[1e3]}}),o?(0,n.jsx)(eI.A,{width:"100px",variant:"80px"}):(0,n.jsx)(tU(),{href:{pathname:"/profile",query:{page:"coupons"}},legacyBehavior:!0,children:(0,n.jsx)(Y.A,{variant:"text",sx:{transition:"all ease 0.5s",textTransform:"capitalize","&:hover":{letterSpacing:"0.03em"}},children:t("See all")})})]}),(0,n.jsx)(Z.iv,{sx:{".slick-track ":{marginLeft:"0px",marginRight:"0px"}},children:o?(0,n.jsx)(eH.A,{...a,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(eI.A,{variant:"rounded",height:100,width:335},t))}):(0,n.jsx)(eH.A,{...a,children:null==r?void 0:r.map((e,t)=>(0,n.jsx)(s.A,{sx:{img:{borderRadius:".5rem"}},children:(0,n.jsx)(rD,{data:e})},t))})})]})})})};i(75452),i(14e3);let rW=e=>{let{configData:t,landingPageData:i}=e;return(0,n.jsx)(rk.jy,{children:(0,n.jsxs)(eq.A,{children:[(0,n.jsx)(rS,{}),(0,n.jsx)(r_,{}),(0,n.jsx)(rB,{}),(0,x.g)()&&(0,n.jsx)(rF,{})]})})};rW.propTypes={};var rP=i(99035),rO=i(93706),rZ=i(26091),rH=i(3801);let rN=e=>{let{failPaymentOrderData:t,setOpenPaymentModal:i,setOpenIncompleteOrder:l,dontShowAgain:s,setDontShowAgain:o}=e,{t:d}=(0,en.Bd)();(0,rO.A)();let u=(0,c.wA)(),h={order_id:null==t?void 0:t.order_id,_method:"put",guest_id:(0,x.W)()},{mutate:m,isLoading:v}=(0,p.useMutation)("order-payment-method-update",rZ.X.FailedPaymentMethodUpdate),{mutate:j,isLoading:A}=(0,p.useMutation)("order-payment-method-cancel",rZ.X.FailedPaymentMethodCancel),f=e=>{var t;(null==e||null==(t=e.data)?void 0:t.message)&&(ei.oR.success(e.data.message),l(!1)),u((0,i5.gG)(void 0)),a().push("/home",void 0,{shallow:!0})},b=e=>{var t;(null==e||null==(t=e.data)?void 0:t.message)&&ei.oR.success(e.data.message),l(!1),u((0,i5.gG)(void 0)),a().push("/home",void 0,{shallow:!0})};return t?(0,n.jsxs)(K.A,{padding:"30px",gap:"20px",direction:"column",alignItems:"center",justifyContent:"center",children:[(0,n.jsxs)(r.A,{component:"span",fontSize:"18px",fontWeight:"500",children:[d("Your Payment was"),(0,n.jsx)(r.A,{component:"span",ml:1,fontSize:"18px",fontWeight:"500",color:"error",children:d("Incomplete")})]}),(0,n.jsxs)(K.A,{spacing:2,direction:"row",justifyContent:"space-between",width:"100%",sx:{backgroundColor:e=>e.palette.neutral[300]},borderRadius:"5px",padding:"10px",children:[(0,n.jsxs)(K.A,{justifyContent:"space-between",children:[(0,n.jsx)(r.A,{fontSize:"14px",sx:{color:e=>e.palette.neutral[500]},children:d("Booking ID")}),(0,n.jsx)(r.A,{fontWeight:"500",children:t.order_id||d("N/A")})]}),(0,n.jsxs)(K.A,{children:[(0,n.jsx)(r.A,{fontSize:"14px",sx:{color:e=>e.palette.neutral[500]},children:d("Amount")}),(0,n.jsx)(r.A,{fontWeight:"500",children:t.order_amount?(0,R.Yi)((null==t?void 0:t.partially_paid_amount)>0?t.order_amount-(null==t?void 0:t.partially_paid_amount):t.order_amount):d("N/A")})]})]}),(0,n.jsx)(r.A,{textAlign:"center",sx:{color:e=>e.palette.neutral[500],maxWidth:"350px"},children:d("Your payment was incomplete. Please choose an option below to complete your transaction.")}),(0,n.jsx)(nv.A,{sx:{alignSelf:"flex-start"},control:(0,n.jsx)(lU.A,{checked:s,onChange:e=>{e.target.checked?localStorage.setItem("incomplete_order_hidden_".concat(t.order_id),"true"):localStorage.removeItem("incomplete_order_hidden_".concat(t.order_id)),o(e.target.checked)}}),label:(0,n.jsx)(r.A,{fontSize:"14px",sx:{color:e=>e.palette.neutral[500]},children:d("Don't show this again")})}),(0,n.jsx)(Y.A,{fullWidth:!0,variant:"contained",onClick:()=>{i(!0),l(!1)},disabled:!t.order_id,children:d("Pay Now")}),t.cash_on_delivery&&(0,n.jsx)(rH.A,{loading:v,variant:"outlined",fullWidth:!0,onClick:()=>{if(!(null==t?void 0:t.order_id))return void ei.oR.error(d("Order ID is missing"));(null==t?void 0:t.maximum_cod_order_amount)>(null==t?void 0:t.order_amount)?m(h,{onSuccess:f,onError:g.Jm}):ei.oR.error(es.zK)},disabled:!t.order_id||v,sx:{bgcolor:e=>(0,k.X4)(e.palette.neutral[200],.4),color:e=>e.palette.neutral[800],borderColor:"transparent","&:hover":{bgcolor:e=>(0,k.X4)(e.palette.neutral[200],1),color:e=>e.palette.neutral[900],borderColor:"transparent"}},children:d("Switch to COD")}),(0,n.jsx)(rH.A,{sx:{color:e=>e.palette.error.main,borderColor:"transparent",padding:"0px","&:hover":{borderColor:"transparent",backgroundColor:"transparent",color:e=>e.palette.error.main}},variant:"text",onClick:()=>{if(!(null==t?void 0:t.order_id))return void ei.oR.error(d("Order ID is missing"));j({...h,reason:"Order payment canceled"},{onSuccess:b,onError:g.Jm})},loading:A,disabled:!t.order_id||A,children:d("Cancel Order")})]}):null};var rV=i(36675),rX=i(25269),rq=i(29978),rY=i(87867),rQ=i(71827);let rG=(0,l.Ay)(s.A)(e=>{let{theme:t}=e;return{width:"100%",gap:"8px"}}),rJ=d.memo(e=>{var t,i,l;let{configData:a,landingPageData:u}=e,[b,w]=(0,d.useState)(),[y,S]=(0,d.useState)(null),[k,T]=(0,d.useState)(!1),[C,_]=(0,d.useState)(!1),[R,I]=(0,d.useState)(null),[B,M]=(0,d.useState)(!1),[L,D]=(0,d.useState)(!1),[z,V]=(0,d.useState)(0),{profileInfo:X}=(0,c.d4)(e=>e.profileInfo),q=(0,o.useRouter)(),Y=(0,c.wA)(),Q=(0,x.g)(),{welcomeModal:G}=(0,c.d4)(e=>e.utilsData),J=(0,W.c)(),{refetch:U,data:K}=(0,rP.H)("",e=>{if(e){let t=null==e?void 0:e.order_id;localStorage.getItem("incomplete_order_hidden_".concat(t))||null==_||_(!0)}}),$=JSON.parse(window.localStorage.getItem("currentLatLng")),{data:ee}=(0,p.useQuery)(["zoneId",location],async()=>rq.k.getZoneId($),{retry:1}),{mutate:et,isLoading:ei}=(0,rY.k)(),{mutate:en}=(0,rQ.d)(),{data:el,refetch:er,isLoading:es}=(0,rX.A)(),eo=(0,eg.e5)(null==K?void 0:K.zone_id,null==ee?void 0:ee.data);(0,d.useEffect)(()=>{U(),er()},[]);let ea=localStorage.getItem("zoneid");(0,d.useEffect)(()=>{window.scrollTo(0,0)},[q.query.search]);let ed=e=>{w(e),Y((0,f.wv)(e))},{refetch:ec}=(0,j.f)(ed),{refetch:ex}=(0,rb.$)(ed);(0,d.useEffect)(()=>{Q&&("rental"===J?ex():ec())},[Q]);let{refetch:ep,data:eu}=(i=e=>{(null==e?void 0:e.order_id)&&(S(e.order_id),T(!0))},(0,p.useQuery)("review",()=>m(),{enabled:!1,onSuccess:i,onError:g.P1}));(0,d.useEffect)(()=>{Q&&ep()},[Q]);let{refetch:eh}=(l=()=>T(!1),(0,p.useQuery)("review-cancel",()=>v(y),{enabled:!1,onSuccess:l,onError:g.Jm}));(0,d.useEffect)(()=>{q.query.data_type||(Y((0,A.hr)([])),Y((0,A.hn)([])),Y((0,A.FS)([])))},[q.query.data_type]);let em=()=>{y&&eh()},ev=e=>{e({order_id:null==K?void 0:K.order_id,_method:"put"},{onSuccess:e=>{toast.success(e.message)},onError:g.Jm})};return(0,n.jsxs)(H.A,{children:[(0,n.jsxs)(Z.jB,{children:[(0,n.jsxs)(Z.jB,{sx:{position:"relative"},children:[(0,n.jsx)(rA.A,{}),(0,n.jsx)(Z.jB,{alignItems:"center",justifyContent:"center",sx:{position:"absolute",top:{xs:-4,sm:50},left:0,right:0},children:(0,n.jsx)(eA.A,{currentTab:z,zoneid:ea,token:Q,searchQuery:(null==(t=q.query)?void 0:t.data_type)==="searched"?q.query.search:"",name:q.query.name,query:q.query})})]}),"rental"===J&&(0,n.jsx)(s.A,{children:(0,n.jsx)(rf.A,{position:"relative"})}),q.query.data_type?(0,n.jsx)(rj,{searchValue:q.query.search,name:q.query.name,isSearch:q.query.fromSearch,routeTo:q.query.from,configData:a,currentTab:z,setCurrentTab:V},q.query.id):(0,n.jsx)(s.A,{width:"100%",children:(()=>{switch((0,W.c)()){case P.A.GROCERY:return(0,n.jsx)(nG,{configData:a});case P.A.PHARMACY:return(0,n.jsx)(lN,{configData:a});case P.A.ECOMMERCE:return(0,n.jsx)(ll,{configData:a});case P.A.FOOD:return(0,n.jsx)(lr,{configData:a});case P.A.PARCEL:return(0,n.jsx)(lD,{configData:a});case P.A.RENTAL:return(0,n.jsx)(rW,{configData:a,landingPageData:u});default:return null}})()})]}),k&&(0,n.jsx)(N.A,{openModal:k,handleClose:em,children:(0,n.jsx)(ej,{handleClose:em,handleRateButtonClick:()=>{q.push("/rate-and-review/".concat(y),void 0,{shallow:!0})},productImage:null==eu?void 0:eu.images})}),(0,n.jsx)(N.A,{handleClose:()=>{Y((0,O.om)(!1))},openModal:G,closeButton:!0,children:(0,n.jsxs)(s.A,{sx:{maxWidth:"382px",width:"95vw",px:1.3,pb:4,textAlign:"center",img:{height:"unset"}},children:[(0,n.jsx)("img",{src:"/static/sign-up-welcome.svg",alt:"welcome",width:183,height:183}),(0,n.jsxs)(s.A,{maxWidth:"308px",mx:"auto",mt:2,children:[(0,n.jsx)(r.A,{variant:"h6",color:"primary",mb:2,children:(0,E.t)("Welcome to ! ".concat(null==a?void 0:a.business_name))}),(0,n.jsxs)(r.A,{variant:"body2",lineHeight:"1.5",children:[(null==X?void 0:X.is_valid_for_discount)?(0,E.t)("Get ready for a special welcome gift, enjoy a special discount on your first order within")+" "+(null==X?void 0:X.validity)+".":" "," ",(0,E.t)("Start exploring the best services around you.")]})]})]})}),Q&&"parcel"!==(0,W.c)()&&(0,n.jsx)(F,{}),Q&&K&&!(Array.isArray(K)&&0===K.length)&&(0,n.jsx)(N.A,{handleClose:()=>{_(!1)},openModal:C,closeButton:!0,children:(0,n.jsx)(rN,{dontShowAgain:L,setDontShowAgain:D,setOpenPaymentModal:M,setOpenIncompleteOrder:_,failPaymentOrderData:K})}),(0,n.jsx)(N.A,{openModal:B,handleClose:()=>M(!1),children:(0,n.jsx)(rV.A,{setPaymentMethod:I,paymentMethod:R,zoneData:ee,configData:a,orderType:null==K?void 0:K.order_type,usePartialPayment:!1,setOpenModel:M,forprescription:null==K?void 0:K.prescription_order,offlinePaymentOptions:el,paymentMethodImage:null,setPaymentMethodImage:null,setSwitchToWallet:null,isZoneDigital:eo,handlePartialPayment:()=>I("wallet"),walletBalance:null==X?void 0:X.wallet_balance,removePartialPayment:null,switchToWallet:null,customerData:{data:X},failed:!0,payableAmount:null==K?void 0:K.order_amount,failedOrderPlace:()=>{(0,eg.Vc)({paymentMethod:R,failPayment:K,handlePayment:ev,paymentMethodUpdateMutation:et,walletPaymentMutation:en,profileInfo:X,orderId:null==K?void 0:K.order_id,baseUrl:h.p,router:q})}})})]})})},84735:(e,t,i)=>{i.d(t,{I:()=>h,q:()=>g});var n=i(37876),l=i(9552),r=i(29053),s=i(35268),o=i(66703),a=i(6995),d=i(89037);i(14232);var c=i(48843);i(79568);let x=(0,s.Ay)(d.A)(e=>{let{theme:t,right:i,isdisabled:n,noBackground:l,isRtl:r,rightSpace:s}=e;return{top:0,height:"100%",width:"42px",transition:"background-image 0.3s ease-in-out, transform 0.3s ease-in-out",transform:"translateX(0)",background:"true"===l?null:"true"===i?"linear-gradient(270deg, ".concat("rtl"===r?"rgba(255, 255, 255, 0)":t.palette.neutral[100]," 0%, ").concat("rtl"===r?t.palette.neutral[100]:"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 100%)"):"linear-gradient(".concat("rtl"===r?"to left":"to right",", ").concat("rtl"===r?"rgba(255, 255, 255, 0)":"rgba(75, 86, 107, 0.05) -28.57%, rgba(255, 255, 255, 0) 122.62%"," 0%, ").concat("rtl"===r?t.palette.neutral[100]:"rgba(255, 255, 255, 0)"," 100%)"),zIndex:1,right:"true"===i&&"-8px",left:"true"!==i&&0,position:"absolute",alignItems:"center",justifyContent:"center",display:n?"none":"flex",borderTopRightRadius:"12px",borderBottomRightRadius:"12px",[t.breakpoints.down("sm")]:{display:"none"}}}),p=(0,s.Ay)(d.A)(e=>{let{theme:t,isdisabled:i}=e;return{zIndex:1,top:"50%",left:0,display:i?"none":"flex",alignItems:"center",justifyContent:"center",backgroundColor:t.palette.primary.main,boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",height:"35px",width:"35px",borderRadius:"50%","&:hover":{backgroundColor:t.palette.primary.dark}}}),u=(0,s.Ay)(d.A)(e=>{let{theme:t,isdisabled:i}=e;return{top:"50%",zIndex:1,right:8,display:i?"none":"flex",backgroundColor:t.palette.primary.main,borderRadius:"50%",boxShadow:"rgba(149, 157, 165, 0.2) 0px 8px 24px",alignItems:"center",justifyContent:"center",height:"35px",width:"35px","&:hover":{backgroundColor:t.palette.primary.deep}}}),h=e=>{let{onClick:t,className:i,displayNoneOnMobile:s,noBackground:d,rightSpace:p}=e,h=(0,o.A)(),g=(0,a.A)(h.breakpoints.down("sm"));return(0,n.jsx)(x,{isdisabled:!!g&&!!s||(null==i?void 0:i.includes("slick-disabled")),right:"true",noBackground:d?"true":"false",isRtl:(0,c.Z)(),rightSpace:p,children:(0,n.jsx)(u,{className:"client-nav client-next ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,c.Z)()?(0,n.jsx)(l.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:h.palette.neutral[100]}}}):(0,n.jsx)(r.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:h.palette.neutral[100]}}})})})},g=e=>{let{onClick:t,className:i,displayNoneOnMobile:s,noBackground:d,lanDirection:u}=e,h=(0,o.A)(),g=(0,a.A)(h.breakpoints.down("sm")),m=(0,c.Z)();return(0,n.jsx)(x,{isdisabled:!!g&&!!s||(null==i?void 0:i.includes("slick-disabled")),noBackground:d?"true":"false",isRtl:m,children:(0,n.jsx)(p,{className:"client-nav client-prev ".concat(i),onClick:t,isdisabled:null==i?void 0:i.includes("slick-disabled"),children:"rtl"===(0,c.Z)()?(0,n.jsx)(r.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:h.palette.neutral[100]}}}):(0,n.jsx)(l.A,{sx:{fontSize:"30px",color:e=>e.palette.neutral[600],"&:hover":{color:h.palette.neutral[100]}}})})})}},87867:(e,t,i)=>{i.d(t,{k:()=>o});var n=i(60398),l=i(64907),r=i(1992);let s=async e=>{let{data:t}=await n.A.post("".concat(l.a_),e);return t},o=()=>(0,r.useMutation)("update-payment-method",s)},93095:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(37876);i(14232),i(52904);var l=i(35268),r=i(28343);i(68628);var s=i(37571);let o=(0,l.Ay)(r.iv)(e=>{let{theme:t}=e;return{position:"relative",borderRadius:"10px",height:"318px",[t.breakpoints.down("sm")]:{height:"110px"}}}),a=e=>{let{bannerData:t}=e;return(0,n.jsx)(n.Fragment,{children:(null==t?void 0:t.bottom_section_banner)&&(0,n.jsx)(o,{sx:{marginTop:"1rem",img:{width:"100%",height:"100%"}},children:(0,n.jsx)(s.A,{height:318,width:1440,src:null==t?void 0:t.bottom_section_banner_full_url,objectFit:"cover"})})})};a.propTypes={};let d=a},99035:(e,t,i)=>{i.d(t,{H:()=>a});var n=i(1992),l=i(60398),r=i(64907),s=i(35502);let o=async e=>{let{data:t}=await l.A.get("".concat(r.gX,"?order_id=").concat(e,"&&guest_id=").concat((0,s.W)()));return t},a=(e,t)=>(0,n.useQuery)(["failed-payment",e],()=>o(e),{onSuccess:t,enabled:!1,retry:1})}}]);