"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[5903],{38215:function(e,r,o){o.d(r,{Z:function(){return l}});var n=o(17592),t=o(85281),i=o(46417),c=(0,n.ZP)("div")((function(){return{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2001,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.7)",padding:"20px",borderRadius:"10px"}})),a=(0,n.ZP)("div")((function(){return{position:"absolute",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"}})),l=function(){return(0,i.jsxs)(c,{children:[(0,i.jsx)(t.Z,{color:"primary",size:80,thickness:6}),(0,i.jsx)(a,{children:(0,i.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAPnUlEQVR4AdVae3AU9R3/7d4jdyGQQKAhECBAJBSmEAtFSQUjqPgAHGlhRm0lDkWY6Tg+O9qiErR26h8WR8ZWqTMN1ur4qMpDrTyjtDwDJloeCYiBvAgkaZ53l7vb3X4/v9vfZS/Zu9uFwLSfmb3d293f7u/z+z5/399K7CphdW5JrupgBZosZ0ialmu8pklSjUOTamRJbvvjqTUV7CpAYlcIj+SWZHQ55WJZlm7UNK2IXpRhpZ3GWJskSWXUZrPD4Sp77eSva9gVwIATXz35+SJNYWs1phWxAYDEpDKVaZv+fOrZUjaAGDDiK695rpgetpYOc82upw72sMycdJbz/SzmHeKl/ynRay31bbS1s7rjTczXGYj3ihrShnUDNQCXTXzlNS8UyExdbybhSdeNYwXz81nBzflE2pKms7oT51ntiSa276NKVn3wrNktNcGQelNpTUkNuwxcFvFV+S88rKnKy8ZzkOz84uvYvOJZ/PhyAE3Y/+HXbN+HFVwjjJAlR8lr1WueY9wt2MclEYfj8rnkj+nwRnHOLuGWhnbmpfuMKh/3Xn0Atm74IuY8OcGPFYk99kbVM98xm7BFnDyttHLyb3MlRdsjSWycOA+VLv79YpY5Ork6V5efY59s/J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u6i+XvNiIkBQRHlcPHGv6sUbHIKzo56J1AZBkvR5cSFhUVBR2CbD69bIpysvLecdoAHqINOytm0ijJt9J3r+TVBLHXfrGkwsiJRIMLF1i76MBEue7qE0XqTPadYiNnFen3j6Ad5HGYSDwTcslkQYGamVULLrLpH7y6dOnuY1TGctFFR0hcYfhvujinQ6eaNBgYc6sEHm+0WAKqatEWJkwYYI6depUjYhbtuWrBW775GGd1FEXFQA8FFsR8+HRMdFBKocgPrTvRkgnh4l70ijPxtwAzpLnCLpDvSztvFqQ9C8PuAPEINDeTdpgjADYjOFQhESn3s6hP+OKr9dfSUhCaiIcYjNIMur52f850f95/BfoYlARf1CQvwAAAABJRU5ErkJggg==",alt:"Logo",style:{width:"100%",height:"100%"}})})]})}},78710:function(e,r,o){o.d(r,{Z:function(){return S}});var n=o(94469),t=o(33604),i=o(42832),c=o(61113),a=o(96467),l=o(4117),s=o(69099),d=o(25223),x=o(10658),u=o.n(x),h=o(99004),p=o(59376),f=o(34605),g=o(78392),A=o(41156),v=o(98589),b=o(79254),m=o(46417);function S(e){var r=e.open,o=e.onClose,x=e.onApply,S=[{label:"Today",startDate:new Date,endDate:new Date},{label:"Yesterday",startDate:(0,h.Z)(new Date,-1),endDate:(0,h.Z)(new Date,-1)},{label:"Tomorrow",startDate:(0,h.Z)(new Date,1),endDate:(0,h.Z)(new Date,1)},{label:"This Week",startDate:(0,p.Z)(new Date),endDate:(0,f.Z)(new Date)},{label:"Last Week",startDate:(0,p.Z)((0,g.Z)(new Date,-1)),endDate:(0,f.Z)((0,g.Z)(new Date,-1))},{label:"Last 7 Days",startDate:(0,h.Z)(new Date,-7),endDate:new Date},{label:"This Month",startDate:(0,A.Z)(new Date),endDate:(0,v.Z)(new Date)},{label:"Last Month",startDate:(0,A.Z)((0,b.Z)(new Date,-1)),endDate:(0,v.Z)((0,b.Z)(new Date,-1))}];return(0,m.jsxs)(n.Z,{open:r,onClose:function(){return onclose()},fullWidth:!0,maxWidth:"sm",children:[(0,m.jsx)(t.Z,{disableTypography:!0,children:(0,m.jsx)(i.Z,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",sx:{width:"100%"},children:(0,m.jsx)(c.Z,{variant:"h4",children:"Select Date Range"})})}),(0,m.jsx)(a.Z,{sx:{"& .MuiPaper-root":{boxShadow:"none !important"}},children:(0,m.jsx)(d.D,{open:r,toggle:o,definedRanges:S,onChange:function(e){null!==e&&void 0!==e&&e.startDate&&null!==e&&void 0!==e&&e.endDate&&(x({startDate:u()(e.startDate).format("YYYY-MM-DD"),endDate:u()(e.endDate).format("YYYY-MM-DD"),label:e.label||""}),o())},closeOnClickOutside:!1})}),(0,m.jsx)(l.Z,{children:(0,m.jsx)(s.Z,{variant:"contained",onClick:o,sx:{cursor:"pointer"},children:"Close"})})]})}},95872:function(e,r,o){o.d(r,{f:function(){return t}});var n=o(47313),t=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"k";(0,n.useEffect)((function(){if(null!==e&&void 0!==e&&e.current){var o=function(o){var n;o.key.toLowerCase()===r.toLowerCase()&&(o.metaKey||o.ctrlKey)&&(o.preventDefault(),null===(n=e.current)||void 0===n||n.focus());"Escape"===o.key&&document.activeElement===e.current&&e.current.blur()};return document.addEventListener("keydown",o),function(){return document.removeEventListener("keydown",o)}}}),[e,r])}},5903:function(e,r,o){o.r(r);var n=o(74165),t=o(15861),i=o(29439),c=o(47313),a=o(90842),l=o(10658),s=o.n(l),d=o(56573),x=o(57829),u=o(61113),h=o(70501),p=o(42832),f=o(48119),g=o(61689),A=o(9019),v=o(84488),b=o(54882),m=o(47131),S=o(51629),Z=o(66835),j=o(23477),E=o(24076),P=o(67478),R=o(57861),C=o(69099),_=o(85281),T=o(94469),D=o(96467),y=o(22539),I=o(11577),w=o(95872),k=o(78710),W=o(38215),Y=o(41962),L=o(25963),M=o(58467),B=o(46417),z=o(91635);s().extend(z);var O="0 8px 24px rgba(15, 23, 42, 0.08)",H="#0f172a",K="#64748b",N="#94a3b8",F="#e2e8f0",U="#f1f5f9",G="#f8fafc",J=function(e,r){return"".concat(e).concat(r)},V=function(e){return J(e,"08")},q=function(e){return J(e,"18")},Q=function(e){return J(e,"26")},X=function(e){return J(e,"55")},$="#662582",ee={created:{label:"Created",color:"#3b82f6",icon:y.ili},pending:{label:"Pending",color:"#f59e0b",icon:y.Ley},processing:{label:"Processing",color:"#3b82f6",icon:y.dKE},modified:{label:"Confirmed",color:"#10b981",icon:y.ZSR},confirmed:{label:"Confirmed",color:"#10b981",icon:y.ZSR},ready:{label:"Accepted",color:"#6366f1",icon:y.ZSR},active:{label:"Picked",color:"#8b5cf6",icon:y.ili},onhold:{label:"On Hold",color:"#8b5cf6",icon:y.Y8K},closed:{label:"Closed",color:"#06b6d4",icon:y.ZSR},delivered:{label:"Delivered",color:"#10b981",icon:y.ZSR},failed:{label:"Failed",color:"#991b1b",icon:y.B4e},cancelled:{label:"Cancelled",color:"#ef4444",icon:y.B4e}},re=[{idx:0,status:"pending",label:"Pending",color:"#f59e0b",icon:y.Ley,countKey:"pending"},{idx:1,status:"delivered",label:"Delivered",color:"#10b981",icon:y.ZSR,countKey:"delivered"},{idx:2,status:"cancelled",label:"Cancelled",color:"#ef4444",icon:y.B4e,countKey:"cancelled"}],oe=function(e){var r=e.status,o=ee[String(r||"").toLowerCase()]||{label:r||"\u2014",color:N,icon:y.Y8K},n=o.icon;return(0,B.jsxs)(x.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:1.125,py:.375,borderRadius:999,bgcolor:o.color,color:"#fff",fontSize:11,fontWeight:700,letterSpacing:.2,whiteSpace:"nowrap",minWidth:86,justifyContent:"center",boxShadow:"0 1px 2px ".concat(Q(o.color))},children:[(0,B.jsx)(n,{size:12})," ",o.label]})},ne=function(e){var r=e.value,o=e.color,n=e.icon,t=e.isMoney,i=void 0!==t&&t,c=Number(r),a=i?"\u20b9".concat(Number.isFinite(c)?c.toFixed(2):"0.00"):Number.isFinite(c)?c:r||0;return!Number.isFinite(c)||0===c?(0,B.jsx)(u.Z,{variant:"caption",sx:{color:N,fontWeight:700},children:a}):(0,B.jsxs)(x.Z,{sx:{display:"inline-flex",alignItems:"center",gap:.5,px:.875,py:.25,borderRadius:999,bgcolor:V(o),border:"1px solid ".concat(X(o)),color:o,fontSize:12,fontWeight:800,whiteSpace:"nowrap"},children:[n,a]})};r.default=function(){(0,M.s0)();var e=localStorage.getItem("tenantid"),r=(0,c.useRef)(),o=(0,c.useRef)(),l=(0,c.useState)(0),z=(0,i.Z)(l,2),J=z[0],ee=z[1],te=(0,c.useState)(10),ie=(0,i.Z)(te,2),ce=ie[0],ae=ie[1],le=(0,c.useState)(0),se=(0,i.Z)(le,2),de=se[0],xe=se[1],ue=(0,c.useState)("Pending"),he=(0,i.Z)(ue,2),pe=he[0],fe=he[1],ge=(0,c.useState)("pending"),Ae=(0,i.Z)(ge,2),ve=Ae[0],be=Ae[1],me=(0,c.useState)(!1),Se=(0,i.Z)(me,2),Ze=Se[0],je=Se[1],Ee=(0,c.useState)(""),Pe=(0,i.Z)(Ee,2),Re=Pe[0],Ce=Pe[1],_e=(0,c.useState)(!1),Te=(0,i.Z)(_e,2),De=Te[0],ye=Te[1],Ie=(0,c.useState)("Today"),we=(0,i.Z)(Ie,2),ke=we[0],We=we[1],Ye=(0,c.useState)(s()().format("YYYY-MM-DD")),Le=(0,i.Z)(Ye,2),Me=Le[0],Be=Le[1],ze=(0,c.useState)(s()().format("YYYY-MM-DD")),Oe=(0,i.Z)(ze,2),He=Oe[0],Ke=Oe[1],Ne=(0,c.useState)(""),Fe=(0,i.Z)(Ne,2),Ue=Fe[0],Ge=Fe[1],Je=(0,c.useState)(""),Ve=(0,i.Z)(Je,2),qe=Ve[0],Qe=Ve[1];(0,c.useEffect)((function(){var e=setTimeout((function(){Qe(Ue)}),400);return function(){return clearTimeout(e)}}),[Ue]);var Xe=(0,c.useRef)(null);(0,w.f)(Xe,"k");var $e=function(){var r=(0,t.Z)((0,n.Z)().mark((function r(){var o,t,i,c,a,l;return(0,n.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,d.Z.get("".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_URL,"/deliveries/deliverysummary?tenantid=").concat(e,"&locationid=").concat(0,"&fromdate=").concat(Me,"&todate=").concat(He));case 2:return a=r.sent,l=a.data.details,r.abrupt("return",{created:(null!==(o=l.created)&&void 0!==o?o:0).toString(),uncoveredOrders:(null!==(t=l.pending)&&void 0!==t?t:0).toString(),coveredOrders:(null!==(i=l.delivered)&&void 0!==i?i:0).toString(),cancelled:(null!==(c=l.cancelled)&&void 0!==c?c:0).toString(),percentage1:(Math.round(l.created/l.total*100)||0).toString(),percentage2:(Math.round(l.pending/l.total*100)||0).toString(),percentage3:(Math.round(l.delivered/l.total*100)||0).toString(),percentage4:(Math.round(l.cancelled/l.total*100)||0).toString()});case 5:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}(),er=(0,Y.a)({queryKey:["deliveryPercentageData",0,Me,He,e],queryFn:$e,enabled:!0,refetchInterval:15e3}),rr=er.data,or=er.isLoading,nr=er.refetch,tr=function(){var e=(0,t.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.Z.put("".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_URL,"/orders/updateorder"),{orderheaderid:Re,orderstatus:"cancelled",cancelled:s()().format("YYYY-MM-DD HH:mm:ss")}).then((function(e){e.data.status&&((0,a.yv)("Delivery Cancelled Successfully",{variant:"success",anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:2e3}),ur(),nr(),je(!1))})).catch((function(e){console.log(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ir=function(){var r=(0,t.Z)((0,n.Z)().mark((function r(o){var t,i,c;return(0,n.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=o.pageParam,i=void 0===t?1:t,r.next=3,d.Z.get("".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL:"https://mock-data-api-nextjs.vercel.app/",REACT_APP_AUTH0_CLIENT_ID:"",REACT_APP_AUTH0_DOMAIN:"",REACT_APP_AWS_APP_CLIENT_ID:"",REACT_APP_AWS_POOL_ID:"",REACT_APP_FIREBASE_API_KEY:"",REACT_APP_FIREBASE_APP_ID:"",REACT_APP_FIREBASE_AUTH_DOMAIN:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"",REACT_APP_FIREBASE_PROJECT_ID:"",REACT_APP_FIREBASE_STORAGE_BUCKET:"",REACT_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCF4KatYCI3vqz1_H3kiHeyS3yCMfYToh8",REACT_APP_RIDER_ACCESS_ID:"AAAAILMpCEU:APA91bEavuOllBI6sFgYtxXAgNmAVwNA-MnCMHLGlR4_t7UqpLajAkdn3T0CZr_zaLBknLyim9ytFLMZgbeXmKqTad_PKCbqlYjHpaizVrLXtecxqyEy4UktIacK2UvHVUATHL-7VQQk",REACT_APP_VERSION:"v2.1.0"}.REACT_APP_URL,"/deliveries/getdeliveries/?tenantid=").concat(e,"&locationid=").concat(0,"&status=").concat(ve,"&fromdate=").concat(Me,"&todate=").concat(He,"&pageno=").concat(i,"&pagesize=").concat(ce,"&keyword=").concat(qe));case 3:return c=r.sent,r.abrupt("return",{data:c.data.details,nextPage:c.data.details.length===ce?i+1:void 0});case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),cr=(0,L.N)({queryKey:["fetchdeliveries",pe,Me,He,J,ce,qe,0],queryFn:ir,getNextPageParam:function(e){return e.nextPage},refetchInterval:15e3}),ar=cr.data,lr=cr.fetchNextPage,sr=cr.isLoading,dr=cr.hasNextPage,xr=cr.isFetchingNextPage,ur=cr.refetch,hr=ar?ar.pages.flatMap((function(e){return e.data})):[];(0,c.useEffect)((function(){if(dr){var e=new IntersectionObserver((function(e){e[0].isIntersecting&&lr()}),{root:null,rootMargin:"0px 0px 400px 0px",threshold:0});return r.current&&e.observe(r.current),function(){r.current&&e.unobserve(r.current)}}}),[dr,lr]);var pr=[{key:"pending",label:"Pending Deliveries",color:"#f59e0b",icon:y.Ley,value:null===rr||void 0===rr?void 0:rr.uncoveredOrders,percentage:null===rr||void 0===rr?void 0:rr.percentage2},{key:"delivered",label:"Delivered Deliveries",color:"#10b981",icon:y.ZSR,value:null===rr||void 0===rr?void 0:rr.coveredOrders,percentage:null===rr||void 0===rr?void 0:rr.percentage3},{key:"cancelled",label:"Cancelled Deliveries",color:"#ef4444",icon:y.B4e,value:null===rr||void 0===rr?void 0:rr.cancelled,percentage:null===rr||void 0===rr?void 0:rr.percentage4}];return(0,B.jsxs)(c.Fragment,{children:[(or||sr)&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(I.Z,{}),(0,B.jsx)(W.Z,{})]}),(0,B.jsxs)(x.Z,{sx:{position:"sticky",top:0,zIndex:100,bgcolor:G,pt:0,pb:0,mx:{xs:-.75,sm:-1.25},px:{xs:.75,sm:1.25},boxShadow:"0 4px 16px rgba(15,23,42,0.07)"},children:[(0,B.jsx)(h.Z,{elevation:0,sx:{mb:{xs:1,md:1.25},px:{xs:1.5,sm:2},py:{xs:1,sm:1.25},borderRadius:2,border:"1px solid",borderColor:F,background:"linear-gradient(135deg, ".concat(V($)," 0%, ").concat(V("#9255AB")," 100%)"),boxShadow:O},children:(0,B.jsxs)(p.Z,{direction:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",spacing:{xs:1,sm:1.5},children:[(0,B.jsxs)(p.Z,{direction:"row",alignItems:"center",spacing:1.25,children:[(0,B.jsx)(f.Z,{variant:"rounded",sx:{width:36,height:36,bgcolor:$,color:"#fff",borderRadius:1.5,boxShadow:"0 4px 12px ".concat(Q($))},children:(0,B.jsx)(y.ili,{size:19})}),(0,B.jsxs)(p.Z,{spacing:.125,children:[(0,B.jsx)(u.Z,{variant:"h3",sx:{fontWeight:800,color:H,lineHeight:1.1,fontSize:{xs:"1.1rem",sm:"1.25rem",md:"1.375rem"}},children:"Deliveries"}),(0,B.jsxs)(p.Z,{direction:"row",alignItems:"center",spacing:.625,children:[(0,B.jsx)(x.Z,{sx:{width:7,height:7,borderRadius:"50%",bgcolor:"#10b981",boxShadow:"0 0 0 3px rgba(16,185,129,0.18)",flexShrink:0}}),(0,B.jsxs)(u.Z,{sx:{fontSize:11.5,color:K,fontWeight:600,whiteSpace:"nowrap"},children:["Live \xb7 ","All Locations"," \xb7 ",ke]})]})]})]}),(0,B.jsx)(g.Z,{title:"Change date filter",placement:"top",children:(0,B.jsxs)(x.Z,{onClick:function(){return ye(!0)},sx:{display:"inline-flex",alignItems:"center",gap:.75,px:1.25,py:.625,borderRadius:999,cursor:"pointer",bgcolor:V("#f59e0b"),border:"1.5px solid ".concat(X("#f59e0b")),color:"#b45309",fontWeight:800,fontSize:12,transition:"all 0.18s","&:hover":{borderColor:"#f59e0b",boxShadow:"0 0 0 3px ".concat(Q("#f59e0b"))}},children:[(0,B.jsx)(y.sHf,{size:13}),s()(Me).format("DD/MM/YY")," \u2013 ",s()(He).format("DD/MM/YY")]})})]})}),(0,B.jsx)(A.ZP,{container:!0,spacing:{xs:1,sm:1.25,md:1.5},children:pr.map((function(e){var r=e.icon;return(0,B.jsx)(A.ZP,{item:!0,xs:6,sm:6,md:4,children:(0,B.jsxs)(h.Z,{elevation:0,sx:{position:"relative",overflow:"hidden",px:{xs:1.25,sm:1.5},py:{xs:.875,sm:1.125},borderRadius:2,border:"1px solid",borderColor:F,background:"#fff",transition:"transform 0.15s, box-shadow 0.15s, border-color 0.15s","&:hover":{transform:"translateY(-1px)",boxShadow:O,borderColor:X(e.color)}},children:[(0,B.jsx)(x.Z,{sx:{position:"absolute",top:0,left:0,bottom:0,width:3,background:e.color}}),(0,B.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,sx:{pl:.5},children:[(0,B.jsxs)(p.Z,{spacing:.125,sx:{minWidth:0,flex:1},children:[(0,B.jsx)(u.Z,{sx:{color:K,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",fontSize:10.5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.2},children:e.label}),(0,B.jsxs)(p.Z,{direction:"row",alignItems:"baseline",spacing:.75,children:[(0,B.jsx)(u.Z,{sx:{fontWeight:800,color:H,lineHeight:1.15,fontSize:{xs:"0.95rem",sm:"1.1rem",md:"1.2rem"}},noWrap:!0,children:null==e.value?(0,B.jsx)(v.Z,{sx:{width:40},animation:"wave"}):e.value}),null!=e.percentage&&null!=e.value&&(0,B.jsxs)(u.Z,{sx:{fontSize:10.5,color:N,fontWeight:700},children:[e.percentage,"%"]})]})]}),(0,B.jsx)(f.Z,{variant:"rounded",sx:{width:30,height:30,bgcolor:q(e.color),color:e.color,borderRadius:1.25,flexShrink:0},children:(0,B.jsx)(r,{size:15})})]})]})},e.key)}))}),(0,B.jsx)(h.Z,{elevation:0,sx:{mt:{xs:1,md:1.25},p:{xs:.875,md:1.125},borderTopLeftRadius:2,borderTopRightRadius:2,borderBottomLeftRadius:0,borderBottomRightRadius:0,border:"1px solid",borderColor:F,borderBottom:0,background:"#fff"},children:(0,B.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1.5,sx:{flexWrap:"wrap-reverse"},children:[(0,B.jsx)(p.Z,{direction:"row",spacing:.75,sx:{flex:1,overflowX:"auto",py:.5,px:.25,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-thumb":{backgroundColor:F,borderRadius:4}},children:re.map((function(e){var r,o,n,t,i=e.icon,c=de===e.idx,a="created"===e.countKey?null!==(r=null===rr||void 0===rr?void 0:rr.created)&&void 0!==r?r:0:"pending"===e.countKey?null!==(o=null===rr||void 0===rr?void 0:rr.uncoveredOrders)&&void 0!==o?o:0:"delivered"===e.countKey?null!==(n=null===rr||void 0===rr?void 0:rr.coveredOrders)&&void 0!==n?n:0:null!==(t=null===rr||void 0===rr?void 0:rr.cancelled)&&void 0!==t?t:0;return(0,B.jsxs)(x.Z,{onClick:function(r){return function(e,r){Ge(""),ae(10),xe(r);var o=re[r];fe(o.label),be(o.status),ee(0)}(0,e.idx)},sx:{display:"inline-flex",alignItems:"center",gap:{xs:.625,md:.875},pl:.5,pr:{xs:1,md:1.25},py:.5,flexShrink:0,cursor:"pointer",borderRadius:999,border:"1.5px solid ".concat(c?e.color:X(e.color)),bgcolor:c?e.color:V(e.color),color:c?"#fff":e.color,fontWeight:700,boxShadow:c?"0 6px 18px ".concat(Q(e.color)):"none",transition:"all 0.18s","&:hover":{borderColor:e.color,boxShadow:c?"0 6px 18px ".concat(Q(e.color)):"0 0 0 3px ".concat(Q(e.color))}},children:[(0,B.jsx)(f.Z,{sx:{width:{xs:22,md:26},height:{xs:22,md:26},bgcolor:c?"rgba(255,255,255,0.22)":q(e.color),color:c?"#fff":e.color},children:(0,B.jsx)(i,{size:13})}),(0,B.jsx)(u.Z,{variant:"caption",sx:{fontWeight:800,fontSize:{xs:11.5,md:13},lineHeight:1},children:e.label}),(0,B.jsx)(x.Z,{sx:{minWidth:{xs:22,md:26},height:{xs:18,md:22},px:.625,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:999,fontSize:{xs:10,md:11},fontWeight:800,bgcolor:c?"rgba(255,255,255,0.22)":"#fff",color:c?"#fff":e.color,border:c?"none":"1px solid ".concat(X(e.color))},children:a})]},e.status)}))}),(0,B.jsx)(x.Z,{sx:{width:{xs:"100%",sm:240,lg:280},flex:{xs:"1 1 100%",sm:"0 0 auto"}},children:(0,B.jsxs)(x.Z,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:999,bgcolor:V($),border:"1.5px solid ".concat(X($)),transition:"all 0.18s","&:focus-within":{borderColor:$,boxShadow:"0 0 0 3px ".concat(Q($))}},children:[(0,B.jsx)(y.vU7,{size:16,style:{color:$,flexShrink:0}}),(0,B.jsx)(b.ZP,{inputRef:Xe,placeholder:"Search (ctrl+k)",value:Ue,onChange:function(e){return Ge(e.target.value)},autoComplete:"off",sx:{flex:1,fontSize:13,fontWeight:600,color:H,"& input::placeholder":{color:N,opacity:1}}}),Ue&&(0,B.jsx)(m.Z,{size:"small",onClick:function(){Ge(""),ur()},sx:{p:.25,color:$},children:(0,B.jsx)(y.lUB,{size:14})})]})})]})})]}),(0,B.jsx)(h.Z,{elevation:0,sx:{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:2,borderBottomRightRadius:2,border:"1px solid",borderColor:F,overflow:"hidden",background:"#fff"},children:(0,B.jsx)(S.Z,{onScroll:function(e){var r=e.currentTarget,o=r.scrollTop,n=r.scrollHeight;o+r.clientHeight>=n-50&&dr&&!xr&&lr()},ref:o,sx:{overflowX:"auto",overflowY:"visible","&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-thumb":{backgroundColor:X($),borderRadius:8,"&:hover":{backgroundColor:$}},"&::-webkit-scrollbar-track":{backgroundColor:G}},children:(0,B.jsxs)(Z.Z,{stickyHeader:!0,size:"small",sx:{minWidth:{xs:960,md:1100}},children:[(0,B.jsx)(j.Z,{children:(0,B.jsxs)(E.Z,{sx:{"& th":{backgroundColor:G,color:K,fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",whiteSpace:"nowrap",borderBottom:"1px solid ".concat(F),py:.75,px:1}},children:[(0,B.jsx)(P.Z,{children:"#"}),(0,B.jsx)(P.Z,{children:"Delivery Location"}),(0,B.jsx)(P.Z,{children:"Pickup"}),(0,B.jsx)(P.Z,{children:"Drop"}),(0,B.jsx)(P.Z,{align:"center",children:"Qty"}),(0,B.jsx)(P.Z,{align:"right",children:"COD"}),(0,B.jsx)(P.Z,{align:"center",children:"Kms"}),(0,B.jsx)(P.Z,{align:"right",children:"Charges"}),(0,B.jsx)(P.Z,{children:"Notes"}),(0,B.jsx)(P.Z,{children:"Status"}),"created"===ve&&(0,B.jsx)(P.Z,{align:"right",children:"Actions"})]})}),(0,B.jsxs)(R.Z,{children:[sr&&0===hr.length&&Array.from({length:10}).map((function(e,r){return(0,B.jsx)(E.Z,{children:Array.from({length:"created"===ve?11:10}).map((function(e,r){return(0,B.jsx)(P.Z,{sx:{borderBottom:"1px solid ".concat(U),py:.625,px:1},children:(0,B.jsx)(v.Z,{animation:"wave",height:20})},r)}))},"sk-".concat(r))})),!sr&&0===hr.length&&(0,B.jsx)(E.Z,{children:(0,B.jsx)(P.Z,{colSpan:"created"===ve?11:10,sx:{py:7,borderBottom:"none"},children:(0,B.jsxs)(p.Z,{alignItems:"center",spacing:1.25,children:[(0,B.jsx)(f.Z,{variant:"rounded",sx:{width:56,height:56,bgcolor:q("#94a3b8"),color:N,borderRadius:2},children:(0,B.jsx)(y.ili,{size:26})}),(0,B.jsxs)(u.Z,{sx:{fontWeight:700,color:H,fontSize:14},children:["No ",ve," deliveries"]}),(0,B.jsx)(u.Z,{sx:{color:K,fontSize:12},children:Ue?"Try a different keyword or clear the search.":"Adjust the location, status, or date range above."}),Ue&&(0,B.jsx)(C.Z,{size:"small",onClick:function(){return Ge("")},sx:{mt:.5,height:28,textTransform:"none",fontSize:12,fontWeight:700,color:$,borderRadius:1.25,"&:hover":{bgcolor:V($)}},startIcon:(0,B.jsx)(y.lUB,{size:14}),children:"Clear search"})]})})}),hr.map((function(e,r){var o;return(0,B.jsxs)(E.Z,{sx:{cursor:"pointer",transition:"background-color 0.12s, box-shadow 0.12s",backgroundColor:"transparent","& td":{borderBottom:"1px solid ".concat(U),py:.5,px:1,verticalAlign:"top"},"&:hover":{backgroundColor:G,boxShadow:"inset 3px 0 0 ".concat($)}},children:[(0,B.jsx)(P.Z,{children:(0,B.jsx)(u.Z,{sx:{fontWeight:700,color:K},children:J*ce+r+1})}),(0,B.jsxs)(P.Z,{children:[(0,B.jsxs)(u.Z,{variant:"subtitle2",sx:{fontWeight:700,color:H},noWrap:!0,children:[e.locationname,e.locationsuburb&&" - ".concat(e.locationsuburb)]}),(0,B.jsx)(g.Z,{title:"Order Id",children:(0,B.jsx)(u.Z,{variant:"caption",sx:{color:K},noWrap:!0,children:e.orderid})}),(0,B.jsxs)(p.Z,{direction:"row",spacing:.5,alignItems:"center",sx:{mt:.125},children:[(0,B.jsx)(y.dKE,{size:10,style:{color:N,flexShrink:0}}),function(){var r=e.pickupslot&&s()(e.pickupslot).isValid()?s()(e.pickupslot):s()(e.deliverydate||e.orderdate);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(u.Z,{sx:{fontSize:10.5,color:K,fontWeight:700},noWrap:!0,children:r.format("hh:mm A")}),(0,B.jsxs)(u.Z,{sx:{fontSize:10.5,color:N,fontWeight:600},noWrap:!0,children:["\xb7 ",r.format("DD MMM YY")]})]})}()]})]}),(0,B.jsx)(P.Z,{children:(0,B.jsxs)(p.Z,{direction:"column",children:[(0,B.jsx)(u.Z,{variant:"subtitle2",sx:{fontWeight:700,color:H},noWrap:!0,children:e.pickupcustomer}),(0,B.jsx)(u.Z,{variant:"caption",sx:{color:K},children:e.pickupcontactno}),(0,B.jsx)(g.Z,{title:e.pickupaddress,children:(0,B.jsx)(u.Z,{variant:"caption",sx:{color:N},noWrap:!0,children:e.pickupsuburb||(e.pickupaddress?"".concat(e.pickupaddress.slice(0,20),"\u2026"):"\u2014")})})]})}),(0,B.jsx)(P.Z,{children:(0,B.jsxs)(p.Z,{direction:"column",children:[(0,B.jsx)(u.Z,{variant:"subtitle2",sx:{fontWeight:700,color:H},noWrap:!0,children:e.deliverycustomer}),(0,B.jsx)(u.Z,{variant:"caption",sx:{color:K},children:e.deliverycontactno}),(0,B.jsx)(g.Z,{title:e.deliveryaddress,children:(0,B.jsx)(u.Z,{variant:"caption",sx:{color:N},noWrap:!0,children:e.deliverysuburb||((null===(o=e.deliveryaddress)||void 0===o?void 0:o.length)>20?"".concat(e.deliveryaddress.slice(0,20),"\u2026"):e.deliveryaddress||"\u2014")})})]})}),(0,B.jsx)(P.Z,{align:"center",children:(0,B.jsx)(ne,{value:e.quantity,color:"#0ea5e9",icon:(0,B.jsx)(y.ByW,{size:11})})}),(0,B.jsx)(P.Z,{align:"right",children:(0,B.jsx)(ne,{value:e.collectionamt,color:"#10b981",icon:(0,B.jsx)(y.vCl,{size:11}),isMoney:!0})}),(0,B.jsx)(P.Z,{align:"center",children:(0,B.jsx)(ne,{value:e.kms,color:"#f59e0b",icon:(0,B.jsx)(y.v93,{size:11})})}),(0,B.jsx)(P.Z,{align:"right",children:(0,B.jsx)(ne,{value:e.deliverycharge,color:$,icon:(0,B.jsx)(y.vCl,{size:11}),isMoney:!0})}),(0,B.jsx)(P.Z,{children:e.ordernotes?(0,B.jsxs)(p.Z,{direction:"row",spacing:.5,alignItems:"center",sx:{color:K},children:[(0,B.jsx)(y.hKf,{size:12,style:{color:N,flexShrink:0}}),(0,B.jsx)(u.Z,{variant:"caption",sx:{maxWidth:140,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:600},children:e.ordernotes})]}):(0,B.jsx)(u.Z,{variant:"caption",sx:{color:N},children:"\u2014"})}),(0,B.jsx)(P.Z,{children:(0,B.jsx)(oe,{status:e.orderstatus})}),"created"===ve&&(0,B.jsx)(P.Z,{align:"right",children:"created"===e.orderstatus&&(0,B.jsx)(g.Z,{title:"Cancel Order",children:(0,B.jsx)(m.Z,{size:"small",onClick:function(r){r.stopPropagation(),Ce(e.orderheaderid),je(!0)},sx:{bgcolor:V("#ef4444"),border:"1px solid ".concat(X("#ef4444")),color:"#ef4444",borderRadius:999,p:.75,"&:hover":{bgcolor:q("#ef4444"),borderColor:"#ef4444"}},children:(0,B.jsx)(y.FU5,{size:14})})})})]},"".concat(e.orderheaderid,"-").concat(r))})),0!==hr.length&&(0,B.jsx)(E.Z,{sx:{"&:hover":{backgroundColor:"transparent !important"}},children:(0,B.jsx)(P.Z,{colSpan:"created"===ve?11:10,sx:{borderBottom:"none",py:1,bgcolor:G},children:(0,B.jsx)(p.Z,{ref:r,direction:"row",alignItems:"center",justifyContent:"center",spacing:1,sx:{minHeight:32},children:xr||dr?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(_.Z,{size:14,sx:{color:$}}),(0,B.jsx)(u.Z,{sx:{fontSize:11.5,color:K,fontWeight:700},children:"Loading more deliveries\u2026"})]}):(0,B.jsxs)(u.Z,{sx:{fontSize:11.5,color:N,fontWeight:700,letterSpacing:.3},children:[hr.length," delivery",1===hr.length?"":"s"," \xb7 End of list"]})})})})]})]})})}),(0,B.jsxs)(T.Z,{open:Ze,onClose:function(){return je(!1)},maxWidth:"xs",PaperProps:{sx:{borderRadius:3}},children:[(0,B.jsx)(x.Z,{sx:{p:2.5,background:"linear-gradient(135deg, ".concat(V("#ef4444")," 0%, ").concat(V("#f59e0b")," 100%)"),borderBottom:"1px solid ".concat(F)},children:(0,B.jsxs)(p.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,B.jsx)(f.Z,{sx:{bgcolor:"#ef4444",color:"#fff",width:40,height:40},children:(0,B.jsx)(y.F1H,{size:20})}),(0,B.jsx)(u.Z,{variant:"h5",sx:{fontWeight:800,color:H},children:"Cancel Delivery"})]})}),(0,B.jsx)(D.Z,{sx:{pt:3},children:(0,B.jsxs)(p.Z,{alignItems:"center",spacing:3,children:[(0,B.jsx)(u.Z,{variant:"body1",align:"center",sx:{color:K,fontWeight:600},children:"Are you sure you want to cancel this delivery? This action cannot be undone."}),(0,B.jsxs)(p.Z,{direction:"row",spacing:1.5,sx:{width:1},children:[(0,B.jsx)(C.Z,{fullWidth:!0,onClick:function(){return je(!1)},variant:"outlined",sx:{borderRadius:999,py:1,borderColor:F,color:K,fontWeight:700,"&:hover":{borderColor:K,bgcolor:G}},children:"No"}),(0,B.jsx)(C.Z,{fullWidth:!0,variant:"contained",onClick:tr,autoFocus:!0,sx:{borderRadius:999,py:1,bgcolor:"#ef4444",fontWeight:700,boxShadow:"0 6px 18px ".concat(Q("#ef4444")),"&:hover":{bgcolor:"#dc2626"}},children:"Yes, Cancel"})]})]})})]}),(0,B.jsx)(k.Z,{open:De,onClose:function(){return ye(!1)},onApply:function(e){var r=e.startDate,o=e.endDate,n=e.label;Be(r),Ke(o),We(n)}})]})}}}]);