"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7309],{6691:(e,t,l)=>{l.d(t,{A:()=>v});var r=l(37876),n=l(14232),a=l(4055),i=l(82),o=l(71733),s=l(41681),d=l(3801),c=l(28343),u=l(9792),h=l(10602),p=l(80604);let x=e=>{let t,{handleSearchResult:l,label:x,isLoading:v,selectedValue:m,setIsEmpty:g,setSearchValue:A,type2:f}=e,{t:j}=(0,i.Bd)(),[y,b]=(0,n.useState)("");t=localStorage.getItem("direction"),(0,n.useEffect)(()=>{m?b(m):b("")},[m]);let w=e=>{"Enter"===e.key&&(l(e.target.value),e.preventDefault())},S=e=>{""===e?(null==l||l(""),null==g||g(!0)):null==g||g(!1),b(e),null==A||A(e)};return(0,r.jsx)("form",{onSubmit:w,children:(0,r.jsx)(u.v,{direction:"row",alignItems:"center",type2:f,children:f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{sx:{color:e=>(0,h.c)()===p.A.FOOD?e.palette.moduleTheme.food:"primary.main",marginInlineStart:"15px",marginInlineEnd:"-8px"}}),(0,r.jsx)(u.X,{placeholder:j(x),value:y,onChange:e=>S(e.target.value),onKeyPress:e=>w(e),language_direction:t})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.X,{id:"search-input",placeholder:j(x),value:y,onChange:e=>S(e.target.value),onKeyPress:e=>w(e),language_direction:t}),""===y?(0,r.jsx)(a.A,{sx:{marginInlineEnd:"12px"}}):(0,r.jsx)(r.Fragment,{children:v?(0,r.jsx)(c.Vi,{right:-1,language_direction:t,children:(0,r.jsx)(d.A,{loading:!0,variant:"text",sx:{width:"10px"}})}):(0,r.jsx)(c.Vi,{onClick:()=>void(b(""),null==l||l("","true"),null==g||g(!0)),language_direction:t,right:"20px",children:(0,r.jsx)(o.A,{sx:{marginRight:"-4px !important"},children:(0,r.jsx)(s.A,{fontSize:"small"})})})})]})})})};x.propTypes={};let v=x},9792:(e,t,l)=>{l.d(t,{X:()=>c,v:()=>d});var r=l(35268),n=l(74441),a=l(42023),i=l(28343),o=l(10602),s=l(80604);let d=(0,r.Ay)(i.jB)(e=>{let{theme:t,type2:l}=e;return{backgroundColor:t.palette.neutral[100],color:t.palette.neutral[600],height:"40px",border:l?"1px solid ".concat((0,n.X4)((0,o.c)()===s.A.FOOD?t.palette.moduleTheme.food:t.palette.primary.main,.4)):"1px solid ".concat((0,n.X4)(t.palette.neutral[500],.4)),borderRadius:"5px",transition:t.transitions.create(["box-shadow","border-color"],{duration:t.transitions.duration.short}),"&:focus-within":{border:"1px solid ".concat((0,o.c)()===s.A.FOOD?t.palette.moduleTheme.food:t.palette.primary.main),boxShadow:"0 4px 12px ".concat((0,n.X4)((0,o.c)()===s.A.FOOD?t.palette.moduleTheme.food:t.palette.primary.main,.25),", 0 0 0 1px ").concat((0,n.X4)((0,o.c)()===s.A.FOOD?t.palette.moduleTheme.food:t.palette.primary.main,.1))}}}),c=(0,r.Ay)(a.Ay)(e=>{let{theme:t,language_direction:l}=e;return{color:(0,o.c)()===s.A.FOOD?t.palette.moduleTheme.food:"primary.main",width:"100%","& .MuiInputBase-input":{padding:"10px 17px",transition:t.transitions.create("width"),width:"100%"}}})},17701:(e,t,l)=>{l.d(t,{A:()=>el});var r=l(37876),n=l(66703),a=l(6995),i=l(35003),o=l(82),s=l(10602),d=l(80604),c=l(28343),u=l(14232),h=l(38388),p=l(6691),x=l(14e3),v=l(58582),m=l(60795),g=l(35268),A=l(89099),f=l(62712),j=l(60398),y=l(1992),b=l(77165),w=l(64907);let S=async()=>{let{data:e}=await j.A.get("".concat(w.XI));return e};var T=l(84812),C=l(71733),_=l(28249),E=l(99949);let k=e=>{let{list:t,t:l,handleSearchHistoryOnClick:n,handleDeleteAble:a,clearAll:o}=e;return(0,r.jsxs)(m.A,{children:[(0,r.jsxs)(m.A,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(i.A,{sx:{my:"10px",color:e=>e.palette.neutral[500],fontSize:"1rem"},children:l("Recent Searches")}),(0,r.jsx)(T.A,{onClick:o,sx:{color:e=>e.palette.error.main,fontWeight:"400"},children:l("Clear All")})]}),(0,r.jsx)(c.jB,{children:t.slice(0,5).reverse().map((e,t)=>(0,r.jsxs)(c.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,r.jsxs)(m.A,{direction:"row",alignItems:"center",onClick:()=>n(e),sx:{cursor:"pointer"},spacing:.5,children:[(0,r.jsx)(E.A,{sx:{fontSize:"18px"}}),(0,r.jsx)(i.A,{sx:{color:e=>e.palette.neutral[700]},children:e})]}),(0,r.jsx)(C.A,{sx:{borderRadius:"50%"},children:(0,r.jsx)(_.A,{onClick:()=>a(e),sx:{color:e=>e.palette.neutral[400],fontSize:"18px"}})})]},t))})]})},R=e=>{let{list:t,handleSearchHistoryOnClick:l,handleDeleteAble:n,t:a,clearAll:i,suggestedKeywords:o}=e;return(0,r.jsx)(c.jB,{spacing:2,children:(0,r.jsx)(k,{list:t,handleSearchHistoryOnClick:l,handleDeleteAble:n,t:a,clearAll:i})})};var V=l(41316),O=l(82179),I=l(59435),D=l(24607);let L=(e,t)=>{if(!t||!e)return e;let l=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=RegExp("(".concat(l,")"),"gi"),a=e.split(n);return(0,r.jsx)(r.Fragment,{children:a.map((e,t)=>{let l=n.test(e);return n.lastIndex=0,l?(0,r.jsx)("span",{style:{fontWeight:"bold"},children:e},t):(0,r.jsx)("span",{children:e},t)})})},F=e=>{var t,l;let{t:n,data:a,handleKeyPress:o,isRefetching:s,searchValue:d}=e;return(0,r.jsx)(r.Fragment,{children:s?(0,r.jsx)(f.A,{variant:"text",width:"60px"}):a&&(0,r.jsxs)(c.jB,{children:[(0,r.jsx)(i.A,{sx:{my:"10px",color:e=>e.palette.neutral[500]},children:n("Suggested Searches")}),(0,r.jsx)(c.iv,{children:(0,r.jsx)(D.Z,{style:{maxHeight:"400px"},children:(0,r.jsxs)(V.Ay,{container:!0,spacing:2,children:[(null==a||null==(t=a.items)?void 0:t.length)>0&&(0,r.jsx)(V.Ay,{item:!0,xs:12,children:(0,r.jsxs)(c.jB,{spacing:2,children:[(0,r.jsx)(i.A,{fontSize:"14px",fontWeight:"500",children:n("Items")}),null==a?void 0:a.items.map((e,t)=>(0,r.jsxs)(O.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{cursor:"pointer"},onClick:()=>null==o?void 0:o(null==e?void 0:e.name),children:[(0,r.jsx)(I.A,{}),(0,r.jsx)(i.A,{sx:{color:e=>e.palette.neutral[600]},children:L(null==e?void 0:e.name,d)})]},t))]})}),(null==a||null==(l=a.stores)?void 0:l.length)>0&&(0,r.jsx)(V.Ay,{item:!0,xs:12,children:(0,r.jsxs)(c.jB,{spacing:2,children:[(0,r.jsx)(i.A,{fontSize:"14px",fontWeight:"500",children:n("Stores")}),null==a?void 0:a.stores.map((e,t)=>(0,r.jsxs)(O.A,{direction:"row",alignItems:"center",spacing:1.5,sx:{cursor:"pointer"},onClick:()=>null==o?void 0:o(null==e?void 0:e.name),children:[(0,r.jsx)(I.A,{}),(0,r.jsx)(i.A,{sx:{color:e=>e.palette.neutral[700]},children:L(null==e?void 0:e.name,d)})]},t))]})})]})})})]})})},M=(0,g.Ay)(v.A)(e=>{let{theme:t,display:l,padding:r}=e;return{position:"absolute",top:(0,s.c)()===d.A.FOOD?77:42,width:"100%",padding:"1.5rem 1.5rem 2rem 1.5rem",zIndex:999,display:l||"inherit",borderTopLeftRadius:"5px",borderTopRightRadius:"5px"}}),N=e=>{var t,l,n;let a,{searchValue:i,setOpenSearchSuggestions:s,setOnSearchdiv:d,setSelectedValue:h,isEmpty:p,handleKeyPress:x,itemOrStoreSuggestionData:v,isRefetchingItemOrStoreSuggestion:g}=e,[j,w]=(0,u.useState)([]),[T,C]=(0,u.useState)([]),{t:_}=(0,o.Bd)(),E=(0,A.useRouter)();a=localStorage.getItem("token");let{refetch:k,isRefetching:V}=(n=e=>{w(e)},(0,y.useQuery)("suggested-products",S,{enabled:!1,onSuccess:n,onError:b.P1}));return(0,u.useEffect)(()=>{let e=JSON.parse(localStorage.getItem("searchedValues"));e&&e.length>0&&C(Array.from(new Set([...T,...e]))),a&&k()},[]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(M,{elevation:8,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),display:T.length>0||v?"inherit":"none",children:(0,r.jsxs)(c.jB,{spacing:1,children:[p?(0,r.jsx)(r.Fragment,{children:T.length>0&&(0,r.jsx)(R,{list:T,handleSearchHistoryOnClick:e=>{h(e),s(!1),E.push({pathname:"/home",query:{search:e,data_type:"searched"}},void 0,{shallow:!0})},handleDeleteAble:e=>{let t=JSON.parse(localStorage.getItem("searchedValues"));if(t&&t.length>0){let l=t.filter(t=>t!==e);C(l),localStorage.setItem("searchedValues",JSON.stringify(l))}},t:_,suggestedKeywords:j,clearAll:()=>{C([]),localStorage.removeItem("searchedValues")}})}):(0,r.jsx)(r.Fragment,{children:((null==v||null==(t=v.items)?void 0:t.length)>0||(null==v||null==(l=v.stores)?void 0:l.length)>0)&&(0,r.jsx)(F,{t:_,data:v,handleKeyPress:x,isRefetching:g,searchValue:i})}),V&&(0,r.jsxs)(m.A,{spacing:1,children:[(0,r.jsx)(f.A,{variant:"text",width:"120px"}),(0,r.jsxs)(m.A,{direction:"row",spacing:1,flexWrap:"wrap",flexGrow:1,alignItems:"center",justifyContent:"flex-start",children:[(0,r.jsx)(f.A,{variant:"text",width:"120px",height:"40px"}),(0,r.jsx)(f.A,{variant:"text",width:"120px",height:"40px"}),(0,r.jsx)(f.A,{variant:"text",width:"120px",height:"40px"})]})]})]})})})};N.propTypes={};var P=l(97914),W=l(74441);let H=async e=>{if(""!==e){let{data:t}=await j.A.get("".concat(w.gy,"?name=").concat(e));return t}};var B=l(68628);let z=e=>{var t;let l,{zoneid:n,fullWidth:a,searchQuery:i,name:o,query:c,currentTab:v}=e,m=(0,x.useRouter)(),[g,A]=(0,u.useState)(!1),[f,j]=(0,u.useState)(""),[w,S]=(0,u.useState)(!1),[T,C]=(0,u.useState)(null),[_,E]=(0,u.useState)(!0),[k,R]=(0,u.useState)("");(0,u.useEffect)(()=>{void 0===i&&R("")},[i]),(0,u.useEffect)(()=>{0===v?C("category"):C("all")},[v]);let V=(e,t)=>{if(""!==e){A(!1);let t=JSON.parse(localStorage.getItem("searchedValues"))||[];e&&!t.includes(e)&&(t.push(e),localStorage.setItem("searchedValues",JSON.stringify(t)));let l={...c,search:e,data_type:"searched"};m.replace({pathname:m.pathname,query:l},void 0,{shallow:!0})}else if("true"===t&&i){let t={...c,search:e,data_type:T};m.replace({pathname:m.pathname,query:t},void 0,{shallow:!0})}else R("")},{data:O,refetch:I,isRefetching:D}=(t=(0,B.SS)(k),(0,y.useQuery)("item-and-store-suggestions",()=>H(t),{enabled:!1,onError:b.P1})),L=async()=>{l&&clearTimeout(l),l=setTimeout(async()=>{await I()},500)};(0,u.useEffect)(()=>{L()},[k]),(0,u.useEffect)(()=>{if(O){var e,t;(null==O||null==(e=O.items)?void 0:e.length)===0&&(null==O||null==(t=O.stores)?void 0:t.length)===0?A(!1):A(!0)}},[null==O?void 0:O.items,null==O?void 0:O.stores]);let F=()=>{""===k?E(!0):E(!1),A(!0),localStorage.setItem("bg",!0)},M=(0,u.useRef)(null);return(0,u.useEffect)(()=>{function e(e){M.current&&!M.current.contains(e.target)&&(A(!1),E(!0))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[M]),(0,r.jsx)(h.A,{sx:{position:"relative",width:"100%",maxWidth:{xs:a?"100%":"300px",sm:"440px",md:"600px"}},onFocus:()=>F(),ref:M,children:n&&"/"!==m.pathname&&(0,r.jsxs)(r.Fragment,{children:[(0,s.c)()===d.A.FOOD?(0,r.jsx)(h.A,{sx:{backgroundColor:e=>(0,W.X4)(e.palette.moduleTheme.food,.4),padding:{xs:"8px",md:"16px"},borderRadius:"2px"},children:(0,r.jsx)(p.A,{label:(0,P.t)("Search foods and restaurants..."),handleSearchResult:V,selectedValue:i,setIsEmpty:E,handleOnFocus:F,setSearchValue:R})}):(0,r.jsx)(p.A,{label:(0,P.t)((0,s.c)()===d.A.GROCERY?"Search for grocery or store...":(0,s.c)()===d.A.PHARMACY?"Search for medicine or store...":(0,s.c)()===d.A.ECOMMERCE?"Search for products or store...":void 0),handleSearchResult:V,selectedValue:i,setIsEmpty:E,handleOnFocus:F,setSearchValue:R}),g&&(0,r.jsx)(N,{searchValue:k,setOnSearchdiv:S,setOpenSearchSuggestions:A,setSelectedValue:j,isEmpty:_,handleKeyPress:V,itemOrStoreSuggestionData:O,isRefetchingItemOrStoreSuggestion:D})]})})};z.propTypes={};var X=l(1912),q=l(37261),J=l(21459),G=l(21398),U=l(95377),Y=l(97685),K=l(16392),Q=l(74695),Z=l(48843),$=l(35502);let ee=(0,J.A)(q.jn)(e=>{let{theme:t,fontSize:l,smPadding:r,minWidth:n,radius:a}=e;return{fontWeight:"400",width:"100%",[t.breakpoints.down("sm")]:{fontSize:l||"12px",fontWeight:"400",padding:r,minWidth:n,borderRadius:a||"2px"}}}),et=()=>{let e=(0,G.u)(),t=(0,a.A)(e.breakpoints.down("sm")),[l,n]=(0,u.useState)(""),{configData:i}=(0,Q.d4)(e=>e.configData),[o,s]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),p=(0,$.g)(),x=(0,Z.Z)()?(0,Z.Z)():"ltr";return(0,r.jsxs)(c.jB,{justifyContent:"center",alignItems:"center",children:[(0,r.jsx)(O.A,{spacing:1,direction:"row",width:"100%",justifyContent:"center",sx:{backgroundColor:e=>e.palette.neutral[100],maxWidth:"710px",borderRadius:"10px",padding:"1rem",boxShadow:"0px 15px 30px 0px rgba(71, 71, 71, 0.10)",marginTop:"58px"},children:(0,r.jsxs)(O.A,{maxWidth:{xs:"252px",sm:"252px",md:"100%"},width:"100%",direction:{xs:"column",sm:"column",md:"row"},spacing:1,children:[(0,r.jsx)(X.A,{label:(0,P.t)("Order ID"),variant:"outlined",value:l,onChange:e=>n(e.target.value),fullWidth:!0,InputProps:{sx:{height:t?35:43,backgroundColor:e=>e.palette.neutral[100],borderRadius:"10px"}},InputLabelProps:{style:{fontSize:t?10:14,color:"GrayText",top:t?"-5px":"-4px"}}}),!p&&(0,r.jsx)(K.A,{value:o,onHandleChange:e=>{s("+".concat(e))},initCountry:null==i?void 0:i.country,lanDirection:x,height:t?"35px":"43px",borderRadius:"8px",background:"dark"===e.palette.mode?"transparent":"none"}),(0,r.jsx)(O.A,{maxWidth:t?"100%":"120px",width:"100%",children:(0,r.jsx)(ee,{radius:"10px",smPadding:"7px 16px",fullWidth:"true",onClick:()=>{l?p||o?h(!0):Y.Ay.error("Need a contact number"):Y.Ay.error("Need a order id")},children:(0,P.t)("Track Now")})})]})}),d&&(0,r.jsx)(U.A,{orderId:l,sideDrawerOpen:d,setSideDrawerOpen:h,phoneOrEmail:o})]})},el=e=>{let t=(0,n.A)(),{t:l}=(0,o.Bd)(),u=(0,a.A)(t.breakpoints.down("sm")),h=(0,s.c)(),{zoneid:p,token:x,searchQuery:v,name:m,query:g,currentTab:A}=e,{configData:f}=(0,Q.d4)(e=>e.configData),j=l("Get your car rental service with"),y=l("with affordable price."),b=()=>{switch((0,s.c)()){case d.A.GROCERY:return{title:"Fresh Item that deserve to eat",subTitle:"Get your groceries items delivered in less than an hour"};case d.A.PHARMACY:return{title:"Quality Medicines & Health care at your Doorstep.",subTitle:""};case d.A.ECOMMERCE:return{title:"Exclusive collection for everyone",subTitle:"Get Your Desired High Quality Products Here"};case d.A.FOOD:return{title:"FIND YOUR HAPPINESS",subTitle:"For the love of delicious food."};case d.A.PARCEL:return{title:"Track your Products",subTitle:"Now you can track your products easily whenever you want."};case d.A.RENTAL:return{title:"Rent best car for best experience",subTitle:"".concat(j," ").concat(null==f?void 0:f.business_name," ").concat(y)};default:return{title:"",subTitle:""}}};return(0,r.jsxs)(c.jB,{alignItems:"center",justifyContent:"center",spacing:u?1:3,p:u?"25px":"20px",mt:"rental"===d.A.RENTAL?{xs:0,sm:2}:0,children:[(0,r.jsxs)(c.jB,{alignItems:"center",justifyContent:"center",spacing:1.5,children:[(0,r.jsx)(i.A,{variant:u?"h6":"h5",textAlign:"center",fontWeight:"600",lineHeight:"33.18px",component:"h1",sx:{fontSize:{md:"rental"===d.A.RENTAL&&"30px !important"},textTransform:"rental"===d.A.RENTAL?"capitalize":"initial"},children:l(b().title)}),(0,r.jsx)(i.A,{variant:u?"subtitle2":"subtitle1",textAlign:"center",sx:{color:e=>"dark"===e.palette.mode?e.palette.neutral[1e3]:e.palette.neutral[400]},fontWeight:"400",lineHeight:"18.75px",component:"p",children:l(b().subTitle)})]}),"parcel"===h?(0,r.jsx)(et,{}):"rental"===h?null:(0,r.jsx)(z,{zoneid:p,token:x,maxwidth:"false",fullWidth:!0,searchQuery:v,name:m,query:g,currentTab:A})]})}},23214:(e,t,l)=>{l.d(t,{A:()=>c});var r=l(37876),n=l(14232),a=l(35268),i=l(11577),o=l(60795),s=l(74695);let d=(0,a.Ay)(i.Ay)(e=>{let{theme:t}=e;return{"& .MuiSlider-rail":{height:"5px",backgroundColor:t.palette.neutral[600]},"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{backgroundColor:t.palette.neutral[100],border:"4px solid ".concat(t.palette.primary.main),boxShadow:"0px 2px 4px rgba(9, 87, 203, 0.15)"}}}),c=e=>{var t,l;let{handleChangePrice:a,minMax:i,priceFilterRange:c,store:u,rentalPriceFilterRange:h}=e,{filterData:p}=(0,s.d4)(e=>e.searchFilterStore),[x,v]=(0,n.useState)((h||i).map(Number));(()=>{let e=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{e.current=!1},[]),e.current})(),(0,n.useEffect)(()=>{h&&v(h.map(Number))},[h]);let m=Number(null!=(t=null==h?void 0:h[0])?t:0),g=Number(null!=(l=null==h?void 0:h[1])?l:2e4);return(0,r.jsx)(o.A,{direction:"row",sx:{mb:1},alignItems:"center",spacing:1,px:".7rem",children:(0,r.jsx)(d,{value:x,onChange:(e,t,l)=>{Array.isArray(t)&&(0===l?v([Math.min(t[0],x[1]-1),x[1]]):v([x[0],Math.max(t[1],x[0]+1)]))},onChangeCommitted:(e,t)=>{a(t)},valueLabelDisplay:"auto",min:m,max:g,marks:[{value:m},{value:g}],disableSwap:!0})})}},32294:(e,t,l)=>{l.d(t,{R:()=>c,A:()=>h});var r=l(37876);l(14232);var n=l(21459),a=l(82179),i=l(64266),o=l(66703),s=l(71918),d=l(82);l(80885);let c=(0,n.A)(e=>{let{checkedColor:t,...l}=e;return(0,r.jsx)(i.A,{...l})})(e=>{let{checkedColor:t,module:l,theme:r}=e;return{"& .MuiIconButton-label":{color:t},"&.Mui-checked":{color:"food"===l?r.palette.moduleTheme.food:r.palette.mian,"& .MuiIconButton-label":{color:r.palette.neutral[100]}}}}),u=e=>{var t,l;let{data:n,selected:i,handleSelection:u,setCheckState:h,checkState:p}=e,{t:x}=(0,d.Bd)();(0,o.A)();let v=e=>{h({...p,[e.target.name]:e.target.checked})},m=()=>JSON.parse(window.localStorage.getItem("module"));return(0,r.jsxs)(a.A,{direction:"row",alignItems:"center",spacing:2,width:"100%",children:[(0,r.jsx)(s.A,{control:(0,r.jsx)(c,{module:null==(t=m())?void 0:t.module_type,checked:null==p?void 0:p.veg,onChange:v,name:"veg"}),label:x("Veg")}),(0,r.jsx)(s.A,{control:(0,r.jsx)(c,{module:null==(l=m())?void 0:l.module_type,checked:null==p?void 0:p.non_veg,onChange:v,name:"non_veg"}),label:x("Non-Veg")})]})};u.propTypes={};let h=u},41065:(e,t,l)=>{l.d(t,{A:()=>y});var r=l(37876),n=l(66703);l(74441);var a=l(89037),i=l(10602),o=l(80604),s=l(28343),d=l(52904);let c={src:"/_next/static/media/banner.b54ced6c.webp"},u={src:"/_next/static/media/ecommerce_top_bg.0058350a.png"},h={src:"/_next/static/media/food.53052edd.png"},p={src:"/_next/static/media/par.c82b8ffb.png"},x={src:"/_next/static/media/parcelBg.2bbad5b5.png"},v=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1541",height:"242",fill:"none",viewBox:"0 0 1541 242",preserveAspectRatio:"none",...e,children:[(0,r.jsx)("g",{clipPath:"url(#clip0_5357_46006)",children:(0,r.jsx)("path",{fill:"#152e6e",fillOpacity:"0.05",fillRule:"evenodd",d:"m1452.94 242.845-.3-10.529v-.859l-.76-27.107v-.86l-.71-27.06-.05-.859-.71-27.107-.05-.86-.71-27.06-.05-.859-.71-27.107v-.86l-.76-27.06V63.8l-.77-27.106v-.86l-.52-19.262-23.54-16.74v243.014h-4.01V35.968l-23.52 12.127h-14.73v194.75h-5.33V153.74h-3.66v-13.641h-3.35c-.52-11.296-9.84-20.293-21.26-20.293-11.43 0-20.76 8.997-21.28 20.293h-3.35v13.641h-3.65v89.105h-4.33V95.481h-6.15l-23.57-10.938v158.302h-3.33V55.931l-6.4 1.893V40.167l-26.59-7.85v33.371l-6.4 1.892v175.265h-2.19V139.268l-26.43-10.479v114.056h-2.84V108.273h-2.32v-6.656h-21.78v6.656h-2.33v134.572h-1.52V188.78h-26.43v54.065h-1.82v-88.009h-26.45v66.932h-1.84v-98.19h-15.8v76.193h-1.82V41.969h-26.44v200.876h-2.41v-48.467h-3v-4.984h-25.17v4.984h-3v48.467h-1.27v-28.89h-24.28v28.89h-2.5v-80.233h1.33V157.4h-1.22l-15.85-41.803-15.854 41.803h-1.234v5.212h1.328v80.233h-2.563v-63.48h-1.133v-3.725H984.5v-2.373h-16.094v2.373h-1.054v3.725h-1.149v63.48h-1.613V182.57h-23.856v60.275h-3.622v-47.413h-6.159v47.413h-3.346v-74.028h-9.318v74.028h-2.769v-48.101h-15.862v-30.971h-15.861v79.072h-2.288v-92.244h-2.171V143.8h-23.916v6.801h-5.244V143.8h-11.709v6.801h-2.172v22.61h-37.852v69.634h-3.022V129.782h-26.439v30.591h-13.211v82.472h-4.696v-49.336h-1.457v-3.8h-16.058v3.8h-3.506v-3.8h-7.868v3.8h-1.469v49.336h-2.138V89.373h-3.566v-4.199h-28.593v4.199h-3.578v153.472h-2.543v-69.486h-15.274v-64.264h-14.653V61.653h-21.812v181.192h-5.195V140.972l-4.779-1.825v-5.054l-4.78-2.233v-8.329l-16.605-9.986v129.3h-2.627v-63.549h-1.769v-7.539h-1.472v-8.82h-4.616v8.82h-11.125v7.539h-1.766v63.549h-2.745V132.244l-1.523.762-.999.52-.829.423V122.75h-1.66v-21.356L548.766 95.7v27.05h-1.657v21.708l-.95.485-.998.474-1.38.715v69.76H539.5v-50.735h-25.922v77.688h-2.514v-52.03l-2.863-.939v-8.146l-27.029-8.872v8.158l-2.867-.94v62.769h-7.006v-95.241l-33.721 13.131v82.11h-3.163V96.071L416.5 108.82v134.024h-3.373V132.054l-35.908-11.561v122.352h-4.09V140.423h-30.535v102.422h-2.825v-72.616h-1.891c-1.324-6.376-6.971-11.17-13.744-11.17-6.768 0-12.42 4.794-13.746 11.17H308.5v72.616h-3.003V57.705H286.5v185.14h-1.628v-42.75h-14.64v-71.864h-.913v-8.314h-2.866v8.314h-11.439v-8.314h-2.866v8.314h-.914v114.614h-4.289v-56.726h-30v-53.684h-1.549v-7.669h-1.41v-7.162h-1.4v-6.493L189 114.274v3.33h-1.414v7.162h-1.414v7.669h-1.531v110.41h-2.521V185.91h-2.243v-6.094h-2.002v-6.242h-25.477v6.242h-1.992v6.094h-2.258v56.935h-3.285V62.295h-27.441v180.55h-2.615V157.92L84.5 160.671v82.174h-1.67V91.947l-19.978-4.998v155.896h-2.124V143.93h-8.51v98.915H50.17v-54.933H30.188v19.661H15.195v35.272H.031v19.248H1541.05v-19.248h-5.21v-76.577h-4.67v22.625h-2.65v-10.205h-23.29v10.205h-2.67v-22.626h-4.65v76.578h-3.77V110.154h-3.77v-4.872h-2.9v-5.49h-24.57v5.49h-2.92v4.872h-3.76v132.691zm-398.82-59.118h20.52v5.606h-20.52z",clipRule:"evenodd"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_5357_46006",children:(0,r.jsx)("path",{fill:"#fff",d:"M0 0h1541v242H0z"})})})]}),m={src:"/_next/static/media/left_car.2821ddc9.png"},g={src:"/_next/static/media/right_car.79783465.png"};var A=l(14232),f=l(54587),j=l.n(f);let y=()=>{let[e,t]=(0,A.useState)(null),l=(0,n.A)();return(0,A.useEffect)(()=>{t((0,i.c)())},[]),(0,r.jsx)(s.iv,{sx:{minHeight:{xs:"parcel"===e?"250px":"160px",sm:"270px",md:"270px"},backgroundColor:l.palette.neutral[100],position:"relative",overflow:"hidden"},children:"rental"===(0,i.c)()?(0,r.jsxs)(a.A,{sx:{svg:{position:"absolute"},".left_img":e=>({position:"absolute",left:"-150px",bottom:0,[e.breakpoints.up("sm")]:{left:"-60px"}}),".right_img":e=>({position:"absolute",left:"auto",right:"-150px",bottom:0,[e.breakpoints.up("sm")]:{right:"-50px"}})},children:[(0,r.jsx)(v,{height:"100%",width:"100%",objectFit:"cover"}),(0,r.jsx)(d.A,{className:"left_img",src:null==m?void 0:m.src,width:238,height:94}),(0,r.jsx)(d.A,{className:"right_img",src:null==g?void 0:g.src,width:246,height:122})]}):(0,r.jsx)(a.A,{sx:{position:"absolute",height:"100%",width:"100%",img:{objectFit:"cover",width:"100%",height:"100%"}},children:(0,r.jsx)(j(),{width:1917,height:270,src:(()=>{switch((0,i.c)()){case o.A.GROCERY:return null==c?void 0:c.src;case o.A.PHARMACY:return null==p?void 0:p.src;case o.A.ECOMMERCE:return null==u?void 0:u.src;case o.A.FOOD:return null==h?void 0:h.src;case o.A.PARCEL:return null==x?void 0:x.src;default:return"inherit"}})(),alt:"banner",priority:!0})})})}},80885:(e,t,l)=>{l.d(t,{A:()=>h});var r=l(37876),n=l(21398),a=l(71918),i=l(35003),o=l(14232),s=l(32294),d=l(10602),c=l(97914);let u=e=>{let{item:t,checkHandler:l,isChecked:u,seats:h}=e,p=(0,n.u)(),[x,v]=(0,o.useState)(!1);return(0,o.useRef)(null),(0,o.useEffect)(()=>{v(u)},[u]),(0,r.jsx)(a.A,{control:(0,r.jsx)(s.R,{module:(0,d.c)(),value:null==t?void 0:t.value,checked:x,onChange:e=>{v(e.target.checked),null==l||l({checked:e.target.checked,id:null==t?void 0:t.id,value:null==t?void 0:t.value})},inputProps:{"aria-label":"controlled"}}),label:(0,r.jsx)(i.A,{color:p.palette.text.primary,fontSize:"13px",noWrap:!0,children:h?"".concat((0,c.t)(null==t?void 0:t.name)," ").concat((0,c.t)("Seats")):(0,c.t)(null==t?void 0:t.name)})})};u.propTypes={};let h=u},93445:(e,t,l)=>{l.d(t,{A:()=>F});var r=l(37876),n=l(87285),a=l(89037),i=l(82179),o=l(66703),s=l(84812),d=l(74441),c=l(52782),u=l(24779),h=l(18952),p=l(20243),x=l(6854),v=l(97557),m=l(60230),g=l(48677),A=l(14247),f=l(14232),j=l(28343),y=l(55785),b=l(73862),w=l(74695),S=l(18538),T=l(89099),C=l(28201),_=l(19886),E=l(17203),k=l(14e3),R=l(56557),V=l.n(R),O=l(97914),I=l(97685),D=l(46957),L=l(30941);let F=e=>{var t;let{isSticky:l,height:R,position:F,mt:M,top:N="auto",bottom:P=0,showSearch:W=!0}=e,H=(0,o.A)(),B=(0,T.useRouter)(),z=(0,k.usePathname)(),X=(0,w.wA)(),[q,J]=(0,f.useState)(!1),{configData:G}=(0,w.d4)(e=>e.configData),{rentalSearch:U}=(0,w.d4)(e=>null==e?void 0:e.rentalSearch),[Y,K]=(0,f.useState)(!1),[Q,Z]=(0,f.useState)("distance_wise"),[$,ee]=(0,f.useState)((null==U?void 0:U.duration)||""),[et,el]=(0,f.useState)(V()),[er,en]=(0,f.useState)({...null==G?void 0:G.default_location}),[ea,ei]=(0,f.useState)(""),[eo,es]=(0,f.useState)(""),[ed,ec]=(0,f.useState)([]),[eu,eh]=(0,f.useState)(!1),[ep,ex]=(0,f.useState)(!1),[ev,em]=(0,f.useState)(!1),eg=(0,f.useRef)(null),eA=(0,f.useRef)(null);(0,f.useEffect)(()=>{let e=e=>{eg.current&&!eg.current.contains(e.target)&&("hourly"===Q||(null==U?void 0:U.tripType)==="hourly"||"day_wise"===Q||(null==U?void 0:U.tripType)==="day_wise"?eA.current&&!eA.current.contains(e.target)&&K(!1):"distance_wise"===Q&&K(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[Q]),(0,f.useEffect)(()=>{let e=()=>{window.scrollY>100?em(!0):em(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]);let ef=JSON.parse(localStorage.getItem("currentLatLng")),ej=window.localStorage.getItem("location"),{data:ey}=(0,b.A)(ea,!!ea),{data:eb}=(0,S.A)(eo,!!eo),{data:ew,refetch:eS}=(0,_.A)(ef,er,"DRIVE");(0,f.useEffect)(()=>{if(ey){var e;ec(null==ey||null==(e=ey.suggestions)?void 0:e.map(e=>{var t,l,r,n,a,i,o;return{place_id:null==e||null==(t=e.placePrediction)?void 0:t.placeId,description:"".concat(null==e||null==(n=e.placePrediction)||null==(r=n.structuredFormat)||null==(l=r.mainText)?void 0:l.text,", ").concat(null==e||null==(o=e.placePrediction)||null==(i=o.structuredFormat)||null==(a=i.secondaryText)?void 0:a.text)}}))}},[ey]),(0,f.useEffect)(()=>{(null==eb?void 0:eb.location)&&en(e=>{var t,l;return{location_name:null==eb?void 0:eb.formattedAddress,lat:null==eb||null==(t=eb.location)?void 0:t.latitude,lng:null==eb||null==(l=eb.location)?void 0:l.longitude}})},[eb]),(0,f.useEffect)(()=>{eS()},[er]),(0,f.useEffect)(()=>{var e;X((0,C.LT)({...U,destination_location:er})),ei(null==U||null==(e=U.destination_location)?void 0:e.location_name)},[er,null==U||null==(t=U.destination_location)?void 0:t.location_name]),(0,f.useEffect)(()=>{var e;(null==U||null==(e=U.distanceData)?void 0:e.destination_addresses)&&"/home"!==B.pathname&&(ei(U.distanceData.destination_addresses[0]),ee(U.duration))},[U,B.pathname]),(0,f.useEffect)(()=>{X((0,C.LT)({...U,selectedDate:et}))},[et]),(0,f.useEffect)(()=>{X((0,C.LT)({...U,tripType:Q}))},[Q]),(0,f.useEffect)(()=>{X((0,C.LT)({...U,duration:$}))},[$]),(0,f.useEffect)(()=>{"/home"===B.pathname&&(Z("distance_wise"),ee(""),X((0,C.LT)(null)))},[B.pathname]);let eT=(e,t)=>{e.stopPropagation(),"distance_wise"===t&&(Z("distance_wise"),U&&X((0,C.LT)({...U,tripType:"distance_wise"})),K(!1)),"hourly"===t&&(Z("hourly"),U&&X((0,C.LT)({...U,tripType:"hourly"})),K(!0)),"day_wise"===t&&(Z("day_wise"),U&&X((0,C.LT)({...U,tripType:"day_wise"})),K(!0))},eC=e=>{ei(null==e?void 0:e.address),en({lat:e.latitude,lng:e.longitude,location_name:null==e?void 0:e.address})},e_="/vehicle-search"===B.pathname;return(0,r.jsxs)(n.A,{sx:{position:"relative"},children:["/home"!==z&&ev&&(0,r.jsx)(a.A,{sx:{position:"absolute",width:"100%",display:{xs:"flex",sm:"none"},justifyContent:"center",textAlign:"center",bottom:"-38px",left:"50%",zIndex:1e3,transform:"translate(-50%, -50%)"},children:(0,r.jsx)(s.A,{onClick:()=>{ex(!ep)},variant:"contained",sx:{"&:hover":{backgroundColor:H.palette.background.paper},backgroundColor:H.palette.background.paper,borderRadius:"50%",width:"34px",height:"34px",minWidth:"unset",padding:0},children:(0,r.jsx)(E.A,{sx:{color:H.palette.primary.main,transform:ep?"rotate(180deg)":"rotate(0deg)"}})})}),(0,r.jsx)(a.A,{p:"15px",sx:{width:"100%",mt:M,height:R,position:F,top:N,zIndex:50,boxShadow:e=>({xs:"none",md:"0px 15px 30px 0px ".concat((0,d.X4)(e.palette.neutral[1e3],.1*("dark"!==e.palette.mode)))}),bottom:P,left:!W&&"0%",right:!W&&"0%",marginTop:e_&&!l?{xs:"-120px",sm:"-180px"}:"-42px",maxWidth:{xs:"100%",sm:l?{xs:"fit-content",md:"100%"}:"fit-content"},marginInline:"auto",backgroundColor:H.palette.background.paper,borderRadius:"15px",borderTopLeftRadius:l?"0px":"15px",borderTopRightRadius:l?"0px":"15px"},children:(0,r.jsxs)(i.A,{direction:"row",flexWrap:{xs:"wrap",md:"nowrap"},gap:2,justifyContent:!W&&"center",sx:{"> *":{flexBasis:{xs:"100%",sm:"48%",md:"auto"}}},children:[(0,r.jsx)(y.A,{setOpenMap:J,fromHome:!0,getCurrentLocation:eC,pickLocationFormAddress:eC,predictions:ed,handleChange:(e,t)=>((e,t)=>{t&&es(t.place_id)})(0,t),HandleChangeForSearch:e=>ei(e.target.value),label:(0,O.t)("Destination"),height:"53px",onFocus:()=>{eh(!0)},disabled:!er.pickup,value:{description:ea},width:l?"70%":500,isFocused:eu,focusedField:"destination",endIcon:(0,r.jsx)(v.A,{sx:{color:e=>(0,d.X4)(e.palette.neutral[400],.5)}})},B.pathname),(0,r.jsx)(A.A,{value:V()(null==U?void 0:U.selectedDate),handleDateChange:e=>{el(e)},label:"Pickup Time",sx:{display:"/home"!==z&&{xs:!ev&&1||ep?"flex":"none",sm:"flex"},"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset":{border:"1px solid",borderColor:e=>(0,d.X4)(e.palette.primary.main,.4)}}}}),(0,r.jsxs)(h.A,{ref:eg,sx:{display:"/home"!==z&&{xs:!ev&&1||ep?"flex":"none",sm:"flex"},width:300,"& .MuiOutlinedInput-root":{"& fieldset>legend":{fontSize:"25px"},"&.Mui-focused fieldset":{border:"1px solid",borderColor:e=>e.palette.primary.main}}},children:[(0,r.jsx)(p.A,{id:"demo-checkbox-label",children:(0,O.t)("Trip Type")}),(0,r.jsxs)(c.A,{labelId:"demo-checkbox-label",id:"demo-checkbox",value:(null==U?void 0:U.tripType)?(0,O.t)(U.tripType.replaceAll("_"," ")):(0,O.t)(null==Q?void 0:Q.replaceAll("_"," ")),sx:{textTransform:"capitalize"},onChange:e=>{Z(e.target.value)},open:Y,onOpen:()=>K(!0),input:(0,r.jsx)(x.A,{label:"Tag"}),renderValue:e=>e,children:[(0,r.jsxs)(m.A,{value:"hourly",onClick:e=>eT(e,"hourly"),children:[(0,r.jsx)(u.A,{checked:(null==U?void 0:U.tripType)==="hourly"}),(0,r.jsx)(g.A,{primary:(0,O.t)("Hourly")})]}),(0,r.jsxs)(m.A,{value:"day_wise",onClick:e=>eT(e,"day_wise"),children:[(0,r.jsx)(u.A,{checked:(null==U?void 0:U.tripType)==="day_wise"}),(0,r.jsx)(g.A,{primary:(0,O.t)("Per Day")})]}),(0,r.jsxs)(m.A,{value:"distance_wise",onClick:e=>eT(e,"distance_wise"),children:[(0,r.jsx)(u.A,{checked:(null==U?void 0:U.tripType)==="distance_wise"||!(null==U?void 0:U.tripType)}),(0,r.jsx)(g.A,{primary:(0,O.t)("Distance Wise")})]}),((null==U?void 0:U.tripType)==="hourly"||(null==U?void 0:U.tripType)==="day_wise")&&(0,r.jsx)(a.A,{ref:eA,sx:{px:"10px",mt:"20px",pb:"10px"},children:(0,r.jsx)(j.XY,{label:(0,O.t)("Duration"),value:$,onChange:e=>{ee(e.target.value)},sx:{width:"100%"}})})]})]}),W&&(0,r.jsx)(s.A,{variant:"contained",onClick:e=>ea?et?Q?("hourly"===Q||"day_wise"===Q)&&(!$||isNaN($)||0>=Number($))?void I.oR.error($?isNaN($)?"Duration must be a valid number!":"Please Add a Valid Duration!":"Please Add Duration!"):void((0,D.WW)(er),X((0,C.LT)({selectedDate:et,destination_location:er,pickup_location:{location_name:ej,...ef},tripType:Q,duration:$,distanceData:ew})),B.push({pathname:"/rental/vehicle-search",query:{from:"from_search"}})):void I.oR.error("Please Select a Trip Type!"):void I.oR.error("Please Select the Date!"):void I.oR.error("Please Add Destination Address!"),children:(0,O.t)("Search")})]})}),q&&(0,r.jsx)(L.default,{handleLocation:(e,t)=>{en({lat:e.lat,lng:e.lng,location_name:t})},open:q,handleClose:()=>J(!1),toparcel:"1",fromReceiver:"1"})]})}},94089:(e,t,l)=>{l.d(t,{A:()=>r});let r={src:"/_next/static/media/sort.3a34c357.png",height:56,width:59,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAANlBMVEVMaXGYqLSToq6Uo6+RoKyMoq2WprKUo7CToq+Soa2Soa6Soa6OnqyVo62bqraSo62VpbGerrt8lOJWAAAAEHRSTlMA7JLSQxFrfObArVomNcXWrSTHYAAAAAlwSFlzAAAsSwAALEsBpT2WqQAAADxJREFUeJwdxkkSgCAMAMEJZAXU+P/PWmWfmqh1MAMZ4qw8iE4fbyfrmXqNUtS3EQUy2/+kVRA3ZPZGgw83JwGK+14N9wAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}}}]);